Class: DatadogAPIClient::V1::NoteWidgetDefinition

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

Overview

The notes and links widget is similar to free text widget, but allows for more formatting options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ NoteWidgetDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/datadog_api_client/v1/models/note_widget_definition.rb', line 101

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

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

  if attributes.key?(:'has_padding')
    self.has_padding = attributes[:'has_padding']
  else
    self.has_padding = true
  end

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

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

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

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

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  else
    self.type = 'note'
  end

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

Instance Attribute Details

#background_colorObject

Background color of the note.



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

def background_color
  @background_color
end

#contentObject

Content of the note.



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

def content
  @content
end

#font_sizeObject

Size of the text.



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

def font_size
  @font_size
end

#has_paddingObject

Whether to add padding or not.



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

def has_padding
  @has_padding
end

#show_tickObject

Whether to show a tick or not.



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

def show_tick
  @show_tick
end

#text_alignObject

Returns the value of attribute text_align.



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

def text_align
  @text_align
end

#tick_edgeObject

Returns the value of attribute tick_edge.



43
44
45
# File 'lib/datadog_api_client/v1/models/note_widget_definition.rb', line 43

def tick_edge
  @tick_edge
end

#tick_posObject

Where to position the tick on an edge.



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

def tick_pos
  @tick_pos
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#vertical_alignObject

Returns the value of attribute vertical_align.



50
51
52
# File 'lib/datadog_api_client/v1/models/note_widget_definition.rb', line 50

def vertical_align
  @vertical_align
end