# 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::Monitor::Mgmt::V2018_01_01
  module Models
    #
    # The response to a metrics query.
    #
    class Response

      include MsRestAzure

      # @return [Float] The integer value representing the cost of the query,
      # for data case.
      attr_accessor :cost

      # @return [String] The timespan for which the data was retrieved. Its
      # value consists of two datetimes concatenated, separated by '/'.  This
      # may be adjusted in the future and returned back from what was
      # originally requested.
      attr_accessor :timespan

      # @return [Duration] The interval (window size) for which the metric data
      # was returned in.  This may be adjusted in the future and returned back
      # from what was originally requested.  This is not present if a metadata
      # request was made.
      attr_accessor :interval

      # @return [String] The namespace of the metrics been queried
      attr_accessor :namespace

      # @return [String] The region of the resource been queried for metrics.
      attr_accessor :resourceregion

      # @return [Array<Metric>] the value of the collection.
      attr_accessor :value


      #
      # Mapper for Response class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Response',
          type: {
            name: 'Composite',
            class_name: 'Response',
            model_properties: {
              cost: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cost',
                constraints: {
                  InclusiveMinimum: 0
                },
                type: {
                  name: 'Double'
                }
              },
              timespan: {
                client_side_validation: true,
                required: true,
                serialized_name: 'timespan',
                type: {
                  name: 'String'
                }
              },
              interval: {
                client_side_validation: true,
                required: false,
                serialized_name: 'interval',
                type: {
                  name: 'TimeSpan'
                }
              },
              namespace: {
                client_side_validation: true,
                required: false,
                serialized_name: 'namespace',
                type: {
                  name: 'String'
                }
              },
              resourceregion: {
                client_side_validation: true,
                required: false,
                serialized_name: 'resourceregion',
                type: {
                  name: 'String'
                }
              },
              value: {
                client_side_validation: true,
                required: true,
                serialized_name: 'value',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'MetricElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'Metric'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
