Class: OCI::Database::Models::CreateDataGuardAssociationDetails
- Inherits:
-
Object
- Object
- OCI::Database::Models::CreateDataGuardAssociationDetails
- Defined in:
- lib/oci/database/models/create_data_guard_association_details.rb
Direct Known Subclasses
Constant Summary collapse
- PROTECTION_MODE_ENUM =
[PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY', PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE', PROTECTION_MODE_MAXIMUM_PROTECTION = 'MAXIMUM_PROTECTION']
- TRANSPORT_TYPE_ENUM =
[TRANSPORT_TYPE_SYNC = 'SYNC', TRANSPORT_TYPE_ASYNC = 'ASYNC', TRANSPORT_TYPE_FASTSYNC = 'FASTSYNC']
Instance Attribute Summary collapse
-
#creation_type ⇒ String
Specifies where to create the associated database.
-
#database_admin_password ⇒ String
A strong password for the ‘SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation.
-
#protection_mode ⇒ String
The protection mode to set up between the primary and standby databases.
-
#transport_type ⇒ String
The redo transport type to use for this Data Guard association.
Class Method Summary collapse
-
.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.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateDataGuardAssociationDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ CreateDataGuardAssociationDetails
Initializes the object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 78 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} if attributes[:'creationType'] self.creation_type = attributes[:'creationType'] end if attributes[:'databaseAdminPassword'] self.database_admin_password = attributes[:'databaseAdminPassword'] end if attributes[:'protectionMode'] self.protection_mode = attributes[:'protectionMode'] end if attributes[:'transportType'] self.transport_type = attributes[:'transportType'] end end |
Instance Attribute Details
#creation_type ⇒ String
Specifies where to create the associated database. "ExistingDbSystem" is the only supported ‘creationType` value.
21 22 23 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 21 def creation_type @creation_type end |
#database_admin_password ⇒ String
A strong password for the ‘SYS`, `SYSTEM`, and `PDB Admin` users to apply during standby creation.
The password must contain no fewer than nine characters and include:
-
At least two uppercase characters.
-
At least two lowercase characters.
-
At least two numeric characters.
-
At least two special characters. Valid special characters include "_", "#", and "-" only.
**The password MUST be the same as the primary admin password.**
38 39 40 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 38 def database_admin_password @database_admin_password end |
#protection_mode ⇒ String
The protection mode to set up between the primary and standby databases. For more information, see [Oracle Data Guard Protection Modes](docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000) in the Oracle Data Guard documentation.
IMPORTANT - The only protection mode currently supported by the Database Service is MAXIMUM_PERFORMANCE.
47 48 49 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 47 def protection_mode @protection_mode end |
#transport_type ⇒ String
The redo transport type to use for this Data Guard association. Valid values depend on the specified ‘protectionMode`:
-
MAXIMUM_AVAILABILITY - SYNC or FASTSYNC
-
MAXIMUM_PERFORMANCE - ASYNC
-
MAXIMUM_PROTECTION - SYNC
For more information, see [Redo Transport Services](docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400) in the Oracle Data Guard documentation.
IMPORTANT - The only transport type currently supported by the Database Service is ASYNC.
62 63 64 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 62 def transport_type @transport_type end |
Class Method Details
.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.
67 68 69 70 71 72 73 74 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 67 def self.get_subtype(object_hash) type = object_hash[:'creationType'] return 'OCI::Database::Models::CreateDataGuardAssociationToExistingDbSystemDetails' if type == 'ExistingDbSystem' # TODO: Log a warning when the subtype is not found. return 'OCI::Database::Models::CreateDataGuardAssociationDetails' end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 124 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && creation_type == other_object.creation_type && database_admin_password == other_object.database_admin_password && protection_mode == other_object.protection_mode && transport_type == other_object.transport_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 148 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) self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.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_object) ⇒ Boolean
135 136 137 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 135 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
141 142 143 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 141 def hash [creation_type, database_admin_password, protection_mode, transport_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 173 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_s ⇒ String
Returns the string representation of the object
167 168 169 |
# File 'lib/oci/database/models/create_data_guard_association_details.rb', line 167 def to_s to_hash.to_s end |