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
6 changes: 6 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35837,6 +35837,12 @@ components:
RUMApplicationAttributes:
description: RUM application attributes.
properties:
api_key_id:
description: ID of the API key associated with the application.
example: 123456789
format: int32
maximum: 2147483647
type: integer
application_id:
description: ID of the RUM application.
example: abcd1234-0000-0000-abcd-1234abcd5678
Expand Down
37 changes: 36 additions & 1 deletion api/datadogV2/model_rum_application_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

// RUMApplicationAttributes RUM application attributes.
type RUMApplicationAttributes struct {
// ID of the API key associated with the application.
ApiKeyId *int32 `json:"api_key_id,omitempty"`
// ID of the RUM application.
ApplicationId string `json:"application_id"`
// Client token of the RUM application.
Expand Down Expand Up @@ -67,6 +69,34 @@ func NewRUMApplicationAttributesWithDefaults() *RUMApplicationAttributes {
return &this
}

// GetApiKeyId returns the ApiKeyId field value if set, zero value otherwise.
func (o *RUMApplicationAttributes) GetApiKeyId() int32 {
if o == nil || o.ApiKeyId == nil {
var ret int32
return ret
}
return *o.ApiKeyId
}

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

// HasApiKeyId returns a boolean if a field has been set.
func (o *RUMApplicationAttributes) HasApiKeyId() bool {
return o != nil && o.ApiKeyId != nil
}

// SetApiKeyId gets a reference to the given int32 and assigns it to the ApiKeyId field.
func (o *RUMApplicationAttributes) SetApiKeyId(v int32) {
o.ApiKeyId = &v
}

// GetApplicationId returns the ApplicationId field value.
func (o *RUMApplicationAttributes) GetApplicationId() string {
if o == nil {
Expand Down Expand Up @@ -364,6 +394,9 @@ func (o RUMApplicationAttributes) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.ApiKeyId != nil {
toSerialize["api_key_id"] = o.ApiKeyId
}
toSerialize["application_id"] = o.ApplicationId
toSerialize["client_token"] = o.ClientToken
toSerialize["created_at"] = o.CreatedAt
Expand Down Expand Up @@ -392,6 +425,7 @@ func (o RUMApplicationAttributes) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *RUMApplicationAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
ApiKeyId *int32 `json:"api_key_id,omitempty"`
ApplicationId *string `json:"application_id"`
ClientToken *string `json:"client_token"`
CreatedAt *int64 `json:"created_at"`
Expand Down Expand Up @@ -437,12 +471,13 @@ func (o *RUMApplicationAttributes) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"application_id", "client_token", "created_at", "created_by_handle", "hash", "is_active", "name", "org_id", "product_scales", "type", "updated_at", "updated_by_handle"})
datadog.DeleteKeys(additionalProperties, &[]string{"api_key_id", "application_id", "client_token", "created_at", "created_by_handle", "hash", "is_active", "name", "org_id", "product_scales", "type", "updated_at", "updated_by_handle"})
} else {
return err
}

hasInvalidField := false
o.ApiKeyId = all.ApiKeyId
o.ApplicationId = *all.ApplicationId
o.ClientToken = *all.ClientToken
o.CreatedAt = *all.CreatedAt
Expand Down
Loading