Class: IntersightClient::CapabilitySwitchCapability

Inherits:
CapabilitySwitchCapabilityDef show all
Defined in:
lib/intersight_client/models/capability_switch_capability.rb

Overview

Type to represent additional switch specific capabilities.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Attributes inherited from CapabilitySwitchCapabilityDef

#pid, #sku, #vid

Attributes inherited from CapabilityCapability

#name

Attributes inherited from MoBaseMo

#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CapabilitySwitchCapability

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 214

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::CapabilitySwitchCapability` 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
  }

  # call parent's initialize
  super(attributes)

  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_idObject

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.rb', line 20

def class_id
  @class_id
end

#default_fcoe_vlanObject

Default Fcoe VLAN associated with this switch.



26
27
28
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 26

def default_fcoe_vlan
  @default_fcoe_vlan
end

#dynamic_vifs_supportedObject

Dynamic VIFs support on this switch.



29
30
31
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 29

def dynamic_vifs_supported
  @dynamic_vifs_supported
end

#fan_modules_supportedObject

Fan Modules support on this switch.



32
33
34
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 32

def fan_modules_supported
  @fan_modules_supported
end

#fc_end_host_mode_reserved_vsansObject

Returns the value of attribute fc_end_host_mode_reserved_vsans.



34
35
36
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 34

def fc_end_host_mode_reserved_vsans
  @fc_end_host_mode_reserved_vsans
end

Fc Uplink ports auto negotiation speed support on this switch.



37
38
39
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 37

def fc_uplink_ports_auto_negotiation_supported
  @fc_uplink_ports_auto_negotiation_supported
end

#locator_beacon_supportedObject

Locator Beacon LED support on this switch.



40
41
42
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 40

def locator_beacon_supported
  @locator_beacon_supported
end

#max_portsObject

Maximum allowed physical ports on this switch.



43
44
45
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 43

def max_ports
  @max_ports
end

#max_slotsObject

Maximum allowed physical slots on this switch.



46
47
48
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 46

def max_slots
  @max_slots
end

#network_limitsObject

Returns the value of attribute network_limits.



48
49
50
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 48

def network_limits
  @network_limits
end

#object_typeObject

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.rb', line 23

def object_type
  @object_type
end

#ports_supporting100g_speedObject

Returns the value of attribute ports_supporting100g_speed.



50
51
52
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 50

def ports_supporting100g_speed
  @ports_supporting100g_speed
end

#ports_supporting10g_speedObject

Returns the value of attribute ports_supporting10g_speed.



52
53
54
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 52

def ports_supporting10g_speed
  @ports_supporting10g_speed
end

#ports_supporting1g_speedObject

Returns the value of attribute ports_supporting1g_speed.



54
55
56
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 54

def ports_supporting1g_speed
  @ports_supporting1g_speed
end

#ports_supporting25g_speedObject

Returns the value of attribute ports_supporting25g_speed.



56
57
58
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 56

def ports_supporting25g_speed
  @ports_supporting25g_speed
end

#ports_supporting40g_speedObject

Returns the value of attribute ports_supporting40g_speed.



58
59
60
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 58

def ports_supporting40g_speed
  @ports_supporting40g_speed
end

#ports_supporting_breakoutObject

Returns the value of attribute ports_supporting_breakout.



60
61
62
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 60

def ports_supporting_breakout
  @ports_supporting_breakout
end

#ports_supporting_fcoeObject

Returns the value of attribute ports_supporting_fcoe.



62
63
64
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 62

def ports_supporting_fcoe
  @ports_supporting_fcoe
end

#ports_supporting_server_roleObject

Returns the value of attribute ports_supporting_server_role.



64
65
66
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 64

def ports_supporting_server_role
  @ports_supporting_server_role
end

#reserved_vsansObject

Returns the value of attribute reserved_vsans.



66
67
68
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 66

def reserved_vsans
  @reserved_vsans
end

#sereno_netflow_supportedObject

Sereno Adaptor with Netflow support on this switch.



69
70
71
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 69

def sereno_netflow_supported
  @sereno_netflow_supported
end

#storage_limitsObject

Returns the value of attribute storage_limits.



71
72
73
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 71

def storage_limits
  @storage_limits
end

#switching_mode_capabilitiesObject

Returns the value of attribute switching_mode_capabilities.



73
74
75
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 73

def switching_mode_capabilities
  @switching_mode_capabilities
end

#system_limitsObject

Returns the value of attribute system_limits.



75
76
77
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 75

def system_limits
  @system_limits
end

#unified_portsObject

Returns the value of attribute unified_ports.



77
78
79
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 77

def unified_ports
  @unified_ports
end

#unified_ruleObject

The Slider rule for Unified ports on this switch.



80
81
82
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 80

def unified_rule
  @unified_rule
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)



142
143
144
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 142

def self.acceptable_attribute_map
  attribute_map.merge(superclass.acceptable_attribute_map)
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about, including the ones defined in its parent(s)



137
138
139
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 137

def self.acceptable_attributes
  attribute_map.values.concat(superclass.acceptable_attributes)
end

.attribute_mapObject

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.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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



458
459
460
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 458

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



200
201
202
203
204
205
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 200

def self.openapi_all_of
  [
  :'CapabilitySwitchCapabilityAllOf',
  :'CapabilitySwitchCapabilityDef'
  ]
end

.openapi_discriminator_nameObject

discriminator’s property name in OpenAPI v3



208
209
210
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 208

def self.openapi_discriminator_name
  :'ClassId'
end

.openapi_nullableObject

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.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_typesObject

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.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.

Parameters:

  • Object (Object)

    to be compared



412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 412

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 && super(o)
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 489

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 560

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 465

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  super(attributes)
  CapabilitySwitchCapability.openapi_types.each_pair do |key, type|
    if attributes[CapabilitySwitchCapability.attribute_map[key]].nil? && CapabilitySwitchCapability.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[CapabilitySwitchCapability.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[CapabilitySwitchCapability.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[CapabilitySwitchCapability.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[CapabilitySwitchCapability.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


445
446
447
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 445

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



451
452
453
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 451

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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 365

def list_invalid_properties
  invalid_properties = super
  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_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



536
537
538
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 536

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 542

def to_hash
  hash = super
  CapabilitySwitchCapability.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = CapabilitySwitchCapability.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



530
531
532
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 530

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



380
381
382
383
384
385
386
387
388
# File 'lib/intersight_client/models/capability_switch_capability.rb', line 380

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 && super
end