Class: OCI::Database::Models::ExecutionWindowSummary

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

Overview

Details of an execution window.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATED = 'CREATED'.freeze,
  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_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.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_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
WINDOW_TYPE_ENUM =
[
  WINDOW_TYPE_PLANNED = 'PLANNED'.freeze,
  WINDOW_TYPE_UNPLANNED = 'UNPLANNED'.freeze,
  WINDOW_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 = {}) ⇒ ExecutionWindowSummary

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_resource_id (String)

    The value to assign to the #execution_resource_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

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property

  • :time_scheduled (DateTime)

    The value to assign to the #time_scheduled property

  • :window_duration_in_mins (Integer)

    The value to assign to the #window_duration_in_mins property

  • :is_enforced_duration (BOOLEAN)

    The value to assign to the #is_enforced_duration 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

  • :window_type (String)

    The value to assign to the #window_type 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



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
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/oci/database/models/execution_window_summary.rb', line 214

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_resource_id = attributes[:'executionResourceId'] if attributes[:'executionResourceId']

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

  self.execution_resource_id = attributes[:'execution_resource_id'] if attributes[:'execution_resource_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.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']

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

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

  self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded']

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

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

  self.time_scheduled = attributes[:'timeScheduled'] if attributes[:'timeScheduled']

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

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

  self.window_duration_in_mins = attributes[:'windowDurationInMins'] if attributes[:'windowDurationInMins']

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

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

  self.is_enforced_duration = attributes[:'isEnforcedDuration'] unless attributes[:'isEnforcedDuration'].nil?
  self.is_enforced_duration = false if is_enforced_duration.nil? && !attributes.key?(:'isEnforcedDuration') # rubocop:disable Style/StringLiterals

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

  self.is_enforced_duration = attributes[:'is_enforced_duration'] unless attributes[:'is_enforced_duration'].nil?
  self.is_enforced_duration = false if is_enforced_duration.nil? && !attributes.key?(:'isEnforcedDuration') && !attributes.key?(:'is_enforced_duration') # rubocop:disable Style/StringLiterals

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

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

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

  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']
end

Instance Attribute Details

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


52
53
54
# File 'lib/oci/database/models/execution_window_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>>)


130
131
132
# File 'lib/oci/database/models/execution_window_summary.rb', line 130

def defined_tags
  @defined_tags
end

#descriptionString

Description of the execution window.

Returns:

  • (String)


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

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


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

def display_name
  @display_name
end

#estimated_time_in_minsInteger

The estimated time of the execution window in minutes.

Returns:

  • (Integer)


108
109
110
# File 'lib/oci/database/models/execution_window_summary.rb', line 108

def estimated_time_in_mins
  @estimated_time_in_mins
end

#execution_resource_idString

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

Returns:

  • (String)


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

def execution_resource_id
  @execution_resource_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>)


124
125
126
# File 'lib/oci/database/models/execution_window_summary.rb', line 124

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the execution window.

Returns:

  • (String)


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

def id
  @id
end

#is_enforced_durationBOOLEAN

Indicates if duration the user plans to allocate for scheduling window is strictly enforced. The default value is FALSE.

Returns:

  • (BOOLEAN)


104
105
106
# File 'lib/oci/database/models/execution_window_summary.rb', line 104

def is_enforced_duration
  @is_enforced_duration
end

#lifecycle_detailsString

Additional information about the current lifecycle state.

Returns:

  • (String)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

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

Returns:

  • (String)


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

def lifecycle_state
  @lifecycle_state
end

#lifecycle_substateString

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

Returns:

  • (String)


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

def lifecycle_substate
  @lifecycle_substate
end

#time_createdDateTime

The date and time the execution window was created.

Returns:

  • (DateTime)


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

def time_created
  @time_created
end

#time_endedDateTime

The date and time that the execution window ended.

Returns:

  • (DateTime)


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

def time_ended
  @time_ended
end

#time_scheduledDateTime

[Required] The scheduled start date and time of the execution window.

Returns:

  • (DateTime)


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

def time_scheduled
  @time_scheduled
end

#time_startedDateTime

The date and time that the execution window was started.

Returns:

  • (DateTime)


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

def time_started
  @time_started
end

#time_updatedDateTime

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

Returns:

  • (DateTime)


83
84
85
# File 'lib/oci/database/models/execution_window_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)


112
113
114
# File 'lib/oci/database/models/execution_window_summary.rb', line 112

def total_time_taken_in_mins
  @total_time_taken_in_mins
end

#window_duration_in_minsInteger

[Required] Duration window allows user to set a duration they plan to allocate for Scheduling window. The duration is in minutes.

Returns:

  • (Integer)


100
101
102
# File 'lib/oci/database/models/execution_window_summary.rb', line 100

def window_duration_in_mins
  @window_duration_in_mins
end

#window_typeString

The execution window is of PLANNED or UNPLANNED type.

Returns:

  • (String)


116
117
118
# File 'lib/oci/database/models/execution_window_summary.rb', line 116

def window_type
  @window_type
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'execution_resource_id': :'executionResourceId',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_substate': :'lifecycleSubstate',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded',
    'time_scheduled': :'timeScheduled',
    'window_duration_in_mins': :'windowDurationInMins',
    'is_enforced_duration': :'isEnforcedDuration',
    'estimated_time_in_mins': :'estimatedTimeInMins',
    'total_time_taken_in_mins': :'totalTimeTakenInMins',
    'window_type': :'windowType',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'execution_resource_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',
    'time_started': :'DateTime',
    'time_ended': :'DateTime',
    'time_scheduled': :'DateTime',
    'window_duration_in_mins': :'Integer',
    'is_enforced_duration': :'BOOLEAN',
    'estimated_time_in_mins': :'Integer',
    'total_time_taken_in_mins': :'Integer',
    'window_type': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_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



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/oci/database/models/execution_window_summary.rb', line 381

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

  self.class == other.class &&
    id == other.id &&
    execution_resource_id == other.execution_resource_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 &&
    time_started == other.time_started &&
    time_ended == other.time_ended &&
    time_scheduled == other.time_scheduled &&
    window_duration_in_mins == other.window_duration_in_mins &&
    is_enforced_duration == other.is_enforced_duration &&
    estimated_time_in_mins == other.estimated_time_in_mins &&
    total_time_taken_in_mins == other.total_time_taken_in_mins &&
    window_type == other.window_type &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_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



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/oci/database/models/execution_window_summary.rb', line 430

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


410
411
412
# File 'lib/oci/database/models/execution_window_summary.rb', line 410

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



419
420
421
# File 'lib/oci/database/models/execution_window_summary.rb', line 419

def hash
  [id, execution_resource_id, compartment_id, display_name, description, lifecycle_state, lifecycle_substate, lifecycle_details, time_created, time_updated, time_started, time_ended, time_scheduled, window_duration_in_mins, is_enforced_duration, estimated_time_in_mins, total_time_taken_in_mins, window_type, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



463
464
465
466
467
468
469
470
471
472
# File 'lib/oci/database/models/execution_window_summary.rb', line 463

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



457
458
459
# File 'lib/oci/database/models/execution_window_summary.rb', line 457

def to_s
  to_hash.to_s
end