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 =
rubocop:disable Metrics/LineLength
[ 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
Instance Attribute Summary collapse
-
#cross_connect_id ⇒ String
[Required] The OCID of the cross-connect.
-
#interface_state ⇒ String
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.
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
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/core/models/cross_connect_status.rb', line 89 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'] end |
Instance Attribute Details
#cross_connect_id ⇒ String
[Required] The OCID of the cross-connect.
27 28 29 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 27 def cross_connect_id @cross_connect_id end |
#interface_state ⇒ String
Whether Oracle’s side of the interface is up or down.
31 32 33 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 31 def interface_state @interface_state end |
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
Example: ‘14.0`
38 39 40 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 38 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
53 54 55 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 53 def light_level_indicator @light_level_indicator 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 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cross_connect_id': :'crossConnectId', 'interface_state': :'interfaceState', 'light_level_ind_bm': :'lightLevelIndBm', 'light_level_indicator': :'lightLevelIndicator' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cross_connect_id': :'String', 'interface_state': :'String', 'light_level_ind_bm': :'Float', 'light_level_indicator': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 157 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 190 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
170 171 172 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 170 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
179 180 181 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 179 def hash [cross_connect_id, interface_state, light_level_ind_bm, light_level_indicator].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
223 224 225 226 227 228 229 230 231 232 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 223 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
217 218 219 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 217 def to_s to_hash.to_s end |