Class: DatadogAPIClient::V1::MetricMetadata
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::MetricMetadata
- Defined in:
- lib/datadog_api_client/v1/models/metric_metadata.rb
Overview
Object with all metric related metadata.
Instance Attribute Summary collapse
-
#description ⇒ Object
Metric description.
-
#integration ⇒ Object
Name of the integration that sent the metric if applicable.
-
#per_unit ⇒ Object
Per unit of the metric such as ‘second` in `bytes per second`.
-
#short_name ⇒ Object
A more human-readable and abbreviated version of the metric name.
-
#statsd_interval ⇒ Object
StatsD flush interval of the metric in seconds if applicable.
-
#type ⇒ Object
Metric type such as ‘gauge` or `rate`.
-
#unit ⇒ Object
Primary unit of the metric such as ‘byte` or `operation`.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MetricMetadata
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ MetricMetadata
Initializes the object
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
#description ⇒ Object
Metric description.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/metric_metadata.rb', line 27 def description @description end |
#integration ⇒ Object
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_unit ⇒ Object
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_name ⇒ Object
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_interval ⇒ Object
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 |
#type ⇒ Object
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 |
#unit ⇒ Object
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 |