Class: Azure::ARM::Compute::Models::VirtualMachineScaleSetSku
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::VirtualMachineScaleSetSku
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb
Overview
Describes an available virtual machine scale set sku.
Instance Attribute Summary collapse
-
#capacity ⇒ VirtualMachineScaleSetSkuCapacity
information.
-
#resource_type ⇒ String
Gets the type of resource the sku applies to.
-
#sku ⇒ Sku
Gets the Sku.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualMachineScaleSetSku
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#capacity ⇒ VirtualMachineScaleSetSkuCapacity
information.
23 24 25 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 23 def capacity @capacity end |
#resource_type ⇒ String
Returns Gets the type of resource the sku applies to.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 16 def resource_type @resource_type end |
#sku ⇒ Sku
Returns Gets the Sku.
19 20 21 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 19 def sku @sku end |
Class Method Details
.deserialize_object(object) ⇒ VirtualMachineScaleSetSku
Deserializes given Ruby Hash into Model object.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 65 def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineScaleSetSku.new deserialized_property = object['resourceType'] output_object.resource_type = deserialized_property deserialized_property = object['sku'] unless deserialized_property.nil? deserialized_property = Sku.deserialize_object(deserialized_property) end output_object.sku = deserialized_property deserialized_property = object['capacity'] unless deserialized_property.nil? deserialized_property = VirtualMachineScaleSetSkuCapacity.deserialize_object(deserialized_property) end output_object.capacity = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 38 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.resource_type output_object['resourceType'] = serialized_property unless serialized_property.nil? serialized_property = object.sku unless serialized_property.nil? serialized_property = Sku.serialize_object(serialized_property) end output_object['sku'] = serialized_property unless serialized_property.nil? serialized_property = object.capacity unless serialized_property.nil? serialized_property = VirtualMachineScaleSetSkuCapacity.serialize_object(serialized_property) end output_object['capacity'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
28 29 30 31 |
# File 'lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb', line 28 def validate @sku.validate unless @sku.nil? @capacity.validate unless @capacity.nil? end |