Class: DatadogAPIClient::V1::WidgetLayout
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::WidgetLayout
- Defined in:
- lib/datadog_api_client/v1/models/widget_layout.rb
Overview
The layout for a widget on a ‘free` or **new dashboard layout** dashboard.
Instance Attribute Summary collapse
-
#height ⇒ Object
The height of the widget.
-
#is_column_break ⇒ Object
Whether the widget should be the first one on the second column in high density or not.
-
#width ⇒ Object
The width of the widget.
-
#x ⇒ Object
The position of the widget on the x (horizontal) axis.
-
#y ⇒ Object
The position of the widget on the y (vertical) axis.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WidgetLayout
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ WidgetLayout
Initializes the object
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 112 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 80 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WidgetLayout` 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::WidgetLayout`. 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?(:'height') self.height = attributes[:'height'] end if attributes.key?(:'is_column_break') self.is_column_break = attributes[:'is_column_break'] end if attributes.key?(:'width') self.width = attributes[:'width'] end if attributes.key?(:'x') self.x = attributes[:'x'] end if attributes.key?(:'y') self.y = attributes[:'y'] end end |
Instance Attribute Details
#height ⇒ Object
The height of the widget. Should be a non-negative integer.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 27 def height @height end |
#is_column_break ⇒ Object
Whether the widget should be the first one on the second column in high density or not. Note: Only for the **new dashboard layout** and only one widget in the dashboard should have this property set to ‘true`.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 30 def is_column_break @is_column_break end |
#width ⇒ Object
The width of the widget. Should be a non-negative integer.
33 34 35 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 33 def width @width end |
#x ⇒ Object
The position of the widget on the x (horizontal) axis. Should be a non-negative integer.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 36 def x @x end |
#y ⇒ Object
The position of the widget on the y (vertical) axis. Should be a non-negative integer.
39 40 41 |
# File 'lib/datadog_api_client/v1/models/widget_layout.rb', line 39 def y @y end |