Skip to content

Commit 4a0eb01

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4a45fa7 of spec repo
1 parent 2dafb57 commit 4a0eb01

19 files changed

Lines changed: 126 additions & 165 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,9 +1132,9 @@ components:
11321132
schema:
11331133
type: string
11341134
PersonalAccessTokenID:
1135-
description: The UUID of the personal access token.
1135+
description: The ID of the personal access token.
11361136
in: path
1137-
name: pat_uuid
1137+
name: pat_id
11381138
required: true
11391139
schema:
11401140
example: "00000000-0000-1234-0000-000000000000"
@@ -29172,11 +29172,6 @@ components:
2917229172
FullPersonalAccessTokenAttributes:
2917329173
description: Attributes of a full personal access token, including the token key.
2917429174
properties:
29175-
alias:
29176-
description: The alias (short identifier) of the personal access token.
29177-
example: "2H9MCNMBM8FQjQ16YucXkX"
29178-
readOnly: true
29179-
type: string
2918029175
created_at:
2918129176
description: Creation date of the personal access token.
2918229177
example: "2024-01-01T00:00:00+00:00"
@@ -52995,11 +52990,6 @@ components:
5299552990
PersonalAccessTokenAttributes:
5299652991
description: Attributes of a personal access token.
5299752992
properties:
52998-
alias:
52999-
description: The alias (short identifier) of the personal access token.
53000-
example: "2H9MCNMBM8FQjQ16YucXkX"
53001-
readOnly: true
53002-
type: string
5300352993
created_at:
5300452994
description: Creation date of the personal access token.
5300552995
example: "2024-01-01T00:00:00+00:00"
@@ -77461,6 +77451,10 @@ components:
7746177451
description: Title of the user.
7746277452
nullable: true
7746377453
type: string
77454+
uuid:
77455+
description: UUID of the user.
77456+
readOnly: true
77457+
type: string
7746477458
verified:
7746577459
description: Whether the user is verified.
7746677460
type: boolean
@@ -105498,7 +105492,7 @@ paths:
105498105492
operator: OR
105499105493
permissions:
105500105494
- user_app_keys
105501-
/api/v2/personal_access_tokens/{pat_uuid}:
105495+
/api/v2/personal_access_tokens/{pat_id}:
105502105496
delete:
105503105497
description: Revoke a specific personal access token.
105504105498
operationId: RevokePersonalAccessToken
@@ -115188,7 +115182,7 @@ paths:
115188115182
operator: OR
115189115183
permissions:
115190115184
- service_account_write
115191-
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}:
115185+
/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}:
115192115186
delete:
115193115187
description: Revoke a specific access token for a service account.
115194115188
operationId: RevokeServiceAccountAccessToken

api/datadogV2/api_key_management.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ func (a *KeyManagementApi) GetCurrentUserApplicationKey(ctx _context.Context, ap
753753

754754
// GetPersonalAccessToken Get a personal access token.
755755
// Get a specific personal access token by its UUID.
756-
func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patUuid string) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
756+
func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patId string) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
757757
var (
758758
localVarHTTPMethod = _nethttp.MethodGet
759759
localVarPostBody interface{}
@@ -765,8 +765,8 @@ func (a *KeyManagementApi) GetPersonalAccessToken(ctx _context.Context, patUuid
765765
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
766766
}
767767

768-
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}"
769-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
768+
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}"
769+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
770770

771771
localVarHeaderParams := make(map[string]string)
772772
localVarQueryParams := _neturl.Values{}
@@ -1519,7 +1519,7 @@ func (a *KeyManagementApi) ListPersonalAccessTokens(ctx _context.Context, o ...L
15191519

15201520
// RevokePersonalAccessToken Revoke a personal access token.
15211521
// Revoke a specific personal access token.
1522-
func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patUuid string) (*_nethttp.Response, error) {
1522+
func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patId string) (*_nethttp.Response, error) {
15231523
var (
15241524
localVarHTTPMethod = _nethttp.MethodDelete
15251525
localVarPostBody interface{}
@@ -1530,8 +1530,8 @@ func (a *KeyManagementApi) RevokePersonalAccessToken(ctx _context.Context, patUu
15301530
return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
15311531
}
15321532

1533-
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}"
1534-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
1533+
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}"
1534+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
15351535

