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": "e4f653f",
"generated": "2025-07-25 14:08:41.556"
"spec_repo_commit": "b737cc4",
"generated": "2025-07-28 13:12:54.236"
}
11 changes: 11 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22867,6 +22867,17 @@ components:
maximum: 5
minimum: 0
type: number
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
37 changes: 36 additions & 1 deletion api/datadogV2/model_metric_dashboard_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
type MetricDashboardAttributes struct {
// Value from 0 to 5 that ranks popularity of the dashboard.
Popularity *float64 `json:"popularity,omitempty"`
// 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 Down Expand Up @@ -66,6 +68,34 @@ func (o *MetricDashboardAttributes) SetPopularity(v float64) {
o.Popularity = &v
}

// GetTags returns the Tags field value if set, zero value otherwise.
func (o *MetricDashboardAttributes) 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 *MetricDashboardAttributes) 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 *MetricDashboardAttributes) 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 *MetricDashboardAttributes) SetTags(v []string) {
o.Tags = v
}

// GetTitle returns the Title field value if set, zero value otherwise.
func (o *MetricDashboardAttributes) GetTitle() string {
if o == nil || o.Title == nil {
Expand Down Expand Up @@ -131,6 +161,9 @@ func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) {
if o.Popularity != nil {
toSerialize["popularity"] = o.Popularity
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if o.Title != nil {
toSerialize["title"] = o.Title
}
Expand All @@ -148,6 +181,7 @@ func (o MetricDashboardAttributes) MarshalJSON() ([]byte, error) {
func (o *MetricDashboardAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Popularity *float64 `json:"popularity,omitempty"`
Tags []string `json:"tags,omitempty"`
Title *string `json:"title,omitempty"`
Url *string `json:"url,omitempty"`
}{}
Expand All @@ -156,11 +190,12 @@ func (o *MetricDashboardAttributes) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "title", "url"})
datadog.DeleteKeys(additionalProperties, &[]string{"popularity", "tags", "title", "url"})
} else {
return err
}
o.Popularity = all.Popularity
o.Tags = all.Tags
o.Title = all.Title
o.Url = all.Url

Expand Down
Loading