Sha256: c0c2e8a44d60f4078eb06731279c6d45dd39d377438daaeaa8880b3a352065cb

Contents?: true

Size: 1.72 KB

Versions: 3

Compression:

Stored size: 1.72 KB

Contents

# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ARM::Compute
  module Models
    #
    # Contains the data disk images information.
    #
    class DataDiskImage

      include MsRestAzure

      # @return [Integer] Gets the LUN number for a data disk.This value is
      # used to identify data disk image inside the VMImage therefore it must
      # be unique for each data disk.The allowed character for the value is
      # digit.
      attr_accessor :lun

      #
      # 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.lun
        output_object['lun'] = 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 [DataDiskImage] Deserialized object.
      #
      def self.deserialize_object(object)
        return if object.nil?
        output_object = DataDiskImage.new

        deserialized_property = object['lun']
        deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
        output_object.lun = deserialized_property

        output_object.validate

        output_object
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
azure_mgmt_compute-0.1.2 lib/azure_mgmt_compute/models/data_disk_image.rb
azure_mgmt_compute-0.1.1 lib/azure_mgmt_compute/models/data_disk_image.rb
azure_mgmt_compute-0.1.0 lib/azure_mgmt_compute/Models/data_disk_image.rb