Class: OCI::Database::Models::ExecutionActionSummary

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

Overview

Details of an execution action.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_SCHEDULED = 'SCHEDULED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_PARTIAL_SUCCESS = 'PARTIAL_SUCCESS'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_SUBSTATE_ENUM =
[
  LIFECYCLE_SUBSTATE_DURATION_EXCEEDED = 'DURATION_EXCEEDED'.freeze,
  LIFECYCLE_SUBSTATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.freeze,
  LIFECYCLE_SUBSTATE_WAITING = 'WAITING'.freeze,
  LIFECYCLE_SUBSTATE_RESCHEDULED = 'RESCHEDULED'.freeze,
  LIFECYCLE_SUBSTATE_CANCELED_BY_OPS = 'CANCELED_BY_OPS'.freeze,
  LIFECYCLE_SUBSTATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ACTION_TYPE_ENUM =
[
  ACTION_TYPE_DB_SERVER_FULL_SOFTWARE_UPDATE = 'DB_SERVER_FULL_SOFTWARE_UPDATE'.freeze,
  ACTION_TYPE_STORAGE_SERVER_FULL_SOFTWARE_UPDATE = 'STORAGE_SERVER_FULL_SOFTWARE_UPDATE'.freeze,
  ACTION_TYPE_NETWORK_SWITCH_FULL_SOFTWARE_UPDATE = 'NETWORK_SWITCH_FULL_SOFTWARE_UPDATE'.freeze,
  ACTION_TYPE_DB_SERVER_ONLINE_SOFTWARE_UPDATE = 'DB_SERVER_ONLINE_SOFTWARE_UPDATE'.freeze,
  ACTION_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 = {}) ⇒ ExecutionActionSummary

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

  • :execution_window_id (String)

    The value to assign to the #execution_window_id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_substate (String)

    The value to assign to the #lifecycle_substate property

  • :lifecycle_details (String)

    The value to assign to the #lifecycle_details property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :estimated_time_in_mins (Integer)

    The value to assign to the #estimated_time_in_mins property

  • :total_time_taken_in_mins (Integer)

    The value to assign to the #total_time_taken_in_mins property

  • :execution_action_order (Integer)

    The value to assign to the #execution_action_order property

  • :action_type (String)

    The value to assign to the #action_type property

  • :action_params (Hash<String, String>)

    The value to assign to the #action_params property

  • :action_members (Array<OCI::Database::Models::ExecutionActionMember>)

    The value to assign to the #action_members property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :system_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #system_tags property



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/oci/database/models/execution_action_summary.rb', line 210

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.id = attributes[:'id'] if attributes[:'id']

  self.execution_window_id = attributes[:'executionWindowId'] if attributes[:'executionWindowId']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_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.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.lifecycle_substate = attributes[:'lifecycleSubstate'] if attributes[:'lifecycleSubstate']

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

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

  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.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.estimated_time_in_mins = attributes[:'estimatedTimeInMins'] if attributes[:'estimatedTimeInMins']

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

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

  self.total_time_taken_in_mins = attributes[:'totalTimeTakenInMins'] if attributes[:'totalTimeTakenInMins']

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

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

  self.execution_action_order = attributes[:'executionActionOrder'] if attributes[:'executionActionOrder']

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

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

  self.action_type = attributes[:'actionType'] if attributes[:'actionType']

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

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

  self.action_params = attributes[:'actionParams'] if attributes[:'actionParams']

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

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

  self.action_members = attributes[:'actionMembers'] if attributes[:'actionMembers']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

Instance Attribute Details

#action_membersArray<OCI::Database::Models::ExecutionActionMember>

List of action members of this execution action.



109
110
111
# File 'lib/oci/database/models/execution_action_summary.rb', line 109

def action_members
  @action_members
end

#action_paramsHash<String, String>

[Required] Map<ParamName, ParamValue> where a key value pair describes the specific action parameter. Example: {\"count\": \"3\"}

Returns:

  • (Hash<String, String>)


105
106
107
# File 'lib/oci/database/models/execution_action_summary.rb', line 105

def action_params
  @action_params
end

#action_typeString

[Required] The action type of the execution action being performed

Returns:

  • (String)


99
100
101
# File 'lib/oci/database/models/execution_action_summary.rb', line 99

def action_type
  @action_type
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


52
53
54
# File 'lib/oci/database/models/execution_action_summary.rb', line 52

def compartment_id
  @compartment_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Returns:

  • (Hash<String, Hash<String, Object>>)


123
124
125
# File 'lib/oci/database/models/execution_action_summary.rb', line 123

def defined_tags
  @defined_tags
end

#descriptionString

Description of the execution action.

Returns:

  • (String)


60
61
62
# File 'lib/oci/database/models/execution_action_summary.rb', line 60

def description
  @description
end

#display_nameString

[Required] The user-friendly name for the execution action. The name does not need to be unique.

Returns:

  • (String)


56
57
58
# File 'lib/oci/database/models/execution_action_summary.rb', line 56

def display_name
  @display_name
end

#estimated_time_in_minsInteger

The estimated time of the execution action in minutes.

Returns:

  • (Integer)


87
88
89
# File 'lib/oci/database/models/execution_action_summary.rb', line 87

def estimated_time_in_mins
  @estimated_time_in_mins
end

#execution_action_orderInteger

The priority order of the execution action.

Returns:

  • (Integer)


95
96
97
# File 'lib/oci/database/models/execution_action_summary.rb', line 95

def execution_action_order
  @execution_action_order
end

#execution_window_idString

[Required] The OCID of the execution window resource the execution action belongs to.

Returns:

  • (String)


48
49
50
# File 'lib/oci/database/models/execution_action_summary.rb', line 48

def execution_window_id
  @execution_window_id
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


117
118
119
# File 'lib/oci/database/models/execution_action_summary.rb', line 117

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the execution action.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database/models/execution_action_summary.rb', line 44

def id
  @id
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


75
76
77
# File 'lib/oci/database/models/execution_action_summary.rb', line 75

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the execution action. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, UPDATING, DELETED, SUCCEEDED and PARTIAL_SUCCESS.

Returns:

  • (String)


66
67
68
# File 'lib/oci/database/models/execution_action_summary.rb', line 66

def lifecycle_state
  @lifecycle_state
end

#lifecycle_substateString

The current sub-state of the execution action. Valid states are DURATION_EXCEEDED, MAINTENANCE_IN_PROGRESS and WAITING.

Returns:

  • (String)


71
72
73
# File 'lib/oci/database/models/execution_action_summary.rb', line 71

def lifecycle_substate
  @lifecycle_substate
end

#system_tagsHash<String, Hash<String, Object>>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Returns:

  • (Hash<String, Hash<String, Object>>)


129
130
131
# File 'lib/oci/database/models/execution_action_summary.rb', line 129

def system_tags
  @system_tags
end

#time_createdDateTime

The date and time the execution action was created.

Returns:

  • (DateTime)


79
80
81
# File 'lib/oci/database/models/execution_action_summary.rb', line 79

def time_created
  @time_created
end

#time_updatedDateTime

The last date and time that the execution action was updated.

Returns:

  • (DateTime)


83
84
85
# File 'lib/oci/database/models/execution_action_summary.rb', line 83

def time_updated
  @time_updated
end

#total_time_taken_in_minsInteger

The total time taken by corresponding resource activity in minutes.

Returns:

  • (Integer)


91
92
93
# File 'lib/oci/database/models/execution_action_summary.rb', line 91

def total_time_taken_in_mins
  @total_time_taken_in_mins
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/database/models/execution_action_summary.rb', line 132

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'execution_window_id': :'executionWindowId',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_substate': :'lifecycleSubstate',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'estimated_time_in_mins': :'estimatedTimeInMins',
    'total_time_taken_in_mins': :'totalTimeTakenInMins',
    'execution_action_order': :'executionActionOrder',
    'action_type': :'actionType',
    'action_params': :'actionParams',
    'action_members': :'actionMembers',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/oci/database/models/execution_action_summary.rb', line 159

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'execution_window_id': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'lifecycle_state': :'String',
    'lifecycle_substate': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'estimated_time_in_mins': :'Integer',
    'total_time_taken_in_mins': :'Integer',
    'execution_action_order': :'Integer',
    'action_type': :'String',
    'action_params': :'Hash<String, String>',
    'action_members': :'Array<OCI::Database::Models::ExecutionActionMember>',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>'
    # 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



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/oci/database/models/execution_action_summary.rb', line 369

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

  self.class == other.class &&
    id == other.id &&
    execution_window_id == other.execution_window_id &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    description == other.description &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_substate == other.lifecycle_substate &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    estimated_time_in_mins == other.estimated_time_in_mins &&
    total_time_taken_in_mins == other.total_time_taken_in_mins &&
    execution_action_order == other.execution_action_order &&
    action_type == other.action_type &&
    action_params == other.action_params &&
    action_members == other.action_members &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags
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



417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/oci/database/models/execution_action_summary.rb', line 417

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


397
398
399
# File 'lib/oci/database/models/execution_action_summary.rb', line 397

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



406
407
408
# File 'lib/oci/database/models/execution_action_summary.rb', line 406

def hash
  [id, execution_window_id, compartment_id, display_name, description, lifecycle_state, lifecycle_substate, lifecycle_details, time_created, time_updated, estimated_time_in_mins, total_time_taken_in_mins, execution_action_order, action_type, action_params, action_members, freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



450
451
452
453
454
455
456
457
458
459
# File 'lib/oci/database/models/execution_action_summary.rb', line 450

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



444
445
446
# File 'lib/oci/database/models/execution_action_summary.rb', line 444

def to_s
  to_hash.to_s
end