Sha256: 016c1d1e42f5f8dbd827aba20aef7a2bb1bb222af7dbc0f779e4d4ad6fe35d32

Contents?: true

Size: 1.8 KB

Versions: 2

Compression:

Stored size: 1.8 KB

Contents

# 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 a diagnostics profile.
    #
    class DiagnosticsProfile

      include MsRestAzure

      # @return [BootDiagnostics] Gets or sets the boot diagnostics.
      attr_accessor :boot_diagnostics

      #
      # Validate the object. Throws ValidationError if validation fails.
      #
      def validate
        @boot_diagnostics.validate unless @boot_diagnostics.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.boot_diagnostics
        unless serialized_property.nil?
          serialized_property = BootDiagnostics.serialize_object(serialized_property)
        end
        output_object['bootDiagnostics'] = 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 [DiagnosticsProfile] Deserialized object.
      #
      def self.deserialize_object(object)
        return if object.nil?
        output_object = DiagnosticsProfile.new

        deserialized_property = object['bootDiagnostics']
        unless deserialized_property.nil?
          deserialized_property = BootDiagnostics.deserialize_object(deserialized_property)
        end
        output_object.boot_diagnostics = deserialized_property

        output_object
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure_mgmt_compute-0.2.1 lib/azure_mgmt_compute/models/diagnostics_profile.rb
azure_mgmt_compute-0.2.0 lib/azure_mgmt_compute/models/diagnostics_profile.rb