Class: DatadogAPIClient::V1::GroupWidgetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v1/models/group_widget_definition.rb

Overview

The groups widget allows you to keep similar graphs together on your timeboard. Each group has a custom header, can hold one to many graphs, and is collapsible.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ GroupWidgetDefinition

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    attributes Model attributes in the form of hash



92
93
94
95
96
97
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
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 92

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GroupWidgetDefinition` 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::GroupWidgetDefinition`. 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?(:'background_color')
    self.background_color = attributes[:'background_color']
  end

  if attributes.key?(:'banner_img')
    self.banner_img = attributes[:'banner_img']
  end

  if attributes.key?(:'layout_type')
    self.layout_type = attributes[:'layout_type']
  end

  if attributes.key?(:'show_title')
    self.show_title = attributes[:'show_title']
  else
    self.show_title = true
  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?(:'type')
    self.type = attributes[:'type']
  else
    self.type = 'group'
  end

  if attributes.key?(:'widgets')
    if (value = attributes[:'widgets']).is_a?(Array)
      self.widgets = value
    end
  end
end

Instance Attribute Details

#background_colorObject

Background color of the group title.



27
28
29
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 27

def background_color
  @background_color
end

URL of image to display as a banner for the group.



30
31
32
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 30

def banner_img
  @banner_img
end

#layout_typeObject

Returns the value of attribute layout_type.



32
33
34
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 32

def layout_type
  @layout_type
end

#show_titleObject

Whether to show the title or not.



35
36
37
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 35

def show_title
  @show_title
end

#titleObject

Title of the widget.



38
39
40
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 38

def title
  @title
end

#title_alignObject

Returns the value of attribute title_align.



40
41
42
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 40

def title_align
  @title_align
end

#typeObject

Returns the value of attribute type.



42
43
44
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 42

def type
  @type
end

#widgetsObject

List of widget groups.



45
46
47
# File 'lib/datadog_api_client/v1/models/group_widget_definition.rb', line 45

def widgets
  @widgets
end