Class: OCI::Database::Models::ExadataLiveImageVersionDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/exadata_live_image_version_details.rb

Overview

Details about the most recent live image version applied on the VM Cluster, if any. If a full OS update was applied, the fields would be blank.

Constant Summary collapse

UPDATE_MODE_ENUM =
[
  UPDATE_MODE_ONLINE_HIGHCVSS = 'ONLINE_HIGHCVSS'.freeze,
  UPDATE_MODE_ONLINE_ALLCVSS = 'ONLINE_ALLCVSS'.freeze,
  UPDATE_MODE_ONLINE_ALL_UPDATES = 'ONLINE_ALL_UPDATES'.freeze,
  UPDATE_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExadataLiveImageVersionDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :update_mode (String)

    The value to assign to the #update_mode property

  • :version (String)

    The value to assign to the #version property

  • :has_pending_updates (BOOLEAN)

    The value to assign to the #has_pending_updates property

  • :time_released (DateTime)

    The value to assign to the #time_released property



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 71

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

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.update_mode = attributes[:'updateMode'] if attributes[:'updateMode']

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

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

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

  self.has_pending_updates = attributes[:'hasPendingUpdates'] unless attributes[:'hasPendingUpdates'].nil?

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

  self.has_pending_updates = attributes[:'has_pending_updates'] unless attributes[:'has_pending_updates'].nil?

  self.time_released = attributes[:'timeReleased'] if attributes[:'timeReleased']

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

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

Instance Attribute Details

#has_pending_updatesBOOLEAN

Indicates whether OS updates that require node reboot are pending after the previous online update was applied.

Returns:

  • (BOOLEAN)


31
32
33
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 31

def has_pending_updates
  @has_pending_updates
end

#time_releasedDateTime

The release date and time for the applied Live Exadata Image OS version.

Returns:

  • (DateTime)


35
36
37
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 35

def time_released
  @time_released
end

#update_modeString

The OS live update mode performed most recently on the VM Cluster.

Returns:

  • (String)


22
23
24
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 22

def update_mode
  @update_mode
end

#versionString

Live Exadata Image Version of the Guest OS Update applied.

Returns:

  • (String)


26
27
28
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 26

def version
  @version
end

Class Method Details

.attribute_mapObject

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



38
39
40
41
42
43
44
45
46
47
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 38

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'update_mode': :'updateMode',
    'version': :'version',
    'has_pending_updates': :'hasPendingUpdates',
    'time_released': :'timeReleased'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



50
51
52
53
54
55
56
57
58
59
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 50

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'update_mode': :'String',
    'version': :'String',
    'has_pending_updates': :'BOOLEAN',
    'time_released': :'DateTime'
    # 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



118
119
120
121
122
123
124
125
126
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 118

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

  self.class == other.class &&
    update_mode == other.update_mode &&
    version == other.version &&
    has_pending_updates == other.has_pending_updates &&
    time_released == other.time_released
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



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 151

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


131
132
133
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 131

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



140
141
142
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 140

def hash
  [update_mode, version, has_pending_updates, time_released].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



184
185
186
187
188
189
190
191
192
193
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 184

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



178
179
180
# File 'lib/oci/database/models/exadata_live_image_version_details.rb', line 178

def to_s
  to_hash.to_s
end