Class: DatadogAPIClient::V1::AlertGraphWidgetDefinition

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

Overview

Alert graphs are timeseries graphs showing the current status of any monitor defined on your system.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AlertGraphWidgetDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 86

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

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

Instance Attribute Details

#alert_idObject

ID of the alert to use in the widget.



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

def alert_id
  @alert_id
end

#timeObject

Returns the value of attribute time.



29
30
31
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 29

def time
  @time
end

#titleObject

The title of the widget.



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

def title
  @title
end

#title_alignObject

Returns the value of attribute title_align.



34
35
36
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 34

def title_align
  @title_align
end

#title_sizeObject

Size of the title.



37
38
39
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 37

def title_size
  @title_size
end

#typeObject

Returns the value of attribute type.



39
40
41
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 39

def type
  @type
end

#viz_typeObject

Returns the value of attribute viz_type.



41
42
43
# File 'lib/datadog_api_client/v1/models/alert_graph_widget_definition.rb', line 41

def viz_type
  @viz_type
end