Class: OCI::Mysql::Models::CreateDbSystemSourceFromDbSystemChannelDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::CreateDbSystemSourceFromDbSystemChannelDetails
- Defined in:
- lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb
Overview
Properties to setup a replication channel with the source (cloned) DB system.
Constant Summary collapse
- SSL_MODE_ENUM =
[ SSL_MODE_VERIFY_IDENTITY = 'VERIFY_IDENTITY'.freeze, SSL_MODE_VERIFY_CA = 'VERIFY_CA'.freeze, SSL_MODE_REQUIRED = 'REQUIRED'.freeze, SSL_MODE_DISABLED = 'DISABLED'.freeze ].freeze
Instance Attribute Summary collapse
-
#applier_username ⇒ String
The username for the replication applier of the created MySQL DB System.
-
#source_password ⇒ String
[Required] The password for the replication user.
-
#source_username ⇒ String
[Required] The name of the replication user on the source DB system.
- #ssl_ca_certificate ⇒ OCI::Mysql::Models::CaCertificate
-
#ssl_mode ⇒ String
[Required] The SSL mode of the Channel.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateDbSystemSourceFromDbSystemChannelDetails
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 = {}) ⇒ CreateDbSystemSourceFromDbSystemChannelDetails
Initializes the object
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 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 82 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.source_username = attributes[:'sourceUsername'] if attributes[:'sourceUsername'] raise 'You cannot provide both :sourceUsername and :source_username' if attributes.key?(:'sourceUsername') && attributes.key?(:'source_username') self.source_username = attributes[:'source_username'] if attributes[:'source_username'] self.source_password = attributes[:'sourcePassword'] if attributes[:'sourcePassword'] raise 'You cannot provide both :sourcePassword and :source_password' if attributes.key?(:'sourcePassword') && attributes.key?(:'source_password') self.source_password = attributes[:'source_password'] if attributes[:'source_password'] self.ssl_mode = attributes[:'sslMode'] if attributes[:'sslMode'] raise 'You cannot provide both :sslMode and :ssl_mode' if attributes.key?(:'sslMode') && attributes.key?(:'ssl_mode') self.ssl_mode = attributes[:'ssl_mode'] if attributes[:'ssl_mode'] self.ssl_ca_certificate = attributes[:'sslCaCertificate'] if attributes[:'sslCaCertificate'] raise 'You cannot provide both :sslCaCertificate and :ssl_ca_certificate' if attributes.key?(:'sslCaCertificate') && attributes.key?(:'ssl_ca_certificate') self.ssl_ca_certificate = attributes[:'ssl_ca_certificate'] if attributes[:'ssl_ca_certificate'] self.applier_username = attributes[:'applierUsername'] if attributes[:'applierUsername'] raise 'You cannot provide both :applierUsername and :applier_username' if attributes.key?(:'applierUsername') && attributes.key?(:'applier_username') self.applier_username = attributes[:'applier_username'] if attributes[:'applier_username'] end |
Instance Attribute Details
#applier_username ⇒ String
The username for the replication applier of the created MySQL DB System.
43 44 45 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 43 def applier_username @applier_username end |
#source_password ⇒ String
[Required] The password for the replication user. The password must be between 8 and 32 characters long, and must contain at least 1 numeric character, 1 lowercase character, 1 uppercase character, and 1 special (nonalphanumeric) character.
32 33 34 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 32 def source_password @source_password end |
#source_username ⇒ String
[Required] The name of the replication user on the source DB system. The username has a maximum length of 96 characters. For more information, please see the MySQL documentation
24 25 26 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 24 def source_username @source_username end |
#ssl_ca_certificate ⇒ OCI::Mysql::Models::CaCertificate
39 40 41 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 39 def ssl_ca_certificate @ssl_ca_certificate end |
#ssl_mode ⇒ String
[Required] The SSL mode of the Channel.
36 37 38 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 36 def ssl_mode @ssl_mode end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 46 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'source_username': :'sourceUsername', 'source_password': :'sourcePassword', 'ssl_mode': :'sslMode', 'ssl_ca_certificate': :'sslCaCertificate', 'applier_username': :'applierUsername' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'source_username': :'String', 'source_password': :'String', 'ssl_mode': :'String', 'ssl_ca_certificate': :'OCI::Mysql::Models::CaCertificate', 'applier_username': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
134 135 136 137 138 139 140 141 142 143 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 134 def ==(other) return true if equal?(other) self.class == other.class && source_username == other.source_username && source_password == other.source_password && ssl_mode == other.ssl_mode && ssl_ca_certificate == other.ssl_ca_certificate && applier_username == other.applier_username end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 168 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
148 149 150 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 148 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
157 158 159 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 157 def hash [source_username, source_password, ssl_mode, ssl_ca_certificate, applier_username].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 201 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
195 196 197 |
# File 'lib/oci/mysql/models/create_db_system_source_from_db_system_channel_details.rb', line 195 def to_s to_hash.to_s end |