Class: IntersightClient::CapabilitySwitchCapabilityAllOf
- Inherits:
-
Object
- Object
- IntersightClient::CapabilitySwitchCapabilityAllOf
- Defined in:
- lib/intersight_client/models/capability_switch_capability_all_of.rb
Overview
Definition of the list of properties defined in ‘capability.SwitchCapability’, excluding properties defined in parent classes.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#default_fcoe_vlan ⇒ Object
Default Fcoe VLAN associated with this switch.
-
#dynamic_vifs_supported ⇒ Object
Dynamic VIFs support on this switch.
-
#fan_modules_supported ⇒ Object
Fan Modules support on this switch.
-
#fc_end_host_mode_reserved_vsans ⇒ Object
Returns the value of attribute fc_end_host_mode_reserved_vsans.
-
#fc_uplink_ports_auto_negotiation_supported ⇒ Object
Fc Uplink ports auto negotiation speed support on this switch.
-
#locator_beacon_supported ⇒ Object
Locator Beacon LED support on this switch.
-
#max_ports ⇒ Object
Maximum allowed physical ports on this switch.
-
#max_slots ⇒ Object
Maximum allowed physical slots on this switch.
-
#network_limits ⇒ Object
Returns the value of attribute network_limits.
-
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type.
-
#ports_supporting100g_speed ⇒ Object
Returns the value of attribute ports_supporting100g_speed.
-
#ports_supporting10g_speed ⇒ Object
Returns the value of attribute ports_supporting10g_speed.
-
#ports_supporting1g_speed ⇒ Object
Returns the value of attribute ports_supporting1g_speed.
-
#ports_supporting25g_speed ⇒ Object
Returns the value of attribute ports_supporting25g_speed.
-
#ports_supporting40g_speed ⇒ Object
Returns the value of attribute ports_supporting40g_speed.
-
#ports_supporting_breakout ⇒ Object
Returns the value of attribute ports_supporting_breakout.
-
#ports_supporting_fcoe ⇒ Object
Returns the value of attribute ports_supporting_fcoe.
-
#ports_supporting_server_role ⇒ Object
Returns the value of attribute ports_supporting_server_role.
-
#reserved_vsans ⇒ Object
Returns the value of attribute reserved_vsans.
-
#sereno_netflow_supported ⇒ Object
Sereno Adaptor with Netflow support on this switch.
-
#storage_limits ⇒ Object
Returns the value of attribute storage_limits.
-
#switching_mode_capabilities ⇒ Object
Returns the value of attribute switching_mode_capabilities.
-
#system_limits ⇒ Object
Returns the value of attribute system_limits.
-
#unified_ports ⇒ Object
Returns the value of attribute unified_ports.
-
#unified_rule ⇒ Object
The Slider rule for Unified ports on this switch.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CapabilitySwitchCapabilityAllOf
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CapabilitySwitchCapabilityAllOf
Initializes the object
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 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 201 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::CapabilitySwitchCapabilityAllOf` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'class_id') self.class_id = attributes[:'class_id'] else self.class_id = 'capability.SwitchCapability' end if attributes.key?(:'object_type') self.object_type = attributes[:'object_type'] else self.object_type = 'capability.SwitchCapability' end if attributes.key?(:'default_fcoe_vlan') self.default_fcoe_vlan = attributes[:'default_fcoe_vlan'] end if attributes.key?(:'dynamic_vifs_supported') self.dynamic_vifs_supported = attributes[:'dynamic_vifs_supported'] end if attributes.key?(:'fan_modules_supported') self.fan_modules_supported = attributes[:'fan_modules_supported'] end if attributes.key?(:'fc_end_host_mode_reserved_vsans') if (value = attributes[:'fc_end_host_mode_reserved_vsans']).is_a?(Array) self.fc_end_host_mode_reserved_vsans = value end end if attributes.key?(:'fc_uplink_ports_auto_negotiation_supported') self.fc_uplink_ports_auto_negotiation_supported = attributes[:'fc_uplink_ports_auto_negotiation_supported'] end if attributes.key?(:'locator_beacon_supported') self.locator_beacon_supported = attributes[:'locator_beacon_supported'] end if attributes.key?(:'max_ports') self.max_ports = attributes[:'max_ports'] end if attributes.key?(:'max_slots') self.max_slots = attributes[:'max_slots'] end if attributes.key?(:'network_limits') self.network_limits = attributes[:'network_limits'] end if attributes.key?(:'ports_supporting100g_speed') if (value = attributes[:'ports_supporting100g_speed']).is_a?(Array) self.ports_supporting100g_speed = value end end if attributes.key?(:'ports_supporting10g_speed') if (value = attributes[:'ports_supporting10g_speed']).is_a?(Array) self.ports_supporting10g_speed = value end end if attributes.key?(:'ports_supporting1g_speed') if (value = attributes[:'ports_supporting1g_speed']).is_a?(Array) self.ports_supporting1g_speed = value end end if attributes.key?(:'ports_supporting25g_speed') if (value = attributes[:'ports_supporting25g_speed']).is_a?(Array) self.ports_supporting25g_speed = value end end if attributes.key?(:'ports_supporting40g_speed') if (value = attributes[:'ports_supporting40g_speed']).is_a?(Array) self.ports_supporting40g_speed = value end end if attributes.key?(:'ports_supporting_breakout') if (value = attributes[:'ports_supporting_breakout']).is_a?(Array) self.ports_supporting_breakout = value end end if attributes.key?(:'ports_supporting_fcoe') if (value = attributes[:'ports_supporting_fcoe']).is_a?(Array) self.ports_supporting_fcoe = value end end if attributes.key?(:'ports_supporting_server_role') if (value = attributes[:'ports_supporting_server_role']).is_a?(Array) self.ports_supporting_server_role = value end end if attributes.key?(:'reserved_vsans') if (value = attributes[:'reserved_vsans']).is_a?(Array) self.reserved_vsans = value end end if attributes.key?(:'sereno_netflow_supported') self.sereno_netflow_supported = attributes[:'sereno_netflow_supported'] end if attributes.key?(:'storage_limits') self.storage_limits = attributes[:'storage_limits'] end if attributes.key?(:'switching_mode_capabilities') if (value = attributes[:'switching_mode_capabilities']).is_a?(Array) self.switching_mode_capabilities = value end end if attributes.key?(:'system_limits') self.system_limits = attributes[:'system_limits'] end if attributes.key?(:'unified_ports') if (value = attributes[:'unified_ports']).is_a?(Array) self.unified_ports = value end end if attributes.key?(:'unified_rule') self.unified_rule = attributes[:'unified_rule'] end end |
Instance Attribute Details
#class_id ⇒ Object
The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
20 21 22 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 20 def class_id @class_id end |
#default_fcoe_vlan ⇒ Object
Default Fcoe VLAN associated with this switch.
26 27 28 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 26 def default_fcoe_vlan @default_fcoe_vlan end |
#dynamic_vifs_supported ⇒ Object
Dynamic VIFs support on this switch.
29 30 31 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 29 def dynamic_vifs_supported @dynamic_vifs_supported end |
#fan_modules_supported ⇒ Object
Fan Modules support on this switch.
32 33 34 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 32 def fan_modules_supported @fan_modules_supported end |
#fc_end_host_mode_reserved_vsans ⇒ Object
Returns the value of attribute fc_end_host_mode_reserved_vsans.
34 35 36 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 34 def fc_end_host_mode_reserved_vsans @fc_end_host_mode_reserved_vsans end |
#fc_uplink_ports_auto_negotiation_supported ⇒ Object
Fc Uplink ports auto negotiation speed support on this switch.
37 38 39 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 37 def fc_uplink_ports_auto_negotiation_supported @fc_uplink_ports_auto_negotiation_supported end |
#locator_beacon_supported ⇒ Object
Locator Beacon LED support on this switch.
40 41 42 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 40 def locator_beacon_supported @locator_beacon_supported end |
#max_ports ⇒ Object
Maximum allowed physical ports on this switch.
43 44 45 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 43 def max_ports @max_ports end |
#max_slots ⇒ Object
Maximum allowed physical slots on this switch.
46 47 48 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 46 def max_slots @max_slots end |
#network_limits ⇒ Object
Returns the value of attribute network_limits.
48 49 50 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 48 def network_limits @network_limits end |
#object_type ⇒ Object
The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.
23 24 25 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 23 def object_type @object_type end |
#ports_supporting100g_speed ⇒ Object
Returns the value of attribute ports_supporting100g_speed.
50 51 52 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 50 def ports_supporting100g_speed @ports_supporting100g_speed end |
#ports_supporting10g_speed ⇒ Object
Returns the value of attribute ports_supporting10g_speed.
52 53 54 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 52 def ports_supporting10g_speed @ports_supporting10g_speed end |
#ports_supporting1g_speed ⇒ Object
Returns the value of attribute ports_supporting1g_speed.
54 55 56 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 54 def ports_supporting1g_speed @ports_supporting1g_speed end |
#ports_supporting25g_speed ⇒ Object
Returns the value of attribute ports_supporting25g_speed.
56 57 58 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 56 def ports_supporting25g_speed @ports_supporting25g_speed end |
#ports_supporting40g_speed ⇒ Object
Returns the value of attribute ports_supporting40g_speed.
58 59 60 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 58 def ports_supporting40g_speed @ports_supporting40g_speed end |
#ports_supporting_breakout ⇒ Object
Returns the value of attribute ports_supporting_breakout.
60 61 62 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 60 def ports_supporting_breakout @ports_supporting_breakout end |
#ports_supporting_fcoe ⇒ Object
Returns the value of attribute ports_supporting_fcoe.
62 63 64 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 62 def ports_supporting_fcoe @ports_supporting_fcoe end |
#ports_supporting_server_role ⇒ Object
Returns the value of attribute ports_supporting_server_role.
64 65 66 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 64 def ports_supporting_server_role @ports_supporting_server_role end |
#reserved_vsans ⇒ Object
Returns the value of attribute reserved_vsans.
66 67 68 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 66 def reserved_vsans @reserved_vsans end |
#sereno_netflow_supported ⇒ Object
Sereno Adaptor with Netflow support on this switch.
69 70 71 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 69 def sereno_netflow_supported @sereno_netflow_supported end |
#storage_limits ⇒ Object
Returns the value of attribute storage_limits.
71 72 73 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 71 def storage_limits @storage_limits end |
#switching_mode_capabilities ⇒ Object
Returns the value of attribute switching_mode_capabilities.
73 74 75 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 73 def switching_mode_capabilities @switching_mode_capabilities end |
#system_limits ⇒ Object
Returns the value of attribute system_limits.
75 76 77 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 75 def system_limits @system_limits end |
#unified_ports ⇒ Object
Returns the value of attribute unified_ports.
77 78 79 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 77 def unified_ports @unified_ports end |
#unified_rule ⇒ Object
The Slider rule for Unified ports on this switch.
80 81 82 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 80 def unified_rule @unified_rule end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns the key-value map of all the JSON attributes this model knows about
142 143 144 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 142 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
137 138 139 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 137 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 105 def self.attribute_map { :'class_id' => :'ClassId', :'object_type' => :'ObjectType', :'default_fcoe_vlan' => :'DefaultFcoeVlan', :'dynamic_vifs_supported' => :'DynamicVifsSupported', :'fan_modules_supported' => :'FanModulesSupported', :'fc_end_host_mode_reserved_vsans' => :'FcEndHostModeReservedVsans', :'fc_uplink_ports_auto_negotiation_supported' => :'FcUplinkPortsAutoNegotiationSupported', :'locator_beacon_supported' => :'LocatorBeaconSupported', :'max_ports' => :'MaxPorts', :'max_slots' => :'MaxSlots', :'network_limits' => :'NetworkLimits', :'ports_supporting100g_speed' => :'PortsSupporting100gSpeed', :'ports_supporting10g_speed' => :'PortsSupporting10gSpeed', :'ports_supporting1g_speed' => :'PortsSupporting1gSpeed', :'ports_supporting25g_speed' => :'PortsSupporting25gSpeed', :'ports_supporting40g_speed' => :'PortsSupporting40gSpeed', :'ports_supporting_breakout' => :'PortsSupportingBreakout', :'ports_supporting_fcoe' => :'PortsSupportingFcoe', :'ports_supporting_server_role' => :'PortsSupportingServerRole', :'reserved_vsans' => :'ReservedVsans', :'sereno_netflow_supported' => :'SerenoNetflowSupported', :'storage_limits' => :'StorageLimits', :'switching_mode_capabilities' => :'SwitchingModeCapabilities', :'system_limits' => :'SystemLimits', :'unified_ports' => :'UnifiedPorts', :'unified_rule' => :'UnifiedRule' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
442 443 444 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 442 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 179 def self.openapi_nullable Set.new([ :'fc_end_host_mode_reserved_vsans', :'network_limits', :'ports_supporting100g_speed', :'ports_supporting10g_speed', :'ports_supporting1g_speed', :'ports_supporting25g_speed', :'ports_supporting40g_speed', :'ports_supporting_breakout', :'ports_supporting_fcoe', :'ports_supporting_server_role', :'reserved_vsans', :'storage_limits', :'switching_mode_capabilities', :'system_limits', :'unified_ports', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 147 def self.openapi_types { :'class_id' => :'String', :'object_type' => :'String', :'default_fcoe_vlan' => :'Integer', :'dynamic_vifs_supported' => :'Boolean', :'fan_modules_supported' => :'Boolean', :'fc_end_host_mode_reserved_vsans' => :'Array<CapabilityPortRange>', :'fc_uplink_ports_auto_negotiation_supported' => :'Boolean', :'locator_beacon_supported' => :'Boolean', :'max_ports' => :'Integer', :'max_slots' => :'Integer', :'network_limits' => :'CapabilitySwitchNetworkLimits', :'ports_supporting100g_speed' => :'Array<CapabilityPortRange>', :'ports_supporting10g_speed' => :'Array<CapabilityPortRange>', :'ports_supporting1g_speed' => :'Array<CapabilityPortRange>', :'ports_supporting25g_speed' => :'Array<CapabilityPortRange>', :'ports_supporting40g_speed' => :'Array<CapabilityPortRange>', :'ports_supporting_breakout' => :'Array<CapabilityPortRange>', :'ports_supporting_fcoe' => :'Array<CapabilityPortRange>', :'ports_supporting_server_role' => :'Array<CapabilityPortRange>', :'reserved_vsans' => :'Array<CapabilityPortRange>', :'sereno_netflow_supported' => :'Boolean', :'storage_limits' => :'CapabilitySwitchStorageLimits', :'switching_mode_capabilities' => :'Array<CapabilitySwitchingModeCapability>', :'system_limits' => :'CapabilitySwitchSystemLimits', :'unified_ports' => :'Array<CapabilityPortRange>', :'unified_rule' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 396 def ==(o) return true if self.equal?(o) self.class == o.class && class_id == o.class_id && object_type == o.object_type && default_fcoe_vlan == o.default_fcoe_vlan && dynamic_vifs_supported == o.dynamic_vifs_supported && fan_modules_supported == o.fan_modules_supported && fc_end_host_mode_reserved_vsans == o.fc_end_host_mode_reserved_vsans && fc_uplink_ports_auto_negotiation_supported == o.fc_uplink_ports_auto_negotiation_supported && locator_beacon_supported == o.locator_beacon_supported && max_ports == o.max_ports && max_slots == o.max_slots && network_limits == o.network_limits && ports_supporting100g_speed == o.ports_supporting100g_speed && ports_supporting10g_speed == o.ports_supporting10g_speed && ports_supporting1g_speed == o.ports_supporting1g_speed && ports_supporting25g_speed == o.ports_supporting25g_speed && ports_supporting40g_speed == o.ports_supporting40g_speed && ports_supporting_breakout == o.ports_supporting_breakout && ports_supporting_fcoe == o.ports_supporting_fcoe && ports_supporting_server_role == o.ports_supporting_server_role && reserved_vsans == o.reserved_vsans && sereno_netflow_supported == o.sereno_netflow_supported && storage_limits == o.storage_limits && switching_mode_capabilities == o.switching_mode_capabilities && system_limits == o.system_limits && unified_ports == o.unified_ports && unified_rule == o.unified_rule end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 472 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = IntersightClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 543 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 449 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) CapabilitySwitchCapabilityAllOf.openapi_types.each_pair do |key, type| if attributes[CapabilitySwitchCapabilityAllOf.attribute_map[key]].nil? && CapabilitySwitchCapabilityAllOf.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[CapabilitySwitchCapabilityAllOf.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[CapabilitySwitchCapabilityAllOf.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[CapabilitySwitchCapabilityAllOf.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[CapabilitySwitchCapabilityAllOf.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
429 430 431 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 429 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
435 436 437 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 435 def hash [class_id, object_type, default_fcoe_vlan, dynamic_vifs_supported, fan_modules_supported, fc_end_host_mode_reserved_vsans, fc_uplink_ports_auto_negotiation_supported, locator_beacon_supported, max_ports, max_slots, network_limits, ports_supporting100g_speed, ports_supporting10g_speed, ports_supporting1g_speed, ports_supporting25g_speed, ports_supporting40g_speed, ports_supporting_breakout, ports_supporting_fcoe, ports_supporting_server_role, reserved_vsans, sereno_netflow_supported, storage_limits, switching_mode_capabilities, system_limits, unified_ports, unified_rule].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 349 def list_invalid_properties invalid_properties = Array.new if @class_id.nil? invalid_properties.push('invalid value for "class_id", class_id cannot be nil.') end if @object_type.nil? invalid_properties.push('invalid value for "object_type", object_type cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
519 520 521 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 519 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 525 def to_hash hash = {} CapabilitySwitchCapabilityAllOf.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = CapabilitySwitchCapabilityAllOf.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
513 514 515 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 513 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
364 365 366 367 368 369 370 371 372 |
# File 'lib/intersight_client/models/capability_switch_capability_all_of.rb', line 364 def valid? return false if @class_id.nil? class_id_validator = EnumAttributeValidator.new('String', ["capability.SwitchCapability"]) return false unless class_id_validator.valid?(@class_id) return false if @object_type.nil? object_type_validator = EnumAttributeValidator.new('String', ["capability.SwitchCapability"]) return false unless object_type_validator.valid?(@object_type) true end |