@@ -12,8 +12,12 @@ import (
1212
1313// APIKeyCreateAttributes Attributes used to create an API Key.
1414type APIKeyCreateAttributes struct {
15+ // The APIKeyCreateAttributes category.
16+ Category * string `json:"category,omitempty"`
1517 // Name of the API key.
1618 Name string `json:"name"`
19+ // The APIKeyCreateAttributes remote_config_read_enabled.
20+ RemoteConfigReadEnabled * bool `json:"remote_config_read_enabled,omitempty"`
1721 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1822 UnparsedObject map [string ]interface {} `json:"-"`
1923 AdditionalProperties map [string ]interface {} `json:"-"`
@@ -37,6 +41,34 @@ func NewAPIKeyCreateAttributesWithDefaults() *APIKeyCreateAttributes {
3741 return & this
3842}
3943
44+ // GetCategory returns the Category field value if set, zero value otherwise.
45+ func (o * APIKeyCreateAttributes ) GetCategory () string {
46+ if o == nil || o .Category == nil {
47+ var ret string
48+ return ret
49+ }
50+ return * o .Category
51+ }
52+
53+ // GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
54+ // and a boolean to check if the value has been set.
55+ func (o * APIKeyCreateAttributes ) GetCategoryOk () (* string , bool ) {
56+ if o == nil || o .Category == nil {
57+ return nil , false
58+ }
59+ return o .Category , true
60+ }
61+
62+ // HasCategory returns a boolean if a field has been set.
63+ func (o * APIKeyCreateAttributes ) HasCategory () bool {
64+ return o != nil && o .Category != nil
65+ }
66+
67+ // SetCategory gets a reference to the given string and assigns it to the Category field.
68+ func (o * APIKeyCreateAttributes ) SetCategory (v string ) {
69+ o .Category = & v
70+ }
71+
4072// GetName returns the Name field value.
4173func (o * APIKeyCreateAttributes ) GetName () string {
4274 if o == nil {
@@ -60,13 +92,47 @@ func (o *APIKeyCreateAttributes) SetName(v string) {
6092 o .Name = v
6193}
6294
95+ // GetRemoteConfigReadEnabled returns the RemoteConfigReadEnabled field value if set, zero value otherwise.
96+ func (o * APIKeyCreateAttributes ) GetRemoteConfigReadEnabled () bool {
97+ if o == nil || o .RemoteConfigReadEnabled == nil {
98+ var ret bool
99+ return ret
100+ }
101+ return * o .RemoteConfigReadEnabled
102+ }
103+
104+ // GetRemoteConfigReadEnabledOk returns a tuple with the RemoteConfigReadEnabled field value if set, nil otherwise
105+ // and a boolean to check if the value has been set.
106+ func (o * APIKeyCreateAttributes ) GetRemoteConfigReadEnabledOk () (* bool , bool ) {
107+ if o == nil || o .RemoteConfigReadEnabled == nil {
108+ return nil , false
109+ }
110+ return o .RemoteConfigReadEnabled , true
111+ }
112+
113+ // HasRemoteConfigReadEnabled returns a boolean if a field has been set.
114+ func (o * APIKeyCreateAttributes ) HasRemoteConfigReadEnabled () bool {
115+ return o != nil && o .RemoteConfigReadEnabled != nil
116+ }
117+
118+ // SetRemoteConfigReadEnabled gets a reference to the given bool and assigns it to the RemoteConfigReadEnabled field.
119+ func (o * APIKeyCreateAttributes ) SetRemoteConfigReadEnabled (v bool ) {
120+ o .RemoteConfigReadEnabled = & v
121+ }
122+
63123// MarshalJSON serializes the struct using spec logic.
64124func (o APIKeyCreateAttributes ) MarshalJSON () ([]byte , error ) {
65125 toSerialize := map [string ]interface {}{}
66126 if o .UnparsedObject != nil {
67127 return datadog .Marshal (o .UnparsedObject )
68128 }
129+ if o .Category != nil {
130+ toSerialize ["category" ] = o .Category
131+ }
69132 toSerialize ["name" ] = o .Name
133+ if o .RemoteConfigReadEnabled != nil {
134+ toSerialize ["remote_config_read_enabled" ] = o .RemoteConfigReadEnabled
135+ }
70136
71137 for key , value := range o .AdditionalProperties {
72138 toSerialize [key ] = value
@@ -77,7 +143,9 @@ func (o APIKeyCreateAttributes) MarshalJSON() ([]byte, error) {
77143// UnmarshalJSON deserializes the given payload.
78144func (o * APIKeyCreateAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
79145 all := struct {
80- Name * string `json:"name"`
146+ Category * string `json:"category,omitempty"`
147+ Name * string `json:"name"`
148+ RemoteConfigReadEnabled * bool `json:"remote_config_read_enabled,omitempty"`
81149 }{}
82150 if err = datadog .Unmarshal (bytes , & all ); err != nil {
83151 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -87,11 +155,13 @@ func (o *APIKeyCreateAttributes) UnmarshalJSON(bytes []byte) (err error) {
87155 }
88156 additionalProperties := make (map [string ]interface {})
89157 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
90- datadog .DeleteKeys (additionalProperties , & []string {"name" })
158+ datadog .DeleteKeys (additionalProperties , & []string {"category" , " name" , "remote_config_read_enabled " })
91159 } else {
92160 return err
93161 }
162+ o .Category = all .Category
94163 o .Name = * all .Name
164+ o .RemoteConfigReadEnabled = all .RemoteConfigReadEnabled
95165
96166 if len (additionalProperties ) > 0 {
97167 o .AdditionalProperties = additionalProperties
0 commit comments