# 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::SQL::Mgmt::V2015_05_01_preview
  module Models
    #
    # Contains time series of various impacted metrics for an Azure SQL
    # Database, Server or Elastic Pool Recommended Action.
    #
    class RecommendedActionMetricInfo

      include MsRestAzure

      # @return [String] Gets the name of the metric. e.g., CPU, Number of
      # Queries.
      attr_accessor :metric_name

      # @return [String] Gets the unit in which metric is measured. e.g., DTU,
      # Frequency
      attr_accessor :unit

      # @return [String] Gets the duration of time interval for the value given
      # by this MetricInfo. e.g., PT1H (1 hour)
      attr_accessor :time_grain

      # @return [DateTime] Gets the start time of time interval given by this
      # MetricInfo.
      attr_accessor :start_time

      # @return [Float] Gets the value of the metric in the time interval given
      # by this MetricInfo.
      attr_accessor :value


      #
      # Mapper for RecommendedActionMetricInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RecommendedActionMetricInfo',
          type: {
            name: 'Composite',
            class_name: 'RecommendedActionMetricInfo',
            model_properties: {
              metric_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'metricName',
                type: {
                  name: 'String'
                }
              },
              unit: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'unit',
                type: {
                  name: 'String'
                }
              },
              time_grain: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'timeGrain',
                type: {
                  name: 'String'
                }
              },
              start_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'startTime',
                type: {
                  name: 'DateTime'
                }
              },
              value: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'value',
                type: {
                  name: 'Double'
                }
              }
            }
          }
        }
      end
    end
  end
end
