Class: OracleBMC::Core::Models::CrossConnectStatus
- Inherits:
-
Object
- Object
- OracleBMC::Core::Models::CrossConnectStatus
- Defined in:
- lib/oraclebmc/core/models/cross_connect_status.rb
Constant Summary collapse
- INTERFACE_STATE_ENUM =
[INTERFACE_STATE_UP = 'UP', INTERFACE_STATE_DOWN = 'DOWN', INTERFACE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- LIGHT_LEVEL_INDICATOR_ENUM =
[LIGHT_LEVEL_INDICATOR_NO_LIGHT = 'NO_LIGHT', LIGHT_LEVEL_INDICATOR_LOW_WARN = 'LOW_WARN', LIGHT_LEVEL_INDICATOR_HIGH_WARN = 'HIGH_WARN', LIGHT_LEVEL_INDICATOR_BAD = 'BAD', LIGHT_LEVEL_INDICATOR_GOOD = 'GOOD', LIGHT_LEVEL_INDICATOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
Instance Attribute Summary collapse
-
#cross_connect_id ⇒ String
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.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ 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
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 53 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} if attributes[:'crossConnectId'] self.cross_connect_id = attributes[:'crossConnectId'] end if attributes[:'interfaceState'] self.interface_state = attributes[:'interfaceState'] end if attributes[:'lightLevelIndBm'] self.light_level_ind_bm = attributes[:'lightLevelIndBm'] end if attributes[:'lightLevelIndicator'] self.light_level_indicator = attributes[:'lightLevelIndicator'] end end |
Instance Attribute Details
#cross_connect_id ⇒ String
The OCID of the cross-connect.
22 23 24 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 22 def cross_connect_id @cross_connect_id end |
#interface_state ⇒ String
Whether Oracle’s side of the interface is up or down.
26 27 28 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 26 def interface_state @interface_state end |
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
Example: ‘14.0`
33 34 35 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 33 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
48 49 50 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 48 def light_level_indicator @light_level_indicator end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
100 101 102 103 104 105 106 107 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 100 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && cross_connect_id == other_object.cross_connect_id && interface_state == other_object.interface_state && light_level_ind_bm == other_object.light_level_ind_bm && light_level_indicator == other_object.light_level_indicator end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 124 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) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", OracleBMC::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_object) ⇒ Boolean
111 112 113 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 111 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
117 118 119 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 117 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
149 150 151 152 153 154 155 156 157 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 149 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
143 144 145 |
# File 'lib/oraclebmc/core/models/cross_connect_status.rb', line 143 def to_s to_hash.to_s end |