# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Compute module Models # # Capture Virtual Machine parameters. # class VirtualMachineCaptureParameters include MsRestAzure # @return [String] Gets or sets the captured VirtualHardDisk's name # prefix. attr_accessor :vhd_prefix # @return [String] Gets or sets the destination container name. attr_accessor :destination_container_name # @return [Boolean] Gets or sets whether it overwrites destination # VirtualHardDisk if true, in case of conflict. attr_accessor :overwrite_vhds # # Validate the object. Throws ValidationError if validation fails. # def validate fail MsRest::ValidationError, 'property vhd_prefix is nil' if @vhd_prefix.nil? fail MsRest::ValidationError, 'property destination_container_name is nil' if @destination_container_name.nil? fail MsRest::ValidationError, 'property overwrite_vhds is nil' if @overwrite_vhds.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.vhd_prefix output_object['vhdPrefix'] = serialized_property unless serialized_property.nil? serialized_property = object.destination_container_name output_object['destinationContainerName'] = serialized_property unless serialized_property.nil? serialized_property = object.overwrite_vhds output_object['overwriteVhds'] = 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 [VirtualMachineCaptureParameters] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = VirtualMachineCaptureParameters.new deserialized_property = object['vhdPrefix'] output_object.vhd_prefix = deserialized_property deserialized_property = object['destinationContainerName'] output_object.destination_container_name = deserialized_property deserialized_property = object['overwriteVhds'] output_object.overwrite_vhds = deserialized_property output_object end end end end