Class: OCI::DatabaseMigration::Models::UpdateAssessmentDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_migration/models/update_assessment_details.rb

Overview

Common Update 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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateAssessmentDetails

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
# File 'lib/oci/database_migration/models/update_assessment_details.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.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.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.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

Instance Attribute Details

#acceptable_downtimeString

Time allowed for the application downtime.

Returns:

  • (String)


84
85
86
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 84

def acceptable_downtime
  @acceptable_downtime
end

#creation_typeString

The type of assessment creation.

Returns:

  • (String)


96
97
98
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 96

def creation_type
  @creation_type
end

#database_combinationString

[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.

Returns:

  • (String)


70
71
72
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 70

def database_combination
  @database_combination
end

#database_data_sizeString

The size of a source database.

Returns:

  • (String)


88
89
90
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 88

def database_data_size
  @database_data_size
end

#ddl_expectationString

DDL expectation values.

Returns:

  • (String)


92
93
94
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 92

def ddl_expectation
  @ddl_expectation
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


114
115
116
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 114

def defined_tags
  @defined_tags
end

#descriptionString

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

Returns:

  • (String)


64
65
66
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 64

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


76
77
78
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 76

def display_name
  @display_name
end

#freeform_tagsHash<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"

Returns:

  • (Hash<String, String>)


108
109
110
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 108

def freeform_tags
  @freeform_tags
end

#network_speed_megabit_per_secondString

A network speed in Megabits per second.

Returns:

  • (String)


80
81
82
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 80

def network_speed_megabit_per_second
  @network_speed_megabit_per_second
end

#source_database_connectionOCI::DatabaseMigration::Models::SourceAssessmentConnection



99
100
101
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 99

def source_database_connection
  @source_database_connection
end

#target_database_connectionOCI::DatabaseMigration::Models::TargetAssessmentConnection



102
103
104
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 102

def target_database_connection
  @target_database_connection
end

Class Method Details

.attribute_mapObject

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



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 117

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'description': :'description',
    '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.



161
162
163
164
165
166
167
168
169
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 161

def self.get_subtype(object_hash)
  type = object_hash[:'databaseCombination'] # rubocop:disable Style/SymbolLiteral

  return 'OCI::DatabaseMigration::Models::UpdateMySqlAssessmentDetails' if type == 'MYSQL'
  return 'OCI::DatabaseMigration::Models::UpdateOracleAssessmentDetails' if type == 'ORACLE'

  # TODO: Log a warning when the subtype is not found.
  'OCI::DatabaseMigration::Models::UpdateAssessmentDetails'
end

.swagger_typesObject

Attribute type mapping.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 137

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'description': :'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.

Parameters:

  • other (Object)

    the other object to be compared



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 320

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

  self.class == other.class &&
    description == other.description &&
    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 &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags
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



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 361

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


341
342
343
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 341

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



350
351
352
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 350

def hash
  [description, database_combination, display_name, network_speed_megabit_per_second, acceptable_downtime, database_data_size, ddl_expectation, creation_type, source_database_connection, target_database_connection, freeform_tags, defined_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



394
395
396
397
398
399
400
401
402
403
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 394

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



388
389
390
# File 'lib/oci/database_migration/models/update_assessment_details.rb', line 388

def to_s
  to_hash.to_s
end