Skip to content

Commit 2d4d921

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update description, operationId and examples for tag pipeline and custom allocation rules (#3397)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent db7630a commit 2d4d921

File tree

57 files changed

+1054
-542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1054
-542
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 293 additions & 41 deletions
Large diffs are not rendered by default.

api/datadogV2/api_cloud_cost_management.go

Lines changed: 199 additions & 199 deletions
Large diffs are not rendered by default.

api/datadogV2/doc.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,39 +123,39 @@
123123
// - [CaseManagementApi.UpdateAttributes]
124124
// - [CaseManagementApi.UpdatePriority]
125125
// - [CaseManagementApi.UpdateStatus]
126-
// - [CloudCostManagementApi.CreateArbitraryCostRule]
127126
// - [CloudCostManagementApi.CreateCostAWSCURConfig]
128127
// - [CloudCostManagementApi.CreateCostAzureUCConfigs]
129128
// - [CloudCostManagementApi.CreateCostGCPUsageCostConfig]
130-
// - [CloudCostManagementApi.CreateRuleset]
131-
// - [CloudCostManagementApi.DeleteArbitraryCostRule]
129+
// - [CloudCostManagementApi.CreateCustomAllocationRule]
130+
// - [CloudCostManagementApi.CreateTagPipelinesRuleset]
132131
// - [CloudCostManagementApi.DeleteBudget]
133132
// - [CloudCostManagementApi.DeleteCostAWSCURConfig]
134133
// - [CloudCostManagementApi.DeleteCostAzureUCConfig]
135134
// - [CloudCostManagementApi.DeleteCostGCPUsageCostConfig]
135+
// - [CloudCostManagementApi.DeleteCustomAllocationRule]
136136
// - [CloudCostManagementApi.DeleteCustomCostsFile]
137-
// - [CloudCostManagementApi.DeleteRuleset]
138-
// - [CloudCostManagementApi.GetArbitraryCostRule]
137+
// - [CloudCostManagementApi.DeleteTagPipelinesRuleset]
139138
// - [CloudCostManagementApi.GetBudget]
140139
// - [CloudCostManagementApi.GetCostAWSCURConfig]
141140
// - [CloudCostManagementApi.GetCostAzureUCConfig]
142141
// - [CloudCostManagementApi.GetCostGCPUsageCostConfig]
142+
// - [CloudCostManagementApi.GetCustomAllocationRule]
143143
// - [CloudCostManagementApi.GetCustomCostsFile]
144-
// - [CloudCostManagementApi.GetRuleset]
145-
// - [CloudCostManagementApi.ListArbitraryCostRules]
144+
// - [CloudCostManagementApi.GetTagPipelinesRuleset]
146145
// - [CloudCostManagementApi.ListBudgets]
147146
// - [CloudCostManagementApi.ListCostAWSCURConfigs]
148147
// - [CloudCostManagementApi.ListCostAzureUCConfigs]
149148
// - [CloudCostManagementApi.ListCostGCPUsageCostConfigs]
149+
// - [CloudCostManagementApi.ListCustomAllocationRules]
150150
// - [CloudCostManagementApi.ListCustomCostsFiles]
151-
// - [CloudCostManagementApi.ListRulesets]
152-
// - [CloudCostManagementApi.ReorderArbitraryCostRules]
153-
// - [CloudCostManagementApi.ReorderRulesets]
154-
// - [CloudCostManagementApi.UpdateArbitraryCostRule]
151+
// - [CloudCostManagementApi.ListTagPipelinesRulesets]
152+
// - [CloudCostManagementApi.ReorderCustomAllocationRules]
153+
// - [CloudCostManagementApi.ReorderTagPipelinesRulesets]
155154
// - [CloudCostManagementApi.UpdateCostAWSCURConfig]
156155
// - [CloudCostManagementApi.UpdateCostAzureUCConfigs]
157156
// - [CloudCostManagementApi.UpdateCostGCPUsageCostConfig]
158-
// - [CloudCostManagementApi.UpdateRuleset]
157+
// - [CloudCostManagementApi.UpdateCustomAllocationRule]
158+
// - [CloudCostManagementApi.UpdateTagPipelinesRuleset]
159159
// - [CloudCostManagementApi.UploadCustomCostsFile]
160160
// - [CloudCostManagementApi.UpsertBudget]
161161
// - [CloudCostManagementApi.ValidateQuery]

api/datadogV2/model_arbitrary_rule_response_array.go

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
type ArbitraryRuleResponseArray struct {
1515
// The `ArbitraryRuleResponseArray` `data`.
1616
Data []ArbitraryRuleResponseData `json:"data"`
17+
// The `ArbitraryRuleResponseArray` `meta`.
18+
Meta *ArbitraryRuleResponseArrayMeta `json:"meta,omitempty"`
1719
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1820
UnparsedObject map[string]interface{} `json:"-"`
1921
AdditionalProperties map[string]interface{} `json:"-"`
@@ -60,13 +62,44 @@ func (o *ArbitraryRuleResponseArray) SetData(v []ArbitraryRuleResponseData) {
6062
o.Data = v
6163
}
6264

65+
// GetMeta returns the Meta field value if set, zero value otherwise.
66+
func (o *ArbitraryRuleResponseArray) GetMeta() ArbitraryRuleResponseArrayMeta {
67+
if o == nil || o.Meta == nil {
68+
var ret ArbitraryRuleResponseArrayMeta
69+
return ret
70+
}
71+
return *o.Meta
72+
}
73+
74+
// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise
75+
// and a boolean to check if the value has been set.
76+
func (o *ArbitraryRuleResponseArray) GetMetaOk() (*ArbitraryRuleResponseArrayMeta, bool) {
77+
if o == nil || o.Meta == nil {
78+
return nil, false
79+
}
80+
return o.Meta, true
81+
}
82+
83+
// HasMeta returns a boolean if a field has been set.
84+
func (o *ArbitraryRuleResponseArray) HasMeta() bool {
85+
return o != nil && o.Meta != nil
86+
}
87+
88+
// SetMeta gets a reference to the given ArbitraryRuleResponseArrayMeta and assigns it to the Meta field.
89+
func (o *ArbitraryRuleResponseArray) SetMeta(v ArbitraryRuleResponseArrayMeta) {
90+
o.Meta = &v
91+
}
92+
6393
// MarshalJSON serializes the struct using spec logic.
6494
func (o ArbitraryRuleResponseArray) MarshalJSON() ([]byte, error) {
6595
toSerialize := map[string]interface{}{}
6696
if o.UnparsedObject != nil {
6797
return datadog.Marshal(o.UnparsedObject)
6898
}
6999
toSerialize["data"] = o.Data
100+
if o.Meta != nil {
101+
toSerialize["meta"] = o.Meta
102+
}
70103

71104
for key, value := range o.AdditionalProperties {
72105
toSerialize[key] = value
@@ -77,7 +110,8 @@ func (o ArbitraryRuleResponseArray) MarshalJSON() ([]byte, error) {
77110
// UnmarshalJSON deserializes the given payload.
78111
func (o *ArbitraryRuleResponseArray) UnmarshalJSON(bytes []byte) (err error) {
79112
all := struct {
80-
Data *[]ArbitraryRuleResponseData `json:"data"`
113+
Data *[]ArbitraryRuleResponseData `json:"data"`
114+
Meta *ArbitraryRuleResponseArrayMeta `json:"meta,omitempty"`
81115
}{}
82116
if err = datadog.Unmarshal(bytes, &all); err != nil {
83117
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -87,15 +121,25 @@ func (o *ArbitraryRuleResponseArray) UnmarshalJSON(bytes []byte) (err error) {
87121
}
88122
additionalProperties := make(map[string]interface{})
89123
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
90-
datadog.DeleteKeys(additionalProperties, &[]string{"data"})
124+
datadog.DeleteKeys(additionalProperties, &[]string{"data", "meta"})
91125
} else {
92126
return err
93127
}
128+
129+
hasInvalidField := false
94130
o.Data = *all.Data
131+
if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil {
132+
hasInvalidField = true
133+
}
134+
o.Meta = all.Meta
95135

96136
if len(additionalProperties) > 0 {
97137
o.AdditionalProperties = additionalProperties
98138
}
99139

140+
if hasInvalidField {
141+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
142+
}
143+
100144
return nil
101145
}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// ArbitraryRuleResponseArrayMeta The `ArbitraryRuleResponseArray` `meta`.
12+
type ArbitraryRuleResponseArrayMeta struct {
13+
// The `meta` `total_count`.
14+
TotalCount *int64 `json:"total_count,omitempty"`
15+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
16+
UnparsedObject map[string]interface{} `json:"-"`
17+
AdditionalProperties map[string]interface{} `json:"-"`
18+
}
19+
20+
// NewArbitraryRuleResponseArrayMeta instantiates a new ArbitraryRuleResponseArrayMeta object.
21+
// This constructor will assign default values to properties that have it defined,
22+
// and makes sure properties required by API are set, but the set of arguments
23+
// will change when the set of required properties is changed.
24+
func NewArbitraryRuleResponseArrayMeta() *ArbitraryRuleResponseArrayMeta {
25+
this := ArbitraryRuleResponseArrayMeta{}
26+
return &this
27+
}
28+
29+
// NewArbitraryRuleResponseArrayMetaWithDefaults instantiates a new ArbitraryRuleResponseArrayMeta object.
30+
// This constructor will only assign default values to properties that have it defined,
31+
// but it doesn't guarantee that properties required by API are set.
32+
func NewArbitraryRuleResponseArrayMetaWithDefaults() *ArbitraryRuleResponseArrayMeta {
33+
this := ArbitraryRuleResponseArrayMeta{}
34+
return &this
35+
}
36+
37+
// GetTotalCount returns the TotalCount field value if set, zero value otherwise.
38+
func (o *ArbitraryRuleResponseArrayMeta) GetTotalCount() int64 {
39+
if o == nil || o.TotalCount == nil {
40+
var ret int64
41+
return ret
42+
}
43+
return *o.TotalCount
44+
}
45+
46+
// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise
47+
// and a boolean to check if the value has been set.
48+
func (o *ArbitraryRuleResponseArrayMeta) GetTotalCountOk() (*int64, bool) {
49+
if o == nil || o.TotalCount == nil {
50+
return nil, false
51+
}
52+
return o.TotalCount, true
53+
}
54+
55+
// HasTotalCount returns a boolean if a field has been set.
56+
func (o *ArbitraryRuleResponseArrayMeta) HasTotalCount() bool {
57+
return o != nil && o.TotalCount != nil
58+
}
59+
60+
// SetTotalCount gets a reference to the given int64 and assigns it to the TotalCount field.
61+
func (o *ArbitraryRuleResponseArrayMeta) SetTotalCount(v int64) {
62+
o.TotalCount = &v
63+
}
64+
65+
// MarshalJSON serializes the struct using spec logic.
66+
func (o ArbitraryRuleResponseArrayMeta) MarshalJSON() ([]byte, error) {
67+
toSerialize := map[string]interface{}{}
68+
if o.UnparsedObject != nil {
69+
return datadog.Marshal(o.UnparsedObject)
70+
}
71+
if o.TotalCount != nil {
72+
toSerialize["total_count"] = o.TotalCount
73+
}
74+
75+
for key, value := range o.AdditionalProperties {
76+
toSerialize[key] = value
77+
}
78+
return datadog.Marshal(toSerialize)
79+
}
80+
81+
// UnmarshalJSON deserializes the given payload.
82+
func (o *ArbitraryRuleResponseArrayMeta) UnmarshalJSON(bytes []byte) (err error) {
83+
all := struct {
84+
TotalCount *int64 `json:"total_count,omitempty"`
85+
}{}
86+
if err = datadog.Unmarshal(bytes, &all); err != nil {
87+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
88+
}
89+
additionalProperties := make(map[string]interface{})
90+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
91+
datadog.DeleteKeys(additionalProperties, &[]string{"total_count"})
92+
} else {
93+
return err
94+
}
95+
o.TotalCount = all.TotalCount
96+
97+
if len(additionalProperties) > 0 {
98+
o.AdditionalProperties = additionalProperties
99+
}
100+
101+
return nil
102+
}

api/datadogV2/model_arbitrary_rule_response_data_attributes.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type ArbitraryRuleResponseDataAttributes struct {
2323
LastModifiedUserUuid string `json:"last_modified_user_uuid"`
2424
// The `attributes` `order_id`.
2525
OrderId int64 `json:"order_id"`
26+
// The `attributes` `processing_status`.
27+
ProcessingStatus *string `json:"processing_status,omitempty"`
2628
// The `attributes` `provider`.
2729
Provider []string `json:"provider"`
2830
// The `attributes` `rejected`.
@@ -185,6 +187,34 @@ func (o *ArbitraryRuleResponseDataAttributes) SetOrderId(v int64) {
185187
o.OrderId = v
186188
}
187189

190+
// GetProcessingStatus returns the ProcessingStatus field value if set, zero value otherwise.
191+
func (o *ArbitraryRuleResponseDataAttributes) GetProcessingStatus() string {
192+
if o == nil || o.ProcessingStatus == nil {
193+
var ret string
194+
return ret
195+
}
196+
return *o.ProcessingStatus
197+
}
198+
199+
// GetProcessingStatusOk returns a tuple with the ProcessingStatus field value if set, nil otherwise
200+
// and a boolean to check if the value has been set.
201+
func (o *ArbitraryRuleResponseDataAttributes) GetProcessingStatusOk() (*string, bool) {
202+
if o == nil || o.ProcessingStatus == nil {
203+
return nil, false
204+
}
205+
return o.ProcessingStatus, true
206+
}
207+
208+
// HasProcessingStatus returns a boolean if a field has been set.
209+
func (o *ArbitraryRuleResponseDataAttributes) HasProcessingStatus() bool {
210+
return o != nil && o.ProcessingStatus != nil
211+
}
212+
213+
// SetProcessingStatus gets a reference to the given string and assigns it to the ProcessingStatus field.
214+
func (o *ArbitraryRuleResponseDataAttributes) SetProcessingStatus(v string) {
215+
o.ProcessingStatus = &v
216+
}
217+
188218
// GetProvider returns the Provider field value.
189219
func (o *ArbitraryRuleResponseDataAttributes) GetProvider() []string {
190220
if o == nil {
@@ -366,6 +396,9 @@ func (o ArbitraryRuleResponseDataAttributes) MarshalJSON() ([]byte, error) {
366396
toSerialize["enabled"] = o.Enabled
367397
toSerialize["last_modified_user_uuid"] = o.LastModifiedUserUuid
368398
toSerialize["order_id"] = o.OrderId
399+
if o.ProcessingStatus != nil {
400+
toSerialize["processing_status"] = o.ProcessingStatus
401+
}
369402
toSerialize["provider"] = o.Provider
370403
if o.Rejected != nil {
371404
toSerialize["rejected"] = o.Rejected
@@ -394,6 +427,7 @@ func (o *ArbitraryRuleResponseDataAttributes) UnmarshalJSON(bytes []byte) (err e
394427
Enabled *bool `json:"enabled"`
395428
LastModifiedUserUuid *string `json:"last_modified_user_uuid"`
396429
OrderId *int64 `json:"order_id"`
430+
ProcessingStatus *string `json:"processing_status,omitempty"`
397431
Provider *[]string `json:"provider"`
398432
Rejected *bool `json:"rejected,omitempty"`
399433
RuleName *string `json:"rule_name"`
@@ -440,7 +474,7 @@ func (o *ArbitraryRuleResponseDataAttributes) UnmarshalJSON(bytes []byte) (err e
440474
}
441475
additionalProperties := make(map[string]interface{})
442476
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
443-
datadog.DeleteKeys(additionalProperties, &[]string{"costs_to_allocate", "created", "enabled", "last_modified_user_uuid", "order_id", "provider", "rejected", "rule_name", "strategy", "type", "updated", "version"})
477+
datadog.DeleteKeys(additionalProperties, &[]string{"costs_to_allocate", "created", "enabled", "last_modified_user_uuid", "order_id", "processing_status", "provider", "rejected", "rule_name", "strategy", "type", "updated", "version"})
444478
} else {
445479
return err
446480
}
@@ -451,6 +485,7 @@ func (o *ArbitraryRuleResponseDataAttributes) UnmarshalJSON(bytes []byte) (err e
451485
o.Enabled = *all.Enabled
452486
o.LastModifiedUserUuid = *all.LastModifiedUserUuid
453487
o.OrderId = *all.OrderId
488+
o.ProcessingStatus = all.ProcessingStatus
454489
o.Provider = *all.Provider
455490
o.Rejected = all.Rejected
456491
o.RuleName = *all.RuleName

0 commit comments

Comments
 (0)