Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 120 additions & 13 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51964,6 +51964,8 @@ components:
items:
$ref: "#/components/schemas/OrgGroupMembershipData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
$ref: "#/components/schemas/OrgGroupPaginationMeta"
required:
Expand Down Expand Up @@ -52081,6 +52083,8 @@ components:
items:
$ref: "#/components/schemas/OrgGroupMembershipData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
$ref: "#/components/schemas/OrgGroupPaginationMeta"
required:
Expand Down Expand Up @@ -52181,24 +52185,71 @@ components:
required:
- data
type: object
OrgGroupPaginationLinks:
description: Pagination links for navigating between pages of an org group list response.
properties:
first:
description: Link to the first page.
type: string
last:
description: Link to the last page.
type: string
next:
description: Link to the next page.
nullable: true
type: string
prev:
description: Link to the previous page.
nullable: true
type: string
self:
description: Link to the current page.
type: string
type: object
OrgGroupPaginationMeta:
description: Pagination metadata.
description: Pagination metadata for org group list responses.
properties:
page:
$ref: "#/components/schemas/OrgGroupPaginationMetaPage"
required:
- page
type: object
OrgGroupPaginationMetaPage:
description: Page-based pagination details.
description: Page-based pagination details for org group list responses.
properties:
total_count:
description: The total number of items.
example: 42
first_number:
description: First page number.
format: int64
type: integer
required:
- total_count
last_number:
description: Last page number.
format: int64
nullable: true
type: integer
next_number:
description: Next page number.
format: int64
nullable: true
type: integer
number:
description: Page number.
format: int64
type: integer
prev_number:
description: Previous page number.
format: int64
nullable: true
type: integer
size:
description: Page size.
format: int64
type: integer
total:
description: Total number of results.
format: int64
type: integer
type:
description: Pagination type.
example: "number_size"
type: string
type: object
OrgGroupPolicyAttributes:
description: Attributes of an org group policy.
Expand Down Expand Up @@ -52388,6 +52439,8 @@ components:
items:
$ref: "#/components/schemas/OrgGroupPolicyData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
$ref: "#/components/schemas/OrgGroupPaginationMeta"
required:
Expand Down Expand Up @@ -52501,6 +52554,8 @@ components:
items:
$ref: "#/components/schemas/OrgGroupPolicyOverrideData"
type: array
links:
$ref: "#/components/schemas/OrgGroupPaginationLinks"
meta:
$ref: "#/components/schemas/OrgGroupPaginationMeta"
required:
Expand Down Expand Up @@ -111582,9 +111637,22 @@ paths:
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
type: org_groups
type: org_group_memberships
links:
first: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
last: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
next:
prev:
self: "https://api.datadoghq.com/api/v2/org_group_memberships?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
meta:
page:
total_count: 1
first_number: 0
last_number: 0
next_number:
number: 0
prev_number:
size: 50
total: 1
type: number_size
schema:
$ref: "#/components/schemas/OrgGroupMembershipListResponse"
description: OK
Expand Down Expand Up @@ -111883,9 +111951,22 @@ paths:
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
type: org_groups
type: org_group_policies
links:
first: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
last: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
next:
prev:
self: "https://api.datadoghq.com/api/v2/org_group_policies?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
meta:
page:
total_count: 1
first_number: 0
last_number: 0
next_number:
number: 0
prev_number:
size: 50
total: 1
type: number_size
schema:
$ref: "#/components/schemas/OrgGroupPolicyListResponse"
description: OK
Expand Down Expand Up @@ -112274,9 +112355,22 @@ paths:
id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789"
type: org_group_policies
type: org_group_policy_overrides
links:
first: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
last: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
next:
prev:
self: "https://api.datadoghq.com/api/v2/org_group_policy_overrides?filter%5Borg_group_id%5D=a1b2c3d4-e5f6-7890-abcd-ef0123456789&page%5Bnumber%5D=0&page%5Bsize%5D=50"
meta:
page:
total_count: 1
first_number: 0
last_number: 0
next_number:
number: 0
prev_number:
size: 50
total: 1
type: number_size
schema:
$ref: "#/components/schemas/OrgGroupPolicyOverrideListResponse"
description: OK
Expand Down Expand Up @@ -112615,9 +112709,22 @@ paths:
owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890"
id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789"
type: org_groups
links:
first: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
last: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
next:
prev:
self: "https://api.datadoghq.com/api/v2/org_groups?page%5Bnumber%5D=0&page%5Bsize%5D=50"
meta:
page:
total_count: 1
first_number: 0
last_number: 0
next_number:
number: 0
prev_number:
size: 50
total: 1
type: number_size
schema:
$ref: "#/components/schemas/OrgGroupListResponse"
description: OK
Expand Down
42 changes: 40 additions & 2 deletions api/datadogV2/model_org_group_list_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ type OrgGroupListResponse struct {
Data []OrgGroupData `json:"data"`
// Related resources included in the response when requested with the `include` parameter.
Included []OrgGroupMembershipData `json:"included,omitempty"`
// Pagination metadata.
// Pagination links for navigating between pages of an org group list response.
Links *OrgGroupPaginationLinks `json:"links,omitempty"`
// Pagination metadata for org group list responses.
Meta *OrgGroupPaginationMeta `json:"meta,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
Expand Down Expand Up @@ -92,6 +94,34 @@ func (o *OrgGroupListResponse) SetIncluded(v []OrgGroupMembershipData) {
o.Included = v
}

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *OrgGroupListResponse) GetLinks() OrgGroupPaginationLinks {
if o == nil || o.Links == nil {
var ret OrgGroupPaginationLinks
return ret
}
return *o.Links
}

// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrgGroupListResponse) GetLinksOk() (*OrgGroupPaginationLinks, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}

// HasLinks returns a boolean if a field has been set.
func (o *OrgGroupListResponse) HasLinks() bool {
return o != nil && o.Links != nil
}

// SetLinks gets a reference to the given OrgGroupPaginationLinks and assigns it to the Links field.
func (o *OrgGroupListResponse) SetLinks(v OrgGroupPaginationLinks) {
o.Links = &v
}

// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *OrgGroupListResponse) GetMeta() OrgGroupPaginationMeta {
if o == nil || o.Meta == nil {
Expand Down Expand Up @@ -130,6 +160,9 @@ func (o OrgGroupListResponse) MarshalJSON() ([]byte, error) {
if o.Included != nil {
toSerialize["included"] = o.Included
}
if o.Links != nil {
toSerialize["links"] = o.Links
}
if o.Meta != nil {
toSerialize["meta"] = o.Meta
}
Expand All @@ -145,6 +178,7 @@ func (o *OrgGroupListResponse) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Data *[]OrgGroupData `json:"data"`
Included []OrgGroupMembershipData `json:"included,omitempty"`
Links *OrgGroupPaginationLinks `json:"links,omitempty"`
Meta *OrgGroupPaginationMeta `json:"meta,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
Expand All @@ -155,14 +189,18 @@ func (o *OrgGroupListResponse) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"data", "included", "meta"})
datadog.DeleteKeys(additionalProperties, &[]string{"data", "included", "links", "meta"})
} else {
return err
}

