Class: OCI::Core::Models::CrossConnectStatus
- Inherits:
-
Object
- Object
- OCI::Core::Models::CrossConnectStatus
- Defined in:
- lib/oci/core/models/cross_connect_status.rb
Overview
The status of the cross-connect.
Constant Summary collapse
- INTERFACE_STATE_ENUM =
[ INTERFACE_STATE_UP = 'UP'.freeze, INTERFACE_STATE_DOWN = 'DOWN'.freeze, INTERFACE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIGHT_LEVEL_INDICATOR_ENUM =
[ LIGHT_LEVEL_INDICATOR_NO_LIGHT = 'NO_LIGHT'.freeze, LIGHT_LEVEL_INDICATOR_LOW_WARN = 'LOW_WARN'.freeze, LIGHT_LEVEL_INDICATOR_HIGH_WARN = 'HIGH_WARN'.freeze, LIGHT_LEVEL_INDICATOR_BAD = 'BAD'.freeze, LIGHT_LEVEL_INDICATOR_GOOD = 'GOOD'.freeze, LIGHT_LEVEL_INDICATOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ENCRYPTION_STATUS_ENUM =
[ ENCRYPTION_STATUS_UP = 'UP'.freeze, ENCRYPTION_STATUS_DOWN = 'DOWN'.freeze, ENCRYPTION_STATUS_CIPHER_MISMATCH = 'CIPHER_MISMATCH'.freeze, ENCRYPTION_STATUS_CKN_MISMATCH = 'CKN_MISMATCH'.freeze, ENCRYPTION_STATUS_CAK_MISMATCH = 'CAK_MISMATCH'.freeze, ENCRYPTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cross_connect_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect.
-
#encryption_status ⇒ String
Encryption status of this cross connect.
-
#interface_state ⇒ String
Indicates whether Oracle’s side of the interface is up or down.
-
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
-
#light_level_indicator ⇒ String
Status indicator corresponding to the light level.
-
#light_levels_in_d_bm ⇒ Array<Float>
The light levels of the cross-connect (in dBm).
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 = {}) ⇒ CrossConnectStatus
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 = {}) ⇒ CrossConnectStatus
Initializes the object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 120 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.cross_connect_id = attributes[:'crossConnectId'] if attributes[:'crossConnectId'] raise 'You cannot provide both :crossConnectId and :cross_connect_id' if attributes.key?(:'crossConnectId') && attributes.key?(:'cross_connect_id') self.cross_connect_id = attributes[:'cross_connect_id'] if attributes[:'cross_connect_id'] self.interface_state = attributes[:'interfaceState'] if attributes[:'interfaceState'] raise 'You cannot provide both :interfaceState and :interface_state' if attributes.key?(:'interfaceState') && attributes.key?(:'interface_state') self.interface_state = attributes[:'interface_state'] if attributes[:'interface_state'] self.light_level_ind_bm = attributes[:'lightLevelIndBm'] if attributes[:'lightLevelIndBm'] raise 'You cannot provide both :lightLevelIndBm and :light_level_ind_bm' if attributes.key?(:'lightLevelIndBm') && attributes.key?(:'light_level_ind_bm') self.light_level_ind_bm = attributes[:'light_level_ind_bm'] if attributes[:'light_level_ind_bm'] self.light_level_indicator = attributes[:'lightLevelIndicator'] if attributes[:'lightLevelIndicator'] raise 'You cannot provide both :lightLevelIndicator and :light_level_indicator' if attributes.key?(:'lightLevelIndicator') && attributes.key?(:'light_level_indicator') self.light_level_indicator = attributes[:'light_level_indicator'] if attributes[:'light_level_indicator'] self.encryption_status = attributes[:'encryptionStatus'] if attributes[:'encryptionStatus'] raise 'You cannot provide both :encryptionStatus and :encryption_status' if attributes.key?(:'encryptionStatus') && attributes.key?(:'encryption_status') self.encryption_status = attributes[:'encryption_status'] if attributes[:'encryption_status'] self.light_levels_in_d_bm = attributes[:'lightLevelsInDBm'] if attributes[:'lightLevelsInDBm'] raise 'You cannot provide both :lightLevelsInDBm and :light_levels_in_d_bm' if attributes.key?(:'lightLevelsInDBm') && attributes.key?(:'light_levels_in_d_bm') self.light_levels_in_d_bm = attributes[:'light_levels_in_d_bm'] if attributes[:'light_levels_in_d_bm'] end |
Instance Attribute Details
#cross_connect_id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect.
37 38 39 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 37 def cross_connect_id @cross_connect_id end |
#encryption_status ⇒ String
Encryption status of this cross connect.
Possible values:
-
UP: Traffic is encrypted over this cross-connect
-
DOWN: Traffic is not encrypted over this cross-connect
-
CIPHER_MISMATCH: The MACsec encryption cipher doesn’t match the cipher on the CPE
-
CKN_MISMATCH: The MACsec Connectivity association Key Name (CKN) doesn’t match the CKN on the CPE
-
CAK_MISMATCH: The MACsec Connectivity Association Key (CAK) doesn’t match the CAK on the CPE
71 72 73 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 71 def encryption_status @encryption_status end |
#interface_state ⇒ String
Indicates whether Oracle’s side of the interface is up or down.
41 42 43 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 41 def interface_state @interface_state end |
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
Example: 14.0
48 49 50 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 48 def light_level_ind_bm @light_level_ind_bm end |
#light_level_indicator ⇒ String
Status indicator corresponding to the light level.
* **NO_LIGHT:** No measurable light
* **LOW_WARN:** There's measurable light but it's too low
* **HIGH_WARN:** Light level is too high
* **BAD:** There's measurable light but the signal-to-noise ratio is bad
* **GOOD:** Good light level
59 60 61 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 59 def light_level_indicator @light_level_indicator end |
#light_levels_in_d_bm ⇒ Array<Float>
The light levels of the cross-connect (in dBm).
Example: ‘[14.0, -14.0, 2.1, -10.1]`
78 79 80 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 78 def light_levels_in_d_bm @light_levels_in_d_bm end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 81 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cross_connect_id': :'crossConnectId', 'interface_state': :'interfaceState', 'light_level_ind_bm': :'lightLevelIndBm', 'light_level_indicator': :'lightLevelIndicator', 'encryption_status': :'encryptionStatus', 'light_levels_in_d_bm': :'lightLevelsInDBm' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 95 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cross_connect_id': :'String', 'interface_state': :'String', 'light_level_ind_bm': :'Float', 'light_level_indicator': :'String', 'encryption_status': :'String', 'light_levels_in_d_bm': :'Array<Float>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 209 def ==(other) return true if equal?(other) self.class == other.class && cross_connect_id == other.cross_connect_id && interface_state == other.interface_state && light_level_ind_bm == other.light_level_ind_bm && light_level_indicator == other.light_level_indicator && encryption_status == other.encryption_status && light_levels_in_d_bm == other.light_levels_in_d_bm end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 244 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
224 225 226 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 224 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
233 234 235 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 233 def hash [cross_connect_id, interface_state, light_level_ind_bm, light_level_indicator, encryption_status, light_levels_in_d_bm].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
277 278 279 280 281 282 283 284 285 286 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 277 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
271 272 273 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 271 def to_s to_hash.to_s end |