Class: OCI::Database::Models::LaunchDbSystemFromBackupDetails

Inherits:
LaunchDbSystemBase show all
Defined in:
lib/oci/database/models/launch_db_system_from_backup_details.rb

Overview

LaunchDbSystemFromBackupDetails model.

Constant Summary collapse

DATABASE_EDITION_ENUM =

rubocop:disable Metrics/LineLength

[
  DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = 'ENTERPRISE_EDITION_HIGH_PERFORMANCE'.freeze
].freeze
DISK_REDUNDANCY_ENUM =
[
  DISK_REDUNDANCY_HIGH = 'HIGH'.freeze,
  DISK_REDUNDANCY_NORMAL = 'NORMAL'.freeze
].freeze
LICENSE_MODEL_ENUM =
[
  LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
  LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
].freeze

Constants inherited from LaunchDbSystemBase

OCI::Database::Models::LaunchDbSystemBase::SOURCE_ENUM

Instance Attribute Summary collapse

Attributes inherited from LaunchDbSystemBase

#availability_domain, #backup_subnet_id, #cluster_name, #compartment_id, #cpu_core_count, #data_storage_percentage, #defined_tags, #display_name, #domain, #freeform_tags, #hostname, #initial_data_storage_size_in_gb, #node_count, #shape, #source, #ssh_public_keys, #subnet_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LaunchDbSystemBase

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ LaunchDbSystemFromBackupDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 133

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  attributes['source'] = 'DB_BACKUP'

  super(attributes)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.database_edition = attributes[:'databaseEdition'] if attributes[:'databaseEdition']

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

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

  self.db_home = attributes[:'dbHome'] if attributes[:'dbHome']

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

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

  self.disk_redundancy = attributes[:'diskRedundancy'] if attributes[:'diskRedundancy']

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

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

  self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']

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

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

Instance Attribute Details

#database_editionString

[Required] The Oracle Database Edition that applies to all the databases on the DB System. Exadata DB Systems and 2-node RAC DB Systems require ENTERPRISE_EDITION_EXTREME_PERFORMANCE.

Returns:

  • (String)


31
32
33
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 31

def database_edition
  @database_edition
end

#db_homeOCI::Database::Models::CreateDbHomeFromBackupDetails

This attribute is required.



35
36
37
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 35

def db_home
  @db_home
end

#disk_redundancyString

The type of redundancy configured for the DB System. Normal is 2-way redundancy, recommended for test and development systems. High is 3-way redundancy, recommended for production systems.

Returns:

  • (String)


42
43
44
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 42

def disk_redundancy
  @disk_redundancy
end

#license_modelString

The Oracle license model that applies to all the databases on the DB System. The default is LICENSE_INCLUDED.

Returns:

  • (String)


47
48
49
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 47

def license_model
  @license_model
end

Class Method Details

.attribute_mapObject

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



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 50

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'availabilityDomain',
    'backup_subnet_id': :'backupSubnetId',
    'cluster_name': :'clusterName',
    'compartment_id': :'compartmentId',
    'cpu_core_count': :'cpuCoreCount',
    'data_storage_percentage': :'dataStoragePercentage',
    'defined_tags': :'definedTags',
    'display_name': :'displayName',
    'domain': :'domain',
    'freeform_tags': :'freeformTags',
    'hostname': :'hostname',
    'initial_data_storage_size_in_gb': :'initialDataStorageSizeInGB',
    'node_count': :'nodeCount',
    'shape': :'shape',
    'source': :'source',
    'ssh_public_keys': :'sshPublicKeys',
    'subnet_id': :'subnetId',
    'database_edition': :'databaseEdition',
    'db_home': :'dbHome',
    'disk_redundancy': :'diskRedundancy',
    'license_model': :'licenseModel'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 79

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'String',
    'backup_subnet_id': :'String',
    'cluster_name': :'String',
    'compartment_id': :'String',
    'cpu_core_count': :'Integer',
    'data_storage_percentage': :'Integer',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'display_name': :'String',
    'domain': :'String',
    'freeform_tags': :'Hash<String, String>',
    'hostname': :'String',
    'initial_data_storage_size_in_gb': :'Integer',
    'node_count': :'Integer',
    'shape': :'String',
    'source': :'String',
    'ssh_public_keys': :'Array<String>',
    'subnet_id': :'String',
    'database_edition': :'String',
    'db_home': :'OCI::Database::Models::CreateDbHomeFromBackupDetails',
    'disk_redundancy': :'String',
    'license_model': :'String'
    # 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



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
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 202

def ==(other)
  return true if equal?(other)
  self.class == other.class &&
    availability_domain == other.availability_domain &&
    backup_subnet_id == other.backup_subnet_id &&
    cluster_name == other.cluster_name &&
    compartment_id == other.compartment_id &&
    cpu_core_count == other.cpu_core_count &&
    data_storage_percentage == other.data_storage_percentage &&
    defined_tags == other.defined_tags &&
    display_name == other.display_name &&
    domain == other.domain &&
    freeform_tags == other.freeform_tags &&
    hostname == other.hostname &&
    initial_data_storage_size_in_gb == other.initial_data_storage_size_in_gb &&
    node_count == other.node_count &&
    shape == other.shape &&
    source == other.source &&
    ssh_public_keys == other.ssh_public_keys &&
    subnet_id == other.subnet_id &&
    database_edition == other.database_edition &&
    db_home == other.db_home &&
    disk_redundancy == other.disk_redundancy &&
    license_model == other.license_model
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



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 251

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


231
232
233
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 231

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



240
241
242
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 240

def hash
  [availability_domain, backup_subnet_id, cluster_name, compartment_id, cpu_core_count, data_storage_percentage, defined_tags, display_name, domain, freeform_tags, hostname, initial_data_storage_size_in_gb, node_count, shape, source, ssh_public_keys, subnet_id, database_edition, db_home, disk_redundancy, license_model].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



283
284
285
286
287
288
289
290
291
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 283

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



277
278
279
# File 'lib/oci/database/models/launch_db_system_from_backup_details.rb', line 277

def to_s
  to_hash.to_s
end