Sha256: e65d08cd5a272f12983e56d7cd4fbcd46a9d58ee1b510c4beefafc82bc8a3e11

Contents?: true

Size: 1.85 KB

Versions: 2

Compression:

Stored size: 1.85 KB

Contents

# 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::Web
  module Models
    #
    # Application logs to file system configuration
    #
    class FileSystemApplicationLogsConfig

      include MsRestAzure

      # @return [LogLevel] Log level. Possible values include: 'Off',
      # 'Verbose', 'Information', 'Warning', 'Error'
      attr_accessor :level

      #
      # Validate the object. Throws ValidationError if validation fails.
      #
      def 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.level
        output_object['level'] = 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 [FileSystemApplicationLogsConfig] Deserialized object.
      #
      def self.deserialize_object(object)
        return if object.nil?
        output_object = FileSystemApplicationLogsConfig.new

        deserialized_property = object['level']
        if (!deserialized_property.nil? && !deserialized_property.empty?)
          enum_is_valid = LogLevel.constants.any? { |e| LogLevel.const_get(e).to_s.downcase == deserialized_property.downcase }
          warn 'Enum LogLevel does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
        end
        output_object.level = deserialized_property

        output_object
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure_mgmt_web-0.3.1 lib/azure_mgmt_web/models/file_system_application_logs_config.rb
azure_mgmt_web-0.3.0 lib/azure_mgmt_web/models/file_system_application_logs_config.rb