15361536
localVarHeaderParams := make(map[string]string)
15371537
localVarQueryParams := _neturl.Values{}
@@ -1831,7 +1831,7 @@ func (a *KeyManagementApi) UpdateCurrentUserApplicationKey(ctx _context.Context,
18311831

18321832
// UpdatePersonalAccessToken Update a personal access token.
18331833
// Update a specific personal access token.
1834-
func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patUuid string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
1834+
func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patId string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
18351835
var (
18361836
localVarHTTPMethod = _nethttp.MethodPatch
18371837
localVarPostBody interface{}
@@ -1843,8 +1843,8 @@ func (a *KeyManagementApi) UpdatePersonalAccessToken(ctx _context.Context, patUu
18431843
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
18441844
}
18451845

1846-
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_uuid}"
1847-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
1846+
localVarPath := localBasePath + "/api/v2/personal_access_tokens/{pat_id}"
1847+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
18481848

18491849
localVarHeaderParams := make(map[string]string)
18501850
localVarQueryParams := _neturl.Values{}

api/datadogV2/api_service_accounts.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (a *ServiceAccountsApi) DeleteServiceAccountApplicationKey(ctx _context.Con
328328

329329
// GetServiceAccountAccessToken Get an access token for a service account.
330330
// Get a specific access token for a service account by its UUID.
331-
func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
331+
func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
332332
var (
333333
localVarHTTPMethod = _nethttp.MethodGet
334334
localVarPostBody interface{}
@@ -340,9 +340,9 @@ func (a *ServiceAccountsApi) GetServiceAccountAccessToken(ctx _context.Context,
340340
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
341341
}
342342

343-
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}"
343+
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}"
344344
localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, "")))
345-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
345+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
346346

347347
localVarHeaderParams := make(map[string]string)
348348
localVarQueryParams := _neturl.Values{}
@@ -778,7 +778,7 @@ func (a *ServiceAccountsApi) ListServiceAccountApplicationKeys(ctx _context.Cont
778778

779779
// RevokeServiceAccountAccessToken Revoke an access token for a service account.
780780
// Revoke a specific access token for a service account.
781-
func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string) (*_nethttp.Response, error) {
781+
func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string) (*_nethttp.Response, error) {
782782
var (
783783
localVarHTTPMethod = _nethttp.MethodDelete
784784
localVarPostBody interface{}
@@ -789,9 +789,9 @@ func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Contex
789789
return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
790790
}
791791

792-
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}"
792+
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}"
793793
localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, "")))
794-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
794+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
795795

796796
localVarHeaderParams := make(map[string]string)
797797
localVarQueryParams := _neturl.Values{}
@@ -847,7 +847,7 @@ func (a *ServiceAccountsApi) RevokeServiceAccountAccessToken(ctx _context.Contex
847847

848848
// UpdateServiceAccountAccessToken Update an access token for a service account.
849849
// Update a specific access token for a service account.
850-
func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patUuid string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
850+
func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Context, serviceAccountId string, patId string, body PersonalAccessTokenUpdateRequest) (PersonalAccessTokenResponse, *_nethttp.Response, error) {
851851
var (
852852
localVarHTTPMethod = _nethttp.MethodPatch
853853
localVarPostBody interface{}
@@ -859,9 +859,9 @@ func (a *ServiceAccountsApi) UpdateServiceAccountAccessToken(ctx _context.Contex
859859
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
860860
}
861861

862-
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}"
862+
localVarPath := localBasePath + "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}"
863863
localVarPath = datadog.ReplacePathParameter(localVarPath, "{service_account_id}", _neturl.PathEscape(datadog.ParameterToString(serviceAccountId, "")))
864-
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_uuid}", _neturl.PathEscape(datadog.ParameterToString(patUuid, "")))
864+
localVarPath = datadog.ReplacePathParameter(localVarPath, "{pat_id}", _neturl.PathEscape(datadog.ParameterToString(patId, "")))
865865

866866
localVarHeaderParams := make(map[string]string)
867867
localVarQueryParams := _neturl.Values{}

api/datadogV2/model_full_personal_access_token_attributes.go

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212

1313
// FullPersonalAccessTokenAttributes Attributes of a full personal access token, including the token key.
1414
type FullPersonalAccessTokenAttributes struct {
15-
// The alias (short identifier) of the personal access token.
16-
Alias *string `json:"alias,omitempty"`
1715
// Creation date of the personal access token.
1816
CreatedAt *time.Time `json:"created_at,omitempty"`
1917
// Expiration date of the personal access token.
@@ -48,34 +46,6 @@ func NewFullPersonalAccessTokenAttributesWithDefaults() *FullPersonalAccessToken
4846
return &this
4947
}
5048

