Class: OCI::Core::Models::UpdateCrossConnectDetails
- Inherits:
-
Object
- Object
- OCI::Core::Models::UpdateCrossConnectDetails
- Defined in:
- lib/oci/core/models/update_cross_connect_details.rb
Overview
Update a CrossConnect
Instance Attribute Summary collapse
-
#customer_reference_name ⇒ String
A reference name or identifier for the physical fiber connection this cross-connect uses.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#interface_down_timer_value_in_milliseconds ⇒ Integer
The duration of the interface down timer in milliseconds between 0 and 3000 in multiples of 500.
-
#is_active ⇒ BOOLEAN
Set to true to activate the cross-connect.
-
#is_interface_hold_timer_enabled ⇒ BOOLEAN
The flag to enable or disable the down timer for the interface.
- #macsec_properties ⇒ OCI::Core::Models::UpdateMacsecProperties
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 = {}) ⇒ UpdateCrossConnectDetails
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 = {}) ⇒ UpdateCrossConnectDetails
Initializes the object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 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 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 105 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. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.is_active = attributes[:'isActive'] unless attributes[:'isActive'].nil? raise 'You cannot provide both :isActive and :is_active' if attributes.key?(:'isActive') && attributes.key?(:'is_active') self.is_active = attributes[:'is_active'] unless attributes[:'is_active'].nil? self.customer_reference_name = attributes[:'customerReferenceName'] if attributes[:'customerReferenceName'] raise 'You cannot provide both :customerReferenceName and :customer_reference_name' if attributes.key?(:'customerReferenceName') && attributes.key?(:'customer_reference_name') self.customer_reference_name = attributes[:'customer_reference_name'] if attributes[:'customer_reference_name'] self.macsec_properties = attributes[:'macsecProperties'] if attributes[:'macsecProperties'] raise 'You cannot provide both :macsecProperties and :macsec_properties' if attributes.key?(:'macsecProperties') && attributes.key?(:'macsec_properties') self.macsec_properties = attributes[:'macsec_properties'] if attributes[:'macsec_properties'] self.is_interface_hold_timer_enabled = attributes[:'isInterfaceHoldTimerEnabled'] unless attributes[:'isInterfaceHoldTimerEnabled'].nil? raise 'You cannot provide both :isInterfaceHoldTimerEnabled and :is_interface_hold_timer_enabled' if attributes.key?(:'isInterfaceHoldTimerEnabled') && attributes.key?(:'is_interface_hold_timer_enabled') self.is_interface_hold_timer_enabled = attributes[:'is_interface_hold_timer_enabled'] unless attributes[:'is_interface_hold_timer_enabled'].nil? self.interface_down_timer_value_in_milliseconds = attributes[:'interfaceDownTimerValueInMilliseconds'] if attributes[:'interfaceDownTimerValueInMilliseconds'] raise 'You cannot provide both :interfaceDownTimerValueInMilliseconds and :interface_down_timer_value_in_milliseconds' if attributes.key?(:'interfaceDownTimerValueInMilliseconds') && attributes.key?(:'interface_down_timer_value_in_milliseconds') self.interface_down_timer_value_in_milliseconds = attributes[:'interface_down_timer_value_in_milliseconds'] if attributes[:'interface_down_timer_value_in_milliseconds'] end |
Instance Attribute Details
#customer_reference_name ⇒ String
A reference name or identifier for the physical fiber connection this cross-connect uses.
46 47 48 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 46 def customer_reference_name @customer_reference_name end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
18 19 20 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 18 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
24 25 26 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 24 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
32 33 34 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 32 def @freeform_tags end |
#interface_down_timer_value_in_milliseconds ⇒ Integer
The duration of the interface down timer in milliseconds between 0 and 3000 in multiples of 500.
57 58 59 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 57 def interface_down_timer_value_in_milliseconds @interface_down_timer_value_in_milliseconds end |
#is_active ⇒ BOOLEAN
Set to true to activate the cross-connect. You activate it after the physical cabling is complete, and you've confirmed the cross-connect's light levels are good and your side of the interface is up. Activation indicates to Oracle that the physical connection is ready.
Example: true
41 42 43 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 41 def is_active @is_active end |
#is_interface_hold_timer_enabled ⇒ BOOLEAN
The flag to enable or disable the down timer for the interface.
53 54 55 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 53 def is_interface_hold_timer_enabled @is_interface_hold_timer_enabled end |
#macsec_properties ⇒ OCI::Core::Models::UpdateMacsecProperties
49 50 51 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 49 def macsec_properties @macsec_properties end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 60 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'defined_tags': :'definedTags', 'display_name': :'displayName', 'freeform_tags': :'freeformTags', 'is_active': :'isActive', 'customer_reference_name': :'customerReferenceName', 'macsec_properties': :'macsecProperties', 'is_interface_hold_timer_enabled': :'isInterfaceHoldTimerEnabled', 'interface_down_timer_value_in_milliseconds': :'interfaceDownTimerValueInMilliseconds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 76 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'defined_tags': :'Hash<String, Hash<String, Object>>', 'display_name': :'String', 'freeform_tags': :'Hash<String, String>', 'is_active': :'BOOLEAN', 'customer_reference_name': :'String', 'macsec_properties': :'OCI::Core::Models::UpdateMacsecProperties', 'is_interface_hold_timer_enabled': :'BOOLEAN', 'interface_down_timer_value_in_milliseconds': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 167 def ==(other) return true if equal?(other) self.class == other.class && == other. && display_name == other.display_name && == other. && is_active == other.is_active && customer_reference_name == other.customer_reference_name && macsec_properties == other.macsec_properties && is_interface_hold_timer_enabled == other.is_interface_hold_timer_enabled && interface_down_timer_value_in_milliseconds == other.interface_down_timer_value_in_milliseconds end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 204 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
184 185 186 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 184 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
193 194 195 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 193 def hash [, display_name, , is_active, customer_reference_name, macsec_properties, is_interface_hold_timer_enabled, interface_down_timer_value_in_milliseconds].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 237 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
231 232 233 |
# File 'lib/oci/core/models/update_cross_connect_details.rb', line 231 def to_s to_hash.to_s end |