hasInvalidField := false
o.Data = *all.Data
o.Included = all.Included
if all.Links != nil && all.Links.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Links = all.Links
if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
Expand Down
46 changes: 42 additions & 4 deletions api/datadogV2/model_org_group_membership_list_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import (
type OrgGroupMembershipListResponse struct {
// An array of org group memberships.
Data []OrgGroupMembershipData `json:"data"`
// Pagination metadata.
// Pagination links for navigating between pages of an org group list response.
Links *OrgGroupPaginationLinks `json:"links,omitempty"`
// Pagination metadata for org group list responses.
Meta *OrgGroupPaginationMeta `json:"meta,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
Expand Down Expand Up @@ -62,6 +64,34 @@ func (o *OrgGroupMembershipListResponse) SetData(v []OrgGroupMembershipData) {
o.Data = v
}

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *OrgGroupMembershipListResponse) GetLinks() OrgGroupPaginationLinks {
if o == nil || o.Links == nil {
var ret OrgGroupPaginationLinks
return ret
}
return *o.Links
}

// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrgGroupMembershipListResponse) GetLinksOk() (*OrgGroupPaginationLinks, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}

// HasLinks returns a boolean if a field has been set.
func (o *OrgGroupMembershipListResponse) HasLinks() bool {
return o != nil && o.Links != nil
}

// SetLinks gets a reference to the given OrgGroupPaginationLinks and assigns it to the Links field.
func (o *OrgGroupMembershipListResponse) SetLinks(v OrgGroupPaginationLinks) {
o.Links = &v
}

// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *OrgGroupMembershipListResponse) GetMeta() OrgGroupPaginationMeta {
if o == nil || o.Meta == nil {
Expand Down Expand Up @@ -97,6 +127,9 @@ func (o OrgGroupMembershipListResponse) MarshalJSON() ([]byte, error) {
return datadog.Marshal(o.UnparsedObject)
}
toSerialize["data"] = o.Data
if o.Links != nil {
toSerialize["links"] = o.Links
}
if o.Meta != nil {
toSerialize["meta"] = o.Meta
}
Expand All @@ -110,8 +143,9 @@ func (o OrgGroupMembershipListResponse) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *OrgGroupMembershipListResponse) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Data *[]OrgGroupMembershipData `json:"data"`
Meta *OrgGroupPaginationMeta `json:"meta,omitempty"`
Data *[]OrgGroupMembershipData `json:"data"`
Links *OrgGroupPaginationLinks `json:"links,omitempty"`
Meta *OrgGroupPaginationMeta `json:"meta,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
Expand All @@ -121,13 +155,17 @@ func (o *OrgGroupMembershipListResponse) UnmarshalJSON(bytes []byte) (err error)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"data", "meta"})
datadog.DeleteKeys(additionalProperties, &[]string{"data", "links", "meta"})
} else {
return err
}

hasInvalidField := false
o.Data = *all.Data
if all.Links != nil && all.Links.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Links = all.Links
if all.Meta != nil && all.Meta.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
Expand Down
Loading
Loading