Class: DatadogAPIClient::V1::WidgetConditionalFormat
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::WidgetConditionalFormat
- Defined in:
- lib/datadog_api_client/v1/models/widget_conditional_format.rb
Overview
Define a conditional format for the widget.
Instance Attribute Summary collapse
-
#comparator ⇒ Object
Returns the value of attribute comparator.
-
#custom_bg_color ⇒ Object
Color palette to apply to the background, same values available as palette.
-
#custom_fg_color ⇒ Object
Color palette to apply to the foreground, same values available as palette.
-
#hide_value ⇒ Object
True hides values.
-
#image_url ⇒ Object
Displays an image as the background.
-
#metric ⇒ Object
Metric from the request to correlate this conditional format with.
-
#palette ⇒ Object
Returns the value of attribute palette.
-
#timeframe ⇒ Object
Defines the displayed timeframe.
-
#value ⇒ Object
Value for the comparator.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WidgetConditionalFormat
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ WidgetConditionalFormat
Initializes the object
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 98 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetConditionalFormat` 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::WidgetConditionalFormat`. 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?(:'comparator') self.comparator = attributes[:'comparator'] end if attributes.key?(:'custom_bg_color') self.custom_bg_color = attributes[:'custom_bg_color'] end if attributes.key?(:'custom_fg_color') self.custom_fg_color = attributes[:'custom_fg_color'] end if attributes.key?(:'hide_value') self.hide_value = attributes[:'hide_value'] end if attributes.key?(:'image_url') self.image_url = attributes[:'image_url'] end if attributes.key?(:'metric') self.metric = attributes[:'metric'] end if attributes.key?(:'palette') self.palette = attributes[:'palette'] end if attributes.key?(:'timeframe') self.timeframe = attributes[:'timeframe'] end if attributes.key?(:'value') self.value = attributes[:'value'] end end |
Instance Attribute Details
#comparator ⇒ Object
Returns the value of attribute comparator.
26 27 28 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 26 def comparator @comparator end |
#custom_bg_color ⇒ Object
Color palette to apply to the background, same values available as palette.
29 30 31 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 29 def custom_bg_color @custom_bg_color end |
#custom_fg_color ⇒ Object
Color palette to apply to the foreground, same values available as palette.
32 33 34 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 32 def custom_fg_color @custom_fg_color end |
#hide_value ⇒ Object
True hides values.
35 36 37 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 35 def hide_value @hide_value end |
#image_url ⇒ Object
Displays an image as the background.
38 39 40 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 38 def image_url @image_url end |
#metric ⇒ Object
Metric from the request to correlate this conditional format with.
41 42 43 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 41 def metric @metric end |
#palette ⇒ Object
Returns the value of attribute palette.
43 44 45 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 43 def palette @palette end |
#timeframe ⇒ Object
Defines the displayed timeframe.
46 47 48 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 46 def timeframe @timeframe end |
#value ⇒ Object
Value for the comparator.
49 50 51 |
# File 'lib/datadog_api_client/v1/models/widget_conditional_format.rb', line 49 def value @value end |