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

module Azure::Cosmosdb::Mgmt::V2020_04_01
  module Models
    #
    # The definition of a metric.
    #
    class MetricDefinition

      include MsRestAzure

      # @return [Array<MetricAvailability>] The list of metric availabilities
      # for the account.
      attr_accessor :metric_availabilities

      # @return [PrimaryAggregationType] The primary aggregation type of the
      # metric. Possible values include: 'None', 'Average', 'Total', 'Minimum',
      # 'Maximum', 'Last'
      attr_accessor :primary_aggregation_type

      # @return [UnitType] The unit of the metric. Possible values include:
      # 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
      # 'BytesPerSecond', 'Milliseconds'
      attr_accessor :unit

      # @return [String] The resource uri of the database.
      attr_accessor :resource_uri

      # @return [MetricName] The name information for the metric.
      attr_accessor :name


      #
      # Mapper for MetricDefinition class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'MetricDefinition',
          type: {
            name: 'Composite',
            class_name: 'MetricDefinition',
            model_properties: {
              metric_availabilities: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'metricAvailabilities',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'MetricAvailabilityElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'MetricAvailability'
                      }
                  }
                }
              },
              primary_aggregation_type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'primaryAggregationType',
                type: {
                  name: 'String'
                }
              },
              unit: {
                client_side_validation: true,
                required: false,
                serialized_name: 'unit',
                type: {
                  name: 'String'
                }
              },
              resource_uri: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'resourceUri',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'Composite',
                  class_name: 'MetricName'
                }
              }
            }
          }
        }
      end
    end
  end
end
