Class: OCI::CloudMigrations::Models::MigrationAssetSummary
- Inherits:
-
Object
- Object
- OCI::CloudMigrations::Models::MigrationAssetSummary
- 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
-
#compartment_id ⇒ String
Compartment identifier.
-
#depended_on_by ⇒ Array<String>
List of migration assets that depend on this asset.
-
#depends_on ⇒ Array<String>
List of migration assets that depend on this asset.
-
#display_name ⇒ String
A user-friendly name.
-
#id ⇒ String
[Required] The asset ID generated by the mirgration service.
-
#lifecycle_details ⇒ String
A message describing the current state in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the migration asset.
-
#migration_id ⇒ String
[Required] OCID of the associated migration.
-
#notifications ⇒ Array<String>
List of notifications.
-
#parent_snapshot ⇒ String
The parent snapshot of the mgration asset to be used by the replication task.
-
#replication_schedule_id ⇒ String
Replication schedule identifier.
-
#snapshot_info ⇒ String
The snapshot information.
-
#snapshots ⇒ Hash<String, OCI::CloudMigrations::Models::HydratedVolume>
Key-value pair representing disk's ID that is mapped to the OCIDs of replicated/hydration server volume snapshots.
-
#source_asset_data ⇒ Hash<String, Object>
Key-value pair representing asset metadata keys and values scoped to a namespace.
-
#source_asset_id ⇒ String
OCID that is referenced to an asset, for an inventory.
-
#tenancy_id ⇒ String
Tenancy Identifier.
-
#time_created ⇒ DateTime
[Required] The time when the migration asset was created.
-
#time_updated ⇒ DateTime
The time when the migration asset was updated.
-
#type ⇒ String
[Required] The type of asset referenced for an inventory.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ MigrationAssetSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ MigrationAssetSummary
Initializes the object
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 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 177 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'] end |
Instance Attribute Details
#compartment_id ⇒ String
Compartment identifier
32 33 34 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 32 def compartment_id @compartment_id end |
#depended_on_by ⇒ Array<String>
List of migration assets that depend on this asset.
84 85 86 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 84 def depended_on_by @depended_on_by end |
#depends_on ⇒ Array<String>
List of migration assets that depend on this asset.
88 89 90 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 88 def depends_on @depends_on end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
28 29 30 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 28 def display_name @display_name end |
#id ⇒ String
[Required] The asset ID generated by the mirgration service. It is used in the migration service pipeline.
20 21 22 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 20 def id @id end |
#lifecycle_details ⇒ String
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.
40 41 42 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 40 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the migration asset.
36 37 38 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 36 def lifecycle_state @lifecycle_state end |
#migration_id ⇒ String
[Required] OCID of the associated migration.
52 53 54 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 52 def migration_id @migration_id end |
#notifications ⇒ Array<String>
List of notifications.
76 77 78 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 76 def notifications @notifications end |
#parent_snapshot ⇒ String
The parent snapshot of the mgration asset to be used by the replication task.
62 63 64 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 62 def parent_snapshot @parent_snapshot end |
#replication_schedule_id ⇒ String
Replication schedule identifier
92 93 94 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 92 def replication_schedule_id @replication_schedule_id end |
#snapshot_info ⇒ String
The snapshot information.
66 67 68 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 66 def snapshot_info @snapshot_info end |
#snapshots ⇒ Hash<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_data ⇒ Hash<String, Object>
Key-value pair representing asset metadata keys and values scoped to a namespace. Example: {\"bar-key\": \"value\"}
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_id ⇒ String
OCID that is referenced to an asset, for an inventory.
80 81 82 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 80 def source_asset_id @source_asset_id end |
#tenancy_id ⇒ String
Tenancy Identifier
96 97 98 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 96 def tenancy_id @tenancy_id end |
#time_created ⇒ DateTime
[Required] The time when the migration asset was created. An RFC3339 formatted datetime string.
44 45 46 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 44 def time_created @time_created end |
#time_updated ⇒ DateTime
The time when the migration asset was updated. An RFC3339 formatted datetime string.
48 49 50 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 48 def time_updated @time_updated end |
#type ⇒ String
[Required] The type of asset referenced for an inventory.
24 25 26 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 24 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 99 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 126 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 309 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 357 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
337 338 339 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 337 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
346 347 348 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 346 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].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
390 391 392 393 394 395 396 397 398 399 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 390 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_s ⇒ String
Returns the string representation of the object
384 385 386 |
# File 'lib/oci/cloud_migrations/models/migration_asset_summary.rb', line 384 def to_s to_hash.to_s end |