Class: OCI::Database::Models::CreatePluggableDatabaseFromRemoteCloneDetails

Inherits:
CreatePluggableDatabaseCreationTypeDetails show all
Defined in:
lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb

Overview

Specifies the creation type Remote Clone. Additional input 'dblinkUsernameanddblinkUserPassword` can be provided for RemoteClone/Create RefreshableClone Operation. If not provided, Backend will create a temporary user to perform RemoteClone operation. It is a required input parameter in case of creating Refreshable Clone PDB.

Constant Summary

Constants inherited from CreatePluggableDatabaseCreationTypeDetails

OCI::Database::Models::CreatePluggableDatabaseCreationTypeDetails::CREATION_TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from CreatePluggableDatabaseCreationTypeDetails

#creation_type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CreatePluggableDatabaseCreationTypeDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ CreatePluggableDatabaseFromRemoteCloneDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



73
74
75
76
77
78
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
106
107
108
109
110
111
112
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 73

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

  attributes['creationType'] = 'REMOTE_CLONE_PDB'

  super(attributes)

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

  self.dblink_username = attributes[:'dblinkUsername'] if attributes[:'dblinkUsername']

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

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

  self.dblink_user_password = attributes[:'dblinkUserPassword'] if attributes[:'dblinkUserPassword']

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

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

  self.source_pluggable_database_id = attributes[:'sourcePluggableDatabaseId'] if attributes[:'sourcePluggableDatabaseId']

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

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

  self.source_container_database_admin_password = attributes[:'sourceContainerDatabaseAdminPassword'] if attributes[:'sourceContainerDatabaseAdminPassword']

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

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

  self.refreshable_clone_details = attributes[:'refreshableCloneDetails'] if attributes[:'refreshableCloneDetails']

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

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

Instance Attribute Details

The DB link user password.

Returns:

  • (String)


21
22
23
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 21

def dblink_user_password
  @dblink_user_password
end

The name of the DB link user.

Returns:

  • (String)


17
18
19
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 17

def dblink_username
  @dblink_username
end

#refreshable_clone_detailsOCI::Database::Models::CreatePluggableDatabaseRefreshableCloneDetails



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

def refreshable_clone_details
  @refreshable_clone_details
end

#source_container_database_admin_passwordString

[Required] The DB system administrator password of the source Container Database.

Returns:

  • (String)


29
30
31
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 29

def source_container_database_admin_password
  @source_container_database_admin_password
end

#source_pluggable_database_idString

[Required] The OCID of the Source Pluggable Database.

Returns:

  • (String)


25
26
27
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 25

def source_pluggable_database_id
  @source_pluggable_database_id
end

Class Method Details

.attribute_mapObject

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



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 35

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'creation_type': :'creationType',
    'dblink_username': :'dblinkUsername',
    'dblink_user_password': :'dblinkUserPassword',
    'source_pluggable_database_id': :'sourcePluggableDatabaseId',
    'source_container_database_admin_password': :'sourceContainerDatabaseAdminPassword',
    'refreshable_clone_details': :'refreshableCloneDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 49

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'creation_type': :'String',
    'dblink_username': :'String',
    'dblink_user_password': :'String',
    'source_pluggable_database_id': :'String',
    'source_container_database_admin_password': :'String',
    'refreshable_clone_details': :'OCI::Database::Models::CreatePluggableDatabaseRefreshableCloneDetails'
    # 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



121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 121

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

  self.class == other.class &&
    creation_type == other.creation_type &&
    dblink_username == other.dblink_username &&
    dblink_user_password == other.dblink_user_password &&
    source_pluggable_database_id == other.source_pluggable_database_id &&
    source_container_database_admin_password == other.source_container_database_admin_password &&
    refreshable_clone_details == other.refreshable_clone_details
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



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 156

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


136
137
138
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 136

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



145
146
147
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 145

def hash
  [creation_type, dblink_username, dblink_user_password, source_pluggable_database_id, source_container_database_admin_password, refreshable_clone_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



189
190
191
192
193
194
195
196
197
198
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 189

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



183
184
185
# File 'lib/oci/database/models/create_pluggable_database_from_remote_clone_details.rb', line 183

def to_s
  to_hash.to_s
end