51-
// GetAlias returns the Alias field value if set, zero value otherwise.
52-
func (o *FullPersonalAccessTokenAttributes) GetAlias() string {
53-
if o == nil || o.Alias == nil {
54-
var ret string
55-
return ret
56-
}
57-
return *o.Alias
58-
}
59-
60-
// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise
61-
// and a boolean to check if the value has been set.
62-
func (o *FullPersonalAccessTokenAttributes) GetAliasOk() (*string, bool) {
63-
if o == nil || o.Alias == nil {
64-
return nil, false
65-
}
66-
return o.Alias, true
67-
}
68-
69-
// HasAlias returns a boolean if a field has been set.
70-
func (o *FullPersonalAccessTokenAttributes) HasAlias() bool {
71-
return o != nil && o.Alias != nil
72-
}
73-
74-
// SetAlias gets a reference to the given string and assigns it to the Alias field.
75-
func (o *FullPersonalAccessTokenAttributes) SetAlias(v string) {
76-
o.Alias = &v
77-
}
78-
7949
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
8050
func (o *FullPersonalAccessTokenAttributes) GetCreatedAt() time.Time {
8151
if o == nil || o.CreatedAt == nil {
@@ -261,9 +231,6 @@ func (o FullPersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) {
261231
if o.UnparsedObject != nil {
262232
return datadog.Marshal(o.UnparsedObject)
263233
}
264-
if o.Alias != nil {
265-
toSerialize["alias"] = o.Alias
266-
}
267234
if o.CreatedAt != nil {
268235
if o.CreatedAt.Nanosecond() == 0 {
269236
toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00")
@@ -296,7 +263,6 @@ func (o FullPersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) {
296263
// UnmarshalJSON deserializes the given payload.
297264
func (o *FullPersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error) {
298265
all := struct {
299-
Alias *string `json:"alias,omitempty"`
300266
CreatedAt *time.Time `json:"created_at,omitempty"`
301267
ExpiresAt datadog.NullableTime `json:"expires_at,omitempty"`
302268
Key *string `json:"key,omitempty"`
@@ -309,11 +275,10 @@ func (o *FullPersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err err
309275
}
310276
additionalProperties := make(map[string]interface{})
311277
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
312-
datadog.DeleteKeys(additionalProperties, &[]string{"alias", "created_at", "expires_at", "key", "name", "public_portion", "scopes"})
278+
datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "expires_at", "key", "name", "public_portion", "scopes"})
313279
} else {
314280
return err
315281
}
316-
o.Alias = all.Alias
317282
o.CreatedAt = all.CreatedAt
318283
o.ExpiresAt = all.ExpiresAt
319284
o.Key = all.Key

api/datadogV2/model_personal_access_token_attributes.go

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212

1313
// PersonalAccessTokenAttributes Attributes of a personal access token.
1414
type PersonalAccessTokenAttributes struct {
15-
// The alias (short identifier) of the personal access token.
16-
Alias *string `json:"alias,omitempty"`
1715
// Creation date of the personal access token.
1816
CreatedAt *time.Time `json:"created_at,omitempty"`
1917
// Expiration date of the personal access token.
@@ -50,34 +48,6 @@ func NewPersonalAccessTokenAttributesWithDefaults() *PersonalAccessTokenAttribut
5048
return &this
5149
}
5250

53-
// GetAlias returns the Alias field value if set, zero value otherwise.
54-
func (o *PersonalAccessTokenAttributes) GetAlias() string {
55-
if o == nil || o.Alias == nil {
56-
var ret string
57-
return ret
58-
}
59-
return *o.Alias
60-
}
61-
62-
// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise
63-
// and a boolean to check if the value has been set.
64-
func (o *PersonalAccessTokenAttributes) GetAliasOk() (*string, bool) {
65-
if o == nil || o.Alias == nil {
66-
return nil, false
67-
}
68-
return o.Alias, true
69-
}
70-
71-
// HasAlias returns a boolean if a field has been set.
72-
func (o *PersonalAccessTokenAttributes) HasAlias() bool {
73-
return o != nil && o.Alias != nil
74-
}
75-
76-
// SetAlias gets a reference to the given string and assigns it to the Alias field.
77-
func (o *PersonalAccessTokenAttributes) SetAlias(v string) {
78-
o.Alias = &v
79-
}
80-
8151
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
8252
func (o *PersonalAccessTokenAttributes) GetCreatedAt() time.Time {
8353
if o == nil || o.CreatedAt == nil {
@@ -313,9 +283,6 @@ func (o PersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) {
313283
if o.UnparsedObject != nil {
314284
return datadog.Marshal(o.UnparsedObject)
315285
}
316-
if o.Alias != nil {
317-
toSerialize["alias"] = o.Alias
318-
}
319286
if o.CreatedAt != nil {
320287
if o.CreatedAt.Nanosecond() == 0 {
321288
toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05Z07:00")
@@ -351,7 +318,6 @@ func (o PersonalAccessTokenAttributes) MarshalJSON() ([]byte, error) {
351318
// UnmarshalJSON deserializes the given payload.
352319
func (o *PersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error) {
353320
all := struct {
354-
Alias *string `json:"alias,omitempty"`
355321
CreatedAt *time.Time `json:"created_at,omitempty"`
356322
ExpiresAt datadog.NullableTime `json:"expires_at,omitempty"`
357323
LastUsedAt datadog.NullableTime `json:"last_used_at,omitempty"`
@@ -365,11 +331,10 @@ func (o *PersonalAccessTokenAttributes) UnmarshalJSON(bytes []byte) (err error)
365331
}
366332
additionalProperties := make(map[string]interface{})
367333
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
368-
datadog.DeleteKeys(additionalProperties, &[]string{"alias", "created_at", "expires_at", "last_used_at", "modified_at", "name", "public_portion", "scopes"})
334+
datadog.DeleteKeys(additionalProperties, &[]string{"created_at", "expires_at", "last_used_at", "modified_at", "name", "public_portion", "scopes"})
369335
} else {
370336
return err
371337
}
372-
o.Alias = all.Alias
373338
o.CreatedAt = all.CreatedAt
374339
o.ExpiresAt = all.ExpiresAt
375340
o.LastUsedAt = all.LastUsedAt

0 commit comments

Comments
 (0)