Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / sdk / go / arvados / api_client_authorization.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 package arvados
6
7 // APIClientAuthorization is an arvados#apiClientAuthorization resource.
8 type APIClientAuthorization struct {
9         UUID      string   `json:"uuid,omitempty"`
10         APIToken  string   `json:"api_token,omitempty"`
11         ExpiresAt string   `json:"expires_at,omitempty"`
12         Scopes    []string `json:"scopes,omitempty"`
13 }
14
15 // APIClientAuthorizationList is an arvados#apiClientAuthorizationList resource.
16 type APIClientAuthorizationList struct {
17         Items []APIClientAuthorization `json:"items"`
18 }
19
20 func (aca APIClientAuthorization) TokenV2() string {
21         return "v2/" + aca.UUID + "/" + aca.APIToken
22 }