1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
9 // APIClientAuthorization is an arvados#apiClientAuthorization resource.
10 type APIClientAuthorization struct {
11 UUID string `json:"uuid"`
12 APIClientID int `json:"api_client_id"`
13 APIToken string `json:"api_token"`
14 CreatedAt time.Time `json:"created_at"`
15 CreatedByIPAddress string `json:"created_by_ip_address"`
16 DefaultOwnerUUID string `json:"default_owner_uuid"`
17 Etag string `json:"etag"`
18 ExpiresAt time.Time `json:"expires_at"`
19 LastUsedAt time.Time `json:"last_used_at"`
20 LastUsedByIPAddress string `json:"last_used_by_ip_address"`
21 ModifiedAt time.Time `json:"modified_at"`
22 ModifiedByClientUUID string `json:"modified_by_client_uuid"`
23 ModifiedByUserUUID string `json:"modified_by_user_uuid"`
24 OwnerUUID string `json:"owner_uuid"`
25 Scopes []string `json:"scopes"`
26 UserID int `json:"user_id"`
29 // APIClientAuthorizationList is an arvados#apiClientAuthorizationList resource.
30 type APIClientAuthorizationList struct {
31 Items []APIClientAuthorization `json:"items"`
34 func (aca APIClientAuthorization) TokenV2() string {
35 return "v2/" + aca.UUID + "/" + aca.APIToken