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', 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
[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.
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
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 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/cross_connect_status.rb', line 58 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 raise 'You cannot provide both :crossConnectId and :cross_connect_id' if attributes.key?(:'crossConnectId') && attributes.key?(:'cross_connect_id') if attributes[:'cross_connect_id'] self.cross_connect_id = attributes[:'cross_connect_id'] end if attributes[:'interfaceState'] self.interface_state = attributes[:'interfaceState'] end raise 'You cannot provide both :interfaceState and :interface_state' if attributes.key?(:'interfaceState') && attributes.key?(:'interface_state') if attributes[:'interface_state'] self.interface_state = attributes[:'interface_state'] end if attributes[:'lightLevelIndBm'] self.light_level_ind_bm = attributes[:'lightLevelIndBm'] end raise 'You cannot provide both :lightLevelIndBm and :light_level_ind_bm' if attributes.key?(:'lightLevelIndBm') && attributes.key?(:'light_level_ind_bm') if attributes[:'light_level_ind_bm'] self.light_level_ind_bm = attributes[:'light_level_ind_bm'] end if attributes[:'lightLevelIndicator'] self.light_level_indicator = attributes[:'lightLevelIndicator'] end raise 'You cannot provide both :lightLevelIndicator and :light_level_indicator' if attributes.key?(:'lightLevelIndicator') && attributes.key?(:'light_level_indicator') if attributes[:'light_level_indicator'] self.light_level_indicator = attributes[:'light_level_indicator'] end end |
Instance Attribute Details
#cross_connect_id ⇒ String
[Required] The OCID of the cross-connect.
23 24 25 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 23 def cross_connect_id @cross_connect_id end |
#interface_state ⇒ String
Whether Oracle’s side of the interface is up or down.
27 28 29 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 27 def interface_state @interface_state end |
#light_level_ind_bm ⇒ Float
The light level of the cross-connect (in dBm).
Example: ‘14.0`
34 35 36 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 34 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
49 50 51 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 49 def light_level_indicator @light_level_indicator end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
128 129 130 131 132 133 134 135 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 128 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
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 152 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.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.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_object) ⇒ Boolean
139 140 141 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 139 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
145 146 147 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 145 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
177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 177 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
171 172 173 |
# File 'lib/oci/core/models/cross_connect_status.rb', line 171 def to_s to_hash.to_s end |