Class: OCI::CloudMigrations::Models::MigrationAssetSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/cloud_migrations/models/migration_asset_summary.rb

Overview

Summary of the migration asset.

Constant Summary collapse

NOTIFICATIONS_ENUM =
[
  NOTIFICATIONS_OUT_OF_DATE = 'OUT_OF_DATE'.freeze,
  NOTIFICATIONS_SOURCE_REMOVED = 'SOURCE_REMOVED'.freeze,
  NOTIFICATIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MigrationAssetSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 190

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

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

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

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

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

  self.parent_snapshot = attributes[:'parentSnapshot'] if attributes[:'parentSnapshot']

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

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

  self.snapshot_info = attributes[:'snapshotInfo'] if attributes[:'snapshotInfo']

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

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

  self.source_asset_data = attributes[:'sourceAssetData'] if attributes[:'sourceAssetData']

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

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

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

  self.source_asset_id = attributes[:'sourceAssetId'] if attributes[:'sourceAssetId']

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

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

  self.depended_on_by = attributes[:'dependedOnBy'] if attributes[:'dependedOnBy']

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

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

  self.depends_on = attributes[:'dependsOn'] if attributes[:'dependsOn']

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

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

  self.replication_schedule_id = attributes[:'replicationScheduleId'] if attributes[:'replicationScheduleId']

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

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

  self.tenancy_id = attributes[:'tenancyId'] if attributes[:'tenancyId']

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

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

  self.replication_location_detail = attributes[:'replicationLocationDetail'] if attributes[:'replicationLocationDetail']

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

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

  self.destination_disks = attributes[:'destinationDisks'] if attributes[:'destinationDisks']

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

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

Instance Attribute Details

#compartment_idString

Compartment identifier

Returns:

  • (String)


32
33
34
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 32

def compartment_id
  @compartment_id
end

#depended_on_byArray<String>

List of migration assets that depend on this asset.

Returns:

  • (Array<String>)


84
85
86
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 84

def depended_on_by
  @depended_on_by
end

#depends_onArray<String>

List of migration assets that depend on this asset.

Returns:

  • (Array<String>)


88
89
90
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 88

def depends_on
  @depends_on
end

#destination_disksHash<String, OCI::CloudMigrations::Models::DestinationDisk>

Mapping of source disk id to destination disk details



103
104
105
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 103

def destination_disks
  @destination_disks
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


28
29
30
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 28

def display_name
  @display_name
end

#idString

[Required] The asset ID generated by the mirgration service. It is used in the migration service pipeline.

Returns:

  • (String)


20
21
22
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 20

def id
  @id
end

#lifecycle_detailsString

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

Returns:

  • (String)


40
41
42
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 40

def lifecycle_details
  @lifecycle_details
end

#lifecycle_stateString

[Required] The current state of the migration asset.

Returns:

  • (String)


36
37
38
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 36

def lifecycle_state
  @lifecycle_state
end

#migration_idString

[Required] OCID of the associated migration.

Returns:

  • (String)


52
53
54
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 52

def migration_id
  @migration_id
end

#notificationsArray<String>

List of notifications.

Returns:

  • (Array<String>)


76
77
78
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 76

def notifications
  @notifications
end

#parent_snapshotString

The parent snapshot of the mgration asset to be used by the replication task.

Returns:

  • (String)


62
63
64
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 62

def parent_snapshot
  @parent_snapshot
end

#replication_location_detailOCI::CloudMigrations::Models::ReplicationLocationDetail



99
100
101
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 99

def replication_location_detail
  @replication_location_detail
end

#replication_schedule_idString

Replication schedule identifier

Returns:

  • (String)


92
93
94
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 92

def replication_schedule_id
  @replication_schedule_id
end

#snapshot_infoString

The snapshot information.

Returns:

  • (String)


66
67
68
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 66

def snapshot_info
  @snapshot_info
end

#snapshotsHash<String, OCI::CloudMigrations::Models::HydratedVolume>

Key-value pair representing disk's ID that is mapped to the OCIDs of replicated/hydration server volume snapshots. Example: {\"bar-key\": \"value\"}



58
59
60
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 58

def snapshots
  @snapshots
end

#source_asset_dataHash<String, Object>

Key-value pair representing asset metadata keys and values scoped to a namespace. Example: {\"bar-key\": \"value\"}

Returns:

  • (Hash<String, Object>)


72
73
74
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 72

def source_asset_data
  @source_asset_data
end

#source_asset_idString

OCID that is referenced to an asset, for an inventory.

Returns:

  • (String)


80
81
82
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 80

def source_asset_id
  @source_asset_id
end

#tenancy_idString

Tenancy Identifier

Returns:

  • (String)


96
97
98
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 96

def tenancy_id
  @tenancy_id
end

#time_createdDateTime

[Required] The time when the migration asset was created. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


44
45
46
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 44

def time_created
  @time_created
end

#time_updatedDateTime

The time when the migration asset was updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


48
49
50
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 48

def time_updated
  @time_updated
end

#typeString

[Required] The type of asset referenced for an inventory.

Returns:

  • (String)


24
25
26
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 24

def type
  @type
end

Class Method Details

.attribute_mapObject

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



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 106

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'type': :'type',
    'display_name': :'displayName',
    'compartment_id': :'compartmentId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'migration_id': :'migrationId',
    'snapshots': :'snapshots',
    'parent_snapshot': :'parentSnapshot',
    'snapshot_info': :'snapshotInfo',
    'source_asset_data': :'sourceAssetData',
    'notifications': :'notifications',
    'source_asset_id': :'sourceAssetId',
    'depended_on_by': :'dependedOnBy',
    'depends_on': :'dependsOn',
    'replication_schedule_id': :'replicationScheduleId',
    'tenancy_id': :'tenancyId',
    'replication_location_detail': :'replicationLocationDetail',
    'destination_disks': :'destinationDisks'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 135

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'type': :'String',
    'display_name': :'String',
    'compartment_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'migration_id': :'String',
    'snapshots': :'Hash<String, OCI::CloudMigrations::Models::HydratedVolume>',
    'parent_snapshot': :'String',
    'snapshot_info': :'String',
    'source_asset_data': :'Hash<String, Object>',
    'notifications': :'Array<String>',
    'source_asset_id': :'String',
    'depended_on_by': :'Array<String>',
    'depends_on': :'Array<String>',
    'replication_schedule_id': :'String',
    'tenancy_id': :'String',
    'replication_location_detail': :'OCI::CloudMigrations::Models::ReplicationLocationDetail',
    'destination_disks': :'Hash<String, OCI::CloudMigrations::Models::DestinationDisk>'
    # 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



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 334

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

  self.class == other.class &&
    id == other.id &&
    type == other.type &&
    display_name == other.display_name &&
    compartment_id == other.compartment_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    migration_id == other.migration_id &&
    snapshots == other.snapshots &&
    parent_snapshot == other.parent_snapshot &&
    snapshot_info == other.snapshot_info &&
    source_asset_data == other.source_asset_data &&
    notifications == other.notifications &&
    source_asset_id == other.source_asset_id &&
    depended_on_by == other.depended_on_by &&
    depends_on == other.depends_on &&
    replication_schedule_id == other.replication_schedule_id &&
    tenancy_id == other.tenancy_id &&
    replication_location_detail == other.replication_location_detail &&
    destination_disks == other.destination_disks
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



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

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


364
365
366
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 364

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



373
374
375
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 373

def hash
  [id, type, display_name, compartment_id, lifecycle_state, lifecycle_details, time_created, time_updated, migration_id, snapshots, parent_snapshot, snapshot_info, source_asset_data, notifications, source_asset_id, depended_on_by, depends_on, replication_schedule_id, tenancy_id, replication_location_detail, destination_disks].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



417
418
419
420
421
422
423
424
425
426
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 417

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



411
412
413
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 411

def to_s
  to_hash.to_s
end