Class: OCI::Wlms::Models::ApplicablePatchSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/wlms/models/applicable_patch_summary.rb

Overview

Details of a patch that can be installed in a WebLogic domain.

Constant Summary collapse

MIDDLEWARE_TYPE_ENUM =
[
  MIDDLEWARE_TYPE_FMW = 'FMW'.freeze,
  MIDDLEWARE_TYPE_WLS = 'WLS'.freeze,
  MIDDLEWARE_TYPE_OPATCH = 'OPATCH'.freeze,
  MIDDLEWARE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ApplicablePatchSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :weblogic_version (String)

    The value to assign to the #weblogic_version property

  • :middleware_type (Array<String>)

    The value to assign to the #middleware_type property

  • :os_arch (String)

    The value to assign to the #os_arch property



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 84

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  self.id = attributes[:'id'] if attributes[:'id']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.description = attributes[:'description'] if attributes[:'description']

  self.weblogic_version = attributes[:'weblogicVersion'] if attributes[:'weblogicVersion']

  raise 'You cannot provide both :weblogicVersion and :weblogic_version' if attributes.key?(:'weblogicVersion') && attributes.key?(:'weblogic_version')

  self.weblogic_version = attributes[:'weblogic_version'] if attributes[:'weblogic_version']

  self.middleware_type = attributes[:'middlewareType'] if attributes[:'middlewareType']

  raise 'You cannot provide both :middlewareType and :middleware_type' if attributes.key?(:'middlewareType') && attributes.key?(:'middleware_type')

  self.middleware_type = attributes[:'middleware_type'] if attributes[:'middleware_type']

  self.os_arch = attributes[:'osArch'] if attributes[:'osArch']

  raise 'You cannot provide both :osArch and :os_arch' if attributes.key?(:'osArch') && attributes.key?(:'os_arch')

  self.os_arch = attributes[:'os_arch'] if attributes[:'os_arch']
end

Instance Attribute Details

#descriptionString

[Required] The description of the WebLogic patch.

Returns:

  • (String)


30
31
32
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 30

def description
  @description
end

#display_nameString

[Required] The name of the WebLogic patch.

Returns:

  • (String)


26
27
28
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 26

def display_name
  @display_name
end

#idString

[Required] The ID of the WebLogic patch.

Returns:

  • (String)


22
23
24
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 22

def id
  @id
end

#middleware_typeArray<String>

[Required] The type of middleware for which this patch is applicable. A patch can be applicable to more than one type of middleware.

Returns:

  • (Array<String>)


38
39
40
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 38

def middleware_type
  @middleware_type
end

#os_archString

[Required] The operating system architecture for which the patch can be applied.

Returns:

  • (String)


42
43
44
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 42

def os_arch
  @os_arch
end

#weblogic_versionString

[Required] The WebLogic version for this patch. The patch can be installed to domains with this version.

Returns:

  • (String)


34
35
36
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 34

def weblogic_version
  @weblogic_version
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 45

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'description': :'description',
    'weblogic_version': :'weblogicVersion',
    'middleware_type': :'middlewareType',
    'os_arch': :'osArch'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 59

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'description': :'String',
    'weblogic_version': :'String',
    'middleware_type': :'Array<String>',
    'os_arch': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



143
144
145
146
147
148
149
150
151
152
153
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 143

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    description == other.description &&
    weblogic_version == other.weblogic_version &&
    middleware_type == other.middleware_type &&
    os_arch == other.os_arch
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 178

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


158
159
160
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 158

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



167
168
169
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 167

def hash
  [id, display_name, description, weblogic_version, middleware_type, os_arch].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 211

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



205
206
207
# File 'lib/oci/wlms/models/applicable_patch_summary.rb', line 205

def to_s
  to_hash.to_s
end