Class: OCI::DatabaseMigration::Models::CreateAssessmentDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseMigration::Models::CreateAssessmentDetails
- Defined in:
- lib/oci/database_migration/models/create_assessment_details.rb
Overview
Common Create Assessment details. 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 ].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 ].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 ].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 ].freeze
- DDL_EXPECTATION_ENUM =
[ DDL_EXPECTATION_DDL_EXPECTED = 'DDL_EXPECTED'.freeze, DDL_EXPECTATION_DDL_NOT_EXPECTED = 'DDL_NOT_EXPECTED'.freeze ].freeze
- CREATION_TYPE_ENUM =
[ CREATION_TYPE_CREATE_ONLY = 'CREATE_ONLY'.freeze, CREATION_TYPE_CREATE_AND_RUN_ASSESSORS = 'CREATE_AND_RUN_ASSESSORS'.freeze ].freeze
Instance Attribute Summary collapse
-
#acceptable_downtime ⇒ String
[Required] Time allowed for the application downtime.
-
#compartment_id ⇒ String
[Required] The OCID of the resource being referenced.
-
#creation_type ⇒ String
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
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#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.
-
#target_database_connection ⇒ OCI::DatabaseMigration::Models::TargetAssessmentConnection
This attribute is required.
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 = {}) ⇒ CreateAssessmentDetails
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 = {}) ⇒ CreateAssessmentDetails
Initializes the object
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 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 199 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.description = attributes[:'description'] if attributes[:'description'] 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.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.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.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. = 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'] end |
Instance Attribute Details
#acceptable_downtime ⇒ String
[Required] Time allowed for the application downtime.
88 89 90 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 88 def acceptable_downtime @acceptable_downtime end |
#compartment_id ⇒ String
[Required] The OCID of the resource being referenced.
68 69 70 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 68 def compartment_id @compartment_id end |
#creation_type ⇒ String
The type of assessment creation.
100 101 102 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 100 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.
74 75 76 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 74 def database_combination @database_combination end |
#database_data_size ⇒ String
[Required] The size of a source database.
92 93 94 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 92 def database_data_size @database_data_size end |
#ddl_expectation ⇒ String
[Required] DDL expectation values.
96 97 98 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 96 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\"}}
120 121 122 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 120 def @defined_tags end |
#description ⇒ String
A user-friendly description. Does not have to be unique, and it's changeable. Avoid entering confidential information.
64 65 66 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 64 def description @description end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
80 81 82 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 80 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"
114 115 116 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 114 def @freeform_tags end |
#network_speed_megabit_per_second ⇒ String
[Required] A network speed in Megabits per second.
84 85 86 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 84 def network_speed_megabit_per_second @network_speed_megabit_per_second end |
#source_database_connection ⇒ OCI::DatabaseMigration::Models::SourceAssessmentConnection
This attribute is required.
104 105 106 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 104 def source_database_connection @source_database_connection end |
#target_database_connection ⇒ OCI::DatabaseMigration::Models::TargetAssessmentConnection
This attribute is required.
108 109 110 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 108 def target_database_connection @target_database_connection end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 123 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'description': :'description', 'compartment_id': :'compartmentId', 'database_combination': :'databaseCombination', 'display_name': :'displayName', 'network_speed_megabit_per_second': :'networkSpeedMegabitPerSecond', 'acceptable_downtime': :'acceptableDowntime', 'database_data_size': :'databaseDataSize', 'ddl_expectation': :'ddlExpectation', 'creation_type': :'creationType', 'source_database_connection': :'sourceDatabaseConnection', 'target_database_connection': :'targetDatabaseConnection', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # 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.
169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 169 def self.get_subtype(object_hash) type = object_hash[:'databaseCombination'] # rubocop:disable Style/SymbolLiteral return 'OCI::DatabaseMigration::Models::CreateOracleAssessmentDetails' if type == 'ORACLE' return 'OCI::DatabaseMigration::Models::CreateMySqlAssessmentDetails' if type == 'MYSQL' # TODO: Log a warning when the subtype is not found. 'OCI::DatabaseMigration::Models::CreateAssessmentDetails' end |
.swagger_types ⇒ Object
Attribute type mapping.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 144 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'description': :'String', 'compartment_id': :'String', 'database_combination': :'String', 'display_name': :'String', 'network_speed_megabit_per_second': :'String', 'acceptable_downtime': :'String', 'database_data_size': :'String', 'ddl_expectation': :'String', 'creation_type': :'String', 'source_database_connection': :'OCI::DatabaseMigration::Models::SourceAssessmentConnection', 'target_database_connection': :'OCI::DatabaseMigration::Models::TargetAssessmentConnection', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 335 def ==(other) return true if equal?(other) self.class == other.class && description == other.description && compartment_id == other.compartment_id && database_combination == other.database_combination && display_name == other.display_name && 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 && source_database_connection == other.source_database_connection && target_database_connection == other.target_database_connection && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 377 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
357 358 359 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 357 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
366 367 368 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 366 def hash [description, compartment_id, database_combination, display_name, network_speed_megabit_per_second, acceptable_downtime, database_data_size, ddl_expectation, creation_type, source_database_connection, target_database_connection, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
410 411 412 413 414 415 416 417 418 419 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 410 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
404 405 406 |
# File 'lib/oci/database_migration/models/create_assessment_details.rb', line 404 def to_s to_hash.to_s end |