Sha256: 8320ffe5e35dc0fdb325151e5891681f93315064bfc81275df15fd6e1ba1918f

Contents?: true

Size: 1.57 KB

Versions: 3

Compression:

Stored size: 1.57 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
    #
    # Describes a network interface reference properties.
    #
    class NetworkInterfaceReferenceProperties

      include MsRestAzure

      # @return [Boolean] Gets or sets whether this is a primary NIC on a
      # virtual machine
      attr_accessor :primary

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

        deserialized_property = object['primary']
        output_object.primary = 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/network_interface_reference_properties.rb
azure_mgmt_compute-0.1.1 lib/azure_mgmt_compute/models/network_interface_reference_properties.rb
azure_mgmt_compute-0.1.0 lib/azure_mgmt_compute/Models/network_interface_reference_properties.rb