Class: OCI::Mysql::Models::ReadEndpointDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::ReadEndpointDetails
- Defined in:
- lib/oci/mysql/models/read_endpoint_details.rb
Overview
The read endpoint of a DB System.
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.
- #read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details ⇒ OCI::Mysql::Models::Ipv6AddressIpv6SubnetCidrPairDetails
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 = {}) ⇒ ReadEndpointDetails
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 = {}) ⇒ ReadEndpointDetails
Initializes the object
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 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 81 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.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_ipv6_address_ipv6_subnet_cidr_pair_details = attributes[:'readEndpointIpv6AddressIpv6SubnetCidrPairDetails'] if attributes[:'readEndpointIpv6AddressIpv6SubnetCidrPairDetails'] raise 'You cannot provide both :readEndpointIpv6AddressIpv6SubnetCidrPairDetails and :read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details' if attributes.key?(:'readEndpointIpv6AddressIpv6SubnetCidrPairDetails') && attributes.key?(:'read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details') self.read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details = attributes[:'read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details'] if attributes[:'read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details'] 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.
42 43 44 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 42 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/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.
37 38 39 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 37 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/read_endpoint_details.rb', line 24 def read_endpoint_ip_address @read_endpoint_ip_address end |
#read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details ⇒ OCI::Mysql::Models::Ipv6AddressIpv6SubnetCidrPairDetails
27 28 29 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 27 def read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details @read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 45 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'isEnabled', 'read_endpoint_ip_address': :'readEndpointIpAddress', 'read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details': :'readEndpointIpv6AddressIpv6SubnetCidrPairDetails', 'read_endpoint_hostname_label': :'readEndpointHostnameLabel', 'exclude_ips': :'excludeIps' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 58 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'is_enabled': :'BOOLEAN', 'read_endpoint_ip_address': :'String', 'read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details': :'OCI::Mysql::Models::Ipv6AddressIpv6SubnetCidrPairDetails', '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.
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 127 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_ipv6_address_ipv6_subnet_cidr_pair_details == other.read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details && 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
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 161 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
141 142 143 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 141 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
150 151 152 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 150 def hash [is_enabled, read_endpoint_ip_address, read_endpoint_ipv6_address_ipv6_subnet_cidr_pair_details, read_endpoint_hostname_label, exclude_ips].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 194 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
188 189 190 |
# File 'lib/oci/mysql/models/read_endpoint_details.rb', line 188 def to_s to_hash.to_s end |