Class: Azure::ARM::Compute::Models::AvailabilitySetProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::AvailabilitySetProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/availability_set_properties.rb
Overview
The instance view of a resource.
Instance Attribute Summary collapse
-
#platform_fault_domain_count ⇒ Integer
Gets or sets Fault Domain count.
-
#platform_update_domain_count ⇒ Integer
Gets or sets Update Domain count.
-
#statuses ⇒ Array<InstanceViewStatus>
information.
-
#virtual_machines ⇒ Array<SubResource>
to all Virtual Machines created under this Availability Set.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ AvailabilitySetProperties
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
#platform_fault_domain_count ⇒ Integer
Returns Gets or sets Fault Domain count.
19 20 21 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 19 def platform_fault_domain_count @platform_fault_domain_count end |
#platform_update_domain_count ⇒ Integer
Returns Gets or sets Update Domain count.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 16 def platform_update_domain_count @platform_update_domain_count end |
#statuses ⇒ Array<InstanceViewStatus>
information.
27 28 29 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 27 def statuses @statuses end |
#virtual_machines ⇒ Array<SubResource>
to all Virtual Machines created under this Availability Set.
23 24 25 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 23 def virtual_machines @virtual_machines end |
Class Method Details
.deserialize_object(object) ⇒ AvailabilitySetProperties
Deserializes given Ruby Hash into Model object.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 86 def self.deserialize_object(object) return if object.nil? output_object = AvailabilitySetProperties.new deserialized_property = object['platformUpdateDomainCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.platform_update_domain_count = deserialized_property deserialized_property = object['platformFaultDomainCount'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.platform_fault_domain_count = deserialized_property deserialized_property = object['virtualMachines'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element2| unless element2.nil? element2 = SubResource.deserialize_object(element2) end deserializedArray.push(element2); end deserialized_property = deserializedArray; end output_object.virtual_machines = deserialized_property deserialized_property = object['statuses'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element3| unless element3.nil? element3 = InstanceViewStatus.deserialize_object(element3) end deserializedArray.push(element3); end deserialized_property = deserializedArray; end output_object.statuses = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 42 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.platform_update_domain_count output_object['platformUpdateDomainCount'] = serialized_property unless serialized_property.nil? serialized_property = object.platform_fault_domain_count output_object['platformFaultDomainCount'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_machines unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = SubResource.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['virtualMachines'] = serialized_property unless serialized_property.nil? serialized_property = object.statuses unless serialized_property.nil? serializedArray = [] serialized_property.each do |element1| unless element1.nil? element1 = InstanceViewStatus.serialize_object(element1) end serializedArray.push(element1) end serialized_property = serializedArray end output_object['statuses'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
32 33 34 35 |
# File 'lib/azure_mgmt_compute/models/availability_set_properties.rb', line 32 def validate @virtual_machines.each{ |e| e.validate if e.respond_to?(:validate) } unless @virtual_machines.nil? @statuses.each{ |e| e.validate if e.respond_to?(:validate) } unless @statuses.nil? end |