Class: OCI::Database::Models::ExadataDbSystemMigration
- Inherits:
-
Object
- Object
- OCI::Database::Models::ExadataDbSystemMigration
- Defined in:
- lib/oci/database/models/exadata_db_system_migration.rb
Overview
Information about the Exadata DB system migration. The migration is used to move the Exadata Cloud Service instance from the DB system resource model to the new cloud Exadata infrastructure resource model.
Instance Attribute Summary collapse
-
#additional_migrations ⇒ Array<OCI::Database::Models::ExadataDbSystemMigrationSummary>
The details of addtional resources related to the migration.
-
#cloud_exadata_infrastructure_id ⇒ String
[Required] The OCID of the cloud Exadata infrastructure.
-
#cloud_vm_cluster_id ⇒ String
[Required] The OCID of the cloud VM cluster.
-
#db_system_id ⇒ String
[Required] The OCID of the DB system.
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 = {}) ⇒ ExadataDbSystemMigration
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 = {}) ⇒ ExadataDbSystemMigration
Initializes the object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 62 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.db_system_id = attributes[:'dbSystemId'] if attributes[:'dbSystemId'] raise 'You cannot provide both :dbSystemId and :db_system_id' if attributes.key?(:'dbSystemId') && attributes.key?(:'db_system_id') self.db_system_id = attributes[:'db_system_id'] if attributes[:'db_system_id'] self.cloud_vm_cluster_id = attributes[:'cloudVmClusterId'] if attributes[:'cloudVmClusterId'] raise 'You cannot provide both :cloudVmClusterId and :cloud_vm_cluster_id' if attributes.key?(:'cloudVmClusterId') && attributes.key?(:'cloud_vm_cluster_id') self.cloud_vm_cluster_id = attributes[:'cloud_vm_cluster_id'] if attributes[:'cloud_vm_cluster_id'] self.cloud_exadata_infrastructure_id = attributes[:'cloudExadataInfrastructureId'] if attributes[:'cloudExadataInfrastructureId'] raise 'You cannot provide both :cloudExadataInfrastructureId and :cloud_exadata_infrastructure_id' if attributes.key?(:'cloudExadataInfrastructureId') && attributes.key?(:'cloud_exadata_infrastructure_id') self.cloud_exadata_infrastructure_id = attributes[:'cloud_exadata_infrastructure_id'] if attributes[:'cloud_exadata_infrastructure_id'] self.additional_migrations = attributes[:'additionalMigrations'] if attributes[:'additionalMigrations'] raise 'You cannot provide both :additionalMigrations and :additional_migrations' if attributes.key?(:'additionalMigrations') && attributes.key?(:'additional_migrations') self.additional_migrations = attributes[:'additional_migrations'] if attributes[:'additional_migrations'] end |
Instance Attribute Details
#additional_migrations ⇒ Array<OCI::Database::Models::ExadataDbSystemMigrationSummary>
The details of addtional resources related to the migration.
26 27 28 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 26 def additional_migrations @additional_migrations end |
#cloud_exadata_infrastructure_id ⇒ String
[Required] The OCID of the cloud Exadata infrastructure.
22 23 24 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 22 def cloud_exadata_infrastructure_id @cloud_exadata_infrastructure_id end |
#cloud_vm_cluster_id ⇒ String
[Required] The OCID of the cloud VM cluster.
18 19 20 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 18 def cloud_vm_cluster_id @cloud_vm_cluster_id end |
#db_system_id ⇒ String
[Required] The OCID of the DB system.
14 15 16 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 14 def db_system_id @db_system_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 29 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'db_system_id': :'dbSystemId', 'cloud_vm_cluster_id': :'cloudVmClusterId', 'cloud_exadata_infrastructure_id': :'cloudExadataInfrastructureId', 'additional_migrations': :'additionalMigrations' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 41 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'db_system_id': :'String', 'cloud_vm_cluster_id': :'String', 'cloud_exadata_infrastructure_id': :'String', 'additional_migrations': :'Array<OCI::Database::Models::ExadataDbSystemMigrationSummary>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 100 def ==(other) return true if equal?(other) self.class == other.class && db_system_id == other.db_system_id && cloud_vm_cluster_id == other.cloud_vm_cluster_id && cloud_exadata_infrastructure_id == other.cloud_exadata_infrastructure_id && additional_migrations == other.additional_migrations end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 133 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
113 114 115 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 113 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
122 123 124 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 122 def hash [db_system_id, cloud_vm_cluster_id, cloud_exadata_infrastructure_id, additional_migrations].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 166 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
160 161 162 |
# File 'lib/oci/database/models/exadata_db_system_migration.rb', line 160 def to_s to_hash.to_s end |