Class: DatadogAPIClient::V1::SLOThreshold
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::SLOThreshold
- Defined in:
- lib/datadog_api_client/v1/models/slo_threshold.rb
Overview
SLO thresholds (target and optionally warning) for a single time window.
Instance Attribute Summary collapse
-
#target ⇒ Object
The target value for the service level indicator within the corresponding timeframe.
-
#target_display ⇒ Object
A string representation of the target that indicates its precision.
-
#timeframe ⇒ Object
Returns the value of attribute timeframe.
-
#warning ⇒ Object
The warning value for the service level objective.
-
#warning_display ⇒ Object
A string representation of the warning target (see the description of the ‘target_display` field for details).
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SLOThreshold
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ SLOThreshold
Initializes the object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 79 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SLOThreshold` 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::SLOThreshold`. 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?(:'target') self.target = attributes[:'target'] end if attributes.key?(:'target_display') self.target_display = attributes[:'target_display'] end if attributes.key?(:'timeframe') self.timeframe = attributes[:'timeframe'] end if attributes.key?(:'warning') self.warning = attributes[:'warning'] end if attributes.key?(:'warning_display') self.warning_display = attributes[:'warning_display'] end end |
Instance Attribute Details
#target ⇒ Object
The target value for the service level indicator within the corresponding timeframe.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 27 def target @target end |
#target_display ⇒ Object
A string representation of the target that indicates its precision. It uses trailing zeros to show significant decimal places (for example ‘98.00`). Always included in service level objective responses. Ignored in create/update requests.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 30 def target_display @target_display end |
#timeframe ⇒ Object
Returns the value of attribute timeframe.
32 33 34 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 32 def timeframe @timeframe end |
#warning ⇒ Object
The warning value for the service level objective.
35 36 37 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 35 def warning @warning end |
#warning_display ⇒ Object
A string representation of the warning target (see the description of the ‘target_display` field for details). Included in service level objective responses if a warning target exists. Ignored in create/update requests.
38 39 40 |
# File 'lib/datadog_api_client/v1/models/slo_threshold.rb', line 38 def warning_display @warning_display end |