Class: OCI::FusionApps::Models::ScheduledActivity

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/fusion_apps/models/scheduled_activity.rb

Overview

Details of scheduled activity.

Constant Summary collapse

RUN_CYCLE_ENUM =
[
  RUN_CYCLE_QUARTERLY = 'QUARTERLY'.freeze,
  RUN_CYCLE_MONTHLY = 'MONTHLY'.freeze,
  RUN_CYCLE_ONEOFF = 'ONEOFF'.freeze,
  RUN_CYCLE_VERTEX = 'VERTEX'.freeze,
  RUN_CYCLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SERVICE_AVAILABILITY_ENUM =
[
  SERVICE_AVAILABILITY_AVAILABLE = 'AVAILABLE'.freeze,
  SERVICE_AVAILABILITY_UNAVAILABLE = 'UNAVAILABLE'.freeze,
  SERVICE_AVAILABILITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_DETAILS_ENUM =
[
  LIFECYCLE_DETAILS_NONE = 'NONE'.freeze,
  LIFECYCLE_DETAILS_ROLLBACKACCEPTED = 'ROLLBACKACCEPTED'.freeze,
  LIFECYCLE_DETAILS_ROLLBACKINPROGRESS = 'ROLLBACKINPROGRESS'.freeze,
  LIFECYCLE_DETAILS_ROLLBACKSUCCEEDED = 'ROLLBACKSUCCEEDED'.freeze,
  LIFECYCLE_DETAILS_ROLLBACKFAILED = 'ROLLBACKFAILED'.freeze,
  LIFECYCLE_DETAILS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SCHEDULED_ACTIVITY_PHASE_ENUM =
[
  SCHEDULED_ACTIVITY_PHASE_PRE_MAINTENANCE = 'PRE_MAINTENANCE'.freeze,
  SCHEDULED_ACTIVITY_PHASE_MAINTENANCE = 'MAINTENANCE'.freeze,
  SCHEDULED_ACTIVITY_PHASE_POST_MAINTENANCE = 'POST_MAINTENANCE'.freeze,
  SCHEDULED_ACTIVITY_PHASE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ScheduledActivity

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
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
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 185

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

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

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

  self.fusion_environment_id = attributes[:'fusionEnvironmentId'] if attributes[:'fusionEnvironmentId']

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

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

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

  self.service_availability = attributes[:'serviceAvailability'] if attributes[:'serviceAvailability']

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

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

  self.time_scheduled_start = attributes[:'timeScheduledStart'] if attributes[:'timeScheduledStart']

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

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

  self.time_expected_finish = attributes[:'timeExpectedFinish'] if attributes[:'timeExpectedFinish']

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

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

  self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished']

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

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

  self.delay_in_hours = attributes[:'delayInHours'] if attributes[:'delayInHours']

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

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

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

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

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

  self.scheduled_activity_association_id = attributes[:'scheduledActivityAssociationId'] if attributes[:'scheduledActivityAssociationId']

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

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

Instance Attribute Details

#actionsArray<OCI::FusionApps::Models::Action>

List of actions



73
74
75
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 73

def actions
  @actions
end

#delay_in_hoursInteger

Cumulative delay hours

Returns:

  • (Integer)


93
94
95
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 93

def delay_in_hours
  @delay_in_hours
end

#display_nameString

[Required] scheduled activity display name, can be renamed.

Returns:

  • (String)


57
58
59
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 57

def display_name
  @display_name
end

#fusion_environment_idString

[Required] FAaaS Environment Identifier.

Returns:

  • (String)


65
66
67
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 65

def fusion_environment_id
  @fusion_environment_id
end

#idString

[Required] Unique identifier that is immutable on creation.

Returns:

  • (String)


53
54
55
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 53

def id
  @id
end

#lifecycle_detailsString

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

Returns:

  • (String)


105
106
107
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 105

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the scheduledActivity.

Returns:

  • (String)


69
70
71
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 69

def lifecycle_state
  @lifecycle_state
end

#run_cycleString

[Required] run cadence.

Returns:

  • (String)


61
62
63
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 61

def run_cycle
  @run_cycle
end

#scheduled_activity_association_idString

[Required] The unique identifier that associates a scheduled activity with others in one complete maintenance. For example, with ZDT, a complete upgrade maintenance includes 5 scheduled activities - PREPARE, EXECUTE, POST, PRE_MAINTENANCE, and POST_MAINTENANCE. All of them share the same unique identifier - scheduledActivityAssociationId.

Returns:

  • (String)


113
114
115
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 113

def scheduled_activity_association_id
  @scheduled_activity_association_id
end

#scheduled_activity_phaseString

[Required] A property describing the phase of the scheduled activity.

Returns:

  • (String)


109
110
111
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 109

def scheduled_activity_phase
  @scheduled_activity_phase
end

#service_availabilityString

[Required] Service availability / impact during scheduled activity execution up down

Returns:

  • (String)


77
78
79
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 77

def service_availability
  @service_availability
end

#time_createdDateTime

The time the scheduled activity record was created. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


97
98
99
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 97

def time_created
  @time_created
end

#time_expected_finishDateTime

[Required] Current time the scheduled activity is scheduled to end. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


85
86
87
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 85

def time_expected_finish
  @time_expected_finish
end

#time_finishedDateTime

The time the scheduled activity actually completed / cancelled / failed. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


89
90
91
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 89

def time_finished
  @time_finished
end

#time_scheduled_startDateTime

[Required] Current time the scheduled activity is scheduled to start. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


81
82
83
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 81

def time_scheduled_start
  @time_scheduled_start
end

#time_updatedDateTime

The time the scheduled activity record was updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


101
102
103
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 101

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 116

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'run_cycle': :'runCycle',
    'fusion_environment_id': :'fusionEnvironmentId',
    'lifecycle_state': :'lifecycleState',
    'actions': :'actions',
    'service_availability': :'serviceAvailability',
    'time_scheduled_start': :'timeScheduledStart',
    'time_expected_finish': :'timeExpectedFinish',
    'time_finished': :'timeFinished',
    'delay_in_hours': :'delayInHours',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'lifecycle_details': :'lifecycleDetails',
    'scheduled_activity_phase': :'scheduledActivityPhase',
    'scheduled_activity_association_id': :'scheduledActivityAssociationId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 140

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'run_cycle': :'String',
    'fusion_environment_id': :'String',
    'lifecycle_state': :'String',
    'actions': :'Array<OCI::FusionApps::Models::Action>',
    'service_availability': :'String',
    'time_scheduled_start': :'DateTime',
    'time_expected_finish': :'DateTime',
    'time_finished': :'DateTime',
    'delay_in_hours': :'Integer',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_details': :'String',
    'scheduled_activity_phase': :'String',
    'scheduled_activity_association_id': :'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



352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 352

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

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    run_cycle == other.run_cycle &&
    fusion_environment_id == other.fusion_environment_id &&
    lifecycle_state == other.lifecycle_state &&
    actions == other.actions &&
    service_availability == other.service_availability &&
    time_scheduled_start == other.time_scheduled_start &&
    time_expected_finish == other.time_expected_finish &&
    time_finished == other.time_finished &&
    delay_in_hours == other.delay_in_hours &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    lifecycle_details == other.lifecycle_details &&
    scheduled_activity_phase == other.scheduled_activity_phase &&
    scheduled_activity_association_id == other.scheduled_activity_association_id
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



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 397

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


377
378
379
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 377

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



386
387
388
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 386

def hash
  [id, display_name, run_cycle, fusion_environment_id, lifecycle_state, actions, service_availability, time_scheduled_start, time_expected_finish, time_finished, delay_in_hours, time_created, time_updated, lifecycle_details, scheduled_activity_phase, scheduled_activity_association_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



430
431
432
433
434
435
436
437
438
439
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 430

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



424
425
426
# File 'lib/oci/fusion_apps/models/scheduled_activity.rb', line 424

def to_s
  to_hash.to_s
end