Class: OCI::Database::Models::Update
- Inherits:
-
Object
- Object
- OCI::Database::Models::Update
- Defined in:
- lib/oci/database/models/update.rb
Overview
Update model.
Constant Summary collapse
- LAST_ACTION_ENUM =
[ LAST_ACTION_ROLLING_APPLY = 'ROLLING_APPLY'.freeze, LAST_ACTION_NON_ROLLING_APPLY = 'NON_ROLLING_APPLY'.freeze, LAST_ACTION_PRECHECK = 'PRECHECK'.freeze, LAST_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- AVAILABLE_ACTIONS_ENUM =
[ AVAILABLE_ACTIONS_ROLLING_APPLY = 'ROLLING_APPLY'.freeze, AVAILABLE_ACTIONS_NON_ROLLING_APPLY = 'NON_ROLLING_APPLY'.freeze, AVAILABLE_ACTIONS_PRECHECK = 'PRECHECK'.freeze, AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- UPDATE_TYPE_ENUM =
[ UPDATE_TYPE_GI_UPGRADE = 'GI_UPGRADE'.freeze, UPDATE_TYPE_GI_PATCH = 'GI_PATCH'.freeze, UPDATE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, LIFECYCLE_STATE_SUCCESS = 'SUCCESS'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#available_actions ⇒ Array<String>
The possible actions performed by the update operation on the infrastructure components.
-
#description ⇒ String
[Required] Details of the maintenance update package.
-
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update.
-
#last_action ⇒ String
The update action.
-
#lifecycle_details ⇒ String
Descriptive text providing additional details about the lifecycle state.
-
#lifecycle_state ⇒ String
The current state of the maintenance update.
-
#time_released ⇒ DateTime
[Required] The date and time the maintenance update was released.
-
#update_type ⇒ String
[Required] The type of cloud VM cluster maintenance update.
-
#version ⇒ String
[Required] The version of the maintenance update package.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Update
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ Update
Initializes the object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/database/models/update.rb', line 125 def initialize(attributes = {}) return unless attributes.is_a?(Hash) self.id = attributes[:'id'] if attributes[:'id'] self.description = attributes[:'description'] if attributes[:'description'] self.last_action = attributes[:'lastAction'] if attributes[:'lastAction'] raise 'You cannot provide both :lastAction and :last_action' if attributes.key?(:'lastAction') && attributes.key?(:'last_action') self.last_action = attributes[:'last_action'] if attributes[:'last_action'] self.available_actions = attributes[:'availableActions'] if attributes[:'availableActions'] raise 'You cannot provide both :availableActions and :available_actions' if attributes.key?(:'availableActions') && attributes.key?(:'available_actions') self.available_actions = attributes[:'available_actions'] if attributes[:'available_actions'] self.update_type = attributes[:'updateType'] if attributes[:'updateType'] raise 'You cannot provide both :updateType and :update_type' if attributes.key?(:'updateType') && attributes.key?(:'update_type') self.update_type = attributes[:'update_type'] if attributes[:'update_type'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] 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'] self.version = attributes[:'version'] if attributes[:'version'] end |
Instance Attribute Details
#available_actions ⇒ Array<String>
The possible actions performed by the update operation on the infrastructure components.
53 54 55 |
# File 'lib/oci/database/models/update.rb', line 53 def available_actions @available_actions end |
#description ⇒ String
[Required] Details of the maintenance update package.
45 46 47 |
# File 'lib/oci/database/models/update.rb', line 45 def description @description end |
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance update.
41 42 43 |
# File 'lib/oci/database/models/update.rb', line 41 def id @id end |
#last_action ⇒ String
The update action.
49 50 51 |
# File 'lib/oci/database/models/update.rb', line 49 def last_action @last_action end |
#lifecycle_details ⇒ String
Descriptive text providing additional details about the lifecycle state.
62 63 64 |
# File 'lib/oci/database/models/update.rb', line 62 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the maintenance update. Dependent on value of lastAction.
66 67 68 |
# File 'lib/oci/database/models/update.rb', line 66 def lifecycle_state @lifecycle_state end |
#time_released ⇒ DateTime
[Required] The date and time the maintenance update was released.
70 71 72 |
# File 'lib/oci/database/models/update.rb', line 70 def time_released @time_released end |
#update_type ⇒ String
[Required] The type of cloud VM cluster maintenance update.
57 58 59 |
# File 'lib/oci/database/models/update.rb', line 57 def update_type @update_type end |
#version ⇒ String
[Required] The version of the maintenance update package.
74 75 76 |
# File 'lib/oci/database/models/update.rb', line 74 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/database/models/update.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'description': :'description', 'last_action': :'lastAction', 'available_actions': :'availableActions', 'update_type': :'updateType', 'lifecycle_details': :'lifecycleDetails', 'lifecycle_state': :'lifecycleState', 'time_released': :'timeReleased', 'version': :'version' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/database/models/update.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'description': :'String', 'last_action': :'String', 'available_actions': :'Array<String>', 'update_type': :'String', 'lifecycle_details': :'String', 'lifecycle_state': :'String', 'time_released': :'DateTime', 'version': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/database/models/update.rb', line 237 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && description == other.description && last_action == other.last_action && available_actions == other.available_actions && update_type == other.update_type && lifecycle_details == other.lifecycle_details && lifecycle_state == other.lifecycle_state && time_released == other.time_released && version == other.version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/database/models/update.rb', line 275 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
255 256 257 |
# File 'lib/oci/database/models/update.rb', line 255 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
264 265 266 |
# File 'lib/oci/database/models/update.rb', line 264 def hash [id, description, last_action, available_actions, update_type, lifecycle_details, lifecycle_state, time_released, version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
308 309 310 311 312 313 314 315 316 317 |
# File 'lib/oci/database/models/update.rb', line 308 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_s ⇒ String
Returns the string representation of the object
302 303 304 |
# File 'lib/oci/database/models/update.rb', line 302 def to_s to_hash.to_s end |