19146: Add can_write and can_manage response fields.
[arvados.git] / sdk / go / arvados / group.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 package arvados
6
7 import (
8         "time"
9 )
10
11 // Group is an arvados#group record
12 type Group struct {
13         UUID                 string                 `json:"uuid"`
14         Name                 string                 `json:"name"`
15         OwnerUUID            string                 `json:"owner_uuid"`
16         GroupClass           string                 `json:"group_class"`
17         Etag                 string                 `json:"etag"`
18         Href                 string                 `json:"href"`
19         TrashAt              *time.Time             `json:"trash_at"`
20         CreatedAt            time.Time              `json:"created_at"`
21         ModifiedAt           time.Time              `json:"modified_at"`
22         ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
23         ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
24         DeleteAt             *time.Time             `json:"delete_at"`
25         IsTrashed            bool                   `json:"is_trashed"`
26         Properties           map[string]interface{} `json:"properties"`
27         WritableBy           []string               `json:"writable_by,omitempty"`
28         Description          string                 `json:"description"`
29         FrozenByUUID         string                 `json:"frozen_by_uuid"`
30         CanWrite             bool                   `json:"can_write"`
31         CanManage            bool                   `json:"can_manage"`
32 }
33
34 // GroupList is an arvados#groupList resource.
35 type GroupList struct {
36         Items          []Group       `json:"items"`
37         ItemsAvailable int           `json:"items_available"`
38         Offset         int           `json:"offset"`
39         Limit          int           `json:"limit"`
40         Included       []interface{} `json:"included"`
41 }
42
43 // ObjectList is an arvados#objectList resource.
44 type ObjectList struct {
45         Included       []interface{} `json:"included"`
46         Items          []interface{} `json:"items"`
47         ItemsAvailable int           `json:"items_available"`
48         Offset         int           `json:"offset"`
49         Limit          int           `json:"limit"`
50 }
51
52 func (g Group) resourceName() string {
53         return "group"
54 }