Class: OCI::Database::Models::CreateExternalBackupJobDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/create_external_backup_job_details.rb

Overview

CreateExternalBackupJobDetails model.

Constant Summary collapse

DATABASE_MODE_ENUM =
[
  DATABASE_MODE_SI = 'SI'.freeze,
  DATABASE_MODE_RAC = 'RAC'.freeze
].freeze
DATABASE_EDITION_ENUM =
[
  DATABASE_EDITION_STANDARD_EDITION = 'STANDARD_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION = 'ENTERPRISE_EDITION'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_HIGH_PERFORMANCE = 'ENTERPRISE_EDITION_HIGH_PERFORMANCE'.freeze,
  DATABASE_EDITION_ENTERPRISE_EDITION_EXTREME_PERFORMANCE = 'ENTERPRISE_EDITION_EXTREME_PERFORMANCE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateExternalBackupJobDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :availability_domain (String)

    The value to assign to the #availability_domain property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :db_version (String)

    The value to assign to the #db_version property

  • :db_name (String)

    The value to assign to the #db_name property

  • :db_unique_name (String)

    The value to assign to the #db_unique_name property

  • :pdb_name (String)

    The value to assign to the #pdb_name property

  • :external_database_identifier (Integer)

    The value to assign to the #external_database_identifier property

  • :character_set (String)

    The value to assign to the #character_set property

  • :ncharacter_set (String)

    The value to assign to the #ncharacter_set property

  • :database_mode (String)

    The value to assign to the #database_mode property

  • :database_edition (String)

    The value to assign to the #database_edition property



130
131
132
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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/models/create_external_backup_job_details.rb', line 130

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.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']

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

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

  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.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.db_version = attributes[:'dbVersion'] if attributes[:'dbVersion']

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

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

  self.db_name = attributes[:'dbName'] if attributes[:'dbName']

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

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

  self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName']

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

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

  self.pdb_name = attributes[:'pdbName'] if attributes[:'pdbName']

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

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

  self.external_database_identifier = attributes[:'externalDatabaseIdentifier'] if attributes[:'externalDatabaseIdentifier']

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

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

  self.character_set = attributes[:'characterSet'] if attributes[:'characterSet']

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

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

  self.ncharacter_set = attributes[:'ncharacterSet'] if attributes[:'ncharacterSet']

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

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

  self.database_mode = attributes[:'databaseMode'] if attributes[:'databaseMode']

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

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

  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']
end

Instance Attribute Details

#availability_domainString

[Required] The targeted availability domain for the backup.

Returns:

  • (String)


24
25
26
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 24

def availability_domain
  @availability_domain
end

#character_setString

[Required] The character set for the database.

Returns:

  • (String)


56
57
58
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 56

def character_set
  @character_set
end

#compartment_idString

[Required] The OCID of the compartment where this backup should be created.

Returns:

  • (String)


28
29
30
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 28

def compartment_id
  @compartment_id
end

#database_editionString

[Required] The Oracle Database edition to use for creating a database from this standalone backup. Note that 2-node RAC DB systems require Enterprise Edition - Extreme Performance.

Returns:

  • (String)


70
71
72
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 70

def database_edition
  @database_edition
end

#database_modeString

[Required] The mode (single instance or RAC) of the database being backed up.

Returns:

  • (String)


64
65
66
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 64

def database_mode
  @database_mode
end

#db_nameString

[Required] The name of the database from which the backup is being taken.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 40

def db_name
  @db_name
end

#db_unique_nameString

The DB_UNIQUE_NAME of the Oracle Database being backed up.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 44

def db_unique_name
  @db_unique_name
end

#db_versionString

[Required] A valid Oracle Database version.

Returns:

  • (String)


36
37
38
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 36

def db_version
  @db_version
end

#display_nameString

[Required] A user-friendly name for the backup. This name does not have to be unique.

Returns:

  • (String)


32
33
34
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 32

def display_name
  @display_name
end

#external_database_identifierInteger

[Required] The DBID of the Oracle Database being backed up.

Returns:

  • (Integer)


52
53
54
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 52

def external_database_identifier
  @external_database_identifier
end

#ncharacter_setString

[Required] The national character set for the database.

Returns:

  • (String)


60
61
62
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 60

def ncharacter_set
  @ncharacter_set
end

#pdb_nameString

The pluggable database name.

Returns:

  • (String)


48
49
50
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 48

def pdb_name
  @pdb_name
end

Class Method Details

.attribute_mapObject

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



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 73

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'availabilityDomain',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'db_version': :'dbVersion',
    'db_name': :'dbName',
    'db_unique_name': :'dbUniqueName',
    'pdb_name': :'pdbName',
    'external_database_identifier': :'externalDatabaseIdentifier',
    'character_set': :'characterSet',
    'ncharacter_set': :'ncharacterSet',
    'database_mode': :'databaseMode',
    'database_edition': :'databaseEdition'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 93

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'db_version': :'String',
    'db_name': :'String',
    'db_unique_name': :'String',
    'pdb_name': :'String',
    'external_database_identifier': :'Integer',
    'character_set': :'String',
    'ncharacter_set': :'String',
    'database_mode': :'String',
    'database_edition': :'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



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 232

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

  self.class == other.class &&
    availability_domain == other.availability_domain &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    db_version == other.db_version &&
    db_name == other.db_name &&
    db_unique_name == other.db_unique_name &&
    pdb_name == other.pdb_name &&
    external_database_identifier == other.external_database_identifier &&
    character_set == other.character_set &&
    ncharacter_set == other.ncharacter_set &&
    database_mode == other.database_mode &&
    database_edition == other.database_edition
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



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 273

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


253
254
255
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 253

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



262
263
264
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 262

def hash
  [availability_domain, compartment_id, display_name, db_version, db_name, db_unique_name, pdb_name, external_database_identifier, character_set, ncharacter_set, database_mode, database_edition].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



306
307
308
309
310
311
312
313
314
315
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 306

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



300
301
302
# File 'lib/oci/database/models/create_external_backup_job_details.rb', line 300

def to_s
  to_hash.to_s
end