Class: OCI::DatabaseMigration::Models::Assessment
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::Assessment
- Defined in:
- lib/oci/database_migration/models/assessment.rb
Overview
Assessment resource This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
Constant Summary collapse
- DATABASE_COMBINATION_ENUM =
[ DATABASE_COMBINATION_MYSQL = 'MYSQL'.freeze, DATABASE_COMBINATION_ORACLE = 'ORACLE'.freeze, DATABASE_COMBINATION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- NETWORK_SPEED_MEGABIT_PER_SECOND_ENUM =
[ NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_10 = 'MBPS_10'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_100 = 'MBPS_100'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_1000 = 'MBPS_1000'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_2500 = 'MBPS_2500'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_5000 = 'MBPS_5000'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_MBPS_10000 = 'MBPS_10000'.freeze, NETWORK_SPEED_MEGABIT_PER_SECOND_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ACCEPTABLE_DOWNTIME_ENUM =
[ ACCEPTABLE_DOWNTIME_LESS_THAN_10_MINUTES = 'LESS_THAN_10_MINUTES'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_1_HOUR = 'LESS_THAN_1_HOUR'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_4_HOURS = 'LESS_THAN_4_HOURS'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_8_HOURS = 'LESS_THAN_8_HOURS'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_12_HOURS = 'LESS_THAN_12_HOURS'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_1_DAY = 'LESS_THAN_1_DAY'.freeze, ACCEPTABLE_DOWNTIME_LESS_THAN_2_DAYS = 'LESS_THAN_2_DAYS'.freeze, ACCEPTABLE_DOWNTIME_MORE_THAN_2_DAYS = 'MORE_THAN_2_DAYS'.freeze, ACCEPTABLE_DOWNTIME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DATABASE_DATA_SIZE_ENUM =
[ DATABASE_DATA_SIZE_LESS_THAN_1_GB = 'LESS_THAN_1GB'.freeze, DATABASE_DATA_SIZE_GB_1_10 = 'GB_1_10'.freeze, DATABASE_DATA_SIZE_GB_10_50 = 'GB_10_50'.freeze, DATABASE_DATA_SIZE_GB_50_100 = 'GB_50_100'.freeze, DATABASE_DATA_SIZE_GB_100_500 = 'GB_100_500'.freeze, DATABASE_DATA_SIZE_GB_500_TB_1 = 'GB_500_TB_1'.freeze, DATABASE_DATA_SIZE_TB_1_3 = 'TB_1_3'.freeze, DATABASE_DATA_SIZE_TB_3_10 = 'TB_3_10'.freeze, DATABASE_DATA_SIZE_TB_10_50 = 'TB_10_50'.freeze, DATABASE_DATA_SIZE_GREATER_THAN_50_TB = 'GREATER_THAN_50TB'.freeze, DATABASE_DATA_SIZE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DDL_EXPECTATION_ENUM =
[ DDL_EXPECTATION_DDL_EXPECTED = 'DDL_EXPECTED'.freeze, DDL_EXPECTATION_DDL_NOT_EXPECTED = 'DDL_NOT_EXPECTED'.freeze, DDL_EXPECTATION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CREATION_TYPE_ENUM =
[ CREATION_TYPE_CREATE_ONLY = 'CREATE_ONLY'.freeze, CREATION_TYPE_CREATE_AND_RUN_ASSESSORS = 'CREATE_AND_RUN_ASSESSORS'.freeze, CREATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ASSESSMENT_MIGRATION_TYPE_ENUM =
[ ASSESSMENT_MIGRATION_TYPE_ONLINE = 'ONLINE'.freeze, ASSESSMENT_MIGRATION_TYPE_ONLINE_STANDBY = 'ONLINE_STANDBY'.freeze, ASSESSMENT_MIGRATION_TYPE_OFFLINE = 'OFFLINE'.freeze, ASSESSMENT_MIGRATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#acceptable_downtime ⇒ String
[Required] Time allowed for the application downtime.
-
#assessment_migration_type ⇒ String
The migration type of the migration to be performed.
-
#compartment_id ⇒ String
[Required] The OCID of the resource being referenced.
-
#creation_type ⇒ String
[Required] The type of assessment creation.
-
#database_combination ⇒ String
[Required] The combination of source and target databases participating in a migration.
-
#database_data_size ⇒ String
[Required] The size of a source database.
-
#ddl_expectation ⇒ String
[Required] DDL expectation values.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A user-friendly description.
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the resource being referenced.
-
#lifecycle_state ⇒ String
[Required] The current state of the Assessment resource.
-
#migration_id ⇒ String
The OCID of the resource being referenced.
-
#network_speed_megabit_per_second ⇒ String
[Required] A network speed in Megabits per second.
-
#source_database_connection ⇒ OCI::DatabaseMigration::Models::SourceAssessmentConnection
This attribute is required.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#target_database_connection ⇒ OCI::DatabaseMigration::Models::TargetAssessmentConnection
This attribute is required.
-
#time_created ⇒ DateTime
[Required] An RFC3339 formatted datetime string such as
2016-08-25T21:10:29.600Z. -
#time_updated ⇒ DateTime
An RFC3339 formatted datetime string such as
2016-08-25T21:10:29.600Z.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ Assessment
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 = {}) ⇒ Assessment
Initializes the object
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 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 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 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/database_migration/models/assessment.rb', line 279 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.description = attributes[:'description'] if attributes[:'description'] self.database_combination = attributes[:'databaseCombination'] if attributes[:'databaseCombination'] raise 'You cannot provide both :databaseCombination and :database_combination' if attributes.key?(:'databaseCombination') && attributes.key?(:'database_combination') self.database_combination = attributes[:'database_combination'] if attributes[:'database_combination'] 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.network_speed_megabit_per_second = attributes[:'networkSpeedMegabitPerSecond'] if attributes[:'networkSpeedMegabitPerSecond'] raise 'You cannot provide both :networkSpeedMegabitPerSecond and :network_speed_megabit_per_second' if attributes.key?(:'networkSpeedMegabitPerSecond') && attributes.key?(:'network_speed_megabit_per_second') self.network_speed_megabit_per_second = attributes[:'network_speed_megabit_per_second'] if attributes[:'network_speed_megabit_per_second'] self.acceptable_downtime = attributes[:'acceptableDowntime'] if attributes[:'acceptableDowntime'] raise 'You cannot provide both :acceptableDowntime and :acceptable_downtime' if attributes.key?(:'acceptableDowntime') && attributes.key?(:'acceptable_downtime') self.acceptable_downtime = attributes[:'acceptable_downtime'] if attributes[:'acceptable_downtime'] self.database_data_size = attributes[:'databaseDataSize'] if attributes[:'databaseDataSize'] raise 'You cannot provide both :databaseDataSize and :database_data_size' if attributes.key?(:'databaseDataSize') && attributes.key?(:'database_data_size') self.database_data_size = attributes[:'database_data_size'] if attributes[:'database_data_size'] self.ddl_expectation = attributes[:'ddlExpectation'] if attributes[:'ddlExpectation'] raise 'You cannot provide both :ddlExpectation and :ddl_expectation' if attributes.key?(:'ddlExpectation') && attributes.key?(:'ddl_expectation') self.ddl_expectation = attributes[:'ddl_expectation'] if attributes[:'ddl_expectation'] self.creation_type = attributes[:'creationType'] if attributes[:'creationType'] raise 'You cannot provide both :creationType and :creation_type' if attributes.key?(:'creationType') && attributes.key?(:'creation_type') self.creation_type = attributes[:'creation_type'] if attributes[:'creation_type'] 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.source_database_connection = attributes[:'sourceDatabaseConnection'] if attributes[:'sourceDatabaseConnection'] raise 'You cannot provide both :sourceDatabaseConnection and :source_database_connection' if attributes.key?(:'sourceDatabaseConnection') && attributes.key?(:'source_database_connection') self.source_database_connection = attributes[:'source_database_connection'] if attributes[:'source_database_connection'] self.target_database_connection = attributes[:'targetDatabaseConnection'] if attributes[:'targetDatabaseConnection'] raise 'You cannot provide both :targetDatabaseConnection and :target_database_connection' if attributes.key?(:'targetDatabaseConnection') && attributes.key?(:'target_database_connection') self.target_database_connection = attributes[:'target_database_connection'] if attributes[:'target_database_connection'] 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.assessment_migration_type = attributes[:'assessmentMigrationType'] if attributes[:'assessmentMigrationType'] raise 'You cannot provide both :assessmentMigrationType and :assessment_migration_type' if attributes.key?(:'assessmentMigrationType') && attributes.key?(:'assessment_migration_type') self.assessment_migration_type = attributes[:'assessment_migration_type'] if attributes[:'assessment_migration_type'] 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#acceptable_downtime ⇒ String
[Required] Time allowed for the application downtime.
119 120 121 |
# File 'lib/oci/database_migration/models/assessment.rb', line 119 def acceptable_downtime @acceptable_downtime end |
#assessment_migration_type ⇒ String
The migration type of the migration to be performed.
151 152 153 |
# File 'lib/oci/database_migration/models/assessment.rb', line 151 def assessment_migration_type @assessment_migration_type end |
#compartment_id ⇒ String
[Required] The OCID of the resource being referenced.
111 112 113 |
# File 'lib/oci/database_migration/models/assessment.rb', line 111 def compartment_id @compartment_id end |
#creation_type ⇒ String
[Required] The type of assessment creation.
131 132 133 |
# File 'lib/oci/database_migration/models/assessment.rb', line 131 def creation_type @creation_type end |
#database_combination ⇒ String
[Required] The combination of source and target databases participating in a migration. Example: ORACLE means the migration is meant for migrating Oracle source and target databases.
101 102 103 |
# File 'lib/oci/database_migration/models/assessment.rb', line 101 def database_combination @database_combination end |
#database_data_size ⇒ String
[Required] The size of a source database.
123 124 125 |
# File 'lib/oci/database_migration/models/assessment.rb', line 123 def database_data_size @database_data_size end |
#ddl_expectation ⇒ String
[Required] DDL expectation values.
127 128 129 |
# File 'lib/oci/database_migration/models/assessment.rb', line 127 def ddl_expectation @ddl_expectation end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
173 174 175 |
# File 'lib/oci/database_migration/models/assessment.rb', line 173 def @defined_tags end |
#description ⇒ String
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
95 96 97 |
# File 'lib/oci/database_migration/models/assessment.rb', line 95 def description @description end |
#display_name ⇒ String
[Required] A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
107 108 109 |
# File 'lib/oci/database_migration/models/assessment.rb', line 107 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: "Finance"
167 168 169 |
# File 'lib/oci/database_migration/models/assessment.rb', line 167 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the resource being referenced.
89 90 91 |
# File 'lib/oci/database_migration/models/assessment.rb', line 89 def id @id end |
#lifecycle_state ⇒ String
[Required] The current state of the Assessment resource.
147 148 149 |
# File 'lib/oci/database_migration/models/assessment.rb', line 147 def lifecycle_state @lifecycle_state end |
#migration_id ⇒ String
The OCID of the resource being referenced.
135 136 137 |
# File 'lib/oci/database_migration/models/assessment.rb', line 135 def migration_id @migration_id end |
#network_speed_megabit_per_second ⇒ String
[Required] A network speed in Megabits per second.
115 116 117 |
# File 'lib/oci/database_migration/models/assessment.rb', line 115 def network_speed_megabit_per_second @network_speed_megabit_per_second end |
#source_database_connection ⇒ OCI::DatabaseMigration::Models::SourceAssessmentConnection
This attribute is required.
139 140 141 |
# File 'lib/oci/database_migration/models/assessment.rb', line 139 def source_database_connection @source_database_connection end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
179 180 181 |
# File 'lib/oci/database_migration/models/assessment.rb', line 179 def @system_tags end |
#target_database_connection ⇒ OCI::DatabaseMigration::Models::TargetAssessmentConnection
This attribute is required.
143 144 145 |
# File 'lib/oci/database_migration/models/assessment.rb', line 143 def target_database_connection @target_database_connection end |
#time_created ⇒ DateTime
[Required] An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
156 157 158 |
# File 'lib/oci/database_migration/models/assessment.rb', line 156 def time_created @time_created end |
#time_updated ⇒ DateTime
An RFC3339 formatted datetime string such as 2016-08-25T21:10:29.600Z.
161 162 163 |
# File 'lib/oci/database_migration/models/assessment.rb', line 161 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/database_migration/models/assessment.rb', line 182 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'description': :'description', 'database_combination': :'databaseCombination', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'network_speed_megabit_per_second': :'networkSpeedMegabitPerSecond', 'acceptable_downtime': :'acceptableDowntime', 'database_data_size': :'databaseDataSize', 'ddl_expectation': :'ddlExpectation', 'creation_type': :'creationType', 'migration_id': :'migrationId', 'source_database_connection': :'sourceDatabaseConnection', 'target_database_connection': :'targetDatabaseConnection', 'lifecycle_state': :'lifecycleState', 'assessment_migration_type': :'assessmentMigrationType', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/database_migration/models/assessment.rb', line 242 def self.get_subtype(object_hash) type = object_hash[:'databaseCombination'] # rubocop:disable Style/SymbolLiteral return 'OCI::DatabaseMigration::Models::MySqlAssessment' if type == 'MYSQL' return 'OCI::DatabaseMigration::Models::OracleAssessment' if type == 'ORACLE' # TODO: Log a warning when the subtype is not found. 'OCI::DatabaseMigration::Models::Assessment' end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/database_migration/models/assessment.rb', line 210 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'description': :'String', 'database_combination': :'String', 'display_name': :'String', 'compartment_id': :'String', 'network_speed_megabit_per_second': :'String', 'acceptable_downtime': :'String', 'database_data_size': :'String', 'ddl_expectation': :'String', 'creation_type': :'String', 'migration_id': :'String', 'source_database_connection': :'OCI::DatabaseMigration::Models::SourceAssessmentConnection', 'target_database_connection': :'OCI::DatabaseMigration::Models::TargetAssessmentConnection', 'lifecycle_state': :'String', 'assessment_migration_type': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/oci/database_migration/models/assessment.rb', line 509 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && description == other.description && database_combination == other.database_combination && display_name == other.display_name && compartment_id == other.compartment_id && network_speed_megabit_per_second == other.network_speed_megabit_per_second && acceptable_downtime == other.acceptable_downtime && database_data_size == other.database_data_size && ddl_expectation == other.ddl_expectation && creation_type == other.creation_type && migration_id == other.migration_id && source_database_connection == other.source_database_connection && target_database_connection == other.target_database_connection && lifecycle_state == other.lifecycle_state && assessment_migration_type == other.assessment_migration_type && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/oci/database_migration/models/assessment.rb', line 558 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
538 539 540 |
# File 'lib/oci/database_migration/models/assessment.rb', line 538 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
547 548 549 |
# File 'lib/oci/database_migration/models/assessment.rb', line 547 def hash [id, description, database_combination, display_name, compartment_id, network_speed_megabit_per_second, acceptable_downtime, database_data_size, ddl_expectation, creation_type, migration_id, source_database_connection, target_database_connection, lifecycle_state, assessment_migration_type, time_created, time_updated, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
591 592 593 594 595 596 597 598 599 600 |
# File 'lib/oci/database_migration/models/assessment.rb', line 591 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
585 586 587 |
# File 'lib/oci/database_migration/models/assessment.rb', line 585 def to_s to_hash.to_s end |