Class: DatadogAPIClient::V1::SLOWidgetDefinition

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

Overview

Use the SLO and uptime widget to track your SLOs (Service Level Objectives) and uptime on screenboards and timeboards.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SLOWidgetDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 102

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

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

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

  if attributes.key?(:'time_windows')
    if (value = attributes[:'time_windows']).is_a?(Array)
      self.time_windows = value
    end
  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 = 'slo'
  end

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

  if attributes.key?(:'view_type')
    self.view_type = attributes[:'view_type']
  else
    self.view_type = 'detail'
  end
end

Instance Attribute Details

#global_time_targetObject

Defined global time target.



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

def global_time_target
  @global_time_target
end

#show_error_budgetObject

Defined error budget.



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

def show_error_budget
  @show_error_budget
end

#slo_idObject

ID of the SLO displayed.



33
34
35
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 33

def slo_id
  @slo_id
end

#time_windowsObject

Times being monitored.



36
37
38
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 36

def time_windows
  @time_windows
end

#titleObject

Title of the widget.



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

def title
  @title
end

#title_alignObject

Returns the value of attribute title_align.



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

def title_align
  @title_align
end

#title_sizeObject

Size of the title.



44
45
46
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 44

def title_size
  @title_size
end

#typeObject

Returns the value of attribute type.



46
47
48
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 46

def type
  @type
end

#view_modeObject

Returns the value of attribute view_mode.



48
49
50
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 48

def view_mode
  @view_mode
end

#view_typeObject

Type of view displayed by the widget.



51
52
53
# File 'lib/datadog_api_client/v1/models/slo_widget_definition.rb', line 51

def view_type
  @view_type
end