Class: DatadogAPIClient::V1::LogStreamWidgetDefinition

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

Overview

The Log Stream displays a log flow matching the defined query. Only available on FREE layout dashboards.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogStreamWidgetDefinition

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/datadog_api_client/v1/models/log_stream_widget_definition.rb', line 115

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

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

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

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

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

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

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

  if attributes.key?(:'sort')
    self.sort = attributes[:'sort']
  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 = 'log_stream'
  end
end

Instance Attribute Details

#columnsObject

Which columns to display on the widget.



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

def columns
  @columns
end

#indexesObject

An array of index names to query in the stream. Use [] to query all indexes at once.



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

def indexes
  @indexes
end

#logsetObject

ID of the log set to use.



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

def logset
  @logset
end

#message_displayObject

Returns the value of attribute message_display.



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

def message_display
  @message_display
end

#queryObject

Query to filter the log stream with.



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

def query
  @query
end

#show_date_columnObject

Whether to show the date column or not



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

def show_date_column
  @show_date_column
end

#show_message_columnObject

Whether to show the message column or not



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

def show_message_column
  @show_message_column
end

#sortObject

Returns the value of attribute sort.



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

def sort
  @sort
end

#timeObject

Returns the value of attribute time.



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

def time
  @time
end

#titleObject

Title of the widget.



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

def title
  @title
end

#title_alignObject

Returns the value of attribute title_align.



53
54
55
# File 'lib/datadog_api_client/v1/models/log_stream_widget_definition.rb', line 53

def title_align
  @title_align
end

#title_sizeObject

Size of the title.



56
57
58
# File 'lib/datadog_api_client/v1/models/log_stream_widget_definition.rb', line 56

def title_size
  @title_size
end

#typeObject

Returns the value of attribute type.



58
59
60
# File 'lib/datadog_api_client/v1/models/log_stream_widget_definition.rb', line 58

def type
  @type
end