Skip to content

Commit 5294436

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b951844 of spec repo (DataDog#3136)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 08af4af commit 5294436

8 files changed

Lines changed: 564 additions & 1 deletion

.generator/schemas/v1/openapi.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24274,6 +24274,7 @@ components:
2427424274
- $ref: "#/components/schemas/ToplistWidgetDefinition"
2427524275
- $ref: "#/components/schemas/TopologyMapWidgetDefinition"
2427624276
- $ref: "#/components/schemas/TreeMapWidgetDefinition"
24277+
- $ref: "#/components/schemas/WildcardWidgetDefinition"
2427724278
WidgetDisplayType:
2427824279
description: Type of display to use for the request.
2427924280
enum:
@@ -25045,6 +25046,81 @@ components:
2504525046
x-enum-varnames:
2504625047
- TIMESERIES
2504725048
- TOPLIST
25049+
WildcardWidgetDefinition:
25050+
description: >-
25051+
Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations.
25052+
properties:
25053+
custom_links:
25054+
description: List of custom links.
25055+
items:
25056+
$ref: "#/components/schemas/WidgetCustomLink"
25057+
type: array
25058+
requests:
25059+
description: List of data requests for the wildcard widget.
25060+
example: [{"formulas": ["formula": "query1"], "queries": [{"aggregator": "avg", "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {env}"}], "response_format": "scalar"}]
25061+
items:
25062+
$ref: "#/components/schemas/WildcardWidgetRequest"
25063+
type: array
25064+
specification:
25065+
$ref: "#/components/schemas/WildcardWidgetSpecification"
25066+
time:
25067+
$ref: "#/components/schemas/WidgetTime"
25068+
title:
25069+
description: Title of the widget.
25070+
type: string
25071+
title_align:
25072+
$ref: "#/components/schemas/WidgetTextAlign"
25073+
title_size:
25074+
description: Size of the title.
25075+
type: string
25076+
type:
25077+
$ref: "#/components/schemas/WildcardWidgetDefinitionType"
25078+
required:
25079+
- type
25080+
- requests
25081+
- specification
25082+
type: object
25083+
WildcardWidgetDefinitionType:
25084+
default: wildcard
25085+
description: Type of the wildcard widget.
25086+
enum:
25087+
- wildcard
25088+
example: wildcard
25089+
type: string
25090+
x-enum-varnames:
25091+
- WILDCARD
25092+
WildcardWidgetRequest:
25093+
description: >-
25094+
Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms.
25095+
oneOf:
25096+
- $ref: "#/components/schemas/TreeMapWidgetRequest"
25097+
- $ref: "#/components/schemas/TimeseriesWidgetRequest"
25098+
- $ref: "#/components/schemas/ListStreamWidgetRequest"
25099+
- $ref: "#/components/schemas/DistributionWidgetRequest"
25100+
WildcardWidgetSpecification:
25101+
description: >-
25102+
Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
25103+
properties:
25104+
contents:
25105+
description: The Vega or Vega-Lite JSON specification object.
25106+
example: {"$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": {"name": "table1"}, "description": "A simple bar chart", "encoding": {"x": {"field": "env", "sort": "-y", "type": "nominal"}, "y": {"field": "query1", "type": "quantitative"}}, "mark": "bar"}
25107+
type: object
25108+
type:
25109+
$ref: "#/components/schemas/WildcardWidgetSpecificationType"
25110+
required:
25111+
- type
25112+
- contents
25113+
type: object
25114+
WildcardWidgetSpecificationType:
25115+
description: Type of specification used by the wildcard widget.
25116+
enum:
25117+
- vega
25118+
- vega-lite
25119+
example: vega-lite
25120+
type: string
25121+
x-enum-varnames:
25122+
- VEGA
25123+
- VEGA_LITE
2504825124
securitySchemes:
2504925125
AuthZ:
2505025126
description: This API uses OAuth 2 with the implicit grant flow.

lib/datadog_api_client/inflector.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,11 @@ def overrides
10301030
"v1.widget_vertical_align" => "WidgetVerticalAlign",
10311031
"v1.widget_view_mode" => "WidgetViewMode",
10321032
"v1.widget_viz_type" => "WidgetVizType",
1033+
"v1.wildcard_widget_definition" => "WildcardWidgetDefinition",
1034+
"v1.wildcard_widget_definition_type" => "WildcardWidgetDefinitionType",
1035+
"v1.wildcard_widget_request" => "WildcardWidgetRequest",
1036+
"v1.wildcard_widget_specification" => "WildcardWidgetSpecification",
1037+
"v1.wildcard_widget_specification_type" => "WildcardWidgetSpecificationType",
10331038
"v2.account_filtering_config" => "AccountFilteringConfig",
10341039
"v2.action_connection_attributes" => "ActionConnectionAttributes",
10351040
"v2.action_connection_attributes_update" => "ActionConnectionAttributesUpdate",

lib/datadog_api_client/v1/models/widget_definition.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def openapi_one_of
6161
:'TimeseriesWidgetDefinition',
6262
:'ToplistWidgetDefinition',
6363
:'TopologyMapWidgetDefinition',
64-
:'TreeMapWidgetDefinition'
64+
:'TreeMapWidgetDefinition',
65+
:'WildcardWidgetDefinition'
6566
]
6667
end
6768
# Builds the object
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations.
21+
class WildcardWidgetDefinition
22+
include BaseGenericModel
23+
24+
# List of custom links.
25+
attr_accessor :custom_links
26+
27+
# List of data requests for the wildcard widget.
28+
attr_reader :requests
29+
30+
# Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
31+
attr_reader :specification
32+
33+
# Time setting for the widget.
34+
attr_accessor :time
35+
36+
# Title of the widget.
37+
attr_accessor :title
38+
39+
# How to align the text on the widget.
40+
attr_accessor :title_align
41+
42+
# Size of the title.
43+
attr_accessor :title_size
44+
45+
# Type of the wildcard widget.
46+
attr_reader :type
47+
48+
attr_accessor :additional_properties
49+
50+
# Attribute mapping from ruby-style variable name to JSON key.
51+
# @!visibility private
52+
def self.attribute_map
53+
{
54+
:'custom_links' => :'custom_links',
55+
:'requests' => :'requests',
56+
:'specification' => :'specification',
57+
:'time' => :'time',
58+
:'title' => :'title',
59+
:'title_align' => :'title_align',
60+
:'title_size' => :'title_size',
61+
:'type' => :'type'
62+
}
63+
end
64+
65+
# Attribute type mapping.
66+
# @!visibility private
67+
def self.openapi_types
68+
{
69+
:'custom_links' => :'Array<WidgetCustomLink>',
70+
:'requests' => :'Array<WildcardWidgetRequest>',
71+
:'specification' => :'WildcardWidgetSpecification',
72+
:'time' => :'WidgetTime',
73+
:'title' => :'String',
74+
:'title_align' => :'WidgetTextAlign',
75+
:'title_size' => :'String',
76+
:'type' => :'WildcardWidgetDefinitionType'
77+
}
78+
end
79+
80+
# Initializes the object
81+
# @param attributes [Hash] Model attributes in the form of hash
82+
# @!visibility private
83+
def initialize(attributes = {})
84+
if (!attributes.is_a?(Hash))
85+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WildcardWidgetDefinition` initialize method"
86+
end
87+
88+
self.additional_properties = {}
89+
# check to see if the attribute exists and convert string to symbol for hash key
90+
attributes = attributes.each_with_object({}) { |(k, v), h|
91+
if (!self.class.attribute_map.key?(k.to_sym))
92+
self.additional_properties[k.to_sym] = v
93+
else
94+
h[k.to_sym] = v
95+
end
96+
}
97+
98+
if attributes.key?(:'custom_links')
99+
if (value = attributes[:'custom_links']).is_a?(Array)
100+
self.custom_links = value
101+
end
102+
end
103+
104+
if attributes.key?(:'requests')
105+
if (value = attributes[:'requests']).is_a?(Array)
106+
self.requests = value
107+
end
108+
end
109+
110+
if attributes.key?(:'specification')
111+
self.specification = attributes[:'specification']
112+
end
113+
114+
if attributes.key?(:'time')
115+
self.time = attributes[:'time']
116+
end
117+
118+
if attributes.key?(:'title')
119+
self.title = attributes[:'title']
120+
end
121+
122+
if attributes.key?(:'title_align')
123+
self.title_align = attributes[:'title_align']
124+
end
125+
126+
if attributes.key?(:'title_size')
127+
self.title_size = attributes[:'title_size']
128+
end
129+
130+
if attributes.key?(:'type')
131+
self.type = attributes[:'type']
132+
end
133+
end
134+
135+
# Check to see if the all the properties in the model are valid
136+
# @return true if the model is valid
137+
# @!visibility private
138+
def valid?
139+
return false if @requests.nil?
140+
return false if @specification.nil?
141+
return false if @type.nil?
142+
true
143+
end
144+
145+
# Custom attribute writer method with validation
146+
# @param requests [Object] Object to be assigned
147+
# @!visibility private
148+
def requests=(requests)
149+
if requests.nil?
150+
fail ArgumentError, 'invalid value for "requests", requests cannot be nil.'
151+
end
152+
@requests = requests
153+
end
154+
155+
# Custom attribute writer method with validation
156+
# @param specification [Object] Object to be assigned
157+
# @!visibility private
158+
def specification=(specification)
159+
if specification.nil?
160+
fail ArgumentError, 'invalid value for "specification", specification cannot be nil.'
161+
end
162+
@specification = specification
163+
end
164+
165+
# Custom attribute writer method with validation
166+
# @param type [Object] Object to be assigned
167+
# @!visibility private
168+
def type=(type)
169+
if type.nil?
170+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
171+
end
172+
@type = type
173+
end
174+
175+
# Returns the object in the form of hash, with additionalProperties support.
176+
# @return [Hash] Returns the object in the form of hash
177+
# @!visibility private
178+
def to_hash
179+
hash = {}
180+
self.class.attribute_map.each_pair do |attr, param|
181+
value = self.send(attr)
182+
if value.nil?
183+
is_nullable = self.class.openapi_nullable.include?(attr)
184+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
185+
end
186+
187+
hash[param] = _to_hash(value)
188+
end
189+
self.additional_properties.each_pair do |attr, value|
190+
hash[attr] = value
191+
end
192+
hash
193+
end
194+
195+
# Checks equality by comparing each attribute.
196+
# @param o [Object] Object to be compared
197+
# @!visibility private
198+
def ==(o)
199+
return true if self.equal?(o)
200+
self.class == o.class &&
201+
custom_links == o.custom_links &&
202+
requests == o.requests &&
203+
specification == o.specification &&
204+
time == o.time &&
205+
title == o.title &&
206+
title_align == o.title_align &&
207+
title_size == o.title_size &&
208+
type == o.type &&
209+
additional_properties == o.additional_properties
210+
end
211+
212+
# Calculates hash code according to all attributes.
213+
# @return [Integer] Hash code
214+
# @!visibility private
215+
def hash
216+
[custom_links, requests, specification, time, title, title_align, title_size, type, additional_properties].hash
217+
end
218+
end
219+
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=begin
2+
#Datadog API V1 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V1
20+
# Type of the wildcard widget.
21+
class WildcardWidgetDefinitionType
22+
include BaseEnumModel
23+
24+
WILDCARD = "wildcard".freeze
25+
end
26+
end

0 commit comments

Comments
 (0)