Class: OCI::Multicloud::Models::OciNetworkMetadata
- Inherits:
-
Object
- Object
- OCI::Multicloud::Models::OciNetworkMetadata
- Defined in:
- lib/oci/multicloud/models/oci_network_metadata.rb
Overview
Oracle Cloud Infrastructure network anchor related meta data items
Constant Summary collapse
- NETWORK_ANCHOR_CONNECTION_STATUS_ENUM =
[ NETWORK_ANCHOR_CONNECTION_STATUS_CONNECTED = 'CONNECTED'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_DISCONNECTED = 'DISCONNECTED'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_CONNECTING = 'CONNECTING'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_ACTIVE = 'ACTIVE'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_ERROR = 'ERROR'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_UPDATING = 'UPDATING'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_FAILED = 'FAILED'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_DELETING = 'DELETING'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_DELETED = 'DELETED'.freeze, NETWORK_ANCHOR_CONNECTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #dns ⇒ OCI::Multicloud::Models::OciDns
-
#dns_forwarding_config ⇒ Array<Hash<String, String>>
DNS forward configuration.
-
#dns_forwarding_endpoint_ip_address ⇒ String
The DNS Listener Forwarding Address.
-
#dns_listening_endpoint_ip_address ⇒ String
The DNS Listener Endpoint Address.
-
#network_anchor_connection_status ⇒ String
[Required] Defines status of the Network Anchor.
-
#subnets ⇒ Array<OCI::Multicloud::Models::OciNetworkSubnet>
Network subnets.
- #vcn ⇒ OCI::Multicloud::Models::OciVcn
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 = {}) ⇒ OciNetworkMetadata
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 = {}) ⇒ OciNetworkMetadata
Initializes the object
95 96 97 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 130 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 95 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.network_anchor_connection_status = attributes[:'networkAnchorConnectionStatus'] if attributes[:'networkAnchorConnectionStatus'] raise 'You cannot provide both :networkAnchorConnectionStatus and :network_anchor_connection_status' if attributes.key?(:'networkAnchorConnectionStatus') && attributes.key?(:'network_anchor_connection_status') self.network_anchor_connection_status = attributes[:'network_anchor_connection_status'] if attributes[:'network_anchor_connection_status'] self.vcn = attributes[:'vcn'] if attributes[:'vcn'] self.dns = attributes[:'dns'] if attributes[:'dns'] self.subnets = attributes[:'subnets'] if attributes[:'subnets'] self.dns_listening_endpoint_ip_address = attributes[:'dnsListeningEndpointIpAddress'] if attributes[:'dnsListeningEndpointIpAddress'] raise 'You cannot provide both :dnsListeningEndpointIpAddress and :dns_listening_endpoint_ip_address' if attributes.key?(:'dnsListeningEndpointIpAddress') && attributes.key?(:'dns_listening_endpoint_ip_address') self.dns_listening_endpoint_ip_address = attributes[:'dns_listening_endpoint_ip_address'] if attributes[:'dns_listening_endpoint_ip_address'] self.dns_forwarding_endpoint_ip_address = attributes[:'dnsForwardingEndpointIpAddress'] if attributes[:'dnsForwardingEndpointIpAddress'] raise 'You cannot provide both :dnsForwardingEndpointIpAddress and :dns_forwarding_endpoint_ip_address' if attributes.key?(:'dnsForwardingEndpointIpAddress') && attributes.key?(:'dns_forwarding_endpoint_ip_address') self.dns_forwarding_endpoint_ip_address = attributes[:'dns_forwarding_endpoint_ip_address'] if attributes[:'dns_forwarding_endpoint_ip_address'] self.dns_forwarding_config = attributes[:'dnsForwardingConfig'] if attributes[:'dnsForwardingConfig'] raise 'You cannot provide both :dnsForwardingConfig and :dns_forwarding_config' if attributes.key?(:'dnsForwardingConfig') && attributes.key?(:'dns_forwarding_config') self.dns_forwarding_config = attributes[:'dns_forwarding_config'] if attributes[:'dns_forwarding_config'] end |
Instance Attribute Details
#dns ⇒ OCI::Multicloud::Models::OciDns
34 35 36 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 34 def dns @dns end |
#dns_forwarding_config ⇒ Array<Hash<String, String>>
DNS forward configuration
50 51 52 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 50 def dns_forwarding_config @dns_forwarding_config end |
#dns_forwarding_endpoint_ip_address ⇒ String
The DNS Listener Forwarding Address.
46 47 48 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 46 def dns_forwarding_endpoint_ip_address @dns_forwarding_endpoint_ip_address end |
#dns_listening_endpoint_ip_address ⇒ String
The DNS Listener Endpoint Address.
42 43 44 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 42 def dns_listening_endpoint_ip_address @dns_listening_endpoint_ip_address end |
#network_anchor_connection_status ⇒ String
[Required] Defines status of the Network Anchor.
28 29 30 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 28 def network_anchor_connection_status @network_anchor_connection_status end |
#subnets ⇒ Array<OCI::Multicloud::Models::OciNetworkSubnet>
Network subnets
38 39 40 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 38 def subnets @subnets end |
#vcn ⇒ OCI::Multicloud::Models::OciVcn
31 32 33 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 31 def vcn @vcn end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 53 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'network_anchor_connection_status': :'networkAnchorConnectionStatus', 'vcn': :'vcn', 'dns': :'dns', 'subnets': :'subnets', 'dns_listening_endpoint_ip_address': :'dnsListeningEndpointIpAddress', 'dns_forwarding_endpoint_ip_address': :'dnsForwardingEndpointIpAddress', 'dns_forwarding_config': :'dnsForwardingConfig' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'network_anchor_connection_status': :'String', 'vcn': :'OCI::Multicloud::Models::OciVcn', 'dns': :'OCI::Multicloud::Models::OciDns', 'subnets': :'Array<OCI::Multicloud::Models::OciNetworkSubnet>', 'dns_listening_endpoint_ip_address': :'String', 'dns_forwarding_endpoint_ip_address': :'String', 'dns_forwarding_config': :'Array<Hash<String, String>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 152 def ==(other) return true if equal?(other) self.class == other.class && network_anchor_connection_status == other.network_anchor_connection_status && vcn == other.vcn && dns == other.dns && subnets == other.subnets && dns_listening_endpoint_ip_address == other.dns_listening_endpoint_ip_address && dns_forwarding_endpoint_ip_address == other.dns_forwarding_endpoint_ip_address && dns_forwarding_config == other.dns_forwarding_config end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 188 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
168 169 170 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 168 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
177 178 179 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 177 def hash [network_anchor_connection_status, vcn, dns, subnets, dns_listening_endpoint_ip_address, dns_forwarding_endpoint_ip_address, dns_forwarding_config].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 221 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
215 216 217 |
# File 'lib/oci/multicloud/models/oci_network_metadata.rb', line 215 def to_s to_hash.to_s end |