Skip to content

Commit 366f160

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a7f7c3e of spec repo
1 parent 6be4c93 commit 366f160

32 files changed

+3954
-0
lines changed

.generator/schemas/v2/openapi.yaml

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

api/datadogV2/api_synthetics.go

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

api/datadogV2/doc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,12 @@
622622
// - [SpansMetricsApi.UpdateSpansMetric]
623623
// - [StaticAnalysisApi.CreateSCAResolveVulnerableSymbols]
624624
// - [StaticAnalysisApi.CreateSCAResult]
625+
// - [SyntheticsApi.CreateSyntheticsSuite]
626+
// - [SyntheticsApi.DeleteSyntheticsSuites]
627+
// - [SyntheticsApi.EditSyntheticsSuite]
625628
// - [SyntheticsApi.GetOnDemandConcurrencyCap]
629+
// - [SyntheticsApi.GetSyntheticsSuite]
630+
// - [SyntheticsApi.SearchSuites]
626631
// - [SyntheticsApi.SetOnDemandConcurrencyCap]
627632
// - [TeamConnectionsApi.CreateTeamConnections]
628633
// - [TeamConnectionsApi.DeleteTeamConnections]
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
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+
// DeletedSuiteResponseData
12+
type DeletedSuiteResponseData struct {
13+
//
14+
Attributes *DeletedSuiteResponseDataAttributes `json:"attributes,omitempty"`
15+
//
16+
Id *string `json:"id,omitempty"`
17+
//
18+
Type *DeletedSuiteType `json:"type,omitempty"`
19+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
20+
UnparsedObject map[string]interface{} `json:"-"`
21+
AdditionalProperties map[string]interface{} `json:"-"`
22+
}
23+
24+
// NewDeletedSuiteResponseData instantiates a new DeletedSuiteResponseData object.
25+
// This constructor will assign default values to properties that have it defined,
26+
// and makes sure properties required by API are set, but the set of arguments
27+
// will change when the set of required properties is changed.
28+
func NewDeletedSuiteResponseData() *DeletedSuiteResponseData {
29+
this := DeletedSuiteResponseData{}
30+
var typeVar DeletedSuiteType = DELETEDSUITETYPE_SUITES
31+
this.Type = &typeVar
32+
return &this
33+
}
34+
35+
// NewDeletedSuiteResponseDataWithDefaults instantiates a new DeletedSuiteResponseData object.
36+
// This constructor will only assign default values to properties that have it defined,
37+
// but it doesn't guarantee that properties required by API are set.
38+
func NewDeletedSuiteResponseDataWithDefaults() *DeletedSuiteResponseData {
39+
this := DeletedSuiteResponseData{}
40+
var typeVar DeletedSuiteType = DELETEDSUITETYPE_SUITES
41+
this.Type = &typeVar
42+
return &this
43+
}
44+
45+
// GetAttributes returns the Attributes field value if set, zero value otherwise.
46+
func (o *DeletedSuiteResponseData) GetAttributes() DeletedSuiteResponseDataAttributes {
47+
if o == nil || o.Attributes == nil {
48+
var ret DeletedSuiteResponseDataAttributes
49+
return ret
50+
}
51+
return *o.Attributes
52+
}
53+
54+
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
55+
// and a boolean to check if the value has been set.
56+
func (o *DeletedSuiteResponseData) GetAttributesOk() (*DeletedSuiteResponseDataAttributes, bool) {
57+
if o == nil || o.Attributes == nil {
58+
return nil, false
59+
}
60+
return o.Attributes, true
61+
}
62+
63+
// HasAttributes returns a boolean if a field has been set.
64+
func (o *DeletedSuiteResponseData) HasAttributes() bool {
65+
return o != nil && o.Attributes != nil
66+
}
67+
68+
// SetAttributes gets a reference to the given DeletedSuiteResponseDataAttributes and assigns it to the Attributes field.
69+
func (o *DeletedSuiteResponseData) SetAttributes(v DeletedSuiteResponseDataAttributes) {
70+
o.Attributes = &v
71+
}
72+
73+
// GetId returns the Id field value if set, zero value otherwise.
74+
func (o *DeletedSuiteResponseData) GetId() string {
75+
if o == nil || o.Id == nil {
76+
var ret string
77+
return ret
78+
}
79+
return *o.Id
80+
}
81+
82+
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
83+
// and a boolean to check if the value has been set.
84+
func (o *DeletedSuiteResponseData) GetIdOk() (*string, bool) {
85+
if o == nil || o.Id == nil {
86+
return nil, false
87+
}
88+
return o.Id, true
89+
}
90+
91+
// HasId returns a boolean if a field has been set.
92+
func (o *DeletedSuiteResponseData) HasId() bool {
93+
return o != nil && o.Id != nil
94+
}
95+
96+
// SetId gets a reference to the given string and assigns it to the Id field.
97+
func (o *DeletedSuiteResponseData) SetId(v string) {
98+
o.Id = &v
99+
}
100+
101+
// GetType returns the Type field value if set, zero value otherwise.
102+
func (o *DeletedSuiteResponseData) GetType() DeletedSuiteType {
103+
if o == nil || o.Type == nil {
104+
var ret DeletedSuiteType
105+
return ret
106+
}
107+
return *o.Type
108+
}
109+
110+
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
111+
// and a boolean to check if the value has been set.
112+
func (o *DeletedSuiteResponseData) GetTypeOk() (*DeletedSuiteType, bool) {
113+
if o == nil || o.Type == nil {
114+
return nil, false
115+
}
116+
return o.Type, true
117+
}
118+
119+
// HasType returns a boolean if a field has been set.
120+
func (o *DeletedSuiteResponseData) HasType() bool {
121+
return o != nil && o.Type != nil
122+
}
123+
124+
// SetType gets a reference to the given DeletedSuiteType and assigns it to the Type field.
125+
func (o *DeletedSuiteResponseData) SetType(v DeletedSuiteType) {
126+
o.Type = &v
127+
}
128+
129+
// MarshalJSON serializes the struct using spec logic.
130+
func (o DeletedSuiteResponseData) MarshalJSON() ([]byte, error) {
131+
toSerialize := map[string]interface{}{}
132+
if o.UnparsedObject != nil {
133+
return datadog.Marshal(o.UnparsedObject)
134+
}
135+
if o.Attributes != nil {
136+
toSerialize["attributes"] = o.Attributes
137+
}
138+
if o.Id != nil {
139+
toSerialize["id"] = o.Id
140+
}
141+
if o.Type != nil {
142+
toSerialize["type"] = o.Type
143+
}
144+
145+
for key, value := range o.AdditionalProperties {
146+
toSerialize[key] = value
147+
}
148+
return datadog.Marshal(toSerialize)
149+
}
150+
151+
// UnmarshalJSON deserializes the given payload.
152+
func (o *DeletedSuiteResponseData) UnmarshalJSON(bytes []byte) (err error) {
153+
all := struct {
154+
Attributes *DeletedSuiteResponseDataAttributes `json:"attributes,omitempty"`
155+
Id *string `json:"id,omitempty"`
156+
Type *DeletedSuiteType `json:"type,omitempty"`
157+
}{}
158+
if err = datadog.Unmarshal(bytes, &all); err != nil {
159+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
160+
}
161+
additionalProperties := make(map[string]interface{})
162+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
163+
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "type"})
164+
} else {
165+
return err
166+
}
167+
168+
hasInvalidField := false
169+
if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil {
170+
hasInvalidField = true
171+
}
172+
o.Attributes = all.Attributes
173+
o.Id = all.Id
174+
if all.Type != nil && !all.Type.IsValid() {
175+
hasInvalidField = true
176+
} else {
177+
o.Type = all.Type
178+
}
179+
180+
if len(additionalProperties) > 0 {
181+
o.AdditionalProperties = additionalProperties
182+
}
183+
184+
if hasInvalidField {
185+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
186+
}
187+
188+
return nil
189+
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
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+
// DeletedSuiteResponseDataAttributes
12+
type DeletedSuiteResponseDataAttributes struct {
13+
// Deletion timestamp of the Synthetic suite ID.
14+
DeletedAt *string `json:"deleted_at,omitempty"`
15+
// The Synthetic suite ID deleted.
16+
PublicId *string `json:"public_id,omitempty"`
17+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
18+
UnparsedObject map[string]interface{} `json:"-"`
19+
AdditionalProperties map[string]interface{} `json:"-"`
20+
}
21+
22+
// NewDeletedSuiteResponseDataAttributes instantiates a new DeletedSuiteResponseDataAttributes object.
23+
// This constructor will assign default values to properties that have it defined,
24+
// and makes sure properties required by API are set, but the set of arguments
25+
// will change when the set of required properties is changed.
26+
func NewDeletedSuiteResponseDataAttributes() *DeletedSuiteResponseDataAttributes {
27+
this := DeletedSuiteResponseDataAttributes{}
28+
return &this
29+
}
30+
31+
// NewDeletedSuiteResponseDataAttributesWithDefaults instantiates a new DeletedSuiteResponseDataAttributes object.
32+
// This constructor will only assign default values to properties that have it defined,
33+
// but it doesn't guarantee that properties required by API are set.
34+
func NewDeletedSuiteResponseDataAttributesWithDefaults() *DeletedSuiteResponseDataAttributes {
35+
this := DeletedSuiteResponseDataAttributes{}
36+
return &this
37+
}
38+
39+
// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise.
40+
func (o *DeletedSuiteResponseDataAttributes) GetDeletedAt() string {
41+
if o == nil || o.DeletedAt == nil {
42+
var ret string
43+
return ret
44+
}
45+
return *o.DeletedAt
46+
}
47+
48+
// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise
49+
// and a boolean to check if the value has been set.
50+
func (o *DeletedSuiteResponseDataAttributes) GetDeletedAtOk() (*string, bool) {
51+
if o == nil || o.DeletedAt == nil {
52+
return nil, false
53+
}
54+
return o.DeletedAt, true
55+
}
56+
57+
// HasDeletedAt returns a boolean if a field has been set.
58+
func (o *DeletedSuiteResponseDataAttributes) HasDeletedAt() bool {
59+
return o != nil && o.DeletedAt != nil
60+
}
61+
62+
// SetDeletedAt gets a reference to the given string and assigns it to the DeletedAt field.
63+
func (o *DeletedSuiteResponseDataAttributes) SetDeletedAt(v string) {
64+
o.DeletedAt = &v
65+
}
66+
67+
// GetPublicId returns the PublicId field value if set, zero value otherwise.
68+
func (o *DeletedSuiteResponseDataAttributes) GetPublicId() string {
69+
if o == nil || o.PublicId == nil {
70+
var ret string
71+
return ret
72+
}
73+
return *o.PublicId
74+
}
75+
76+
// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise
77+
// and a boolean to check if the value has been set.
78+
func (o *DeletedSuiteResponseDataAttributes) GetPublicIdOk() (*string, bool) {
79+
if o == nil || o.PublicId == nil {
80+
return nil, false
81+
}
82+
return o.PublicId, true
83+
}
84+
85+
// HasPublicId returns a boolean if a field has been set.
86+
func (o *DeletedSuiteResponseDataAttributes) HasPublicId() bool {
87+
return o != nil && o.PublicId != nil
88+
}
89+
90+
// SetPublicId gets a reference to the given string and assigns it to the PublicId field.
91+
func (o *DeletedSuiteResponseDataAttributes) SetPublicId(v string) {
92+
o.PublicId = &v
93+
}
94+
95+
// MarshalJSON serializes the struct using spec logic.
96+
func (o DeletedSuiteResponseDataAttributes) MarshalJSON() ([]byte, error) {
97+
toSerialize := map[string]interface{}{}
98+
if o.UnparsedObject != nil {
99+
return datadog.Marshal(o.UnparsedObject)
100+
}
101+
if o.DeletedAt != nil {
102+
toSerialize["deleted_at"] = o.DeletedAt
103+
}
104+
if o.PublicId != nil {
105+
toSerialize["public_id"] = o.PublicId
106+
}
107+
108+
for key, value := range o.AdditionalProperties {
109+
toSerialize[key] = value
110+
}
111+
return datadog.Marshal(toSerialize)
112+
}
113+
114+
// UnmarshalJSON deserializes the given payload.
115+
func (o *DeletedSuiteResponseDataAttributes) UnmarshalJSON(bytes []byte) (err error) {
116+
all := struct {
117+
DeletedAt *string `json:"deleted_at,omitempty"`
118+
PublicId *string `json:"public_id,omitempty"`
119+
}{}
120+
if err = datadog.Unmarshal(bytes, &all); err != nil {
121+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
122+
}
123+
additionalProperties := make(map[string]interface{})
124+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
125+
datadog.DeleteKeys(additionalProperties, &[]string{"deleted_at", "public_id"})
126+
} else {
127+
return err
128+
}
129+
o.DeletedAt = all.DeletedAt
130+
o.PublicId = all.PublicId
131+
132+
if len(additionalProperties) > 0 {
133+
o.AdditionalProperties = additionalProperties
134+
}
135+
136+
return nil
137+
}

0 commit comments

Comments
 (0)