# 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 # # The image reference. # class ImageReference include MsRestAzure # @return [String] Gets or sets the image publisher. attr_accessor :publisher # @return [String] Gets or sets the image offer. attr_accessor :offer # @return [String] Gets or sets the image sku. attr_accessor :sku # @return [String] Gets or sets the image version. The allowed formats # are Major.Minor.Build or 'latest'. Major, Minor and Build being # decimal numbers. Specify 'latest' to use the latest version of image. attr_accessor :version # # Validate the object. Throws ValidationError if validation fails. # def validate # Nothing to validate 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.publisher output_object['publisher'] = serialized_property unless serialized_property.nil? serialized_property = object.offer output_object['offer'] = serialized_property unless serialized_property.nil? serialized_property = object.sku output_object['sku'] = serialized_property unless serialized_property.nil? serialized_property = object.version output_object['version'] = 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 [ImageReference] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = ImageReference.new deserialized_property = object['publisher'] output_object.publisher = deserialized_property deserialized_property = object['offer'] output_object.offer = deserialized_property deserialized_property = object['sku'] output_object.sku = deserialized_property deserialized_property = object['version'] output_object.version = deserialized_property output_object end end end end