-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathgeomap_widget_request.rb
More file actions
235 lines (194 loc) · 6.99 KB
/
geomap_widget_request.rb
File metadata and controls
235 lines (194 loc) · 6.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
=begin
#Datadog API V1 Collection
#Collection of all Datadog Public endpoints.
The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.
=end
require 'date'
require 'time'
module DatadogAPIClient::V1
# An updated geomap widget.
class GeomapWidgetRequest
include BaseGenericModel
# Widget columns.
attr_accessor :columns
# Threshold (numeric) conditional formatting rules may be used by a regions layer.
attr_accessor :conditional_formats
# List of formulas that operate on queries.
attr_accessor :formulas
# The log query.
attr_accessor :log_query
# The widget metrics query. Deprecated - Use `queries` and `formulas` instead.
attr_accessor :q
# List of queries that can be returned directly or used in formulas.
attr_accessor :queries
# Updated list stream widget.
attr_accessor :query
# Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets.
attr_accessor :response_format
# The log query.
attr_accessor :rum_query
# The log query.
attr_accessor :security_query
# The controls for sorting the widget.
attr_accessor :sort
# The style to apply to the request for points layer.
attr_accessor :style
# Text formatting rules may be used by a points layer.
attr_accessor :text_formats
attr_accessor :additional_properties
# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'columns' => :'columns',
:'conditional_formats' => :'conditional_formats',
:'formulas' => :'formulas',
:'log_query' => :'log_query',
:'q' => :'q',
:'queries' => :'queries',
:'query' => :'query',
:'response_format' => :'response_format',
:'rum_query' => :'rum_query',
:'security_query' => :'security_query',
:'sort' => :'sort',
:'style' => :'style',
:'text_formats' => :'text_formats'
}
end
# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'columns' => :'Array<ListStreamColumn>',
:'conditional_formats' => :'Array<WidgetConditionalFormat>',
:'formulas' => :'Array<WidgetFormula>',
:'log_query' => :'LogQueryDefinition',
:'q' => :'String',
:'queries' => :'Array<FormulaAndFunctionQueryDefinition>',
:'query' => :'ListStreamQuery',
:'response_format' => :'FormulaAndFunctionResponseFormat',
:'rum_query' => :'LogQueryDefinition',
:'security_query' => :'LogQueryDefinition',
:'sort' => :'WidgetSortBy',
:'style' => :'GeomapWidgetRequestStyle',
:'text_formats' => :'Array<TableWidgetTextFormatRule>'
}
end
# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetRequest` initialize method"
end
self.additional_properties = {}
# 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))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}
if attributes.key?(:'columns')
if (value = attributes[:'columns']).is_a?(Array)
self.columns = value
end
end
if attributes.key?(:'conditional_formats')
if (value = attributes[:'conditional_formats']).is_a?(Array)
self.conditional_formats = value
end
end
if attributes.key?(:'formulas')
if (value = attributes[:'formulas']).is_a?(Array)
self.formulas = value
end
end
if attributes.key?(:'log_query')
self.log_query = attributes[:'log_query']
end
if attributes.key?(:'q')
self.q = attributes[:'q']
end
if attributes.key?(:'queries')
if (value = attributes[:'queries']).is_a?(Array)
self.queries = value
end
end
if attributes.key?(:'query')
self.query = attributes[:'query']
end
if attributes.key?(:'response_format')
self.response_format = attributes[:'response_format']
end
if attributes.key?(:'rum_query')
self.rum_query = attributes[:'rum_query']
end
if attributes.key?(:'security_query')
self.security_query = attributes[:'security_query']
end
if attributes.key?(:'sort')
self.sort = attributes[:'sort']
end
if attributes.key?(:'style')
self.style = attributes[:'style']
end
if attributes.key?(:'text_formats')
if (value = attributes[:'text_formats']).is_a?(Array)
self.text_formats = value
end
end
end
# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end
hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end
# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
columns == o.columns &&
conditional_formats == o.conditional_formats &&
formulas == o.formulas &&
log_query == o.log_query &&
q == o.q &&
queries == o.queries &&
query == o.query &&
response_format == o.response_format &&
rum_query == o.rum_query &&
security_query == o.security_query &&
sort == o.sort &&
style == o.style &&
text_formats == o.text_formats &&
additional_properties == o.additional_properties
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[columns, conditional_formats, formulas, log_query, q, queries, query, response_format, rum_query, security_query, sort, style, text_formats, additional_properties].hash
end
end
end