class Azure::Monitor::Mgmt::V2017_05_01_preview::Models::Metric

The result data of a query.

Attributes

id[RW]

@return [String] the metric Id.

name[RW]

@return [LocalizableString] the name and the display name of the metric, i.e. it is localizable string.

timeseries[RW]

@return [Array<TimeSeriesElement>] the time series returned when a data query is performed.

type[RW]

@return [String] the resource type of the metric resource.

unit[RW]

@return [Unit] the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'CountPerSecond', 'BytesPerSecond', 'Percent', 'MilliSeconds', 'ByteSeconds', 'Unspecified'

Public Class Methods

mapper() click to toggle source

Mapper for Metric class as Ruby Hash. This will be used for serialization/deserialization.

# File lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric.rb, line 39
def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'Metric',
    type: {
      name: 'Composite',
      class_name: 'Metric',
      model_properties: {
        id: {
          client_side_validation: true,
          required: true,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        type: {
          client_side_validation: true,
          required: true,
          serialized_name: 'type',
          type: {
            name: 'String'
          }
        },
        name: {
          client_side_validation: true,
          required: true,
          serialized_name: 'name',
          type: {
            name: 'Composite',
            class_name: 'LocalizableString'
          }
        },
        unit: {
          client_side_validation: true,
          required: true,
          serialized_name: 'unit',
          type: {
            name: 'Enum',
            module: 'Unit'
          }
        },
        timeseries: {
          client_side_validation: true,
          required: true,
          serialized_name: 'timeseries',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'TimeSeriesElementElementType',
                type: {
                  name: 'Composite',
                  class_name: 'TimeSeriesElement'
                }
            }
          }
        }
      }
    }
  }
end