Skip to content

Commit 9241462

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f52daeb of spec repo
1 parent 8e84a09 commit 9241462

8 files changed

Lines changed: 72 additions & 76 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,6 +2986,8 @@ components:
29862986
type: string
29872987
group_by:
29882988
description: Array of fields to group results by.
2989+
example:
2990+
- "resource_name"
29892991
items:
29902992
description: Field to group results by.
29912993
example: "resource_name"
@@ -3023,6 +3025,8 @@ components:
30233025
- name
30243026
- service
30253027
- stat
3028+
- operation_name
3029+
- group_by
30263030
type: object
30273031
FormulaAndFunctionCloudCostDataSource:
30283032
description: Data source for Cloud Cost queries.

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4447,6 +4447,8 @@ components:
44474447
type: string
44484448
group_by:
44494449
description: Tag keys to group results by.
4450+
example:
4451+
- resource_name
44504452
items:
44514453
description: A tag key to group by.
44524454
example: resource_name
@@ -4484,6 +4486,8 @@ components:
44844486
- env
44854487
- service
44864488
- stat
4489+
- operation_name
4490+
- group_by
44874491
type: object
44884492
ApmRetentionFilterType:
44894493
default: apm_retention_filter

api/datadogV1/model_formula_and_function_apm_resource_stats_query_definition.go

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ type FormulaAndFunctionApmResourceStatsQueryDefinition struct {
1919
// APM environment.
2020
Env string `json:"env"`
2121
// Array of fields to group results by.
22-
GroupBy []string `json:"group_by,omitempty"`
22+
GroupBy []string `json:"group_by"`
2323
// Name of this query to use in formulas.
2424
Name string `json:"name"`
2525
// Name of operation on service.
26-
OperationName *string `json:"operation_name,omitempty"`
26+
OperationName string `json:"operation_name"`
2727
// Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog
2828
PrimaryTagName *string `json:"primary_tag_name,omitempty"`
2929
// Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified.
@@ -43,11 +43,13 @@ type FormulaAndFunctionApmResourceStatsQueryDefinition struct {
4343
// This constructor will assign default values to properties that have it defined,
4444
// and makes sure properties required by API are set, but the set of arguments
4545
// will change when the set of required properties is changed.
46-
func NewFormulaAndFunctionApmResourceStatsQueryDefinition(dataSource FormulaAndFunctionApmResourceStatsDataSource, env string, name string, service string, stat FormulaAndFunctionApmResourceStatName) *FormulaAndFunctionApmResourceStatsQueryDefinition {
46+
func NewFormulaAndFunctionApmResourceStatsQueryDefinition(dataSource FormulaAndFunctionApmResourceStatsDataSource, env string, groupBy []string, name string, operationName string, service string, stat FormulaAndFunctionApmResourceStatName) *FormulaAndFunctionApmResourceStatsQueryDefinition {
4747
this := FormulaAndFunctionApmResourceStatsQueryDefinition{}
4848
this.DataSource = dataSource
4949
this.Env = env
50+
this.GroupBy = groupBy
5051
this.Name = name
52+
this.OperationName = operationName
5153
this.Service = service
5254
this.Stat = stat
5355
return &this
@@ -135,30 +137,25 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetEnv(v string) {
135137
o.Env = v
136138
}
137139

138-
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
140+
// GetGroupBy returns the GroupBy field value.
139141
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetGroupBy() []string {
140-
if o == nil || o.GroupBy == nil {
142+
if o == nil {
141143
var ret []string
142144
return ret
143145
}
144146
return o.GroupBy
145147
}
146148

147-
// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
149+
// GetGroupByOk returns a tuple with the GroupBy field value
148150
// and a boolean to check if the value has been set.
149151
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetGroupByOk() (*[]string, bool) {
150-
if o == nil || o.GroupBy == nil {
152+
if o == nil {
151153
return nil, false
152154
}
153155
return &o.GroupBy, true
154156
}
155157

156-
// HasGroupBy returns a boolean if a field has been set.
157-
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) HasGroupBy() bool {
158-
return o != nil && o.GroupBy != nil
159-
}
160-
161-
// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field.
158+
// SetGroupBy sets field value.
162159
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetGroupBy(v []string) {
163160
o.GroupBy = v
164161
}
@@ -186,32 +183,27 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetName(v string) {
186183
o.Name = v
187184
}
188185

189-
// GetOperationName returns the OperationName field value if set, zero value otherwise.
186+
// GetOperationName returns the OperationName field value.
190187
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetOperationName() string {
191-
if o == nil || o.OperationName == nil {
188+
if o == nil {
192189
var ret string
193190
return ret
194191
}
195-
return *o.OperationName
192+
return o.OperationName
196193
}
197194

198-
// GetOperationNameOk returns a tuple with the OperationName field value if set, nil otherwise
195+
// GetOperationNameOk returns a tuple with the OperationName field value
199196
// and a boolean to check if the value has been set.
200197
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) GetOperationNameOk() (*string, bool) {
201-
if o == nil || o.OperationName == nil {
198+
if o == nil {
202199
return nil, false
203200
}
204-
return o.OperationName, true
201+
return &o.OperationName, true
205202
}
206203

207-
// HasOperationName returns a boolean if a field has been set.
208-
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) HasOperationName() bool {
209-
return o != nil && o.OperationName != nil
210-
}
211-
212-
// SetOperationName gets a reference to the given string and assigns it to the OperationName field.
204+
// SetOperationName sets field value.
213205
func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetOperationName(v string) {
214-
o.OperationName = &v
206+
o.OperationName = v
215207
}
216208

217209
// GetPrimaryTagName returns the PrimaryTagName field value if set, zero value otherwise.
@@ -355,13 +347,9 @@ func (o FormulaAndFunctionApmResourceStatsQueryDefinition) MarshalJSON() ([]byte
355347
}
356348
toSerialize["data_source"] = o.DataSource
357349
toSerialize["env"] = o.Env
358-
if o.GroupBy != nil {
359-
toSerialize["group_by"] = o.GroupBy
360-
}
350+
toSerialize["group_by"] = o.GroupBy
361351
toSerialize["name"] = o.Name
362-
if o.OperationName != nil {
363-
toSerialize["operation_name"] = o.OperationName
364-
}
352+
toSerialize["operation_name"] = o.OperationName
365353
if o.PrimaryTagName != nil {
366354
toSerialize["primary_tag_name"] = o.PrimaryTagName
367355
}
@@ -386,9 +374,9 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
386374
CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
387375
DataSource *FormulaAndFunctionApmResourceStatsDataSource `json:"data_source"`
388376
Env *string `json:"env"`
389-
GroupBy []string `json:"group_by,omitempty"`
377+
GroupBy *[]string `json:"group_by"`
390378
Name *string `json:"name"`
391-
OperationName *string `json:"operation_name,omitempty"`
379+
OperationName *string `json:"operation_name"`
392380
PrimaryTagName *string `json:"primary_tag_name,omitempty"`
393381
PrimaryTagValue *string `json:"primary_tag_value,omitempty"`
394382
ResourceName *string `json:"resource_name,omitempty"`
@@ -404,9 +392,15 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
404392
if all.Env == nil {
405393
return fmt.Errorf("required field env missing")
406394
}
395+
if all.GroupBy == nil {
396+
return fmt.Errorf("required field group_by missing")
397+
}
407398
if all.Name == nil {
408399
return fmt.Errorf("required field name missing")
409400
}
401+
if all.OperationName == nil {
402+
return fmt.Errorf("required field operation_name missing")
403+
}
410404
if all.Service == nil {
411405
return fmt.Errorf("required field service missing")
412406
}
@@ -428,9 +422,9 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
428422
o.DataSource = *all.DataSource
429423
}
430424
o.Env = *all.Env
431-
o.GroupBy = all.GroupBy
425+
o.GroupBy = *all.GroupBy
432426
o.Name = *all.Name
433-
o.OperationName = all.OperationName
427+
o.OperationName = *all.OperationName
434428
o.PrimaryTagName = all.PrimaryTagName
435429
o.PrimaryTagValue = all.PrimaryTagValue
436430
o.ResourceName = all.ResourceName

api/datadogV2/model_apm_resource_stats_query.go

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ type ApmResourceStatsQuery struct {
1717
// The environment to query.
1818
Env string `json:"env"`
1919
// Tag keys to group results by.
20-
GroupBy []string `json:"group_by,omitempty"`
20+
GroupBy []string `json:"group_by"`
2121
// The variable name for use in formulas.
2222
Name string `json:"name"`
2323
// The APM operation name.
24-
OperationName *string `json:"operation_name,omitempty"`
24+
OperationName string `json:"operation_name"`
2525
// Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog
2626
PrimaryTagName *string `json:"primary_tag_name,omitempty"`
2727
// Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified.
@@ -41,11 +41,13 @@ type ApmResourceStatsQuery struct {
4141
// This constructor will assign default values to properties that have it defined,
4242
// and makes sure properties required by API are set, but the set of arguments
4343
// will change when the set of required properties is changed.
44-
func NewApmResourceStatsQuery(dataSource ApmResourceStatsDataSource, env string, name string, service string, stat ApmResourceStatName) *ApmResourceStatsQuery {
44+
func NewApmResourceStatsQuery(dataSource ApmResourceStatsDataSource, env string, groupBy []string, name string, operationName string, service string, stat ApmResourceStatName) *ApmResourceStatsQuery {
4545
this := ApmResourceStatsQuery{}
4646
this.DataSource = dataSource
4747
this.Env = env
48+
this.GroupBy = groupBy
4849
this.Name = name
50+
this.OperationName = operationName
4951
this.Service = service
5052
this.Stat = stat
5153
return &this
@@ -107,30 +109,25 @@ func (o *ApmResourceStatsQuery) SetEnv(v string) {
107109
o.Env = v
108110
}
109111

110-
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
112+
// GetGroupBy returns the GroupBy field value.
111113
func (o *ApmResourceStatsQuery) GetGroupBy() []string {
112-
if o == nil || o.GroupBy == nil {
114+
if o == nil {
113115
var ret []string
114116
return ret
115117
}
116118
return o.GroupBy
117119
}
118120

119-
// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
121+
// GetGroupByOk returns a tuple with the GroupBy field value
120122
// and a boolean to check if the value has been set.
121123
func (o *ApmResourceStatsQuery) GetGroupByOk() (*[]string, bool) {
122-
if o == nil || o.GroupBy == nil {
124+
if o == nil {
123125
return nil, false
124126
}
125127
return &o.GroupBy, true
126128
}
127129

128-
// HasGroupBy returns a boolean if a field has been set.
129-
func (o *ApmResourceStatsQuery) HasGroupBy() bool {
130-
return o != nil && o.GroupBy != nil
131-
}
132-
133-
// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field.
130+
// SetGroupBy sets field value.
134131
func (o *ApmResourceStatsQuery) SetGroupBy(v []string) {
135132
o.GroupBy = v
136133
}
@@ -158,32 +155,27 @@ func (o *ApmResourceStatsQuery) SetName(v string) {
158155
o.Name = v
159156
}
160157

161-
// GetOperationName returns the OperationName field value if set, zero value otherwise.
158+
// GetOperationName returns the OperationName field value.
162159
func (o *ApmResourceStatsQuery) GetOperationName() string {
163-
if o == nil || o.OperationName == nil {
160+
if o == nil {
164161
var ret string
165162
return ret
166163
}
167-
return *o.OperationName
164+
return o.OperationName
168165
}
169166

170-
// GetOperationNameOk returns a tuple with the OperationName field value if set, nil otherwise
167+
// GetOperationNameOk returns a tuple with the OperationName field value
171168
// and a boolean to check if the value has been set.
172169
func (o *ApmResourceStatsQuery) GetOperationNameOk() (*string, bool) {
173-
if o == nil || o.OperationName == nil {
170+
if o == nil {
174171
return nil, false
175172
}
176-
return o.OperationName, true
173+
return &o.OperationName, true
177174
}
178175

179-
// HasOperationName returns a boolean if a field has been set.
180-
func (o *ApmResourceStatsQuery) HasOperationName() bool {
181-
return o != nil && o.OperationName != nil
182-
}
183-
184-
// SetOperationName gets a reference to the given string and assigns it to the OperationName field.
176+
// SetOperationName sets field value.
185177
func (o *ApmResourceStatsQuery) SetOperationName(v string) {
186-
o.OperationName = &v
178+
o.OperationName = v
187179
}
188180

189181
// GetPrimaryTagName returns the PrimaryTagName field value if set, zero value otherwise.
@@ -324,13 +316,9 @@ func (o ApmResourceStatsQuery) MarshalJSON() ([]byte, error) {
324316
}
325317
toSerialize["data_source"] = o.DataSource
326318
toSerialize["env"] = o.Env
327-
if o.GroupBy != nil {
328-
toSerialize["group_by"] = o.GroupBy
329-
}
319+
toSerialize["group_by"] = o.GroupBy
330320
toSerialize["name"] = o.Name
331-
if o.OperationName != nil {
332-
toSerialize["operation_name"] = o.OperationName
333-
}
321+
toSerialize["operation_name"] = o.OperationName
334322
if o.PrimaryTagName != nil {
335323
toSerialize["primary_tag_name"] = o.PrimaryTagName
336324
}
@@ -354,9 +342,9 @@ func (o *ApmResourceStatsQuery) UnmarshalJSON(bytes []byte) (err error) {
354342
all := struct {
355343
DataSource *ApmResourceStatsDataSource `json:"data_source"`
356344
Env *string `json:"env"`
357-
GroupBy []string `json:"group_by,omitempty"`
345+
GroupBy *[]string `json:"group_by"`
358346
Name *string `json:"name"`
359-
OperationName *string `json:"operation_name,omitempty"`
347+
OperationName *string `json:"operation_name"`
360348
PrimaryTagName *string `json:"primary_tag_name,omitempty"`
361349
PrimaryTagValue *string `json:"primary_tag_value,omitempty"`
362350
ResourceName *string `json:"resource_name,omitempty"`
@@ -372,9 +360,15 @@ func (o *ApmResourceStatsQuery) UnmarshalJSON(bytes []byte) (err error) {
372360
if all.Env == nil {
373361
return fmt.Errorf("required field env missing")
374362
}
363+
if all.GroupBy == nil {
364+
return fmt.Errorf("required field group_by missing")
365+
}
375366
if all.Name == nil {
376367
return fmt.Errorf("required field name missing")
377368
}
369+
if all.OperationName == nil {
370+
return fmt.Errorf("required field operation_name missing")
371+
}
378372
if all.Service == nil {
379373
return fmt.Errorf("required field service missing")
380374
}
@@ -395,9 +389,9 @@ func (o *ApmResourceStatsQuery) UnmarshalJSON(bytes []byte) (err error) {
395389
o.DataSource = *all.DataSource
396390
}
397391
o.Env = *all.Env
398-
o.GroupBy = all.GroupBy
392+
o.GroupBy = *all.GroupBy
399393
o.Name = *all.Name
400-
o.OperationName = all.OperationName
394+
o.OperationName = *all.OperationName
401395
o.PrimaryTagName = all.PrimaryTagName
402396
o.PrimaryTagValue = all.PrimaryTagValue
403397
o.ResourceName = all.ResourceName

examples/v1/dashboards/CreateDashboard_1442588603.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func main() {
5151
},
5252
Env: "staging",
5353
PrimaryTagName: datadog.PtrString("datacenter"),
54-
OperationName: datadog.PtrString("universal.http.client"),
54+
OperationName: "universal.http.client",
5555
}},
5656
RequestType: datadogV1.WIDGETHISTOGRAMREQUESTTYPE_HISTOGRAM.Ptr(),
5757
Style: &datadogV1.WidgetStyle{

examples/v1/dashboards/CreateDashboard_145494973.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636
DataSource: datadogV1.FORMULAANDFUNCTIONAPMRESOURCESTATSDATASOURCE_APM_RESOURCE_STATS,
3737
Env: "ci",
3838
PrimaryTagName: datadog.PtrString("datacenter"),
39-
OperationName: datadog.PtrString("cassandra.query"),
39+
OperationName: "cassandra.query",
4040
GroupBy: []string{
4141
"resource_name",
4242
},

examples/v2/metrics/QueryScalarData_1479548882.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func main() {
3434
Env: "staging",
3535
Service: "azure-bill-import",
3636
Stat: datadogV2.APMRESOURCESTATNAME_HITS,
37-
OperationName: datadog.PtrString("cassandra.query"),
37+
OperationName: "cassandra.query",
3838
GroupBy: []string{
3939
"resource_name",
4040
},

examples/v2/metrics/QueryTimeseriesData_4028506518.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func main() {
3535
Env: "staging",
3636
Service: "azure-bill-import",
3737
Stat: datadogV2.APMRESOURCESTATNAME_HITS,
38-
OperationName: datadog.PtrString("cassandra.query"),
38+
OperationName: "cassandra.query",
3939
GroupBy: []string{
4040
"resource_name",
4141
},

0 commit comments

Comments
 (0)