Skip to content

Commit 71ac042

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f011d9e of spec repo
1 parent 6be4c93 commit 71ac042

File tree

49 files changed

+5330
-54
lines changed

Some content is hidden

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

49 files changed

+5330
-54
lines changed

.generator/schemas/v2/openapi.yaml

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

api/datadogV2/api_teams.go

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

api/datadogV2/doc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,22 +628,26 @@
628628
// - [TeamConnectionsApi.DeleteTeamConnections]
629629
// - [TeamConnectionsApi.ListTeamConnections]
630630
// - [TeamsApi.AddMemberTeam]
631+
// - [TeamsApi.AddTeamHierarchyLink]
631632
// - [TeamsApi.CreateTeam]
632633
// - [TeamsApi.CreateTeamLink]
633634
// - [TeamsApi.CreateTeamMembership]
634635
// - [TeamsApi.DeleteTeam]
635636
// - [TeamsApi.DeleteTeamLink]
636637
// - [TeamsApi.DeleteTeamMembership]
637638
// - [TeamsApi.GetTeam]
639+
// - [TeamsApi.GetTeamHierarchyLink]
638640
// - [TeamsApi.GetTeamLink]
639641
// - [TeamsApi.GetTeamLinks]
640642
// - [TeamsApi.GetTeamMemberships]
641643
// - [TeamsApi.GetTeamPermissionSettings]
642644
// - [TeamsApi.GetTeamSync]
643645
// - [TeamsApi.GetUserMemberships]
644646
// - [TeamsApi.ListMemberTeams]
647+
// - [TeamsApi.ListTeamHierarchyLinks]
645648
// - [TeamsApi.ListTeams]
646649
// - [TeamsApi.RemoveMemberTeam]
650+
// - [TeamsApi.RemoveTeamHierarchyLink]
647651
// - [TeamsApi.SyncTeams]
648652
// - [TeamsApi.UpdateTeam]
649653
// - [TeamsApi.UpdateTeamLink]

