Class: OCI::Database::Models::PdbConversionToNewDatabaseDetails

Inherits:
ConvertToPdbTargetBase show all
Defined in:
lib/oci/database/models/pdb_conversion_to_new_database_details.rb

Overview

Details of the new container database in which the converted pluggable database will be located.

Constant Summary

Constants inherited from ConvertToPdbTargetBase

ConvertToPdbTargetBase::TARGET_ENUM

Instance Attribute Summary collapse

Attributes inherited from ConvertToPdbTargetBase

#target

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ConvertToPdbTargetBase

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ PdbConversionToNewDatabaseDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 81

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

  attributes['target'] = 'NEW_DATABASE'

  super(attributes)

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

  self.cdb_name = attributes[:'cdbName'] if attributes[:'cdbName']

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

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

  self.cdb_admin_password = attributes[:'cdbAdminPassword'] if attributes[:'cdbAdminPassword']

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

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

  self.pdb_admin_password = attributes[:'pdbAdminPassword'] if attributes[:'pdbAdminPassword']

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

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

  self.cdb_tde_wallet_password = attributes[:'cdbTdeWalletPassword'] if attributes[:'cdbTdeWalletPassword']

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

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

  self.non_cdb_tde_wallet_password = attributes[:'nonCdbTdeWalletPassword'] if attributes[:'nonCdbTdeWalletPassword']

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

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

  self.additional_cdb_params = attributes[:'additionalCdbParams'] if attributes[:'additionalCdbParams']

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

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

Instance Attribute Details

#additional_cdb_paramsString

Additional container database parameters. Example: "_pdb_name_case_sensitive=true"

Returns:

  • (String)


37
38
39
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 37

def additional_cdb_params
  @additional_cdb_params
end

#cdb_admin_passwordString

[Required] A strong password for SYS, SYSTEM, and the plugbable database ADMIN user of the container database after conversion. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or -.

Returns:

  • (String)


19
20
21
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 19

def cdb_admin_password
  @cdb_admin_password
end

#cdb_nameString

[Required] The database name. The name must begin with an alphabetic character and can contain a maximum of 8 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy.

Returns:

  • (String)


15
16
17
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 15

def cdb_name
  @cdb_name
end

#cdb_tde_wallet_passwordString

The password to open the TDE wallet of the container database after conversion. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or -.

Returns:

  • (String)


27
28
29
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 27

def cdb_tde_wallet_password
  @cdb_tde_wallet_password
end

#non_cdb_tde_wallet_passwordString

[Required] The existing TDE wallet password of the non-container database.

Returns:

  • (String)


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

def non_cdb_tde_wallet_password
  @non_cdb_tde_wallet_password
end

#pdb_admin_passwordString

A strong password for plugbable database ADMIN user of the container database after conversion. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or -.

Returns:

  • (String)


23
24
25
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 23

def pdb_admin_password
  @pdb_admin_password
end

Class Method Details

.attribute_mapObject

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



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 40

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'target': :'target',
    'cdb_name': :'cdbName',
    'cdb_admin_password': :'cdbAdminPassword',
    'pdb_admin_password': :'pdbAdminPassword',
    'cdb_tde_wallet_password': :'cdbTdeWalletPassword',
    'non_cdb_tde_wallet_password': :'nonCdbTdeWalletPassword',
    'additional_cdb_params': :'additionalCdbParams'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 55

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'target': :'String',
    'cdb_name': :'String',
    'cdb_admin_password': :'String',
    'pdb_admin_password': :'String',
    'cdb_tde_wallet_password': :'String',
    'non_cdb_tde_wallet_password': :'String',
    'additional_cdb_params': :'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



135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 135

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

  self.class == other.class &&
    target == other.target &&
    cdb_name == other.cdb_name &&
    cdb_admin_password == other.cdb_admin_password &&
    pdb_admin_password == other.pdb_admin_password &&
    cdb_tde_wallet_password == other.cdb_tde_wallet_password &&
    non_cdb_tde_wallet_password == other.non_cdb_tde_wallet_password &&
    additional_cdb_params == other.additional_cdb_params
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



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 171

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


151
152
153
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 151

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



160
161
162
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 160

def hash
  [target, cdb_name, cdb_admin_password, pdb_admin_password, cdb_tde_wallet_password, non_cdb_tde_wallet_password, additional_cdb_params].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



204
205
206
207
208
209
210
211
212
213
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 204

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



198
199
200
# File 'lib/oci/database/models/pdb_conversion_to_new_database_details.rb', line 198

def to_s
  to_hash.to_s
end