@@ -16,6 +16,8 @@ type FullAPIKeyAttributes struct {
1616 Category * string `json:"category,omitempty"`
1717 // Creation date of the API key.
1818 CreatedAt * time.Time `json:"created_at,omitempty"`
19+ // Date the API Key was last used
20+ DateLastUsed datadog.NullableTime `json:"date_last_used,omitempty"`
1921 // The API key.
2022 Key * string `json:"key,omitempty"`
2123 // The last four characters of the API key.
@@ -104,6 +106,45 @@ func (o *FullAPIKeyAttributes) SetCreatedAt(v time.Time) {
104106 o .CreatedAt = & v
105107}
106108
109+ // GetDateLastUsed returns the DateLastUsed field value if set, zero value otherwise (both if not set or set to explicit null).
110+ func (o * FullAPIKeyAttributes ) GetDateLastUsed () time.Time {
111+ if o == nil || o .DateLastUsed .Get () == nil {
112+ var ret time.Time
113+ return ret
114+ }
115+ return * o .DateLastUsed .Get ()
116+ }
117+
118+ // GetDateLastUsedOk returns a tuple with the DateLastUsed field value if set, nil otherwise
119+ // and a boolean to check if the value has been set.
120+ // NOTE: If the value is an explicit nil, `nil, true` will be returned.
121+ func (o * FullAPIKeyAttributes ) GetDateLastUsedOk () (* time.Time , bool ) {
122+ if o == nil {
123+ return nil , false
124+ }
125+ return o .DateLastUsed .Get (), o .DateLastUsed .IsSet ()
126+ }
127+
128+ // HasDateLastUsed returns a boolean if a field has been set.
129+ func (o * FullAPIKeyAttributes ) HasDateLastUsed () bool {
130+ return o != nil && o .DateLastUsed .IsSet ()
131+ }
132+
133+ // SetDateLastUsed gets a reference to the given datadog.NullableTime and assigns it to the DateLastUsed field.
134+ func (o * FullAPIKeyAttributes ) SetDateLastUsed (v time.Time ) {
135+ o .DateLastUsed .Set (& v )
136+ }
137+
138+ // SetDateLastUsedNil sets the value for DateLastUsed to be an explicit nil.
139+ func (o * FullAPIKeyAttributes ) SetDateLastUsedNil () {
140+ o .DateLastUsed .Set (nil )
141+ }
142+
143+ // UnsetDateLastUsed ensures that no value is present for DateLastUsed, not even an explicit nil.
144+ func (o * FullAPIKeyAttributes ) UnsetDateLastUsed () {
145+ o .DateLastUsed .Unset ()
146+ }
147+
107148// GetKey returns the Key field value if set, zero value otherwise.
108149func (o * FullAPIKeyAttributes ) GetKey () string {
109150 if o == nil || o .Key == nil {
@@ -260,6 +301,9 @@ func (o FullAPIKeyAttributes) MarshalJSON() ([]byte, error) {
260301 toSerialize ["created_at" ] = o .CreatedAt .Format ("2006-01-02T15:04:05.000Z07:00" )
261302 }
262303 }
304+ if o .DateLastUsed .IsSet () {
305+ toSerialize ["date_last_used" ] = o .DateLastUsed .Get ()
306+ }
263307 if o .Key != nil {
264308 toSerialize ["key" ] = o .Key
265309 }
@@ -289,25 +333,27 @@ func (o FullAPIKeyAttributes) MarshalJSON() ([]byte, error) {
289333// UnmarshalJSON deserializes the given payload.
290334func (o * FullAPIKeyAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
291335 all := struct {
292- Category * string `json:"category,omitempty"`
293- CreatedAt * time.Time `json:"created_at,omitempty"`
294- Key * string `json:"key,omitempty"`
295- Last4 * string `json:"last4,omitempty"`
296- ModifiedAt * time.Time `json:"modified_at,omitempty"`
297- Name * string `json:"name,omitempty"`
298- RemoteConfigReadEnabled * bool `json:"remote_config_read_enabled,omitempty"`
336+ Category * string `json:"category,omitempty"`
337+ CreatedAt * time.Time `json:"created_at,omitempty"`
338+ DateLastUsed datadog.NullableTime `json:"date_last_used,omitempty"`
339+ Key * string `json:"key,omitempty"`
340+ Last4 * string `json:"last4,omitempty"`
341+ ModifiedAt * time.Time `json:"modified_at,omitempty"`
342+ Name * string `json:"name,omitempty"`
343+ RemoteConfigReadEnabled * bool `json:"remote_config_read_enabled,omitempty"`
299344 }{}
300345 if err = datadog .Unmarshal (bytes , & all ); err != nil {
301346 return datadog .Unmarshal (bytes , & o .UnparsedObject )
302347 }
303348 additionalProperties := make (map [string ]interface {})
304349 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
305- datadog .DeleteKeys (additionalProperties , & []string {"category" , "created_at" , "key" , "last4" , "modified_at" , "name" , "remote_config_read_enabled" })
350+ datadog .DeleteKeys (additionalProperties , & []string {"category" , "created_at" , "date_last_used" , " key" , "last4" , "modified_at" , "name" , "remote_config_read_enabled" })
306351 } else {
307352 return err
308353 }
309354 o .Category = all .Category
310355 o .CreatedAt = all .CreatedAt
356+ o .DateLastUsed = all .DateLastUsed
311357 o .Key = all .Key
312358 o .Last4 = all .Last4
313359 o .ModifiedAt = all .ModifiedAt
0 commit comments