Class: OCI::Mysql::Models::DbSystemEndpoint
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::DbSystemEndpoint
- Defined in:
- lib/oci/mysql/models/db_system_endpoint.rb
Overview
A particular functional endpoint for access to a DB System, and the properties that apply to it.
Constant Summary collapse
- MODES_ENUM =
[ MODES_READ = 'READ'.freeze, MODES_WRITE = 'WRITE'.freeze, MODES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STATUS_ENUM =
[ STATUS_ACTIVE = 'ACTIVE'.freeze, STATUS_INACTIVE = 'INACTIVE'.freeze, STATUS_UPDATING = 'UPDATING'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#hostname ⇒ String
The network address of the DB System.
-
#ip_address ⇒ String
[Required] The IP address the DB System is configured to listen on.
-
#modes ⇒ Array<String>
The access modes from the client that this endpoint supports.
-
#port ⇒ Integer
[Required] The port the MySQL instance listens on.
-
#port_x ⇒ Integer
[Required] The network port where to connect to use this endpoint using the X protocol.
-
#status ⇒ String
The state of the endpoints, as far as it can seen from the DB System.
-
#status_details ⇒ String
Additional information about the current endpoint status.
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 = {}) ⇒ DbSystemEndpoint
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 = {}) ⇒ DbSystemEndpoint
Initializes the object
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 98 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.hostname = attributes[:'hostname'] if attributes[:'hostname'] self.ip_address = attributes[:'ipAddress'] if attributes[:'ipAddress'] raise 'You cannot provide both :ipAddress and :ip_address' if attributes.key?(:'ipAddress') && attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] if attributes[:'ip_address'] self.port = attributes[:'port'] if attributes[:'port'] self.port_x = attributes[:'portX'] if attributes[:'portX'] raise 'You cannot provide both :portX and :port_x' if attributes.key?(:'portX') && attributes.key?(:'port_x') self.port_x = attributes[:'port_x'] if attributes[:'port_x'] self.modes = attributes[:'modes'] if attributes[:'modes'] self.status = attributes[:'status'] if attributes[:'status'] self.status_details = attributes[:'statusDetails'] if attributes[:'statusDetails'] raise 'You cannot provide both :statusDetails and :status_details' if attributes.key?(:'statusDetails') && attributes.key?(:'status_details') self.status_details = attributes[:'status_details'] if attributes[:'status_details'] end |
Instance Attribute Details
#hostname ⇒ String
The network address of the DB System.
27 28 29 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 27 def hostname @hostname end |
#ip_address ⇒ String
[Required] The IP address the DB System is configured to listen on.
31 32 33 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 31 def ip_address @ip_address end |
#modes ⇒ Array<String>
The access modes from the client that this endpoint supports.
43 44 45 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 43 def modes @modes end |
#port ⇒ Integer
[Required] The port the MySQL instance listens on.
35 36 37 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 35 def port @port end |
#port_x ⇒ Integer
[Required] The network port where to connect to use this endpoint using the X protocol.
39 40 41 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 39 def port_x @port_x end |
#status ⇒ String
The state of the endpoints, as far as it can seen from the DB System. There may be some inconsistency with the actual state of the MySQL service.
49 50 51 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 49 def status @status end |
#status_details ⇒ String
Additional information about the current endpoint status.
53 54 55 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 53 def status_details @status_details end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'hostname': :'hostname', 'ip_address': :'ipAddress', 'port': :'port', 'port_x': :'portX', 'modes': :'modes', 'status': :'status', 'status_details': :'statusDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 71 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'hostname': :'String', 'ip_address': :'String', 'port': :'Integer', 'port_x': :'Integer', 'modes': :'Array<String>', 'status': :'String', 'status_details': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 171 def ==(other) return true if equal?(other) self.class == other.class && hostname == other.hostname && ip_address == other.ip_address && port == other.port && port_x == other.port_x && modes == other.modes && status == other.status && status_details == other.status_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 207 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
187 188 189 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 187 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
196 197 198 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 196 def hash [hostname, ip_address, port, port_x, modes, status, status_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
240 241 242 243 244 245 246 247 248 249 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 240 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
234 235 236 |
# File 'lib/oci/mysql/models/db_system_endpoint.rb', line 234 def to_s to_hash.to_s end |