Class: DatadogAPIClient::V1::MetricsQueryResponse
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::MetricsQueryResponse
- Defined in:
- lib/datadog_api_client/v1/models/metrics_query_response.rb
Overview
Response Object that includes your query and the list of metrics retrieved.
Instance Attribute Summary collapse
-
#error ⇒ Object
Message indicating the errors if status is not ‘ok`.
-
#from_date ⇒ Object
Start of requested time window, milliseconds since Unix epoch.
-
#group_by ⇒ Object
List of tag keys on which to group.
-
#message ⇒ Object
Message indicating ‘success` if status is `ok`.
-
#query ⇒ Object
Query string.
-
#res_type ⇒ Object
Type of response.
-
#series ⇒ Object
List of timeseries queried.
-
#status ⇒ Object
Status of the query.
-
#to_date ⇒ Object
End of requested time window, milliseconds since Unix epoch.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MetricsQueryResponse
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ MetricsQueryResponse
Initializes the object
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 100 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MetricsQueryResponse` 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::MetricsQueryResponse`. 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?(:'error') self.error = attributes[:'error'] end if attributes.key?(:'from_date') self.from_date = attributes[:'from_date'] end if attributes.key?(:'group_by') if (value = attributes[:'group_by']).is_a?(Array) self.group_by = value end end if attributes.key?(:'message') self. = attributes[:'message'] end if attributes.key?(:'query') self.query = attributes[:'query'] end if attributes.key?(:'res_type') self.res_type = attributes[:'res_type'] end if attributes.key?(:'series') if (value = attributes[:'series']).is_a?(Array) self.series = value end end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'to_date') self.to_date = attributes[:'to_date'] end end |
Instance Attribute Details
#error ⇒ Object
Message indicating the errors if status is not ‘ok`.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 27 def error @error end |
#from_date ⇒ Object
Start of requested time window, milliseconds since Unix epoch.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 30 def from_date @from_date end |
#group_by ⇒ Object
List of tag keys on which to group.
33 34 35 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 33 def group_by @group_by end |
#message ⇒ Object
Message indicating ‘success` if status is `ok`.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 36 def end |
#query ⇒ Object
Query string
39 40 41 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 39 def query @query end |
#res_type ⇒ Object
Type of response.
42 43 44 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 42 def res_type @res_type end |
#series ⇒ Object
List of timeseries queried.
45 46 47 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 45 def series @series end |
#status ⇒ Object
Status of the query.
48 49 50 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 48 def status @status end |
#to_date ⇒ Object
End of requested time window, milliseconds since Unix epoch.
51 52 53 |
# File 'lib/datadog_api_client/v1/models/metrics_query_response.rb', line 51 def to_date @to_date end |