Class: OCI::FusionApps::Models::RefreshActivitySummary

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

Overview

Summary of the refresh activity.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RefreshActivitySummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



131
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
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
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 131

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.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.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.is_data_masking_opted = attributes[:'isDataMaskingOpted'] unless attributes[:'isDataMaskingOpted'].nil?
  self.is_data_masking_opted = false if is_data_masking_opted.nil? && !attributes.key?(:'isDataMaskingOpted') # rubocop:disable Style/StringLiterals

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

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

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

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


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

def display_name
  @display_name
end

#idString

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

Returns:

  • (String)


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

def id
  @id
end

#is_data_masking_optedBOOLEAN

Represents if the customer opted for Data Masking or not during refreshActivity.

Returns:

  • (BOOLEAN)


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

def is_data_masking_opted
  @is_data_masking_opted
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)


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

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

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

Returns:

  • (String)


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

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.



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

def refresh_issue_details_list
  @refresh_issue_details_list
end

#service_availabilityString

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

Returns:

  • (String)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 68

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',
    'time_scheduled_start': :'timeScheduledStart',
    'time_expected_finish': :'timeExpectedFinish',
    'time_finished': :'timeFinished',
    'service_availability': :'serviceAvailability',
    'time_accepted': :'timeAccepted',
    'time_updated': :'timeUpdated',
    'is_data_masking_opted': :'isDataMaskingOpted',
    'lifecycle_details': :'lifecycleDetails',
    'refresh_issue_details_list': :'refreshIssueDetailsList'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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

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',
    'time_scheduled_start': :'DateTime',
    'time_expected_finish': :'DateTime',
    'time_finished': :'DateTime',
    'service_availability': :'String',
    'time_accepted': :'DateTime',
    'time_updated': :'DateTime',
    'is_data_masking_opted': :'BOOLEAN',
    'lifecycle_details': :'String',
    'refresh_issue_details_list': :'Array<OCI::FusionApps::Models::RefreshIssueDetails>'
    # 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



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 227

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 &&
    time_scheduled_start == other.time_scheduled_start &&
    time_expected_finish == other.time_expected_finish &&
    time_finished == other.time_finished &&
    service_availability == other.service_availability &&
    time_accepted == other.time_accepted &&
    time_updated == other.time_updated &&
    is_data_masking_opted == other.is_data_masking_opted &&
    lifecycle_details == other.lifecycle_details &&
    refresh_issue_details_list == other.refresh_issue_details_list
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



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 270

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


250
251
252
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 250

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



259
260
261
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 259

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

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



303
304
305
306
307
308
309
310
311
312
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 303

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



297
298
299
# File 'lib/oci/fusion_apps/models/refresh_activity_summary.rb', line 297

def to_s
  to_hash.to_s
end