Class: DatadogAPIClient::V1::QueryValueWidgetDefinition
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::QueryValueWidgetDefinition
- Defined in:
- lib/datadog_api_client/v1/models/query_value_widget_definition.rb
Overview
Query values display the current value of a given metric, APM, or log query.
Instance Attribute Summary collapse
-
#autoscale ⇒ Object
Whether to use auto-scaling or not.
-
#custom_links ⇒ Object
List of custom links.
-
#custom_unit ⇒ Object
Display a unit of your choice on the widget.
-
#precision ⇒ Object
Number of decimals to show.
-
#requests ⇒ Object
Widget definition.
-
#text_align ⇒ Object
Returns the value of attribute text_align.
-
#time ⇒ Object
Returns the value of attribute time.
-
#title ⇒ Object
Title of your widget.
-
#title_align ⇒ Object
Returns the value of attribute title_align.
-
#title_size ⇒ Object
Size of the title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ QueryValueWidgetDefinition
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ QueryValueWidgetDefinition
Initializes the object
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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 106 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::QueryValueWidgetDefinition` 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::QueryValueWidgetDefinition`. 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?(:'autoscale') self.autoscale = attributes[:'autoscale'] end if attributes.key?(:'custom_links') if (value = attributes[:'custom_links']).is_a?(Array) self.custom_links = value end end if attributes.key?(:'custom_unit') self.custom_unit = attributes[:'custom_unit'] end if attributes.key?(:'precision') self.precision = attributes[:'precision'] end if attributes.key?(:'requests') if (value = attributes[:'requests']).is_a?(Array) self.requests = value end end if attributes.key?(:'text_align') self.text_align = attributes[:'text_align'] end if attributes.key?(:'time') self.time = attributes[:'time'] end if attributes.key?(:'title') self.title = attributes[:'title'] end if attributes.key?(:'title_align') self.title_align = attributes[:'title_align'] end if attributes.key?(:'title_size') self.title_size = attributes[:'title_size'] end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'query_value' end end |
Instance Attribute Details
#autoscale ⇒ Object
Whether to use auto-scaling or not.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 27 def autoscale @autoscale end |
#custom_links ⇒ Object
List of custom links.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 30 def custom_links @custom_links end |
#custom_unit ⇒ Object
Display a unit of your choice on the widget.
33 34 35 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 33 def custom_unit @custom_unit end |
#precision ⇒ Object
Number of decimals to show. If not defined, the widget uses the raw value.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 36 def precision @precision end |
#requests ⇒ Object
Widget definition.
39 40 41 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 39 def requests @requests end |
#text_align ⇒ Object
Returns the value of attribute text_align.
41 42 43 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 41 def text_align @text_align end |
#time ⇒ Object
Returns the value of attribute time.
43 44 45 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 43 def time @time end |
#title ⇒ Object
Title of your widget.
46 47 48 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 46 def title @title end |
#title_align ⇒ Object
Returns the value of attribute title_align.
48 49 50 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 48 def title_align @title_align end |
#title_size ⇒ Object
Size of the title.
51 52 53 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 51 def title_size @title_size end |
#type ⇒ Object
Returns the value of attribute type.
53 54 55 |
# File 'lib/datadog_api_client/v1/models/query_value_widget_definition.rb', line 53 def type @type end |