Class: DatadogAPIClient::V1::MetricMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/metric_metadata.rb

Overview

Object with all metric related metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MetricMetadata

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 90

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricMetadata` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MetricMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.key?(:'integration')
    self.integration = attributes[:'integration']
  end

  if attributes.key?(:'per_unit')
    self.per_unit = attributes[:'per_unit']
  end

  if attributes.key?(:'short_name')
    self.short_name = attributes[:'short_name']
  end

  if attributes.key?(:'statsd_interval')
    self.statsd_interval = attributes[:'statsd_interval']
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.key?(:'unit')
    self.unit = attributes[:'unit']
  end
end

Instance Attribute Details

#descriptionObject

Metric description.



27
28
29
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 27

def description
  @description
end

#integrationObject

Name of the integration that sent the metric if applicable.



30
31
32
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 30

def integration
  @integration
end

#per_unitObject

Per unit of the metric such as ‘second` in `bytes per second`.



33
34
35
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 33

def per_unit
  @per_unit
end

#short_nameObject

A more human-readable and abbreviated version of the metric name.



36
37
38
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 36

def short_name
  @short_name
end

#statsd_intervalObject

StatsD flush interval of the metric in seconds if applicable.



39
40
41
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 39

def statsd_interval
  @statsd_interval
end

#typeObject

Metric type such as ‘gauge` or `rate`.



42
43
44
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 42

def type
  @type
end

#unitObject

Primary unit of the metric such as ‘byte` or `operation`.



45
46
47
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 45

def unit
  @unit
end