Class: DatadogAPIClient::V1::GraphSnapshot
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::GraphSnapshot
- Defined in:
- lib/datadog_api_client/v1/models/graph_snapshot.rb
Overview
Object representing a graph snapshot.
Instance Attribute Summary collapse
-
#graph_def ⇒ Object
A JSON document defining the graph.
-
#metric_query ⇒ Object
The metric query.
-
#snapshot_url ⇒ Object
URL of your [graph snapshot](docs.datadoghq.com/metrics/explorer/#snapshot).
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ GraphSnapshot
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ GraphSnapshot
Initializes the object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/datadog_api_client/v1/models/graph_snapshot.rb', line 70 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GraphSnapshot` 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::GraphSnapshot`. 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?(:'graph_def') self.graph_def = attributes[:'graph_def'] end if attributes.key?(:'metric_query') self.metric_query = attributes[:'metric_query'] end if attributes.key?(:'snapshot_url') self.snapshot_url = attributes[:'snapshot_url'] end end |
Instance Attribute Details
#graph_def ⇒ Object
A JSON document defining the graph. ‘graph_def` can be used instead of `metric_query`. The JSON document uses the [grammar defined here](docs.datadoghq.com/graphing/graphing_json/#grammar) and should be formatted to a single line then URL encoded.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/graph_snapshot.rb', line 27 def graph_def @graph_def end |
#metric_query ⇒ Object
The metric query. One of ‘metric_query` or `graph_def` is required.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/graph_snapshot.rb', line 30 def metric_query @metric_query end |
#snapshot_url ⇒ Object
URL of your [graph snapshot](docs.datadoghq.com/metrics/explorer/#snapshot).
33 34 35 |
# File 'lib/datadog_api_client/v1/models/graph_snapshot.rb', line 33 def snapshot_url @snapshot_url end |