@@ -8,8 +8,10 @@ import (
88 "github.com/DataDog/datadog-api-client-go/v2/api/datadog"
99)
1010
11- // MetricAssetAttributes Assets related to the object, including title and url .
11+ // MetricAssetAttributes Assets related to the object, including title, url, and tags .
1212type MetricAssetAttributes struct {
13+ // List of tag keys used in the asset.
14+ Tags []string `json:"tags,omitempty"`
1315 // Title of the asset.
1416 Title * string `json:"title,omitempty"`
1517 // URL path of the asset.
@@ -36,6 +38,34 @@ func NewMetricAssetAttributesWithDefaults() *MetricAssetAttributes {
3638 return & this
3739}
3840
41+ // GetTags returns the Tags field value if set, zero value otherwise.
42+ func (o * MetricAssetAttributes ) GetTags () []string {
43+ if o == nil || o .Tags == nil {
44+ var ret []string
45+ return ret
46+ }
47+ return o .Tags
48+ }
49+
50+ // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
51+ // and a boolean to check if the value has been set.
52+ func (o * MetricAssetAttributes ) GetTagsOk () (* []string , bool ) {
53+ if o == nil || o .Tags == nil {
54+ return nil , false
55+ }
56+ return & o .Tags , true
57+ }
58+
59+ // HasTags returns a boolean if a field has been set.
60+ func (o * MetricAssetAttributes ) HasTags () bool {
61+ return o != nil && o .Tags != nil
62+ }
63+
64+ // SetTags gets a reference to the given []string and assigns it to the Tags field.
65+ func (o * MetricAssetAttributes ) SetTags (v []string ) {
66+ o .Tags = v
67+ }
68+
3969// GetTitle returns the Title field value if set, zero value otherwise.
4070func (o * MetricAssetAttributes ) GetTitle () string {
4171 if o == nil || o .Title == nil {
@@ -98,6 +128,9 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) {
98128 if o .UnparsedObject != nil {
99129 return datadog .Marshal (o .UnparsedObject )
100130 }
131+ if o .Tags != nil {
132+ toSerialize ["tags" ] = o .Tags
133+ }
101134 if o .Title != nil {
102135 toSerialize ["title" ] = o .Title
103136 }
@@ -114,18 +147,20 @@ func (o MetricAssetAttributes) MarshalJSON() ([]byte, error) {
114147// UnmarshalJSON deserializes the given payload.
115148func (o * MetricAssetAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
116149 all := struct {
117- Title * string `json:"title,omitempty"`
118- Url * string `json:"url,omitempty"`
150+ Tags []string `json:"tags,omitempty"`
151+ Title * string `json:"title,omitempty"`
152+ Url * string `json:"url,omitempty"`
119153 }{}
120154 if err = datadog .Unmarshal (bytes , & all ); err != nil {
121155 return datadog .Unmarshal (bytes , & o .UnparsedObject )
122156 }
123157 additionalProperties := make (map [string ]interface {})
124158 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
125- datadog .DeleteKeys (additionalProperties , & []string {"title" , "url" })
159+ datadog .DeleteKeys (additionalProperties , & []string {"tags" , " title" , "url" })
126160 } else {
127161 return err
128162 }
163+ o .Tags = all .Tags
129164 o .Title = all .Title
130165 o .Url = all .Url
131166
0 commit comments