# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # # Describes the properties of a Virtual Machine Scale Set. # class VirtualMachineScaleSetProperties include MsRestAzure # @return [UpgradePolicy] Gets or sets the upgrade policy. attr_accessor :upgrade_policy # @return [VirtualMachineScaleSetVMProfile] Gets or sets the virtual # machine profile. attr_accessor :virtual_machine_profile # @return [String] Gets or sets the provisioning state, which only # appears in the response. attr_accessor :provisioning_state # # Validate the object. Throws ValidationError if validation fails. # def validate @upgrade_policy.validate unless @upgrade_policy.nil? @virtual_machine_profile.validate unless @virtual_machine_profile.nil? end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.upgrade_policy unless serialized_property.nil? serialized_property = UpgradePolicy.serialize_object(serialized_property) end output_object['upgradePolicy'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_machine_profile unless serialized_property.nil? serialized_property = VirtualMachineScaleSetVMProfile.serialize_object(serialized_property) end output_object['virtualMachineProfile'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [VirtualMachineScaleSetProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineScaleSetProperties.new deserialized_property = object['upgradePolicy'] unless deserialized_property.nil? deserialized_property = UpgradePolicy.deserialize_object(deserialized_property) end output_object.upgrade_policy = deserialized_property deserialized_property = object['virtualMachineProfile'] unless deserialized_property.nil? deserialized_property = VirtualMachineScaleSetVMProfile.deserialize_object(deserialized_property) end output_object.virtual_machine_profile = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property output_object end end end end