Class: OCI::FusionApps::Models::ScheduledActivitySummary

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

Overview

Summary of the scheduled activity for a Fusion environment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ScheduledActivitySummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
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
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 163

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

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

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

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

  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

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

List of actions



33
34
35
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 33

def actions
  @actions
end

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

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

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


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

def defined_tags
  @defined_tags
end

#delay_in_hoursInteger

Cumulative delay hours

Returns:

  • (Integer)


49
50
51
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 49

def delay_in_hours
  @delay_in_hours
end

#display_nameString

[Required] A friendly name for the scheduled activity. Can be changed later.

Returns:

  • (String)


17
18
19
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 17

def display_name
  @display_name
end

#freeform_tagsHash<String, String>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, String>)


79
80
81
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 79

def freeform_tags
  @freeform_tags
end

#fusion_environment_idString

[Required] The OCID of the Fusion environment for the scheduled activity.

Returns:

  • (String)


25
26
27
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 25

def fusion_environment_id
  @fusion_environment_id
end

#idString

[Required] Unique identifier that is immutable on creation.

Returns:

  • (String)


13
14
15
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 13

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)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the scheduled activity. Valid values are Scheduled, In progress , Failed, Completed.

Returns:

  • (String)


29
30
31
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 29

def lifecycle_state
  @lifecycle_state
end

#run_cycleString

[Required] The run cadence of this scheduled activity. Valid values are Quarterly, Monthly, OneOff, and Vertex.

Returns:

  • (String)


21
22
23
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 21

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)


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

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)


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

def scheduled_activity_phase
  @scheduled_activity_phase
end

#service_availabilityString

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

Returns:

  • (String)


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

def service_availability
  @service_availability
end

#time_acceptedDateTime

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

Returns:

  • (DateTime)


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

def time_accepted
  @time_accepted
end

#time_expected_finishDateTime

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

Returns:

  • (DateTime)


41
42
43
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 41

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)


45
46
47
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 45

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)


37
38
39
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 37

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)


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

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 88

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',
    'time_scheduled_start': :'timeScheduledStart',
    'time_expected_finish': :'timeExpectedFinish',
    'time_finished': :'timeFinished',
    'delay_in_hours': :'delayInHours',
    'service_availability': :'serviceAvailability',
    'time_accepted': :'timeAccepted',
    'time_updated': :'timeUpdated',
    'lifecycle_details': :'lifecycleDetails',
    'scheduled_activity_phase': :'scheduledActivityPhase',
    'scheduled_activity_association_id': :'scheduledActivityAssociationId',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



114
115
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_summary.rb', line 114

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>',
    'time_scheduled_start': :'DateTime',
    'time_expected_finish': :'DateTime',
    'time_finished': :'DateTime',
    'delay_in_hours': :'Integer',
    'service_availability': :'String',
    'time_accepted': :'DateTime',
    'time_updated': :'DateTime',
    'lifecycle_details': :'String',
    'scheduled_activity_phase': :'String',
    'scheduled_activity_association_id': :'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



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 277

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 &&
    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 &&
    service_availability == other.service_availability &&
    time_accepted == other.time_accepted &&
    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 &&
    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



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 324

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


304
305
306
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 304

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



313
314
315
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 313

def hash
  [id, display_name, run_cycle, fusion_environment_id, lifecycle_state, actions, time_scheduled_start, time_expected_finish, time_finished, delay_in_hours, service_availability, time_accepted, time_updated, lifecycle_details, scheduled_activity_phase, scheduled_activity_association_id, 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



357
358
359
360
361
362
363
364
365
366
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 357

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



351
352
353
# File 'lib/oci/fusion_apps/models/scheduled_activity_summary.rb', line 351

def to_s
  to_hash.to_s
end