Class: OCI::Core::Models::VirtualCircuitRedundancyMetadata
- Inherits:
-
Object
- Object
- OCI::Core::Models::VirtualCircuitRedundancyMetadata
- Defined in:
- lib/oci/core/models/virtual_circuit_redundancy_metadata.rb
Overview
This resource provides redundancy level details for the virtual circuit. For more about redundancy, see FastConnect Redundancy Best Practices.
Constant Summary collapse
- CONFIGURED_REDUNDANCY_LEVEL_ENUM =
[ CONFIGURED_REDUNDANCY_LEVEL_DEVICE = 'DEVICE'.freeze, CONFIGURED_REDUNDANCY_LEVEL_POP = 'POP'.freeze, CONFIGURED_REDUNDANCY_LEVEL_REGION = 'REGION'.freeze, CONFIGURED_REDUNDANCY_LEVEL_NON_REDUNDANT = 'NON_REDUNDANT'.freeze, CONFIGURED_REDUNDANCY_LEVEL_PENDING = 'PENDING'.freeze, CONFIGURED_REDUNDANCY_LEVEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- IPV4BGP_SESSION_REDUNDANCY_STATUS_ENUM =
[ IPV4BGP_SESSION_REDUNDANCY_STATUS_CONFIGURATION_MATCH = 'CONFIGURATION_MATCH'.freeze, IPV4BGP_SESSION_REDUNDANCY_STATUS_CONFIGURATION_MISMATCH = 'CONFIGURATION_MISMATCH'.freeze, IPV4BGP_SESSION_REDUNDANCY_STATUS_NOT_MET_SLA = 'NOT_MET_SLA'.freeze, IPV4BGP_SESSION_REDUNDANCY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- IPV6BGP_SESSION_REDUNDANCY_STATUS_ENUM =
[ IPV6BGP_SESSION_REDUNDANCY_STATUS_CONFIGURATION_MATCH = 'CONFIGURATION_MATCH'.freeze, IPV6BGP_SESSION_REDUNDANCY_STATUS_CONFIGURATION_MISMATCH = 'CONFIGURATION_MISMATCH'.freeze, IPV6BGP_SESSION_REDUNDANCY_STATUS_NOT_MET_SLA = 'NOT_MET_SLA'.freeze, IPV6BGP_SESSION_REDUNDANCY_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#configured_redundancy_level ⇒ String
The configured redundancy level of the virtual circuit.
-
#ipv4bgp_session_redundancy_status ⇒ String
Indicates if the configured level is met for IPv4 BGP redundancy.
-
#ipv6bgp_session_redundancy_status ⇒ String
Indicates if the configured level is met for IPv6 BGP redundancy.
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 = {}) ⇒ VirtualCircuitRedundancyMetadata
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 = {}) ⇒ VirtualCircuitRedundancyMetadata
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 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.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.configured_redundancy_level = attributes[:'configuredRedundancyLevel'] if attributes[:'configuredRedundancyLevel'] raise 'You cannot provide both :configuredRedundancyLevel and :configured_redundancy_level' if attributes.key?(:'configuredRedundancyLevel') && attributes.key?(:'configured_redundancy_level') self.configured_redundancy_level = attributes[:'configured_redundancy_level'] if attributes[:'configured_redundancy_level'] self.ipv4bgp_session_redundancy_status = attributes[:'ipv4bgpSessionRedundancyStatus'] if attributes[:'ipv4bgpSessionRedundancyStatus'] raise 'You cannot provide both :ipv4bgpSessionRedundancyStatus and :ipv4bgp_session_redundancy_status' if attributes.key?(:'ipv4bgpSessionRedundancyStatus') && attributes.key?(:'ipv4bgp_session_redundancy_status') self.ipv4bgp_session_redundancy_status = attributes[:'ipv4bgp_session_redundancy_status'] if attributes[:'ipv4bgp_session_redundancy_status'] self.ipv6bgp_session_redundancy_status = attributes[:'ipv6bgpSessionRedundancyStatus'] if attributes[:'ipv6bgpSessionRedundancyStatus'] raise 'You cannot provide both :ipv6bgpSessionRedundancyStatus and :ipv6bgp_session_redundancy_status' if attributes.key?(:'ipv6bgpSessionRedundancyStatus') && attributes.key?(:'ipv6bgp_session_redundancy_status') self.ipv6bgp_session_redundancy_status = attributes[:'ipv6bgp_session_redundancy_status'] if attributes[:'ipv6bgp_session_redundancy_status'] end |
Instance Attribute Details
#configured_redundancy_level ⇒ String
The configured redundancy level of the virtual circuit.
38 39 40 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 38 def configured_redundancy_level @configured_redundancy_level end |
#ipv4bgp_session_redundancy_status ⇒ String
Indicates if the configured level is met for IPv4 BGP redundancy.
43 44 45 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 43 def ipv4bgp_session_redundancy_status @ipv4bgp_session_redundancy_status end |
#ipv6bgp_session_redundancy_status ⇒ String
Indicates if the configured level is met for IPv6 BGP redundancy.
48 49 50 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 48 def ipv6bgp_session_redundancy_status @ipv6bgp_session_redundancy_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'configured_redundancy_level': :'configuredRedundancyLevel', 'ipv4bgp_session_redundancy_status': :'ipv4bgpSessionRedundancyStatus', 'ipv6bgp_session_redundancy_status': :'ipv6bgpSessionRedundancyStatus' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 62 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'configured_redundancy_level': :'String', 'ipv4bgp_session_redundancy_status': :'String', 'ipv6bgp_session_redundancy_status': :'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 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 152 def ==(other) return true if equal?(other) self.class == other.class && configured_redundancy_level == other.configured_redundancy_level && ipv4bgp_session_redundancy_status == other.ipv4bgp_session_redundancy_status && ipv6bgp_session_redundancy_status == other.ipv6bgp_session_redundancy_status end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 184 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
164 165 166 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 164 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
173 174 175 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 173 def hash [configured_redundancy_level, ipv4bgp_session_redundancy_status, ipv6bgp_session_redundancy_status].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 217 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
211 212 213 |
# File 'lib/oci/core/models/virtual_circuit_redundancy_metadata.rb', line 211 def to_s to_hash.to_s end |