Class: OCI::FusionApps::Models::RefreshActivity

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

Overview

An environment refresh copies data from a source environment to a target environment, making a copy of the source environment onto the target environment. For more information, see Refreshing an Environment.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze,
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RefreshActivity

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



150
151
152
153
154
155
156
157
158
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
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
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 150

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

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

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

  self.time_of_restoration_point = attributes[:'timeOfRestorationPoint'] if attributes[:'timeOfRestorationPoint']

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

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

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

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

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

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

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


43
44
45
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 43

def display_name
  @display_name
end

#idString

[Required] The unique identifier (OCID) of the refresh activity. Can't be changed after creation.

Returns:

  • (String)


39
40
41
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 39

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)


87
88
89
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 87

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the refreshActivity.

Returns:

  • (String)


55
56
57
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 55

def lifecycle_state
  @lifecycle_state
end

#refresh_issue_details_listArray<OCI::FusionApps::Models::RefreshIssueDetails>

Details of refresh investigation information, each item represents a different issue.



83
84
85
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 83

def refresh_issue_details_list
  @refresh_issue_details_list
end

#service_availabilityString

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

Returns:

  • (String)


59
60
61
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 59

def service_availability
  @service_availability
end

#source_fusion_environment_idString

[Required] The OCID of the Fusion environment that is the source environment for the refresh.

Returns:

  • (String)


47
48
49
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 47

def source_fusion_environment_id
  @source_fusion_environment_id
end

#time_acceptedDateTime

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

Returns:

  • (DateTime)


75
76
77
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 75

def time_accepted
  @time_accepted
end

#time_expected_finishDateTime

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

Returns:

  • (DateTime)


67
68
69
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 67

def time_expected_finish
  @time_expected_finish
end

#time_finishedDateTime

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

Returns:

  • (DateTime)


71
72
73
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 71

def time_finished
  @time_finished
end

#time_of_restoration_pointDateTime

The date and time of the most recent source environment backup used for the environment refresh.

Returns:

  • (DateTime)


51
52
53
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 51

def time_of_restoration_point
  @time_of_restoration_point
end

#time_scheduled_startDateTime

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

Returns:

  • (DateTime)


63
64
65
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 63

def time_scheduled_start
  @time_scheduled_start
end

#time_updatedDateTime

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

Returns:

  • (DateTime)


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

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'source_fusion_environment_id': :'sourceFusionEnvironmentId',
    'time_of_restoration_point': :'timeOfRestorationPoint',
    'lifecycle_state': :'lifecycleState',
    'service_availability': :'serviceAvailability',
    'time_scheduled_start': :'timeScheduledStart',
    'time_expected_finish': :'timeExpectedFinish',
    'time_finished': :'timeFinished',
    'time_accepted': :'timeAccepted',
    'time_updated': :'timeUpdated',
    'refresh_issue_details_list': :'refreshIssueDetailsList',
    'lifecycle_details': :'lifecycleDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 111

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'source_fusion_environment_id': :'String',
    'time_of_restoration_point': :'DateTime',
    'lifecycle_state': :'String',
    'service_availability': :'String',
    'time_scheduled_start': :'DateTime',
    'time_expected_finish': :'DateTime',
    'time_finished': :'DateTime',
    'time_accepted': :'DateTime',
    'time_updated': :'DateTime',
    'refresh_issue_details_list': :'Array<OCI::FusionApps::Models::RefreshIssueDetails>',
    'lifecycle_details': :'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



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

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

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    source_fusion_environment_id == other.source_fusion_environment_id &&
    time_of_restoration_point == other.time_of_restoration_point &&
    lifecycle_state == other.lifecycle_state &&
    service_availability == other.service_availability &&
    time_scheduled_start == other.time_scheduled_start &&
    time_expected_finish == other.time_expected_finish &&
    time_finished == other.time_finished &&
    time_accepted == other.time_accepted &&
    time_updated == other.time_updated &&
    refresh_issue_details_list == other.refresh_issue_details_list &&
    lifecycle_details == other.lifecycle_details
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



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 319

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


299
300
301
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 299

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



308
309
310
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 308

def hash
  [id, display_name, source_fusion_environment_id, time_of_restoration_point, lifecycle_state, service_availability, time_scheduled_start, time_expected_finish, time_finished, time_accepted, time_updated, refresh_issue_details_list, lifecycle_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



352
353
354
355
356
357
358
359
360
361
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 352

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



346
347
348
# File 'lib/oci/fusion_apps/models/refresh_activity.rb', line 346

def to_s
  to_hash.to_s
end