api/datadogV2/model_relationship_to_user_team_permission.go

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
// RelationshipToUserTeamPermission Relationship between a user team permission and a team
1212
type RelationshipToUserTeamPermission struct {
1313
// Related user team permission data
14-
Data *RelationshipToUserTeamPermissionData `json:"data,omitempty"`
14+
Data NullableRelationshipToUserTeamPermissionData `json:"data,omitempty"`
1515
// Links attributes.
1616
Links *TeamRelationshipsLinks `json:"links,omitempty"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -36,32 +36,43 @@ func NewRelationshipToUserTeamPermissionWithDefaults() *RelationshipToUserTeamPe
3636
return &this
3737
}
3838

39-
// GetData returns the Data field value if set, zero value otherwise.
39+
// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null).
4040
func (o *RelationshipToUserTeamPermission) GetData() RelationshipToUserTeamPermissionData {
41-
if o == nil || o.Data == nil {
41+
if o == nil || o.Data.Get() == nil {
4242
var ret RelationshipToUserTeamPermissionData
4343
return ret
4444
}
45-
return *o.Data
45+
return *o.Data.Get()
4646
}
4747

4848
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
4949
// and a boolean to check if the value has been set.
50+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
5051
func (o *RelationshipToUserTeamPermission) GetDataOk() (*RelationshipToUserTeamPermissionData, bool) {
51-
if o == nil || o.Data == nil {
52+
if o == nil {
5253
return nil, false
5354
}
54-
return o.Data, true
55+
return o.Data.Get(), o.Data.IsSet()
5556
}
5657

5758
// HasData returns a boolean if a field has been set.
5859
func (o *RelationshipToUserTeamPermission) HasData() bool {
59-
return o != nil && o.Data != nil
60+
return o != nil && o.Data.IsSet()
6061
}
6162

62-
// SetData gets a reference to the given RelationshipToUserTeamPermissionData and assigns it to the Data field.
63+
// SetData gets a reference to the given NullableRelationshipToUserTeamPermissionData and assigns it to the Data field.
6364
func (o *RelationshipToUserTeamPermission) SetData(v RelationshipToUserTeamPermissionData) {
64-
o.Data = &v
65+
o.Data.Set(&v)
66+
}
67+
68+
// SetDataNil sets the value for Data to be an explicit nil.
69+
func (o *RelationshipToUserTeamPermission) SetDataNil() {
70+
o.Data.Set(nil)
71+
}
72+
73+
// UnsetData ensures that no value is present for Data, not even an explicit nil.
74+
func (o *RelationshipToUserTeamPermission) UnsetData() {
75+
o.Data.Unset()
6576
}
6677

6778
// GetLinks returns the Links field value if set, zero value otherwise.
@@ -98,8 +109,8 @@ func (o RelationshipToUserTeamPermission) MarshalJSON() ([]byte, error) {
98109
if o.UnparsedObject != nil {
99110
return datadog.Marshal(o.UnparsedObject)
100111
}
101-
if o.Data != nil {
102-
toSerialize["data"] = o.Data
112+
if o.Data.IsSet() {
113+
toSerialize["data"] = o.Data.Get()
103114
}
104115
if o.Links != nil {
105116
toSerialize["links"] = o.Links
@@ -114,8 +125,8 @@ func (o RelationshipToUserTeamPermission) MarshalJSON() ([]byte, error) {
114125
// UnmarshalJSON deserializes the given payload.
115126
func (o *RelationshipToUserTeamPermission) UnmarshalJSON(bytes []byte) (err error) {
116127
all := struct {
117-
Data *RelationshipToUserTeamPermissionData `json:"data,omitempty"`
118-
Links *TeamRelationshipsLinks `json:"links,omitempty"`
128+
Data NullableRelationshipToUserTeamPermissionData `json:"data,omitempty"`
129+
Links *TeamRelationshipsLinks `json:"links,omitempty"`
119130
}{}
120131
if err = datadog.Unmarshal(bytes, &all); err != nil {
121132
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -128,9 +139,6 @@ func (o *RelationshipToUserTeamPermission) UnmarshalJSON(bytes []byte) (err erro
128139
}
129140

130141
hasInvalidField := false
131-
if all.Data != nil && all.Data.UnparsedObject != nil && o.UnparsedObject == nil {
132-
hasInvalidField = true
133-
}
134142
o.Data = all.Data
135143
if all.Links != nil && all.Links.UnparsedObject != nil && o.UnparsedObject == nil {
136144
hasInvalidField = true

api/datadogV2/model_relationship_to_user_team_permission_data.go

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,53 @@ func (o *RelationshipToUserTeamPermissionData) UnmarshalJSON(bytes []byte) (err
143143

144144
return nil
145145
}
146+
147+
// NullableRelationshipToUserTeamPermissionData handles when a null is used for RelationshipToUserTeamPermissionData.
148+
type NullableRelationshipToUserTeamPermissionData struct {
149+
value *RelationshipToUserTeamPermissionData
150+
isSet bool
151+
}
152+
153+
// Get returns the associated value.
154+
func (v NullableRelationshipToUserTeamPermissionData) Get() *RelationshipToUserTeamPermissionData {
155+
return v.value
156+
}
157+
158+
// Set changes the value and indicates it's been called.
159+
func (v *NullableRelationshipToUserTeamPermissionData) Set(val *RelationshipToUserTeamPermissionData) {
160+
v.value = val
161+
v.isSet = true
162+
}
163+
164+
// IsSet returns whether Set has been called.
165+
func (v NullableRelationshipToUserTeamPermissionData) IsSet() bool {
166+
return v.isSet
167+
}
168+
169+
// Unset sets the value to nil and resets the set flag/
170+
func (v *NullableRelationshipToUserTeamPermissionData) Unset() {
171+
v.value = nil
172+
v.isSet = false
173+
}
174+
175+
// NewNullableRelationshipToUserTeamPermissionData initializes the struct as if Set has been called.
176+
func NewNullableRelationshipToUserTeamPermissionData(val *RelationshipToUserTeamPermissionData) *NullableRelationshipToUserTeamPermissionData {
177+
return &NullableRelationshipToUserTeamPermissionData{value: val, isSet: true}
178+
}
179+
180+
// MarshalJSON serializes the associated value.
181+
func (v NullableRelationshipToUserTeamPermissionData) MarshalJSON() ([]byte, error) {
182+
return datadog.Marshal(v.value)
183+
}
184+
185+
// UnmarshalJSON deserializes the payload and sets the flag as if Set has been called.
186+
func (v *NullableRelationshipToUserTeamPermissionData) UnmarshalJSON(src []byte) error {
187+
v.isSet = true
188+
189+
// this object is nullable so check if the payload is null or empty string
190+
if string(src) == "" || string(src) == "{}" {
191+
return nil
192+
}
193+
194+
return datadog.Unmarshal(src, &v.value)
195+
}

api/datadogV2/model_team_attributes.go

Lines changed: 92 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ type TeamAttributes struct {
2424
// The team's identifier
2525
Handle string `json:"handle"`
2626
// Collection of hidden modules for the team
27-
HiddenModules []string `json:"hidden_modules,omitempty"`
27+
HiddenModules datadog.NullableList[string] `json:"hidden_modules,omitempty"`
28+
// Whether the team is managed from an external source
29+
IsManaged *bool `json:"is_managed,omitempty"`
2830
// The number of links belonging to the team
2931
LinkCount *int32 `json:"link_count,omitempty"`
3032
// Modification date of the team
@@ -36,7 +38,7 @@ type TeamAttributes struct {
3638
// The number of users belonging to the team
3739
UserCount *int32 `json:"user_count,omitempty"`
3840
// Collection of visible modules for the team
39-
VisibleModules []string `json:"visible_modules,omitempty"`
41+
VisibleModules datadog.NullableList[string] `json:"visible_modules,omitempty"`
4042
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
4143
UnparsedObject map[string]interface{} `json:"-"`
4244
AdditionalProperties map[string]interface{} `json:"-"`
@@ -229,32 +231,71 @@ func (o *TeamAttributes) SetHandle(v string) {
229231
o.Handle = v
230232
}
231233

232-
// GetHiddenModules returns the HiddenModules field value if set, zero value otherwise.
234+
// GetHiddenModules returns the HiddenModules field value if set, zero value otherwise (both if not set or set to explicit null).
233235
func (o *TeamAttributes) GetHiddenModules() []string {
234-
if o == nil || o.HiddenModules == nil {
236+
if o == nil || o.HiddenModules.Get() == nil {
235237
var ret []string
236238
return ret
237239
}
238-
return o.HiddenModules
240+
return *o.HiddenModules.Get()
239241
}
240242

241243
// GetHiddenModulesOk returns a tuple with the HiddenModules field value if set, nil otherwise
242244
// and a boolean to check if the value has been set.
245+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
243246
func (o *TeamAttributes) GetHiddenModulesOk() (*[]string, bool) {
244-
if o == nil || o.HiddenModules == nil {
247+
if o == nil {
245248
return nil, false
246249
}
247-
return &o.HiddenModules, true
250+
return o.HiddenModules.Get(), o.HiddenModules.IsSet()
248251
}
249252

250253
// HasHiddenModules returns a boolean if a field has been set.
251254
func (o *TeamAttributes) HasHiddenModules() bool {
252-
return o != nil && o.HiddenModules != nil
255+
return o != nil && o.HiddenModules.IsSet()
253256
}
254257

255-
// SetHiddenModules gets a reference to the given []string and assigns it to the HiddenModules field.
258+
// SetHiddenModules gets a reference to the given datadog.NullableList[string] and assigns it to the HiddenModules field.
256259
func (o *TeamAttributes) SetHiddenModules(v []string) {
257-
o.HiddenModules = v
260+
o.HiddenModules.Set(&v)
261+
}
262+
263+
// SetHiddenModulesNil sets the value for HiddenModules to be an explicit nil.
264+
func (o *TeamAttributes) SetHiddenModulesNil() {
265+
o.HiddenModules.Set(nil)
266+
}
267+
268+
// UnsetHiddenModules ensures that no value is present for HiddenModules, not even an explicit nil.
269+
func (o *TeamAttributes) UnsetHiddenModules() {
270+
o.HiddenModules.Unset()
271+
}
272+
273+
// GetIsManaged returns the IsManaged field value if set, zero value otherwise.
274+
func (o *TeamAttributes) GetIsManaged() bool {
275+
if o == nil || o.IsManaged == nil {
276+
var ret bool
277+
return ret
278+
}
279+
return *o.IsManaged
280+
}
281+
282+
// GetIsManagedOk returns a tuple with the IsManaged field value if set, nil otherwise
283+
// and a boolean to check if the value has been set.
284+
func (o *TeamAttributes) GetIsManagedOk() (*bool, bool) {
285+
if o == nil || o.IsManaged == nil {
286+
return nil, false
287+
}
288+
return o.IsManaged, true
289+
}
290+
291+
// HasIsManaged returns a boolean if a field has been set.
292+
func (o *TeamAttributes) HasIsManaged() bool {
293+
return o != nil && o.IsManaged != nil
294+
}
295+
296+
// SetIsManaged gets a reference to the given bool and assigns it to the IsManaged field.
297+
func (o *TeamAttributes) SetIsManaged(v bool) {
298+
o.IsManaged = &v
258299
}
259300

260301
// GetLinkCount returns the LinkCount field value if set, zero value otherwise.
@@ -403,32 +444,43 @@ func (o *TeamAttributes) SetUserCount(v int32) {
403444
o.UserCount = &v
404445
}
405446

406-
// GetVisibleModules returns the VisibleModules field value if set, zero value otherwise.
447+
// GetVisibleModules returns the VisibleModules field value if set, zero value otherwise (both if not set or set to explicit null).
407448
func (o *TeamAttributes) GetVisibleModules() []string {
408-
if o == nil || o.VisibleModules == nil {
449+
if o == nil || o.VisibleModules.Get() == nil {
409450
var ret []string
410451
return ret
411452
}
412-
return o.VisibleModules
453+
return *o.VisibleModules.Get()
413454
}
414455

415456
// GetVisibleModulesOk returns a tuple with the VisibleModules field value if set, nil otherwise
416457
// and a boolean to check if the value has been set.
458+
// NOTE: If the value is an explicit nil, `nil, true` will be returned.
417459
func (o *TeamAttributes) GetVisibleModulesOk() (*[]string, bool) {
418-
if o == nil || o.VisibleModules == nil {
460+
if o == nil {
419461
return nil, false
420462
}
421-
return &o.VisibleModules, true
463+
return o.VisibleModules.Get(), o.VisibleModules.IsSet()
422464
}
423465

424466
// HasVisibleModules returns a boolean if a field has been set.
425467
func (o *TeamAttributes) HasVisibleModules() bool {
426-
return o != nil && o.VisibleModules != nil
468+
return o != nil && o.VisibleModules.IsSet()
427469
}
428470

429-
// SetVisibleModules gets a reference to the given []string and assigns it to the VisibleModules field.
471+
// SetVisibleModules gets a reference to the given datadog.NullableList[string] and assigns it to the VisibleModules field.
430472
func (o *TeamAttributes) SetVisibleModules(v []string) {
431-
o.VisibleModules = v
473+
o.VisibleModules.Set(&v)
474+
}
475+
476+
// SetVisibleModulesNil sets the value for VisibleModules to be an explicit nil.
477+
func (o *TeamAttributes) SetVisibleModulesNil() {
478+
o.VisibleModules.Set(nil)
479+
}
480+
481+
// UnsetVisibleModules ensures that no value is present for VisibleModules, not even an explicit nil.
482+
func (o *TeamAttributes) UnsetVisibleModules() {
483+
o.VisibleModules.Unset()
432484
}
433485

434486
// MarshalJSON serializes the struct using spec logic.
@@ -454,8 +506,11 @@ func (o TeamAttributes) MarshalJSON() ([]byte, error) {
454506
toSerialize["description"] = o.Description.Get()
455507
}
456508
toSerialize["handle"] = o.Handle
457-
if o.HiddenModules != nil {
458-
toSerialize["hidden_modules"] = o.HiddenModules
509+
if o.HiddenModules.IsSet() {
510+
toSerialize["hidden_modules"] = o.HiddenModules.Get()
511+
}
512+
if o.IsManaged != nil {
513+
toSerialize["is_managed"] = o.IsManaged
459514
}
460515
if o.LinkCount != nil {
461516
toSerialize["link_count"] = o.LinkCount
@@ -474,8 +529,8 @@ func (o TeamAttributes) MarshalJSON() ([]byte, error) {
474529
if o.UserCount != nil {
475530
toSerialize["user_count"] = o.UserCount
476531
}
477-
if o.VisibleModules != nil {
478-
toSerialize["visible_modules"] = o.VisibleModules
532+
if o.VisibleModules.IsSet() {
533+
toSerialize["visible_modules"] = o.VisibleModules.Get()
479534
}
480535

481536
for key, value := range o.AdditionalProperties {
@@ -487,18 +542,19 @@ func (o TeamAttributes) MarshalJSON() ([]byte, error) {
487542
// UnmarshalJSON deserializes the given payload.
488543
func (o *TeamAttributes) UnmarshalJSON(bytes []byte) (err error) {
489544
all := struct {
490-
Avatar datadog.NullableString `json:"avatar,omitempty"`
491-
Banner datadog.NullableInt64 `json:"banner,omitempty"`
492-
CreatedAt *time.Time `json:"created_at,omitempty"`
493-
Description datadog.NullableString `json:"description,omitempty"`
494-
Handle *string `json:"handle"`
495-
HiddenModules []string `json:"hidden_modules,omitempty"`
496-
LinkCount *int32 `json:"link_count,omitempty"`
497-
ModifiedAt *time.Time `json:"modified_at,omitempty"`
498-
Name *string `json:"name"`
499-
Summary datadog.NullableString `json:"summary,omitempty"`
500-
UserCount *int32 `json:"user_count,omitempty"`
501-
VisibleModules []string `json:"visible_modules,omitempty"`
545+
Avatar datadog.NullableString `json:"avatar,omitempty"`
546+
Banner datadog.NullableInt64 `json:"banner,omitempty"`
547+
CreatedAt *time.Time `json:"created_at,omitempty"`
548+
Description datadog.NullableString `json:"description,omitempty"`
549+
Handle *string `json:"handle"`
550+
HiddenModules datadog.NullableList[string] `json:"hidden_modules,omitempty"`
551+
IsManaged *bool `json:"is_managed,omitempty"`
552+
LinkCount *int32 `json:"link_count,omitempty"`
553+
ModifiedAt *time.Time `json:"modified_at,omitempty"`
554+
Name *string `json:"name"`
555+
Summary datadog.NullableString `json:"summary,omitempty"`
556+
UserCount *int32 `json:"user_count,omitempty"`
557+
VisibleModules datadog.NullableList[string] `json:"visible_modules,omitempty"`
502558
}{}
503559
if err = datadog.Unmarshal(bytes, &all); err != nil {
504560
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -511,7 +567,7 @@ func (o *TeamAttributes) UnmarshalJSON(bytes []byte) (err error) {
511567
}
512568
additionalProperties := make(map[string]interface{})
513569
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
514-
datadog.DeleteKeys(additionalProperties, &[]string{"avatar", "banner", "created_at", "description", "handle", "hidden_modules", "link_count", "modified_at", "name", "summary", "user_count", "visible_modules"})
570+
datadog.DeleteKeys(additionalProperties, &[]string{"avatar", "banner", "created_at", "description", "handle", "hidden_modules", "is_managed", "link_count", "modified_at", "name", "summary", "user_count", "visible_modules"})
515571
} else {
516572
return err
517573
}
@@ -521,6 +577,7 @@ func (o *TeamAttributes) UnmarshalJSON(bytes []byte) (err error) {
521577
o.Description = all.Description
522578
o.Handle = *all.Handle
523579
o.HiddenModules = all.HiddenModules
580+
o.IsManaged = all.IsManaged
524581
o.LinkCount = all.LinkCount
525582
o.ModifiedAt = all.ModifiedAt
526583
o.Name = *all.Name

0 commit comments

Comments
 (0)