Class: OCI::Mysql::Models::CreateReadEndpointDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::CreateReadEndpointDetails
- Defined in:
- lib/oci/mysql/models/create_read_endpoint_details.rb
Overview
Details required to create a Read Endpoint.
Instance Attribute Summary collapse
-
#exclude_ips ⇒ Array<String>
A list of IP addresses of read replicas that are excluded from serving read requests.
-
#is_enabled ⇒ BOOLEAN
Specifies if the DB System read endpoint is enabled or not.
-
#read_endpoint_hostname_label ⇒ String
The hostname for the read endpoint of the DB System.
-
#read_endpoint_ip_address ⇒ String
The IP address the DB System read endpoint is configured to listen on.
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 = {}) ⇒ CreateReadEndpointDetails
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 = {}) ⇒ CreateReadEndpointDetails
Initializes the object
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 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 75 def initialize(attributes = {}) return unless attributes.is_a?(Hash) self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') && !attributes.key?(:'is_enabled') # rubocop:disable Style/StringLiterals self.read_endpoint_ip_address = attributes[:'readEndpointIpAddress'] if attributes[:'readEndpointIpAddress'] raise 'You cannot provide both :readEndpointIpAddress and :read_endpoint_ip_address' if attributes.key?(:'readEndpointIpAddress') && attributes.key?(:'read_endpoint_ip_address') self.read_endpoint_ip_address = attributes[:'read_endpoint_ip_address'] if attributes[:'read_endpoint_ip_address'] self.read_endpoint_hostname_label = attributes[:'readEndpointHostnameLabel'] if attributes[:'readEndpointHostnameLabel'] raise 'You cannot provide both :readEndpointHostnameLabel and :read_endpoint_hostname_label' if attributes.key?(:'readEndpointHostnameLabel') && attributes.key?(:'read_endpoint_hostname_label') self.read_endpoint_hostname_label = attributes[:'read_endpoint_hostname_label'] if attributes[:'read_endpoint_hostname_label'] self.exclude_ips = attributes[:'excludeIps'] if attributes[:'excludeIps'] raise 'You cannot provide both :excludeIps and :exclude_ips' if attributes.key?(:'excludeIps') && attributes.key?(:'exclude_ips') self.exclude_ips = attributes[:'exclude_ips'] if attributes[:'exclude_ips'] end |
Instance Attribute Details
#exclude_ips ⇒ Array<String>
A list of IP addresses of read replicas that are excluded from serving read requests.
39 40 41 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 39 def exclude_ips @exclude_ips end |
#is_enabled ⇒ BOOLEAN
Specifies if the DB System read endpoint is enabled or not.
15 16 17 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 15 def is_enabled @is_enabled end |
#read_endpoint_hostname_label ⇒ String
The hostname for the read endpoint of the DB System. Used for DNS.
The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN) (for example, "dbsystem-1" in FQDN "dbsystem-1.subnet123.vcn1.oraclevcn.com").
Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123.
34 35 36 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 34 def read_endpoint_hostname_label @read_endpoint_hostname_label end |
#read_endpoint_ip_address ⇒ String
The IP address the DB System read endpoint is configured to listen on. A private IP address of your choice to assign to the read endpoint of the DB System. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This should be a "dotted-quad" style IPv4 address.
24 25 26 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 24 def read_endpoint_ip_address @read_endpoint_ip_address end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'isEnabled', 'read_endpoint_ip_address': :'readEndpointIpAddress', 'read_endpoint_hostname_label': :'readEndpointHostnameLabel', 'exclude_ips': :'excludeIps' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'BOOLEAN', 'read_endpoint_ip_address': :'String', 'read_endpoint_hostname_label': :'String', 'exclude_ips': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 112 def ==(other) return true if equal?(other) self.class == other.class && is_enabled == other.is_enabled && read_endpoint_ip_address == other.read_endpoint_ip_address && read_endpoint_hostname_label == other.read_endpoint_hostname_label && exclude_ips == other.exclude_ips end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 145 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
125 126 127 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 125 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
134 135 136 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 134 def hash [is_enabled, read_endpoint_ip_address, read_endpoint_hostname_label, exclude_ips].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 178 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
172 173 174 |
# File 'lib/oci/mysql/models/create_read_endpoint_details.rb', line 172 def to_s to_hash.to_s end |