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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "4727afe",
"generated": "2025-07-23 15:38:09.447"
"spec_repo_commit": "c09ac23",
"generated": "2025-07-24 19:59:27.040"
}
13 changes: 12 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22454,8 +22454,19 @@ components:
readOnly: true
type: object
MetricAssetAttributes:
description: Assets related to the object, including title and url.
description: Assets related to the object, including title, url, and tags.
properties:
tags:
description: List of tag keys used in the asset.
example:
- env
- service
- host
- datacenter
items:
description: Tag key used in assets.
type: string
type: array
title:
description: Title of the asset.
type: string
Expand Down
43 changes: 39 additions & 4 deletions api/datadogV2/model_metric_asset_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// MetricAssetAttributes Assets related to the object, including title and url.
// MetricAssetAttributes Assets related to the object, including title, url, and tags.
type MetricAssetAttributes struct {
// List of tag keys used in the asset.
Tags []string `json:"tags,omitempty"`
// Title of the asset.
Title *string `json:"title,omitempty"`
// URL path of the asset.
Expand All @@ -36,6 +38,34 @@ func NewMetricAssetAttributesWithDefaults() *MetricAssetAttributes {
return &this
}

// GetTags returns the Tags field value if set, zero value otherwise.
func (o *MetricAssetAttributes) GetTags() []string {
if o == nil || o.Tags == nil {
var ret []string
return ret
}
return o.Tags
}

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

// HasTags returns a boolean if a field has been set.
func (o *MetricAssetAttributes) HasTags() bool {
return o != nil && o.Tags != nil
}

// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *MetricAssetAttributes) SetTags(v []string) {
o.Tags = v
}

// GetTitle returns the Title field value if set, zero value otherwise.
func (o *MetricAssetAttributes) GetTitle() string {
if o == nil || o.Title == nil {
Expand Down Expand Up @@ -98,6 +128,9 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if o.Title != nil {
toSerialize["title"] = o.Title
}
Expand All @@ -114,18 +147,20 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *MetricAssetAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Title *string `json:"title,omitempty"`
Url *string `json:"url,omitempty"`
Tags []string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
Url *string `json:"url,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{"title", "url"})
datadog.DeleteKeys(additionalProperties, &[]string{"tags", "title", "url"})
} else {
return err
}
o.Tags = all.Tags
o.Title = all.Title
o.Url = all.Url

Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_metric_monitor_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// MetricMonitorAsset A monitor object with title.
type MetricMonitorAsset struct {
// Assets related to the object, including title and url.
// Assets related to the object, including title, url, and tags.
Attributes *MetricAssetAttributes `json:"attributes,omitempty"`
// The related monitor's ID.
Id string `json:"id"`
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_metric_notebook_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// MetricNotebookAsset A notebook object with title.
type MetricNotebookAsset struct {
// Assets related to the object, including title and url.
// Assets related to the object, including title, url, and tags.
Attributes *MetricAssetAttributes `json:"attributes,omitempty"`
// The related notebook's ID.
Id string `json:"id"`
Expand Down
2 changes: 1 addition & 1 deletion api/datadogV2/model_metric_slo_asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// MetricSLOAsset A SLO object with title.
type MetricSLOAsset struct {
// Assets related to the object, including title and url.
// Assets related to the object, including title, url, and tags.
Attributes *MetricAssetAttributes `json:"attributes,omitempty"`
// The SLO ID.
Id string `json:"id"`
Expand Down
Loading