# 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::Web::Mgmt::V2020_09_01
  module Models
    #
    # Class representing Diagnostic Metric information
    #
    class DiagnosticMetricSet

      include MsRestAzure

      # @return [String] Name of the metric
      attr_accessor :name

      # @return [String] Metric's unit
      attr_accessor :unit

      # @return [DateTime] Start time of the period
      attr_accessor :start_time

      # @return [DateTime] End time of the period
      attr_accessor :end_time

      # @return [String] Presented time grain. Supported grains at the moment
      # are PT1M, PT1H, P1D
      attr_accessor :time_grain

      # @return [Array<DiagnosticMetricSample>] Collection of metric values for
      # the selected period based on the
      # {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}
      attr_accessor :values


      #
      # Mapper for DiagnosticMetricSet class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DiagnosticMetricSet',
          type: {
            name: 'Composite',
            class_name: 'DiagnosticMetricSet',
            model_properties: {
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              unit: {
                client_side_validation: true,
                required: false,
                serialized_name: 'unit',
                type: {
                  name: 'String'
                }
              },
              start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'startTime',
                type: {
                  name: 'DateTime'
                }
              },
              end_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'endTime',
                type: {
                  name: 'DateTime'
                }
              },
              time_grain: {
                client_side_validation: true,
                required: false,
                serialized_name: 'timeGrain',
                type: {
                  name: 'String'
                }
              },
              values: {
                client_side_validation: true,
                required: false,
                serialized_name: 'values',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'DiagnosticMetricSampleElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'DiagnosticMetricSample'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
