Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable route for auto merging #2598

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-23 18:14:11.476548",
"spec_repo_commit": "9e027051"
"regenerated": "2024-07-24 14:16:03.948330",
"spec_repo_commit": "7824ffe8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-23 18:14:11.494752",
"spec_repo_commit": "9e027051"
"regenerated": "2024-07-24 14:16:03.966211",
"spec_repo_commit": "7824ffe8"
}
}
}
11 changes: 5 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,6 @@ components:
properties:
data:
$ref: '#/components/schemas/FullApplicationKey'
included:
description: Array of objects related to the application key.
items:
$ref: '#/components/schemas/ApplicationKeyResponseIncludedItem'
type: array
type: object
ApplicationKeyResponseIncludedItem:
description: An object related to an application key.
Expand Down Expand Up @@ -1009,7 +1004,6 @@ components:
type:
$ref: '#/components/schemas/ApplicationKeysType'
required:
- attributes
- id
- type
type: object
Expand Down Expand Up @@ -8232,18 +8226,23 @@ components:
$ref: '#/components/schemas/FullApplicationKeyAttributes'
id:
description: ID of the application key.
example: 00112233-4455-6677-8899-aabbccddeeff
type: string
relationships:
$ref: '#/components/schemas/ApplicationKeyRelationships'
type:
$ref: '#/components/schemas/ApplicationKeysType'
required:
- id
- type
type: object
FullApplicationKeyAttributes:
description: Attributes of a full application key.
properties:
created_at:
description: Creation date of the application key.
example: '2020-11-23T10:00:00.000Z'
format: date-time
readOnly: true
type: string
key:
Expand Down
39 changes: 2 additions & 37 deletions api/datadogV2/model_application_key_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
type ApplicationKeyResponse struct {
// Datadog application key.
Data *FullApplicationKey `json:"data,omitempty"`
// Array of objects related to the application key.
Included []ApplicationKeyResponseIncludedItem `json:"included,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{}
Expand Down Expand Up @@ -64,34 +62,6 @@ func (o *ApplicationKeyResponse) SetData(v FullApplicationKey) {
o.Data = &v
}

// GetIncluded returns the Included field value if set, zero value otherwise.
func (o *ApplicationKeyResponse) GetIncluded() []ApplicationKeyResponseIncludedItem {
if o == nil || o.Included == nil {
var ret []ApplicationKeyResponseIncludedItem
return ret
}
return o.Included
}

// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationKeyResponse) GetIncludedOk() (*[]ApplicationKeyResponseIncludedItem, bool) {
if o == nil || o.Included == nil {
return nil, false
}
return &o.Included, true
}

// HasIncluded returns a boolean if a field has been set.
func (o *ApplicationKeyResponse) HasIncluded() bool {
return o != nil && o.Included != nil
}

// SetIncluded gets a reference to the given []ApplicationKeyResponseIncludedItem and assigns it to the Included field.
func (o *ApplicationKeyResponse) SetIncluded(v []ApplicationKeyResponseIncludedItem) {
o.Included = v
}

// MarshalJSON serializes the struct using spec logic.
func (o ApplicationKeyResponse) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand All @@ -101,9 +71,6 @@ func (o ApplicationKeyResponse) MarshalJSON() ([]byte, error) {
if o.Data != nil {
toSerialize["data"] = o.Data
}
if o.Included != nil {
toSerialize["included"] = o.Included
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand All @@ -114,15 +81,14 @@ func (o ApplicationKeyResponse) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *ApplicationKeyResponse) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Data *FullApplicationKey `json:"data,omitempty"`
Included []ApplicationKeyResponseIncludedItem `json:"included,omitempty"`
Data *FullApplicationKey `json:"data,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"data", "included"})
datadog.DeleteKeys(additionalProperties, &[]string{"data"})
} else {
return err
}
Expand All @@ -132,7 +98,6 @@ func (o *ApplicationKeyResponse) UnmarshalJSON(bytes []byte) (err error) {
hasInvalidField = true
}
o.Data = all.Data
o.Included = all.Included

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
39 changes: 21 additions & 18 deletions api/datadogV2/model_application_key_update_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// ApplicationKeyUpdateData Object used to update an application key.
type ApplicationKeyUpdateData struct {
// Attributes used to update an application Key.
Attributes ApplicationKeyUpdateAttributes `json:"attributes"`
Attributes *ApplicationKeyUpdateAttributes `json:"attributes,omitempty"`
// ID of the application key.
Id string `json:"id"`
// Application Keys resource type.
Expand All @@ -27,9 +27,8 @@ type ApplicationKeyUpdateData struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed.
func NewApplicationKeyUpdateData(attributes ApplicationKeyUpdateAttributes, id string, typeVar ApplicationKeysType) *ApplicationKeyUpdateData {
func NewApplicationKeyUpdateData(id string, typeVar ApplicationKeysType) *ApplicationKeyUpdateData {
this := ApplicationKeyUpdateData{}
this.Attributes = attributes
this.Id = id
this.Type = typeVar
return &this
Expand All @@ -45,27 +44,32 @@ func NewApplicationKeyUpdateDataWithDefaults() *ApplicationKeyUpdateData {
return &this
}

// GetAttributes returns the Attributes field value.
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *ApplicationKeyUpdateData) GetAttributes() ApplicationKeyUpdateAttributes {
if o == nil {
if o == nil || o.Attributes == nil {
var ret ApplicationKeyUpdateAttributes
return ret
}
return o.Attributes
return *o.Attributes
}

// GetAttributesOk returns a tuple with the Attributes field value
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationKeyUpdateData) GetAttributesOk() (*ApplicationKeyUpdateAttributes, bool) {
if o == nil {
if o == nil || o.Attributes == nil {
return nil, false
}
return &o.Attributes, true
return o.Attributes, true
}

// HasAttributes returns a boolean if a field has been set.
func (o *ApplicationKeyUpdateData) HasAttributes() bool {
return o != nil && o.Attributes != nil
}

// SetAttributes sets field value.
// SetAttributes gets a reference to the given ApplicationKeyUpdateAttributes and assigns it to the Attributes field.
func (o *ApplicationKeyUpdateData) SetAttributes(v ApplicationKeyUpdateAttributes) {
o.Attributes = v
o.Attributes = &v
}

// GetId returns the Id field value.
Expand Down Expand Up @@ -120,7 +124,9 @@ func (o ApplicationKeyUpdateData) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
toSerialize["attributes"] = o.Attributes
if o.Attributes != nil {
toSerialize["attributes"] = o.Attributes
}
toSerialize["id"] = o.Id
toSerialize["type"] = o.Type

Expand All @@ -133,16 +139,13 @@ func (o ApplicationKeyUpdateData) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *ApplicationKeyUpdateData) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Attributes *ApplicationKeyUpdateAttributes `json:"attributes"`
Attributes *ApplicationKeyUpdateAttributes `json:"attributes,omitempty"`
Id *string `json:"id"`
Type *ApplicationKeysType `json:"type"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
if all.Attributes == nil {
return fmt.Errorf("required field attributes missing")
}
if all.Id == nil {
return fmt.Errorf("required field id missing")
}
Expand All @@ -157,10 +160,10 @@ func (o *ApplicationKeyUpdateData) UnmarshalJSON(bytes []byte) (err error) {
}

hasInvalidField := false
if all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil {
if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Attributes = *all.Attributes
o.Attributes = all.Attributes
o.Id = *all.Id
if !all.Type.IsValid() {
hasInvalidField = true
Expand Down
Loading
Loading