Class: OCI::Mngdmac::Models::UpdateNodeConfigDetails
- Inherits:
-
Object
- Object
- OCI::Mngdmac::Models::UpdateNodeConfigDetails
- Defined in:
- lib/oci/mngdmac/models/update_node_config_details.rb
Overview
The data to update a new NodeConfig.
Instance Attribute Summary collapse
-
#build_ip_address ⇒ String
The buildIpAddress.
-
#build_vlan_id ⇒ Integer
The buildVlanId.
-
#chip_set ⇒ String
The chipSetn.
-
#ip_kvm_hostname ⇒ String
The ipKvmHostname.
-
#ip_kvm_port_number ⇒ Integer
The ipKvmPortNumber.
-
#mac_address ⇒ String
The macAddress.
-
#mac_order_id ⇒ String
The macOrderId.
-
#os_version ⇒ String
The osVersion.
-
#pdu_hostname ⇒ String
The pduHostname.
-
#pdu_port ⇒ Integer
The pduPort.
-
#prod_ip_address ⇒ String
The prodIpAddress.
-
#prod_vlan_id ⇒ Integer
The prodVlanId.
-
#rack_location ⇒ String
The rackLocation.
-
#switch_eth_port ⇒ String
The switchEthPort.
-
#switch_hostname ⇒ String
The switchHostname.
-
#tenancy_id ⇒ String
The tenancyId.
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 = {}) ⇒ UpdateNodeConfigDetails
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 = {}) ⇒ UpdateNodeConfigDetails
Initializes the object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 145 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.mac_address = attributes[:'macAddress'] if attributes[:'macAddress'] raise 'You cannot provide both :macAddress and :mac_address' if attributes.key?(:'macAddress') && attributes.key?(:'mac_address') self.mac_address = attributes[:'mac_address'] if attributes[:'mac_address'] self.mac_order_id = attributes[:'macOrderId'] if attributes[:'macOrderId'] raise 'You cannot provide both :macOrderId and :mac_order_id' if attributes.key?(:'macOrderId') && attributes.key?(:'mac_order_id') self.mac_order_id = attributes[:'mac_order_id'] if attributes[:'mac_order_id'] self.switch_hostname = attributes[:'switchHostname'] if attributes[:'switchHostname'] raise 'You cannot provide both :switchHostname and :switch_hostname' if attributes.key?(:'switchHostname') && attributes.key?(:'switch_hostname') self.switch_hostname = attributes[:'switch_hostname'] if attributes[:'switch_hostname'] self.switch_eth_port = attributes[:'switchEthPort'] if attributes[:'switchEthPort'] raise 'You cannot provide both :switchEthPort and :switch_eth_port' if attributes.key?(:'switchEthPort') && attributes.key?(:'switch_eth_port') self.switch_eth_port = attributes[:'switch_eth_port'] if attributes[:'switch_eth_port'] self.ip_kvm_hostname = attributes[:'ipKvmHostname'] if attributes[:'ipKvmHostname'] raise 'You cannot provide both :ipKvmHostname and :ip_kvm_hostname' if attributes.key?(:'ipKvmHostname') && attributes.key?(:'ip_kvm_hostname') self.ip_kvm_hostname = attributes[:'ip_kvm_hostname'] if attributes[:'ip_kvm_hostname'] self.ip_kvm_port_number = attributes[:'ipKvmPortNumber'] if attributes[:'ipKvmPortNumber'] raise 'You cannot provide both :ipKvmPortNumber and :ip_kvm_port_number' if attributes.key?(:'ipKvmPortNumber') && attributes.key?(:'ip_kvm_port_number') self.ip_kvm_port_number = attributes[:'ip_kvm_port_number'] if attributes[:'ip_kvm_port_number'] self.pdu_hostname = attributes[:'pduHostname'] if attributes[:'pduHostname'] raise 'You cannot provide both :pduHostname and :pdu_hostname' if attributes.key?(:'pduHostname') && attributes.key?(:'pdu_hostname') self.pdu_hostname = attributes[:'pdu_hostname'] if attributes[:'pdu_hostname'] self.pdu_port = attributes[:'pduPort'] if attributes[:'pduPort'] raise 'You cannot provide both :pduPort and :pdu_port' if attributes.key?(:'pduPort') && attributes.key?(:'pdu_port') self.pdu_port = attributes[:'pdu_port'] if attributes[:'pdu_port'] self.build_vlan_id = attributes[:'buildVlanId'] if attributes[:'buildVlanId'] raise 'You cannot provide both :buildVlanId and :build_vlan_id' if attributes.key?(:'buildVlanId') && attributes.key?(:'build_vlan_id') self.build_vlan_id = attributes[:'build_vlan_id'] if attributes[:'build_vlan_id'] self.build_ip_address = attributes[:'buildIpAddress'] if attributes[:'buildIpAddress'] raise 'You cannot provide both :buildIpAddress and :build_ip_address' if attributes.key?(:'buildIpAddress') && attributes.key?(:'build_ip_address') self.build_ip_address = attributes[:'build_ip_address'] if attributes[:'build_ip_address'] self.prod_vlan_id = attributes[:'prodVlanId'] if attributes[:'prodVlanId'] raise 'You cannot provide both :prodVlanId and :prod_vlan_id' if attributes.key?(:'prodVlanId') && attributes.key?(:'prod_vlan_id') self.prod_vlan_id = attributes[:'prod_vlan_id'] if attributes[:'prod_vlan_id'] self.prod_ip_address = attributes[:'prodIpAddress'] if attributes[:'prodIpAddress'] raise 'You cannot provide both :prodIpAddress and :prod_ip_address' if attributes.key?(:'prodIpAddress') && attributes.key?(:'prod_ip_address') self.prod_ip_address = attributes[:'prod_ip_address'] if attributes[:'prod_ip_address'] self.rack_location = attributes[:'rackLocation'] if attributes[:'rackLocation'] raise 'You cannot provide both :rackLocation and :rack_location' if attributes.key?(:'rackLocation') && attributes.key?(:'rack_location') self.rack_location = attributes[:'rack_location'] if attributes[:'rack_location'] self.chip_set = attributes[:'chipSet'] if attributes[:'chipSet'] raise 'You cannot provide both :chipSet and :chip_set' if attributes.key?(:'chipSet') && attributes.key?(:'chip_set') self.chip_set = attributes[:'chip_set'] if attributes[:'chip_set'] self.os_version = attributes[:'osVersion'] if attributes[:'osVersion'] raise 'You cannot provide both :osVersion and :os_version' if attributes.key?(:'osVersion') && attributes.key?(:'os_version') self.os_version = attributes[:'os_version'] if attributes[:'os_version'] self.tenancy_id = attributes[:'tenancyId'] if attributes[:'tenancyId'] raise 'You cannot provide both :tenancyId and :tenancy_id' if attributes.key?(:'tenancyId') && attributes.key?(:'tenancy_id') self.tenancy_id = attributes[:'tenancy_id'] if attributes[:'tenancy_id'] end |
Instance Attribute Details
#build_ip_address ⇒ String
The buildIpAddress.
49 50 51 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 49 def build_ip_address @build_ip_address end |
#build_vlan_id ⇒ Integer
The buildVlanId.
45 46 47 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 45 def build_vlan_id @build_vlan_id end |
#chip_set ⇒ String
The chipSetn.
65 66 67 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 65 def chip_set @chip_set end |
#ip_kvm_hostname ⇒ String
The ipKvmHostname.
29 30 31 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 29 def ip_kvm_hostname @ip_kvm_hostname end |
#ip_kvm_port_number ⇒ Integer
The ipKvmPortNumber.
33 34 35 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 33 def ip_kvm_port_number @ip_kvm_port_number end |
#mac_address ⇒ String
The macAddress.
13 14 15 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 13 def mac_address @mac_address end |
#mac_order_id ⇒ String
The macOrderId.
17 18 19 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 17 def mac_order_id @mac_order_id end |
#os_version ⇒ String
The osVersion.
69 70 71 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 69 def os_version @os_version end |
#pdu_hostname ⇒ String
The pduHostname.
37 38 39 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 37 def pdu_hostname @pdu_hostname end |
#pdu_port ⇒ Integer
The pduPort.
41 42 43 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 41 def pdu_port @pdu_port end |
#prod_ip_address ⇒ String
The prodIpAddress.
57 58 59 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 57 def prod_ip_address @prod_ip_address end |
#prod_vlan_id ⇒ Integer
The prodVlanId.
53 54 55 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 53 def prod_vlan_id @prod_vlan_id end |
#rack_location ⇒ String
The rackLocation.
61 62 63 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 61 def rack_location @rack_location end |
#switch_eth_port ⇒ String
The switchEthPort.
25 26 27 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 25 def switch_eth_port @switch_eth_port end |
#switch_hostname ⇒ String
The switchHostname.
21 22 23 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 21 def switch_hostname @switch_hostname end |
#tenancy_id ⇒ String
The tenancyId.
73 74 75 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 73 def tenancy_id @tenancy_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'mac_address': :'macAddress', 'mac_order_id': :'macOrderId', 'switch_hostname': :'switchHostname', 'switch_eth_port': :'switchEthPort', 'ip_kvm_hostname': :'ipKvmHostname', 'ip_kvm_port_number': :'ipKvmPortNumber', 'pdu_hostname': :'pduHostname', 'pdu_port': :'pduPort', 'build_vlan_id': :'buildVlanId', 'build_ip_address': :'buildIpAddress', 'prod_vlan_id': :'prodVlanId', 'prod_ip_address': :'prodIpAddress', 'rack_location': :'rackLocation', 'chip_set': :'chipSet', 'os_version': :'osVersion', 'tenancy_id': :'tenancyId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 100 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'mac_address': :'String', 'mac_order_id': :'String', 'switch_hostname': :'String', 'switch_eth_port': :'String', 'ip_kvm_hostname': :'String', 'ip_kvm_port_number': :'Integer', 'pdu_hostname': :'String', 'pdu_port': :'Integer', 'build_vlan_id': :'Integer', 'build_ip_address': :'String', 'prod_vlan_id': :'Integer', 'prod_ip_address': :'String', 'rack_location': :'String', 'chip_set': :'String', 'os_version': :'String', 'tenancy_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 255 def ==(other) return true if equal?(other) self.class == other.class && mac_address == other.mac_address && mac_order_id == other.mac_order_id && switch_hostname == other.switch_hostname && switch_eth_port == other.switch_eth_port && ip_kvm_hostname == other.ip_kvm_hostname && ip_kvm_port_number == other.ip_kvm_port_number && pdu_hostname == other.pdu_hostname && pdu_port == other.pdu_port && build_vlan_id == other.build_vlan_id && build_ip_address == other.build_ip_address && prod_vlan_id == other.prod_vlan_id && prod_ip_address == other.prod_ip_address && rack_location == other.rack_location && chip_set == other.chip_set && os_version == other.os_version && tenancy_id == other.tenancy_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 300 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
280 281 282 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 280 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
289 290 291 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 289 def hash [mac_address, mac_order_id, switch_hostname, switch_eth_port, ip_kvm_hostname, ip_kvm_port_number, pdu_hostname, pdu_port, build_vlan_id, build_ip_address, prod_vlan_id, prod_ip_address, rack_location, chip_set, os_version, tenancy_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
333 334 335 336 337 338 339 340 341 342 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 333 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
327 328 329 |
# File 'lib/oci/mngdmac/models/update_node_config_details.rb', line 327 def to_s to_hash.to_s end |