Class: OCI::VnMonitoring::Models::CrossConnectStatus
- Inherits:
-
Object
- Object
- OCI::VnMonitoring::Models::CrossConnectStatus
- Defined in:
- lib/oci/vn_monitoring/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
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.
-
#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.
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
86 87 88 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 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 86 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](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cross-connect.
28 29 30 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 28 def cross_connect_id @cross_connect_id end |
#interface_state ⇒ String
Indicates whether Oracle's side of the interface is up or down.
32 33 34 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 32 def interface_state @interface_state end |
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
Example: `14.0`
39 40 41 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 39 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
50 51 52 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 50 def light_level_indicator @light_level_indicator 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 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 53 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.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 65 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.
150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 150 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
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 183 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
163 164 165 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 172 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
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 216 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
210 211 212 |
# File 'lib/oci/vn_monitoring/models/cross_connect_status.rb', line 210 def to_s to_hash.to_s end |