Codebase list golang-github-dropbox-dropbox-sdk-go-unofficial / 329def04-dcb2-40f3-8f59-f5f3fd296a96/upstream
Import upstream version 6.0.2 Debian Janitor 2 years ago
80 changed file(s) with 59263 addition(s) and 50444 deletion(s). Raw diff Collapse all Expand all
0 ---
1 name: "\U0001F41B Bug report"
2 about: Create a report to help us improve the SDK
3 title: ''
4 labels: bug
5 assignees: ''
6
7 ---
8
9 **Describe the bug**
10 A clear and concise description of the bug.
11
12 **To Reproduce**
13 The steps to reproduce the behavior
14
15 **Expected Behavior**
16 A clear description of what you expected to happen.
17
18 **Actual Behavior**
19 A clear description of what actually happened
20
21 **Screenshots**
22 If applicable, add screenshots to help explain your problem.
23
24 **Versions**
25 * What version of the SDK are you using?
26 * What version of the language are you using?
27 * What platform are you using? (if applicable)
28
29 **Additional context**
30 Add any other context about the problem here.⏎
0 blank_issues_enabled: false⏎
0 ---
1 name: "\U0001F680 Feature Request"
2 about: Suggest an idea for this SDK
3 title: ''
4 labels: enhancement
5 assignees: ''
6
7 ---
8
9 **Why is this feature valuable to you? Does it solve a problem you're having?**
10 A clear and concise description of why this feature is valuable. Ex. I'm always frustrated when [...]
11
12 **Describe the solution you'd like**
13 A clear and concise description of what you want to happen.
14
15 **Describe alternatives you've considered**
16 A clear and concise description of any alternative solutions or features you've considered. (if applicable)
17
18 **Additional context**
19 Add any other context or screenshots about the feature request here.
0 ---
1 name: "\U0001F4AC Questions / Help"
2 about: Get help with issues you are experiencing
3 title: ''
4 labels: help-wanted, question
5 assignees: ''
6
7 ---
8
9 **Before you start**
10 Have you checked StackOverflow, previous issues, and Dropbox Developer Forums for help?
11
12 **What is your question?**
13 A clear and concise description of the question.
14
15 **Screenshots**
16 If applicable, add screenshots to help explain your question.
17
18 **Versions**
19 * What version of the SDK are you using?
20 * What version of the language are you using?
21 * What platform are you using? (if applicable)
22
23 **Additional context**
24 Add any other context about the question here.
0 # To get started with Dependabot version updates, you'll need to specify which
1 # package ecosystems to update and where the package manifests are located.
2 # Please see the documentation for all configuration options:
3 # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
4
5 version: 2
6 updates:
7 - package-ecosystem: "gomod" # See documentation for possible values
8 directory: "/v6" # Location of package manifests
9 schedule:
10 interval: "daily"
11
12 - package-ecosystem: "github-actions"
13 directory: "/"
14 schedule:
15 interval: "daily"
0 # For most projects, this workflow file will not need changing; you simply need
1 # to commit it to your repository.
2 #
3 # You may wish to alter this file to override the set of languages analyzed,
4 # or to provide custom queries or build logic.
5 #
6 # ******** NOTE ********
7 # We have attempted to detect the languages in your repository. Please check
8 # the `language` matrix defined below to confirm you have the correct set of
9 # supported CodeQL languages.
10 #
11 name: "CodeQL"
12
13 on:
14 push:
15 branches: [ master ]
16 pull_request:
17 # The branches below must be a subset of the branches above
18 branches: [ master ]
19 schedule:
20 - cron: '18 6 * * 0'
21
22 jobs:
23 analyze:
24 name: Analyze
25 runs-on: ubuntu-latest
26
27 strategy:
28 fail-fast: false
29 matrix:
30 language: [ 'go' ]
31 # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
32 # Learn more:
33 # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
34
35 steps:
36 - name: Checkout repository
37 uses: actions/checkout@v2.3.4
38
39 # Initializes the CodeQL tools for scanning.
40 - name: Initialize CodeQL
41 uses: github/codeql-action/init@v1
42 with:
43 languages: ${{ matrix.language }}
44 # If you wish to specify custom queries, you can do so here or in a config file.
45 # By default, queries listed here will override any specified in a config file.
46 # Prefix the list here with "+" to use these queries and those in the config file.
47 # queries: ./path/to/local/query, your-org/your-repo/queries@main
48
49 # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50 # If this step fails, then you should remove it and run the build manually (see below)
51 - name: Autobuild
52 uses: github/codeql-action/autobuild@v1
53
54 # ℹī¸ Command-line programs to run using the OS shell.
55 # 📚 https://git.io/JvXDl
56
57 # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines
58 # and modify them (or add more) to build your code if your project
59 # uses a compiled language
60
61 #- run: |
62 # make bootstrap
63 # make release
64
65 - name: Perform CodeQL Analysis
66 uses: github/codeql-action/analyze@v1
0 name: Lint
1 on:
2 pull_request:
3 jobs:
4 golangci:
5 name: lint
6 runs-on: ubuntu-latest
7 steps:
8 - uses: actions/checkout@v2
9 - name: golangci-lint
10 uses: golangci/golangci-lint-action@v2
11 with:
12 version: latest
13 working-directory: ./v6
0 name: Test
1 on:
2 pull_request:
3 env:
4 GO111MODULE: "on"
5 jobs:
6 test:
7 strategy:
8 matrix:
9 go-version: [1.11.x]
10 os: [ubuntu-latest, macos-latest, windows-latest]
11 runs-on: ${{ matrix.os }}
12 steps:
13 - name: Install Go
14 uses: actions/setup-go@v2
15 with:
16 go-version: ${{ matrix.go-version }}
17 - name: Checkout code
18 uses: actions/checkout@v2.3.4
19 - name: Test
20 run: go test -race -v ./...
21 working-directory: ./v6
+0
-22
.travis.yml less more
0 language: go
1
2 go:
3 - "1.9.x"
4 - "1.10.x"
5 - "1.11.x"
6
7 install: go get -u golang.org/x/oauth2
8
9 script:
10 - set -e
11 - GOOS=linux GOARCH=amd64 go install ./dropbox/...
12 - GOOS=darwin GOARCH=amd64 go install ./dropbox/...
13 - GOOS=windows GOARCH=amd64 go install ./dropbox/...
14 - set +e
15
16 jobs:
17 include:
18 - stage: run tests
19 go: "1.11.x"
20 install: go get -u golang.org/x/oauth2
21 script: go test -v ./dropbox/...
0 # Dropbox SDK for Go [UNOFFICIAL] [![GoDoc](https://godoc.org/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox?status.svg)](https://godoc.org/github.com/dropbox/dropbox-sdk-go-unofficial/dropbox) [![Build Status](https://travis-ci.org/dropbox/dropbox-sdk-go-unofficial.svg?branch=master)](https://travis-ci.org/dropbox/dropbox-sdk-go-unofficial) [![Go Report Card](https://goreportcard.com/badge/github.com/dropbox/dropbox-sdk-go-unofficial)](https://goreportcard.com/report/github.com/dropbox/dropbox-sdk-go-unofficial)
0 # Dropbox SDK for Go [UNOFFICIAL] [![GoDoc](https://pkg.go.dev/badge/github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox)](https://pkg.go.dev/github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox) [![Actions Status](https://github.com/dropbox/dropbox-sdk-go-unofficial/workflows/Test/badge.svg)](https://github.com/dropbox/dropbox-sdk-go-unofficial/actions) [![Actions Status](https://github.com/dropbox/dropbox-sdk-go-unofficial/workflows/Lint/badge.svg)](https://github.com/dropbox/dropbox-sdk-go-unofficial/actions)
11
2 An **UNOFFICIAL** Go SDK for integrating with the Dropbox API v2. Tested with Go 1.5+
2 An **UNOFFICIAL** Go SDK for integrating with the Dropbox API v2. Tested with Go 1.11+
33
44 :warning: WARNING: This SDK is **NOT yet official**. What does this mean?
55
1616 ## Installation
1717
1818 ```sh
19 $ go get github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/...
19 $ go get github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/...
2020 ```
2121
2222 For most applications, you should just import the relevant namespace(s) only. The SDK exports the following sub-packages:
2323
24 * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth`
25 * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files`
26 * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing`
27 * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team`
28 * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users`
24 * `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth`
25 * `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files`
26 * `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing`
27 * `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team`
28 * `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users`
2929
30 Additionally, the base `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox` package exports some configuration and helper methods.
30 Additionally, the base `github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox` package exports some configuration and helper methods.
3131
3232 ## Usage
3333
3838 Once you've created an app, you can get an access token from the app's console. Note that this token will only work for the Dropbox account the token is associated with.
3939
4040 ```go
41 import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
42 import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
41 import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
42 import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
4343
4444 func main() {
4545 config := dropbox.Config{
5353
5454 ### Using OAuth2 flow
5555
56 For this, you will need your `APP_KEY` and `APP_SECRET` from the developers console. Your app will then have to take users though the oauth flow, as part of which users will explicitly grant permissions to your app. At the end of this process, users will get a token that the app can then use for subsequent authentication. See [this](https://godoc.org/golang.org/x/oauth2#example-Config) for an example of oauth2 flow in Go.
56 For this, you will need your `APP_KEY` and `APP_SECRET` from the developers console. Your app will then have to take users though the oauth flow, as part of which users will explicitly grant permissions to your app. At the end of this process, users will get a token that the app can then use for subsequent authentication. See [this](https://pkg.go.dev/golang.org/x/oauth2#example-Config) for an example of oauth2 flow in Go.
5757
5858 Once you have the token, usage is same as above.
5959
7171 arg := users.NewGetAccountArg(accountId)
7272 if resp, err := dbx.GetAccount(arg); err != nil {
7373 return err
74 } else {
75 fmt.Printf("Name: %v", resp.Name)
7476 }
75 fmt.Printf("Name: %v", resp.Name)
7677 ```
7778
7879 ### Error Handling
+0
-160
dropbox/async/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package async : has no documentation (yet)
21 package async
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27 )
28
29 // LaunchResultBase : Result returned by methods that launch an asynchronous
30 // job. A method who may either launch an asynchronous job, or complete the
31 // request synchronously, can use this union by extending it, and adding a
32 // 'complete' field with the type of the synchronous response. See
33 // `LaunchEmptyResult` for an example.
34 type LaunchResultBase struct {
35 dropbox.Tagged
36 // AsyncJobId : This response indicates that the processing is asynchronous.
37 // The string is an id that can be used to obtain the status of the
38 // asynchronous job.
39 AsyncJobId string `json:"async_job_id,omitempty"`
40 }
41
42 // Valid tag values for LaunchResultBase
43 const (
44 LaunchResultBaseAsyncJobId = "async_job_id"
45 )
46
47 // UnmarshalJSON deserializes into a LaunchResultBase instance
48 func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
49 type wrap struct {
50 dropbox.Tagged
51 }
52 var w wrap
53 var err error
54 if err = json.Unmarshal(body, &w); err != nil {
55 return err
56 }
57 u.Tag = w.Tag
58 switch u.Tag {
59 case "async_job_id":
60 err = json.Unmarshal(body, &u.AsyncJobId)
61
62 if err != nil {
63 return err
64 }
65 }
66 return nil
67 }
68
69 // LaunchEmptyResult : Result returned by methods that may either launch an
70 // asynchronous job or complete synchronously. Upon synchronous completion of
71 // the job, no additional information is returned.
72 type LaunchEmptyResult struct {
73 dropbox.Tagged
74 // AsyncJobId : This response indicates that the processing is asynchronous.
75 // The string is an id that can be used to obtain the status of the
76 // asynchronous job.
77 AsyncJobId string `json:"async_job_id,omitempty"`
78 }
79
80 // Valid tag values for LaunchEmptyResult
81 const (
82 LaunchEmptyResultAsyncJobId = "async_job_id"
83 LaunchEmptyResultComplete = "complete"
84 )
85
86 // UnmarshalJSON deserializes into a LaunchEmptyResult instance
87 func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error {
88 type wrap struct {
89 dropbox.Tagged
90 }
91 var w wrap
92 var err error
93 if err = json.Unmarshal(body, &w); err != nil {
94 return err
95 }
96 u.Tag = w.Tag
97 switch u.Tag {
98 case "async_job_id":
99 err = json.Unmarshal(body, &u.AsyncJobId)
100
101 if err != nil {
102 return err
103 }
104 }
105 return nil
106 }
107
108 // PollArg : Arguments for methods that poll the status of an asynchronous job.
109 type PollArg struct {
110 // AsyncJobId : Id of the asynchronous job. This is the value of a response
111 // returned from the method that launched the job.
112 AsyncJobId string `json:"async_job_id"`
113 }
114
115 // NewPollArg returns a new PollArg instance
116 func NewPollArg(AsyncJobId string) *PollArg {
117 s := new(PollArg)
118 s.AsyncJobId = AsyncJobId
119 return s
120 }
121
122 // PollResultBase : Result returned by methods that poll for the status of an
123 // asynchronous job. Unions that extend this union should add a 'complete' field
124 // with a type of the information returned upon job completion. See
125 // `PollEmptyResult` for an example.
126 type PollResultBase struct {
127 dropbox.Tagged
128 }
129
130 // Valid tag values for PollResultBase
131 const (
132 PollResultBaseInProgress = "in_progress"
133 )
134
135 // PollEmptyResult : Result returned by methods that poll for the status of an
136 // asynchronous job. Upon completion of the job, no additional information is
137 // returned.
138 type PollEmptyResult struct {
139 dropbox.Tagged
140 }
141
142 // Valid tag values for PollEmptyResult
143 const (
144 PollEmptyResultInProgress = "in_progress"
145 PollEmptyResultComplete = "complete"
146 )
147
148 // PollError : Error returned by methods for polling the status of asynchronous
149 // job.
150 type PollError struct {
151 dropbox.Tagged
152 }
153
154 // Valid tag values for PollError
155 const (
156 PollErrorInvalidAsyncJobId = "invalid_async_job_id"
157 PollErrorInternalError = "internal_error"
158 PollErrorOther = "other"
159 )
+0
-166
dropbox/auth/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package auth
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 )
30
31 // Client interface describes all routes in this namespace
32 type Client interface {
33 // TokenFromOauth1 : Creates an OAuth 2.0 access token from the supplied
34 // OAuth 1.0 access token.
35 TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error)
36 // TokenRevoke : Disables the access token used to authenticate the call.
37 TokenRevoke() (err error)
38 }
39
40 type apiImpl dropbox.Context
41
42 //TokenFromOauth1APIError is an error-wrapper for the token/from_oauth1 route
43 type TokenFromOauth1APIError struct {
44 dropbox.APIError
45 EndpointError *TokenFromOAuth1Error `json:"error"`
46 }
47
48 func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
49 cli := dbx.Client
50
51 dbx.Config.LogDebug("arg: %v", arg)
52 b, err := json.Marshal(arg)
53 if err != nil {
54 return
55 }
56
57 headers := map[string]string{
58 "Content-Type": "application/json",
59 }
60 if dbx.Config.AsMemberID != "" {
61 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
62 }
63
64 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "auth", "token/from_oauth1", headers, bytes.NewReader(b))
65 if err != nil {
66 return
67 }
68 dbx.Config.LogInfo("req: %v", req)
69
70 resp, err := cli.Do(req)
71 if err != nil {
72 return
73 }
74
75 dbx.Config.LogInfo("resp: %v", resp)
76 defer resp.Body.Close()
77 body, err := ioutil.ReadAll(resp.Body)
78 if err != nil {
79 return
80 }
81
82 dbx.Config.LogDebug("body: %s", body)
83 if resp.StatusCode == http.StatusOK {
84 err = json.Unmarshal(body, &res)
85 if err != nil {
86 return
87 }
88
89 return
90 }
91 if resp.StatusCode == http.StatusConflict {
92 var apiError TokenFromOauth1APIError
93 err = json.Unmarshal(body, &apiError)
94 if err != nil {
95 return
96 }
97 err = apiError
98 return
99 }
100 err = HandleCommonAuthErrors(dbx.Config, resp, body)
101 if err != nil {
102 return
103 }
104 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
105 return
106 }
107
108 //TokenRevokeAPIError is an error-wrapper for the token/revoke route
109 type TokenRevokeAPIError struct {
110 dropbox.APIError
111 EndpointError struct{} `json:"error"`
112 }
113
114 func (dbx *apiImpl) TokenRevoke() (err error) {
115 cli := dbx.Client
116
117 headers := map[string]string{}
118 if dbx.Config.AsMemberID != "" {
119 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
120 }
121
122 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "auth", "token/revoke", headers, nil)
123 if err != nil {
124 return
125 }
126 dbx.Config.LogInfo("req: %v", req)
127
128 resp, err := cli.Do(req)
129 if err != nil {
130 return
131 }
132
133 dbx.Config.LogInfo("resp: %v", resp)
134 defer resp.Body.Close()
135 body, err := ioutil.ReadAll(resp.Body)
136 if err != nil {
137 return
138 }
139
140 dbx.Config.LogDebug("body: %s", body)
141 if resp.StatusCode == http.StatusOK {
142 return
143 }
144 if resp.StatusCode == http.StatusConflict {
145 var apiError TokenRevokeAPIError
146 err = json.Unmarshal(body, &apiError)
147 if err != nil {
148 return
149 }
150 err = apiError
151 return
152 }
153 err = HandleCommonAuthErrors(dbx.Config, resp, body)
154 if err != nil {
155 return
156 }
157 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
158 return
159 }
160
161 // New returns a Client implementation for this namespace
162 func New(c dropbox.Config) Client {
163 ctx := apiImpl(dropbox.NewContext(c))
164 return &ctx
165 }
+0
-67
dropbox/auth/sdk.go less more
0 package auth
1
2 import (
3 "encoding/json"
4 "mime"
5 "net/http"
6 "strconv"
7
8 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
9 )
10
11 // AuthAPIError wraps AuthError
12 type AuthAPIError struct {
13 dropbox.APIError
14 AuthError *AuthError `json:"error"`
15 }
16
17 // AccessAPIError wraps AccessError
18 type AccessAPIError struct {
19 dropbox.APIError
20 AccessError *AccessError `json:"error"`
21 }
22
23 // RateLimitAPIError wraps RateLimitError
24 type RateLimitAPIError struct {
25 dropbox.APIError
26 RateLimitError *RateLimitError `json:"error"`
27 }
28
29 // HandleCommonAuthErrors handles common authentication errors
30 func HandleCommonAuthErrors(c dropbox.Config, resp *http.Response, body []byte) error {
31 switch resp.StatusCode {
32 case http.StatusUnauthorized:
33 var apiError AuthAPIError
34 if err := json.Unmarshal(body, &apiError); err != nil {
35 c.LogDebug("Error unmarshaling '%s' into JSON", body)
36 return err
37 }
38 return apiError
39 case http.StatusForbidden:
40 var apiError AccessAPIError
41 if err := json.Unmarshal(body, &apiError); err != nil {
42 c.LogDebug("Error unmarshaling '%s' into JSON", body)
43 return err
44 }
45 return apiError
46 case http.StatusTooManyRequests:
47 var apiError RateLimitAPIError
48 // Check content-type
49 contentType, _, _ := mime.ParseMediaType(resp.Header.Get("content-type"))
50 if contentType == "application/json" {
51 if err := json.Unmarshal(body, &apiError); err != nil {
52 c.LogDebug("Error unmarshaling '%s' into JSON", body)
53 return err
54 }
55 } else { // assume plain text
56 apiError.ErrorSummary = string(body)
57 reason := RateLimitReason{dropbox.Tagged{Tag: RateLimitReasonTooManyRequests}}
58 apiError.RateLimitError = NewRateLimitError(&reason)
59 timeout, _ := strconv.ParseInt(resp.Header.Get("retry-after"), 10, 64)
60 apiError.RateLimitError.RetryAfter = uint64(timeout)
61 }
62 return apiError
63 default:
64 return nil
65 }
66 }
+0
-188
dropbox/auth/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package auth : has no documentation (yet)
21 package auth
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27 )
28
29 // AccessError : Error occurred because the account doesn't have permission to
30 // access the resource.
31 type AccessError struct {
32 dropbox.Tagged
33 // InvalidAccountType : Current account type cannot access the resource.
34 InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"`
35 // PaperAccessDenied : Current account cannot access Paper.
36 PaperAccessDenied *PaperAccessError `json:"paper_access_denied,omitempty"`
37 }
38
39 // Valid tag values for AccessError
40 const (
41 AccessErrorInvalidAccountType = "invalid_account_type"
42 AccessErrorPaperAccessDenied = "paper_access_denied"
43 AccessErrorOther = "other"
44 )
45
46 // UnmarshalJSON deserializes into a AccessError instance
47 func (u *AccessError) UnmarshalJSON(body []byte) error {
48 type wrap struct {
49 dropbox.Tagged
50 // InvalidAccountType : Current account type cannot access the resource.
51 InvalidAccountType json.RawMessage `json:"invalid_account_type,omitempty"`
52 // PaperAccessDenied : Current account cannot access Paper.
53 PaperAccessDenied json.RawMessage `json:"paper_access_denied,omitempty"`
54 }
55 var w wrap
56 var err error
57 if err = json.Unmarshal(body, &w); err != nil {
58 return err
59 }
60 u.Tag = w.Tag
61 switch u.Tag {
62 case "invalid_account_type":
63 err = json.Unmarshal(w.InvalidAccountType, &u.InvalidAccountType)
64
65 if err != nil {
66 return err
67 }
68 case "paper_access_denied":
69 err = json.Unmarshal(w.PaperAccessDenied, &u.PaperAccessDenied)
70
71 if err != nil {
72 return err
73 }
74 }
75 return nil
76 }
77
78 // AuthError : Errors occurred during authentication.
79 type AuthError struct {
80 dropbox.Tagged
81 }
82
83 // Valid tag values for AuthError
84 const (
85 AuthErrorInvalidAccessToken = "invalid_access_token"
86 AuthErrorInvalidSelectUser = "invalid_select_user"
87 AuthErrorInvalidSelectAdmin = "invalid_select_admin"
88 AuthErrorUserSuspended = "user_suspended"
89 AuthErrorExpiredAccessToken = "expired_access_token"
90 AuthErrorOther = "other"
91 )
92
93 // InvalidAccountTypeError : has no documentation (yet)
94 type InvalidAccountTypeError struct {
95 dropbox.Tagged
96 }
97
98 // Valid tag values for InvalidAccountTypeError
99 const (
100 InvalidAccountTypeErrorEndpoint = "endpoint"
101 InvalidAccountTypeErrorFeature = "feature"
102 InvalidAccountTypeErrorOther = "other"
103 )
104
105 // PaperAccessError : has no documentation (yet)
106 type PaperAccessError struct {
107 dropbox.Tagged
108 }
109
110 // Valid tag values for PaperAccessError
111 const (
112 PaperAccessErrorPaperDisabled = "paper_disabled"
113 PaperAccessErrorNotPaperUser = "not_paper_user"
114 PaperAccessErrorOther = "other"
115 )
116
117 // RateLimitError : Error occurred because the app is being rate limited.
118 type RateLimitError struct {
119 // Reason : The reason why the app is being rate limited.
120 Reason *RateLimitReason `json:"reason"`
121 // RetryAfter : The number of seconds that the app should wait before making
122 // another request.
123 RetryAfter uint64 `json:"retry_after"`
124 }
125
126 // NewRateLimitError returns a new RateLimitError instance
127 func NewRateLimitError(Reason *RateLimitReason) *RateLimitError {
128 s := new(RateLimitError)
129 s.Reason = Reason
130 s.RetryAfter = 1
131 return s
132 }
133
134 // RateLimitReason : has no documentation (yet)
135 type RateLimitReason struct {
136 dropbox.Tagged
137 }
138
139 // Valid tag values for RateLimitReason
140 const (
141 RateLimitReasonTooManyRequests = "too_many_requests"
142 RateLimitReasonTooManyWriteOperations = "too_many_write_operations"
143 RateLimitReasonOther = "other"
144 )
145
146 // TokenFromOAuth1Arg : has no documentation (yet)
147 type TokenFromOAuth1Arg struct {
148 // Oauth1Token : The supplied OAuth 1.0 access token.
149 Oauth1Token string `json:"oauth1_token"`
150 // Oauth1TokenSecret : The token secret associated with the supplied access
151 // token.
152 Oauth1TokenSecret string `json:"oauth1_token_secret"`
153 }
154
155 // NewTokenFromOAuth1Arg returns a new TokenFromOAuth1Arg instance
156 func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string) *TokenFromOAuth1Arg {
157 s := new(TokenFromOAuth1Arg)
158 s.Oauth1Token = Oauth1Token
159 s.Oauth1TokenSecret = Oauth1TokenSecret
160 return s
161 }
162
163 // TokenFromOAuth1Error : has no documentation (yet)
164 type TokenFromOAuth1Error struct {
165 dropbox.Tagged
166 }
167
168 // Valid tag values for TokenFromOAuth1Error
169 const (
170 TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info"
171 TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch"
172 TokenFromOAuth1ErrorOther = "other"
173 )
174
175 // TokenFromOAuth1Result : has no documentation (yet)
176 type TokenFromOAuth1Result struct {
177 // Oauth2Token : The OAuth 2.0 token generated from the supplied OAuth 1.0
178 // token.
179 Oauth2Token string `json:"oauth2_token"`
180 }
181
182 // NewTokenFromOAuth1Result returns a new TokenFromOAuth1Result instance
183 func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result {
184 s := new(TokenFromOAuth1Result)
185 s.Oauth2Token = Oauth2Token
186 return s
187 }
+0
-238
dropbox/common/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package common : has no documentation (yet)
21 package common
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27 )
28
29 // PathRoot : has no documentation (yet)
30 type PathRoot struct {
31 dropbox.Tagged
32 // Root : Paths are relative to the authenticating user's root namespace
33 // (This results in `PathRootError.invalid_root` if the user's root
34 // namespace has changed.).
35 Root string `json:"root,omitempty"`
36 // NamespaceId : Paths are relative to given namespace id (This results in
37 // `PathRootError.no_permission` if you don't have access to this
38 // namespace.).
39 NamespaceId string `json:"namespace_id,omitempty"`
40 }
41
42 // Valid tag values for PathRoot
43 const (
44 PathRootHome = "home"
45 PathRootRoot = "root"
46 PathRootNamespaceId = "namespace_id"
47 PathRootOther = "other"
48 )
49
50 // UnmarshalJSON deserializes into a PathRoot instance
51 func (u *PathRoot) UnmarshalJSON(body []byte) error {
52 type wrap struct {
53 dropbox.Tagged
54 }
55 var w wrap
56 var err error
57 if err = json.Unmarshal(body, &w); err != nil {
58 return err
59 }
60 u.Tag = w.Tag
61 switch u.Tag {
62 case "root":
63 err = json.Unmarshal(body, &u.Root)
64
65 if err != nil {
66 return err
67 }
68 case "namespace_id":
69 err = json.Unmarshal(body, &u.NamespaceId)
70
71 if err != nil {
72 return err
73 }
74 }
75 return nil
76 }
77
78 // PathRootError : has no documentation (yet)
79 type PathRootError struct {
80 dropbox.Tagged
81 // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is
82 // not valid. The value of this error is use's latest root info.
83 InvalidRoot IsRootInfo `json:"invalid_root,omitempty"`
84 }
85
86 // Valid tag values for PathRootError
87 const (
88 PathRootErrorInvalidRoot = "invalid_root"
89 PathRootErrorNoPermission = "no_permission"
90 PathRootErrorOther = "other"
91 )
92
93 // UnmarshalJSON deserializes into a PathRootError instance
94 func (u *PathRootError) UnmarshalJSON(body []byte) error {
95 type wrap struct {
96 dropbox.Tagged
97 // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header
98 // is not valid. The value of this error is use's latest root info.
99 InvalidRoot json.RawMessage `json:"invalid_root,omitempty"`
100 }
101 var w wrap
102 var err error
103 if err = json.Unmarshal(body, &w); err != nil {
104 return err
105 }
106 u.Tag = w.Tag
107 switch u.Tag {
108 case "invalid_root":
109 u.InvalidRoot, err = IsRootInfoFromJSON(body)
110
111 if err != nil {
112 return err
113 }
114 }
115 return nil
116 }
117
118 // RootInfo : Information about current user's root.
119 type RootInfo struct {
120 // RootNamespaceId : The namespace ID for user's root namespace. It will be
121 // the namespace ID of the shared team root if the user is member of a team
122 // with a separate team root. Otherwise it will be same as
123 // `RootInfo.home_namespace_id`.
124 RootNamespaceId string `json:"root_namespace_id"`
125 // HomeNamespaceId : The namespace ID for user's home namespace.
126 HomeNamespaceId string `json:"home_namespace_id"`
127 }
128
129 // NewRootInfo returns a new RootInfo instance
130 func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootInfo {
131 s := new(RootInfo)
132 s.RootNamespaceId = RootNamespaceId
133 s.HomeNamespaceId = HomeNamespaceId
134 return s
135 }
136
137 // IsRootInfo is the interface type for RootInfo and its subtypes
138 type IsRootInfo interface {
139 IsRootInfo()
140 }
141
142 // IsRootInfo implements the IsRootInfo interface
143 func (u *RootInfo) IsRootInfo() {}
144
145 type rootInfoUnion struct {
146 dropbox.Tagged
147 // Team : has no documentation (yet)
148 Team *TeamRootInfo `json:"team,omitempty"`
149 // User : has no documentation (yet)
150 User *UserRootInfo `json:"user,omitempty"`
151 }
152
153 // Valid tag values for RootInfo
154 const (
155 RootInfoTeam = "team"
156 RootInfoUser = "user"
157 )
158
159 // UnmarshalJSON deserializes into a rootInfoUnion instance
160 func (u *rootInfoUnion) UnmarshalJSON(body []byte) error {
161 type wrap struct {
162 dropbox.Tagged
163 // Team : has no documentation (yet)
164 Team json.RawMessage `json:"team,omitempty"`
165 // User : has no documentation (yet)
166 User json.RawMessage `json:"user,omitempty"`
167 }
168 var w wrap
169 var err error
170 if err = json.Unmarshal(body, &w); err != nil {
171 return err
172 }
173 u.Tag = w.Tag
174 switch u.Tag {
175 case "team":
176 err = json.Unmarshal(body, &u.Team)
177
178 if err != nil {
179 return err
180 }
181 case "user":
182 err = json.Unmarshal(body, &u.User)
183
184 if err != nil {
185 return err
186 }
187 }
188 return nil
189 }
190
191 // IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance
192 func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) {
193 var t rootInfoUnion
194 if err := json.Unmarshal(data, &t); err != nil {
195 return nil, err
196 }
197 switch t.Tag {
198 case "team":
199 return t.Team, nil
200
201 case "user":
202 return t.User, nil
203
204 }
205 return nil, nil
206 }
207
208 // TeamRootInfo : Root info when user is member of a team with a separate root
209 // namespace ID.
210 type TeamRootInfo struct {
211 RootInfo
212 // HomePath : The path for user's home directory under the shared team root.
213 HomePath string `json:"home_path"`
214 }
215
216 // NewTeamRootInfo returns a new TeamRootInfo instance
217 func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo {
218 s := new(TeamRootInfo)
219 s.RootNamespaceId = RootNamespaceId
220 s.HomeNamespaceId = HomeNamespaceId
221 s.HomePath = HomePath
222 return s
223 }
224
225 // UserRootInfo : Root info when user is not member of a team or the user is a
226 // member of a team and the team does not have a separate root namespace.
227 type UserRootInfo struct {
228 RootInfo
229 }
230
231 // NewUserRootInfo returns a new UserRootInfo instance
232 func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo {
233 s := new(UserRootInfo)
234 s.RootNamespaceId = RootNamespaceId
235 s.HomeNamespaceId = HomeNamespaceId
236 return s
237 }
+0
-164
dropbox/contacts/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package contacts
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // DeleteManualContacts : Removes all manually added contacts. You'll still
35 // keep contacts who are on your team or who you imported. New contacts will
36 // be added when you share.
37 DeleteManualContacts() (err error)
38 // DeleteManualContactsBatch : Removes manually added contacts from the
39 // given list.
40 DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error)
41 }
42
43 type apiImpl dropbox.Context
44
45 //DeleteManualContactsAPIError is an error-wrapper for the delete_manual_contacts route
46 type DeleteManualContactsAPIError struct {
47 dropbox.APIError
48 EndpointError struct{} `json:"error"`
49 }
50
51 func (dbx *apiImpl) DeleteManualContacts() (err error) {
52 cli := dbx.Client
53
54 headers := map[string]string{}
55 if dbx.Config.AsMemberID != "" {
56 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
57 }
58
59 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "contacts", "delete_manual_contacts", headers, nil)
60 if err != nil {
61 return
62 }
63 dbx.Config.LogInfo("req: %v", req)
64
65 resp, err := cli.Do(req)
66 if err != nil {
67 return
68 }
69
70 dbx.Config.LogInfo("resp: %v", resp)
71 defer resp.Body.Close()
72 body, err := ioutil.ReadAll(resp.Body)
73 if err != nil {
74 return
75 }
76
77 dbx.Config.LogDebug("body: %s", body)
78 if resp.StatusCode == http.StatusOK {
79 return
80 }
81 if resp.StatusCode == http.StatusConflict {
82 var apiError DeleteManualContactsAPIError
83 err = json.Unmarshal(body, &apiError)
84 if err != nil {
85 return
86 }
87 err = apiError
88 return
89 }
90 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
91 if err != nil {
92 return
93 }
94 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
95 return
96 }
97
98 //DeleteManualContactsBatchAPIError is an error-wrapper for the delete_manual_contacts_batch route
99 type DeleteManualContactsBatchAPIError struct {
100 dropbox.APIError
101 EndpointError *DeleteManualContactsError `json:"error"`
102 }
103
104 func (dbx *apiImpl) DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error) {
105 cli := dbx.Client
106
107 dbx.Config.LogDebug("arg: %v", arg)
108 b, err := json.Marshal(arg)
109 if err != nil {
110 return
111 }
112
113 headers := map[string]string{
114 "Content-Type": "application/json",
115 }
116 if dbx.Config.AsMemberID != "" {
117 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
118 }
119
120 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "contacts", "delete_manual_contacts_batch", headers, bytes.NewReader(b))
121 if err != nil {
122 return
123 }
124 dbx.Config.LogInfo("req: %v", req)
125
126 resp, err := cli.Do(req)
127 if err != nil {
128 return
129 }
130
131 dbx.Config.LogInfo("resp: %v", resp)
132 defer resp.Body.Close()
133 body, err := ioutil.ReadAll(resp.Body)
134 if err != nil {
135 return
136 }
137
138 dbx.Config.LogDebug("body: %s", body)
139 if resp.StatusCode == http.StatusOK {
140 return
141 }
142 if resp.StatusCode == http.StatusConflict {
143 var apiError DeleteManualContactsBatchAPIError
144 err = json.Unmarshal(body, &apiError)
145 if err != nil {
146 return
147 }
148 err = apiError
149 return
150 }
151 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
152 if err != nil {
153 return
154 }
155 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
156 return
157 }
158
159 // New returns a Client implementation for this namespace
160 func New(c dropbox.Config) Client {
161 ctx := apiImpl(dropbox.NewContext(c))
162 return &ctx
163 }
+0
-81
dropbox/contacts/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package contacts : has no documentation (yet)
21 package contacts
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27 )
28
29 // DeleteManualContactsArg : has no documentation (yet)
30 type DeleteManualContactsArg struct {
31 // EmailAddresses : List of manually added contacts to be deleted.
32 EmailAddresses []string `json:"email_addresses"`
33 }
34
35 // NewDeleteManualContactsArg returns a new DeleteManualContactsArg instance
36 func NewDeleteManualContactsArg(EmailAddresses []string) *DeleteManualContactsArg {
37 s := new(DeleteManualContactsArg)
38 s.EmailAddresses = EmailAddresses
39 return s
40 }
41
42 // DeleteManualContactsError : has no documentation (yet)
43 type DeleteManualContactsError struct {
44 dropbox.Tagged
45 // ContactsNotFound : Can't delete contacts from this list. Make sure the
46 // list only has manually added contacts. The deletion was cancelled.
47 ContactsNotFound []string `json:"contacts_not_found,omitempty"`
48 }
49
50 // Valid tag values for DeleteManualContactsError
51 const (
52 DeleteManualContactsErrorContactsNotFound = "contacts_not_found"
53 DeleteManualContactsErrorOther = "other"
54 )
55
56 // UnmarshalJSON deserializes into a DeleteManualContactsError instance
57 func (u *DeleteManualContactsError) UnmarshalJSON(body []byte) error {
58 type wrap struct {
59 dropbox.Tagged
60 // ContactsNotFound : Can't delete contacts from this list. Make sure
61 // the list only has manually added contacts. The deletion was
62 // cancelled.
63 ContactsNotFound json.RawMessage `json:"contacts_not_found,omitempty"`
64 }
65 var w wrap
66 var err error
67 if err = json.Unmarshal(body, &w); err != nil {
68 return err
69 }
70 u.Tag = w.Tag
71 switch u.Tag {
72 case "contacts_not_found":
73 err = json.Unmarshal(body, &u.ContactsNotFound)
74
75 if err != nil {
76 return err
77 }
78 }
79 return nil
80 }
+0
-1105
dropbox/file_properties/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package file_properties
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // PropertiesAdd : Add property groups to a Dropbox file. See
35 // `templatesAddForUser` or `templatesAddForTeam` to create new templates.
36 PropertiesAdd(arg *AddPropertiesArg) (err error)
37 // PropertiesOverwrite : Overwrite property groups associated with a file.
38 // This endpoint should be used instead of `propertiesUpdate` when property
39 // groups are being updated via a "snapshot" instead of via a "delta". In
40 // other words, this endpoint will delete all omitted fields from a property
41 // group, whereas `propertiesUpdate` will only delete fields that are
42 // explicitly marked for deletion.
43 PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
44 // PropertiesRemove : Permanently removes the specified property group from
45 // the file. To remove specific property field key value pairs, see
46 // `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
47 // `templatesUpdateForTeam`. To remove a template, see
48 // `templatesRemoveForUser` or `templatesRemoveForTeam`.
49 PropertiesRemove(arg *RemovePropertiesArg) (err error)
50 // PropertiesSearch : Search across property templates for particular
51 // property field values.
52 PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error)
53 // PropertiesSearchContinue : Once a cursor has been retrieved from
54 // `propertiesSearch`, use this to paginate through all search results.
55 PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error)
56 // PropertiesUpdate : Add, update or remove properties associated with the
57 // supplied file and templates. This endpoint should be used instead of
58 // `propertiesOverwrite` when property groups are being updated via a
59 // "delta" instead of via a "snapshot" . In other words, this endpoint will
60 // not delete any omitted fields from a property group, whereas
61 // `propertiesOverwrite` will delete any fields that are omitted from a
62 // property group.
63 PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
64 // TemplatesAddForTeam : Add a template associated with a team. See
65 // `propertiesAdd` to add properties to a file or folder. Note: this
66 // endpoint will create team-owned templates.
67 TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
68 // TemplatesAddForUser : Add a template associated with a user. See
69 // `propertiesAdd` to add properties to a file. This endpoint can't be
70 // called on a team member or admin's behalf.
71 TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
72 // TemplatesGetForTeam : Get the schema for a specified template.
73 TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
74 // TemplatesGetForUser : Get the schema for a specified template. This
75 // endpoint can't be called on a team member or admin's behalf.
76 TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
77 // TemplatesListForTeam : Get the template identifiers for a team. To get
78 // the schema of each template use `templatesGetForTeam`.
79 TemplatesListForTeam() (res *ListTemplateResult, err error)
80 // TemplatesListForUser : Get the template identifiers for a team. To get
81 // the schema of each template use `templatesGetForUser`. This endpoint
82 // can't be called on a team member or admin's behalf.
83 TemplatesListForUser() (res *ListTemplateResult, err error)
84 // TemplatesRemoveForTeam : Permanently removes the specified template
85 // created from `templatesAddForUser`. All properties associated with the
86 // template will also be removed. This action cannot be undone.
87 TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error)
88 // TemplatesRemoveForUser : Permanently removes the specified template
89 // created from `templatesAddForUser`. All properties associated with the
90 // template will also be removed. This action cannot be undone.
91 TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error)
92 // TemplatesUpdateForTeam : Update a template associated with a team. This
93 // route can update the template name, the template description and add
94 // optional properties to templates.
95 TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
96 // TemplatesUpdateForUser : Update a template associated with a user. This
97 // route can update the template name, the template description and add
98 // optional properties to templates. This endpoint can't be called on a team
99 // member or admin's behalf.
100 TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
101 }
102
103 type apiImpl dropbox.Context
104
105 //PropertiesAddAPIError is an error-wrapper for the properties/add route
106 type PropertiesAddAPIError struct {
107 dropbox.APIError
108 EndpointError *AddPropertiesError `json:"error"`
109 }
110
111 func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
112 cli := dbx.Client
113
114 dbx.Config.LogDebug("arg: %v", arg)
115 b, err := json.Marshal(arg)
116 if err != nil {
117 return
118 }
119
120 headers := map[string]string{
121 "Content-Type": "application/json",
122 }
123 if dbx.Config.AsMemberID != "" {
124 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
125 }
126
127 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/add", headers, bytes.NewReader(b))
128 if err != nil {
129 return
130 }
131 dbx.Config.LogInfo("req: %v", req)
132
133 resp, err := cli.Do(req)
134 if err != nil {
135 return
136 }
137
138 dbx.Config.LogInfo("resp: %v", resp)
139 defer resp.Body.Close()
140 body, err := ioutil.ReadAll(resp.Body)
141 if err != nil {
142 return
143 }
144
145 dbx.Config.LogDebug("body: %s", body)
146 if resp.StatusCode == http.StatusOK {
147 return
148 }
149 if resp.StatusCode == http.StatusConflict {
150 var apiError PropertiesAddAPIError
151 err = json.Unmarshal(body, &apiError)
152 if err != nil {
153 return
154 }
155 err = apiError
156 return
157 }
158 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
159 if err != nil {
160 return
161 }
162 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
163 return
164 }
165
166 //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route
167 type PropertiesOverwriteAPIError struct {
168 dropbox.APIError
169 EndpointError *InvalidPropertyGroupError `json:"error"`
170 }
171
172 func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
173 cli := dbx.Client
174
175 dbx.Config.LogDebug("arg: %v", arg)
176 b, err := json.Marshal(arg)
177 if err != nil {
178 return
179 }
180
181 headers := map[string]string{
182 "Content-Type": "application/json",
183 }
184 if dbx.Config.AsMemberID != "" {
185 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
186 }
187
188 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/overwrite", headers, bytes.NewReader(b))
189 if err != nil {
190 return
191 }
192 dbx.Config.LogInfo("req: %v", req)
193
194 resp, err := cli.Do(req)
195 if err != nil {
196 return
197 }
198
199 dbx.Config.LogInfo("resp: %v", resp)
200 defer resp.Body.Close()
201 body, err := ioutil.ReadAll(resp.Body)
202 if err != nil {
203 return
204 }
205
206 dbx.Config.LogDebug("body: %s", body)
207 if resp.StatusCode == http.StatusOK {
208 return
209 }
210 if resp.StatusCode == http.StatusConflict {
211 var apiError PropertiesOverwriteAPIError
212 err = json.Unmarshal(body, &apiError)
213 if err != nil {
214 return
215 }
216 err = apiError
217 return
218 }
219 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
220 if err != nil {
221 return
222 }
223 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
224 return
225 }
226
227 //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route
228 type PropertiesRemoveAPIError struct {
229 dropbox.APIError
230 EndpointError *RemovePropertiesError `json:"error"`
231 }
232
233 func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
234 cli := dbx.Client
235
236 dbx.Config.LogDebug("arg: %v", arg)
237 b, err := json.Marshal(arg)
238 if err != nil {
239 return
240 }
241
242 headers := map[string]string{
243 "Content-Type": "application/json",
244 }
245 if dbx.Config.AsMemberID != "" {
246 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
247 }
248
249 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/remove", headers, bytes.NewReader(b))
250 if err != nil {
251 return
252 }
253 dbx.Config.LogInfo("req: %v", req)
254
255 resp, err := cli.Do(req)
256 if err != nil {
257 return
258 }
259
260 dbx.Config.LogInfo("resp: %v", resp)
261 defer resp.Body.Close()
262 body, err := ioutil.ReadAll(resp.Body)
263 if err != nil {
264 return
265 }
266
267 dbx.Config.LogDebug("body: %s", body)
268 if resp.StatusCode == http.StatusOK {
269 return
270 }
271 if resp.StatusCode == http.StatusConflict {
272 var apiError PropertiesRemoveAPIError
273 err = json.Unmarshal(body, &apiError)
274 if err != nil {
275 return
276 }
277 err = apiError
278 return
279 }
280 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
281 if err != nil {
282 return
283 }
284 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
285 return
286 }
287
288 //PropertiesSearchAPIError is an error-wrapper for the properties/search route
289 type PropertiesSearchAPIError struct {
290 dropbox.APIError
291 EndpointError *PropertiesSearchError `json:"error"`
292 }
293
294 func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
295 cli := dbx.Client
296
297 dbx.Config.LogDebug("arg: %v", arg)
298 b, err := json.Marshal(arg)
299 if err != nil {
300 return
301 }
302
303 headers := map[string]string{
304 "Content-Type": "application/json",
305 }
306 if dbx.Config.AsMemberID != "" {
307 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
308 }
309
310 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/search", headers, bytes.NewReader(b))
311 if err != nil {
312 return
313 }
314 dbx.Config.LogInfo("req: %v", req)
315
316 resp, err := cli.Do(req)
317 if err != nil {
318 return
319 }
320
321 dbx.Config.LogInfo("resp: %v", resp)
322 defer resp.Body.Close()
323 body, err := ioutil.ReadAll(resp.Body)
324 if err != nil {
325 return
326 }
327
328 dbx.Config.LogDebug("body: %s", body)
329 if resp.StatusCode == http.StatusOK {
330 err = json.Unmarshal(body, &res)
331 if err != nil {
332 return
333 }
334
335 return
336 }
337 if resp.StatusCode == http.StatusConflict {
338 var apiError PropertiesSearchAPIError
339 err = json.Unmarshal(body, &apiError)
340 if err != nil {
341 return
342 }
343 err = apiError
344 return
345 }
346 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
347 if err != nil {
348 return
349 }
350 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
351 return
352 }
353
354 //PropertiesSearchContinueAPIError is an error-wrapper for the properties/search/continue route
355 type PropertiesSearchContinueAPIError struct {
356 dropbox.APIError
357 EndpointError *PropertiesSearchContinueError `json:"error"`
358 }
359
360 func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) {
361 cli := dbx.Client
362
363 dbx.Config.LogDebug("arg: %v", arg)
364 b, err := json.Marshal(arg)
365 if err != nil {
366 return
367 }
368
369 headers := map[string]string{
370 "Content-Type": "application/json",
371 }
372 if dbx.Config.AsMemberID != "" {
373 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
374 }
375
376 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/search/continue", headers, bytes.NewReader(b))
377 if err != nil {
378 return
379 }
380 dbx.Config.LogInfo("req: %v", req)
381
382 resp, err := cli.Do(req)
383 if err != nil {
384 return
385 }
386
387 dbx.Config.LogInfo("resp: %v", resp)
388 defer resp.Body.Close()
389 body, err := ioutil.ReadAll(resp.Body)
390 if err != nil {
391 return
392 }
393
394 dbx.Config.LogDebug("body: %s", body)
395 if resp.StatusCode == http.StatusOK {
396 err = json.Unmarshal(body, &res)
397 if err != nil {
398 return
399 }
400
401 return
402 }
403 if resp.StatusCode == http.StatusConflict {
404 var apiError PropertiesSearchContinueAPIError
405 err = json.Unmarshal(body, &apiError)
406 if err != nil {
407 return
408 }
409 err = apiError
410 return
411 }
412 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
413 if err != nil {
414 return
415 }
416 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
417 return
418 }
419
420 //PropertiesUpdateAPIError is an error-wrapper for the properties/update route
421 type PropertiesUpdateAPIError struct {
422 dropbox.APIError
423 EndpointError *UpdatePropertiesError `json:"error"`
424 }
425
426 func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
427 cli := dbx.Client
428
429 dbx.Config.LogDebug("arg: %v", arg)
430 b, err := json.Marshal(arg)
431 if err != nil {
432 return
433 }
434
435 headers := map[string]string{
436 "Content-Type": "application/json",
437 }
438 if dbx.Config.AsMemberID != "" {
439 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
440 }
441
442 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/update", headers, bytes.NewReader(b))
443 if err != nil {
444 return
445 }
446 dbx.Config.LogInfo("req: %v", req)
447
448 resp, err := cli.Do(req)
449 if err != nil {
450 return
451 }
452
453 dbx.Config.LogInfo("resp: %v", resp)
454 defer resp.Body.Close()
455 body, err := ioutil.ReadAll(resp.Body)
456 if err != nil {
457 return
458 }
459
460 dbx.Config.LogDebug("body: %s", body)
461 if resp.StatusCode == http.StatusOK {
462 return
463 }
464 if resp.StatusCode == http.StatusConflict {
465 var apiError PropertiesUpdateAPIError
466 err = json.Unmarshal(body, &apiError)
467 if err != nil {
468 return
469 }
470 err = apiError
471 return
472 }
473 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
474 if err != nil {
475 return
476 }
477 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
478 return
479 }
480
481 //TemplatesAddForTeamAPIError is an error-wrapper for the templates/add_for_team route
482 type TemplatesAddForTeamAPIError struct {
483 dropbox.APIError
484 EndpointError *ModifyTemplateError `json:"error"`
485 }
486
487 func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
488 cli := dbx.Client
489
490 dbx.Config.LogDebug("arg: %v", arg)
491 b, err := json.Marshal(arg)
492 if err != nil {
493 return
494 }
495
496 headers := map[string]string{
497 "Content-Type": "application/json",
498 }
499
500 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/add_for_team", headers, bytes.NewReader(b))
501 if err != nil {
502 return
503 }
504 dbx.Config.LogInfo("req: %v", req)
505
506 resp, err := cli.Do(req)
507 if err != nil {
508 return
509 }
510
511 dbx.Config.LogInfo("resp: %v", resp)
512 defer resp.Body.Close()
513 body, err := ioutil.ReadAll(resp.Body)
514 if err != nil {
515 return
516 }
517
518 dbx.Config.LogDebug("body: %s", body)
519 if resp.StatusCode == http.StatusOK {
520 err = json.Unmarshal(body, &res)
521 if err != nil {
522 return
523 }
524
525 return
526 }
527 if resp.StatusCode == http.StatusConflict {
528 var apiError TemplatesAddForTeamAPIError
529 err = json.Unmarshal(body, &apiError)
530 if err != nil {
531 return
532 }
533 err = apiError
534 return
535 }
536 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
537 if err != nil {
538 return
539 }
540 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
541 return
542 }
543
544 //TemplatesAddForUserAPIError is an error-wrapper for the templates/add_for_user route
545 type TemplatesAddForUserAPIError struct {
546 dropbox.APIError
547 EndpointError *ModifyTemplateError `json:"error"`
548 }
549
550 func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
551 cli := dbx.Client
552
553 dbx.Config.LogDebug("arg: %v", arg)
554 b, err := json.Marshal(arg)
555 if err != nil {
556 return
557 }
558
559 headers := map[string]string{
560 "Content-Type": "application/json",
561 }
562 if dbx.Config.AsMemberID != "" {
563 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
564 }
565
566 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/add_for_user", headers, bytes.NewReader(b))
567 if err != nil {
568 return
569 }
570 dbx.Config.LogInfo("req: %v", req)
571
572 resp, err := cli.Do(req)
573 if err != nil {
574 return
575 }
576
577 dbx.Config.LogInfo("resp: %v", resp)
578 defer resp.Body.Close()
579 body, err := ioutil.ReadAll(resp.Body)
580 if err != nil {
581 return
582 }
583
584 dbx.Config.LogDebug("body: %s", body)
585 if resp.StatusCode == http.StatusOK {
586 err = json.Unmarshal(body, &res)
587 if err != nil {
588 return
589 }
590
591 return
592 }
593 if resp.StatusCode == http.StatusConflict {
594 var apiError TemplatesAddForUserAPIError
595 err = json.Unmarshal(body, &apiError)
596 if err != nil {
597 return
598 }
599 err = apiError
600 return
601 }
602 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
603 if err != nil {
604 return
605 }
606 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
607 return
608 }
609
610 //TemplatesGetForTeamAPIError is an error-wrapper for the templates/get_for_team route
611 type TemplatesGetForTeamAPIError struct {
612 dropbox.APIError
613 EndpointError *TemplateError `json:"error"`
614 }
615
616 func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
617 cli := dbx.Client
618
619 dbx.Config.LogDebug("arg: %v", arg)
620 b, err := json.Marshal(arg)
621 if err != nil {
622 return
623 }
624
625 headers := map[string]string{
626 "Content-Type": "application/json",
627 }
628
629 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/get_for_team", headers, bytes.NewReader(b))
630 if err != nil {
631 return
632 }
633 dbx.Config.LogInfo("req: %v", req)
634
635 resp, err := cli.Do(req)
636 if err != nil {
637 return
638 }
639
640 dbx.Config.LogInfo("resp: %v", resp)
641 defer resp.Body.Close()
642 body, err := ioutil.ReadAll(resp.Body)
643 if err != nil {
644 return
645 }
646
647 dbx.Config.LogDebug("body: %s", body)
648 if resp.StatusCode == http.StatusOK {
649 err = json.Unmarshal(body, &res)
650 if err != nil {
651 return
652 }
653
654 return
655 }
656 if resp.StatusCode == http.StatusConflict {
657 var apiError TemplatesGetForTeamAPIError
658 err = json.Unmarshal(body, &apiError)
659 if err != nil {
660 return
661 }
662 err = apiError
663 return
664 }
665 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
666 if err != nil {
667 return
668 }
669 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
670 return
671 }
672
673 //TemplatesGetForUserAPIError is an error-wrapper for the templates/get_for_user route
674 type TemplatesGetForUserAPIError struct {
675 dropbox.APIError
676 EndpointError *TemplateError `json:"error"`
677 }
678
679 func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
680 cli := dbx.Client
681
682 dbx.Config.LogDebug("arg: %v", arg)
683 b, err := json.Marshal(arg)
684 if err != nil {
685 return
686 }
687
688 headers := map[string]string{
689 "Content-Type": "application/json",
690 }
691 if dbx.Config.AsMemberID != "" {
692 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
693 }
694
695 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/get_for_user", headers, bytes.NewReader(b))
696 if err != nil {
697 return
698 }
699 dbx.Config.LogInfo("req: %v", req)
700
701 resp, err := cli.Do(req)
702 if err != nil {
703 return
704 }
705
706 dbx.Config.LogInfo("resp: %v", resp)
707 defer resp.Body.Close()
708 body, err := ioutil.ReadAll(resp.Body)
709 if err != nil {
710 return
711 }
712
713 dbx.Config.LogDebug("body: %s", body)
714 if resp.StatusCode == http.StatusOK {
715 err = json.Unmarshal(body, &res)
716 if err != nil {
717 return
718 }
719
720 return
721 }
722 if resp.StatusCode == http.StatusConflict {
723 var apiError TemplatesGetForUserAPIError
724 err = json.Unmarshal(body, &apiError)
725 if err != nil {
726 return
727 }
728 err = apiError
729 return
730 }
731 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
732 if err != nil {
733 return
734 }
735 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
736 return
737 }
738
739 //TemplatesListForTeamAPIError is an error-wrapper for the templates/list_for_team route
740 type TemplatesListForTeamAPIError struct {
741 dropbox.APIError
742 EndpointError *TemplateError `json:"error"`
743 }
744
745 func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error) {
746 cli := dbx.Client
747
748 headers := map[string]string{}
749
750 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/list_for_team", headers, nil)
751 if err != nil {
752 return
753 }
754 dbx.Config.LogInfo("req: %v", req)
755
756 resp, err := cli.Do(req)
757 if err != nil {
758 return
759 }
760
761 dbx.Config.LogInfo("resp: %v", resp)
762 defer resp.Body.Close()
763 body, err := ioutil.ReadAll(resp.Body)
764 if err != nil {
765 return
766 }
767
768 dbx.Config.LogDebug("body: %s", body)
769 if resp.StatusCode == http.StatusOK {
770 err = json.Unmarshal(body, &res)
771 if err != nil {
772 return
773 }
774
775 return
776 }
777 if resp.StatusCode == http.StatusConflict {
778 var apiError TemplatesListForTeamAPIError
779 err = json.Unmarshal(body, &apiError)
780 if err != nil {
781 return
782 }
783 err = apiError
784 return
785 }
786 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
787 if err != nil {
788 return
789 }
790 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
791 return
792 }
793
794 //TemplatesListForUserAPIError is an error-wrapper for the templates/list_for_user route
795 type TemplatesListForUserAPIError struct {
796 dropbox.APIError
797 EndpointError *TemplateError `json:"error"`
798 }
799
800 func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error) {
801 cli := dbx.Client
802
803 headers := map[string]string{}
804 if dbx.Config.AsMemberID != "" {
805 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
806 }
807
808 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/list_for_user", headers, nil)
809 if err != nil {
810 return
811 }
812 dbx.Config.LogInfo("req: %v", req)
813
814 resp, err := cli.Do(req)
815 if err != nil {
816 return
817 }
818
819 dbx.Config.LogInfo("resp: %v", resp)
820 defer resp.Body.Close()
821 body, err := ioutil.ReadAll(resp.Body)
822 if err != nil {
823 return
824 }
825
826 dbx.Config.LogDebug("body: %s", body)
827 if resp.StatusCode == http.StatusOK {
828 err = json.Unmarshal(body, &res)
829 if err != nil {
830 return
831 }
832
833 return
834 }
835 if resp.StatusCode == http.StatusConflict {
836 var apiError TemplatesListForUserAPIError
837 err = json.Unmarshal(body, &apiError)
838 if err != nil {
839 return
840 }
841 err = apiError
842 return
843 }
844 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
845 if err != nil {
846 return
847 }
848 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
849 return
850 }
851
852 //TemplatesRemoveForTeamAPIError is an error-wrapper for the templates/remove_for_team route
853 type TemplatesRemoveForTeamAPIError struct {
854 dropbox.APIError
855 EndpointError *TemplateError `json:"error"`
856 }
857
858 func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) {
859 cli := dbx.Client
860
861 dbx.Config.LogDebug("arg: %v", arg)
862 b, err := json.Marshal(arg)
863 if err != nil {
864 return
865 }
866
867 headers := map[string]string{
868 "Content-Type": "application/json",
869 }
870
871 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_team", headers, bytes.NewReader(b))
872 if err != nil {
873 return
874 }
875 dbx.Config.LogInfo("req: %v", req)
876
877 resp, err := cli.Do(req)
878 if err != nil {
879 return
880 }
881
882 dbx.Config.LogInfo("resp: %v", resp)
883 defer resp.Body.Close()
884 body, err := ioutil.ReadAll(resp.Body)
885 if err != nil {
886 return
887 }
888
889 dbx.Config.LogDebug("body: %s", body)
890 if resp.StatusCode == http.StatusOK {
891 return
892 }
893 if resp.StatusCode == http.StatusConflict {
894 var apiError TemplatesRemoveForTeamAPIError
895 err = json.Unmarshal(body, &apiError)
896 if err != nil {
897 return
898 }
899 err = apiError
900 return
901 }
902 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
903 if err != nil {
904 return
905 }
906 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
907 return
908 }
909
910 //TemplatesRemoveForUserAPIError is an error-wrapper for the templates/remove_for_user route
911 type TemplatesRemoveForUserAPIError struct {
912 dropbox.APIError
913 EndpointError *TemplateError `json:"error"`
914 }
915
916 func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) {
917 cli := dbx.Client
918
919 dbx.Config.LogDebug("arg: %v", arg)
920 b, err := json.Marshal(arg)
921 if err != nil {
922 return
923 }
924
925 headers := map[string]string{
926 "Content-Type": "application/json",
927 }
928 if dbx.Config.AsMemberID != "" {
929 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
930 }
931
932 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_user", headers, bytes.NewReader(b))
933 if err != nil {
934 return
935 }
936 dbx.Config.LogInfo("req: %v", req)
937
938 resp, err := cli.Do(req)
939 if err != nil {
940 return
941 }
942
943 dbx.Config.LogInfo("resp: %v", resp)
944 defer resp.Body.Close()
945 body, err := ioutil.ReadAll(resp.Body)
946 if err != nil {
947 return
948 }
949
950 dbx.Config.LogDebug("body: %s", body)
951 if resp.StatusCode == http.StatusOK {
952 return
953 }
954 if resp.StatusCode == http.StatusConflict {
955 var apiError TemplatesRemoveForUserAPIError
956 err = json.Unmarshal(body, &apiError)
957 if err != nil {
958 return
959 }
960 err = apiError
961 return
962 }
963 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
964 if err != nil {
965 return
966 }
967 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
968 return
969 }
970
971 //TemplatesUpdateForTeamAPIError is an error-wrapper for the templates/update_for_team route
972 type TemplatesUpdateForTeamAPIError struct {
973 dropbox.APIError
974 EndpointError *ModifyTemplateError `json:"error"`
975 }
976
977 func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
978 cli := dbx.Client
979
980 dbx.Config.LogDebug("arg: %v", arg)
981 b, err := json.Marshal(arg)
982 if err != nil {
983 return
984 }
985
986 headers := map[string]string{
987 "Content-Type": "application/json",
988 }
989
990 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/update_for_team", headers, bytes.NewReader(b))
991 if err != nil {
992 return
993 }
994 dbx.Config.LogInfo("req: %v", req)
995
996 resp, err := cli.Do(req)
997 if err != nil {
998 return
999 }
1000
1001 dbx.Config.LogInfo("resp: %v", resp)
1002 defer resp.Body.Close()
1003 body, err := ioutil.ReadAll(resp.Body)
1004 if err != nil {
1005 return
1006 }
1007
1008 dbx.Config.LogDebug("body: %s", body)
1009 if resp.StatusCode == http.StatusOK {
1010 err = json.Unmarshal(body, &res)
1011 if err != nil {
1012 return
1013 }
1014
1015 return
1016 }
1017 if resp.StatusCode == http.StatusConflict {
1018 var apiError TemplatesUpdateForTeamAPIError
1019 err = json.Unmarshal(body, &apiError)
1020 if err != nil {
1021 return
1022 }
1023 err = apiError
1024 return
1025 }
1026 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1027 if err != nil {
1028 return
1029 }
1030 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1031 return
1032 }
1033
1034 //TemplatesUpdateForUserAPIError is an error-wrapper for the templates/update_for_user route
1035 type TemplatesUpdateForUserAPIError struct {
1036 dropbox.APIError
1037 EndpointError *ModifyTemplateError `json:"error"`
1038 }
1039
1040 func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
1041 cli := dbx.Client
1042
1043 dbx.Config.LogDebug("arg: %v", arg)
1044 b, err := json.Marshal(arg)
1045 if err != nil {
1046 return
1047 }
1048
1049 headers := map[string]string{
1050 "Content-Type": "application/json",
1051 }
1052 if dbx.Config.AsMemberID != "" {
1053 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1054 }
1055
1056 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/update_for_user", headers, bytes.NewReader(b))
1057 if err != nil {
1058 return
1059 }
1060 dbx.Config.LogInfo("req: %v", req)
1061
1062 resp, err := cli.Do(req)
1063 if err != nil {
1064 return
1065 }
1066
1067 dbx.Config.LogInfo("resp: %v", resp)
1068 defer resp.Body.Close()
1069 body, err := ioutil.ReadAll(resp.Body)
1070 if err != nil {
1071 return
1072 }
1073
1074 dbx.Config.LogDebug("body: %s", body)
1075 if resp.StatusCode == http.StatusOK {
1076 err = json.Unmarshal(body, &res)
1077 if err != nil {
1078 return
1079 }
1080
1081 return
1082 }
1083 if resp.StatusCode == http.StatusConflict {
1084 var apiError TemplatesUpdateForUserAPIError
1085 err = json.Unmarshal(body, &apiError)
1086 if err != nil {
1087 return
1088 }
1089 err = apiError
1090 return
1091 }
1092 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1093 if err != nil {
1094 return
1095 }
1096 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1097 return
1098 }
1099
1100 // New returns a Client implementation for this namespace
1101 func New(c dropbox.Config) Client {
1102 ctx := apiImpl(dropbox.NewContext(c))
1103 return &ctx
1104 }
+0
-1022
dropbox/file_properties/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package file_properties : This namespace contains helpers for property and
21 // template metadata endpoints. These endpoints enable you to tag arbitrary
22 // key/value data to Dropbox files. The most basic unit in this namespace is
23 // the `PropertyField`. These fields encapsulate the actual key/value data.
24 // Fields are added to a Dropbox file using a `PropertyGroup`. Property groups
25 // contain a reference to a Dropbox file and a `PropertyGroupTemplate`. Property
26 // groups are uniquely identified by the combination of their associated Dropbox
27 // file and template. The `PropertyGroupTemplate` is a way of restricting the
28 // possible key names and value types of the data within a property group. The
29 // possible key names and value types are explicitly enumerated using
30 // `PropertyFieldTemplate` objects. You can think of a property group template
31 // as a class definition for a particular key/value metadata object, and the
32 // property groups themselves as the instantiations of these objects. Templates
33 // are owned either by a user/app pair or team/app pair. Templates and their
34 // associated properties can't be accessed by any app other than the app that
35 // created them, and even then, only when the app is linked with the owner of
36 // the template (either a user or team). User-owned templates are accessed via
37 // the user-auth file_properties/templates/*_for_user endpoints, while
38 // team-owned templates are accessed via the team-auth
39 // file_properties/templates/*_for_team endpoints. Properties associated with
40 // either type of template can be accessed via the user-auth properties/*
41 // endpoints. Finally, properties can be accessed from a number of endpoints
42 // that return metadata, including `files/get_metadata`, and
43 // `files/list_folder`. Properties can also be added during upload, using
44 // `files/upload`.
45 package file_properties
46
47 import (
48 "encoding/json"
49
50 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
51 )
52
53 // AddPropertiesArg : has no documentation (yet)
54 type AddPropertiesArg struct {
55 // Path : A unique identifier for the file or folder.
56 Path string `json:"path"`
57 // PropertyGroups : The property groups which are to be added to a Dropbox
58 // file.
59 PropertyGroups []*PropertyGroup `json:"property_groups"`
60 }
61
62 // NewAddPropertiesArg returns a new AddPropertiesArg instance
63 func NewAddPropertiesArg(Path string, PropertyGroups []*PropertyGroup) *AddPropertiesArg {
64 s := new(AddPropertiesArg)
65 s.Path = Path
66 s.PropertyGroups = PropertyGroups
67 return s
68 }
69
70 // TemplateError : has no documentation (yet)
71 type TemplateError struct {
72 dropbox.Tagged
73 // TemplateNotFound : Template does not exist for the given identifier.
74 TemplateNotFound string `json:"template_not_found,omitempty"`
75 }
76
77 // Valid tag values for TemplateError
78 const (
79 TemplateErrorTemplateNotFound = "template_not_found"
80 TemplateErrorRestrictedContent = "restricted_content"
81 TemplateErrorOther = "other"
82 )
83
84 // UnmarshalJSON deserializes into a TemplateError instance
85 func (u *TemplateError) UnmarshalJSON(body []byte) error {
86 type wrap struct {
87 dropbox.Tagged
88 }
89 var w wrap
90 var err error
91 if err = json.Unmarshal(body, &w); err != nil {
92 return err
93 }
94 u.Tag = w.Tag
95 switch u.Tag {
96 case "template_not_found":
97 err = json.Unmarshal(body, &u.TemplateNotFound)
98
99 if err != nil {
100 return err
101 }
102 }
103 return nil
104 }
105
106 // PropertiesError : has no documentation (yet)
107 type PropertiesError struct {
108 dropbox.Tagged
109 // TemplateNotFound : Template does not exist for the given identifier.
110 TemplateNotFound string `json:"template_not_found,omitempty"`
111 // Path : has no documentation (yet)
112 Path *LookupError `json:"path,omitempty"`
113 }
114
115 // Valid tag values for PropertiesError
116 const (
117 PropertiesErrorTemplateNotFound = "template_not_found"
118 PropertiesErrorRestrictedContent = "restricted_content"
119 PropertiesErrorOther = "other"
120 PropertiesErrorPath = "path"
121 PropertiesErrorUnsupportedFolder = "unsupported_folder"
122 )
123
124 // UnmarshalJSON deserializes into a PropertiesError instance
125 func (u *PropertiesError) UnmarshalJSON(body []byte) error {
126 type wrap struct {
127 dropbox.Tagged
128 // Path : has no documentation (yet)
129 Path json.RawMessage `json:"path,omitempty"`
130 }
131 var w wrap
132 var err error
133 if err = json.Unmarshal(body, &w); err != nil {
134 return err
135 }
136 u.Tag = w.Tag
137 switch u.Tag {
138 case "template_not_found":
139 err = json.Unmarshal(body, &u.TemplateNotFound)
140
141 if err != nil {
142 return err
143 }
144 case "path":
145 err = json.Unmarshal(w.Path, &u.Path)
146
147 if err != nil {
148 return err
149 }
150 }
151 return nil
152 }
153
154 // InvalidPropertyGroupError : has no documentation (yet)
155 type InvalidPropertyGroupError struct {
156 dropbox.Tagged
157 // TemplateNotFound : Template does not exist for the given identifier.
158 TemplateNotFound string `json:"template_not_found,omitempty"`
159 // Path : has no documentation (yet)
160 Path *LookupError `json:"path,omitempty"`
161 }
162
163 // Valid tag values for InvalidPropertyGroupError
164 const (
165 InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
166 InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
167 InvalidPropertyGroupErrorOther = "other"
168 InvalidPropertyGroupErrorPath = "path"
169 InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
170 InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
171 InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
172 )
173
174 // UnmarshalJSON deserializes into a InvalidPropertyGroupError instance
175 func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error {
176 type wrap struct {
177 dropbox.Tagged
178 // Path : has no documentation (yet)
179 Path json.RawMessage `json:"path,omitempty"`
180 }
181 var w wrap
182 var err error
183 if err = json.Unmarshal(body, &w); err != nil {
184 return err
185 }
186 u.Tag = w.Tag
187 switch u.Tag {
188 case "template_not_found":
189 err = json.Unmarshal(body, &u.TemplateNotFound)
190
191 if err != nil {
192 return err
193 }
194 case "path":
195 err = json.Unmarshal(w.Path, &u.Path)
196
197 if err != nil {
198 return err
199 }
200 }
201 return nil
202 }
203
204 // AddPropertiesError : has no documentation (yet)
205 type AddPropertiesError struct {
206 dropbox.Tagged
207 // TemplateNotFound : Template does not exist for the given identifier.
208 TemplateNotFound string `json:"template_not_found,omitempty"`
209 // Path : has no documentation (yet)
210 Path *LookupError `json:"path,omitempty"`
211 }
212
213 // Valid tag values for AddPropertiesError
214 const (
215 AddPropertiesErrorTemplateNotFound = "template_not_found"
216 AddPropertiesErrorRestrictedContent = "restricted_content"
217 AddPropertiesErrorOther = "other"
218 AddPropertiesErrorPath = "path"
219 AddPropertiesErrorUnsupportedFolder = "unsupported_folder"
220 AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
221 AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
222 AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_exists"
223 )
224
225 // UnmarshalJSON deserializes into a AddPropertiesError instance
226 func (u *AddPropertiesError) UnmarshalJSON(body []byte) error {
227 type wrap struct {
228 dropbox.Tagged
229 // Path : has no documentation (yet)
230 Path json.RawMessage `json:"path,omitempty"`
231 }
232 var w wrap
233 var err error
234 if err = json.Unmarshal(body, &w); err != nil {
235 return err
236 }
237 u.Tag = w.Tag
238 switch u.Tag {
239 case "template_not_found":
240 err = json.Unmarshal(body, &u.TemplateNotFound)
241
242 if err != nil {
243 return err
244 }
245 case "path":
246 err = json.Unmarshal(w.Path, &u.Path)
247
248 if err != nil {
249 return err
250 }
251 }
252 return nil
253 }
254
255 // PropertyGroupTemplate : Defines how a property group may be structured.
256 type PropertyGroupTemplate struct {
257 // Name : Display name for the template. Template names can be up to 256
258 // bytes.
259 Name string `json:"name"`
260 // Description : Description for the template. Template descriptions can be
261 // up to 1024 bytes.
262 Description string `json:"description"`
263 // Fields : Definitions of the property fields associated with this
264 // template. There can be up to 32 properties in a single template.
265 Fields []*PropertyFieldTemplate `json:"fields"`
266 }
267
268 // NewPropertyGroupTemplate returns a new PropertyGroupTemplate instance
269 func NewPropertyGroupTemplate(Name string, Description string, Fields []*PropertyFieldTemplate) *PropertyGroupTemplate {
270 s := new(PropertyGroupTemplate)
271 s.Name = Name
272 s.Description = Description
273 s.Fields = Fields
274 return s
275 }
276
277 // AddTemplateArg : has no documentation (yet)
278 type AddTemplateArg struct {
279 PropertyGroupTemplate
280 }
281
282 // NewAddTemplateArg returns a new AddTemplateArg instance
283 func NewAddTemplateArg(Name string, Description string, Fields []*PropertyFieldTemplate) *AddTemplateArg {
284 s := new(AddTemplateArg)
285 s.Name = Name
286 s.Description = Description
287 s.Fields = Fields
288 return s
289 }
290
291 // AddTemplateResult : has no documentation (yet)
292 type AddTemplateResult struct {
293 // TemplateId : An identifier for template added by See
294 // `templatesAddForUser` or `templatesAddForTeam`.
295 TemplateId string `json:"template_id"`
296 }
297
298 // NewAddTemplateResult returns a new AddTemplateResult instance
299 func NewAddTemplateResult(TemplateId string) *AddTemplateResult {
300 s := new(AddTemplateResult)
301 s.TemplateId = TemplateId
302 return s
303 }
304
305 // GetTemplateArg : has no documentation (yet)
306 type GetTemplateArg struct {
307 // TemplateId : An identifier for template added by route See
308 // `templatesAddForUser` or `templatesAddForTeam`.
309 TemplateId string `json:"template_id"`
310 }
311
312 // NewGetTemplateArg returns a new GetTemplateArg instance
313 func NewGetTemplateArg(TemplateId string) *GetTemplateArg {
314 s := new(GetTemplateArg)
315 s.TemplateId = TemplateId
316 return s
317 }
318
319 // GetTemplateResult : has no documentation (yet)
320 type GetTemplateResult struct {
321 PropertyGroupTemplate
322 }
323
324 // NewGetTemplateResult returns a new GetTemplateResult instance
325 func NewGetTemplateResult(Name string, Description string, Fields []*PropertyFieldTemplate) *GetTemplateResult {
326 s := new(GetTemplateResult)
327 s.Name = Name
328 s.Description = Description
329 s.Fields = Fields
330 return s
331 }
332
333 // ListTemplateResult : has no documentation (yet)
334 type ListTemplateResult struct {
335 // TemplateIds : List of identifiers for templates added by See
336 // `templatesAddForUser` or `templatesAddForTeam`.
337 TemplateIds []string `json:"template_ids"`
338 }
339
340 // NewListTemplateResult returns a new ListTemplateResult instance
341 func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
342 s := new(ListTemplateResult)
343 s.TemplateIds = TemplateIds
344 return s
345 }
346
347 // LogicalOperator : Logical operator to join search queries together.
348 type LogicalOperator struct {
349 dropbox.Tagged
350 }
351
352 // Valid tag values for LogicalOperator
353 const (
354 LogicalOperatorOrOperator = "or_operator"
355 LogicalOperatorOther = "other"
356 )
357
358 // LookUpPropertiesError : has no documentation (yet)
359 type LookUpPropertiesError struct {
360 dropbox.Tagged
361 }
362
363 // Valid tag values for LookUpPropertiesError
364 const (
365 LookUpPropertiesErrorPropertyGroupNotFound = "property_group_not_found"
366 LookUpPropertiesErrorOther = "other"
367 )
368
369 // LookupError : has no documentation (yet)
370 type LookupError struct {
371 dropbox.Tagged
372 // MalformedPath : has no documentation (yet)
373 MalformedPath string `json:"malformed_path,omitempty"`
374 }
375
376 // Valid tag values for LookupError
377 const (
378 LookupErrorMalformedPath = "malformed_path"
379 LookupErrorNotFound = "not_found"
380 LookupErrorNotFile = "not_file"
381 LookupErrorNotFolder = "not_folder"
382 LookupErrorRestrictedContent = "restricted_content"
383 LookupErrorOther = "other"
384 )
385
386 // UnmarshalJSON deserializes into a LookupError instance
387 func (u *LookupError) UnmarshalJSON(body []byte) error {
388 type wrap struct {
389 dropbox.Tagged
390 }
391 var w wrap
392 var err error
393 if err = json.Unmarshal(body, &w); err != nil {
394 return err
395 }
396 u.Tag = w.Tag
397 switch u.Tag {
398 case "malformed_path":
399 err = json.Unmarshal(body, &u.MalformedPath)
400
401 if err != nil {
402 return err
403 }
404 }
405 return nil
406 }
407
408 // ModifyTemplateError : has no documentation (yet)
409 type ModifyTemplateError struct {
410 dropbox.Tagged
411 // TemplateNotFound : Template does not exist for the given identifier.
412 TemplateNotFound string `json:"template_not_found,omitempty"`
413 }
414
415 // Valid tag values for ModifyTemplateError
416 const (
417 ModifyTemplateErrorTemplateNotFound = "template_not_found"
418 ModifyTemplateErrorRestrictedContent = "restricted_content"
419 ModifyTemplateErrorOther = "other"
420 ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
421 ModifyTemplateErrorTooManyProperties = "too_many_properties"
422 ModifyTemplateErrorTooManyTemplates = "too_many_templates"
423 ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large"
424 )
425
426 // UnmarshalJSON deserializes into a ModifyTemplateError instance
427 func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error {
428 type wrap struct {
429 dropbox.Tagged
430 }
431 var w wrap
432 var err error
433 if err = json.Unmarshal(body, &w); err != nil {
434 return err
435 }
436 u.Tag = w.Tag
437 switch u.Tag {
438 case "template_not_found":
439 err = json.Unmarshal(body, &u.TemplateNotFound)
440
441 if err != nil {
442 return err
443 }
444 }
445 return nil
446 }
447
448 // OverwritePropertyGroupArg : has no documentation (yet)
449 type OverwritePropertyGroupArg struct {
450 // Path : A unique identifier for the file or folder.
451 Path string `json:"path"`
452 // PropertyGroups : The property groups "snapshot" updates to force apply.
453 PropertyGroups []*PropertyGroup `json:"property_groups"`
454 }
455
456 // NewOverwritePropertyGroupArg returns a new OverwritePropertyGroupArg instance
457 func NewOverwritePropertyGroupArg(Path string, PropertyGroups []*PropertyGroup) *OverwritePropertyGroupArg {
458 s := new(OverwritePropertyGroupArg)
459 s.Path = Path
460 s.PropertyGroups = PropertyGroups
461 return s
462 }
463
464 // PropertiesSearchArg : has no documentation (yet)
465 type PropertiesSearchArg struct {
466 // Queries : Queries to search.
467 Queries []*PropertiesSearchQuery `json:"queries"`
468 // TemplateFilter : Filter results to contain only properties associated
469 // with these template IDs.
470 TemplateFilter *TemplateFilter `json:"template_filter"`
471 }
472
473 // NewPropertiesSearchArg returns a new PropertiesSearchArg instance
474 func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *PropertiesSearchArg {
475 s := new(PropertiesSearchArg)
476 s.Queries = Queries
477 s.TemplateFilter = &TemplateFilter{Tagged: dropbox.Tagged{"filter_none"}}
478 return s
479 }
480
481 // PropertiesSearchContinueArg : has no documentation (yet)
482 type PropertiesSearchContinueArg struct {
483 // Cursor : The cursor returned by your last call to `propertiesSearch` or
484 // `propertiesSearchContinue`.
485 Cursor string `json:"cursor"`
486 }
487
488 // NewPropertiesSearchContinueArg returns a new PropertiesSearchContinueArg instance
489 func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchContinueArg {
490 s := new(PropertiesSearchContinueArg)
491 s.Cursor = Cursor
492 return s
493 }
494
495 // PropertiesSearchContinueError : has no documentation (yet)
496 type PropertiesSearchContinueError struct {
497 dropbox.Tagged
498 }
499
500 // Valid tag values for PropertiesSearchContinueError
501 const (
502 PropertiesSearchContinueErrorReset = "reset"
503 PropertiesSearchContinueErrorOther = "other"
504 )
505
506 // PropertiesSearchError : has no documentation (yet)
507 type PropertiesSearchError struct {
508 dropbox.Tagged
509 // PropertyGroupLookup : has no documentation (yet)
510 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
511 }
512
513 // Valid tag values for PropertiesSearchError
514 const (
515 PropertiesSearchErrorPropertyGroupLookup = "property_group_lookup"
516 PropertiesSearchErrorOther = "other"
517 )
518
519 // UnmarshalJSON deserializes into a PropertiesSearchError instance
520 func (u *PropertiesSearchError) UnmarshalJSON(body []byte) error {
521 type wrap struct {
522 dropbox.Tagged
523 // PropertyGroupLookup : has no documentation (yet)
524 PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
525 }
526 var w wrap
527 var err error
528 if err = json.Unmarshal(body, &w); err != nil {
529 return err
530 }
531 u.Tag = w.Tag
532 switch u.Tag {
533 case "property_group_lookup":
534 err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
535
536 if err != nil {
537 return err
538 }
539 }
540 return nil
541 }
542
543 // PropertiesSearchMatch : has no documentation (yet)
544 type PropertiesSearchMatch struct {
545 // Id : The ID for the matched file or folder.
546 Id string `json:"id"`
547 // Path : The path for the matched file or folder.
548 Path string `json:"path"`
549 // IsDeleted : Whether the file or folder is deleted.
550 IsDeleted bool `json:"is_deleted"`
551 // PropertyGroups : List of custom property groups associated with the file.
552 PropertyGroups []*PropertyGroup `json:"property_groups"`
553 }
554
555 // NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance
556 func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch {
557 s := new(PropertiesSearchMatch)
558 s.Id = Id
559 s.Path = Path
560 s.IsDeleted = IsDeleted
561 s.PropertyGroups = PropertyGroups
562 return s
563 }
564
565 // PropertiesSearchMode : has no documentation (yet)
566 type PropertiesSearchMode struct {
567 dropbox.Tagged
568 // FieldName : Search for a value associated with this field name.
569 FieldName string `json:"field_name,omitempty"`
570 }
571
572 // Valid tag values for PropertiesSearchMode
573 const (
574 PropertiesSearchModeFieldName = "field_name"
575 PropertiesSearchModeOther = "other"
576 )
577
578 // UnmarshalJSON deserializes into a PropertiesSearchMode instance
579 func (u *PropertiesSearchMode) UnmarshalJSON(body []byte) error {
580 type wrap struct {
581 dropbox.Tagged
582 }
583 var w wrap
584 var err error
585 if err = json.Unmarshal(body, &w); err != nil {
586 return err
587 }
588 u.Tag = w.Tag
589 switch u.Tag {
590 case "field_name":
591 err = json.Unmarshal(body, &u.FieldName)
592
593 if err != nil {
594 return err
595 }
596 }
597 return nil
598 }
599
600 // PropertiesSearchQuery : has no documentation (yet)
601 type PropertiesSearchQuery struct {
602 // Query : The property field value for which to search across templates.
603 Query string `json:"query"`
604 // Mode : The mode with which to perform the search.
605 Mode *PropertiesSearchMode `json:"mode"`
606 // LogicalOperator : The logical operator with which to append the query.
607 LogicalOperator *LogicalOperator `json:"logical_operator"`
608 }
609
610 // NewPropertiesSearchQuery returns a new PropertiesSearchQuery instance
611 func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) *PropertiesSearchQuery {
612 s := new(PropertiesSearchQuery)
613 s.Query = Query
614 s.Mode = Mode
615 s.LogicalOperator = &LogicalOperator{Tagged: dropbox.Tagged{"or_operator"}}
616 return s
617 }
618
619 // PropertiesSearchResult : has no documentation (yet)
620 type PropertiesSearchResult struct {
621 // Matches : A list (possibly empty) of matches for the query.
622 Matches []*PropertiesSearchMatch `json:"matches"`
623 // Cursor : Pass the cursor into `propertiesSearchContinue` to continue to
624 // receive search results. Cursor will be null when there are no more
625 // results.
626 Cursor string `json:"cursor,omitempty"`
627 }
628
629 // NewPropertiesSearchResult returns a new PropertiesSearchResult instance
630 func NewPropertiesSearchResult(Matches []*PropertiesSearchMatch) *PropertiesSearchResult {
631 s := new(PropertiesSearchResult)
632 s.Matches = Matches
633 return s
634 }
635
636 // PropertyField : Raw key/value data to be associated with a Dropbox file.
637 // Property fields are added to Dropbox files as a `PropertyGroup`.
638 type PropertyField struct {
639 // Name : Key of the property field associated with a file and template.
640 // Keys can be up to 256 bytes.
641 Name string `json:"name"`
642 // Value : Value of the property field associated with a file and template.
643 // Values can be up to 1024 bytes.
644 Value string `json:"value"`
645 }
646
647 // NewPropertyField returns a new PropertyField instance
648 func NewPropertyField(Name string, Value string) *PropertyField {
649 s := new(PropertyField)
650 s.Name = Name
651 s.Value = Value
652 return s
653 }
654
655 // PropertyFieldTemplate : Defines how a single property field may be
656 // structured. Used exclusively by `PropertyGroupTemplate`.
657 type PropertyFieldTemplate struct {
658 // Name : Key of the property field being described. Property field keys can
659 // be up to 256 bytes.
660 Name string `json:"name"`
661 // Description : Description of the property field. Property field
662 // descriptions can be up to 1024 bytes.
663 Description string `json:"description"`
664 // Type : Data type of the value of this property field. This type will be
665 // enforced upon property creation and modifications.
666 Type *PropertyType `json:"type"`
667 }
668
669 // NewPropertyFieldTemplate returns a new PropertyFieldTemplate instance
670 func NewPropertyFieldTemplate(Name string, Description string, Type *PropertyType) *PropertyFieldTemplate {
671 s := new(PropertyFieldTemplate)
672 s.Name = Name
673 s.Description = Description
674 s.Type = Type
675 return s
676 }
677
678 // PropertyGroup : A subset of the property fields described by the
679 // corresponding `PropertyGroupTemplate`. Properties are always added to a
680 // Dropbox file as a `PropertyGroup`. The possible key names and value types in
681 // this group are defined by the corresponding `PropertyGroupTemplate`.
682 type PropertyGroup struct {
683 // TemplateId : A unique identifier for the associated template.
684 TemplateId string `json:"template_id"`
685 // Fields : The actual properties associated with the template. There can be
686 // up to 32 property types per template.
687 Fields []*PropertyField `json:"fields"`
688 }
689
690 // NewPropertyGroup returns a new PropertyGroup instance
691 func NewPropertyGroup(TemplateId string, Fields []*PropertyField) *PropertyGroup {
692 s := new(PropertyGroup)
693 s.TemplateId = TemplateId
694 s.Fields = Fields
695 return s
696 }
697
698 // PropertyGroupUpdate : has no documentation (yet)
699 type PropertyGroupUpdate struct {
700 // TemplateId : A unique identifier for a property template.
701 TemplateId string `json:"template_id"`
702 // AddOrUpdateFields : Property fields to update. If the property field
703 // already exists, it is updated. If the property field doesn't exist, the
704 // property group is added.
705 AddOrUpdateFields []*PropertyField `json:"add_or_update_fields,omitempty"`
706 // RemoveFields : Property fields to remove (by name), provided they exist.
707 RemoveFields []string `json:"remove_fields,omitempty"`
708 }
709
710 // NewPropertyGroupUpdate returns a new PropertyGroupUpdate instance
711 func NewPropertyGroupUpdate(TemplateId string) *PropertyGroupUpdate {
712 s := new(PropertyGroupUpdate)
713 s.TemplateId = TemplateId
714 return s
715 }
716
717 // PropertyType : Data type of the given property field added.
718 type PropertyType struct {
719 dropbox.Tagged
720 }
721
722 // Valid tag values for PropertyType
723 const (
724 PropertyTypeString = "string"
725 PropertyTypeOther = "other"
726 )
727
728 // RemovePropertiesArg : has no documentation (yet)
729 type RemovePropertiesArg struct {
730 // Path : A unique identifier for the file or folder.
731 Path string `json:"path"`
732 // PropertyTemplateIds : A list of identifiers for a template created by
733 // `templatesAddForUser` or `templatesAddForTeam`.
734 PropertyTemplateIds []string `json:"property_template_ids"`
735 }
736
737 // NewRemovePropertiesArg returns a new RemovePropertiesArg instance
738 func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *RemovePropertiesArg {
739 s := new(RemovePropertiesArg)
740 s.Path = Path
741 s.PropertyTemplateIds = PropertyTemplateIds
742 return s
743 }
744
745 // RemovePropertiesError : has no documentation (yet)
746 type RemovePropertiesError struct {
747 dropbox.Tagged
748 // TemplateNotFound : Template does not exist for the given identifier.
749 TemplateNotFound string `json:"template_not_found,omitempty"`
750 // Path : has no documentation (yet)
751 Path *LookupError `json:"path,omitempty"`
752 // PropertyGroupLookup : has no documentation (yet)
753 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
754 }
755
756 // Valid tag values for RemovePropertiesError
757 const (
758 RemovePropertiesErrorTemplateNotFound = "template_not_found"
759 RemovePropertiesErrorRestrictedContent = "restricted_content"
760 RemovePropertiesErrorOther = "other"
761 RemovePropertiesErrorPath = "path"
762 RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
763 RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
764 )
765
766 // UnmarshalJSON deserializes into a RemovePropertiesError instance
767 func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
768 type wrap struct {
769 dropbox.Tagged
770 // Path : has no documentation (yet)
771 Path json.RawMessage `json:"path,omitempty"`
772 // PropertyGroupLookup : has no documentation (yet)
773 PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
774 }
775 var w wrap
776 var err error
777 if err = json.Unmarshal(body, &w); err != nil {
778 return err
779 }
780 u.Tag = w.Tag
781 switch u.Tag {
782 case "template_not_found":
783 err = json.Unmarshal(body, &u.TemplateNotFound)
784
785 if err != nil {
786 return err
787 }
788 case "path":
789 err = json.Unmarshal(w.Path, &u.Path)
790
791 if err != nil {
792 return err
793 }
794 case "property_group_lookup":
795 err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
796
797 if err != nil {
798 return err
799 }
800 }
801 return nil
802 }
803
804 // RemoveTemplateArg : has no documentation (yet)
805 type RemoveTemplateArg struct {
806 // TemplateId : An identifier for a template created by
807 // `templatesAddForUser` or `templatesAddForTeam`.
808 TemplateId string `json:"template_id"`
809 }
810
811 // NewRemoveTemplateArg returns a new RemoveTemplateArg instance
812 func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg {
813 s := new(RemoveTemplateArg)
814 s.TemplateId = TemplateId
815 return s
816 }
817
818 // TemplateFilterBase : has no documentation (yet)
819 type TemplateFilterBase struct {
820 dropbox.Tagged
821 // FilterSome : Only templates with an ID in the supplied list will be
822 // returned (a subset of templates will be returned).
823 FilterSome []string `json:"filter_some,omitempty"`
824 }
825
826 // Valid tag values for TemplateFilterBase
827 const (
828 TemplateFilterBaseFilterSome = "filter_some"
829 TemplateFilterBaseOther = "other"
830 )
831
832 // UnmarshalJSON deserializes into a TemplateFilterBase instance
833 func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error {
834 type wrap struct {
835 dropbox.Tagged
836 // FilterSome : Only templates with an ID in the supplied list will be
837 // returned (a subset of templates will be returned).
838 FilterSome json.RawMessage `json:"filter_some,omitempty"`
839 }
840 var w wrap
841 var err error
842 if err = json.Unmarshal(body, &w); err != nil {
843 return err
844 }
845 u.Tag = w.Tag
846 switch u.Tag {
847 case "filter_some":
848 err = json.Unmarshal(body, &u.FilterSome)
849
850 if err != nil {
851 return err
852 }
853 }
854 return nil
855 }
856
857 // TemplateFilter : has no documentation (yet)
858 type TemplateFilter struct {
859 dropbox.Tagged
860 // FilterSome : Only templates with an ID in the supplied list will be
861 // returned (a subset of templates will be returned).
862 FilterSome []string `json:"filter_some,omitempty"`
863 }
864
865 // Valid tag values for TemplateFilter
866 const (
867 TemplateFilterFilterSome = "filter_some"
868 TemplateFilterOther = "other"
869 TemplateFilterFilterNone = "filter_none"
870 )
871
872 // UnmarshalJSON deserializes into a TemplateFilter instance
873 func (u *TemplateFilter) UnmarshalJSON(body []byte) error {
874 type wrap struct {
875 dropbox.Tagged
876 // FilterSome : Only templates with an ID in the supplied list will be
877 // returned (a subset of templates will be returned).
878 FilterSome json.RawMessage `json:"filter_some,omitempty"`
879 }
880 var w wrap
881 var err error
882 if err = json.Unmarshal(body, &w); err != nil {
883 return err
884 }
885 u.Tag = w.Tag
886 switch u.Tag {
887 case "filter_some":
888 err = json.Unmarshal(body, &u.FilterSome)
889
890 if err != nil {
891 return err
892 }
893 }
894 return nil
895 }
896
897 // TemplateOwnerType : has no documentation (yet)
898 type TemplateOwnerType struct {
899 dropbox.Tagged
900 }
901
902 // Valid tag values for TemplateOwnerType
903 const (
904 TemplateOwnerTypeUser = "user"
905 TemplateOwnerTypeTeam = "team"
906 TemplateOwnerTypeOther = "other"
907 )
908
909 // UpdatePropertiesArg : has no documentation (yet)
910 type UpdatePropertiesArg struct {
911 // Path : A unique identifier for the file or folder.
912 Path string `json:"path"`
913 // UpdatePropertyGroups : The property groups "delta" updates to apply.
914 UpdatePropertyGroups []*PropertyGroupUpdate `json:"update_property_groups"`
915 }
916
917 // NewUpdatePropertiesArg returns a new UpdatePropertiesArg instance
918 func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUpdate) *UpdatePropertiesArg {
919 s := new(UpdatePropertiesArg)
920 s.Path = Path
921 s.UpdatePropertyGroups = UpdatePropertyGroups
922 return s
923 }
924
925 // UpdatePropertiesError : has no documentation (yet)
926 type UpdatePropertiesError struct {
927 dropbox.Tagged
928 // TemplateNotFound : Template does not exist for the given identifier.
929 TemplateNotFound string `json:"template_not_found,omitempty"`
930 // Path : has no documentation (yet)
931 Path *LookupError `json:"path,omitempty"`
932 // PropertyGroupLookup : has no documentation (yet)
933 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
934 }
935
936 // Valid tag values for UpdatePropertiesError
937 const (
938 UpdatePropertiesErrorTemplateNotFound = "template_not_found"
939 UpdatePropertiesErrorRestrictedContent = "restricted_content"
940 UpdatePropertiesErrorOther = "other"
941 UpdatePropertiesErrorPath = "path"
942 UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder"
943 UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
944 UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
945 UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
946 )
947
948 // UnmarshalJSON deserializes into a UpdatePropertiesError instance
949 func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
950 type wrap struct {
951 dropbox.Tagged
952 // Path : has no documentation (yet)
953 Path json.RawMessage `json:"path,omitempty"`
954 // PropertyGroupLookup : has no documentation (yet)
955 PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"`
956 }
957 var w wrap
958 var err error
959 if err = json.Unmarshal(body, &w); err != nil {
960 return err
961 }
962 u.Tag = w.Tag
963 switch u.Tag {
964 case "template_not_found":
965 err = json.Unmarshal(body, &u.TemplateNotFound)
966
967 if err != nil {
968 return err
969 }
970 case "path":
971 err = json.Unmarshal(w.Path, &u.Path)
972
973 if err != nil {
974 return err
975 }
976 case "property_group_lookup":
977 err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup)
978
979 if err != nil {
980 return err
981 }
982 }
983 return nil
984 }
985
986 // UpdateTemplateArg : has no documentation (yet)
987 type UpdateTemplateArg struct {
988 // TemplateId : An identifier for template added by See
989 // `templatesAddForUser` or `templatesAddForTeam`.
990 TemplateId string `json:"template_id"`
991 // Name : A display name for the template. template names can be up to 256
992 // bytes.
993 Name string `json:"name,omitempty"`
994 // Description : Description for the new template. Template descriptions can
995 // be up to 1024 bytes.
996 Description string `json:"description,omitempty"`
997 // AddFields : Property field templates to be added to the group template.
998 // There can be up to 32 properties in a single template.
999 AddFields []*PropertyFieldTemplate `json:"add_fields,omitempty"`
1000 }
1001
1002 // NewUpdateTemplateArg returns a new UpdateTemplateArg instance
1003 func NewUpdateTemplateArg(TemplateId string) *UpdateTemplateArg {
1004 s := new(UpdateTemplateArg)
1005 s.TemplateId = TemplateId
1006 return s
1007 }
1008
1009 // UpdateTemplateResult : has no documentation (yet)
1010 type UpdateTemplateResult struct {
1011 // TemplateId : An identifier for template added by route See
1012 // `templatesAddForUser` or `templatesAddForTeam`.
1013 TemplateId string `json:"template_id"`
1014 }
1015
1016 // NewUpdateTemplateResult returns a new UpdateTemplateResult instance
1017 func NewUpdateTemplateResult(TemplateId string) *UpdateTemplateResult {
1018 s := new(UpdateTemplateResult)
1019 s.TemplateId = TemplateId
1020 return s
1021 }
+0
-309
dropbox/file_requests/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package file_requests
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // Create : Creates a file request for this user.
35 Create(arg *CreateFileRequestArgs) (res *FileRequest, err error)
36 // Get : Returns the specified file request.
37 Get(arg *GetFileRequestArgs) (res *FileRequest, err error)
38 // List : Returns a list of file requests owned by this user. For apps with
39 // the app folder permission, this will only return file requests with
40 // destinations in the app folder.
41 List() (res *ListFileRequestsResult, err error)
42 // Update : Update a file request.
43 Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error)
44 }
45
46 type apiImpl dropbox.Context
47
48 //CreateAPIError is an error-wrapper for the create route
49 type CreateAPIError struct {
50 dropbox.APIError
51 EndpointError *CreateFileRequestError `json:"error"`
52 }
53
54 func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
55 cli := dbx.Client
56
57 dbx.Config.LogDebug("arg: %v", arg)
58 b, err := json.Marshal(arg)
59 if err != nil {
60 return
61 }
62
63 headers := map[string]string{
64 "Content-Type": "application/json",
65 }
66 if dbx.Config.AsMemberID != "" {
67 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
68 }
69
70 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "create", headers, bytes.NewReader(b))
71 if err != nil {
72 return
73 }
74 dbx.Config.LogInfo("req: %v", req)
75
76 resp, err := cli.Do(req)
77 if err != nil {
78 return
79 }
80
81 dbx.Config.LogInfo("resp: %v", resp)
82 defer resp.Body.Close()
83 body, err := ioutil.ReadAll(resp.Body)
84 if err != nil {
85 return
86 }
87
88 dbx.Config.LogDebug("body: %s", body)
89 if resp.StatusCode == http.StatusOK {
90 err = json.Unmarshal(body, &res)
91 if err != nil {
92 return
93 }
94
95 return
96 }
97 if resp.StatusCode == http.StatusConflict {
98 var apiError CreateAPIError
99 err = json.Unmarshal(body, &apiError)
100 if err != nil {
101 return
102 }
103 err = apiError
104 return
105 }
106 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
107 if err != nil {
108 return
109 }
110 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
111 return
112 }
113
114 //GetAPIError is an error-wrapper for the get route
115 type GetAPIError struct {
116 dropbox.APIError
117 EndpointError *GetFileRequestError `json:"error"`
118 }
119
120 func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
121 cli := dbx.Client
122
123 dbx.Config.LogDebug("arg: %v", arg)
124 b, err := json.Marshal(arg)
125 if err != nil {
126 return
127 }
128
129 headers := map[string]string{
130 "Content-Type": "application/json",
131 }
132 if dbx.Config.AsMemberID != "" {
133 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
134 }
135
136 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "get", headers, bytes.NewReader(b))
137 if err != nil {
138 return
139 }
140 dbx.Config.LogInfo("req: %v", req)
141
142 resp, err := cli.Do(req)
143 if err != nil {
144 return
145 }
146
147 dbx.Config.LogInfo("resp: %v", resp)
148 defer resp.Body.Close()
149 body, err := ioutil.ReadAll(resp.Body)
150 if err != nil {
151 return
152 }
153
154 dbx.Config.LogDebug("body: %s", body)
155 if resp.StatusCode == http.StatusOK {
156 err = json.Unmarshal(body, &res)
157 if err != nil {
158 return
159 }
160
161 return
162 }
163 if resp.StatusCode == http.StatusConflict {
164 var apiError GetAPIError
165 err = json.Unmarshal(body, &apiError)
166 if err != nil {
167 return
168 }
169 err = apiError
170 return
171 }
172 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
173 if err != nil {
174 return
175 }
176 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
177 return
178 }
179
180 //ListAPIError is an error-wrapper for the list route
181 type ListAPIError struct {
182 dropbox.APIError
183 EndpointError *ListFileRequestsError `json:"error"`
184 }
185
186 func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
187 cli := dbx.Client
188
189 headers := map[string]string{}
190 if dbx.Config.AsMemberID != "" {
191 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
192 }
193
194 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "list", headers, nil)
195 if err != nil {
196 return
197 }
198 dbx.Config.LogInfo("req: %v", req)
199
200 resp, err := cli.Do(req)
201 if err != nil {
202 return
203 }
204
205 dbx.Config.LogInfo("resp: %v", resp)
206 defer resp.Body.Close()
207 body, err := ioutil.ReadAll(resp.Body)
208 if err != nil {
209 return
210 }
211
212 dbx.Config.LogDebug("body: %s", body)
213 if resp.StatusCode == http.StatusOK {
214 err = json.Unmarshal(body, &res)
215 if err != nil {
216 return
217 }
218
219 return
220 }
221 if resp.StatusCode == http.StatusConflict {
222 var apiError ListAPIError
223 err = json.Unmarshal(body, &apiError)
224 if err != nil {
225 return
226 }
227 err = apiError
228 return
229 }
230 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
231 if err != nil {
232 return
233 }
234 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
235 return
236 }
237
238 //UpdateAPIError is an error-wrapper for the update route
239 type UpdateAPIError struct {
240 dropbox.APIError
241 EndpointError *UpdateFileRequestError `json:"error"`
242 }
243
244 func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
245 cli := dbx.Client
246
247 dbx.Config.LogDebug("arg: %v", arg)
248 b, err := json.Marshal(arg)
249 if err != nil {
250 return
251 }
252
253 headers := map[string]string{
254 "Content-Type": "application/json",
255 }
256 if dbx.Config.AsMemberID != "" {
257 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
258 }
259
260 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "update", headers, bytes.NewReader(b))
261 if err != nil {
262 return
263 }
264 dbx.Config.LogInfo("req: %v", req)
265
266 resp, err := cli.Do(req)
267 if err != nil {
268 return
269 }
270
271 dbx.Config.LogInfo("resp: %v", resp)
272 defer resp.Body.Close()
273 body, err := ioutil.ReadAll(resp.Body)
274 if err != nil {
275 return
276 }
277
278 dbx.Config.LogDebug("body: %s", body)
279 if resp.StatusCode == http.StatusOK {
280 err = json.Unmarshal(body, &res)
281 if err != nil {
282 return
283 }
284
285 return
286 }
287 if resp.StatusCode == http.StatusConflict {
288 var apiError UpdateAPIError
289 err = json.Unmarshal(body, &apiError)
290 if err != nil {
291 return
292 }
293 err = apiError
294 return
295 }
296 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
297 if err != nil {
298 return
299 }
300 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
301 return
302 }
303
304 // New returns a Client implementation for this namespace
305 func New(c dropbox.Config) Client {
306 ctx := apiImpl(dropbox.NewContext(c))
307 return &ctx
308 }
+0
-308
dropbox/file_requests/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package file_requests : This namespace contains endpoints and data types for
21 // file request operations.
22 package file_requests
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 )
30
31 // CreateFileRequestArgs : Arguments for `create`.
32 type CreateFileRequestArgs struct {
33 // Title : The title of the file request. Must not be empty.
34 Title string `json:"title"`
35 // Destination : The path of the folder in the Dropbox where uploaded files
36 // will be sent. For apps with the app folder permission, this will be
37 // relative to the app folder.
38 Destination string `json:"destination"`
39 // Deadline : The deadline for the file request. Deadlines can only be set
40 // by Professional and Business accounts.
41 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
42 // Open : Whether or not the file request should be open. If the file
43 // request is closed, it will not accept any file submissions, but it can be
44 // opened later.
45 Open bool `json:"open"`
46 }
47
48 // NewCreateFileRequestArgs returns a new CreateFileRequestArgs instance
49 func NewCreateFileRequestArgs(Title string, Destination string) *CreateFileRequestArgs {
50 s := new(CreateFileRequestArgs)
51 s.Title = Title
52 s.Destination = Destination
53 s.Open = true
54 return s
55 }
56
57 // GeneralFileRequestsError : There is an error accessing the file requests
58 // functionality.
59 type GeneralFileRequestsError struct {
60 dropbox.Tagged
61 }
62
63 // Valid tag values for GeneralFileRequestsError
64 const (
65 GeneralFileRequestsErrorDisabledForTeam = "disabled_for_team"
66 GeneralFileRequestsErrorOther = "other"
67 )
68
69 // FileRequestError : There is an error with the file request.
70 type FileRequestError struct {
71 dropbox.Tagged
72 }
73
74 // Valid tag values for FileRequestError
75 const (
76 FileRequestErrorDisabledForTeam = "disabled_for_team"
77 FileRequestErrorOther = "other"
78 FileRequestErrorNotFound = "not_found"
79 FileRequestErrorNotAFolder = "not_a_folder"
80 FileRequestErrorAppLacksAccess = "app_lacks_access"
81 FileRequestErrorNoPermission = "no_permission"
82 FileRequestErrorEmailUnverified = "email_unverified"
83 FileRequestErrorValidationError = "validation_error"
84 )
85
86 // CreateFileRequestError : There was an error creating the file request.
87 type CreateFileRequestError struct {
88 dropbox.Tagged
89 }
90
91 // Valid tag values for CreateFileRequestError
92 const (
93 CreateFileRequestErrorDisabledForTeam = "disabled_for_team"
94 CreateFileRequestErrorOther = "other"
95 CreateFileRequestErrorNotFound = "not_found"
96 CreateFileRequestErrorNotAFolder = "not_a_folder"
97 CreateFileRequestErrorAppLacksAccess = "app_lacks_access"
98 CreateFileRequestErrorNoPermission = "no_permission"
99 CreateFileRequestErrorEmailUnverified = "email_unverified"
100 CreateFileRequestErrorValidationError = "validation_error"
101 CreateFileRequestErrorInvalidLocation = "invalid_location"
102 CreateFileRequestErrorRateLimit = "rate_limit"
103 )
104
105 // FileRequest : A `file request` <https://www.dropbox.com/help/9090> for
106 // receiving files into the user's Dropbox account.
107 type FileRequest struct {
108 // Id : The ID of the file request.
109 Id string `json:"id"`
110 // Url : The URL of the file request.
111 Url string `json:"url"`
112 // Title : The title of the file request.
113 Title string `json:"title"`
114 // Destination : The path of the folder in the Dropbox where uploaded files
115 // will be sent. This can be nil if the destination was removed. For apps
116 // with the app folder permission, this will be relative to the app folder.
117 Destination string `json:"destination,omitempty"`
118 // Created : When this file request was created.
119 Created time.Time `json:"created"`
120 // Deadline : The deadline for this file request. Only set if the request
121 // has a deadline.
122 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
123 // IsOpen : Whether or not the file request is open. If the file request is
124 // closed, it will not accept any more file submissions.
125 IsOpen bool `json:"is_open"`
126 // FileCount : The number of files this file request has received.
127 FileCount int64 `json:"file_count"`
128 }
129
130 // NewFileRequest returns a new FileRequest instance
131 func NewFileRequest(Id string, Url string, Title string, Created time.Time, IsOpen bool, FileCount int64) *FileRequest {
132 s := new(FileRequest)
133 s.Id = Id
134 s.Url = Url
135 s.Title = Title
136 s.Created = Created
137 s.IsOpen = IsOpen
138 s.FileCount = FileCount
139 return s
140 }
141
142 // FileRequestDeadline : has no documentation (yet)
143 type FileRequestDeadline struct {
144 // Deadline : The deadline for this file request.
145 Deadline time.Time `json:"deadline"`
146 // AllowLateUploads : If set, allow uploads after the deadline has passed.
147 // These uploads will be marked overdue.
148 AllowLateUploads *GracePeriod `json:"allow_late_uploads,omitempty"`
149 }
150
151 // NewFileRequestDeadline returns a new FileRequestDeadline instance
152 func NewFileRequestDeadline(Deadline time.Time) *FileRequestDeadline {
153 s := new(FileRequestDeadline)
154 s.Deadline = Deadline
155 return s
156 }
157
158 // GetFileRequestArgs : Arguments for `get`.
159 type GetFileRequestArgs struct {
160 // Id : The ID of the file request to retrieve.
161 Id string `json:"id"`
162 }
163
164 // NewGetFileRequestArgs returns a new GetFileRequestArgs instance
165 func NewGetFileRequestArgs(Id string) *GetFileRequestArgs {
166 s := new(GetFileRequestArgs)
167 s.Id = Id
168 return s
169 }
170
171 // GetFileRequestError : There was an error retrieving the specified file
172 // request.
173 type GetFileRequestError struct {
174 dropbox.Tagged
175 }
176
177 // Valid tag values for GetFileRequestError
178 const (
179 GetFileRequestErrorDisabledForTeam = "disabled_for_team"
180 GetFileRequestErrorOther = "other"
181 GetFileRequestErrorNotFound = "not_found"
182 GetFileRequestErrorNotAFolder = "not_a_folder"
183 GetFileRequestErrorAppLacksAccess = "app_lacks_access"
184 GetFileRequestErrorNoPermission = "no_permission"
185 GetFileRequestErrorEmailUnverified = "email_unverified"
186 GetFileRequestErrorValidationError = "validation_error"
187 )
188
189 // GracePeriod : has no documentation (yet)
190 type GracePeriod struct {
191 dropbox.Tagged
192 }
193
194 // Valid tag values for GracePeriod
195 const (
196 GracePeriodOneDay = "one_day"
197 GracePeriodTwoDays = "two_days"
198 GracePeriodSevenDays = "seven_days"
199 GracePeriodThirtyDays = "thirty_days"
200 GracePeriodAlways = "always"
201 GracePeriodOther = "other"
202 )
203
204 // ListFileRequestsError : There was an error retrieving the file requests.
205 type ListFileRequestsError struct {
206 dropbox.Tagged
207 }
208
209 // Valid tag values for ListFileRequestsError
210 const (
211 ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
212 ListFileRequestsErrorOther = "other"
213 )
214
215 // ListFileRequestsResult : Result for `list`.
216 type ListFileRequestsResult struct {
217 // FileRequests : The file requests owned by this user. Apps with the app
218 // folder permission will only see file requests in their app folder.
219 FileRequests []*FileRequest `json:"file_requests"`
220 }
221
222 // NewListFileRequestsResult returns a new ListFileRequestsResult instance
223 func NewListFileRequestsResult(FileRequests []*FileRequest) *ListFileRequestsResult {
224 s := new(ListFileRequestsResult)
225 s.FileRequests = FileRequests
226 return s
227 }
228
229 // UpdateFileRequestArgs : Arguments for `update`.
230 type UpdateFileRequestArgs struct {
231 // Id : The ID of the file request to update.
232 Id string `json:"id"`
233 // Title : The new title of the file request. Must not be empty.
234 Title string `json:"title,omitempty"`
235 // Destination : The new path of the folder in the Dropbox where uploaded
236 // files will be sent. For apps with the app folder permission, this will be
237 // relative to the app folder.
238 Destination string `json:"destination,omitempty"`
239 // Deadline : The new deadline for the file request. Deadlines can only be
240 // set by Professional and Business accounts.
241 Deadline *UpdateFileRequestDeadline `json:"deadline"`
242 // Open : Whether to set this file request as open or closed.
243 Open bool `json:"open,omitempty"`
244 }
245
246 // NewUpdateFileRequestArgs returns a new UpdateFileRequestArgs instance
247 func NewUpdateFileRequestArgs(Id string) *UpdateFileRequestArgs {
248 s := new(UpdateFileRequestArgs)
249 s.Id = Id
250 s.Deadline = &UpdateFileRequestDeadline{Tagged: dropbox.Tagged{"no_update"}}
251 return s
252 }
253
254 // UpdateFileRequestDeadline : has no documentation (yet)
255 type UpdateFileRequestDeadline struct {
256 dropbox.Tagged
257 // Update : If nil, the file request's deadline is cleared.
258 Update *FileRequestDeadline `json:"update,omitempty"`
259 }
260
261 // Valid tag values for UpdateFileRequestDeadline
262 const (
263 UpdateFileRequestDeadlineNoUpdate = "no_update"
264 UpdateFileRequestDeadlineUpdate = "update"
265 UpdateFileRequestDeadlineOther = "other"
266 )
267
268 // UnmarshalJSON deserializes into a UpdateFileRequestDeadline instance
269 func (u *UpdateFileRequestDeadline) UnmarshalJSON(body []byte) error {
270 type wrap struct {
271 dropbox.Tagged
272 // Update : If nil, the file request's deadline is cleared.
273 Update json.RawMessage `json:"update,omitempty"`
274 }
275 var w wrap
276 var err error
277 if err = json.Unmarshal(body, &w); err != nil {
278 return err
279 }
280 u.Tag = w.Tag
281 switch u.Tag {
282 case "update":
283 err = json.Unmarshal(body, &u.Update)
284
285 if err != nil {
286 return err
287 }
288 }
289 return nil
290 }
291
292 // UpdateFileRequestError : There is an error updating the file request.
293 type UpdateFileRequestError struct {
294 dropbox.Tagged
295 }
296
297 // Valid tag values for UpdateFileRequestError
298 const (
299 UpdateFileRequestErrorDisabledForTeam = "disabled_for_team"
300 UpdateFileRequestErrorOther = "other"
301 UpdateFileRequestErrorNotFound = "not_found"
302 UpdateFileRequestErrorNotAFolder = "not_a_folder"
303 UpdateFileRequestErrorAppLacksAccess = "app_lacks_access"
304 UpdateFileRequestErrorNoPermission = "no_permission"
305 UpdateFileRequestErrorEmailUnverified = "email_unverified"
306 UpdateFileRequestErrorValidationError = "validation_error"
307 )
+0
-4075
dropbox/files/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package files
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io"
26 "io/ioutil"
27 "log"
28 "net/http"
29
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
33 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
34 )
35
36 // Client interface describes all routes in this namespace
37 type Client interface {
38 // AlphaGetMetadata : Returns the metadata for a file or folder. This is an
39 // alpha endpoint compatible with the properties API. Note: Metadata for the
40 // root folder is unsupported.
41 // Deprecated: Use `GetMetadata` instead
42 AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error)
43 // AlphaUpload : Create a new file with the contents provided in the
44 // request. Note that this endpoint is part of the properties API alpha and
45 // is slightly different from `upload`. Do not use this to upload a file
46 // larger than 150 MB. Instead, create an upload session with
47 // `uploadSessionStart`.
48 // Deprecated: Use `AlphaUpload` instead
49 AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error)
50 // Copy : Copy a file or folder to a different location in the user's
51 // Dropbox. If the source path is a folder all its contents will be copied.
52 CopyV2(arg *RelocationArg) (res *RelocationResult, err error)
53 // Copy : Copy a file or folder to a different location in the user's
54 // Dropbox. If the source path is a folder all its contents will be copied.
55 // Deprecated: Use `CopyV2` instead
56 Copy(arg *RelocationArg) (res IsMetadata, err error)
57 // CopyBatch : Copy multiple files or folders to different locations at once
58 // in the user's Dropbox. This route will replace `copyBatch`. The main
59 // difference is this route will return stutus for each entry, while
60 // `copyBatch` raises failure if any entry fails. This route will either
61 // finish synchronously, or return a job ID and do the async copy job in
62 // background. Please use `copyBatchCheck` to check the job status.
63 CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error)
64 // CopyBatch : Copy multiple files or folders to different locations at once
65 // in the user's Dropbox. If `RelocationBatchArg.allow_shared_folder` is
66 // false, this route is atomic. If one entry fails, the whole transaction
67 // will abort. If `RelocationBatchArg.allow_shared_folder` is true,
68 // atomicity is not guaranteed, but it allows you to copy the contents of
69 // shared folders to new locations. This route will return job ID
70 // immediately and do the async copy job in background. Please use
71 // `copyBatchCheck` to check the job status.
72 // Deprecated: Use `CopyBatchV2` instead
73 CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
74 // CopyBatchCheck : Returns the status of an asynchronous job for
75 // `copyBatch`. It returns list of results for each entry.
76 CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
77 // CopyBatchCheck : Returns the status of an asynchronous job for
78 // `copyBatch`. If success, it returns list of results for each entry.
79 // Deprecated: Use `CopyBatchCheckV2` instead
80 CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
81 // CopyReferenceGet : Get a copy reference to a file or folder. This
82 // reference string can be used to save that file or folder to another
83 // user's Dropbox by passing it to `copyReferenceSave`.
84 CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error)
85 // CopyReferenceSave : Save a copy reference returned by `copyReferenceGet`
86 // to the user's Dropbox.
87 CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error)
88 // CreateFolder : Create a folder at a given path.
89 CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error)
90 // CreateFolder : Create a folder at a given path.
91 // Deprecated: Use `CreateFolderV2` instead
92 CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error)
93 // CreateFolderBatch : Create multiple folders at once. This route is
94 // asynchronous for large batches, which returns a job ID immediately and
95 // runs the create folder batch asynchronously. Otherwise, creates the
96 // folders and returns the result synchronously for smaller inputs. You can
97 // force asynchronous behaviour by using the
98 // `CreateFolderBatchArg.force_async` flag. Use `createFolderBatchCheck` to
99 // check the job status.
100 CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error)
101 // CreateFolderBatchCheck : Returns the status of an asynchronous job for
102 // `createFolderBatch`. If success, it returns list of result for each
103 // entry.
104 CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error)
105 // Delete : Delete the file or folder at a given path. If the path is a
106 // folder, all its contents will be deleted too. A successful response
107 // indicates that the file or folder was deleted. The returned metadata will
108 // be the corresponding `FileMetadata` or `FolderMetadata` for the item at
109 // time of deletion, and not a `DeletedMetadata` object.
110 DeleteV2(arg *DeleteArg) (res *DeleteResult, err error)
111 // Delete : Delete the file or folder at a given path. If the path is a
112 // folder, all its contents will be deleted too. A successful response
113 // indicates that the file or folder was deleted. The returned metadata will
114 // be the corresponding `FileMetadata` or `FolderMetadata` for the item at
115 // time of deletion, and not a `DeletedMetadata` object.
116 // Deprecated: Use `DeleteV2` instead
117 Delete(arg *DeleteArg) (res IsMetadata, err error)
118 // DeleteBatch : Delete multiple files/folders at once. This route is
119 // asynchronous, which returns a job ID immediately and runs the delete
120 // batch asynchronously. Use `deleteBatchCheck` to check the job status.
121 DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error)
122 // DeleteBatchCheck : Returns the status of an asynchronous job for
123 // `deleteBatch`. If success, it returns list of result for each entry.
124 DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error)
125 // Download : Download a file from a user's Dropbox.
126 Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error)
127 // DownloadZip : Download a folder from the user's Dropbox, as a zip file.
128 // The folder must be less than 20 GB in size and have fewer than 10,000
129 // total files. The input cannot be a single file. Any single file must be
130 // less than 4GB in size.
131 DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error)
132 // GetMetadata : Returns the metadata for a file or folder. Note: Metadata
133 // for the root folder is unsupported.
134 GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error)
135 // GetPreview : Get a preview for a file. Currently, PDF previews are
136 // generated for files with the following extensions: .ai, .doc, .docm,
137 // .docx, .eps, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf.
138 // HTML previews are generated for files with the following extensions:
139 // .csv, .ods, .xls, .xlsm, .xlsx. Other formats will return an unsupported
140 // extension error.
141 GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error)
142 // GetTemporaryLink : Get a temporary link to stream content of a file. This
143 // link will expire in four hours and afterwards you will get 410 Gone. So
144 // this URL should not be used to display content directly in the browser.
145 // Content-Type of the link is determined automatically by the file's mime
146 // type.
147 GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error)
148 // GetTemporaryUploadLink : Get a one-time use temporary upload link to
149 // upload a file to a Dropbox location. This endpoint acts as a delayed
150 // `upload`. The returned temporary upload link may be used to make a POST
151 // request with the data to be uploaded. The upload will then be perfomed
152 // with the `CommitInfo` previously provided to `getTemporaryUploadLink` but
153 // evaluated only upon consumption. Hence, errors stemming from invalid
154 // `CommitInfo` with respect to the state of the user's Dropbox will only be
155 // communicated at consumption time. Additionally, these errors are surfaced
156 // as generic HTTP 409 Conflict responses, potentially hiding issue details.
157 // The maximum temporary upload link duration is 4 hours. Upon consumption
158 // or expiration, a new link will have to be generated. Multiple links may
159 // exist for a specific upload path at any given time. The POST request on
160 // the temporary upload link must have its Content-Type set to
161 // "application/octet-stream". Example temporary upload link consumption
162 // request: curl -X POST
163 // https://dl.dropboxusercontent.com/apitul/1/bNi2uIYF51cVBND --header
164 // "Content-Type: application/octet-stream" --data-binary @local_file.txt A
165 // successful temporary upload link consumption request returns the content
166 // hash of the uploaded data in JSON format. Example succesful temporary
167 // upload link consumption response: {"content-hash":
168 // "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary
169 // upload link consumption request returns any of the following status
170 // codes: HTTP 400 Bad Request: Content-Type is not one of
171 // application/octet-stream and text/plain or request is invalid. HTTP 409
172 // Conflict: The temporary upload link does not exist or is currently
173 // unavailable, the upload failed, or another error happened. HTTP 410 Gone:
174 // The temporary upload link is expired or consumed. Example unsuccessful
175 // temporary upload link consumption response: Temporary upload link has
176 // been recently consumed.
177 GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error)
178 // GetThumbnail : Get a thumbnail for an image. This method currently
179 // supports files with the following file extensions: jpg, jpeg, png, tiff,
180 // tif, gif and bmp. Photos that are larger than 20MB in size won't be
181 // converted to a thumbnail.
182 GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error)
183 // GetThumbnailBatch : Get thumbnails for a list of images. We allow up to
184 // 25 thumbnails in a single batch. This method currently supports files
185 // with the following file extensions: jpg, jpeg, png, tiff, tif, gif and
186 // bmp. Photos that are larger than 20MB in size won't be converted to a
187 // thumbnail.
188 GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error)
189 // ListFolder : Starts returning the contents of a folder. If the result's
190 // `ListFolderResult.has_more` field is true, call `listFolderContinue` with
191 // the returned `ListFolderResult.cursor` to retrieve more entries. If
192 // you're using `ListFolderArg.recursive` set to true to keep a local cache
193 // of the contents of a Dropbox account, iterate through each entry in order
194 // and process them as follows to keep your local state in sync: For each
195 // `FileMetadata`, store the new entry at the given path in your local
196 // state. If the required parent folders don't exist yet, create them. If
197 // there's already something else at the given path, replace it and remove
198 // all its children. For each `FolderMetadata`, store the new entry at the
199 // given path in your local state. If the required parent folders don't
200 // exist yet, create them. If there's already something else at the given
201 // path, replace it but leave the children as they are. Check the new
202 // entry's `FolderSharingInfo.read_only` and set all its children's
203 // read-only statuses to match. For each `DeletedMetadata`, if your local
204 // state has something at the given path, remove it and all its children. If
205 // there's nothing at the given path, ignore this entry. Note:
206 // `auth.RateLimitError` may be returned if multiple `listFolder` or
207 // `listFolderContinue` calls with same parameters are made simultaneously
208 // by same API app for same user. If your app implements retry logic, please
209 // hold off the retry until the previous request finishes.
210 ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error)
211 // ListFolderContinue : Once a cursor has been retrieved from `listFolder`,
212 // use this to paginate through all files and retrieve updates to the
213 // folder, following the same rules as documented for `listFolder`.
214 ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error)
215 // ListFolderGetLatestCursor : A way to quickly get a cursor for the
216 // folder's state. Unlike `listFolder`, `listFolderGetLatestCursor` doesn't
217 // return any entries. This endpoint is for app which only needs to know
218 // about new files and modifications and doesn't need to know about files
219 // that already exist in Dropbox.
220 ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error)
221 // ListFolderLongpoll : A longpoll endpoint to wait for changes on an
222 // account. In conjunction with `listFolderContinue`, this call gives you a
223 // low-latency way to monitor an account for file changes. The connection
224 // will block until there are changes available or a timeout occurs. This
225 // endpoint is useful mostly for client-side apps. If you're looking for
226 // server-side notifications, check out our `webhooks documentation`
227 // <https://www.dropbox.com/developers/reference/webhooks>.
228 ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error)
229 // ListRevisions : Returns revisions for files based on a file path or a
230 // file id. The file path or file id is identified from the latest file
231 // entry at the given file path or id. This end point allows your app to
232 // query either by file path or file id by setting the mode parameter
233 // appropriately. In the `ListRevisionsMode.path` (default) mode, all
234 // revisions at the same file path as the latest file entry are returned. If
235 // revisions with the same file id are desired, then mode must be set to
236 // `ListRevisionsMode.id`. The `ListRevisionsMode.id` mode is useful to
237 // retrieve revisions for a given file across moves or renames.
238 ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error)
239 // Move : Move a file or folder to a different location in the user's
240 // Dropbox. If the source path is a folder all its contents will be moved.
241 MoveV2(arg *RelocationArg) (res *RelocationResult, err error)
242 // Move : Move a file or folder to a different location in the user's
243 // Dropbox. If the source path is a folder all its contents will be moved.
244 // Deprecated: Use `MoveV2` instead
245 Move(arg *RelocationArg) (res IsMetadata, err error)
246 // MoveBatch : Move multiple files or folders to different locations at once
247 // in the user's Dropbox. This route will replace `moveBatch`. The main
248 // difference is this route will return stutus for each entry, while
249 // `moveBatch` raises failure if any entry fails. This route will either
250 // finish synchronously, or return a job ID and do the async move job in
251 // background. Please use `moveBatchCheck` to check the job status.
252 MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error)
253 // MoveBatch : Move multiple files or folders to different locations at once
254 // in the user's Dropbox. This route is 'all or nothing', which means if one
255 // entry fails, the whole transaction will abort. This route will return job
256 // ID immediately and do the async moving job in background. Please use
257 // `moveBatchCheck` to check the job status.
258 MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
259 // MoveBatchCheck : Returns the status of an asynchronous job for
260 // `moveBatch`. It returns list of results for each entry.
261 MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
262 // MoveBatchCheck : Returns the status of an asynchronous job for
263 // `moveBatch`. If success, it returns list of results for each entry.
264 MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
265 // PermanentlyDelete : Permanently delete the file or folder at a given path
266 // (see https://www.dropbox.com/en/help/40). Note: This endpoint is only
267 // available for Dropbox Business apps.
268 PermanentlyDelete(arg *DeleteArg) (err error)
269 // PropertiesAdd : has no documentation (yet)
270 // Deprecated:
271 PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error)
272 // PropertiesOverwrite : has no documentation (yet)
273 // Deprecated:
274 PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error)
275 // PropertiesRemove : has no documentation (yet)
276 // Deprecated:
277 PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error)
278 // PropertiesTemplateGet : has no documentation (yet)
279 // Deprecated:
280 PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error)
281 // PropertiesTemplateList : has no documentation (yet)
282 // Deprecated:
283 PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error)
284 // PropertiesUpdate : has no documentation (yet)
285 // Deprecated:
286 PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error)
287 // Restore : Restore a specific revision of a file to the given path.
288 Restore(arg *RestoreArg) (res *FileMetadata, err error)
289 // SaveUrl : Save the data from a specified URL into a file in user's
290 // Dropbox. Note that the transfer from the URL must complete within 5
291 // minutes, or the operation will time out and the job will fail. If the
292 // given path already exists, the file will be renamed to avoid the conflict
293 // (e.g. myfile (1).txt).
294 SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error)
295 // SaveUrlCheckJobStatus : Check the status of a `saveUrl` job.
296 SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error)
297 // Search : Searches for files and folders. Note: Recent changes may not
298 // immediately be reflected in search results due to a short delay in
299 // indexing.
300 Search(arg *SearchArg) (res *SearchResult, err error)
301 // Upload : Create a new file with the contents provided in the request. Do
302 // not use this to upload a file larger than 150 MB. Instead, create an
303 // upload session with `uploadSessionStart`. Calls to this endpoint will
304 // count as data transport calls for any Dropbox Business teams with a limit
305 // on the number of data transport calls allowed per month. For more
306 // information, see the `Data transport limit page`
307 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
308 Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error)
309 // UploadSessionAppend : Append more data to an upload session. When the
310 // parameter close is set, this call will close the session. A single
311 // request should not upload more than 150 MB. The maximum size of a file
312 // one can upload to an upload session is 350 GB. Calls to this endpoint
313 // will count as data transport calls for any Dropbox Business teams with a
314 // limit on the number of data transport calls allowed per month. For more
315 // information, see the `Data transport limit page`
316 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
317 UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error)
318 // UploadSessionAppend : Append more data to an upload session. A single
319 // request should not upload more than 150 MB. The maximum size of a file
320 // one can upload to an upload session is 350 GB. Calls to this endpoint
321 // will count as data transport calls for any Dropbox Business teams with a
322 // limit on the number of data transport calls allowed per month. For more
323 // information, see the `Data transport limit page`
324 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
325 // Deprecated: Use `UploadSessionAppendV2` instead
326 UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error)
327 // UploadSessionFinish : Finish an upload session and save the uploaded data
328 // to the given file path. A single request should not upload more than 150
329 // MB. The maximum size of a file one can upload to an upload session is 350
330 // GB. Calls to this endpoint will count as data transport calls for any
331 // Dropbox Business teams with a limit on the number of data transport calls
332 // allowed per month. For more information, see the `Data transport limit
333 // page`
334 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
335 UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error)
336 // UploadSessionFinishBatch : This route helps you commit many files at once
337 // into a user's Dropbox. Use `uploadSessionStart` and `uploadSessionAppend`
338 // to upload file contents. We recommend uploading many files in parallel to
339 // increase throughput. Once the file contents have been uploaded, rather
340 // than calling `uploadSessionFinish`, use this route to finish all your
341 // upload sessions in a single request. `UploadSessionStartArg.close` or
342 // `UploadSessionAppendArg.close` needs to be true for the last
343 // `uploadSessionStart` or `uploadSessionAppend` call. The maximum size of a
344 // file one can upload to an upload session is 350 GB. This route will
345 // return a job_id immediately and do the async commit job in background.
346 // Use `uploadSessionFinishBatchCheck` to check the job status. For the same
347 // account, this route should be executed serially. That means you should
348 // not start the next job before current job finishes. We allow up to 1000
349 // entries in a single request. Calls to this endpoint will count as data
350 // transport calls for any Dropbox Business teams with a limit on the number
351 // of data transport calls allowed per month. For more information, see the
352 // `Data transport limit page`
353 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
354 UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error)
355 // UploadSessionFinishBatchCheck : Returns the status of an asynchronous job
356 // for `uploadSessionFinishBatch`. If success, it returns list of result for
357 // each entry.
358 UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error)
359 // UploadSessionStart : Upload sessions allow you to upload a single file in
360 // one or more requests, for example where the size of the file is greater
361 // than 150 MB. This call starts a new upload session with the given data.
362 // You can then use `uploadSessionAppend` to add more data and
363 // `uploadSessionFinish` to save all the data to a file in Dropbox. A single
364 // request should not upload more than 150 MB. The maximum size of a file
365 // one can upload to an upload session is 350 GB. An upload session can be
366 // used for a maximum of 48 hours. Attempting to use an
367 // `UploadSessionStartResult.session_id` with `uploadSessionAppend` or
368 // `uploadSessionFinish` more than 48 hours after its creation will return a
369 // `UploadSessionLookupError.not_found`. Calls to this endpoint will count
370 // as data transport calls for any Dropbox Business teams with a limit on
371 // the number of data transport calls allowed per month. For more
372 // information, see the `Data transport limit page`
373 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
374 UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error)
375 }
376
377 type apiImpl dropbox.Context
378
379 //AlphaGetMetadataAPIError is an error-wrapper for the alpha/get_metadata route
380 type AlphaGetMetadataAPIError struct {
381 dropbox.APIError
382 EndpointError *AlphaGetMetadataError `json:"error"`
383 }
384
385 func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) {
386 log.Printf("WARNING: API `AlphaGetMetadata` is deprecated")
387 log.Printf("Use API `GetMetadata` instead")
388
389 cli := dbx.Client
390
391 dbx.Config.LogDebug("arg: %v", arg)
392 b, err := json.Marshal(arg)
393 if err != nil {
394 return
395 }
396
397 headers := map[string]string{
398 "Content-Type": "application/json",
399 }
400 if dbx.Config.AsMemberID != "" {
401 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
402 }
403
404 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "alpha/get_metadata", headers, bytes.NewReader(b))
405 if err != nil {
406 return
407 }
408 dbx.Config.LogInfo("req: %v", req)
409
410 resp, err := cli.Do(req)
411 if err != nil {
412 return
413 }
414
415 dbx.Config.LogInfo("resp: %v", resp)
416 defer resp.Body.Close()
417 body, err := ioutil.ReadAll(resp.Body)
418 if err != nil {
419 return
420 }
421
422 dbx.Config.LogDebug("body: %s", body)
423 if resp.StatusCode == http.StatusOK {
424 var tmp metadataUnion
425 err = json.Unmarshal(body, &tmp)
426 if err != nil {
427 return
428 }
429 switch tmp.Tag {
430 case "file":
431 res = tmp.File
432
433 case "folder":
434 res = tmp.Folder
435
436 case "deleted":
437 res = tmp.Deleted
438
439 }
440 return
441 }
442 if resp.StatusCode == http.StatusConflict {
443 var apiError AlphaGetMetadataAPIError
444 err = json.Unmarshal(body, &apiError)
445 if err != nil {
446 return
447 }
448 err = apiError
449 return
450 }
451 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
452 if err != nil {
453 return
454 }
455 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
456 return
457 }
458
459 //AlphaUploadAPIError is an error-wrapper for the alpha/upload route
460 type AlphaUploadAPIError struct {
461 dropbox.APIError
462 EndpointError *UploadErrorWithProperties `json:"error"`
463 }
464
465 func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) {
466 log.Printf("WARNING: API `AlphaUpload` is deprecated")
467 log.Printf("Use API `AlphaUpload` instead")
468
469 cli := dbx.Client
470
471 dbx.Config.LogDebug("arg: %v", arg)
472 b, err := json.Marshal(arg)
473 if err != nil {
474 return
475 }
476
477 headers := map[string]string{
478 "Content-Type": "application/octet-stream",
479 "Dropbox-API-Arg": string(b),
480 }
481 if dbx.Config.AsMemberID != "" {
482 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
483 }
484
485 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "alpha/upload", headers, content)
486 if err != nil {
487 return
488 }
489 dbx.Config.LogInfo("req: %v", req)
490
491 resp, err := cli.Do(req)
492 if err != nil {
493 return
494 }
495
496 dbx.Config.LogInfo("resp: %v", resp)
497 defer resp.Body.Close()
498 body, err := ioutil.ReadAll(resp.Body)
499 if err != nil {
500 return
501 }
502
503 dbx.Config.LogDebug("body: %s", body)
504 if resp.StatusCode == http.StatusOK {
505 err = json.Unmarshal(body, &res)
506 if err != nil {
507 return
508 }
509
510 return
511 }
512 if resp.StatusCode == http.StatusConflict {
513 var apiError AlphaUploadAPIError
514 err = json.Unmarshal(body, &apiError)
515 if err != nil {
516 return
517 }
518 err = apiError
519 return
520 }
521 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
522 if err != nil {
523 return
524 }
525 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
526 return
527 }
528
529 //CopyV2APIError is an error-wrapper for the copy route
530 type CopyV2APIError struct {
531 dropbox.APIError
532 EndpointError *RelocationError `json:"error"`
533 }
534
535 func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error) {
536 cli := dbx.Client
537
538 dbx.Config.LogDebug("arg: %v", arg)
539 b, err := json.Marshal(arg)
540 if err != nil {
541 return
542 }
543
544 headers := map[string]string{
545 "Content-Type": "application/json",
546 }
547 if dbx.Config.AsMemberID != "" {
548 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
549 }
550
551 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_v2", headers, bytes.NewReader(b))
552 if err != nil {
553 return
554 }
555 dbx.Config.LogInfo("req: %v", req)
556
557 resp, err := cli.Do(req)
558 if err != nil {
559 return
560 }
561
562 dbx.Config.LogInfo("resp: %v", resp)
563 defer resp.Body.Close()
564 body, err := ioutil.ReadAll(resp.Body)
565 if err != nil {
566 return
567 }
568
569 dbx.Config.LogDebug("body: %s", body)
570 if resp.StatusCode == http.StatusOK {
571 err = json.Unmarshal(body, &res)
572 if err != nil {
573 return
574 }
575
576 return
577 }
578 if resp.StatusCode == http.StatusConflict {
579 var apiError CopyAPIError
580 err = json.Unmarshal(body, &apiError)
581 if err != nil {
582 return
583 }
584 err = apiError
585 return
586 }
587 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
588 if err != nil {
589 return
590 }
591 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
592 return
593 }
594
595 //CopyAPIError is an error-wrapper for the copy route
596 type CopyAPIError struct {
597 dropbox.APIError
598 EndpointError *RelocationError `json:"error"`
599 }
600
601 func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) {
602 log.Printf("WARNING: API `Copy` is deprecated")
603 log.Printf("Use API `Copy` instead")
604
605 cli := dbx.Client
606
607 dbx.Config.LogDebug("arg: %v", arg)
608 b, err := json.Marshal(arg)
609 if err != nil {
610 return
611 }
612
613 headers := map[string]string{
614 "Content-Type": "application/json",
615 }
616 if dbx.Config.AsMemberID != "" {
617 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
618 }
619
620 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy", headers, bytes.NewReader(b))
621 if err != nil {
622 return
623 }
624 dbx.Config.LogInfo("req: %v", req)
625
626 resp, err := cli.Do(req)
627 if err != nil {
628 return
629 }
630
631 dbx.Config.LogInfo("resp: %v", resp)
632 defer resp.Body.Close()
633 body, err := ioutil.ReadAll(resp.Body)
634 if err != nil {
635 return
636 }
637
638 dbx.Config.LogDebug("body: %s", body)
639 if resp.StatusCode == http.StatusOK {
640 var tmp metadataUnion
641 err = json.Unmarshal(body, &tmp)
642 if err != nil {
643 return
644 }
645 switch tmp.Tag {
646 case "file":
647 res = tmp.File
648
649 case "folder":
650 res = tmp.Folder
651
652 case "deleted":
653 res = tmp.Deleted
654
655 }
656 return
657 }
658 if resp.StatusCode == http.StatusConflict {
659 var apiError CopyAPIError
660 err = json.Unmarshal(body, &apiError)
661 if err != nil {
662 return
663 }
664 err = apiError
665 return
666 }
667 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
668 if err != nil {
669 return
670 }
671 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
672 return
673 }
674
675 //CopyBatchV2APIError is an error-wrapper for the copy_batch route
676 type CopyBatchV2APIError struct {
677 dropbox.APIError
678 EndpointError struct{} `json:"error"`
679 }
680
681 func (dbx *apiImpl) CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error) {
682 cli := dbx.Client
683
684 dbx.Config.LogDebug("arg: %v", arg)
685 b, err := json.Marshal(arg)
686 if err != nil {
687 return
688 }
689
690 headers := map[string]string{
691 "Content-Type": "application/json",
692 }
693 if dbx.Config.AsMemberID != "" {
694 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
695 }
696
697 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch_v2", headers, bytes.NewReader(b))
698 if err != nil {
699 return
700 }
701 dbx.Config.LogInfo("req: %v", req)
702
703 resp, err := cli.Do(req)
704 if err != nil {
705 return
706 }
707
708 dbx.Config.LogInfo("resp: %v", resp)
709 defer resp.Body.Close()
710 body, err := ioutil.ReadAll(resp.Body)
711 if err != nil {
712 return
713 }
714
715 dbx.Config.LogDebug("body: %s", body)
716 if resp.StatusCode == http.StatusOK {
717 err = json.Unmarshal(body, &res)
718 if err != nil {
719 return
720 }
721
722 return
723 }
724 if resp.StatusCode == http.StatusConflict {
725 var apiError CopyBatchAPIError
726 err = json.Unmarshal(body, &apiError)
727 if err != nil {
728 return
729 }
730 err = apiError
731 return
732 }
733 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
734 if err != nil {
735 return
736 }
737 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
738 return
739 }
740
741 //CopyBatchAPIError is an error-wrapper for the copy_batch route
742 type CopyBatchAPIError struct {
743 dropbox.APIError
744 EndpointError struct{} `json:"error"`
745 }
746
747 func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
748 log.Printf("WARNING: API `CopyBatch` is deprecated")
749 log.Printf("Use API `CopyBatch` instead")
750
751 cli := dbx.Client
752
753 dbx.Config.LogDebug("arg: %v", arg)
754 b, err := json.Marshal(arg)
755 if err != nil {
756 return
757 }
758
759 headers := map[string]string{
760 "Content-Type": "application/json",
761 }
762 if dbx.Config.AsMemberID != "" {
763 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
764 }
765
766 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch", headers, bytes.NewReader(b))
767 if err != nil {
768 return
769 }
770 dbx.Config.LogInfo("req: %v", req)
771
772 resp, err := cli.Do(req)
773 if err != nil {
774 return
775 }
776
777 dbx.Config.LogInfo("resp: %v", resp)
778 defer resp.Body.Close()
779 body, err := ioutil.ReadAll(resp.Body)
780 if err != nil {
781 return
782 }
783
784 dbx.Config.LogDebug("body: %s", body)
785 if resp.StatusCode == http.StatusOK {
786 err = json.Unmarshal(body, &res)
787 if err != nil {
788 return
789 }
790
791 return
792 }
793 if resp.StatusCode == http.StatusConflict {
794 var apiError CopyBatchAPIError
795 err = json.Unmarshal(body, &apiError)
796 if err != nil {
797 return
798 }
799 err = apiError
800 return
801 }
802 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
803 if err != nil {
804 return
805 }
806 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
807 return
808 }
809
810 //CopyBatchCheckV2APIError is an error-wrapper for the copy_batch/check route
811 type CopyBatchCheckV2APIError struct {
812 dropbox.APIError
813 EndpointError *async.PollError `json:"error"`
814 }
815
816 func (dbx *apiImpl) CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) {
817 cli := dbx.Client
818
819 dbx.Config.LogDebug("arg: %v", arg)
820 b, err := json.Marshal(arg)
821 if err != nil {
822 return
823 }
824
825 headers := map[string]string{
826 "Content-Type": "application/json",
827 }
828 if dbx.Config.AsMemberID != "" {
829 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
830 }
831
832 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch/check_v2", headers, bytes.NewReader(b))
833 if err != nil {
834 return
835 }
836 dbx.Config.LogInfo("req: %v", req)
837
838 resp, err := cli.Do(req)
839 if err != nil {
840 return
841 }
842
843 dbx.Config.LogInfo("resp: %v", resp)
844 defer resp.Body.Close()
845 body, err := ioutil.ReadAll(resp.Body)
846 if err != nil {
847 return
848 }
849
850 dbx.Config.LogDebug("body: %s", body)
851 if resp.StatusCode == http.StatusOK {
852 err = json.Unmarshal(body, &res)
853 if err != nil {
854 return
855 }
856
857 return
858 }
859 if resp.StatusCode == http.StatusConflict {
860 var apiError CopyBatchCheckAPIError
861 err = json.Unmarshal(body, &apiError)
862 if err != nil {
863 return
864 }
865 err = apiError
866 return
867 }
868 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
869 if err != nil {
870 return
871 }
872 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
873 return
874 }
875
876 //CopyBatchCheckAPIError is an error-wrapper for the copy_batch/check route
877 type CopyBatchCheckAPIError struct {
878 dropbox.APIError
879 EndpointError *async.PollError `json:"error"`
880 }
881
882 func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
883 log.Printf("WARNING: API `CopyBatchCheck` is deprecated")
884 log.Printf("Use API `CopyBatchCheck` instead")
885
886 cli := dbx.Client
887
888 dbx.Config.LogDebug("arg: %v", arg)
889 b, err := json.Marshal(arg)
890 if err != nil {
891 return
892 }
893
894 headers := map[string]string{
895 "Content-Type": "application/json",
896 }
897 if dbx.Config.AsMemberID != "" {
898 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
899 }
900
901 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch/check", headers, bytes.NewReader(b))
902 if err != nil {
903 return
904 }
905 dbx.Config.LogInfo("req: %v", req)
906
907 resp, err := cli.Do(req)
908 if err != nil {
909 return
910 }
911
912 dbx.Config.LogInfo("resp: %v", resp)
913 defer resp.Body.Close()
914 body, err := ioutil.ReadAll(resp.Body)
915 if err != nil {
916 return
917 }
918
919 dbx.Config.LogDebug("body: %s", body)
920 if resp.StatusCode == http.StatusOK {
921 err = json.Unmarshal(body, &res)
922 if err != nil {
923 return
924 }
925
926 return
927 }
928 if resp.StatusCode == http.StatusConflict {
929 var apiError CopyBatchCheckAPIError
930 err = json.Unmarshal(body, &apiError)
931 if err != nil {
932 return
933 }
934 err = apiError
935 return
936 }
937 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
938 if err != nil {
939 return
940 }
941 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
942 return
943 }
944
945 //CopyReferenceGetAPIError is an error-wrapper for the copy_reference/get route
946 type CopyReferenceGetAPIError struct {
947 dropbox.APIError
948 EndpointError *GetCopyReferenceError `json:"error"`
949 }
950
951 func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error) {
952 cli := dbx.Client
953
954 dbx.Config.LogDebug("arg: %v", arg)
955 b, err := json.Marshal(arg)
956 if err != nil {
957 return
958 }
959
960 headers := map[string]string{
961 "Content-Type": "application/json",
962 }
963 if dbx.Config.AsMemberID != "" {
964 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
965 }
966
967 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_reference/get", headers, bytes.NewReader(b))
968 if err != nil {
969 return
970 }
971 dbx.Config.LogInfo("req: %v", req)
972
973 resp, err := cli.Do(req)
974 if err != nil {
975 return
976 }
977
978 dbx.Config.LogInfo("resp: %v", resp)
979 defer resp.Body.Close()
980 body, err := ioutil.ReadAll(resp.Body)
981 if err != nil {
982 return
983 }
984
985 dbx.Config.LogDebug("body: %s", body)
986 if resp.StatusCode == http.StatusOK {
987 err = json.Unmarshal(body, &res)
988 if err != nil {
989 return
990 }
991
992 return
993 }
994 if resp.StatusCode == http.StatusConflict {
995 var apiError CopyReferenceGetAPIError
996 err = json.Unmarshal(body, &apiError)
997 if err != nil {
998 return
999 }
1000 err = apiError
1001 return
1002 }
1003 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1004 if err != nil {
1005 return
1006 }
1007 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1008 return
1009 }
1010
1011 //CopyReferenceSaveAPIError is an error-wrapper for the copy_reference/save route
1012 type CopyReferenceSaveAPIError struct {
1013 dropbox.APIError
1014 EndpointError *SaveCopyReferenceError `json:"error"`
1015 }
1016
1017 func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error) {
1018 cli := dbx.Client
1019
1020 dbx.Config.LogDebug("arg: %v", arg)
1021 b, err := json.Marshal(arg)
1022 if err != nil {
1023 return
1024 }
1025
1026 headers := map[string]string{
1027 "Content-Type": "application/json",
1028 }
1029 if dbx.Config.AsMemberID != "" {
1030 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1031 }
1032
1033 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_reference/save", headers, bytes.NewReader(b))
1034 if err != nil {
1035 return
1036 }
1037 dbx.Config.LogInfo("req: %v", req)
1038
1039 resp, err := cli.Do(req)
1040 if err != nil {
1041 return
1042 }
1043
1044 dbx.Config.LogInfo("resp: %v", resp)
1045 defer resp.Body.Close()
1046 body, err := ioutil.ReadAll(resp.Body)
1047 if err != nil {
1048 return
1049 }
1050
1051 dbx.Config.LogDebug("body: %s", body)
1052 if resp.StatusCode == http.StatusOK {
1053 err = json.Unmarshal(body, &res)
1054 if err != nil {
1055 return
1056 }
1057
1058 return
1059 }
1060 if resp.StatusCode == http.StatusConflict {
1061 var apiError CopyReferenceSaveAPIError
1062 err = json.Unmarshal(body, &apiError)
1063 if err != nil {
1064 return
1065 }
1066 err = apiError
1067 return
1068 }
1069 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1070 if err != nil {
1071 return
1072 }
1073 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1074 return
1075 }
1076
1077 //CreateFolderV2APIError is an error-wrapper for the create_folder route
1078 type CreateFolderV2APIError struct {
1079 dropbox.APIError
1080 EndpointError *CreateFolderError `json:"error"`
1081 }
1082
1083 func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error) {
1084 cli := dbx.Client
1085
1086 dbx.Config.LogDebug("arg: %v", arg)
1087 b, err := json.Marshal(arg)
1088 if err != nil {
1089 return
1090 }
1091
1092 headers := map[string]string{
1093 "Content-Type": "application/json",
1094 }
1095 if dbx.Config.AsMemberID != "" {
1096 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1097 }
1098
1099 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_v2", headers, bytes.NewReader(b))
1100 if err != nil {
1101 return
1102 }
1103 dbx.Config.LogInfo("req: %v", req)
1104
1105 resp, err := cli.Do(req)
1106 if err != nil {
1107 return
1108 }
1109
1110 dbx.Config.LogInfo("resp: %v", resp)
1111 defer resp.Body.Close()
1112 body, err := ioutil.ReadAll(resp.Body)
1113 if err != nil {
1114 return
1115 }
1116
1117 dbx.Config.LogDebug("body: %s", body)
1118 if resp.StatusCode == http.StatusOK {
1119 err = json.Unmarshal(body, &res)
1120 if err != nil {
1121 return
1122 }
1123
1124 return
1125 }
1126 if resp.StatusCode == http.StatusConflict {
1127 var apiError CreateFolderAPIError
1128 err = json.Unmarshal(body, &apiError)
1129 if err != nil {
1130 return
1131 }
1132 err = apiError
1133 return
1134 }
1135 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1136 if err != nil {
1137 return
1138 }
1139 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1140 return
1141 }
1142
1143 //CreateFolderAPIError is an error-wrapper for the create_folder route
1144 type CreateFolderAPIError struct {
1145 dropbox.APIError
1146 EndpointError *CreateFolderError `json:"error"`
1147 }
1148
1149 func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error) {
1150 log.Printf("WARNING: API `CreateFolder` is deprecated")
1151 log.Printf("Use API `CreateFolder` instead")
1152
1153 cli := dbx.Client
1154
1155 dbx.Config.LogDebug("arg: %v", arg)
1156 b, err := json.Marshal(arg)
1157 if err != nil {
1158 return
1159 }
1160
1161 headers := map[string]string{
1162 "Content-Type": "application/json",
1163 }
1164 if dbx.Config.AsMemberID != "" {
1165 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1166 }
1167
1168 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder", headers, bytes.NewReader(b))
1169 if err != nil {
1170 return
1171 }
1172 dbx.Config.LogInfo("req: %v", req)
1173
1174 resp, err := cli.Do(req)
1175 if err != nil {
1176 return
1177 }
1178
1179 dbx.Config.LogInfo("resp: %v", resp)
1180 defer resp.Body.Close()
1181 body, err := ioutil.ReadAll(resp.Body)
1182 if err != nil {
1183 return
1184 }
1185
1186 dbx.Config.LogDebug("body: %s", body)
1187 if resp.StatusCode == http.StatusOK {
1188 err = json.Unmarshal(body, &res)
1189 if err != nil {
1190 return
1191 }
1192
1193 return
1194 }
1195 if resp.StatusCode == http.StatusConflict {
1196 var apiError CreateFolderAPIError
1197 err = json.Unmarshal(body, &apiError)
1198 if err != nil {
1199 return
1200 }
1201 err = apiError
1202 return
1203 }
1204 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1205 if err != nil {
1206 return
1207 }
1208 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1209 return
1210 }
1211
1212 //CreateFolderBatchAPIError is an error-wrapper for the create_folder_batch route
1213 type CreateFolderBatchAPIError struct {
1214 dropbox.APIError
1215 EndpointError struct{} `json:"error"`
1216 }
1217
1218 func (dbx *apiImpl) CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error) {
1219 cli := dbx.Client
1220
1221 dbx.Config.LogDebug("arg: %v", arg)
1222 b, err := json.Marshal(arg)
1223 if err != nil {
1224 return
1225 }
1226
1227 headers := map[string]string{
1228 "Content-Type": "application/json",
1229 }
1230 if dbx.Config.AsMemberID != "" {
1231 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1232 }
1233
1234 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_batch", headers, bytes.NewReader(b))
1235 if err != nil {
1236 return
1237 }
1238 dbx.Config.LogInfo("req: %v", req)
1239
1240 resp, err := cli.Do(req)
1241 if err != nil {
1242 return
1243 }
1244
1245 dbx.Config.LogInfo("resp: %v", resp)
1246 defer resp.Body.Close()
1247 body, err := ioutil.ReadAll(resp.Body)
1248 if err != nil {
1249 return
1250 }
1251
1252 dbx.Config.LogDebug("body: %s", body)
1253 if resp.StatusCode == http.StatusOK {
1254 err = json.Unmarshal(body, &res)
1255 if err != nil {
1256 return
1257 }
1258
1259 return
1260 }
1261 if resp.StatusCode == http.StatusConflict {
1262 var apiError CreateFolderBatchAPIError
1263 err = json.Unmarshal(body, &apiError)
1264 if err != nil {
1265 return
1266 }
1267 err = apiError
1268 return
1269 }
1270 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1271 if err != nil {
1272 return
1273 }
1274 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1275 return
1276 }
1277
1278 //CreateFolderBatchCheckAPIError is an error-wrapper for the create_folder_batch/check route
1279 type CreateFolderBatchCheckAPIError struct {
1280 dropbox.APIError
1281 EndpointError *async.PollError `json:"error"`
1282 }
1283
1284 func (dbx *apiImpl) CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error) {
1285 cli := dbx.Client
1286
1287 dbx.Config.LogDebug("arg: %v", arg)
1288 b, err := json.Marshal(arg)
1289 if err != nil {
1290 return
1291 }
1292
1293 headers := map[string]string{
1294 "Content-Type": "application/json",
1295 }
1296 if dbx.Config.AsMemberID != "" {
1297 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1298 }
1299
1300 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_batch/check", headers, bytes.NewReader(b))
1301 if err != nil {
1302 return
1303 }
1304 dbx.Config.LogInfo("req: %v", req)
1305
1306 resp, err := cli.Do(req)
1307 if err != nil {
1308 return
1309 }
1310
1311 dbx.Config.LogInfo("resp: %v", resp)
1312 defer resp.Body.Close()
1313 body, err := ioutil.ReadAll(resp.Body)
1314 if err != nil {
1315 return
1316 }
1317
1318 dbx.Config.LogDebug("body: %s", body)
1319 if resp.StatusCode == http.StatusOK {
1320 err = json.Unmarshal(body, &res)
1321 if err != nil {
1322 return
1323 }
1324
1325 return
1326 }
1327 if resp.StatusCode == http.StatusConflict {
1328 var apiError CreateFolderBatchCheckAPIError
1329 err = json.Unmarshal(body, &apiError)
1330 if err != nil {
1331 return
1332 }
1333 err = apiError
1334 return
1335 }
1336 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1337 if err != nil {
1338 return
1339 }
1340 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1341 return
1342 }
1343
1344 //DeleteV2APIError is an error-wrapper for the delete route
1345 type DeleteV2APIError struct {
1346 dropbox.APIError
1347 EndpointError *DeleteError `json:"error"`
1348 }
1349
1350 func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) {
1351 cli := dbx.Client
1352
1353 dbx.Config.LogDebug("arg: %v", arg)
1354 b, err := json.Marshal(arg)
1355 if err != nil {
1356 return
1357 }
1358
1359 headers := map[string]string{
1360 "Content-Type": "application/json",
1361 }
1362 if dbx.Config.AsMemberID != "" {
1363 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1364 }
1365
1366 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_v2", headers, bytes.NewReader(b))
1367 if err != nil {
1368 return
1369 }
1370 dbx.Config.LogInfo("req: %v", req)
1371
1372 resp, err := cli.Do(req)
1373 if err != nil {
1374 return
1375 }
1376
1377 dbx.Config.LogInfo("resp: %v", resp)
1378 defer resp.Body.Close()
1379 body, err := ioutil.ReadAll(resp.Body)
1380 if err != nil {
1381 return
1382 }
1383
1384 dbx.Config.LogDebug("body: %s", body)
1385 if resp.StatusCode == http.StatusOK {
1386 err = json.Unmarshal(body, &res)
1387 if err != nil {
1388 return
1389 }
1390
1391 return
1392 }
1393 if resp.StatusCode == http.StatusConflict {
1394 var apiError DeleteAPIError
1395 err = json.Unmarshal(body, &apiError)
1396 if err != nil {
1397 return
1398 }
1399 err = apiError
1400 return
1401 }
1402 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1403 if err != nil {
1404 return
1405 }
1406 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1407 return
1408 }
1409
1410 //DeleteAPIError is an error-wrapper for the delete route
1411 type DeleteAPIError struct {
1412 dropbox.APIError
1413 EndpointError *DeleteError `json:"error"`
1414 }
1415
1416 func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
1417 log.Printf("WARNING: API `Delete` is deprecated")
1418 log.Printf("Use API `Delete` instead")
1419
1420 cli := dbx.Client
1421
1422 dbx.Config.LogDebug("arg: %v", arg)
1423 b, err := json.Marshal(arg)
1424 if err != nil {
1425 return
1426 }
1427
1428 headers := map[string]string{
1429 "Content-Type": "application/json",
1430 }
1431 if dbx.Config.AsMemberID != "" {
1432 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1433 }
1434
1435 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete", headers, bytes.NewReader(b))
1436 if err != nil {
1437 return
1438 }
1439 dbx.Config.LogInfo("req: %v", req)
1440
1441 resp, err := cli.Do(req)
1442 if err != nil {
1443 return
1444 }
1445
1446 dbx.Config.LogInfo("resp: %v", resp)
1447 defer resp.Body.Close()
1448 body, err := ioutil.ReadAll(resp.Body)
1449 if err != nil {
1450 return
1451 }
1452
1453 dbx.Config.LogDebug("body: %s", body)
1454 if resp.StatusCode == http.StatusOK {
1455 var tmp metadataUnion
1456 err = json.Unmarshal(body, &tmp)
1457 if err != nil {
1458 return
1459 }
1460 switch tmp.Tag {
1461 case "file":
1462 res = tmp.File
1463
1464 case "folder":
1465 res = tmp.Folder
1466
1467 case "deleted":
1468 res = tmp.Deleted
1469
1470 }
1471 return
1472 }
1473 if resp.StatusCode == http.StatusConflict {
1474 var apiError DeleteAPIError
1475 err = json.Unmarshal(body, &apiError)
1476 if err != nil {
1477 return
1478 }
1479 err = apiError
1480 return
1481 }
1482 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1483 if err != nil {
1484 return
1485 }
1486 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1487 return
1488 }
1489
1490 //DeleteBatchAPIError is an error-wrapper for the delete_batch route
1491 type DeleteBatchAPIError struct {
1492 dropbox.APIError
1493 EndpointError struct{} `json:"error"`
1494 }
1495
1496 func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error) {
1497 cli := dbx.Client
1498
1499 dbx.Config.LogDebug("arg: %v", arg)
1500 b, err := json.Marshal(arg)
1501 if err != nil {
1502 return
1503 }
1504
1505 headers := map[string]string{
1506 "Content-Type": "application/json",
1507 }
1508 if dbx.Config.AsMemberID != "" {
1509 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1510 }
1511
1512 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_batch", headers, bytes.NewReader(b))
1513 if err != nil {
1514 return
1515 }
1516 dbx.Config.LogInfo("req: %v", req)
1517
1518 resp, err := cli.Do(req)
1519 if err != nil {
1520 return
1521 }
1522
1523 dbx.Config.LogInfo("resp: %v", resp)
1524 defer resp.Body.Close()
1525 body, err := ioutil.ReadAll(resp.Body)
1526 if err != nil {
1527 return
1528 }
1529
1530 dbx.Config.LogDebug("body: %s", body)
1531 if resp.StatusCode == http.StatusOK {
1532 err = json.Unmarshal(body, &res)
1533 if err != nil {
1534 return
1535 }
1536
1537 return
1538 }
1539 if resp.StatusCode == http.StatusConflict {
1540 var apiError DeleteBatchAPIError
1541 err = json.Unmarshal(body, &apiError)
1542 if err != nil {
1543 return
1544 }
1545 err = apiError
1546 return
1547 }
1548 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1549 if err != nil {
1550 return
1551 }
1552 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1553 return
1554 }
1555
1556 //DeleteBatchCheckAPIError is an error-wrapper for the delete_batch/check route
1557 type DeleteBatchCheckAPIError struct {
1558 dropbox.APIError
1559 EndpointError *async.PollError `json:"error"`
1560 }
1561
1562 func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error) {
1563 cli := dbx.Client
1564
1565 dbx.Config.LogDebug("arg: %v", arg)
1566 b, err := json.Marshal(arg)
1567 if err != nil {
1568 return
1569 }
1570
1571 headers := map[string]string{
1572 "Content-Type": "application/json",
1573 }
1574 if dbx.Config.AsMemberID != "" {
1575 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1576 }
1577
1578 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_batch/check", headers, bytes.NewReader(b))
1579 if err != nil {
1580 return
1581 }
1582 dbx.Config.LogInfo("req: %v", req)
1583
1584 resp, err := cli.Do(req)
1585 if err != nil {
1586 return
1587 }
1588
1589 dbx.Config.LogInfo("resp: %v", resp)
1590 defer resp.Body.Close()
1591 body, err := ioutil.ReadAll(resp.Body)
1592 if err != nil {
1593 return
1594 }
1595
1596 dbx.Config.LogDebug("body: %s", body)
1597 if resp.StatusCode == http.StatusOK {
1598 err = json.Unmarshal(body, &res)
1599 if err != nil {
1600 return
1601 }
1602
1603 return
1604 }
1605 if resp.StatusCode == http.StatusConflict {
1606 var apiError DeleteBatchCheckAPIError
1607 err = json.Unmarshal(body, &apiError)
1608 if err != nil {
1609 return
1610 }
1611 err = apiError
1612 return
1613 }
1614 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1615 if err != nil {
1616 return
1617 }
1618 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1619 return
1620 }
1621
1622 //DownloadAPIError is an error-wrapper for the download route
1623 type DownloadAPIError struct {
1624 dropbox.APIError
1625 EndpointError *DownloadError `json:"error"`
1626 }
1627
1628 func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error) {
1629 cli := dbx.Client
1630
1631 dbx.Config.LogDebug("arg: %v", arg)
1632 b, err := json.Marshal(arg)
1633 if err != nil {
1634 return
1635 }
1636
1637 headers := map[string]string{
1638 "Dropbox-API-Arg": string(b),
1639 }
1640 for k, v := range arg.ExtraHeaders {
1641 headers[k] = v
1642 }
1643 if dbx.Config.AsMemberID != "" {
1644 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1645 }
1646
1647 req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "download", headers, nil)
1648 if err != nil {
1649 return
1650 }
1651 dbx.Config.LogInfo("req: %v", req)
1652
1653 resp, err := cli.Do(req)
1654 if err != nil {
1655 return
1656 }
1657
1658 dbx.Config.LogInfo("resp: %v", resp)
1659 body := []byte(resp.Header.Get("Dropbox-API-Result"))
1660 content = resp.Body
1661 dbx.Config.LogDebug("body: %s", body)
1662 if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent {
1663 err = json.Unmarshal(body, &res)
1664 if err != nil {
1665 return
1666 }
1667
1668 return
1669 }
1670 if resp.StatusCode == http.StatusConflict {
1671 defer resp.Body.Close()
1672 body, err = ioutil.ReadAll(resp.Body)
1673 if err != nil {
1674 return
1675 }
1676 var apiError DownloadAPIError
1677 err = json.Unmarshal(body, &apiError)
1678 if err != nil {
1679 return
1680 }
1681 err = apiError
1682 return
1683 }
1684 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1685 if err != nil {
1686 return
1687 }
1688 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1689 return
1690 }
1691
1692 //DownloadZipAPIError is an error-wrapper for the download_zip route
1693 type DownloadZipAPIError struct {
1694 dropbox.APIError
1695 EndpointError *DownloadZipError `json:"error"`
1696 }
1697
1698 func (dbx *apiImpl) DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error) {
1699 cli := dbx.Client
1700
1701 dbx.Config.LogDebug("arg: %v", arg)
1702 b, err := json.Marshal(arg)
1703 if err != nil {
1704 return
1705 }
1706
1707 headers := map[string]string{
1708 "Dropbox-API-Arg": string(b),
1709 }
1710 if dbx.Config.AsMemberID != "" {
1711 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1712 }
1713
1714 req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "download_zip", headers, nil)
1715 if err != nil {
1716 return
1717 }
1718 dbx.Config.LogInfo("req: %v", req)
1719
1720 resp, err := cli.Do(req)
1721 if err != nil {
1722 return
1723 }
1724
1725 dbx.Config.LogInfo("resp: %v", resp)
1726 body := []byte(resp.Header.Get("Dropbox-API-Result"))
1727 content = resp.Body
1728 dbx.Config.LogDebug("body: %s", body)
1729 if resp.StatusCode == http.StatusOK {
1730 err = json.Unmarshal(body, &res)
1731 if err != nil {
1732 return
1733 }
1734
1735 return
1736 }
1737 if resp.StatusCode == http.StatusConflict {
1738 defer resp.Body.Close()
1739 body, err = ioutil.ReadAll(resp.Body)
1740 if err != nil {
1741 return
1742 }
1743 var apiError DownloadZipAPIError
1744 err = json.Unmarshal(body, &apiError)
1745 if err != nil {
1746 return
1747 }
1748 err = apiError
1749 return
1750 }
1751 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1752 if err != nil {
1753 return
1754 }
1755 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1756 return
1757 }
1758
1759 //GetMetadataAPIError is an error-wrapper for the get_metadata route
1760 type GetMetadataAPIError struct {
1761 dropbox.APIError
1762 EndpointError *GetMetadataError `json:"error"`
1763 }
1764
1765 func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {
1766 cli := dbx.Client
1767
1768 dbx.Config.LogDebug("arg: %v", arg)
1769 b, err := json.Marshal(arg)
1770 if err != nil {
1771 return
1772 }
1773
1774 headers := map[string]string{
1775 "Content-Type": "application/json",
1776 }
1777 if dbx.Config.AsMemberID != "" {
1778 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1779 }
1780
1781 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_metadata", headers, bytes.NewReader(b))
1782 if err != nil {
1783 return
1784 }
1785 dbx.Config.LogInfo("req: %v", req)
1786
1787 resp, err := cli.Do(req)
1788 if err != nil {
1789 return
1790 }
1791
1792 dbx.Config.LogInfo("resp: %v", resp)
1793 defer resp.Body.Close()
1794 body, err := ioutil.ReadAll(resp.Body)
1795 if err != nil {
1796 return
1797 }
1798
1799 dbx.Config.LogDebug("body: %s", body)
1800 if resp.StatusCode == http.StatusOK {
1801 var tmp metadataUnion
1802 err = json.Unmarshal(body, &tmp)
1803 if err != nil {
1804 return
1805 }
1806 switch tmp.Tag {
1807 case "file":
1808 res = tmp.File
1809
1810 case "folder":
1811 res = tmp.Folder
1812
1813 case "deleted":
1814 res = tmp.Deleted
1815
1816 }
1817 return
1818 }
1819 if resp.StatusCode == http.StatusConflict {
1820 var apiError GetMetadataAPIError
1821 err = json.Unmarshal(body, &apiError)
1822 if err != nil {
1823 return
1824 }
1825 err = apiError
1826 return
1827 }
1828 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1829 if err != nil {
1830 return
1831 }
1832 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1833 return
1834 }
1835
1836 //GetPreviewAPIError is an error-wrapper for the get_preview route
1837 type GetPreviewAPIError struct {
1838 dropbox.APIError
1839 EndpointError *PreviewError `json:"error"`
1840 }
1841
1842 func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error) {
1843 cli := dbx.Client
1844
1845 dbx.Config.LogDebug("arg: %v", arg)
1846 b, err := json.Marshal(arg)
1847 if err != nil {
1848 return
1849 }
1850
1851 headers := map[string]string{
1852 "Dropbox-API-Arg": string(b),
1853 }
1854 if dbx.Config.AsMemberID != "" {
1855 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1856 }
1857
1858 req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "get_preview", headers, nil)
1859 if err != nil {
1860 return
1861 }
1862 dbx.Config.LogInfo("req: %v", req)
1863
1864 resp, err := cli.Do(req)
1865 if err != nil {
1866 return
1867 }
1868
1869 dbx.Config.LogInfo("resp: %v", resp)
1870 body := []byte(resp.Header.Get("Dropbox-API-Result"))
1871 content = resp.Body
1872 dbx.Config.LogDebug("body: %s", body)
1873 if resp.StatusCode == http.StatusOK {
1874 err = json.Unmarshal(body, &res)
1875 if err != nil {
1876 return
1877 }
1878
1879 return
1880 }
1881 if resp.StatusCode == http.StatusConflict {
1882 defer resp.Body.Close()
1883 body, err = ioutil.ReadAll(resp.Body)
1884 if err != nil {
1885 return
1886 }
1887 var apiError GetPreviewAPIError
1888 err = json.Unmarshal(body, &apiError)
1889 if err != nil {
1890 return
1891 }
1892 err = apiError
1893 return
1894 }
1895 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1896 if err != nil {
1897 return
1898 }
1899 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1900 return
1901 }
1902
1903 //GetTemporaryLinkAPIError is an error-wrapper for the get_temporary_link route
1904 type GetTemporaryLinkAPIError struct {
1905 dropbox.APIError
1906 EndpointError *GetTemporaryLinkError `json:"error"`
1907 }
1908
1909 func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error) {
1910 cli := dbx.Client
1911
1912 dbx.Config.LogDebug("arg: %v", arg)
1913 b, err := json.Marshal(arg)
1914 if err != nil {
1915 return
1916 }
1917
1918 headers := map[string]string{
1919 "Content-Type": "application/json",
1920 }
1921 if dbx.Config.AsMemberID != "" {
1922 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1923 }
1924
1925 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_temporary_link", headers, bytes.NewReader(b))
1926 if err != nil {
1927 return
1928 }
1929 dbx.Config.LogInfo("req: %v", req)
1930
1931 resp, err := cli.Do(req)
1932 if err != nil {
1933 return
1934 }
1935
1936 dbx.Config.LogInfo("resp: %v", resp)
1937 defer resp.Body.Close()
1938 body, err := ioutil.ReadAll(resp.Body)
1939 if err != nil {
1940 return
1941 }
1942
1943 dbx.Config.LogDebug("body: %s", body)
1944 if resp.StatusCode == http.StatusOK {
1945 err = json.Unmarshal(body, &res)
1946 if err != nil {
1947 return
1948 }
1949
1950 return
1951 }
1952 if resp.StatusCode == http.StatusConflict {
1953 var apiError GetTemporaryLinkAPIError
1954 err = json.Unmarshal(body, &apiError)
1955 if err != nil {
1956 return
1957 }
1958 err = apiError
1959 return
1960 }
1961 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1962 if err != nil {
1963 return
1964 }
1965 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1966 return
1967 }
1968
1969 //GetTemporaryUploadLinkAPIError is an error-wrapper for the get_temporary_upload_link route
1970 type GetTemporaryUploadLinkAPIError struct {
1971 dropbox.APIError
1972 EndpointError struct{} `json:"error"`
1973 }
1974
1975 func (dbx *apiImpl) GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error) {
1976 cli := dbx.Client
1977
1978 dbx.Config.LogDebug("arg: %v", arg)
1979 b, err := json.Marshal(arg)
1980 if err != nil {
1981 return
1982 }
1983
1984 headers := map[string]string{
1985 "Content-Type": "application/json",
1986 }
1987 if dbx.Config.AsMemberID != "" {
1988 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1989 }
1990
1991 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_temporary_upload_link", headers, bytes.NewReader(b))
1992 if err != nil {
1993 return
1994 }
1995 dbx.Config.LogInfo("req: %v", req)
1996
1997 resp, err := cli.Do(req)
1998 if err != nil {
1999 return
2000 }
2001
2002 dbx.Config.LogInfo("resp: %v", resp)
2003 defer resp.Body.Close()
2004 body, err := ioutil.ReadAll(resp.Body)
2005 if err != nil {
2006 return
2007 }
2008
2009 dbx.Config.LogDebug("body: %s", body)
2010 if resp.StatusCode == http.StatusOK {
2011 err = json.Unmarshal(body, &res)
2012 if err != nil {
2013 return
2014 }
2015
2016 return
2017 }
2018 if resp.StatusCode == http.StatusConflict {
2019 var apiError GetTemporaryUploadLinkAPIError
2020 err = json.Unmarshal(body, &apiError)
2021 if err != nil {
2022 return
2023 }
2024 err = apiError
2025 return
2026 }
2027 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2028 if err != nil {
2029 return
2030 }
2031 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2032 return
2033 }
2034
2035 //GetThumbnailAPIError is an error-wrapper for the get_thumbnail route
2036 type GetThumbnailAPIError struct {
2037 dropbox.APIError
2038 EndpointError *ThumbnailError `json:"error"`
2039 }
2040
2041 func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error) {
2042 cli := dbx.Client
2043
2044 dbx.Config.LogDebug("arg: %v", arg)
2045 b, err := json.Marshal(arg)
2046 if err != nil {
2047 return
2048 }
2049
2050 headers := map[string]string{
2051 "Dropbox-API-Arg": string(b),
2052 }
2053 if dbx.Config.AsMemberID != "" {
2054 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2055 }
2056
2057 req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "get_thumbnail", headers, nil)
2058 if err != nil {
2059 return
2060 }
2061 dbx.Config.LogInfo("req: %v", req)
2062
2063 resp, err := cli.Do(req)
2064 if err != nil {
2065 return
2066 }
2067
2068 dbx.Config.LogInfo("resp: %v", resp)
2069 body := []byte(resp.Header.Get("Dropbox-API-Result"))
2070 content = resp.Body
2071 dbx.Config.LogDebug("body: %s", body)
2072 if resp.StatusCode == http.StatusOK {
2073 err = json.Unmarshal(body, &res)
2074 if err != nil {
2075 return
2076 }
2077
2078 return
2079 }
2080 if resp.StatusCode == http.StatusConflict {
2081 defer resp.Body.Close()
2082 body, err = ioutil.ReadAll(resp.Body)
2083 if err != nil {
2084 return
2085 }
2086 var apiError GetThumbnailAPIError
2087 err = json.Unmarshal(body, &apiError)
2088 if err != nil {
2089 return
2090 }
2091 err = apiError
2092 return
2093 }
2094 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2095 if err != nil {
2096 return
2097 }
2098 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2099 return
2100 }
2101
2102 //GetThumbnailBatchAPIError is an error-wrapper for the get_thumbnail_batch route
2103 type GetThumbnailBatchAPIError struct {
2104 dropbox.APIError
2105 EndpointError *GetThumbnailBatchError `json:"error"`
2106 }
2107
2108 func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error) {
2109 cli := dbx.Client
2110
2111 dbx.Config.LogDebug("arg: %v", arg)
2112 b, err := json.Marshal(arg)
2113 if err != nil {
2114 return
2115 }
2116
2117 headers := map[string]string{
2118 "Dropbox-API-Arg": string(b),
2119 }
2120 if dbx.Config.AsMemberID != "" {
2121 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2122 }
2123
2124 req, err := (*dropbox.Context)(dbx).NewRequest("content", "rpc", true, "files", "get_thumbnail_batch", headers, nil)
2125 if err != nil {
2126 return
2127 }
2128 dbx.Config.LogInfo("req: %v", req)
2129
2130 resp, err := cli.Do(req)
2131 if err != nil {
2132 return
2133 }
2134
2135 dbx.Config.LogInfo("resp: %v", resp)
2136 defer resp.Body.Close()
2137 body, err := ioutil.ReadAll(resp.Body)
2138 if err != nil {
2139 return
2140 }
2141
2142 dbx.Config.LogDebug("body: %s", body)
2143 if resp.StatusCode == http.StatusOK {
2144 err = json.Unmarshal(body, &res)
2145 if err != nil {
2146 return
2147 }
2148
2149 return
2150 }
2151 if resp.StatusCode == http.StatusConflict {
2152 var apiError GetThumbnailBatchAPIError
2153 err = json.Unmarshal(body, &apiError)
2154 if err != nil {
2155 return
2156 }
2157 err = apiError
2158 return
2159 }
2160 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2161 if err != nil {
2162 return
2163 }
2164 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2165 return
2166 }
2167
2168 //ListFolderAPIError is an error-wrapper for the list_folder route
2169 type ListFolderAPIError struct {
2170 dropbox.APIError
2171 EndpointError *ListFolderError `json:"error"`
2172 }
2173
2174 func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error) {
2175 cli := dbx.Client
2176
2177 dbx.Config.LogDebug("arg: %v", arg)
2178 b, err := json.Marshal(arg)
2179 if err != nil {
2180 return
2181 }
2182
2183 headers := map[string]string{
2184 "Content-Type": "application/json",
2185 }
2186 if dbx.Config.AsMemberID != "" {
2187 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2188 }
2189
2190 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder", headers, bytes.NewReader(b))
2191 if err != nil {
2192 return
2193 }
2194 dbx.Config.LogInfo("req: %v", req)
2195
2196 resp, err := cli.Do(req)
2197 if err != nil {
2198 return
2199 }
2200
2201 dbx.Config.LogInfo("resp: %v", resp)
2202 defer resp.Body.Close()
2203 body, err := ioutil.ReadAll(resp.Body)
2204 if err != nil {
2205 return
2206 }
2207
2208 dbx.Config.LogDebug("body: %s", body)
2209 if resp.StatusCode == http.StatusOK {
2210 err = json.Unmarshal(body, &res)
2211 if err != nil {
2212 return
2213 }
2214
2215 return
2216 }
2217 if resp.StatusCode == http.StatusConflict {
2218 var apiError ListFolderAPIError
2219 err = json.Unmarshal(body, &apiError)
2220 if err != nil {
2221 return
2222 }
2223 err = apiError
2224 return
2225 }
2226 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2227 if err != nil {
2228 return
2229 }
2230 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2231 return
2232 }
2233
2234 //ListFolderContinueAPIError is an error-wrapper for the list_folder/continue route
2235 type ListFolderContinueAPIError struct {
2236 dropbox.APIError
2237 EndpointError *ListFolderContinueError `json:"error"`
2238 }
2239
2240 func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error) {
2241 cli := dbx.Client
2242
2243 dbx.Config.LogDebug("arg: %v", arg)
2244 b, err := json.Marshal(arg)
2245 if err != nil {
2246 return
2247 }
2248
2249 headers := map[string]string{
2250 "Content-Type": "application/json",
2251 }
2252 if dbx.Config.AsMemberID != "" {
2253 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2254 }
2255
2256 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder/continue", headers, bytes.NewReader(b))
2257 if err != nil {
2258 return
2259 }
2260 dbx.Config.LogInfo("req: %v", req)
2261
2262 resp, err := cli.Do(req)
2263 if err != nil {
2264 return
2265 }
2266
2267 dbx.Config.LogInfo("resp: %v", resp)
2268 defer resp.Body.Close()
2269 body, err := ioutil.ReadAll(resp.Body)
2270 if err != nil {
2271 return
2272 }
2273
2274 dbx.Config.LogDebug("body: %s", body)
2275 if resp.StatusCode == http.StatusOK {
2276 err = json.Unmarshal(body, &res)
2277 if err != nil {
2278 return
2279 }
2280
2281 return
2282 }
2283 if resp.StatusCode == http.StatusConflict {
2284 var apiError ListFolderContinueAPIError
2285 err = json.Unmarshal(body, &apiError)
2286 if err != nil {
2287 return
2288 }
2289 err = apiError
2290 return
2291 }
2292 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2293 if err != nil {
2294 return
2295 }
2296 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2297 return
2298 }
2299
2300 //ListFolderGetLatestCursorAPIError is an error-wrapper for the list_folder/get_latest_cursor route
2301 type ListFolderGetLatestCursorAPIError struct {
2302 dropbox.APIError
2303 EndpointError *ListFolderError `json:"error"`
2304 }
2305
2306 func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error) {
2307 cli := dbx.Client
2308
2309 dbx.Config.LogDebug("arg: %v", arg)
2310 b, err := json.Marshal(arg)
2311 if err != nil {
2312 return
2313 }
2314
2315 headers := map[string]string{
2316 "Content-Type": "application/json",
2317 }
2318 if dbx.Config.AsMemberID != "" {
2319 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2320 }
2321
2322 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder/get_latest_cursor", headers, bytes.NewReader(b))
2323 if err != nil {
2324 return
2325 }
2326 dbx.Config.LogInfo("req: %v", req)
2327
2328 resp, err := cli.Do(req)
2329 if err != nil {
2330 return
2331 }
2332
2333 dbx.Config.LogInfo("resp: %v", resp)
2334 defer resp.Body.Close()
2335 body, err := ioutil.ReadAll(resp.Body)
2336 if err != nil {
2337 return
2338 }
2339
2340 dbx.Config.LogDebug("body: %s", body)
2341 if resp.StatusCode == http.StatusOK {
2342 err = json.Unmarshal(body, &res)
2343 if err != nil {
2344 return
2345 }
2346
2347 return
2348 }
2349 if resp.StatusCode == http.StatusConflict {
2350 var apiError ListFolderGetLatestCursorAPIError
2351 err = json.Unmarshal(body, &apiError)
2352 if err != nil {
2353 return
2354 }
2355 err = apiError
2356 return
2357 }
2358 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2359 if err != nil {
2360 return
2361 }
2362 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2363 return
2364 }
2365
2366 //ListFolderLongpollAPIError is an error-wrapper for the list_folder/longpoll route
2367 type ListFolderLongpollAPIError struct {
2368 dropbox.APIError
2369 EndpointError *ListFolderLongpollError `json:"error"`
2370 }
2371
2372 func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error) {
2373 cli := dbx.Client
2374
2375 dbx.Config.LogDebug("arg: %v", arg)
2376 b, err := json.Marshal(arg)
2377 if err != nil {
2378 return
2379 }
2380
2381 headers := map[string]string{
2382 "Content-Type": "application/json",
2383 }
2384
2385 req, err := (*dropbox.Context)(dbx).NewRequest("notify", "rpc", false, "files", "list_folder/longpoll", headers, bytes.NewReader(b))
2386 if err != nil {
2387 return
2388 }
2389 dbx.Config.LogInfo("req: %v", req)
2390
2391 resp, err := cli.Do(req)
2392 if err != nil {
2393 return
2394 }
2395
2396 dbx.Config.LogInfo("resp: %v", resp)
2397 defer resp.Body.Close()
2398 body, err := ioutil.ReadAll(resp.Body)
2399 if err != nil {
2400 return
2401 }
2402
2403 dbx.Config.LogDebug("body: %s", body)
2404 if resp.StatusCode == http.StatusOK {
2405 err = json.Unmarshal(body, &res)
2406 if err != nil {
2407 return
2408 }
2409
2410 return
2411 }
2412 if resp.StatusCode == http.StatusConflict {
2413 var apiError ListFolderLongpollAPIError
2414 err = json.Unmarshal(body, &apiError)
2415 if err != nil {
2416 return
2417 }
2418 err = apiError
2419 return
2420 }
2421 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2422 if err != nil {
2423 return
2424 }
2425 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2426 return
2427 }
2428
2429 //ListRevisionsAPIError is an error-wrapper for the list_revisions route
2430 type ListRevisionsAPIError struct {
2431 dropbox.APIError
2432 EndpointError *ListRevisionsError `json:"error"`
2433 }
2434
2435 func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error) {
2436 cli := dbx.Client
2437
2438 dbx.Config.LogDebug("arg: %v", arg)
2439 b, err := json.Marshal(arg)
2440 if err != nil {
2441 return
2442 }
2443
2444 headers := map[string]string{
2445 "Content-Type": "application/json",
2446 }
2447 if dbx.Config.AsMemberID != "" {
2448 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2449 }
2450
2451 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_revisions", headers, bytes.NewReader(b))
2452 if err != nil {
2453 return
2454 }
2455 dbx.Config.LogInfo("req: %v", req)
2456
2457 resp, err := cli.Do(req)
2458 if err != nil {
2459 return
2460 }
2461
2462 dbx.Config.LogInfo("resp: %v", resp)
2463 defer resp.Body.Close()
2464 body, err := ioutil.ReadAll(resp.Body)
2465 if err != nil {
2466 return
2467 }
2468
2469 dbx.Config.LogDebug("body: %s", body)
2470 if resp.StatusCode == http.StatusOK {
2471 err = json.Unmarshal(body, &res)
2472 if err != nil {
2473 return
2474 }
2475
2476 return
2477 }
2478 if resp.StatusCode == http.StatusConflict {
2479 var apiError ListRevisionsAPIError
2480 err = json.Unmarshal(body, &apiError)
2481 if err != nil {
2482 return
2483 }
2484 err = apiError
2485 return
2486 }
2487 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2488 if err != nil {
2489 return
2490 }
2491 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2492 return
2493 }
2494
2495 //MoveV2APIError is an error-wrapper for the move route
2496 type MoveV2APIError struct {
2497 dropbox.APIError
2498 EndpointError *RelocationError `json:"error"`
2499 }
2500
2501 func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error) {
2502 cli := dbx.Client
2503
2504 dbx.Config.LogDebug("arg: %v", arg)
2505 b, err := json.Marshal(arg)
2506 if err != nil {
2507 return
2508 }
2509
2510 headers := map[string]string{
2511 "Content-Type": "application/json",
2512 }
2513 if dbx.Config.AsMemberID != "" {
2514 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2515 }
2516
2517 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_v2", headers, bytes.NewReader(b))
2518 if err != nil {
2519 return
2520 }
2521 dbx.Config.LogInfo("req: %v", req)
2522
2523 resp, err := cli.Do(req)
2524 if err != nil {
2525 return
2526 }
2527
2528 dbx.Config.LogInfo("resp: %v", resp)
2529 defer resp.Body.Close()
2530 body, err := ioutil.ReadAll(resp.Body)
2531 if err != nil {
2532 return
2533 }
2534
2535 dbx.Config.LogDebug("body: %s", body)
2536 if resp.StatusCode == http.StatusOK {
2537 err = json.Unmarshal(body, &res)
2538 if err != nil {
2539 return
2540 }
2541
2542 return
2543 }
2544 if resp.StatusCode == http.StatusConflict {
2545 var apiError MoveAPIError
2546 err = json.Unmarshal(body, &apiError)
2547 if err != nil {
2548 return
2549 }
2550 err = apiError
2551 return
2552 }
2553 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2554 if err != nil {
2555 return
2556 }
2557 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2558 return
2559 }
2560
2561 //MoveAPIError is an error-wrapper for the move route
2562 type MoveAPIError struct {
2563 dropbox.APIError
2564 EndpointError *RelocationError `json:"error"`
2565 }
2566
2567 func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) {
2568 log.Printf("WARNING: API `Move` is deprecated")
2569 log.Printf("Use API `Move` instead")
2570
2571 cli := dbx.Client
2572
2573 dbx.Config.LogDebug("arg: %v", arg)
2574 b, err := json.Marshal(arg)
2575 if err != nil {
2576 return
2577 }
2578
2579 headers := map[string]string{
2580 "Content-Type": "application/json",
2581 }
2582 if dbx.Config.AsMemberID != "" {
2583 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2584 }
2585
2586 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move", headers, bytes.NewReader(b))
2587 if err != nil {
2588 return
2589 }
2590 dbx.Config.LogInfo("req: %v", req)
2591
2592 resp, err := cli.Do(req)
2593 if err != nil {
2594 return
2595 }
2596
2597 dbx.Config.LogInfo("resp: %v", resp)
2598 defer resp.Body.Close()
2599 body, err := ioutil.ReadAll(resp.Body)
2600 if err != nil {
2601 return
2602 }
2603
2604 dbx.Config.LogDebug("body: %s", body)
2605 if resp.StatusCode == http.StatusOK {
2606 var tmp metadataUnion
2607 err = json.Unmarshal(body, &tmp)
2608 if err != nil {
2609 return
2610 }
2611 switch tmp.Tag {
2612 case "file":
2613 res = tmp.File
2614
2615 case "folder":
2616 res = tmp.Folder
2617
2618 case "deleted":
2619 res = tmp.Deleted
2620
2621 }
2622 return
2623 }
2624 if resp.StatusCode == http.StatusConflict {
2625 var apiError MoveAPIError
2626 err = json.Unmarshal(body, &apiError)
2627 if err != nil {
2628 return
2629 }
2630 err = apiError
2631 return
2632 }
2633 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2634 if err != nil {
2635 return
2636 }
2637 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2638 return
2639 }
2640
2641 //MoveBatchV2APIError is an error-wrapper for the move_batch route
2642 type MoveBatchV2APIError struct {
2643 dropbox.APIError
2644 EndpointError struct{} `json:"error"`
2645 }
2646
2647 func (dbx *apiImpl) MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error) {
2648 cli := dbx.Client
2649
2650 dbx.Config.LogDebug("arg: %v", arg)
2651 b, err := json.Marshal(arg)
2652 if err != nil {
2653 return
2654 }
2655
2656 headers := map[string]string{
2657 "Content-Type": "application/json",
2658 }
2659 if dbx.Config.AsMemberID != "" {
2660 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2661 }
2662
2663 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch_v2", headers, bytes.NewReader(b))
2664 if err != nil {
2665 return
2666 }
2667 dbx.Config.LogInfo("req: %v", req)
2668
2669 resp, err := cli.Do(req)
2670 if err != nil {
2671 return
2672 }
2673
2674 dbx.Config.LogInfo("resp: %v", resp)
2675 defer resp.Body.Close()
2676 body, err := ioutil.ReadAll(resp.Body)
2677 if err != nil {
2678 return
2679 }
2680
2681 dbx.Config.LogDebug("body: %s", body)
2682 if resp.StatusCode == http.StatusOK {
2683 err = json.Unmarshal(body, &res)
2684 if err != nil {
2685 return
2686 }
2687
2688 return
2689 }
2690 if resp.StatusCode == http.StatusConflict {
2691 var apiError MoveBatchAPIError
2692 err = json.Unmarshal(body, &apiError)
2693 if err != nil {
2694 return
2695 }
2696 err = apiError
2697 return
2698 }
2699 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2700 if err != nil {
2701 return
2702 }
2703 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2704 return
2705 }
2706
2707 //MoveBatchAPIError is an error-wrapper for the move_batch route
2708 type MoveBatchAPIError struct {
2709 dropbox.APIError
2710 EndpointError struct{} `json:"error"`
2711 }
2712
2713 func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
2714 cli := dbx.Client
2715
2716 dbx.Config.LogDebug("arg: %v", arg)
2717 b, err := json.Marshal(arg)
2718 if err != nil {
2719 return
2720 }
2721
2722 headers := map[string]string{
2723 "Content-Type": "application/json",
2724 }
2725 if dbx.Config.AsMemberID != "" {
2726 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2727 }
2728
2729 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch", headers, bytes.NewReader(b))
2730 if err != nil {
2731 return
2732 }
2733 dbx.Config.LogInfo("req: %v", req)
2734
2735 resp, err := cli.Do(req)
2736 if err != nil {
2737 return
2738 }
2739
2740 dbx.Config.LogInfo("resp: %v", resp)
2741 defer resp.Body.Close()
2742 body, err := ioutil.ReadAll(resp.Body)
2743 if err != nil {
2744 return
2745 }
2746
2747 dbx.Config.LogDebug("body: %s", body)
2748 if resp.StatusCode == http.StatusOK {
2749 err = json.Unmarshal(body, &res)
2750 if err != nil {
2751 return
2752 }
2753
2754 return
2755 }
2756 if resp.StatusCode == http.StatusConflict {
2757 var apiError MoveBatchAPIError
2758 err = json.Unmarshal(body, &apiError)
2759 if err != nil {
2760 return
2761 }
2762 err = apiError
2763 return
2764 }
2765 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2766 if err != nil {
2767 return
2768 }
2769 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2770 return
2771 }
2772
2773 //MoveBatchCheckV2APIError is an error-wrapper for the move_batch/check route
2774 type MoveBatchCheckV2APIError struct {
2775 dropbox.APIError
2776 EndpointError *async.PollError `json:"error"`
2777 }
2778
2779 func (dbx *apiImpl) MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) {
2780 cli := dbx.Client
2781
2782 dbx.Config.LogDebug("arg: %v", arg)
2783 b, err := json.Marshal(arg)
2784 if err != nil {
2785 return
2786 }
2787
2788 headers := map[string]string{
2789 "Content-Type": "application/json",
2790 }
2791 if dbx.Config.AsMemberID != "" {
2792 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2793 }
2794
2795 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch/check_v2", headers, bytes.NewReader(b))
2796 if err != nil {
2797 return
2798 }
2799 dbx.Config.LogInfo("req: %v", req)
2800
2801 resp, err := cli.Do(req)
2802 if err != nil {
2803 return
2804 }
2805
2806 dbx.Config.LogInfo("resp: %v", resp)
2807 defer resp.Body.Close()
2808 body, err := ioutil.ReadAll(resp.Body)
2809 if err != nil {
2810 return
2811 }
2812
2813 dbx.Config.LogDebug("body: %s", body)
2814 if resp.StatusCode == http.StatusOK {
2815 err = json.Unmarshal(body, &res)
2816 if err != nil {
2817 return
2818 }
2819
2820 return
2821 }
2822 if resp.StatusCode == http.StatusConflict {
2823 var apiError MoveBatchCheckAPIError
2824 err = json.Unmarshal(body, &apiError)
2825 if err != nil {
2826 return
2827 }
2828 err = apiError
2829 return
2830 }
2831 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2832 if err != nil {
2833 return
2834 }
2835 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2836 return
2837 }
2838
2839 //MoveBatchCheckAPIError is an error-wrapper for the move_batch/check route
2840 type MoveBatchCheckAPIError struct {
2841 dropbox.APIError
2842 EndpointError *async.PollError `json:"error"`
2843 }
2844
2845 func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
2846 cli := dbx.Client
2847
2848 dbx.Config.LogDebug("arg: %v", arg)
2849 b, err := json.Marshal(arg)
2850 if err != nil {
2851 return
2852 }
2853
2854 headers := map[string]string{
2855 "Content-Type": "application/json",
2856 }
2857 if dbx.Config.AsMemberID != "" {
2858 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2859 }
2860
2861 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch/check", headers, bytes.NewReader(b))
2862 if err != nil {
2863 return
2864 }
2865 dbx.Config.LogInfo("req: %v", req)
2866
2867 resp, err := cli.Do(req)
2868 if err != nil {
2869 return
2870 }
2871
2872 dbx.Config.LogInfo("resp: %v", resp)
2873 defer resp.Body.Close()
2874 body, err := ioutil.ReadAll(resp.Body)
2875 if err != nil {
2876 return
2877 }
2878
2879 dbx.Config.LogDebug("body: %s", body)
2880 if resp.StatusCode == http.StatusOK {
2881 err = json.Unmarshal(body, &res)
2882 if err != nil {
2883 return
2884 }
2885
2886 return
2887 }
2888 if resp.StatusCode == http.StatusConflict {
2889 var apiError MoveBatchCheckAPIError
2890 err = json.Unmarshal(body, &apiError)
2891 if err != nil {
2892 return
2893 }
2894 err = apiError
2895 return
2896 }
2897 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2898 if err != nil {
2899 return
2900 }
2901 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2902 return
2903 }
2904
2905 //PermanentlyDeleteAPIError is an error-wrapper for the permanently_delete route
2906 type PermanentlyDeleteAPIError struct {
2907 dropbox.APIError
2908 EndpointError *DeleteError `json:"error"`
2909 }
2910
2911 func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
2912 cli := dbx.Client
2913
2914 dbx.Config.LogDebug("arg: %v", arg)
2915 b, err := json.Marshal(arg)
2916 if err != nil {
2917 return
2918 }
2919
2920 headers := map[string]string{
2921 "Content-Type": "application/json",
2922 }
2923 if dbx.Config.AsMemberID != "" {
2924 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2925 }
2926
2927 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "permanently_delete", headers, bytes.NewReader(b))
2928 if err != nil {
2929 return
2930 }
2931 dbx.Config.LogInfo("req: %v", req)
2932
2933 resp, err := cli.Do(req)
2934 if err != nil {
2935 return
2936 }
2937
2938 dbx.Config.LogInfo("resp: %v", resp)
2939 defer resp.Body.Close()
2940 body, err := ioutil.ReadAll(resp.Body)
2941 if err != nil {
2942 return
2943 }
2944
2945 dbx.Config.LogDebug("body: %s", body)
2946 if resp.StatusCode == http.StatusOK {
2947 return
2948 }
2949 if resp.StatusCode == http.StatusConflict {
2950 var apiError PermanentlyDeleteAPIError
2951 err = json.Unmarshal(body, &apiError)
2952 if err != nil {
2953 return
2954 }
2955 err = apiError
2956 return
2957 }
2958 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2959 if err != nil {
2960 return
2961 }
2962 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2963 return
2964 }
2965
2966 //PropertiesAddAPIError is an error-wrapper for the properties/add route
2967 type PropertiesAddAPIError struct {
2968 dropbox.APIError
2969 EndpointError *file_properties.AddPropertiesError `json:"error"`
2970 }
2971
2972 func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error) {
2973 log.Printf("WARNING: API `PropertiesAdd` is deprecated")
2974
2975 cli := dbx.Client
2976
2977 dbx.Config.LogDebug("arg: %v", arg)
2978 b, err := json.Marshal(arg)
2979 if err != nil {
2980 return
2981 }
2982
2983 headers := map[string]string{
2984 "Content-Type": "application/json",
2985 }
2986 if dbx.Config.AsMemberID != "" {
2987 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2988 }
2989
2990 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/add", headers, bytes.NewReader(b))
2991 if err != nil {
2992 return
2993 }
2994 dbx.Config.LogInfo("req: %v", req)
2995
2996 resp, err := cli.Do(req)
2997 if err != nil {
2998 return
2999 }
3000
3001 dbx.Config.LogInfo("resp: %v", resp)
3002 defer resp.Body.Close()
3003 body, err := ioutil.ReadAll(resp.Body)
3004 if err != nil {
3005 return
3006 }
3007
3008 dbx.Config.LogDebug("body: %s", body)
3009 if resp.StatusCode == http.StatusOK {
3010 return
3011 }
3012 if resp.StatusCode == http.StatusConflict {
3013 var apiError PropertiesAddAPIError
3014 err = json.Unmarshal(body, &apiError)
3015 if err != nil {
3016 return
3017 }
3018 err = apiError
3019 return
3020 }
3021 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3022 if err != nil {
3023 return
3024 }
3025 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3026 return
3027 }
3028
3029 //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route
3030 type PropertiesOverwriteAPIError struct {
3031 dropbox.APIError
3032 EndpointError *file_properties.InvalidPropertyGroupError `json:"error"`
3033 }
3034
3035 func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error) {
3036 log.Printf("WARNING: API `PropertiesOverwrite` is deprecated")
3037
3038 cli := dbx.Client
3039
3040 dbx.Config.LogDebug("arg: %v", arg)
3041 b, err := json.Marshal(arg)
3042 if err != nil {
3043 return
3044 }
3045
3046 headers := map[string]string{
3047 "Content-Type": "application/json",
3048 }
3049 if dbx.Config.AsMemberID != "" {
3050 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3051 }
3052
3053 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/overwrite", headers, bytes.NewReader(b))
3054 if err != nil {
3055 return
3056 }
3057 dbx.Config.LogInfo("req: %v", req)
3058
3059 resp, err := cli.Do(req)
3060 if err != nil {
3061 return
3062 }
3063
3064 dbx.Config.LogInfo("resp: %v", resp)
3065 defer resp.Body.Close()
3066 body, err := ioutil.ReadAll(resp.Body)
3067 if err != nil {
3068 return
3069 }
3070
3071 dbx.Config.LogDebug("body: %s", body)
3072 if resp.StatusCode == http.StatusOK {
3073 return
3074 }
3075 if resp.StatusCode == http.StatusConflict {
3076 var apiError PropertiesOverwriteAPIError
3077 err = json.Unmarshal(body, &apiError)
3078 if err != nil {
3079 return
3080 }
3081 err = apiError
3082 return
3083 }
3084 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3085 if err != nil {
3086 return
3087 }
3088 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3089 return
3090 }
3091
3092 //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route
3093 type PropertiesRemoveAPIError struct {
3094 dropbox.APIError
3095 EndpointError *file_properties.RemovePropertiesError `json:"error"`
3096 }
3097
3098 func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error) {
3099 log.Printf("WARNING: API `PropertiesRemove` is deprecated")
3100
3101 cli := dbx.Client
3102
3103 dbx.Config.LogDebug("arg: %v", arg)
3104 b, err := json.Marshal(arg)
3105 if err != nil {
3106 return
3107 }
3108
3109 headers := map[string]string{
3110 "Content-Type": "application/json",
3111 }
3112 if dbx.Config.AsMemberID != "" {
3113 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3114 }
3115
3116 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/remove", headers, bytes.NewReader(b))
3117 if err != nil {
3118 return
3119 }
3120 dbx.Config.LogInfo("req: %v", req)
3121
3122 resp, err := cli.Do(req)
3123 if err != nil {
3124 return
3125 }
3126
3127 dbx.Config.LogInfo("resp: %v", resp)
3128 defer resp.Body.Close()
3129 body, err := ioutil.ReadAll(resp.Body)
3130 if err != nil {
3131 return
3132 }
3133
3134 dbx.Config.LogDebug("body: %s", body)
3135 if resp.StatusCode == http.StatusOK {
3136 return
3137 }
3138 if resp.StatusCode == http.StatusConflict {
3139 var apiError PropertiesRemoveAPIError
3140 err = json.Unmarshal(body, &apiError)
3141 if err != nil {
3142 return
3143 }
3144 err = apiError
3145 return
3146 }
3147 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3148 if err != nil {
3149 return
3150 }
3151 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3152 return
3153 }
3154
3155 //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route
3156 type PropertiesTemplateGetAPIError struct {
3157 dropbox.APIError
3158 EndpointError *file_properties.TemplateError `json:"error"`
3159 }
3160
3161 func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) {
3162 log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated")
3163
3164 cli := dbx.Client
3165
3166 dbx.Config.LogDebug("arg: %v", arg)
3167 b, err := json.Marshal(arg)
3168 if err != nil {
3169 return
3170 }
3171
3172 headers := map[string]string{
3173 "Content-Type": "application/json",
3174 }
3175 if dbx.Config.AsMemberID != "" {
3176 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3177 }
3178
3179 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/template/get", headers, bytes.NewReader(b))
3180 if err != nil {
3181 return
3182 }
3183 dbx.Config.LogInfo("req: %v", req)
3184
3185 resp, err := cli.Do(req)
3186 if err != nil {
3187 return
3188 }
3189
3190 dbx.Config.LogInfo("resp: %v", resp)
3191 defer resp.Body.Close()
3192 body, err := ioutil.ReadAll(resp.Body)
3193 if err != nil {
3194 return
3195 }
3196
3197 dbx.Config.LogDebug("body: %s", body)
3198 if resp.StatusCode == http.StatusOK {
3199 err = json.Unmarshal(body, &res)
3200 if err != nil {
3201 return
3202 }
3203
3204 return
3205 }
3206 if resp.StatusCode == http.StatusConflict {
3207 var apiError PropertiesTemplateGetAPIError
3208 err = json.Unmarshal(body, &apiError)
3209 if err != nil {
3210 return
3211 }
3212 err = apiError
3213 return
3214 }
3215 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3216 if err != nil {
3217 return
3218 }
3219 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3220 return
3221 }
3222
3223 //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route
3224 type PropertiesTemplateListAPIError struct {
3225 dropbox.APIError
3226 EndpointError *file_properties.TemplateError `json:"error"`
3227 }
3228
3229 func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) {
3230 log.Printf("WARNING: API `PropertiesTemplateList` is deprecated")
3231
3232 cli := dbx.Client
3233
3234 headers := map[string]string{}
3235 if dbx.Config.AsMemberID != "" {
3236 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3237 }
3238
3239 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/template/list", headers, nil)
3240 if err != nil {
3241 return
3242 }
3243 dbx.Config.LogInfo("req: %v", req)
3244
3245 resp, err := cli.Do(req)
3246 if err != nil {
3247 return
3248 }
3249
3250 dbx.Config.LogInfo("resp: %v", resp)
3251 defer resp.Body.Close()
3252 body, err := ioutil.ReadAll(resp.Body)
3253 if err != nil {
3254 return
3255 }
3256
3257 dbx.Config.LogDebug("body: %s", body)
3258 if resp.StatusCode == http.StatusOK {
3259 err = json.Unmarshal(body, &res)
3260 if err != nil {
3261 return
3262 }
3263
3264 return
3265 }
3266 if resp.StatusCode == http.StatusConflict {
3267 var apiError PropertiesTemplateListAPIError
3268 err = json.Unmarshal(body, &apiError)
3269 if err != nil {
3270 return
3271 }
3272 err = apiError
3273 return
3274 }
3275 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3276 if err != nil {
3277 return
3278 }
3279 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3280 return
3281 }
3282
3283 //PropertiesUpdateAPIError is an error-wrapper for the properties/update route
3284 type PropertiesUpdateAPIError struct {
3285 dropbox.APIError
3286 EndpointError *file_properties.UpdatePropertiesError `json:"error"`
3287 }
3288
3289 func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error) {
3290 log.Printf("WARNING: API `PropertiesUpdate` is deprecated")
3291
3292 cli := dbx.Client
3293
3294 dbx.Config.LogDebug("arg: %v", arg)
3295 b, err := json.Marshal(arg)
3296 if err != nil {
3297 return
3298 }
3299
3300 headers := map[string]string{
3301 "Content-Type": "application/json",
3302 }
3303 if dbx.Config.AsMemberID != "" {
3304 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3305 }
3306
3307 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/update", headers, bytes.NewReader(b))
3308 if err != nil {
3309 return
3310 }
3311 dbx.Config.LogInfo("req: %v", req)
3312
3313 resp, err := cli.Do(req)
3314 if err != nil {
3315 return
3316 }
3317
3318 dbx.Config.LogInfo("resp: %v", resp)
3319 defer resp.Body.Close()
3320 body, err := ioutil.ReadAll(resp.Body)
3321 if err != nil {
3322 return
3323 }
3324
3325 dbx.Config.LogDebug("body: %s", body)
3326 if resp.StatusCode == http.StatusOK {
3327 return
3328 }
3329 if resp.StatusCode == http.StatusConflict {
3330 var apiError PropertiesUpdateAPIError
3331 err = json.Unmarshal(body, &apiError)
3332 if err != nil {
3333 return
3334 }
3335 err = apiError
3336 return
3337 }
3338 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3339 if err != nil {
3340 return
3341 }
3342 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3343 return
3344 }
3345
3346 //RestoreAPIError is an error-wrapper for the restore route
3347 type RestoreAPIError struct {
3348 dropbox.APIError
3349 EndpointError *RestoreError `json:"error"`
3350 }
3351
3352 func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) {
3353 cli := dbx.Client
3354
3355 dbx.Config.LogDebug("arg: %v", arg)
3356 b, err := json.Marshal(arg)
3357 if err != nil {
3358 return
3359 }
3360
3361 headers := map[string]string{
3362 "Content-Type": "application/json",
3363 }
3364 if dbx.Config.AsMemberID != "" {
3365 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3366 }
3367
3368 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "restore", headers, bytes.NewReader(b))
3369 if err != nil {
3370 return
3371 }
3372 dbx.Config.LogInfo("req: %v", req)
3373
3374 resp, err := cli.Do(req)
3375 if err != nil {
3376 return
3377 }
3378
3379 dbx.Config.LogInfo("resp: %v", resp)
3380 defer resp.Body.Close()
3381 body, err := ioutil.ReadAll(resp.Body)
3382 if err != nil {
3383 return
3384 }
3385
3386 dbx.Config.LogDebug("body: %s", body)
3387 if resp.StatusCode == http.StatusOK {
3388 err = json.Unmarshal(body, &res)
3389 if err != nil {
3390 return
3391 }
3392
3393 return
3394 }
3395 if resp.StatusCode == http.StatusConflict {
3396 var apiError RestoreAPIError
3397 err = json.Unmarshal(body, &apiError)
3398 if err != nil {
3399 return
3400 }
3401 err = apiError
3402 return
3403 }
3404 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3405 if err != nil {
3406 return
3407 }
3408 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3409 return
3410 }
3411
3412 //SaveUrlAPIError is an error-wrapper for the save_url route
3413 type SaveUrlAPIError struct {
3414 dropbox.APIError
3415 EndpointError *SaveUrlError `json:"error"`
3416 }
3417
3418 func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) {
3419 cli := dbx.Client
3420
3421 dbx.Config.LogDebug("arg: %v", arg)
3422 b, err := json.Marshal(arg)
3423 if err != nil {
3424 return
3425 }
3426
3427 headers := map[string]string{
3428 "Content-Type": "application/json",
3429 }
3430 if dbx.Config.AsMemberID != "" {
3431 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3432 }
3433
3434 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "save_url", headers, bytes.NewReader(b))
3435 if err != nil {
3436 return
3437 }
3438 dbx.Config.LogInfo("req: %v", req)
3439
3440 resp, err := cli.Do(req)
3441 if err != nil {
3442 return
3443 }
3444
3445 dbx.Config.LogInfo("resp: %v", resp)
3446 defer resp.Body.Close()
3447 body, err := ioutil.ReadAll(resp.Body)
3448 if err != nil {
3449 return
3450 }
3451
3452 dbx.Config.LogDebug("body: %s", body)
3453 if resp.StatusCode == http.StatusOK {
3454 err = json.Unmarshal(body, &res)
3455 if err != nil {
3456 return
3457 }
3458
3459 return
3460 }
3461 if resp.StatusCode == http.StatusConflict {
3462 var apiError SaveUrlAPIError
3463 err = json.Unmarshal(body, &apiError)
3464 if err != nil {
3465 return
3466 }
3467 err = apiError
3468 return
3469 }
3470 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3471 if err != nil {
3472 return
3473 }
3474 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3475 return
3476 }
3477
3478 //SaveUrlCheckJobStatusAPIError is an error-wrapper for the save_url/check_job_status route
3479 type SaveUrlCheckJobStatusAPIError struct {
3480 dropbox.APIError
3481 EndpointError *async.PollError `json:"error"`
3482 }
3483
3484 func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error) {
3485 cli := dbx.Client
3486
3487 dbx.Config.LogDebug("arg: %v", arg)
3488 b, err := json.Marshal(arg)
3489 if err != nil {
3490 return
3491 }
3492
3493 headers := map[string]string{
3494 "Content-Type": "application/json",
3495 }
3496 if dbx.Config.AsMemberID != "" {
3497 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3498 }
3499
3500 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "save_url/check_job_status", headers, bytes.NewReader(b))
3501 if err != nil {
3502 return
3503 }
3504 dbx.Config.LogInfo("req: %v", req)
3505
3506 resp, err := cli.Do(req)
3507 if err != nil {
3508 return
3509 }
3510
3511 dbx.Config.LogInfo("resp: %v", resp)
3512 defer resp.Body.Close()
3513 body, err := ioutil.ReadAll(resp.Body)
3514 if err != nil {
3515 return
3516 }
3517
3518 dbx.Config.LogDebug("body: %s", body)
3519 if resp.StatusCode == http.StatusOK {
3520 err = json.Unmarshal(body, &res)
3521 if err != nil {
3522 return
3523 }
3524
3525 return
3526 }
3527 if resp.StatusCode == http.StatusConflict {
3528 var apiError SaveUrlCheckJobStatusAPIError
3529 err = json.Unmarshal(body, &apiError)
3530 if err != nil {
3531 return
3532 }
3533 err = apiError
3534 return
3535 }
3536 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3537 if err != nil {
3538 return
3539 }
3540 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3541 return
3542 }
3543
3544 //SearchAPIError is an error-wrapper for the search route
3545 type SearchAPIError struct {
3546 dropbox.APIError
3547 EndpointError *SearchError `json:"error"`
3548 }
3549
3550 func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) {
3551 cli := dbx.Client
3552
3553 dbx.Config.LogDebug("arg: %v", arg)
3554 b, err := json.Marshal(arg)
3555 if err != nil {
3556 return
3557 }
3558
3559 headers := map[string]string{
3560 "Content-Type": "application/json",
3561 }
3562 if dbx.Config.AsMemberID != "" {
3563 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3564 }
3565
3566 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "search", headers, bytes.NewReader(b))
3567 if err != nil {
3568 return
3569 }
3570 dbx.Config.LogInfo("req: %v", req)
3571
3572 resp, err := cli.Do(req)
3573 if err != nil {
3574 return
3575 }
3576
3577 dbx.Config.LogInfo("resp: %v", resp)
3578 defer resp.Body.Close()
3579 body, err := ioutil.ReadAll(resp.Body)
3580 if err != nil {
3581 return
3582 }
3583
3584 dbx.Config.LogDebug("body: %s", body)
3585 if resp.StatusCode == http.StatusOK {
3586 err = json.Unmarshal(body, &res)
3587 if err != nil {
3588 return
3589 }
3590
3591 return
3592 }
3593 if resp.StatusCode == http.StatusConflict {
3594 var apiError SearchAPIError
3595 err = json.Unmarshal(body, &apiError)
3596 if err != nil {
3597 return
3598 }
3599 err = apiError
3600 return
3601 }
3602 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3603 if err != nil {
3604 return
3605 }
3606 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3607 return
3608 }
3609
3610 //UploadAPIError is an error-wrapper for the upload route
3611 type UploadAPIError struct {
3612 dropbox.APIError
3613 EndpointError *UploadError `json:"error"`
3614 }
3615
3616 func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error) {
3617 cli := dbx.Client
3618
3619 dbx.Config.LogDebug("arg: %v", arg)
3620 b, err := json.Marshal(arg)
3621 if err != nil {
3622 return
3623 }
3624
3625 headers := map[string]string{
3626 "Content-Type": "application/octet-stream",
3627 "Dropbox-API-Arg": string(b),
3628 }
3629 if dbx.Config.AsMemberID != "" {
3630 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3631 }
3632
3633 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload", headers, content)
3634 if err != nil {
3635 return
3636 }
3637 dbx.Config.LogInfo("req: %v", req)
3638
3639 resp, err := cli.Do(req)
3640 if err != nil {
3641 return
3642 }
3643
3644 dbx.Config.LogInfo("resp: %v", resp)
3645 defer resp.Body.Close()
3646 body, err := ioutil.ReadAll(resp.Body)
3647 if err != nil {
3648 return
3649 }
3650
3651 dbx.Config.LogDebug("body: %s", body)
3652 if resp.StatusCode == http.StatusOK {
3653 err = json.Unmarshal(body, &res)
3654 if err != nil {
3655 return
3656 }
3657
3658 return
3659 }
3660 if resp.StatusCode == http.StatusConflict {
3661 var apiError UploadAPIError
3662 err = json.Unmarshal(body, &apiError)
3663 if err != nil {
3664 return
3665 }
3666 err = apiError
3667 return
3668 }
3669 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3670 if err != nil {
3671 return
3672 }
3673 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3674 return
3675 }
3676
3677 //UploadSessionAppendV2APIError is an error-wrapper for the upload_session/append route
3678 type UploadSessionAppendV2APIError struct {
3679 dropbox.APIError
3680 EndpointError *UploadSessionLookupError `json:"error"`
3681 }
3682
3683 func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error) {
3684 cli := dbx.Client
3685
3686 dbx.Config.LogDebug("arg: %v", arg)
3687 b, err := json.Marshal(arg)
3688 if err != nil {
3689 return
3690 }
3691
3692 headers := map[string]string{
3693 "Content-Type": "application/octet-stream",
3694 "Dropbox-API-Arg": string(b),
3695 }
3696 if dbx.Config.AsMemberID != "" {
3697 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3698 }
3699
3700 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/append_v2", headers, content)
3701 if err != nil {
3702 return
3703 }
3704 dbx.Config.LogInfo("req: %v", req)
3705
3706 resp, err := cli.Do(req)
3707 if err != nil {
3708 return
3709 }
3710
3711 dbx.Config.LogInfo("resp: %v", resp)
3712 defer resp.Body.Close()
3713 body, err := ioutil.ReadAll(resp.Body)
3714 if err != nil {
3715 return
3716 }
3717
3718 dbx.Config.LogDebug("body: %s", body)
3719 if resp.StatusCode == http.StatusOK {
3720 return
3721 }
3722 if resp.StatusCode == http.StatusConflict {
3723 var apiError UploadSessionAppendAPIError
3724 err = json.Unmarshal(body, &apiError)
3725 if err != nil {
3726 return
3727 }
3728 err = apiError
3729 return
3730 }
3731 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3732 if err != nil {
3733 return
3734 }
3735 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3736 return
3737 }
3738
3739 //UploadSessionAppendAPIError is an error-wrapper for the upload_session/append route
3740 type UploadSessionAppendAPIError struct {
3741 dropbox.APIError
3742 EndpointError *UploadSessionLookupError `json:"error"`
3743 }
3744
3745 func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error) {
3746 log.Printf("WARNING: API `UploadSessionAppend` is deprecated")
3747 log.Printf("Use API `UploadSessionAppend` instead")
3748
3749 cli := dbx.Client
3750
3751 dbx.Config.LogDebug("arg: %v", arg)
3752 b, err := json.Marshal(arg)
3753 if err != nil {
3754 return
3755 }
3756
3757 headers := map[string]string{
3758 "Content-Type": "application/octet-stream",
3759 "Dropbox-API-Arg": string(b),
3760 }
3761 if dbx.Config.AsMemberID != "" {
3762 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3763 }
3764
3765 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/append", headers, content)
3766 if err != nil {
3767 return
3768 }
3769 dbx.Config.LogInfo("req: %v", req)
3770
3771 resp, err := cli.Do(req)
3772 if err != nil {
3773 return
3774 }
3775
3776 dbx.Config.LogInfo("resp: %v", resp)
3777 defer resp.Body.Close()
3778 body, err := ioutil.ReadAll(resp.Body)
3779 if err != nil {
3780 return
3781 }
3782
3783 dbx.Config.LogDebug("body: %s", body)
3784 if resp.StatusCode == http.StatusOK {
3785 return
3786 }
3787 if resp.StatusCode == http.StatusConflict {
3788 var apiError UploadSessionAppendAPIError
3789 err = json.Unmarshal(body, &apiError)
3790 if err != nil {
3791 return
3792 }
3793 err = apiError
3794 return
3795 }
3796 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3797 if err != nil {
3798 return
3799 }
3800 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3801 return
3802 }
3803
3804 //UploadSessionFinishAPIError is an error-wrapper for the upload_session/finish route
3805 type UploadSessionFinishAPIError struct {
3806 dropbox.APIError
3807 EndpointError *UploadSessionFinishError `json:"error"`
3808 }
3809
3810 func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error) {
3811 cli := dbx.Client
3812
3813 dbx.Config.LogDebug("arg: %v", arg)
3814 b, err := json.Marshal(arg)
3815 if err != nil {
3816 return
3817 }
3818
3819 headers := map[string]string{
3820 "Content-Type": "application/octet-stream",
3821 "Dropbox-API-Arg": string(b),
3822 }
3823 if dbx.Config.AsMemberID != "" {
3824 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3825 }
3826
3827 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/finish", headers, content)
3828 if err != nil {
3829 return
3830 }
3831 dbx.Config.LogInfo("req: %v", req)
3832
3833 resp, err := cli.Do(req)
3834 if err != nil {
3835 return
3836 }
3837
3838 dbx.Config.LogInfo("resp: %v", resp)
3839 defer resp.Body.Close()
3840 body, err := ioutil.ReadAll(resp.Body)
3841 if err != nil {
3842 return
3843 }
3844
3845 dbx.Config.LogDebug("body: %s", body)
3846 if resp.StatusCode == http.StatusOK {
3847 err = json.Unmarshal(body, &res)
3848 if err != nil {
3849 return
3850 }
3851
3852 return
3853 }
3854 if resp.StatusCode == http.StatusConflict {
3855 var apiError UploadSessionFinishAPIError
3856 err = json.Unmarshal(body, &apiError)
3857 if err != nil {
3858 return
3859 }
3860 err = apiError
3861 return
3862 }
3863 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3864 if err != nil {
3865 return
3866 }
3867 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3868 return
3869 }
3870
3871 //UploadSessionFinishBatchAPIError is an error-wrapper for the upload_session/finish_batch route
3872 type UploadSessionFinishBatchAPIError struct {
3873 dropbox.APIError
3874 EndpointError struct{} `json:"error"`
3875 }
3876
3877 func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error) {
3878 cli := dbx.Client
3879
3880 dbx.Config.LogDebug("arg: %v", arg)
3881 b, err := json.Marshal(arg)
3882 if err != nil {
3883 return
3884 }
3885
3886 headers := map[string]string{
3887 "Content-Type": "application/json",
3888 }
3889 if dbx.Config.AsMemberID != "" {
3890 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3891 }
3892
3893 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "upload_session/finish_batch", headers, bytes.NewReader(b))
3894 if err != nil {
3895 return
3896 }
3897 dbx.Config.LogInfo("req: %v", req)
3898
3899 resp, err := cli.Do(req)
3900 if err != nil {
3901 return
3902 }
3903
3904 dbx.Config.LogInfo("resp: %v", resp)
3905 defer resp.Body.Close()
3906 body, err := ioutil.ReadAll(resp.Body)
3907 if err != nil {
3908 return
3909 }
3910
3911 dbx.Config.LogDebug("body: %s", body)
3912 if resp.StatusCode == http.StatusOK {
3913 err = json.Unmarshal(body, &res)
3914 if err != nil {
3915 return
3916 }
3917
3918 return
3919 }
3920 if resp.StatusCode == http.StatusConflict {
3921 var apiError UploadSessionFinishBatchAPIError
3922 err = json.Unmarshal(body, &apiError)
3923 if err != nil {
3924 return
3925 }
3926 err = apiError
3927 return
3928 }
3929 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3930 if err != nil {
3931 return
3932 }
3933 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3934 return
3935 }
3936
3937 //UploadSessionFinishBatchCheckAPIError is an error-wrapper for the upload_session/finish_batch/check route
3938 type UploadSessionFinishBatchCheckAPIError struct {
3939 dropbox.APIError
3940 EndpointError *async.PollError `json:"error"`
3941 }
3942
3943 func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error) {
3944 cli := dbx.Client
3945
3946 dbx.Config.LogDebug("arg: %v", arg)
3947 b, err := json.Marshal(arg)
3948 if err != nil {
3949 return
3950 }
3951
3952 headers := map[string]string{
3953 "Content-Type": "application/json",
3954 }
3955 if dbx.Config.AsMemberID != "" {
3956 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3957 }
3958
3959 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "upload_session/finish_batch/check", headers, bytes.NewReader(b))
3960 if err != nil {
3961 return
3962 }
3963 dbx.Config.LogInfo("req: %v", req)
3964
3965 resp, err := cli.Do(req)
3966 if err != nil {
3967 return
3968 }
3969
3970 dbx.Config.LogInfo("resp: %v", resp)
3971 defer resp.Body.Close()
3972 body, err := ioutil.ReadAll(resp.Body)
3973 if err != nil {
3974 return
3975 }
3976
3977 dbx.Config.LogDebug("body: %s", body)
3978 if resp.StatusCode == http.StatusOK {
3979 err = json.Unmarshal(body, &res)
3980 if err != nil {
3981 return
3982 }
3983
3984 return
3985 }
3986 if resp.StatusCode == http.StatusConflict {
3987 var apiError UploadSessionFinishBatchCheckAPIError
3988 err = json.Unmarshal(body, &apiError)
3989 if err != nil {
3990 return
3991 }
3992 err = apiError
3993 return
3994 }
3995 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3996 if err != nil {
3997 return
3998 }
3999 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4000 return
4001 }
4002
4003 //UploadSessionStartAPIError is an error-wrapper for the upload_session/start route
4004 type UploadSessionStartAPIError struct {
4005 dropbox.APIError
4006 EndpointError struct{} `json:"error"`
4007 }
4008
4009 func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error) {
4010 cli := dbx.Client
4011
4012 dbx.Config.LogDebug("arg: %v", arg)
4013 b, err := json.Marshal(arg)
4014 if err != nil {
4015 return
4016 }
4017
4018 headers := map[string]string{
4019 "Content-Type": "application/octet-stream",
4020 "Dropbox-API-Arg": string(b),
4021 }
4022 if dbx.Config.AsMemberID != "" {
4023 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
4024 }
4025
4026 req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/start", headers, content)
4027 if err != nil {
4028 return
4029 }
4030 dbx.Config.LogInfo("req: %v", req)
4031
4032 resp, err := cli.Do(req)
4033 if err != nil {
4034 return
4035 }
4036
4037 dbx.Config.LogInfo("resp: %v", resp)
4038 defer resp.Body.Close()
4039 body, err := ioutil.ReadAll(resp.Body)
4040 if err != nil {
4041 return
4042 }
4043
4044 dbx.Config.LogDebug("body: %s", body)
4045 if resp.StatusCode == http.StatusOK {
4046 err = json.Unmarshal(body, &res)
4047 if err != nil {
4048 return
4049 }
4050
4051 return
4052 }
4053 if resp.StatusCode == http.StatusConflict {
4054 var apiError UploadSessionStartAPIError
4055 err = json.Unmarshal(body, &apiError)
4056 if err != nil {
4057 return
4058 }
4059 err = apiError
4060 return
4061 }
4062 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4063 if err != nil {
4064 return
4065 }
4066 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4067 return
4068 }
4069
4070 // New returns a Client implementation for this namespace
4071 func New(c dropbox.Config) Client {
4072 ctx := apiImpl(dropbox.NewContext(c))
4073 return &ctx
4074 }
+0
-4048
dropbox/files/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package files : This namespace contains endpoints and data types for basic
21 // file operations.
22 package files
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
30 )
31
32 // GetMetadataArg : has no documentation (yet)
33 type GetMetadataArg struct {
34 // Path : The path of a file or folder on Dropbox.
35 Path string `json:"path"`
36 // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo
37 // and video.
38 IncludeMediaInfo bool `json:"include_media_info"`
39 // IncludeDeleted : If true, `DeletedMetadata` will be returned for deleted
40 // file or folder, otherwise `LookupError.not_found` will be returned.
41 IncludeDeleted bool `json:"include_deleted"`
42 // IncludeHasExplicitSharedMembers : If true, the results will include a
43 // flag for each file indicating whether or not that file has any explicit
44 // members.
45 IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
46 // IncludePropertyGroups : If set to a valid list of template IDs,
47 // `FileMetadata.property_groups` is set if there exists property data
48 // associated with the file and each of the listed templates.
49 IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
50 }
51
52 // NewGetMetadataArg returns a new GetMetadataArg instance
53 func NewGetMetadataArg(Path string) *GetMetadataArg {
54 s := new(GetMetadataArg)
55 s.Path = Path
56 s.IncludeMediaInfo = false
57 s.IncludeDeleted = false
58 s.IncludeHasExplicitSharedMembers = false
59 return s
60 }
61
62 // AlphaGetMetadataArg : has no documentation (yet)
63 type AlphaGetMetadataArg struct {
64 GetMetadataArg
65 // IncludePropertyTemplates : If set to a valid list of template IDs,
66 // `FileMetadata.property_groups` is set for files with custom properties.
67 IncludePropertyTemplates []string `json:"include_property_templates,omitempty"`
68 }
69
70 // NewAlphaGetMetadataArg returns a new AlphaGetMetadataArg instance
71 func NewAlphaGetMetadataArg(Path string) *AlphaGetMetadataArg {
72 s := new(AlphaGetMetadataArg)
73 s.Path = Path
74 s.IncludeMediaInfo = false
75 s.IncludeDeleted = false
76 s.IncludeHasExplicitSharedMembers = false
77 return s
78 }
79
80 // GetMetadataError : has no documentation (yet)
81 type GetMetadataError struct {
82 dropbox.Tagged
83 // Path : has no documentation (yet)
84 Path *LookupError `json:"path,omitempty"`
85 }
86
87 // Valid tag values for GetMetadataError
88 const (
89 GetMetadataErrorPath = "path"
90 )
91
92 // UnmarshalJSON deserializes into a GetMetadataError instance
93 func (u *GetMetadataError) UnmarshalJSON(body []byte) error {
94 type wrap struct {
95 dropbox.Tagged
96 // Path : has no documentation (yet)
97 Path json.RawMessage `json:"path,omitempty"`
98 }
99 var w wrap
100 var err error
101 if err = json.Unmarshal(body, &w); err != nil {
102 return err
103 }
104 u.Tag = w.Tag
105 switch u.Tag {
106 case "path":
107 err = json.Unmarshal(w.Path, &u.Path)
108
109 if err != nil {
110 return err
111 }
112 }
113 return nil
114 }
115
116 // AlphaGetMetadataError : has no documentation (yet)
117 type AlphaGetMetadataError struct {
118 dropbox.Tagged
119 // Path : has no documentation (yet)
120 Path *LookupError `json:"path,omitempty"`
121 // PropertiesError : has no documentation (yet)
122 PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
123 }
124
125 // Valid tag values for AlphaGetMetadataError
126 const (
127 AlphaGetMetadataErrorPath = "path"
128 AlphaGetMetadataErrorPropertiesError = "properties_error"
129 )
130
131 // UnmarshalJSON deserializes into a AlphaGetMetadataError instance
132 func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
133 type wrap struct {
134 dropbox.Tagged
135 // Path : has no documentation (yet)
136 Path json.RawMessage `json:"path,omitempty"`
137 // PropertiesError : has no documentation (yet)
138 PropertiesError json.RawMessage `json:"properties_error,omitempty"`
139 }
140 var w wrap
141 var err error
142 if err = json.Unmarshal(body, &w); err != nil {
143 return err
144 }
145 u.Tag = w.Tag
146 switch u.Tag {
147 case "path":
148 err = json.Unmarshal(w.Path, &u.Path)
149
150 if err != nil {
151 return err
152 }
153 case "properties_error":
154 err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
155
156 if err != nil {
157 return err
158 }
159 }
160 return nil
161 }
162
163 // CommitInfo : has no documentation (yet)
164 type CommitInfo struct {
165 // Path : Path in the user's Dropbox to save the file.
166 Path string `json:"path"`
167 // Mode : Selects what to do if the file already exists.
168 Mode *WriteMode `json:"mode"`
169 // Autorename : If there's a conflict, as determined by `mode`, have the
170 // Dropbox server try to autorename the file to avoid conflict.
171 Autorename bool `json:"autorename"`
172 // ClientModified : The value to store as the `client_modified` timestamp.
173 // Dropbox automatically records the time at which the file was written to
174 // the Dropbox servers. It can also record an additional timestamp, provided
175 // by Dropbox desktop clients, mobile clients, and API apps of when the file
176 // was actually created or modified.
177 ClientModified time.Time `json:"client_modified,omitempty"`
178 // Mute : Normally, users are made aware of any file modifications in their
179 // Dropbox account via notifications in the client software. If true, this
180 // tells the clients that this modification shouldn't result in a user
181 // notification.
182 Mute bool `json:"mute"`
183 // PropertyGroups : List of custom properties to add to file.
184 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
185 // StrictConflict : Be more strict about how each `WriteMode` detects
186 // conflict. For example, always return a conflict error when `mode` =
187 // `WriteMode.update` and the given "rev" doesn't match the existing file's
188 // "rev", even if the existing file has been deleted.
189 StrictConflict bool `json:"strict_conflict"`
190 }
191
192 // NewCommitInfo returns a new CommitInfo instance
193 func NewCommitInfo(Path string) *CommitInfo {
194 s := new(CommitInfo)
195 s.Path = Path
196 s.Mode = &WriteMode{Tagged: dropbox.Tagged{"add"}}
197 s.Autorename = false
198 s.Mute = false
199 s.StrictConflict = false
200 return s
201 }
202
203 // CommitInfoWithProperties : has no documentation (yet)
204 type CommitInfoWithProperties struct {
205 CommitInfo
206 }
207
208 // NewCommitInfoWithProperties returns a new CommitInfoWithProperties instance
209 func NewCommitInfoWithProperties(Path string) *CommitInfoWithProperties {
210 s := new(CommitInfoWithProperties)
211 s.Path = Path
212 s.Mode = &WriteMode{Tagged: dropbox.Tagged{"add"}}
213 s.Autorename = false
214 s.Mute = false
215 s.StrictConflict = false
216 return s
217 }
218
219 // ContentSyncSetting : has no documentation (yet)
220 type ContentSyncSetting struct {
221 // Id : Id of the item this setting is applied to.
222 Id string `json:"id"`
223 // SyncSetting : Setting for this item.
224 SyncSetting *SyncSetting `json:"sync_setting"`
225 }
226
227 // NewContentSyncSetting returns a new ContentSyncSetting instance
228 func NewContentSyncSetting(Id string, SyncSetting *SyncSetting) *ContentSyncSetting {
229 s := new(ContentSyncSetting)
230 s.Id = Id
231 s.SyncSetting = SyncSetting
232 return s
233 }
234
235 // ContentSyncSettingArg : has no documentation (yet)
236 type ContentSyncSettingArg struct {
237 // Id : Id of the item this setting is applied to.
238 Id string `json:"id"`
239 // SyncSetting : Setting for this item.
240 SyncSetting *SyncSettingArg `json:"sync_setting"`
241 }
242
243 // NewContentSyncSettingArg returns a new ContentSyncSettingArg instance
244 func NewContentSyncSettingArg(Id string, SyncSetting *SyncSettingArg) *ContentSyncSettingArg {
245 s := new(ContentSyncSettingArg)
246 s.Id = Id
247 s.SyncSetting = SyncSetting
248 return s
249 }
250
251 // CreateFolderArg : has no documentation (yet)
252 type CreateFolderArg struct {
253 // Path : Path in the user's Dropbox to create.
254 Path string `json:"path"`
255 // Autorename : If there's a conflict, have the Dropbox server try to
256 // autorename the folder to avoid the conflict.
257 Autorename bool `json:"autorename"`
258 }
259
260 // NewCreateFolderArg returns a new CreateFolderArg instance
261 func NewCreateFolderArg(Path string) *CreateFolderArg {
262 s := new(CreateFolderArg)
263 s.Path = Path
264 s.Autorename = false
265 return s
266 }
267
268 // CreateFolderBatchArg : has no documentation (yet)
269 type CreateFolderBatchArg struct {
270 // Paths : List of paths to be created in the user's Dropbox. Duplicate path
271 // arguments in the batch are considered only once.
272 Paths []string `json:"paths"`
273 // Autorename : If there's a conflict, have the Dropbox server try to
274 // autorename the folder to avoid the conflict.
275 Autorename bool `json:"autorename"`
276 // ForceAsync : Whether to force the create to happen asynchronously.
277 ForceAsync bool `json:"force_async"`
278 }
279
280 // NewCreateFolderBatchArg returns a new CreateFolderBatchArg instance
281 func NewCreateFolderBatchArg(Paths []string) *CreateFolderBatchArg {
282 s := new(CreateFolderBatchArg)
283 s.Paths = Paths
284 s.Autorename = false
285 s.ForceAsync = false
286 return s
287 }
288
289 // CreateFolderBatchError : has no documentation (yet)
290 type CreateFolderBatchError struct {
291 dropbox.Tagged
292 }
293
294 // Valid tag values for CreateFolderBatchError
295 const (
296 CreateFolderBatchErrorTooManyFiles = "too_many_files"
297 CreateFolderBatchErrorOther = "other"
298 )
299
300 // CreateFolderBatchJobStatus : has no documentation (yet)
301 type CreateFolderBatchJobStatus struct {
302 dropbox.Tagged
303 // Complete : The batch create folder has finished.
304 Complete *CreateFolderBatchResult `json:"complete,omitempty"`
305 // Failed : The batch create folder has failed.
306 Failed *CreateFolderBatchError `json:"failed,omitempty"`
307 }
308
309 // Valid tag values for CreateFolderBatchJobStatus
310 const (
311 CreateFolderBatchJobStatusInProgress = "in_progress"
312 CreateFolderBatchJobStatusComplete = "complete"
313 CreateFolderBatchJobStatusFailed = "failed"
314 CreateFolderBatchJobStatusOther = "other"
315 )
316
317 // UnmarshalJSON deserializes into a CreateFolderBatchJobStatus instance
318 func (u *CreateFolderBatchJobStatus) UnmarshalJSON(body []byte) error {
319 type wrap struct {
320 dropbox.Tagged
321 // Complete : The batch create folder has finished.
322 Complete json.RawMessage `json:"complete,omitempty"`
323 // Failed : The batch create folder has failed.
324 Failed json.RawMessage `json:"failed,omitempty"`
325 }
326 var w wrap
327 var err error
328 if err = json.Unmarshal(body, &w); err != nil {
329 return err
330 }
331 u.Tag = w.Tag
332 switch u.Tag {
333 case "complete":
334 err = json.Unmarshal(body, &u.Complete)
335
336 if err != nil {
337 return err
338 }
339 case "failed":
340 err = json.Unmarshal(w.Failed, &u.Failed)
341
342 if err != nil {
343 return err
344 }
345 }
346 return nil
347 }
348
349 // CreateFolderBatchLaunch : Result returned by `createFolderBatch` that may
350 // either launch an asynchronous job or complete synchronously.
351 type CreateFolderBatchLaunch struct {
352 dropbox.Tagged
353 // AsyncJobId : This response indicates that the processing is asynchronous.
354 // The string is an id that can be used to obtain the status of the
355 // asynchronous job.
356 AsyncJobId string `json:"async_job_id,omitempty"`
357 // Complete : has no documentation (yet)
358 Complete *CreateFolderBatchResult `json:"complete,omitempty"`
359 }
360
361 // Valid tag values for CreateFolderBatchLaunch
362 const (
363 CreateFolderBatchLaunchAsyncJobId = "async_job_id"
364 CreateFolderBatchLaunchComplete = "complete"
365 CreateFolderBatchLaunchOther = "other"
366 )
367
368 // UnmarshalJSON deserializes into a CreateFolderBatchLaunch instance
369 func (u *CreateFolderBatchLaunch) UnmarshalJSON(body []byte) error {
370 type wrap struct {
371 dropbox.Tagged
372 // Complete : has no documentation (yet)
373 Complete json.RawMessage `json:"complete,omitempty"`
374 }
375 var w wrap
376 var err error
377 if err = json.Unmarshal(body, &w); err != nil {
378 return err
379 }
380 u.Tag = w.Tag
381 switch u.Tag {
382 case "async_job_id":
383 err = json.Unmarshal(body, &u.AsyncJobId)
384
385 if err != nil {
386 return err
387 }
388 case "complete":
389 err = json.Unmarshal(body, &u.Complete)
390
391 if err != nil {
392 return err
393 }
394 }
395 return nil
396 }
397
398 // FileOpsResult : has no documentation (yet)
399 type FileOpsResult struct {
400 }
401
402 // NewFileOpsResult returns a new FileOpsResult instance
403 func NewFileOpsResult() *FileOpsResult {
404 s := new(FileOpsResult)
405 return s
406 }
407
408 // CreateFolderBatchResult : has no documentation (yet)
409 type CreateFolderBatchResult struct {
410 FileOpsResult
411 // Entries : Each entry in `CreateFolderBatchArg.paths` will appear at the
412 // same position inside `CreateFolderBatchResult.entries`.
413 Entries []*CreateFolderBatchResultEntry `json:"entries"`
414 }
415
416 // NewCreateFolderBatchResult returns a new CreateFolderBatchResult instance
417 func NewCreateFolderBatchResult(Entries []*CreateFolderBatchResultEntry) *CreateFolderBatchResult {
418 s := new(CreateFolderBatchResult)
419 s.Entries = Entries
420 return s
421 }
422
423 // CreateFolderBatchResultEntry : has no documentation (yet)
424 type CreateFolderBatchResultEntry struct {
425 dropbox.Tagged
426 // Success : has no documentation (yet)
427 Success *CreateFolderEntryResult `json:"success,omitempty"`
428 // Failure : has no documentation (yet)
429 Failure *CreateFolderEntryError `json:"failure,omitempty"`
430 }
431
432 // Valid tag values for CreateFolderBatchResultEntry
433 const (
434 CreateFolderBatchResultEntrySuccess = "success"
435 CreateFolderBatchResultEntryFailure = "failure"
436 )
437
438 // UnmarshalJSON deserializes into a CreateFolderBatchResultEntry instance
439 func (u *CreateFolderBatchResultEntry) UnmarshalJSON(body []byte) error {
440 type wrap struct {
441 dropbox.Tagged
442 // Success : has no documentation (yet)
443 Success json.RawMessage `json:"success,omitempty"`
444 // Failure : has no documentation (yet)
445 Failure json.RawMessage `json:"failure,omitempty"`
446 }
447 var w wrap
448 var err error
449 if err = json.Unmarshal(body, &w); err != nil {
450 return err
451 }
452 u.Tag = w.Tag
453 switch u.Tag {
454 case "success":
455 err = json.Unmarshal(body, &u.Success)
456
457 if err != nil {
458 return err
459 }
460 case "failure":
461 err = json.Unmarshal(w.Failure, &u.Failure)
462
463 if err != nil {
464 return err
465 }
466 }
467 return nil
468 }
469
470 // CreateFolderEntryError : has no documentation (yet)
471 type CreateFolderEntryError struct {
472 dropbox.Tagged
473 // Path : has no documentation (yet)
474 Path *WriteError `json:"path,omitempty"`
475 }
476
477 // Valid tag values for CreateFolderEntryError
478 const (
479 CreateFolderEntryErrorPath = "path"
480 CreateFolderEntryErrorOther = "other"
481 )
482
483 // UnmarshalJSON deserializes into a CreateFolderEntryError instance
484 func (u *CreateFolderEntryError) UnmarshalJSON(body []byte) error {
485 type wrap struct {
486 dropbox.Tagged
487 // Path : has no documentation (yet)
488 Path json.RawMessage `json:"path,omitempty"`
489 }
490 var w wrap
491 var err error
492 if err = json.Unmarshal(body, &w); err != nil {
493 return err
494 }
495 u.Tag = w.Tag
496 switch u.Tag {
497 case "path":
498 err = json.Unmarshal(w.Path, &u.Path)
499
500 if err != nil {
501 return err
502 }
503 }
504 return nil
505 }
506
507 // CreateFolderEntryResult : has no documentation (yet)
508 type CreateFolderEntryResult struct {
509 // Metadata : Metadata of the created folder.
510 Metadata *FolderMetadata `json:"metadata"`
511 }
512
513 // NewCreateFolderEntryResult returns a new CreateFolderEntryResult instance
514 func NewCreateFolderEntryResult(Metadata *FolderMetadata) *CreateFolderEntryResult {
515 s := new(CreateFolderEntryResult)
516 s.Metadata = Metadata
517 return s
518 }
519
520 // CreateFolderError : has no documentation (yet)
521 type CreateFolderError struct {
522 dropbox.Tagged
523 // Path : has no documentation (yet)
524 Path *WriteError `json:"path,omitempty"`
525 }
526
527 // Valid tag values for CreateFolderError
528 const (
529 CreateFolderErrorPath = "path"
530 )
531
532 // UnmarshalJSON deserializes into a CreateFolderError instance
533 func (u *CreateFolderError) UnmarshalJSON(body []byte) error {
534 type wrap struct {
535 dropbox.Tagged
536 // Path : has no documentation (yet)
537 Path json.RawMessage `json:"path,omitempty"`
538 }
539 var w wrap
540 var err error
541 if err = json.Unmarshal(body, &w); err != nil {
542 return err
543 }
544 u.Tag = w.Tag
545 switch u.Tag {
546 case "path":
547 err = json.Unmarshal(w.Path, &u.Path)
548
549 if err != nil {
550 return err
551 }
552 }
553 return nil
554 }
555
556 // CreateFolderResult : has no documentation (yet)
557 type CreateFolderResult struct {
558 FileOpsResult
559 // Metadata : Metadata of the created folder.
560 Metadata *FolderMetadata `json:"metadata"`
561 }
562
563 // NewCreateFolderResult returns a new CreateFolderResult instance
564 func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult {
565 s := new(CreateFolderResult)
566 s.Metadata = Metadata
567 return s
568 }
569
570 // DeleteArg : has no documentation (yet)
571 type DeleteArg struct {
572 // Path : Path in the user's Dropbox to delete.
573 Path string `json:"path"`
574 // ParentRev : Perform delete if given "rev" matches the existing file's
575 // latest "rev". This field does not support deleting a folder.
576 ParentRev string `json:"parent_rev,omitempty"`
577 }
578
579 // NewDeleteArg returns a new DeleteArg instance
580 func NewDeleteArg(Path string) *DeleteArg {
581 s := new(DeleteArg)
582 s.Path = Path
583 return s
584 }
585
586 // DeleteBatchArg : has no documentation (yet)
587 type DeleteBatchArg struct {
588 // Entries : has no documentation (yet)
589 Entries []*DeleteArg `json:"entries"`
590 }
591
592 // NewDeleteBatchArg returns a new DeleteBatchArg instance
593 func NewDeleteBatchArg(Entries []*DeleteArg) *DeleteBatchArg {
594 s := new(DeleteBatchArg)
595 s.Entries = Entries
596 return s
597 }
598
599 // DeleteBatchError : has no documentation (yet)
600 type DeleteBatchError struct {
601 dropbox.Tagged
602 }
603
604 // Valid tag values for DeleteBatchError
605 const (
606 DeleteBatchErrorTooManyWriteOperations = "too_many_write_operations"
607 DeleteBatchErrorOther = "other"
608 )
609
610 // DeleteBatchJobStatus : has no documentation (yet)
611 type DeleteBatchJobStatus struct {
612 dropbox.Tagged
613 // Complete : The batch delete has finished.
614 Complete *DeleteBatchResult `json:"complete,omitempty"`
615 // Failed : The batch delete has failed.
616 Failed *DeleteBatchError `json:"failed,omitempty"`
617 }
618
619 // Valid tag values for DeleteBatchJobStatus
620 const (
621 DeleteBatchJobStatusInProgress = "in_progress"
622 DeleteBatchJobStatusComplete = "complete"
623 DeleteBatchJobStatusFailed = "failed"
624 DeleteBatchJobStatusOther = "other"
625 )
626
627 // UnmarshalJSON deserializes into a DeleteBatchJobStatus instance
628 func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error {
629 type wrap struct {
630 dropbox.Tagged
631 // Complete : The batch delete has finished.
632 Complete json.RawMessage `json:"complete,omitempty"`
633 // Failed : The batch delete has failed.
634 Failed json.RawMessage `json:"failed,omitempty"`
635 }
636 var w wrap
637 var err error
638 if err = json.Unmarshal(body, &w); err != nil {
639 return err
640 }
641 u.Tag = w.Tag
642 switch u.Tag {
643 case "complete":
644 err = json.Unmarshal(body, &u.Complete)
645
646 if err != nil {
647 return err
648 }
649 case "failed":
650 err = json.Unmarshal(w.Failed, &u.Failed)
651
652 if err != nil {
653 return err
654 }
655 }
656 return nil
657 }
658
659 // DeleteBatchLaunch : Result returned by `deleteBatch` that may either launch
660 // an asynchronous job or complete synchronously.
661 type DeleteBatchLaunch struct {
662 dropbox.Tagged
663 // AsyncJobId : This response indicates that the processing is asynchronous.
664 // The string is an id that can be used to obtain the status of the
665 // asynchronous job.
666 AsyncJobId string `json:"async_job_id,omitempty"`
667 // Complete : has no documentation (yet)
668 Complete *DeleteBatchResult `json:"complete,omitempty"`
669 }
670
671 // Valid tag values for DeleteBatchLaunch
672 const (
673 DeleteBatchLaunchAsyncJobId = "async_job_id"
674 DeleteBatchLaunchComplete = "complete"
675 DeleteBatchLaunchOther = "other"
676 )
677
678 // UnmarshalJSON deserializes into a DeleteBatchLaunch instance
679 func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error {
680 type wrap struct {
681 dropbox.Tagged
682 // Complete : has no documentation (yet)
683 Complete json.RawMessage `json:"complete,omitempty"`
684 }
685 var w wrap
686 var err error
687 if err = json.Unmarshal(body, &w); err != nil {
688 return err
689 }
690 u.Tag = w.Tag
691 switch u.Tag {
692 case "async_job_id":
693 err = json.Unmarshal(body, &u.AsyncJobId)
694
695 if err != nil {
696 return err
697 }
698 case "complete":
699 err = json.Unmarshal(body, &u.Complete)
700
701 if err != nil {
702 return err
703 }
704 }
705 return nil
706 }
707
708 // DeleteBatchResult : has no documentation (yet)
709 type DeleteBatchResult struct {
710 FileOpsResult
711 // Entries : Each entry in `DeleteBatchArg.entries` will appear at the same
712 // position inside `DeleteBatchResult.entries`.
713 Entries []*DeleteBatchResultEntry `json:"entries"`
714 }
715
716 // NewDeleteBatchResult returns a new DeleteBatchResult instance
717 func NewDeleteBatchResult(Entries []*DeleteBatchResultEntry) *DeleteBatchResult {
718 s := new(DeleteBatchResult)
719 s.Entries = Entries
720 return s
721 }
722
723 // DeleteBatchResultData : has no documentation (yet)
724 type DeleteBatchResultData struct {
725 // Metadata : Metadata of the deleted object.
726 Metadata IsMetadata `json:"metadata"`
727 }
728
729 // NewDeleteBatchResultData returns a new DeleteBatchResultData instance
730 func NewDeleteBatchResultData(Metadata IsMetadata) *DeleteBatchResultData {
731 s := new(DeleteBatchResultData)
732 s.Metadata = Metadata
733 return s
734 }
735
736 // UnmarshalJSON deserializes into a DeleteBatchResultData instance
737 func (u *DeleteBatchResultData) UnmarshalJSON(b []byte) error {
738 type wrap struct {
739 // Metadata : Metadata of the deleted object.
740 Metadata json.RawMessage `json:"metadata"`
741 }
742 var w wrap
743 if err := json.Unmarshal(b, &w); err != nil {
744 return err
745 }
746 Metadata, err := IsMetadataFromJSON(w.Metadata)
747 if err != nil {
748 return err
749 }
750 u.Metadata = Metadata
751 return nil
752 }
753
754 // DeleteBatchResultEntry : has no documentation (yet)
755 type DeleteBatchResultEntry struct {
756 dropbox.Tagged
757 // Success : has no documentation (yet)
758 Success *DeleteBatchResultData `json:"success,omitempty"`
759 // Failure : has no documentation (yet)
760 Failure *DeleteError `json:"failure,omitempty"`
761 }
762
763 // Valid tag values for DeleteBatchResultEntry
764 const (
765 DeleteBatchResultEntrySuccess = "success"
766 DeleteBatchResultEntryFailure = "failure"
767 )
768
769 // UnmarshalJSON deserializes into a DeleteBatchResultEntry instance
770 func (u *DeleteBatchResultEntry) UnmarshalJSON(body []byte) error {
771 type wrap struct {
772 dropbox.Tagged
773 // Success : has no documentation (yet)
774 Success json.RawMessage `json:"success,omitempty"`
775 // Failure : has no documentation (yet)
776 Failure json.RawMessage `json:"failure,omitempty"`
777 }
778 var w wrap
779 var err error
780 if err = json.Unmarshal(body, &w); err != nil {
781 return err
782 }
783 u.Tag = w.Tag
784 switch u.Tag {
785 case "success":
786 err = json.Unmarshal(body, &u.Success)
787
788 if err != nil {
789 return err
790 }
791 case "failure":
792 err = json.Unmarshal(w.Failure, &u.Failure)
793
794 if err != nil {
795 return err
796 }
797 }
798 return nil
799 }
800
801 // DeleteError : has no documentation (yet)
802 type DeleteError struct {
803 dropbox.Tagged
804 // PathLookup : has no documentation (yet)
805 PathLookup *LookupError `json:"path_lookup,omitempty"`
806 // PathWrite : has no documentation (yet)
807 PathWrite *WriteError `json:"path_write,omitempty"`
808 }
809
810 // Valid tag values for DeleteError
811 const (
812 DeleteErrorPathLookup = "path_lookup"
813 DeleteErrorPathWrite = "path_write"
814 DeleteErrorTooManyWriteOperations = "too_many_write_operations"
815 DeleteErrorTooManyFiles = "too_many_files"
816 DeleteErrorOther = "other"
817 )
818
819 // UnmarshalJSON deserializes into a DeleteError instance
820 func (u *DeleteError) UnmarshalJSON(body []byte) error {
821 type wrap struct {
822 dropbox.Tagged
823 // PathLookup : has no documentation (yet)
824 PathLookup json.RawMessage `json:"path_lookup,omitempty"`
825 // PathWrite : has no documentation (yet)
826 PathWrite json.RawMessage `json:"path_write,omitempty"`
827 }
828 var w wrap
829 var err error
830 if err = json.Unmarshal(body, &w); err != nil {
831 return err
832 }
833 u.Tag = w.Tag
834 switch u.Tag {
835 case "path_lookup":
836 err = json.Unmarshal(w.PathLookup, &u.PathLookup)
837
838 if err != nil {
839 return err
840 }
841 case "path_write":
842 err = json.Unmarshal(w.PathWrite, &u.PathWrite)
843
844 if err != nil {
845 return err
846 }
847 }
848 return nil
849 }
850
851 // DeleteResult : has no documentation (yet)
852 type DeleteResult struct {
853 FileOpsResult
854 // Metadata : Metadata of the deleted object.
855 Metadata IsMetadata `json:"metadata"`
856 }
857
858 // NewDeleteResult returns a new DeleteResult instance
859 func NewDeleteResult(Metadata IsMetadata) *DeleteResult {
860 s := new(DeleteResult)
861 s.Metadata = Metadata
862 return s
863 }
864
865 // UnmarshalJSON deserializes into a DeleteResult instance
866 func (u *DeleteResult) UnmarshalJSON(b []byte) error {
867 type wrap struct {
868 // Metadata : Metadata of the deleted object.
869 Metadata json.RawMessage `json:"metadata"`
870 }
871 var w wrap
872 if err := json.Unmarshal(b, &w); err != nil {
873 return err
874 }
875 Metadata, err := IsMetadataFromJSON(w.Metadata)
876 if err != nil {
877 return err
878 }
879 u.Metadata = Metadata
880 return nil
881 }
882
883 // Metadata : Metadata for a file or folder.
884 type Metadata struct {
885 // Name : The last component of the path (including extension). This never
886 // contains a slash.
887 Name string `json:"name"`
888 // PathLower : The lowercased full path in the user's Dropbox. This always
889 // starts with a slash. This field will be null if the file or folder is not
890 // mounted.
891 PathLower string `json:"path_lower,omitempty"`
892 // PathDisplay : The cased path to be used for display purposes only. In
893 // rare instances the casing will not correctly match the user's filesystem,
894 // but this behavior will match the path provided in the Core API v1, and at
895 // least the last path component will have the correct casing. Changes to
896 // only the casing of paths won't be returned by `listFolderContinue`. This
897 // field will be null if the file or folder is not mounted.
898 PathDisplay string `json:"path_display,omitempty"`
899 // ParentSharedFolderId : Please use
900 // `FileSharingInfo.parent_shared_folder_id` or
901 // `FolderSharingInfo.parent_shared_folder_id` instead.
902 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
903 }
904
905 // NewMetadata returns a new Metadata instance
906 func NewMetadata(Name string) *Metadata {
907 s := new(Metadata)
908 s.Name = Name
909 return s
910 }
911
912 // IsMetadata is the interface type for Metadata and its subtypes
913 type IsMetadata interface {
914 IsMetadata()
915 }
916
917 // IsMetadata implements the IsMetadata interface
918 func (u *Metadata) IsMetadata() {}
919
920 type metadataUnion struct {
921 dropbox.Tagged
922 // File : has no documentation (yet)
923 File *FileMetadata `json:"file,omitempty"`
924 // Folder : has no documentation (yet)
925 Folder *FolderMetadata `json:"folder,omitempty"`
926 // Deleted : has no documentation (yet)
927 Deleted *DeletedMetadata `json:"deleted,omitempty"`
928 }
929
930 // Valid tag values for Metadata
931 const (
932 MetadataFile = "file"
933 MetadataFolder = "folder"
934 MetadataDeleted = "deleted"
935 )
936
937 // UnmarshalJSON deserializes into a metadataUnion instance
938 func (u *metadataUnion) UnmarshalJSON(body []byte) error {
939 type wrap struct {
940 dropbox.Tagged
941 // File : has no documentation (yet)
942 File json.RawMessage `json:"file,omitempty"`
943 // Folder : has no documentation (yet)
944 Folder json.RawMessage `json:"folder,omitempty"`
945 // Deleted : has no documentation (yet)
946 Deleted json.RawMessage `json:"deleted,omitempty"`
947 }
948 var w wrap
949 var err error
950 if err = json.Unmarshal(body, &w); err != nil {
951 return err
952 }
953 u.Tag = w.Tag
954 switch u.Tag {
955 case "file":
956 err = json.Unmarshal(body, &u.File)
957
958 if err != nil {
959 return err
960 }
961 case "folder":
962 err = json.Unmarshal(body, &u.Folder)
963
964 if err != nil {
965 return err
966 }
967 case "deleted":
968 err = json.Unmarshal(body, &u.Deleted)
969
970 if err != nil {
971 return err
972 }
973 }
974 return nil
975 }
976
977 // IsMetadataFromJSON converts JSON to a concrete IsMetadata instance
978 func IsMetadataFromJSON(data []byte) (IsMetadata, error) {
979 var t metadataUnion
980 if err := json.Unmarshal(data, &t); err != nil {
981 return nil, err
982 }
983 switch t.Tag {
984 case "file":
985 return t.File, nil
986
987 case "folder":
988 return t.Folder, nil
989
990 case "deleted":
991 return t.Deleted, nil
992
993 }
994 return nil, nil
995 }
996
997 // DeletedMetadata : Indicates that there used to be a file or folder at this
998 // path, but it no longer exists.
999 type DeletedMetadata struct {
1000 Metadata
1001 }
1002
1003 // NewDeletedMetadata returns a new DeletedMetadata instance
1004 func NewDeletedMetadata(Name string) *DeletedMetadata {
1005 s := new(DeletedMetadata)
1006 s.Name = Name
1007 return s
1008 }
1009
1010 // Dimensions : Dimensions for a photo or video.
1011 type Dimensions struct {
1012 // Height : Height of the photo/video.
1013 Height uint64 `json:"height"`
1014 // Width : Width of the photo/video.
1015 Width uint64 `json:"width"`
1016 }
1017
1018 // NewDimensions returns a new Dimensions instance
1019 func NewDimensions(Height uint64, Width uint64) *Dimensions {
1020 s := new(Dimensions)
1021 s.Height = Height
1022 s.Width = Width
1023 return s
1024 }
1025
1026 // DownloadArg : has no documentation (yet)
1027 type DownloadArg struct {
1028 // Path : The path of the file to download.
1029 Path string `json:"path"`
1030 // Rev : Please specify revision in `path` instead.
1031 Rev string `json:"rev,omitempty"`
1032 // ExtraHeaders can be used to pass Range, If-None-Match headers
1033 ExtraHeaders map[string]string `json:"-"`
1034 }
1035
1036 // NewDownloadArg returns a new DownloadArg instance
1037 func NewDownloadArg(Path string) *DownloadArg {
1038 s := new(DownloadArg)
1039 s.Path = Path
1040 return s
1041 }
1042
1043 // DownloadError : has no documentation (yet)
1044 type DownloadError struct {
1045 dropbox.Tagged
1046 // Path : has no documentation (yet)
1047 Path *LookupError `json:"path,omitempty"`
1048 }
1049
1050 // Valid tag values for DownloadError
1051 const (
1052 DownloadErrorPath = "path"
1053 DownloadErrorOther = "other"
1054 )
1055
1056 // UnmarshalJSON deserializes into a DownloadError instance
1057 func (u *DownloadError) UnmarshalJSON(body []byte) error {
1058 type wrap struct {
1059 dropbox.Tagged
1060 // Path : has no documentation (yet)
1061 Path json.RawMessage `json:"path,omitempty"`
1062 }
1063 var w wrap
1064 var err error
1065 if err = json.Unmarshal(body, &w); err != nil {
1066 return err
1067 }
1068 u.Tag = w.Tag
1069 switch u.Tag {
1070 case "path":
1071 err = json.Unmarshal(w.Path, &u.Path)
1072
1073 if err != nil {
1074 return err
1075 }
1076 }
1077 return nil
1078 }
1079
1080 // DownloadZipArg : has no documentation (yet)
1081 type DownloadZipArg struct {
1082 // Path : The path of the folder to download.
1083 Path string `json:"path"`
1084 }
1085
1086 // NewDownloadZipArg returns a new DownloadZipArg instance
1087 func NewDownloadZipArg(Path string) *DownloadZipArg {
1088 s := new(DownloadZipArg)
1089 s.Path = Path
1090 return s
1091 }
1092
1093 // DownloadZipError : has no documentation (yet)
1094 type DownloadZipError struct {
1095 dropbox.Tagged
1096 // Path : has no documentation (yet)
1097 Path *LookupError `json:"path,omitempty"`
1098 }
1099
1100 // Valid tag values for DownloadZipError
1101 const (
1102 DownloadZipErrorPath = "path"
1103 DownloadZipErrorTooLarge = "too_large"
1104 DownloadZipErrorTooManyFiles = "too_many_files"
1105 DownloadZipErrorOther = "other"
1106 )
1107
1108 // UnmarshalJSON deserializes into a DownloadZipError instance
1109 func (u *DownloadZipError) UnmarshalJSON(body []byte) error {
1110 type wrap struct {
1111 dropbox.Tagged
1112 // Path : has no documentation (yet)
1113 Path json.RawMessage `json:"path,omitempty"`
1114 }
1115 var w wrap
1116 var err error
1117 if err = json.Unmarshal(body, &w); err != nil {
1118 return err
1119 }
1120 u.Tag = w.Tag
1121 switch u.Tag {
1122 case "path":
1123 err = json.Unmarshal(w.Path, &u.Path)
1124
1125 if err != nil {
1126 return err
1127 }
1128 }
1129 return nil
1130 }
1131
1132 // DownloadZipResult : has no documentation (yet)
1133 type DownloadZipResult struct {
1134 // Metadata : has no documentation (yet)
1135 Metadata *FolderMetadata `json:"metadata"`
1136 }
1137
1138 // NewDownloadZipResult returns a new DownloadZipResult instance
1139 func NewDownloadZipResult(Metadata *FolderMetadata) *DownloadZipResult {
1140 s := new(DownloadZipResult)
1141 s.Metadata = Metadata
1142 return s
1143 }
1144
1145 // FileMetadata : has no documentation (yet)
1146 type FileMetadata struct {
1147 Metadata
1148 // Id : A unique identifier for the file.
1149 Id string `json:"id"`
1150 // ClientModified : For files, this is the modification time set by the
1151 // desktop client when the file was added to Dropbox. Since this time is not
1152 // verified (the Dropbox server stores whatever the desktop client sends
1153 // up), this should only be used for display purposes (such as sorting) and
1154 // not, for example, to determine if a file has changed or not.
1155 ClientModified time.Time `json:"client_modified"`
1156 // ServerModified : The last time the file was modified on Dropbox.
1157 ServerModified time.Time `json:"server_modified"`
1158 // Rev : A unique identifier for the current revision of a file. This field
1159 // is the same rev as elsewhere in the API and can be used to detect changes
1160 // and avoid conflicts.
1161 Rev string `json:"rev"`
1162 // Size : The file size in bytes.
1163 Size uint64 `json:"size"`
1164 // MediaInfo : Additional information if the file is a photo or video.
1165 MediaInfo *MediaInfo `json:"media_info,omitempty"`
1166 // SymlinkInfo : Set if this file is a symlink.
1167 SymlinkInfo *SymlinkInfo `json:"symlink_info,omitempty"`
1168 // SharingInfo : Set if this file is contained in a shared folder.
1169 SharingInfo *FileSharingInfo `json:"sharing_info,omitempty"`
1170 // PropertyGroups : Additional information if the file has custom properties
1171 // with the property template specified.
1172 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
1173 // HasExplicitSharedMembers : This flag will only be present if
1174 // include_has_explicit_shared_members is true in `listFolder` or
1175 // `getMetadata`. If this flag is present, it will be true if this file has
1176 // any explicit shared members. This is different from sharing_info in that
1177 // this could be true in the case where a file has explicit members but is
1178 // not contained within a shared folder.
1179 HasExplicitSharedMembers bool `json:"has_explicit_shared_members,omitempty"`
1180 // ContentHash : A hash of the file content. This field can be used to
1181 // verify data integrity. For more information see our `Content hash`
1182 // <https://www.dropbox.com/developers/reference/content-hash> page.
1183 ContentHash string `json:"content_hash,omitempty"`
1184 }
1185
1186 // NewFileMetadata returns a new FileMetadata instance
1187 func NewFileMetadata(Name string, Id string, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileMetadata {
1188 s := new(FileMetadata)
1189 s.Name = Name
1190 s.Id = Id
1191 s.ClientModified = ClientModified
1192 s.ServerModified = ServerModified
1193 s.Rev = Rev
1194 s.Size = Size
1195 return s
1196 }
1197
1198 // SharingInfo : Sharing info for a file or folder.
1199 type SharingInfo struct {
1200 // ReadOnly : True if the file or folder is inside a read-only shared
1201 // folder.
1202 ReadOnly bool `json:"read_only"`
1203 }
1204
1205 // NewSharingInfo returns a new SharingInfo instance
1206 func NewSharingInfo(ReadOnly bool) *SharingInfo {
1207 s := new(SharingInfo)
1208 s.ReadOnly = ReadOnly
1209 return s
1210 }
1211
1212 // FileSharingInfo : Sharing info for a file which is contained by a shared
1213 // folder.
1214 type FileSharingInfo struct {
1215 SharingInfo
1216 // ParentSharedFolderId : ID of shared folder that holds this file.
1217 ParentSharedFolderId string `json:"parent_shared_folder_id"`
1218 // ModifiedBy : The last user who modified the file. This field will be null
1219 // if the user's account has been deleted.
1220 ModifiedBy string `json:"modified_by,omitempty"`
1221 }
1222
1223 // NewFileSharingInfo returns a new FileSharingInfo instance
1224 func NewFileSharingInfo(ReadOnly bool, ParentSharedFolderId string) *FileSharingInfo {
1225 s := new(FileSharingInfo)
1226 s.ReadOnly = ReadOnly
1227 s.ParentSharedFolderId = ParentSharedFolderId
1228 return s
1229 }
1230
1231 // FolderMetadata : has no documentation (yet)
1232 type FolderMetadata struct {
1233 Metadata
1234 // Id : A unique identifier for the folder.
1235 Id string `json:"id"`
1236 // SharedFolderId : Please use `sharing_info` instead.
1237 SharedFolderId string `json:"shared_folder_id,omitempty"`
1238 // SharingInfo : Set if the folder is contained in a shared folder or is a
1239 // shared folder mount point.
1240 SharingInfo *FolderSharingInfo `json:"sharing_info,omitempty"`
1241 // PropertyGroups : Additional information if the file has custom properties
1242 // with the property template specified. Note that only properties
1243 // associated with user-owned templates, not team-owned templates, can be
1244 // attached to folders.
1245 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
1246 }
1247
1248 // NewFolderMetadata returns a new FolderMetadata instance
1249 func NewFolderMetadata(Name string, Id string) *FolderMetadata {
1250 s := new(FolderMetadata)
1251 s.Name = Name
1252 s.Id = Id
1253 return s
1254 }
1255
1256 // FolderSharingInfo : Sharing info for a folder which is contained in a shared
1257 // folder or is a shared folder mount point.
1258 type FolderSharingInfo struct {
1259 SharingInfo
1260 // ParentSharedFolderId : Set if the folder is contained by a shared folder.
1261 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
1262 // SharedFolderId : If this folder is a shared folder mount point, the ID of
1263 // the shared folder mounted at this location.
1264 SharedFolderId string `json:"shared_folder_id,omitempty"`
1265 // TraverseOnly : Specifies that the folder can only be traversed and the
1266 // user can only see a limited subset of the contents of this folder because
1267 // they don't have read access to this folder. They do, however, have access
1268 // to some sub folder.
1269 TraverseOnly bool `json:"traverse_only"`
1270 // NoAccess : Specifies that the folder cannot be accessed by the user.
1271 NoAccess bool `json:"no_access"`
1272 }
1273
1274 // NewFolderSharingInfo returns a new FolderSharingInfo instance
1275 func NewFolderSharingInfo(ReadOnly bool) *FolderSharingInfo {
1276 s := new(FolderSharingInfo)
1277 s.ReadOnly = ReadOnly
1278 s.TraverseOnly = false
1279 s.NoAccess = false
1280 return s
1281 }
1282
1283 // GetCopyReferenceArg : has no documentation (yet)
1284 type GetCopyReferenceArg struct {
1285 // Path : The path to the file or folder you want to get a copy reference
1286 // to.
1287 Path string `json:"path"`
1288 }
1289
1290 // NewGetCopyReferenceArg returns a new GetCopyReferenceArg instance
1291 func NewGetCopyReferenceArg(Path string) *GetCopyReferenceArg {
1292 s := new(GetCopyReferenceArg)
1293 s.Path = Path
1294 return s
1295 }
1296
1297 // GetCopyReferenceError : has no documentation (yet)
1298 type GetCopyReferenceError struct {
1299 dropbox.Tagged
1300 // Path : has no documentation (yet)
1301 Path *LookupError `json:"path,omitempty"`
1302 }
1303
1304 // Valid tag values for GetCopyReferenceError
1305 const (
1306 GetCopyReferenceErrorPath = "path"
1307 GetCopyReferenceErrorOther = "other"
1308 )
1309
1310 // UnmarshalJSON deserializes into a GetCopyReferenceError instance
1311 func (u *GetCopyReferenceError) UnmarshalJSON(body []byte) error {
1312 type wrap struct {
1313 dropbox.Tagged
1314 // Path : has no documentation (yet)
1315 Path json.RawMessage `json:"path,omitempty"`
1316 }
1317 var w wrap
1318 var err error
1319 if err = json.Unmarshal(body, &w); err != nil {
1320 return err
1321 }
1322 u.Tag = w.Tag
1323 switch u.Tag {
1324 case "path":
1325 err = json.Unmarshal(w.Path, &u.Path)
1326
1327 if err != nil {
1328 return err
1329 }
1330 }
1331 return nil
1332 }
1333
1334 // GetCopyReferenceResult : has no documentation (yet)
1335 type GetCopyReferenceResult struct {
1336 // Metadata : Metadata of the file or folder.
1337 Metadata IsMetadata `json:"metadata"`
1338 // CopyReference : A copy reference to the file or folder.
1339 CopyReference string `json:"copy_reference"`
1340 // Expires : The expiration date of the copy reference. This value is
1341 // currently set to be far enough in the future so that expiration is
1342 // effectively not an issue.
1343 Expires time.Time `json:"expires"`
1344 }
1345
1346 // NewGetCopyReferenceResult returns a new GetCopyReferenceResult instance
1347 func NewGetCopyReferenceResult(Metadata IsMetadata, CopyReference string, Expires time.Time) *GetCopyReferenceResult {
1348 s := new(GetCopyReferenceResult)
1349 s.Metadata = Metadata
1350 s.CopyReference = CopyReference
1351 s.Expires = Expires
1352 return s
1353 }
1354
1355 // UnmarshalJSON deserializes into a GetCopyReferenceResult instance
1356 func (u *GetCopyReferenceResult) UnmarshalJSON(b []byte) error {
1357 type wrap struct {
1358 // Metadata : Metadata of the file or folder.
1359 Metadata json.RawMessage `json:"metadata"`
1360 // CopyReference : A copy reference to the file or folder.
1361 CopyReference string `json:"copy_reference"`
1362 // Expires : The expiration date of the copy reference. This value is
1363 // currently set to be far enough in the future so that expiration is
1364 // effectively not an issue.
1365 Expires time.Time `json:"expires"`
1366 }
1367 var w wrap
1368 if err := json.Unmarshal(b, &w); err != nil {
1369 return err
1370 }
1371 Metadata, err := IsMetadataFromJSON(w.Metadata)
1372 if err != nil {
1373 return err
1374 }
1375 u.Metadata = Metadata
1376 u.CopyReference = w.CopyReference
1377 u.Expires = w.Expires
1378 return nil
1379 }
1380
1381 // GetTemporaryLinkArg : has no documentation (yet)
1382 type GetTemporaryLinkArg struct {
1383 // Path : The path to the file you want a temporary link to.
1384 Path string `json:"path"`
1385 }
1386
1387 // NewGetTemporaryLinkArg returns a new GetTemporaryLinkArg instance
1388 func NewGetTemporaryLinkArg(Path string) *GetTemporaryLinkArg {
1389 s := new(GetTemporaryLinkArg)
1390 s.Path = Path
1391 return s
1392 }
1393
1394 // GetTemporaryLinkError : has no documentation (yet)
1395 type GetTemporaryLinkError struct {
1396 dropbox.Tagged
1397 // Path : has no documentation (yet)
1398 Path *LookupError `json:"path,omitempty"`
1399 }
1400
1401 // Valid tag values for GetTemporaryLinkError
1402 const (
1403 GetTemporaryLinkErrorPath = "path"
1404 GetTemporaryLinkErrorOther = "other"
1405 )
1406
1407 // UnmarshalJSON deserializes into a GetTemporaryLinkError instance
1408 func (u *GetTemporaryLinkError) UnmarshalJSON(body []byte) error {
1409 type wrap struct {
1410 dropbox.Tagged
1411 // Path : has no documentation (yet)
1412 Path json.RawMessage `json:"path,omitempty"`
1413 }
1414 var w wrap
1415 var err error
1416 if err = json.Unmarshal(body, &w); err != nil {
1417 return err
1418 }
1419 u.Tag = w.Tag
1420 switch u.Tag {
1421 case "path":
1422 err = json.Unmarshal(w.Path, &u.Path)
1423
1424 if err != nil {
1425 return err
1426 }
1427 }
1428 return nil
1429 }
1430
1431 // GetTemporaryLinkResult : has no documentation (yet)
1432 type GetTemporaryLinkResult struct {
1433 // Metadata : Metadata of the file.
1434 Metadata *FileMetadata `json:"metadata"`
1435 // Link : The temporary link which can be used to stream content the file.
1436 Link string `json:"link"`
1437 }
1438
1439 // NewGetTemporaryLinkResult returns a new GetTemporaryLinkResult instance
1440 func NewGetTemporaryLinkResult(Metadata *FileMetadata, Link string) *GetTemporaryLinkResult {
1441 s := new(GetTemporaryLinkResult)
1442 s.Metadata = Metadata
1443 s.Link = Link
1444 return s
1445 }
1446
1447 // GetTemporaryUploadLinkArg : has no documentation (yet)
1448 type GetTemporaryUploadLinkArg struct {
1449 // CommitInfo : Contains the path and other optional modifiers for the
1450 // future upload commit. Equivalent to the parameters provided to `upload`.
1451 CommitInfo *CommitInfo `json:"commit_info"`
1452 // Duration : How long before this link expires, in seconds. Attempting to
1453 // start an upload with this link longer than this period of time after
1454 // link creation will result in an error.
1455 Duration float64 `json:"duration"`
1456 }
1457
1458 // NewGetTemporaryUploadLinkArg returns a new GetTemporaryUploadLinkArg instance
1459 func NewGetTemporaryUploadLinkArg(CommitInfo *CommitInfo) *GetTemporaryUploadLinkArg {
1460 s := new(GetTemporaryUploadLinkArg)
1461 s.CommitInfo = CommitInfo
1462 s.Duration = 14400.0
1463 return s
1464 }
1465
1466 // GetTemporaryUploadLinkResult : has no documentation (yet)
1467 type GetTemporaryUploadLinkResult struct {
1468 // Link : The temporary link which can be used to stream a file to a Dropbox
1469 // location.
1470 Link string `json:"link"`
1471 }
1472
1473 // NewGetTemporaryUploadLinkResult returns a new GetTemporaryUploadLinkResult instance
1474 func NewGetTemporaryUploadLinkResult(Link string) *GetTemporaryUploadLinkResult {
1475 s := new(GetTemporaryUploadLinkResult)
1476 s.Link = Link
1477 return s
1478 }
1479
1480 // GetThumbnailBatchArg : Arguments for `getThumbnailBatch`.
1481 type GetThumbnailBatchArg struct {
1482 // Entries : List of files to get thumbnails.
1483 Entries []*ThumbnailArg `json:"entries"`
1484 }
1485
1486 // NewGetThumbnailBatchArg returns a new GetThumbnailBatchArg instance
1487 func NewGetThumbnailBatchArg(Entries []*ThumbnailArg) *GetThumbnailBatchArg {
1488 s := new(GetThumbnailBatchArg)
1489 s.Entries = Entries
1490 return s
1491 }
1492
1493 // GetThumbnailBatchError : has no documentation (yet)
1494 type GetThumbnailBatchError struct {
1495 dropbox.Tagged
1496 }
1497
1498 // Valid tag values for GetThumbnailBatchError
1499 const (
1500 GetThumbnailBatchErrorTooManyFiles = "too_many_files"
1501 GetThumbnailBatchErrorOther = "other"
1502 )
1503
1504 // GetThumbnailBatchResult : has no documentation (yet)
1505 type GetThumbnailBatchResult struct {
1506 // Entries : List of files and their thumbnails.
1507 Entries []*GetThumbnailBatchResultEntry `json:"entries"`
1508 }
1509
1510 // NewGetThumbnailBatchResult returns a new GetThumbnailBatchResult instance
1511 func NewGetThumbnailBatchResult(Entries []*GetThumbnailBatchResultEntry) *GetThumbnailBatchResult {
1512 s := new(GetThumbnailBatchResult)
1513 s.Entries = Entries
1514 return s
1515 }
1516
1517 // GetThumbnailBatchResultData : has no documentation (yet)
1518 type GetThumbnailBatchResultData struct {
1519 // Metadata : has no documentation (yet)
1520 Metadata *FileMetadata `json:"metadata"`
1521 // Thumbnail : A string containing the base64-encoded thumbnail data for
1522 // this file.
1523 Thumbnail string `json:"thumbnail"`
1524 }
1525
1526 // NewGetThumbnailBatchResultData returns a new GetThumbnailBatchResultData instance
1527 func NewGetThumbnailBatchResultData(Metadata *FileMetadata, Thumbnail string) *GetThumbnailBatchResultData {
1528 s := new(GetThumbnailBatchResultData)
1529 s.Metadata = Metadata
1530 s.Thumbnail = Thumbnail
1531 return s
1532 }
1533
1534 // GetThumbnailBatchResultEntry : has no documentation (yet)
1535 type GetThumbnailBatchResultEntry struct {
1536 dropbox.Tagged
1537 // Success : has no documentation (yet)
1538 Success *GetThumbnailBatchResultData `json:"success,omitempty"`
1539 // Failure : The result for this file if it was an error.
1540 Failure *ThumbnailError `json:"failure,omitempty"`
1541 }
1542
1543 // Valid tag values for GetThumbnailBatchResultEntry
1544 const (
1545 GetThumbnailBatchResultEntrySuccess = "success"
1546 GetThumbnailBatchResultEntryFailure = "failure"
1547 GetThumbnailBatchResultEntryOther = "other"
1548 )
1549
1550 // UnmarshalJSON deserializes into a GetThumbnailBatchResultEntry instance
1551 func (u *GetThumbnailBatchResultEntry) UnmarshalJSON(body []byte) error {
1552 type wrap struct {
1553 dropbox.Tagged
1554 // Success : has no documentation (yet)
1555 Success json.RawMessage `json:"success,omitempty"`
1556 // Failure : The result for this file if it was an error.
1557 Failure json.RawMessage `json:"failure,omitempty"`
1558 }
1559 var w wrap
1560 var err error
1561 if err = json.Unmarshal(body, &w); err != nil {
1562 return err
1563 }
1564 u.Tag = w.Tag
1565 switch u.Tag {
1566 case "success":
1567 err = json.Unmarshal(body, &u.Success)
1568
1569 if err != nil {
1570 return err
1571 }
1572 case "failure":
1573 err = json.Unmarshal(w.Failure, &u.Failure)
1574
1575 if err != nil {
1576 return err
1577 }
1578 }
1579 return nil
1580 }
1581
1582 // GpsCoordinates : GPS coordinates for a photo or video.
1583 type GpsCoordinates struct {
1584 // Latitude : Latitude of the GPS coordinates.
1585 Latitude float64 `json:"latitude"`
1586 // Longitude : Longitude of the GPS coordinates.
1587 Longitude float64 `json:"longitude"`
1588 }
1589
1590 // NewGpsCoordinates returns a new GpsCoordinates instance
1591 func NewGpsCoordinates(Latitude float64, Longitude float64) *GpsCoordinates {
1592 s := new(GpsCoordinates)
1593 s.Latitude = Latitude
1594 s.Longitude = Longitude
1595 return s
1596 }
1597
1598 // ListFolderArg : has no documentation (yet)
1599 type ListFolderArg struct {
1600 // Path : A unique identifier for the file.
1601 Path string `json:"path"`
1602 // Recursive : If true, the list folder operation will be applied
1603 // recursively to all subfolders and the response will contain contents of
1604 // all subfolders.
1605 Recursive bool `json:"recursive"`
1606 // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo
1607 // and video.
1608 IncludeMediaInfo bool `json:"include_media_info"`
1609 // IncludeDeleted : If true, the results will include entries for files and
1610 // folders that used to exist but were deleted.
1611 IncludeDeleted bool `json:"include_deleted"`
1612 // IncludeHasExplicitSharedMembers : If true, the results will include a
1613 // flag for each file indicating whether or not that file has any explicit
1614 // members.
1615 IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
1616 // IncludeMountedFolders : If true, the results will include entries under
1617 // mounted folders which includes app folder, shared folder and team folder.
1618 IncludeMountedFolders bool `json:"include_mounted_folders"`
1619 // Limit : The maximum number of results to return per request. Note: This
1620 // is an approximate number and there can be slightly more entries returned
1621 // in some cases.
1622 Limit uint32 `json:"limit,omitempty"`
1623 // SharedLink : A shared link to list the contents of. If the link is
1624 // password-protected, the password must be provided. If this field is
1625 // present, `ListFolderArg.path` will be relative to root of the shared
1626 // link. Only non-recursive mode is supported for shared link.
1627 SharedLink *SharedLink `json:"shared_link,omitempty"`
1628 // IncludePropertyGroups : If set to a valid list of template IDs,
1629 // `FileMetadata.property_groups` is set if there exists property data
1630 // associated with the file and each of the listed templates.
1631 IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
1632 }
1633
1634 // NewListFolderArg returns a new ListFolderArg instance
1635 func NewListFolderArg(Path string) *ListFolderArg {
1636 s := new(ListFolderArg)
1637 s.Path = Path
1638 s.Recursive = false
1639 s.IncludeMediaInfo = false
1640 s.IncludeDeleted = false
1641 s.IncludeHasExplicitSharedMembers = false
1642 s.IncludeMountedFolders = true
1643 return s
1644 }
1645
1646 // ListFolderContinueArg : has no documentation (yet)
1647 type ListFolderContinueArg struct {
1648 // Cursor : The cursor returned by your last call to `listFolder` or
1649 // `listFolderContinue`.
1650 Cursor string `json:"cursor"`
1651 }
1652
1653 // NewListFolderContinueArg returns a new ListFolderContinueArg instance
1654 func NewListFolderContinueArg(Cursor string) *ListFolderContinueArg {
1655 s := new(ListFolderContinueArg)
1656 s.Cursor = Cursor
1657 return s
1658 }
1659
1660 // ListFolderContinueError : has no documentation (yet)
1661 type ListFolderContinueError struct {
1662 dropbox.Tagged
1663 // Path : has no documentation (yet)
1664 Path *LookupError `json:"path,omitempty"`
1665 }
1666
1667 // Valid tag values for ListFolderContinueError
1668 const (
1669 ListFolderContinueErrorPath = "path"
1670 ListFolderContinueErrorReset = "reset"
1671 ListFolderContinueErrorOther = "other"
1672 )
1673
1674 // UnmarshalJSON deserializes into a ListFolderContinueError instance
1675 func (u *ListFolderContinueError) UnmarshalJSON(body []byte) error {
1676 type wrap struct {
1677 dropbox.Tagged
1678 // Path : has no documentation (yet)
1679 Path json.RawMessage `json:"path,omitempty"`
1680 }
1681 var w wrap
1682 var err error
1683 if err = json.Unmarshal(body, &w); err != nil {
1684 return err
1685 }
1686 u.Tag = w.Tag
1687 switch u.Tag {
1688 case "path":
1689 err = json.Unmarshal(w.Path, &u.Path)
1690
1691 if err != nil {
1692 return err
1693 }
1694 }
1695 return nil
1696 }
1697
1698 // ListFolderError : has no documentation (yet)
1699 type ListFolderError struct {
1700 dropbox.Tagged
1701 // Path : has no documentation (yet)
1702 Path *LookupError `json:"path,omitempty"`
1703 }
1704
1705 // Valid tag values for ListFolderError
1706 const (
1707 ListFolderErrorPath = "path"
1708 ListFolderErrorOther = "other"
1709 )
1710
1711 // UnmarshalJSON deserializes into a ListFolderError instance
1712 func (u *ListFolderError) UnmarshalJSON(body []byte) error {
1713 type wrap struct {
1714 dropbox.Tagged
1715 // Path : has no documentation (yet)
1716 Path json.RawMessage `json:"path,omitempty"`
1717 }
1718 var w wrap
1719 var err error
1720 if err = json.Unmarshal(body, &w); err != nil {
1721 return err
1722 }
1723 u.Tag = w.Tag
1724 switch u.Tag {
1725 case "path":
1726 err = json.Unmarshal(w.Path, &u.Path)
1727
1728 if err != nil {
1729 return err
1730 }
1731 }
1732 return nil
1733 }
1734
1735 // ListFolderGetLatestCursorResult : has no documentation (yet)
1736 type ListFolderGetLatestCursorResult struct {
1737 // Cursor : Pass the cursor into `listFolderContinue` to see what's changed
1738 // in the folder since your previous query.
1739 Cursor string `json:"cursor"`
1740 }
1741
1742 // NewListFolderGetLatestCursorResult returns a new ListFolderGetLatestCursorResult instance
1743 func NewListFolderGetLatestCursorResult(Cursor string) *ListFolderGetLatestCursorResult {
1744 s := new(ListFolderGetLatestCursorResult)
1745 s.Cursor = Cursor
1746 return s
1747 }
1748
1749 // ListFolderLongpollArg : has no documentation (yet)
1750 type ListFolderLongpollArg struct {
1751 // Cursor : A cursor as returned by `listFolder` or `listFolderContinue`.
1752 // Cursors retrieved by setting `ListFolderArg.include_media_info` to true
1753 // are not supported.
1754 Cursor string `json:"cursor"`
1755 // Timeout : A timeout in seconds. The request will block for at most this
1756 // length of time, plus up to 90 seconds of random jitter added to avoid the
1757 // thundering herd problem. Care should be taken when using this parameter,
1758 // as some network infrastructure does not support long timeouts.
1759 Timeout uint64 `json:"timeout"`
1760 }
1761
1762 // NewListFolderLongpollArg returns a new ListFolderLongpollArg instance
1763 func NewListFolderLongpollArg(Cursor string) *ListFolderLongpollArg {
1764 s := new(ListFolderLongpollArg)
1765 s.Cursor = Cursor
1766 s.Timeout = 30
1767 return s
1768 }
1769
1770 // ListFolderLongpollError : has no documentation (yet)
1771 type ListFolderLongpollError struct {
1772 dropbox.Tagged
1773 }
1774
1775 // Valid tag values for ListFolderLongpollError
1776 const (
1777 ListFolderLongpollErrorReset = "reset"
1778 ListFolderLongpollErrorOther = "other"
1779 )
1780
1781 // ListFolderLongpollResult : has no documentation (yet)
1782 type ListFolderLongpollResult struct {
1783 // Changes : Indicates whether new changes are available. If true, call
1784 // `listFolderContinue` to retrieve the changes.
1785 Changes bool `json:"changes"`
1786 // Backoff : If present, backoff for at least this many seconds before
1787 // calling `listFolderLongpoll` again.
1788 Backoff uint64 `json:"backoff,omitempty"`
1789 }
1790
1791 // NewListFolderLongpollResult returns a new ListFolderLongpollResult instance
1792 func NewListFolderLongpollResult(Changes bool) *ListFolderLongpollResult {
1793 s := new(ListFolderLongpollResult)
1794 s.Changes = Changes
1795 return s
1796 }
1797
1798 // ListFolderResult : has no documentation (yet)
1799 type ListFolderResult struct {
1800 // Entries : The files and (direct) subfolders in the folder.
1801 Entries []IsMetadata `json:"entries"`
1802 // Cursor : Pass the cursor into `listFolderContinue` to see what's changed
1803 // in the folder since your previous query.
1804 Cursor string `json:"cursor"`
1805 // HasMore : If true, then there are more entries available. Pass the cursor
1806 // to `listFolderContinue` to retrieve the rest.
1807 HasMore bool `json:"has_more"`
1808 }
1809
1810 // NewListFolderResult returns a new ListFolderResult instance
1811 func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bool) *ListFolderResult {
1812 s := new(ListFolderResult)
1813 s.Entries = Entries
1814 s.Cursor = Cursor
1815 s.HasMore = HasMore
1816 return s
1817 }
1818
1819 // UnmarshalJSON deserializes into a ListFolderResult instance
1820 func (u *ListFolderResult) UnmarshalJSON(b []byte) error {
1821 type wrap struct {
1822 // Entries : The files and (direct) subfolders in the folder.
1823 Entries []json.RawMessage `json:"entries"`
1824 // Cursor : Pass the cursor into `listFolderContinue` to see what's
1825 // changed in the folder since your previous query.
1826 Cursor string `json:"cursor"`
1827 // HasMore : If true, then there are more entries available. Pass the
1828 // cursor to `listFolderContinue` to retrieve the rest.
1829 HasMore bool `json:"has_more"`
1830 }
1831 var w wrap
1832 if err := json.Unmarshal(b, &w); err != nil {
1833 return err
1834 }
1835 u.Entries = make([]IsMetadata, len(w.Entries))
1836 for i, e := range w.Entries {
1837 v, err := IsMetadataFromJSON(e)
1838 if err != nil {
1839 return err
1840 }
1841 u.Entries[i] = v
1842 }
1843 u.Cursor = w.Cursor
1844 u.HasMore = w.HasMore
1845 return nil
1846 }
1847
1848 // ListRevisionsArg : has no documentation (yet)
1849 type ListRevisionsArg struct {
1850 // Path : The path to the file you want to see the revisions of.
1851 Path string `json:"path"`
1852 // Mode : Determines the behavior of the API in listing the revisions for a
1853 // given file path or id.
1854 Mode *ListRevisionsMode `json:"mode"`
1855 // Limit : The maximum number of revision entries returned.
1856 Limit uint64 `json:"limit"`
1857 }
1858
1859 // NewListRevisionsArg returns a new ListRevisionsArg instance
1860 func NewListRevisionsArg(Path string) *ListRevisionsArg {
1861 s := new(ListRevisionsArg)
1862 s.Path = Path
1863 s.Mode = &ListRevisionsMode{Tagged: dropbox.Tagged{"path"}}
1864 s.Limit = 10
1865 return s
1866 }
1867
1868 // ListRevisionsError : has no documentation (yet)
1869 type ListRevisionsError struct {
1870 dropbox.Tagged
1871 // Path : has no documentation (yet)
1872 Path *LookupError `json:"path,omitempty"`
1873 }
1874
1875 // Valid tag values for ListRevisionsError
1876 const (
1877 ListRevisionsErrorPath = "path"
1878 ListRevisionsErrorOther = "other"
1879 )
1880
1881 // UnmarshalJSON deserializes into a ListRevisionsError instance
1882 func (u *ListRevisionsError) UnmarshalJSON(body []byte) error {
1883 type wrap struct {
1884 dropbox.Tagged
1885 // Path : has no documentation (yet)
1886 Path json.RawMessage `json:"path,omitempty"`
1887 }
1888 var w wrap
1889 var err error
1890 if err = json.Unmarshal(body, &w); err != nil {
1891 return err
1892 }
1893 u.Tag = w.Tag
1894 switch u.Tag {
1895 case "path":
1896 err = json.Unmarshal(w.Path, &u.Path)
1897
1898 if err != nil {
1899 return err
1900 }
1901 }
1902 return nil
1903 }
1904
1905 // ListRevisionsMode : has no documentation (yet)
1906 type ListRevisionsMode struct {
1907 dropbox.Tagged
1908 }
1909
1910 // Valid tag values for ListRevisionsMode
1911 const (
1912 ListRevisionsModePath = "path"
1913 ListRevisionsModeId = "id"
1914 ListRevisionsModeOther = "other"
1915 )
1916
1917 // ListRevisionsResult : has no documentation (yet)
1918 type ListRevisionsResult struct {
1919 // IsDeleted : If the file identified by the latest revision in the response
1920 // is either deleted or moved.
1921 IsDeleted bool `json:"is_deleted"`
1922 // ServerDeleted : The time of deletion if the file was deleted.
1923 ServerDeleted time.Time `json:"server_deleted,omitempty"`
1924 // Entries : The revisions for the file. Only revisions that are not deleted
1925 // will show up here.
1926 Entries []*FileMetadata `json:"entries"`
1927 }
1928
1929 // NewListRevisionsResult returns a new ListRevisionsResult instance
1930 func NewListRevisionsResult(IsDeleted bool, Entries []*FileMetadata) *ListRevisionsResult {
1931 s := new(ListRevisionsResult)
1932 s.IsDeleted = IsDeleted
1933 s.Entries = Entries
1934 return s
1935 }
1936
1937 // LookupError : has no documentation (yet)
1938 type LookupError struct {
1939 dropbox.Tagged
1940 // MalformedPath : The given path does not satisfy the required path format.
1941 // Please refer to the `Path formats documentation`
1942 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
1943 // for more information.
1944 MalformedPath string `json:"malformed_path,omitempty"`
1945 }
1946
1947 // Valid tag values for LookupError
1948 const (
1949 LookupErrorMalformedPath = "malformed_path"
1950 LookupErrorNotFound = "not_found"
1951 LookupErrorNotFile = "not_file"
1952 LookupErrorNotFolder = "not_folder"
1953 LookupErrorRestrictedContent = "restricted_content"
1954 LookupErrorOther = "other"
1955 )
1956
1957 // UnmarshalJSON deserializes into a LookupError instance
1958 func (u *LookupError) UnmarshalJSON(body []byte) error {
1959 type wrap struct {
1960 dropbox.Tagged
1961 // MalformedPath : The given path does not satisfy the required path
1962 // format. Please refer to the `Path formats documentation`
1963 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
1964 // for more information.
1965 MalformedPath json.RawMessage `json:"malformed_path,omitempty"`
1966 }
1967 var w wrap
1968 var err error
1969 if err = json.Unmarshal(body, &w); err != nil {
1970 return err
1971 }
1972 u.Tag = w.Tag
1973 switch u.Tag {
1974 case "malformed_path":
1975 err = json.Unmarshal(body, &u.MalformedPath)
1976
1977 if err != nil {
1978 return err
1979 }
1980 }
1981 return nil
1982 }
1983
1984 // MediaInfo : has no documentation (yet)
1985 type MediaInfo struct {
1986 dropbox.Tagged
1987 // Metadata : The metadata for the photo/video.
1988 Metadata IsMediaMetadata `json:"metadata,omitempty"`
1989 }
1990
1991 // Valid tag values for MediaInfo
1992 const (
1993 MediaInfoPending = "pending"
1994 MediaInfoMetadata = "metadata"
1995 )
1996
1997 // UnmarshalJSON deserializes into a MediaInfo instance
1998 func (u *MediaInfo) UnmarshalJSON(body []byte) error {
1999 type wrap struct {
2000 dropbox.Tagged
2001 // Metadata : The metadata for the photo/video.
2002 Metadata json.RawMessage `json:"metadata,omitempty"`
2003 }
2004 var w wrap
2005 var err error
2006 if err = json.Unmarshal(body, &w); err != nil {
2007 return err
2008 }
2009 u.Tag = w.Tag
2010 switch u.Tag {
2011 case "metadata":
2012 u.Metadata, err = IsMediaMetadataFromJSON(body)
2013
2014 if err != nil {
2015 return err
2016 }
2017 }
2018 return nil
2019 }
2020
2021 // MediaMetadata : Metadata for a photo or video.
2022 type MediaMetadata struct {
2023 // Dimensions : Dimension of the photo/video.
2024 Dimensions *Dimensions `json:"dimensions,omitempty"`
2025 // Location : The GPS coordinate of the photo/video.
2026 Location *GpsCoordinates `json:"location,omitempty"`
2027 // TimeTaken : The timestamp when the photo/video is taken.
2028 TimeTaken time.Time `json:"time_taken,omitempty"`
2029 }
2030
2031 // NewMediaMetadata returns a new MediaMetadata instance
2032 func NewMediaMetadata() *MediaMetadata {
2033 s := new(MediaMetadata)
2034 return s
2035 }
2036
2037 // IsMediaMetadata is the interface type for MediaMetadata and its subtypes
2038 type IsMediaMetadata interface {
2039 IsMediaMetadata()
2040 }
2041
2042 // IsMediaMetadata implements the IsMediaMetadata interface
2043 func (u *MediaMetadata) IsMediaMetadata() {}
2044
2045 type mediaMetadataUnion struct {
2046 dropbox.Tagged
2047 // Photo : has no documentation (yet)
2048 Photo *PhotoMetadata `json:"photo,omitempty"`
2049 // Video : has no documentation (yet)
2050 Video *VideoMetadata `json:"video,omitempty"`
2051 }
2052
2053 // Valid tag values for MediaMetadata
2054 const (
2055 MediaMetadataPhoto = "photo"
2056 MediaMetadataVideo = "video"
2057 )
2058
2059 // UnmarshalJSON deserializes into a mediaMetadataUnion instance
2060 func (u *mediaMetadataUnion) UnmarshalJSON(body []byte) error {
2061 type wrap struct {
2062 dropbox.Tagged
2063 // Photo : has no documentation (yet)
2064 Photo json.RawMessage `json:"photo,omitempty"`
2065 // Video : has no documentation (yet)
2066 Video json.RawMessage `json:"video,omitempty"`
2067 }
2068 var w wrap
2069 var err error
2070 if err = json.Unmarshal(body, &w); err != nil {
2071 return err
2072 }
2073 u.Tag = w.Tag
2074 switch u.Tag {
2075 case "photo":
2076 err = json.Unmarshal(body, &u.Photo)
2077
2078 if err != nil {
2079 return err
2080 }
2081 case "video":
2082 err = json.Unmarshal(body, &u.Video)
2083
2084 if err != nil {
2085 return err
2086 }
2087 }
2088 return nil
2089 }
2090
2091 // IsMediaMetadataFromJSON converts JSON to a concrete IsMediaMetadata instance
2092 func IsMediaMetadataFromJSON(data []byte) (IsMediaMetadata, error) {
2093 var t mediaMetadataUnion
2094 if err := json.Unmarshal(data, &t); err != nil {
2095 return nil, err
2096 }
2097 switch t.Tag {
2098 case "photo":
2099 return t.Photo, nil
2100
2101 case "video":
2102 return t.Video, nil
2103
2104 }
2105 return nil, nil
2106 }
2107
2108 // RelocationBatchArgBase : has no documentation (yet)
2109 type RelocationBatchArgBase struct {
2110 // Entries : List of entries to be moved or copied. Each entry is
2111 // `RelocationPath`.
2112 Entries []*RelocationPath `json:"entries"`
2113 // Autorename : If there's a conflict with any file, have the Dropbox server
2114 // try to autorename that file to avoid the conflict.
2115 Autorename bool `json:"autorename"`
2116 }
2117
2118 // NewRelocationBatchArgBase returns a new RelocationBatchArgBase instance
2119 func NewRelocationBatchArgBase(Entries []*RelocationPath) *RelocationBatchArgBase {
2120 s := new(RelocationBatchArgBase)
2121 s.Entries = Entries
2122 s.Autorename = false
2123 return s
2124 }
2125
2126 // MoveBatchArg : has no documentation (yet)
2127 type MoveBatchArg struct {
2128 RelocationBatchArgBase
2129 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
2130 // an ownership transfer for the content being moved. This does not apply to
2131 // copies.
2132 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
2133 }
2134
2135 // NewMoveBatchArg returns a new MoveBatchArg instance
2136 func NewMoveBatchArg(Entries []*RelocationPath) *MoveBatchArg {
2137 s := new(MoveBatchArg)
2138 s.Entries = Entries
2139 s.Autorename = false
2140 s.AllowOwnershipTransfer = false
2141 return s
2142 }
2143
2144 // PhotoMetadata : Metadata for a photo.
2145 type PhotoMetadata struct {
2146 MediaMetadata
2147 }
2148
2149 // NewPhotoMetadata returns a new PhotoMetadata instance
2150 func NewPhotoMetadata() *PhotoMetadata {
2151 s := new(PhotoMetadata)
2152 return s
2153 }
2154
2155 // PreviewArg : has no documentation (yet)
2156 type PreviewArg struct {
2157 // Path : The path of the file to preview.
2158 Path string `json:"path"`
2159 // Rev : Please specify revision in `path` instead.
2160 Rev string `json:"rev,omitempty"`
2161 }
2162
2163 // NewPreviewArg returns a new PreviewArg instance
2164 func NewPreviewArg(Path string) *PreviewArg {
2165 s := new(PreviewArg)
2166 s.Path = Path
2167 return s
2168 }
2169
2170 // PreviewError : has no documentation (yet)
2171 type PreviewError struct {
2172 dropbox.Tagged
2173 // Path : An error occurs when downloading metadata for the file.
2174 Path *LookupError `json:"path,omitempty"`
2175 }
2176
2177 // Valid tag values for PreviewError
2178 const (
2179 PreviewErrorPath = "path"
2180 PreviewErrorInProgress = "in_progress"
2181 PreviewErrorUnsupportedExtension = "unsupported_extension"
2182 PreviewErrorUnsupportedContent = "unsupported_content"
2183 )
2184
2185 // UnmarshalJSON deserializes into a PreviewError instance
2186 func (u *PreviewError) UnmarshalJSON(body []byte) error {
2187 type wrap struct {
2188 dropbox.Tagged
2189 // Path : An error occurs when downloading metadata for the file.
2190 Path json.RawMessage `json:"path,omitempty"`
2191 }
2192 var w wrap
2193 var err error
2194 if err = json.Unmarshal(body, &w); err != nil {
2195 return err
2196 }
2197 u.Tag = w.Tag
2198 switch u.Tag {
2199 case "path":
2200 err = json.Unmarshal(w.Path, &u.Path)
2201
2202 if err != nil {
2203 return err
2204 }
2205 }
2206 return nil
2207 }
2208
2209 // RelocationPath : has no documentation (yet)
2210 type RelocationPath struct {
2211 // FromPath : Path in the user's Dropbox to be copied or moved.
2212 FromPath string `json:"from_path"`
2213 // ToPath : Path in the user's Dropbox that is the destination.
2214 ToPath string `json:"to_path"`
2215 }
2216
2217 // NewRelocationPath returns a new RelocationPath instance
2218 func NewRelocationPath(FromPath string, ToPath string) *RelocationPath {
2219 s := new(RelocationPath)
2220 s.FromPath = FromPath
2221 s.ToPath = ToPath
2222 return s
2223 }
2224
2225 // RelocationArg : has no documentation (yet)
2226 type RelocationArg struct {
2227 RelocationPath
2228 // AllowSharedFolder : If true, `copy` will copy contents in shared folder,
2229 // otherwise `RelocationError.cant_copy_shared_folder` will be returned if
2230 // `from_path` contains shared folder. This field is always true for `move`.
2231 AllowSharedFolder bool `json:"allow_shared_folder"`
2232 // Autorename : If there's a conflict, have the Dropbox server try to
2233 // autorename the file to avoid the conflict.
2234 Autorename bool `json:"autorename"`
2235 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
2236 // an ownership transfer for the content being moved. This does not apply to
2237 // copies.
2238 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
2239 }
2240
2241 // NewRelocationArg returns a new RelocationArg instance
2242 func NewRelocationArg(FromPath string, ToPath string) *RelocationArg {
2243 s := new(RelocationArg)
2244 s.FromPath = FromPath
2245 s.ToPath = ToPath
2246 s.AllowSharedFolder = false
2247 s.Autorename = false
2248 s.AllowOwnershipTransfer = false
2249 return s
2250 }
2251
2252 // RelocationBatchArg : has no documentation (yet)
2253 type RelocationBatchArg struct {
2254 RelocationBatchArgBase
2255 // AllowSharedFolder : If true, `copyBatch` will copy contents in shared
2256 // folder, otherwise `RelocationError.cant_copy_shared_folder` will be
2257 // returned if `RelocationPath.from_path` contains shared folder. This field
2258 // is always true for `moveBatch`.
2259 AllowSharedFolder bool `json:"allow_shared_folder"`
2260 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
2261 // an ownership transfer for the content being moved. This does not apply to
2262 // copies.
2263 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
2264 }
2265
2266 // NewRelocationBatchArg returns a new RelocationBatchArg instance
2267 func NewRelocationBatchArg(Entries []*RelocationPath) *RelocationBatchArg {
2268 s := new(RelocationBatchArg)
2269 s.Entries = Entries
2270 s.Autorename = false
2271 s.AllowSharedFolder = false
2272 s.AllowOwnershipTransfer = false
2273 return s
2274 }
2275
2276 // RelocationError : has no documentation (yet)
2277 type RelocationError struct {
2278 dropbox.Tagged
2279 // FromLookup : has no documentation (yet)
2280 FromLookup *LookupError `json:"from_lookup,omitempty"`
2281 // FromWrite : has no documentation (yet)
2282 FromWrite *WriteError `json:"from_write,omitempty"`
2283 // To : has no documentation (yet)
2284 To *WriteError `json:"to,omitempty"`
2285 }
2286
2287 // Valid tag values for RelocationError
2288 const (
2289 RelocationErrorFromLookup = "from_lookup"
2290 RelocationErrorFromWrite = "from_write"
2291 RelocationErrorTo = "to"
2292 RelocationErrorCantCopySharedFolder = "cant_copy_shared_folder"
2293 RelocationErrorCantNestSharedFolder = "cant_nest_shared_folder"
2294 RelocationErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
2295 RelocationErrorTooManyFiles = "too_many_files"
2296 RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
2297 RelocationErrorCantTransferOwnership = "cant_transfer_ownership"
2298 RelocationErrorInsufficientQuota = "insufficient_quota"
2299 RelocationErrorInternalError = "internal_error"
2300 RelocationErrorOther = "other"
2301 )
2302
2303 // UnmarshalJSON deserializes into a RelocationError instance
2304 func (u *RelocationError) UnmarshalJSON(body []byte) error {
2305 type wrap struct {
2306 dropbox.Tagged
2307 // FromLookup : has no documentation (yet)
2308 FromLookup json.RawMessage `json:"from_lookup,omitempty"`
2309 // FromWrite : has no documentation (yet)
2310 FromWrite json.RawMessage `json:"from_write,omitempty"`
2311 // To : has no documentation (yet)
2312 To json.RawMessage `json:"to,omitempty"`
2313 }
2314 var w wrap
2315 var err error
2316 if err = json.Unmarshal(body, &w); err != nil {
2317 return err
2318 }
2319 u.Tag = w.Tag
2320 switch u.Tag {
2321 case "from_lookup":
2322 err = json.Unmarshal(w.FromLookup, &u.FromLookup)
2323
2324 if err != nil {
2325 return err
2326 }
2327 case "from_write":
2328 err = json.Unmarshal(w.FromWrite, &u.FromWrite)
2329
2330 if err != nil {
2331 return err
2332 }
2333 case "to":
2334 err = json.Unmarshal(w.To, &u.To)
2335
2336 if err != nil {
2337 return err
2338 }
2339 }
2340 return nil
2341 }
2342
2343 // RelocationBatchError : has no documentation (yet)
2344 type RelocationBatchError struct {
2345 dropbox.Tagged
2346 // FromLookup : has no documentation (yet)
2347 FromLookup *LookupError `json:"from_lookup,omitempty"`
2348 // FromWrite : has no documentation (yet)
2349 FromWrite *WriteError `json:"from_write,omitempty"`
2350 // To : has no documentation (yet)
2351 To *WriteError `json:"to,omitempty"`
2352 }
2353
2354 // Valid tag values for RelocationBatchError
2355 const (
2356 RelocationBatchErrorFromLookup = "from_lookup"
2357 RelocationBatchErrorFromWrite = "from_write"
2358 RelocationBatchErrorTo = "to"
2359 RelocationBatchErrorCantCopySharedFolder = "cant_copy_shared_folder"
2360 RelocationBatchErrorCantNestSharedFolder = "cant_nest_shared_folder"
2361 RelocationBatchErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
2362 RelocationBatchErrorTooManyFiles = "too_many_files"
2363 RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
2364 RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
2365 RelocationBatchErrorInsufficientQuota = "insufficient_quota"
2366 RelocationBatchErrorInternalError = "internal_error"
2367 RelocationBatchErrorOther = "other"
2368 RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
2369 )
2370
2371 // UnmarshalJSON deserializes into a RelocationBatchError instance
2372 func (u *RelocationBatchError) UnmarshalJSON(body []byte) error {
2373 type wrap struct {
2374 dropbox.Tagged
2375 // FromLookup : has no documentation (yet)
2376 FromLookup json.RawMessage `json:"from_lookup,omitempty"`
2377 // FromWrite : has no documentation (yet)
2378 FromWrite json.RawMessage `json:"from_write,omitempty"`
2379 // To : has no documentation (yet)
2380 To json.RawMessage `json:"to,omitempty"`
2381 }
2382 var w wrap
2383 var err error
2384 if err = json.Unmarshal(body, &w); err != nil {
2385 return err
2386 }
2387 u.Tag = w.Tag
2388 switch u.Tag {
2389 case "from_lookup":
2390 err = json.Unmarshal(w.FromLookup, &u.FromLookup)
2391
2392 if err != nil {
2393 return err
2394 }
2395 case "from_write":
2396 err = json.Unmarshal(w.FromWrite, &u.FromWrite)
2397
2398 if err != nil {
2399 return err
2400 }
2401 case "to":
2402 err = json.Unmarshal(w.To, &u.To)
2403
2404 if err != nil {
2405 return err
2406 }
2407 }
2408 return nil
2409 }
2410
2411 // RelocationBatchErrorEntry : has no documentation (yet)
2412 type RelocationBatchErrorEntry struct {
2413 dropbox.Tagged
2414 // RelocationError : User errors that retry won't help.
2415 RelocationError *RelocationError `json:"relocation_error,omitempty"`
2416 }
2417
2418 // Valid tag values for RelocationBatchErrorEntry
2419 const (
2420 RelocationBatchErrorEntryRelocationError = "relocation_error"
2421 RelocationBatchErrorEntryInternalError = "internal_error"
2422 RelocationBatchErrorEntryTooManyWriteOperations = "too_many_write_operations"
2423 RelocationBatchErrorEntryOther = "other"
2424 )
2425
2426 // UnmarshalJSON deserializes into a RelocationBatchErrorEntry instance
2427 func (u *RelocationBatchErrorEntry) UnmarshalJSON(body []byte) error {
2428 type wrap struct {
2429 dropbox.Tagged
2430 // RelocationError : User errors that retry won't help.
2431 RelocationError json.RawMessage `json:"relocation_error,omitempty"`
2432 }
2433 var w wrap
2434 var err error
2435 if err = json.Unmarshal(body, &w); err != nil {
2436 return err
2437 }
2438 u.Tag = w.Tag
2439 switch u.Tag {
2440 case "relocation_error":
2441 err = json.Unmarshal(w.RelocationError, &u.RelocationError)
2442
2443 if err != nil {
2444 return err
2445 }
2446 }
2447 return nil
2448 }
2449
2450 // RelocationBatchJobStatus : has no documentation (yet)
2451 type RelocationBatchJobStatus struct {
2452 dropbox.Tagged
2453 // Complete : The copy or move batch job has finished.
2454 Complete *RelocationBatchResult `json:"complete,omitempty"`
2455 // Failed : The copy or move batch job has failed with exception.
2456 Failed *RelocationBatchError `json:"failed,omitempty"`
2457 }
2458
2459 // Valid tag values for RelocationBatchJobStatus
2460 const (
2461 RelocationBatchJobStatusInProgress = "in_progress"
2462 RelocationBatchJobStatusComplete = "complete"
2463 RelocationBatchJobStatusFailed = "failed"
2464 )
2465
2466 // UnmarshalJSON deserializes into a RelocationBatchJobStatus instance
2467 func (u *RelocationBatchJobStatus) UnmarshalJSON(body []byte) error {
2468 type wrap struct {
2469 dropbox.Tagged
2470 // Complete : The copy or move batch job has finished.
2471 Complete json.RawMessage `json:"complete,omitempty"`
2472 // Failed : The copy or move batch job has failed with exception.
2473 Failed json.RawMessage `json:"failed,omitempty"`
2474 }
2475 var w wrap
2476 var err error
2477 if err = json.Unmarshal(body, &w); err != nil {
2478 return err
2479 }
2480 u.Tag = w.Tag
2481 switch u.Tag {
2482 case "complete":
2483 err = json.Unmarshal(body, &u.Complete)
2484
2485 if err != nil {
2486 return err
2487 }
2488 case "failed":
2489 err = json.Unmarshal(w.Failed, &u.Failed)
2490
2491 if err != nil {
2492 return err
2493 }
2494 }
2495 return nil
2496 }
2497
2498 // RelocationBatchLaunch : Result returned by `copyBatch` or `moveBatch` that
2499 // may either launch an asynchronous job or complete synchronously.
2500 type RelocationBatchLaunch struct {
2501 dropbox.Tagged
2502 // AsyncJobId : This response indicates that the processing is asynchronous.
2503 // The string is an id that can be used to obtain the status of the
2504 // asynchronous job.
2505 AsyncJobId string `json:"async_job_id,omitempty"`
2506 // Complete : has no documentation (yet)
2507 Complete *RelocationBatchResult `json:"complete,omitempty"`
2508 }
2509
2510 // Valid tag values for RelocationBatchLaunch
2511 const (
2512 RelocationBatchLaunchAsyncJobId = "async_job_id"
2513 RelocationBatchLaunchComplete = "complete"
2514 RelocationBatchLaunchOther = "other"
2515 )
2516
2517 // UnmarshalJSON deserializes into a RelocationBatchLaunch instance
2518 func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error {
2519 type wrap struct {
2520 dropbox.Tagged
2521 // Complete : has no documentation (yet)
2522 Complete json.RawMessage `json:"complete,omitempty"`
2523 }
2524 var w wrap
2525 var err error
2526 if err = json.Unmarshal(body, &w); err != nil {
2527 return err
2528 }
2529 u.Tag = w.Tag
2530 switch u.Tag {
2531 case "async_job_id":
2532 err = json.Unmarshal(body, &u.AsyncJobId)
2533
2534 if err != nil {
2535 return err
2536 }
2537 case "complete":
2538 err = json.Unmarshal(body, &u.Complete)
2539
2540 if err != nil {
2541 return err
2542 }
2543 }
2544 return nil
2545 }
2546
2547 // RelocationBatchResult : has no documentation (yet)
2548 type RelocationBatchResult struct {
2549 FileOpsResult
2550 // Entries : has no documentation (yet)
2551 Entries []*RelocationBatchResultData `json:"entries"`
2552 }
2553
2554 // NewRelocationBatchResult returns a new RelocationBatchResult instance
2555 func NewRelocationBatchResult(Entries []*RelocationBatchResultData) *RelocationBatchResult {
2556 s := new(RelocationBatchResult)
2557 s.Entries = Entries
2558 return s
2559 }
2560
2561 // RelocationBatchResultData : has no documentation (yet)
2562 type RelocationBatchResultData struct {
2563 // Metadata : Metadata of the relocated object.
2564 Metadata IsMetadata `json:"metadata"`
2565 }
2566
2567 // NewRelocationBatchResultData returns a new RelocationBatchResultData instance
2568 func NewRelocationBatchResultData(Metadata IsMetadata) *RelocationBatchResultData {
2569 s := new(RelocationBatchResultData)
2570 s.Metadata = Metadata
2571 return s
2572 }
2573
2574 // UnmarshalJSON deserializes into a RelocationBatchResultData instance
2575 func (u *RelocationBatchResultData) UnmarshalJSON(b []byte) error {
2576 type wrap struct {
2577 // Metadata : Metadata of the relocated object.
2578 Metadata json.RawMessage `json:"metadata"`
2579 }
2580 var w wrap
2581 if err := json.Unmarshal(b, &w); err != nil {
2582 return err
2583 }
2584 Metadata, err := IsMetadataFromJSON(w.Metadata)
2585 if err != nil {
2586 return err
2587 }
2588 u.Metadata = Metadata
2589 return nil
2590 }
2591
2592 // RelocationBatchResultEntry : has no documentation (yet)
2593 type RelocationBatchResultEntry struct {
2594 dropbox.Tagged
2595 // Success : has no documentation (yet)
2596 Success IsMetadata `json:"success,omitempty"`
2597 // Failure : has no documentation (yet)
2598 Failure *RelocationBatchErrorEntry `json:"failure,omitempty"`
2599 }
2600
2601 // Valid tag values for RelocationBatchResultEntry
2602 const (
2603 RelocationBatchResultEntrySuccess = "success"
2604 RelocationBatchResultEntryFailure = "failure"
2605 RelocationBatchResultEntryOther = "other"
2606 )
2607
2608 // UnmarshalJSON deserializes into a RelocationBatchResultEntry instance
2609 func (u *RelocationBatchResultEntry) UnmarshalJSON(body []byte) error {
2610 type wrap struct {
2611 dropbox.Tagged
2612 // Success : has no documentation (yet)
2613 Success json.RawMessage `json:"success,omitempty"`
2614 // Failure : has no documentation (yet)
2615 Failure json.RawMessage `json:"failure,omitempty"`
2616 }
2617 var w wrap
2618 var err error
2619 if err = json.Unmarshal(body, &w); err != nil {
2620 return err
2621 }
2622 u.Tag = w.Tag
2623 switch u.Tag {
2624 case "success":
2625 u.Success, err = IsMetadataFromJSON(body)
2626
2627 if err != nil {
2628 return err
2629 }
2630 case "failure":
2631 err = json.Unmarshal(w.Failure, &u.Failure)
2632
2633 if err != nil {
2634 return err
2635 }
2636 }
2637 return nil
2638 }
2639
2640 // RelocationBatchV2JobStatus : Result returned by `copyBatch` or `moveBatch`
2641 // that may either launch an asynchronous job or complete synchronously.
2642 type RelocationBatchV2JobStatus struct {
2643 dropbox.Tagged
2644 // Complete : The copy or move batch job has finished.
2645 Complete *RelocationBatchV2Result `json:"complete,omitempty"`
2646 }
2647
2648 // Valid tag values for RelocationBatchV2JobStatus
2649 const (
2650 RelocationBatchV2JobStatusInProgress = "in_progress"
2651 RelocationBatchV2JobStatusComplete = "complete"
2652 )
2653
2654 // UnmarshalJSON deserializes into a RelocationBatchV2JobStatus instance
2655 func (u *RelocationBatchV2JobStatus) UnmarshalJSON(body []byte) error {
2656 type wrap struct {
2657 dropbox.Tagged
2658 // Complete : The copy or move batch job has finished.
2659 Complete json.RawMessage `json:"complete,omitempty"`
2660 }
2661 var w wrap
2662 var err error
2663 if err = json.Unmarshal(body, &w); err != nil {
2664 return err
2665 }
2666 u.Tag = w.Tag
2667 switch u.Tag {
2668 case "complete":
2669 err = json.Unmarshal(body, &u.Complete)
2670
2671 if err != nil {
2672 return err
2673 }
2674 }
2675 return nil
2676 }
2677
2678 // RelocationBatchV2Launch : Result returned by `copyBatch` or `moveBatch` that
2679 // may either launch an asynchronous job or complete synchronously.
2680 type RelocationBatchV2Launch struct {
2681 dropbox.Tagged
2682 // AsyncJobId : This response indicates that the processing is asynchronous.
2683 // The string is an id that can be used to obtain the status of the
2684 // asynchronous job.
2685 AsyncJobId string `json:"async_job_id,omitempty"`
2686 // Complete : has no documentation (yet)
2687 Complete *RelocationBatchV2Result `json:"complete,omitempty"`
2688 }
2689
2690 // Valid tag values for RelocationBatchV2Launch
2691 const (
2692 RelocationBatchV2LaunchAsyncJobId = "async_job_id"
2693 RelocationBatchV2LaunchComplete = "complete"
2694 )
2695
2696 // UnmarshalJSON deserializes into a RelocationBatchV2Launch instance
2697 func (u *RelocationBatchV2Launch) UnmarshalJSON(body []byte) error {
2698 type wrap struct {
2699 dropbox.Tagged
2700 // Complete : has no documentation (yet)
2701 Complete json.RawMessage `json:"complete,omitempty"`
2702 }
2703 var w wrap
2704 var err error
2705 if err = json.Unmarshal(body, &w); err != nil {
2706 return err
2707 }
2708 u.Tag = w.Tag
2709 switch u.Tag {
2710 case "async_job_id":
2711 err = json.Unmarshal(body, &u.AsyncJobId)
2712
2713 if err != nil {
2714 return err
2715 }
2716 case "complete":
2717 err = json.Unmarshal(body, &u.Complete)
2718
2719 if err != nil {
2720 return err
2721 }
2722 }
2723 return nil
2724 }
2725
2726 // RelocationBatchV2Result : has no documentation (yet)
2727 type RelocationBatchV2Result struct {
2728 FileOpsResult
2729 // Entries : Each entry in CopyBatchArg.entries or `MoveBatchArg.entries`
2730 // will appear at the same position inside
2731 // `RelocationBatchV2Result.entries`.
2732 Entries []*RelocationBatchResultEntry `json:"entries"`
2733 }
2734
2735 // NewRelocationBatchV2Result returns a new RelocationBatchV2Result instance
2736 func NewRelocationBatchV2Result(Entries []*RelocationBatchResultEntry) *RelocationBatchV2Result {
2737 s := new(RelocationBatchV2Result)
2738 s.Entries = Entries
2739 return s
2740 }
2741
2742 // RelocationResult : has no documentation (yet)
2743 type RelocationResult struct {
2744 FileOpsResult
2745 // Metadata : Metadata of the relocated object.
2746 Metadata IsMetadata `json:"metadata"`
2747 }
2748
2749 // NewRelocationResult returns a new RelocationResult instance
2750 func NewRelocationResult(Metadata IsMetadata) *RelocationResult {
2751 s := new(RelocationResult)
2752 s.Metadata = Metadata
2753 return s
2754 }
2755
2756 // UnmarshalJSON deserializes into a RelocationResult instance
2757 func (u *RelocationResult) UnmarshalJSON(b []byte) error {
2758 type wrap struct {
2759 // Metadata : Metadata of the relocated object.
2760 Metadata json.RawMessage `json:"metadata"`
2761 }
2762 var w wrap
2763 if err := json.Unmarshal(b, &w); err != nil {
2764 return err
2765 }
2766 Metadata, err := IsMetadataFromJSON(w.Metadata)
2767 if err != nil {
2768 return err
2769 }
2770 u.Metadata = Metadata
2771 return nil
2772 }
2773
2774 // RestoreArg : has no documentation (yet)
2775 type RestoreArg struct {
2776 // Path : The path to save the restored file.
2777 Path string `json:"path"`
2778 // Rev : The revision to restore.
2779 Rev string `json:"rev"`
2780 }
2781
2782 // NewRestoreArg returns a new RestoreArg instance
2783 func NewRestoreArg(Path string, Rev string) *RestoreArg {
2784 s := new(RestoreArg)
2785 s.Path = Path
2786 s.Rev = Rev
2787 return s
2788 }
2789
2790 // RestoreError : has no documentation (yet)
2791 type RestoreError struct {
2792 dropbox.Tagged
2793 // PathLookup : An error occurs when downloading metadata for the file.
2794 PathLookup *LookupError `json:"path_lookup,omitempty"`
2795 // PathWrite : An error occurs when trying to restore the file to that path.
2796 PathWrite *WriteError `json:"path_write,omitempty"`
2797 }
2798
2799 // Valid tag values for RestoreError
2800 const (
2801 RestoreErrorPathLookup = "path_lookup"
2802 RestoreErrorPathWrite = "path_write"
2803 RestoreErrorInvalidRevision = "invalid_revision"
2804 RestoreErrorOther = "other"
2805 )
2806
2807 // UnmarshalJSON deserializes into a RestoreError instance
2808 func (u *RestoreError) UnmarshalJSON(body []byte) error {
2809 type wrap struct {
2810 dropbox.Tagged
2811 // PathLookup : An error occurs when downloading metadata for the file.
2812 PathLookup json.RawMessage `json:"path_lookup,omitempty"`
2813 // PathWrite : An error occurs when trying to restore the file to that
2814 // path.
2815 PathWrite json.RawMessage `json:"path_write,omitempty"`
2816 }
2817 var w wrap
2818 var err error
2819 if err = json.Unmarshal(body, &w); err != nil {
2820 return err
2821 }
2822 u.Tag = w.Tag
2823 switch u.Tag {
2824 case "path_lookup":
2825 err = json.Unmarshal(w.PathLookup, &u.PathLookup)
2826
2827 if err != nil {
2828 return err
2829 }
2830 case "path_write":
2831 err = json.Unmarshal(w.PathWrite, &u.PathWrite)
2832
2833 if err != nil {
2834 return err
2835 }
2836 }
2837 return nil
2838 }
2839
2840 // SaveCopyReferenceArg : has no documentation (yet)
2841 type SaveCopyReferenceArg struct {
2842 // CopyReference : A copy reference returned by `copyReferenceGet`.
2843 CopyReference string `json:"copy_reference"`
2844 // Path : Path in the user's Dropbox that is the destination.
2845 Path string `json:"path"`
2846 }
2847
2848 // NewSaveCopyReferenceArg returns a new SaveCopyReferenceArg instance
2849 func NewSaveCopyReferenceArg(CopyReference string, Path string) *SaveCopyReferenceArg {
2850 s := new(SaveCopyReferenceArg)
2851 s.CopyReference = CopyReference
2852 s.Path = Path
2853 return s
2854 }
2855
2856 // SaveCopyReferenceError : has no documentation (yet)
2857 type SaveCopyReferenceError struct {
2858 dropbox.Tagged
2859 // Path : has no documentation (yet)
2860 Path *WriteError `json:"path,omitempty"`
2861 }
2862
2863 // Valid tag values for SaveCopyReferenceError
2864 const (
2865 SaveCopyReferenceErrorPath = "path"
2866 SaveCopyReferenceErrorInvalidCopyReference = "invalid_copy_reference"
2867 SaveCopyReferenceErrorNoPermission = "no_permission"
2868 SaveCopyReferenceErrorNotFound = "not_found"
2869 SaveCopyReferenceErrorTooManyFiles = "too_many_files"
2870 SaveCopyReferenceErrorOther = "other"
2871 )
2872
2873 // UnmarshalJSON deserializes into a SaveCopyReferenceError instance
2874 func (u *SaveCopyReferenceError) UnmarshalJSON(body []byte) error {
2875 type wrap struct {
2876 dropbox.Tagged
2877 // Path : has no documentation (yet)
2878 Path json.RawMessage `json:"path,omitempty"`
2879 }
2880 var w wrap
2881 var err error
2882 if err = json.Unmarshal(body, &w); err != nil {
2883 return err
2884 }
2885 u.Tag = w.Tag
2886 switch u.Tag {
2887 case "path":
2888 err = json.Unmarshal(w.Path, &u.Path)
2889
2890 if err != nil {
2891 return err
2892 }
2893 }
2894 return nil
2895 }
2896
2897 // SaveCopyReferenceResult : has no documentation (yet)
2898 type SaveCopyReferenceResult struct {
2899 // Metadata : The metadata of the saved file or folder in the user's
2900 // Dropbox.
2901 Metadata IsMetadata `json:"metadata"`
2902 }
2903
2904 // NewSaveCopyReferenceResult returns a new SaveCopyReferenceResult instance
2905 func NewSaveCopyReferenceResult(Metadata IsMetadata) *SaveCopyReferenceResult {
2906 s := new(SaveCopyReferenceResult)
2907 s.Metadata = Metadata
2908 return s
2909 }
2910
2911 // UnmarshalJSON deserializes into a SaveCopyReferenceResult instance
2912 func (u *SaveCopyReferenceResult) UnmarshalJSON(b []byte) error {
2913 type wrap struct {
2914 // Metadata : The metadata of the saved file or folder in the user's
2915 // Dropbox.
2916 Metadata json.RawMessage `json:"metadata"`
2917 }
2918 var w wrap
2919 if err := json.Unmarshal(b, &w); err != nil {
2920 return err
2921 }
2922 Metadata, err := IsMetadataFromJSON(w.Metadata)
2923 if err != nil {
2924 return err
2925 }
2926 u.Metadata = Metadata
2927 return nil
2928 }
2929
2930 // SaveUrlArg : has no documentation (yet)
2931 type SaveUrlArg struct {
2932 // Path : The path in Dropbox where the URL will be saved to.
2933 Path string `json:"path"`
2934 // Url : The URL to be saved.
2935 Url string `json:"url"`
2936 }
2937
2938 // NewSaveUrlArg returns a new SaveUrlArg instance
2939 func NewSaveUrlArg(Path string, Url string) *SaveUrlArg {
2940 s := new(SaveUrlArg)
2941 s.Path = Path
2942 s.Url = Url
2943 return s
2944 }
2945
2946 // SaveUrlError : has no documentation (yet)
2947 type SaveUrlError struct {
2948 dropbox.Tagged
2949 // Path : has no documentation (yet)
2950 Path *WriteError `json:"path,omitempty"`
2951 }
2952
2953 // Valid tag values for SaveUrlError
2954 const (
2955 SaveUrlErrorPath = "path"
2956 SaveUrlErrorDownloadFailed = "download_failed"
2957 SaveUrlErrorInvalidUrl = "invalid_url"
2958 SaveUrlErrorNotFound = "not_found"
2959 SaveUrlErrorOther = "other"
2960 )
2961
2962 // UnmarshalJSON deserializes into a SaveUrlError instance
2963 func (u *SaveUrlError) UnmarshalJSON(body []byte) error {
2964 type wrap struct {
2965 dropbox.Tagged
2966 // Path : has no documentation (yet)
2967 Path json.RawMessage `json:"path,omitempty"`
2968 }
2969 var w wrap
2970 var err error
2971 if err = json.Unmarshal(body, &w); err != nil {
2972 return err
2973 }
2974 u.Tag = w.Tag
2975 switch u.Tag {
2976 case "path":
2977 err = json.Unmarshal(w.Path, &u.Path)
2978
2979 if err != nil {
2980 return err
2981 }
2982 }
2983 return nil
2984 }
2985
2986 // SaveUrlJobStatus : has no documentation (yet)
2987 type SaveUrlJobStatus struct {
2988 dropbox.Tagged
2989 // Complete : Metadata of the file where the URL is saved to.
2990 Complete *FileMetadata `json:"complete,omitempty"`
2991 // Failed : has no documentation (yet)
2992 Failed *SaveUrlError `json:"failed,omitempty"`
2993 }
2994
2995 // Valid tag values for SaveUrlJobStatus
2996 const (
2997 SaveUrlJobStatusInProgress = "in_progress"
2998 SaveUrlJobStatusComplete = "complete"
2999 SaveUrlJobStatusFailed = "failed"
3000 )
3001
3002 // UnmarshalJSON deserializes into a SaveUrlJobStatus instance
3003 func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error {
3004 type wrap struct {
3005 dropbox.Tagged
3006 // Complete : Metadata of the file where the URL is saved to.
3007 Complete json.RawMessage `json:"complete,omitempty"`
3008 // Failed : has no documentation (yet)
3009 Failed json.RawMessage `json:"failed,omitempty"`
3010 }
3011 var w wrap
3012 var err error
3013 if err = json.Unmarshal(body, &w); err != nil {
3014 return err
3015 }
3016 u.Tag = w.Tag
3017 switch u.Tag {
3018 case "complete":
3019 err = json.Unmarshal(body, &u.Complete)
3020
3021 if err != nil {
3022 return err
3023 }
3024 case "failed":
3025 err = json.Unmarshal(w.Failed, &u.Failed)
3026
3027 if err != nil {
3028 return err
3029 }
3030 }
3031 return nil
3032 }
3033
3034 // SaveUrlResult : has no documentation (yet)
3035 type SaveUrlResult struct {
3036 dropbox.Tagged
3037 // AsyncJobId : This response indicates that the processing is asynchronous.
3038 // The string is an id that can be used to obtain the status of the
3039 // asynchronous job.
3040 AsyncJobId string `json:"async_job_id,omitempty"`
3041 // Complete : Metadata of the file where the URL is saved to.
3042 Complete *FileMetadata `json:"complete,omitempty"`
3043 }
3044
3045 // Valid tag values for SaveUrlResult
3046 const (
3047 SaveUrlResultAsyncJobId = "async_job_id"
3048 SaveUrlResultComplete = "complete"
3049 )
3050
3051 // UnmarshalJSON deserializes into a SaveUrlResult instance
3052 func (u *SaveUrlResult) UnmarshalJSON(body []byte) error {
3053 type wrap struct {
3054 dropbox.Tagged
3055 // Complete : Metadata of the file where the URL is saved to.
3056 Complete json.RawMessage `json:"complete,omitempty"`
3057 }
3058 var w wrap
3059 var err error
3060 if err = json.Unmarshal(body, &w); err != nil {
3061 return err
3062 }
3063 u.Tag = w.Tag
3064 switch u.Tag {
3065 case "async_job_id":
3066 err = json.Unmarshal(body, &u.AsyncJobId)
3067
3068 if err != nil {
3069 return err
3070 }
3071 case "complete":
3072 err = json.Unmarshal(body, &u.Complete)
3073
3074 if err != nil {
3075 return err
3076 }
3077 }
3078 return nil
3079 }
3080
3081 // SearchArg : has no documentation (yet)
3082 type SearchArg struct {
3083 // Path : The path in the user's Dropbox to search. Should probably be a
3084 // folder.
3085 Path string `json:"path"`
3086 // Query : The string to search for. The search string is split on spaces
3087 // into multiple tokens. For file name searching, the last token is used for
3088 // prefix matching (i.e. "bat c" matches "bat cave" but not "batman car").
3089 Query string `json:"query"`
3090 // Start : The starting index within the search results (used for paging).
3091 Start uint64 `json:"start"`
3092 // MaxResults : The maximum number of search results to return.
3093 MaxResults uint64 `json:"max_results"`
3094 // Mode : The search mode (filename, filename_and_content, or
3095 // deleted_filename). Note that searching file content is only available for
3096 // Dropbox Business accounts.
3097 Mode *SearchMode `json:"mode"`
3098 }
3099
3100 // NewSearchArg returns a new SearchArg instance
3101 func NewSearchArg(Path string, Query string) *SearchArg {
3102 s := new(SearchArg)
3103 s.Path = Path
3104 s.Query = Query
3105 s.Start = 0
3106 s.MaxResults = 100
3107 s.Mode = &SearchMode{Tagged: dropbox.Tagged{"filename"}}
3108 return s
3109 }
3110
3111 // SearchError : has no documentation (yet)
3112 type SearchError struct {
3113 dropbox.Tagged
3114 // Path : has no documentation (yet)
3115 Path *LookupError `json:"path,omitempty"`
3116 }
3117
3118 // Valid tag values for SearchError
3119 const (
3120 SearchErrorPath = "path"
3121 SearchErrorOther = "other"
3122 )
3123
3124 // UnmarshalJSON deserializes into a SearchError instance
3125 func (u *SearchError) UnmarshalJSON(body []byte) error {
3126 type wrap struct {
3127 dropbox.Tagged
3128 // Path : has no documentation (yet)
3129 Path json.RawMessage `json:"path,omitempty"`
3130 }
3131 var w wrap
3132 var err error
3133 if err = json.Unmarshal(body, &w); err != nil {
3134 return err
3135 }
3136 u.Tag = w.Tag
3137 switch u.Tag {
3138 case "path":
3139 err = json.Unmarshal(w.Path, &u.Path)
3140
3141 if err != nil {
3142 return err
3143 }
3144 }
3145 return nil
3146 }
3147
3148 // SearchMatch : has no documentation (yet)
3149 type SearchMatch struct {
3150 // MatchType : The type of the match.
3151 MatchType *SearchMatchType `json:"match_type"`
3152 // Metadata : The metadata for the matched file or folder.
3153 Metadata IsMetadata `json:"metadata"`
3154 }
3155
3156 // NewSearchMatch returns a new SearchMatch instance
3157 func NewSearchMatch(MatchType *SearchMatchType, Metadata IsMetadata) *SearchMatch {
3158 s := new(SearchMatch)
3159 s.MatchType = MatchType
3160 s.Metadata = Metadata
3161 return s
3162 }
3163
3164 // UnmarshalJSON deserializes into a SearchMatch instance
3165 func (u *SearchMatch) UnmarshalJSON(b []byte) error {
3166 type wrap struct {
3167 // MatchType : The type of the match.
3168 MatchType *SearchMatchType `json:"match_type"`
3169 // Metadata : The metadata for the matched file or folder.
3170 Metadata json.RawMessage `json:"metadata"`
3171 }
3172 var w wrap
3173 if err := json.Unmarshal(b, &w); err != nil {
3174 return err
3175 }
3176 u.MatchType = w.MatchType
3177 Metadata, err := IsMetadataFromJSON(w.Metadata)
3178 if err != nil {
3179 return err
3180 }
3181 u.Metadata = Metadata
3182 return nil
3183 }
3184
3185 // SearchMatchType : Indicates what type of match was found for a given item.
3186 type SearchMatchType struct {
3187 dropbox.Tagged
3188 }
3189
3190 // Valid tag values for SearchMatchType
3191 const (
3192 SearchMatchTypeFilename = "filename"
3193 SearchMatchTypeContent = "content"
3194 SearchMatchTypeBoth = "both"
3195 )
3196
3197 // SearchMode : has no documentation (yet)
3198 type SearchMode struct {
3199 dropbox.Tagged
3200 }
3201
3202 // Valid tag values for SearchMode
3203 const (
3204 SearchModeFilename = "filename"
3205 SearchModeFilenameAndContent = "filename_and_content"
3206 SearchModeDeletedFilename = "deleted_filename"
3207 )
3208
3209 // SearchResult : has no documentation (yet)
3210 type SearchResult struct {
3211 // Matches : A list (possibly empty) of matches for the query.
3212 Matches []*SearchMatch `json:"matches"`
3213 // More : Used for paging. If true, indicates there is another page of
3214 // results available that can be fetched by calling `search` again.
3215 More bool `json:"more"`
3216 // Start : Used for paging. Value to set the start argument to when calling
3217 // `search` to fetch the next page of results.
3218 Start uint64 `json:"start"`
3219 }
3220
3221 // NewSearchResult returns a new SearchResult instance
3222 func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchResult {
3223 s := new(SearchResult)
3224 s.Matches = Matches
3225 s.More = More
3226 s.Start = Start
3227 return s
3228 }
3229
3230 // SharedLink : has no documentation (yet)
3231 type SharedLink struct {
3232 // Url : Shared link url.
3233 Url string `json:"url"`
3234 // Password : Password for the shared link.
3235 Password string `json:"password,omitempty"`
3236 }
3237
3238 // NewSharedLink returns a new SharedLink instance
3239 func NewSharedLink(Url string) *SharedLink {
3240 s := new(SharedLink)
3241 s.Url = Url
3242 return s
3243 }
3244
3245 // SymlinkInfo : has no documentation (yet)
3246 type SymlinkInfo struct {
3247 // Target : The target this symlink points to.
3248 Target string `json:"target"`
3249 }
3250
3251 // NewSymlinkInfo returns a new SymlinkInfo instance
3252 func NewSymlinkInfo(Target string) *SymlinkInfo {
3253 s := new(SymlinkInfo)
3254 s.Target = Target
3255 return s
3256 }
3257
3258 // SyncSetting : has no documentation (yet)
3259 type SyncSetting struct {
3260 dropbox.Tagged
3261 }
3262
3263 // Valid tag values for SyncSetting
3264 const (
3265 SyncSettingDefault = "default"
3266 SyncSettingNotSynced = "not_synced"
3267 SyncSettingNotSyncedInactive = "not_synced_inactive"
3268 SyncSettingOther = "other"
3269 )
3270
3271 // SyncSettingArg : has no documentation (yet)
3272 type SyncSettingArg struct {
3273 dropbox.Tagged
3274 }
3275
3276 // Valid tag values for SyncSettingArg
3277 const (
3278 SyncSettingArgDefault = "default"
3279 SyncSettingArgNotSynced = "not_synced"
3280 SyncSettingArgOther = "other"
3281 )
3282
3283 // SyncSettingsError : has no documentation (yet)
3284 type SyncSettingsError struct {
3285 dropbox.Tagged
3286 // Path : has no documentation (yet)
3287 Path *LookupError `json:"path,omitempty"`
3288 }
3289
3290 // Valid tag values for SyncSettingsError
3291 const (
3292 SyncSettingsErrorPath = "path"
3293 SyncSettingsErrorUnsupportedCombination = "unsupported_combination"
3294 SyncSettingsErrorUnsupportedConfiguration = "unsupported_configuration"
3295 SyncSettingsErrorOther = "other"
3296 )
3297
3298 // UnmarshalJSON deserializes into a SyncSettingsError instance
3299 func (u *SyncSettingsError) UnmarshalJSON(body []byte) error {
3300 type wrap struct {
3301 dropbox.Tagged
3302 // Path : has no documentation (yet)
3303 Path json.RawMessage `json:"path,omitempty"`
3304 }
3305 var w wrap
3306 var err error
3307 if err = json.Unmarshal(body, &w); err != nil {
3308 return err
3309 }
3310 u.Tag = w.Tag
3311 switch u.Tag {
3312 case "path":
3313 err = json.Unmarshal(w.Path, &u.Path)
3314
3315 if err != nil {
3316 return err
3317 }
3318 }
3319 return nil
3320 }
3321
3322 // ThumbnailArg : has no documentation (yet)
3323 type ThumbnailArg struct {
3324 // Path : The path to the image file you want to thumbnail.
3325 Path string `json:"path"`
3326 // Format : The format for the thumbnail image, jpeg (default) or png. For
3327 // images that are photos, jpeg should be preferred, while png is better
3328 // for screenshots and digital arts.
3329 Format *ThumbnailFormat `json:"format"`
3330 // Size : The size for the thumbnail image.
3331 Size *ThumbnailSize `json:"size"`
3332 // Mode : How to resize and crop the image to achieve the desired size.
3333 Mode *ThumbnailMode `json:"mode"`
3334 }
3335
3336 // NewThumbnailArg returns a new ThumbnailArg instance
3337 func NewThumbnailArg(Path string) *ThumbnailArg {
3338 s := new(ThumbnailArg)
3339 s.Path = Path
3340 s.Format = &ThumbnailFormat{Tagged: dropbox.Tagged{"jpeg"}}
3341 s.Size = &ThumbnailSize{Tagged: dropbox.Tagged{"w64h64"}}
3342 s.Mode = &ThumbnailMode{Tagged: dropbox.Tagged{"strict"}}
3343 return s
3344 }
3345
3346 // ThumbnailError : has no documentation (yet)
3347 type ThumbnailError struct {
3348 dropbox.Tagged
3349 // Path : An error occurs when downloading metadata for the image.
3350 Path *LookupError `json:"path,omitempty"`
3351 }
3352
3353 // Valid tag values for ThumbnailError
3354 const (
3355 ThumbnailErrorPath = "path"
3356 ThumbnailErrorUnsupportedExtension = "unsupported_extension"
3357 ThumbnailErrorUnsupportedImage = "unsupported_image"
3358 ThumbnailErrorConversionError = "conversion_error"
3359 )
3360
3361 // UnmarshalJSON deserializes into a ThumbnailError instance
3362 func (u *ThumbnailError) UnmarshalJSON(body []byte) error {
3363 type wrap struct {
3364 dropbox.Tagged
3365 // Path : An error occurs when downloading metadata for the image.
3366 Path json.RawMessage `json:"path,omitempty"`
3367 }
3368 var w wrap
3369 var err error
3370 if err = json.Unmarshal(body, &w); err != nil {
3371 return err
3372 }
3373 u.Tag = w.Tag
3374 switch u.Tag {
3375 case "path":
3376 err = json.Unmarshal(w.Path, &u.Path)
3377
3378 if err != nil {
3379 return err
3380 }
3381 }
3382 return nil
3383 }
3384
3385 // ThumbnailFormat : has no documentation (yet)
3386 type ThumbnailFormat struct {
3387 dropbox.Tagged
3388 }
3389
3390 // Valid tag values for ThumbnailFormat
3391 const (
3392 ThumbnailFormatJpeg = "jpeg"
3393 ThumbnailFormatPng = "png"
3394 )
3395
3396 // ThumbnailMode : has no documentation (yet)
3397 type ThumbnailMode struct {
3398 dropbox.Tagged
3399 }
3400
3401 // Valid tag values for ThumbnailMode
3402 const (
3403 ThumbnailModeStrict = "strict"
3404 ThumbnailModeBestfit = "bestfit"
3405 ThumbnailModeFitoneBestfit = "fitone_bestfit"
3406 )
3407
3408 // ThumbnailSize : has no documentation (yet)
3409 type ThumbnailSize struct {
3410 dropbox.Tagged
3411 }
3412
3413 // Valid tag values for ThumbnailSize
3414 const (
3415 ThumbnailSizeW32h32 = "w32h32"
3416 ThumbnailSizeW64h64 = "w64h64"
3417 ThumbnailSizeW128h128 = "w128h128"
3418 ThumbnailSizeW256h256 = "w256h256"
3419 ThumbnailSizeW480h320 = "w480h320"
3420 ThumbnailSizeW640h480 = "w640h480"
3421 ThumbnailSizeW960h640 = "w960h640"
3422 ThumbnailSizeW1024h768 = "w1024h768"
3423 ThumbnailSizeW2048h1536 = "w2048h1536"
3424 )
3425
3426 // UploadError : has no documentation (yet)
3427 type UploadError struct {
3428 dropbox.Tagged
3429 // Path : Unable to save the uploaded contents to a file.
3430 Path *UploadWriteFailed `json:"path,omitempty"`
3431 // PropertiesError : The supplied property group is invalid. The file has
3432 // uploaded without property groups.
3433 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
3434 }
3435
3436 // Valid tag values for UploadError
3437 const (
3438 UploadErrorPath = "path"
3439 UploadErrorPropertiesError = "properties_error"
3440 UploadErrorOther = "other"
3441 )
3442
3443 // UnmarshalJSON deserializes into a UploadError instance
3444 func (u *UploadError) UnmarshalJSON(body []byte) error {
3445 type wrap struct {
3446 dropbox.Tagged
3447 // Path : Unable to save the uploaded contents to a file.
3448 Path json.RawMessage `json:"path,omitempty"`
3449 // PropertiesError : The supplied property group is invalid. The file
3450 // has uploaded without property groups.
3451 PropertiesError json.RawMessage `json:"properties_error,omitempty"`
3452 }
3453 var w wrap
3454 var err error
3455 if err = json.Unmarshal(body, &w); err != nil {
3456 return err
3457 }
3458 u.Tag = w.Tag
3459 switch u.Tag {
3460 case "path":
3461 err = json.Unmarshal(body, &u.Path)
3462
3463 if err != nil {
3464 return err
3465 }
3466 case "properties_error":
3467 err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
3468
3469 if err != nil {
3470 return err
3471 }
3472 }
3473 return nil
3474 }
3475
3476 // UploadErrorWithProperties : has no documentation (yet)
3477 type UploadErrorWithProperties struct {
3478 dropbox.Tagged
3479 // Path : Unable to save the uploaded contents to a file.
3480 Path *UploadWriteFailed `json:"path,omitempty"`
3481 // PropertiesError : The supplied property group is invalid. The file has
3482 // uploaded without property groups.
3483 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
3484 }
3485
3486 // Valid tag values for UploadErrorWithProperties
3487 const (
3488 UploadErrorWithPropertiesPath = "path"
3489 UploadErrorWithPropertiesPropertiesError = "properties_error"
3490 UploadErrorWithPropertiesOther = "other"
3491 )
3492
3493 // UnmarshalJSON deserializes into a UploadErrorWithProperties instance
3494 func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
3495 type wrap struct {
3496 dropbox.Tagged
3497 // Path : Unable to save the uploaded contents to a file.
3498 Path json.RawMessage `json:"path,omitempty"`
3499 // PropertiesError : The supplied property group is invalid. The file
3500 // has uploaded without property groups.
3501 PropertiesError json.RawMessage `json:"properties_error,omitempty"`
3502 }
3503 var w wrap
3504 var err error
3505 if err = json.Unmarshal(body, &w); err != nil {
3506 return err
3507 }
3508 u.Tag = w.Tag
3509 switch u.Tag {
3510 case "path":
3511 err = json.Unmarshal(body, &u.Path)
3512
3513 if err != nil {
3514 return err
3515 }
3516 case "properties_error":
3517 err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
3518
3519 if err != nil {
3520 return err
3521 }
3522 }
3523 return nil
3524 }
3525
3526 // UploadSessionAppendArg : has no documentation (yet)
3527 type UploadSessionAppendArg struct {
3528 // Cursor : Contains the upload session ID and the offset.
3529 Cursor *UploadSessionCursor `json:"cursor"`
3530 // Close : If true, the current session will be closed, at which point you
3531 // won't be able to call `uploadSessionAppend` anymore with the current
3532 // session.
3533 Close bool `json:"close"`
3534 }
3535
3536 // NewUploadSessionAppendArg returns a new UploadSessionAppendArg instance
3537 func NewUploadSessionAppendArg(Cursor *UploadSessionCursor) *UploadSessionAppendArg {
3538 s := new(UploadSessionAppendArg)
3539 s.Cursor = Cursor
3540 s.Close = false
3541 return s
3542 }
3543
3544 // UploadSessionCursor : has no documentation (yet)
3545 type UploadSessionCursor struct {
3546 // SessionId : The upload session ID (returned by `uploadSessionStart`).
3547 SessionId string `json:"session_id"`
3548 // Offset : The amount of data that has been uploaded so far. We use this to
3549 // make sure upload data isn't lost or duplicated in the event of a network
3550 // error.
3551 Offset uint64 `json:"offset"`
3552 }
3553
3554 // NewUploadSessionCursor returns a new UploadSessionCursor instance
3555 func NewUploadSessionCursor(SessionId string, Offset uint64) *UploadSessionCursor {
3556 s := new(UploadSessionCursor)
3557 s.SessionId = SessionId
3558 s.Offset = Offset
3559 return s
3560 }
3561
3562 // UploadSessionFinishArg : has no documentation (yet)
3563 type UploadSessionFinishArg struct {
3564 // Cursor : Contains the upload session ID and the offset.
3565 Cursor *UploadSessionCursor `json:"cursor"`
3566 // Commit : Contains the path and other optional modifiers for the commit.
3567 Commit *CommitInfo `json:"commit"`
3568 }
3569
3570 // NewUploadSessionFinishArg returns a new UploadSessionFinishArg instance
3571 func NewUploadSessionFinishArg(Cursor *UploadSessionCursor, Commit *CommitInfo) *UploadSessionFinishArg {
3572 s := new(UploadSessionFinishArg)
3573 s.Cursor = Cursor
3574 s.Commit = Commit
3575 return s
3576 }
3577
3578 // UploadSessionFinishBatchArg : has no documentation (yet)
3579 type UploadSessionFinishBatchArg struct {
3580 // Entries : Commit information for each file in the batch.
3581 Entries []*UploadSessionFinishArg `json:"entries"`
3582 }
3583
3584 // NewUploadSessionFinishBatchArg returns a new UploadSessionFinishBatchArg instance
3585 func NewUploadSessionFinishBatchArg(Entries []*UploadSessionFinishArg) *UploadSessionFinishBatchArg {
3586 s := new(UploadSessionFinishBatchArg)
3587 s.Entries = Entries
3588 return s
3589 }
3590
3591 // UploadSessionFinishBatchJobStatus : has no documentation (yet)
3592 type UploadSessionFinishBatchJobStatus struct {
3593 dropbox.Tagged
3594 // Complete : The `uploadSessionFinishBatch` has finished.
3595 Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
3596 }
3597
3598 // Valid tag values for UploadSessionFinishBatchJobStatus
3599 const (
3600 UploadSessionFinishBatchJobStatusInProgress = "in_progress"
3601 UploadSessionFinishBatchJobStatusComplete = "complete"
3602 )
3603
3604 // UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance
3605 func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte) error {
3606 type wrap struct {
3607 dropbox.Tagged
3608 // Complete : The `uploadSessionFinishBatch` has finished.
3609 Complete json.RawMessage `json:"complete,omitempty"`
3610 }
3611 var w wrap
3612 var err error
3613 if err = json.Unmarshal(body, &w); err != nil {
3614 return err
3615 }
3616 u.Tag = w.Tag
3617 switch u.Tag {
3618 case "complete":
3619 err = json.Unmarshal(body, &u.Complete)
3620
3621 if err != nil {
3622 return err
3623 }
3624 }
3625 return nil
3626 }
3627
3628 // UploadSessionFinishBatchLaunch : Result returned by
3629 // `uploadSessionFinishBatch` that may either launch an asynchronous job or
3630 // complete synchronously.
3631 type UploadSessionFinishBatchLaunch struct {
3632 dropbox.Tagged
3633 // AsyncJobId : This response indicates that the processing is asynchronous.
3634 // The string is an id that can be used to obtain the status of the
3635 // asynchronous job.
3636 AsyncJobId string `json:"async_job_id,omitempty"`
3637 // Complete : has no documentation (yet)
3638 Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
3639 }
3640
3641 // Valid tag values for UploadSessionFinishBatchLaunch
3642 const (
3643 UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id"
3644 UploadSessionFinishBatchLaunchComplete = "complete"
3645 UploadSessionFinishBatchLaunchOther = "other"
3646 )
3647
3648 // UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance
3649 func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) error {
3650 type wrap struct {
3651 dropbox.Tagged
3652 // Complete : has no documentation (yet)
3653 Complete json.RawMessage `json:"complete,omitempty"`
3654 }
3655 var w wrap
3656 var err error
3657 if err = json.Unmarshal(body, &w); err != nil {
3658 return err
3659 }
3660 u.Tag = w.Tag
3661 switch u.Tag {
3662 case "async_job_id":
3663 err = json.Unmarshal(body, &u.AsyncJobId)
3664
3665 if err != nil {
3666 return err
3667 }
3668 case "complete":
3669 err = json.Unmarshal(body, &u.Complete)
3670
3671 if err != nil {
3672 return err
3673 }
3674 }
3675 return nil
3676 }
3677
3678 // UploadSessionFinishBatchResult : has no documentation (yet)
3679 type UploadSessionFinishBatchResult struct {
3680 // Entries : Each entry in `UploadSessionFinishBatchArg.entries` will appear
3681 // at the same position inside `UploadSessionFinishBatchResult.entries`.
3682 Entries []*UploadSessionFinishBatchResultEntry `json:"entries"`
3683 }
3684
3685 // NewUploadSessionFinishBatchResult returns a new UploadSessionFinishBatchResult instance
3686 func NewUploadSessionFinishBatchResult(Entries []*UploadSessionFinishBatchResultEntry) *UploadSessionFinishBatchResult {
3687 s := new(UploadSessionFinishBatchResult)
3688 s.Entries = Entries
3689 return s
3690 }
3691
3692 // UploadSessionFinishBatchResultEntry : has no documentation (yet)
3693 type UploadSessionFinishBatchResultEntry struct {
3694 dropbox.Tagged
3695 // Success : has no documentation (yet)
3696 Success *FileMetadata `json:"success,omitempty"`
3697 // Failure : has no documentation (yet)
3698 Failure *UploadSessionFinishError `json:"failure,omitempty"`
3699 }
3700
3701 // Valid tag values for UploadSessionFinishBatchResultEntry
3702 const (
3703 UploadSessionFinishBatchResultEntrySuccess = "success"
3704 UploadSessionFinishBatchResultEntryFailure = "failure"
3705 )
3706
3707 // UnmarshalJSON deserializes into a UploadSessionFinishBatchResultEntry instance
3708 func (u *UploadSessionFinishBatchResultEntry) UnmarshalJSON(body []byte) error {
3709 type wrap struct {
3710 dropbox.Tagged
3711 // Success : has no documentation (yet)
3712 Success json.RawMessage `json:"success,omitempty"`
3713 // Failure : has no documentation (yet)
3714 Failure json.RawMessage `json:"failure,omitempty"`
3715 }
3716 var w wrap
3717 var err error
3718 if err = json.Unmarshal(body, &w); err != nil {
3719 return err
3720 }
3721 u.Tag = w.Tag
3722 switch u.Tag {
3723 case "success":
3724 err = json.Unmarshal(body, &u.Success)
3725
3726 if err != nil {
3727 return err
3728 }
3729 case "failure":
3730 err = json.Unmarshal(w.Failure, &u.Failure)
3731
3732 if err != nil {
3733 return err
3734 }
3735 }
3736 return nil
3737 }
3738
3739 // UploadSessionFinishError : has no documentation (yet)
3740 type UploadSessionFinishError struct {
3741 dropbox.Tagged
3742 // LookupFailed : The session arguments are incorrect; the value explains
3743 // the reason.
3744 LookupFailed *UploadSessionLookupError `json:"lookup_failed,omitempty"`
3745 // Path : Unable to save the uploaded contents to a file. Data has already
3746 // been appended to the upload session. Please retry with empty data body
3747 // and updated offset.
3748 Path *WriteError `json:"path,omitempty"`
3749 // PropertiesError : The supplied property group is invalid. The file has
3750 // uploaded without property groups.
3751 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
3752 }
3753
3754 // Valid tag values for UploadSessionFinishError
3755 const (
3756 UploadSessionFinishErrorLookupFailed = "lookup_failed"
3757 UploadSessionFinishErrorPath = "path"
3758 UploadSessionFinishErrorPropertiesError = "properties_error"
3759 UploadSessionFinishErrorTooManySharedFolderTargets = "too_many_shared_folder_targets"
3760 UploadSessionFinishErrorTooManyWriteOperations = "too_many_write_operations"
3761 UploadSessionFinishErrorOther = "other"
3762 )
3763
3764 // UnmarshalJSON deserializes into a UploadSessionFinishError instance
3765 func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error {
3766 type wrap struct {
3767 dropbox.Tagged
3768 // LookupFailed : The session arguments are incorrect; the value
3769 // explains the reason.
3770 LookupFailed json.RawMessage `json:"lookup_failed,omitempty"`
3771 // Path : Unable to save the uploaded contents to a file. Data has
3772 // already been appended to the upload session. Please retry with empty
3773 // data body and updated offset.
3774 Path json.RawMessage `json:"path,omitempty"`
3775 // PropertiesError : The supplied property group is invalid. The file
3776 // has uploaded without property groups.
3777 PropertiesError json.RawMessage `json:"properties_error,omitempty"`
3778 }
3779 var w wrap
3780 var err error
3781 if err = json.Unmarshal(body, &w); err != nil {
3782 return err
3783 }
3784 u.Tag = w.Tag
3785 switch u.Tag {
3786 case "lookup_failed":
3787 err = json.Unmarshal(w.LookupFailed, &u.LookupFailed)
3788
3789 if err != nil {
3790 return err
3791 }
3792 case "path":
3793 err = json.Unmarshal(w.Path, &u.Path)
3794
3795 if err != nil {
3796 return err
3797 }
3798 case "properties_error":
3799 err = json.Unmarshal(w.PropertiesError, &u.PropertiesError)
3800
3801 if err != nil {
3802 return err
3803 }
3804 }
3805 return nil
3806 }
3807
3808 // UploadSessionLookupError : has no documentation (yet)
3809 type UploadSessionLookupError struct {
3810 dropbox.Tagged
3811 // IncorrectOffset : The specified offset was incorrect. See the value for
3812 // the correct offset. This error may occur when a previous request was
3813 // received and processed successfully but the client did not receive the
3814 // response, e.g. due to a network error.
3815 IncorrectOffset *UploadSessionOffsetError `json:"incorrect_offset,omitempty"`
3816 }
3817
3818 // Valid tag values for UploadSessionLookupError
3819 const (
3820 UploadSessionLookupErrorNotFound = "not_found"
3821 UploadSessionLookupErrorIncorrectOffset = "incorrect_offset"
3822 UploadSessionLookupErrorClosed = "closed"
3823 UploadSessionLookupErrorNotClosed = "not_closed"
3824 UploadSessionLookupErrorTooLarge = "too_large"
3825 UploadSessionLookupErrorOther = "other"
3826 )
3827
3828 // UnmarshalJSON deserializes into a UploadSessionLookupError instance
3829 func (u *UploadSessionLookupError) UnmarshalJSON(body []byte) error {
3830 type wrap struct {
3831 dropbox.Tagged
3832 // IncorrectOffset : The specified offset was incorrect. See the value
3833 // for the correct offset. This error may occur when a previous request
3834 // was received and processed successfully but the client did not
3835 // receive the response, e.g. due to a network error.
3836 IncorrectOffset json.RawMessage `json:"incorrect_offset,omitempty"`
3837 }
3838 var w wrap
3839 var err error
3840 if err = json.Unmarshal(body, &w); err != nil {
3841 return err
3842 }
3843 u.Tag = w.Tag
3844 switch u.Tag {
3845 case "incorrect_offset":
3846 err = json.Unmarshal(body, &u.IncorrectOffset)
3847
3848 if err != nil {
3849 return err
3850 }
3851 }
3852 return nil
3853 }
3854
3855 // UploadSessionOffsetError : has no documentation (yet)
3856 type UploadSessionOffsetError struct {
3857 // CorrectOffset : The offset up to which data has been collected.
3858 CorrectOffset uint64 `json:"correct_offset"`
3859 }
3860
3861 // NewUploadSessionOffsetError returns a new UploadSessionOffsetError instance
3862 func NewUploadSessionOffsetError(CorrectOffset uint64) *UploadSessionOffsetError {
3863 s := new(UploadSessionOffsetError)
3864 s.CorrectOffset = CorrectOffset
3865 return s
3866 }
3867
3868 // UploadSessionStartArg : has no documentation (yet)
3869 type UploadSessionStartArg struct {
3870 // Close : If true, the current session will be closed, at which point you
3871 // won't be able to call `uploadSessionAppend` anymore with the current
3872 // session.
3873 Close bool `json:"close"`
3874 }
3875
3876 // NewUploadSessionStartArg returns a new UploadSessionStartArg instance
3877 func NewUploadSessionStartArg() *UploadSessionStartArg {
3878 s := new(UploadSessionStartArg)
3879 s.Close = false
3880 return s
3881 }
3882
3883 // UploadSessionStartResult : has no documentation (yet)
3884 type UploadSessionStartResult struct {
3885 // SessionId : A unique identifier for the upload session. Pass this to
3886 // `uploadSessionAppend` and `uploadSessionFinish`.
3887 SessionId string `json:"session_id"`
3888 }
3889
3890 // NewUploadSessionStartResult returns a new UploadSessionStartResult instance
3891 func NewUploadSessionStartResult(SessionId string) *UploadSessionStartResult {
3892 s := new(UploadSessionStartResult)
3893 s.SessionId = SessionId
3894 return s
3895 }
3896
3897 // UploadWriteFailed : has no documentation (yet)
3898 type UploadWriteFailed struct {
3899 // Reason : The reason why the file couldn't be saved.
3900 Reason *WriteError `json:"reason"`
3901 // UploadSessionId : The upload session ID; data has already been uploaded
3902 // to the corresponding upload session and this ID may be used to retry the
3903 // commit with `uploadSessionFinish`.
3904 UploadSessionId string `json:"upload_session_id"`
3905 }
3906
3907 // NewUploadWriteFailed returns a new UploadWriteFailed instance
3908 func NewUploadWriteFailed(Reason *WriteError, UploadSessionId string) *UploadWriteFailed {
3909 s := new(UploadWriteFailed)
3910 s.Reason = Reason
3911 s.UploadSessionId = UploadSessionId
3912 return s
3913 }
3914
3915 // VideoMetadata : Metadata for a video.
3916 type VideoMetadata struct {
3917 MediaMetadata
3918 // Duration : The duration of the video in milliseconds.
3919 Duration uint64 `json:"duration,omitempty"`
3920 }
3921
3922 // NewVideoMetadata returns a new VideoMetadata instance
3923 func NewVideoMetadata() *VideoMetadata {
3924 s := new(VideoMetadata)
3925 return s
3926 }
3927
3928 // WriteConflictError : has no documentation (yet)
3929 type WriteConflictError struct {
3930 dropbox.Tagged
3931 }
3932
3933 // Valid tag values for WriteConflictError
3934 const (
3935 WriteConflictErrorFile = "file"
3936 WriteConflictErrorFolder = "folder"
3937 WriteConflictErrorFileAncestor = "file_ancestor"
3938 WriteConflictErrorOther = "other"
3939 )
3940
3941 // WriteError : has no documentation (yet)
3942 type WriteError struct {
3943 dropbox.Tagged
3944 // MalformedPath : The given path does not satisfy the required path format.
3945 // Please refer to the `Path formats documentation`
3946 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
3947 // for more information.
3948 MalformedPath string `json:"malformed_path,omitempty"`
3949 // Conflict : Couldn't write to the target path because there was something
3950 // in the way.
3951 Conflict *WriteConflictError `json:"conflict,omitempty"`
3952 }
3953
3954 // Valid tag values for WriteError
3955 const (
3956 WriteErrorMalformedPath = "malformed_path"
3957 WriteErrorConflict = "conflict"
3958 WriteErrorNoWritePermission = "no_write_permission"
3959 WriteErrorInsufficientSpace = "insufficient_space"
3960 WriteErrorDisallowedName = "disallowed_name"
3961 WriteErrorTeamFolder = "team_folder"
3962 WriteErrorTooManyWriteOperations = "too_many_write_operations"
3963 WriteErrorOther = "other"
3964 )
3965
3966 // UnmarshalJSON deserializes into a WriteError instance
3967 func (u *WriteError) UnmarshalJSON(body []byte) error {
3968 type wrap struct {
3969 dropbox.Tagged
3970 // MalformedPath : The given path does not satisfy the required path
3971 // format. Please refer to the `Path formats documentation`
3972 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
3973 // for more information.
3974 MalformedPath json.RawMessage `json:"malformed_path,omitempty"`
3975 // Conflict : Couldn't write to the target path because there was
3976 // something in the way.
3977 Conflict json.RawMessage `json:"conflict,omitempty"`
3978 }
3979 var w wrap
3980 var err error
3981 if err = json.Unmarshal(body, &w); err != nil {
3982 return err
3983 }
3984 u.Tag = w.Tag
3985 switch u.Tag {
3986 case "malformed_path":
3987 err = json.Unmarshal(body, &u.MalformedPath)
3988
3989 if err != nil {
3990 return err
3991 }
3992 case "conflict":
3993 err = json.Unmarshal(w.Conflict, &u.Conflict)
3994
3995 if err != nil {
3996 return err
3997 }
3998 }
3999 return nil
4000 }
4001
4002 // WriteMode : Your intent when writing a file to some path. This is used to
4003 // determine what constitutes a conflict and what the autorename strategy is. In
4004 // some situations, the conflict behavior is identical: (a) If the target path
4005 // doesn't refer to anything, the file is always written; no conflict. (b) If
4006 // the target path refers to a folder, it's always a conflict. (c) If the target
4007 // path refers to a file with identical contents, nothing gets written; no
4008 // conflict. The conflict checking differs in the case where there's a file at
4009 // the target path with contents different from the contents you're trying to
4010 // write.
4011 type WriteMode struct {
4012 dropbox.Tagged
4013 // Update : Overwrite if the given "rev" matches the existing file's "rev".
4014 // The autorename strategy is to append the string "conflicted copy" to the
4015 // file name. For example, "document.txt" might become "document (conflicted
4016 // copy).txt" or "document (Panda's conflicted copy).txt".
4017 Update string `json:"update,omitempty"`
4018 }
4019
4020 // Valid tag values for WriteMode
4021 const (
4022 WriteModeAdd = "add"
4023 WriteModeOverwrite = "overwrite"
4024 WriteModeUpdate = "update"
4025 )
4026
4027 // UnmarshalJSON deserializes into a WriteMode instance
4028 func (u *WriteMode) UnmarshalJSON(body []byte) error {
4029 type wrap struct {
4030 dropbox.Tagged
4031 }
4032 var w wrap
4033 var err error
4034 if err = json.Unmarshal(body, &w); err != nil {
4035 return err
4036 }
4037 u.Tag = w.Tag
4038 switch u.Tag {
4039 case "update":
4040 err = json.Unmarshal(body, &u.Update)
4041
4042 if err != nil {
4043 return err
4044 }
4045 }
4046 return nil
4047 }
+0
-1146
dropbox/paper/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package paper
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io"
26 "io/ioutil"
27 "net/http"
28
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
31 )
32
33 // Client interface describes all routes in this namespace
34 type Client interface {
35 // DocsArchive : Marks the given Paper doc as archived. Note: This action
36 // can be performed or undone by anyone with edit permissions to the doc.
37 DocsArchive(arg *RefPaperDoc) (err error)
38 // DocsCreate : Creates a new Paper doc with the provided content.
39 DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error)
40 // DocsDownload : Exports and downloads Paper doc either as HTML or
41 // markdown.
42 DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error)
43 // DocsFolderUsersList : Lists the users who are explicitly invited to the
44 // Paper folder in which the Paper doc is contained. For private folders all
45 // users (including owner) shared on the folder are listed and for team
46 // folders all non-team users shared on the folder are returned.
47 DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error)
48 // DocsFolderUsersListContinue : Once a cursor has been retrieved from
49 // `docsFolderUsersList`, use this to paginate through all users on the
50 // Paper folder.
51 DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error)
52 // DocsGetFolderInfo : Retrieves folder information for the given Paper doc.
53 // This includes: - folder sharing policy; permissions for subfolders are
54 // set by the top-level folder. - full 'filepath', i.e. the list of
55 // folders (both folderId and folderName) from the root folder to the
56 // folder directly containing the Paper doc. Note: If the Paper doc is not
57 // in any folder (aka unfiled) the response will be empty.
58 DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error)
59 // DocsList : Return the list of all Paper docs according to the argument
60 // specifications. To iterate over through the full pagination, pass the
61 // cursor to `docsListContinue`.
62 DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error)
63 // DocsListContinue : Once a cursor has been retrieved from `docsList`, use
64 // this to paginate through all Paper doc.
65 DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error)
66 // DocsPermanentlyDelete : Permanently deletes the given Paper doc. This
67 // operation is final as the doc cannot be recovered. Note: This action can
68 // be performed only by the doc owner.
69 DocsPermanentlyDelete(arg *RefPaperDoc) (err error)
70 // DocsSharingPolicyGet : Gets the default sharing policy for the given
71 // Paper doc.
72 DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error)
73 // DocsSharingPolicySet : Sets the default sharing policy for the given
74 // Paper doc. The default 'team_sharing_policy' can be changed only by
75 // teams, omit this field for personal accounts. Note:
76 // 'public_sharing_policy' cannot be set to the value 'disabled' because
77 // this setting can be changed only via the team admin console.
78 DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error)
79 // DocsUpdate : Updates an existing Paper doc with the provided content.
80 DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error)
81 // DocsUsersAdd : Allows an owner or editor to add users to a Paper doc or
82 // change their permissions using their email address or Dropbox account ID.
83 // Note: The Doc owner's permissions cannot be changed.
84 DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error)
85 // DocsUsersList : Lists all users who visited the Paper doc or users with
86 // explicit access. This call excludes users who have been removed. The list
87 // is sorted by the date of the visit or the share date. The list will
88 // include both users, the explicitly shared ones as well as those who came
89 // in using the Paper url link.
90 DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error)
91 // DocsUsersListContinue : Once a cursor has been retrieved from
92 // `docsUsersList`, use this to paginate through all users on the Paper doc.
93 DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error)
94 // DocsUsersRemove : Allows an owner or editor to remove users from a Paper
95 // doc using their email address or Dropbox account ID. Note: Doc owner
96 // cannot be removed.
97 DocsUsersRemove(arg *RemovePaperDocUser) (err error)
98 }
99
100 type apiImpl dropbox.Context
101
102 //DocsArchiveAPIError is an error-wrapper for the docs/archive route
103 type DocsArchiveAPIError struct {
104 dropbox.APIError
105 EndpointError *DocLookupError `json:"error"`
106 }
107
108 func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
109 cli := dbx.Client
110
111 dbx.Config.LogDebug("arg: %v", arg)
112 b, err := json.Marshal(arg)
113 if err != nil {
114 return
115 }
116
117 headers := map[string]string{
118 "Content-Type": "application/json",
119 }
120 if dbx.Config.AsMemberID != "" {
121 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
122 }
123
124 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/archive", headers, bytes.NewReader(b))
125 if err != nil {
126 return
127 }
128 dbx.Config.LogInfo("req: %v", req)
129
130 resp, err := cli.Do(req)
131 if err != nil {
132 return
133 }
134
135 dbx.Config.LogInfo("resp: %v", resp)
136 defer resp.Body.Close()
137 body, err := ioutil.ReadAll(resp.Body)
138 if err != nil {
139 return
140 }
141
142 dbx.Config.LogDebug("body: %s", body)
143 if resp.StatusCode == http.StatusOK {
144 return
145 }
146 if resp.StatusCode == http.StatusConflict {
147 var apiError DocsArchiveAPIError
148 err = json.Unmarshal(body, &apiError)
149 if err != nil {
150 return
151 }
152 err = apiError
153 return
154 }
155 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
156 if err != nil {
157 return
158 }
159 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
160 return
161 }
162
163 //DocsCreateAPIError is an error-wrapper for the docs/create route
164 type DocsCreateAPIError struct {
165 dropbox.APIError
166 EndpointError *PaperDocCreateError `json:"error"`
167 }
168
169 func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
170 cli := dbx.Client
171
172 dbx.Config.LogDebug("arg: %v", arg)
173 b, err := json.Marshal(arg)
174 if err != nil {
175 return
176 }
177
178 headers := map[string]string{
179 "Content-Type": "application/octet-stream",
180 "Dropbox-API-Arg": string(b),
181 }
182 if dbx.Config.AsMemberID != "" {
183 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
184 }
185
186 req, err := (*dropbox.Context)(dbx).NewRequest("api", "upload", true, "paper", "docs/create", headers, content)
187 if err != nil {
188 return
189 }
190 dbx.Config.LogInfo("req: %v", req)
191
192 resp, err := cli.Do(req)
193 if err != nil {
194 return
195 }
196
197 dbx.Config.LogInfo("resp: %v", resp)
198 defer resp.Body.Close()
199 body, err := ioutil.ReadAll(resp.Body)
200 if err != nil {
201 return
202 }
203
204 dbx.Config.LogDebug("body: %s", body)
205 if resp.StatusCode == http.StatusOK {
206 err = json.Unmarshal(body, &res)
207 if err != nil {
208 return
209 }
210
211 return
212 }
213 if resp.StatusCode == http.StatusConflict {
214 var apiError DocsCreateAPIError
215 err = json.Unmarshal(body, &apiError)
216 if err != nil {
217 return
218 }
219 err = apiError
220 return
221 }
222 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
223 if err != nil {
224 return
225 }
226 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
227 return
228 }
229
230 //DocsDownloadAPIError is an error-wrapper for the docs/download route
231 type DocsDownloadAPIError struct {
232 dropbox.APIError
233 EndpointError *DocLookupError `json:"error"`
234 }
235
236 func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) {
237 cli := dbx.Client
238
239 dbx.Config.LogDebug("arg: %v", arg)
240 b, err := json.Marshal(arg)
241 if err != nil {
242 return
243 }
244
245 headers := map[string]string{
246 "Dropbox-API-Arg": string(b),
247 }
248 if dbx.Config.AsMemberID != "" {
249 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
250 }
251
252 req, err := (*dropbox.Context)(dbx).NewRequest("api", "download", true, "paper", "docs/download", headers, bytes.NewReader(b))
253 if err != nil {
254 return
255 }
256 dbx.Config.LogInfo("req: %v", req)
257
258 resp, err := cli.Do(req)
259 if err != nil {
260 return
261 }
262
263 dbx.Config.LogInfo("resp: %v", resp)
264 body := []byte(resp.Header.Get("Dropbox-API-Result"))
265 content = resp.Body
266 dbx.Config.LogDebug("body: %s", body)
267 if resp.StatusCode == http.StatusOK {
268 err = json.Unmarshal(body, &res)
269 if err != nil {
270 return
271 }
272
273 return
274 }
275 if resp.StatusCode == http.StatusConflict {
276 defer resp.Body.Close()
277 body, err = ioutil.ReadAll(resp.Body)
278 if err != nil {
279 return
280 }
281 var apiError DocsDownloadAPIError
282 err = json.Unmarshal(body, &apiError)
283 if err != nil {
284 return
285 }
286 err = apiError
287 return
288 }
289 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
290 if err != nil {
291 return
292 }
293 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
294 return
295 }
296
297 //DocsFolderUsersListAPIError is an error-wrapper for the docs/folder_users/list route
298 type DocsFolderUsersListAPIError struct {
299 dropbox.APIError
300 EndpointError *DocLookupError `json:"error"`
301 }
302
303 func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) {
304 cli := dbx.Client
305
306 dbx.Config.LogDebug("arg: %v", arg)
307 b, err := json.Marshal(arg)
308 if err != nil {
309 return
310 }
311
312 headers := map[string]string{
313 "Content-Type": "application/json",
314 }
315 if dbx.Config.AsMemberID != "" {
316 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
317 }
318
319 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/folder_users/list", headers, bytes.NewReader(b))
320 if err != nil {
321 return
322 }
323 dbx.Config.LogInfo("req: %v", req)
324
325 resp, err := cli.Do(req)
326 if err != nil {
327 return
328 }
329
330 dbx.Config.LogInfo("resp: %v", resp)
331 defer resp.Body.Close()
332 body, err := ioutil.ReadAll(resp.Body)
333 if err != nil {
334 return
335 }
336
337 dbx.Config.LogDebug("body: %s", body)
338 if resp.StatusCode == http.StatusOK {
339 err = json.Unmarshal(body, &res)
340 if err != nil {
341 return
342 }
343
344 return
345 }
346 if resp.StatusCode == http.StatusConflict {
347 var apiError DocsFolderUsersListAPIError
348 err = json.Unmarshal(body, &apiError)
349 if err != nil {
350 return
351 }
352 err = apiError
353 return
354 }
355 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
356 if err != nil {
357 return
358 }
359 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
360 return
361 }
362
363 //DocsFolderUsersListContinueAPIError is an error-wrapper for the docs/folder_users/list/continue route
364 type DocsFolderUsersListContinueAPIError struct {
365 dropbox.APIError
366 EndpointError *ListUsersCursorError `json:"error"`
367 }
368
369 func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) {
370 cli := dbx.Client
371
372 dbx.Config.LogDebug("arg: %v", arg)
373 b, err := json.Marshal(arg)
374 if err != nil {
375 return
376 }
377
378 headers := map[string]string{
379 "Content-Type": "application/json",
380 }
381 if dbx.Config.AsMemberID != "" {
382 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
383 }
384
385 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/folder_users/list/continue", headers, bytes.NewReader(b))
386 if err != nil {
387 return
388 }
389 dbx.Config.LogInfo("req: %v", req)
390
391 resp, err := cli.Do(req)
392 if err != nil {
393 return
394 }
395
396 dbx.Config.LogInfo("resp: %v", resp)
397 defer resp.Body.Close()
398 body, err := ioutil.ReadAll(resp.Body)
399 if err != nil {
400 return
401 }
402
403 dbx.Config.LogDebug("body: %s", body)
404 if resp.StatusCode == http.StatusOK {
405 err = json.Unmarshal(body, &res)
406 if err != nil {
407 return
408 }
409
410 return
411 }
412 if resp.StatusCode == http.StatusConflict {
413 var apiError DocsFolderUsersListContinueAPIError
414 err = json.Unmarshal(body, &apiError)
415 if err != nil {
416 return
417 }
418 err = apiError
419 return
420 }
421 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
422 if err != nil {
423 return
424 }
425 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
426 return
427 }
428
429 //DocsGetFolderInfoAPIError is an error-wrapper for the docs/get_folder_info route
430 type DocsGetFolderInfoAPIError struct {
431 dropbox.APIError
432 EndpointError *DocLookupError `json:"error"`
433 }
434
435 func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) {
436 cli := dbx.Client
437
438 dbx.Config.LogDebug("arg: %v", arg)
439 b, err := json.Marshal(arg)
440 if err != nil {
441 return
442 }
443
444 headers := map[string]string{
445 "Content-Type": "application/json",
446 }
447 if dbx.Config.AsMemberID != "" {
448 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
449 }
450
451 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/get_folder_info", headers, bytes.NewReader(b))
452 if err != nil {
453 return
454 }
455 dbx.Config.LogInfo("req: %v", req)
456
457 resp, err := cli.Do(req)
458 if err != nil {
459 return
460 }
461
462 dbx.Config.LogInfo("resp: %v", resp)
463 defer resp.Body.Close()
464 body, err := ioutil.ReadAll(resp.Body)
465 if err != nil {
466 return
467 }
468
469 dbx.Config.LogDebug("body: %s", body)
470 if resp.StatusCode == http.StatusOK {
471 err = json.Unmarshal(body, &res)
472 if err != nil {
473 return
474 }
475
476 return
477 }
478 if resp.StatusCode == http.StatusConflict {
479 var apiError DocsGetFolderInfoAPIError
480 err = json.Unmarshal(body, &apiError)
481 if err != nil {
482 return
483 }
484 err = apiError
485 return
486 }
487 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
488 if err != nil {
489 return
490 }
491 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
492 return
493 }
494
495 //DocsListAPIError is an error-wrapper for the docs/list route
496 type DocsListAPIError struct {
497 dropbox.APIError
498 EndpointError struct{} `json:"error"`
499 }
500
501 func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) {
502 cli := dbx.Client
503
504 dbx.Config.LogDebug("arg: %v", arg)
505 b, err := json.Marshal(arg)
506 if err != nil {
507 return
508 }
509
510 headers := map[string]string{
511 "Content-Type": "application/json",
512 }
513 if dbx.Config.AsMemberID != "" {
514 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
515 }
516
517 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/list", headers, bytes.NewReader(b))
518 if err != nil {
519 return
520 }
521 dbx.Config.LogInfo("req: %v", req)
522
523 resp, err := cli.Do(req)
524 if err != nil {
525 return
526 }
527
528 dbx.Config.LogInfo("resp: %v", resp)
529 defer resp.Body.Close()
530 body, err := ioutil.ReadAll(resp.Body)
531 if err != nil {
532 return
533 }
534
535 dbx.Config.LogDebug("body: %s", body)
536 if resp.StatusCode == http.StatusOK {
537 err = json.Unmarshal(body, &res)
538 if err != nil {
539 return
540 }
541
542 return
543 }
544 if resp.StatusCode == http.StatusConflict {
545 var apiError DocsListAPIError
546 err = json.Unmarshal(body, &apiError)
547 if err != nil {
548 return
549 }
550 err = apiError
551 return
552 }
553 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
554 if err != nil {
555 return
556 }
557 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
558 return
559 }
560
561 //DocsListContinueAPIError is an error-wrapper for the docs/list/continue route
562 type DocsListContinueAPIError struct {
563 dropbox.APIError
564 EndpointError *ListDocsCursorError `json:"error"`
565 }
566
567 func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) {
568 cli := dbx.Client
569
570 dbx.Config.LogDebug("arg: %v", arg)
571 b, err := json.Marshal(arg)
572 if err != nil {
573 return
574 }
575
576 headers := map[string]string{
577 "Content-Type": "application/json",
578 }
579 if dbx.Config.AsMemberID != "" {
580 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
581 }
582
583 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/list/continue", headers, bytes.NewReader(b))
584 if err != nil {
585 return
586 }
587 dbx.Config.LogInfo("req: %v", req)
588
589 resp, err := cli.Do(req)
590 if err != nil {
591 return
592 }
593
594 dbx.Config.LogInfo("resp: %v", resp)
595 defer resp.Body.Close()
596 body, err := ioutil.ReadAll(resp.Body)
597 if err != nil {
598 return
599 }
600
601 dbx.Config.LogDebug("body: %s", body)
602 if resp.StatusCode == http.StatusOK {
603 err = json.Unmarshal(body, &res)
604 if err != nil {
605 return
606 }
607
608 return
609 }
610 if resp.StatusCode == http.StatusConflict {
611 var apiError DocsListContinueAPIError
612 err = json.Unmarshal(body, &apiError)
613 if err != nil {
614 return
615 }
616 err = apiError
617 return
618 }
619 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
620 if err != nil {
621 return
622 }
623 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
624 return
625 }
626
627 //DocsPermanentlyDeleteAPIError is an error-wrapper for the docs/permanently_delete route
628 type DocsPermanentlyDeleteAPIError struct {
629 dropbox.APIError
630 EndpointError *DocLookupError `json:"error"`
631 }
632
633 func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
634 cli := dbx.Client
635
636 dbx.Config.LogDebug("arg: %v", arg)
637 b, err := json.Marshal(arg)
638 if err != nil {
639 return
640 }
641
642 headers := map[string]string{
643 "Content-Type": "application/json",
644 }
645 if dbx.Config.AsMemberID != "" {
646 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
647 }
648
649 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/permanently_delete", headers, bytes.NewReader(b))
650 if err != nil {
651 return
652 }
653 dbx.Config.LogInfo("req: %v", req)
654
655 resp, err := cli.Do(req)
656 if err != nil {
657 return
658 }
659
660 dbx.Config.LogInfo("resp: %v", resp)
661 defer resp.Body.Close()
662 body, err := ioutil.ReadAll(resp.Body)
663 if err != nil {
664 return
665 }
666
667 dbx.Config.LogDebug("body: %s", body)
668 if resp.StatusCode == http.StatusOK {
669 return
670 }
671 if resp.StatusCode == http.StatusConflict {
672 var apiError DocsPermanentlyDeleteAPIError
673 err = json.Unmarshal(body, &apiError)
674 if err != nil {
675 return
676 }
677 err = apiError
678 return
679 }
680 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
681 if err != nil {
682 return
683 }
684 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
685 return
686 }
687
688 //DocsSharingPolicyGetAPIError is an error-wrapper for the docs/sharing_policy/get route
689 type DocsSharingPolicyGetAPIError struct {
690 dropbox.APIError
691 EndpointError *DocLookupError `json:"error"`
692 }
693
694 func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) {
695 cli := dbx.Client
696
697 dbx.Config.LogDebug("arg: %v", arg)
698 b, err := json.Marshal(arg)
699 if err != nil {
700 return
701 }
702
703 headers := map[string]string{
704 "Content-Type": "application/json",
705 }
706 if dbx.Config.AsMemberID != "" {
707 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
708 }
709
710 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/sharing_policy/get", headers, bytes.NewReader(b))
711 if err != nil {
712 return
713 }
714 dbx.Config.LogInfo("req: %v", req)
715
716 resp, err := cli.Do(req)
717 if err != nil {
718 return
719 }
720
721 dbx.Config.LogInfo("resp: %v", resp)
722 defer resp.Body.Close()
723 body, err := ioutil.ReadAll(resp.Body)
724 if err != nil {
725 return
726 }
727
728 dbx.Config.LogDebug("body: %s", body)
729 if resp.StatusCode == http.StatusOK {
730 err = json.Unmarshal(body, &res)
731 if err != nil {
732 return
733 }
734
735 return
736 }
737 if resp.StatusCode == http.StatusConflict {
738 var apiError DocsSharingPolicyGetAPIError
739 err = json.Unmarshal(body, &apiError)
740 if err != nil {
741 return
742 }
743 err = apiError
744 return
745 }
746 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
747 if err != nil {
748 return
749 }
750 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
751 return
752 }
753
754 //DocsSharingPolicySetAPIError is an error-wrapper for the docs/sharing_policy/set route
755 type DocsSharingPolicySetAPIError struct {
756 dropbox.APIError
757 EndpointError *DocLookupError `json:"error"`
758 }
759
760 func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) {
761 cli := dbx.Client
762
763 dbx.Config.LogDebug("arg: %v", arg)
764 b, err := json.Marshal(arg)
765 if err != nil {
766 return
767 }
768
769 headers := map[string]string{
770 "Content-Type": "application/json",
771 }
772 if dbx.Config.AsMemberID != "" {
773 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
774 }
775
776 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/sharing_policy/set", headers, bytes.NewReader(b))
777 if err != nil {
778 return
779 }
780 dbx.Config.LogInfo("req: %v", req)
781
782 resp, err := cli.Do(req)
783 if err != nil {
784 return
785 }
786
787 dbx.Config.LogInfo("resp: %v", resp)
788 defer resp.Body.Close()
789 body, err := ioutil.ReadAll(resp.Body)
790 if err != nil {
791 return
792 }
793
794 dbx.Config.LogDebug("body: %s", body)
795 if resp.StatusCode == http.StatusOK {
796 return
797 }
798 if resp.StatusCode == http.StatusConflict {
799 var apiError DocsSharingPolicySetAPIError
800 err = json.Unmarshal(body, &apiError)
801 if err != nil {
802 return
803 }
804 err = apiError
805 return
806 }
807 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
808 if err != nil {
809 return
810 }
811 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
812 return
813 }
814
815 //DocsUpdateAPIError is an error-wrapper for the docs/update route
816 type DocsUpdateAPIError struct {
817 dropbox.APIError
818 EndpointError *PaperDocUpdateError `json:"error"`
819 }
820
821 func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
822 cli := dbx.Client
823
824 dbx.Config.LogDebug("arg: %v", arg)
825 b, err := json.Marshal(arg)
826 if err != nil {
827 return
828 }
829
830 headers := map[string]string{
831 "Content-Type": "application/octet-stream",
832 "Dropbox-API-Arg": string(b),
833 }
834 if dbx.Config.AsMemberID != "" {
835 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
836 }
837
838 req, err := (*dropbox.Context)(dbx).NewRequest("api", "upload", true, "paper", "docs/update", headers, content)
839 if err != nil {
840 return
841 }
842 dbx.Config.LogInfo("req: %v", req)
843
844 resp, err := cli.Do(req)
845 if err != nil {
846 return
847 }
848
849 dbx.Config.LogInfo("resp: %v", resp)
850 defer resp.Body.Close()
851 body, err := ioutil.ReadAll(resp.Body)
852 if err != nil {
853 return
854 }
855
856 dbx.Config.LogDebug("body: %s", body)
857 if resp.StatusCode == http.StatusOK {
858 err = json.Unmarshal(body, &res)
859 if err != nil {
860 return
861 }
862
863 return
864 }
865 if resp.StatusCode == http.StatusConflict {
866 var apiError DocsUpdateAPIError
867 err = json.Unmarshal(body, &apiError)
868 if err != nil {
869 return
870 }
871 err = apiError
872 return
873 }
874 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
875 if err != nil {
876 return
877 }
878 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
879 return
880 }
881
882 //DocsUsersAddAPIError is an error-wrapper for the docs/users/add route
883 type DocsUsersAddAPIError struct {
884 dropbox.APIError
885 EndpointError *DocLookupError `json:"error"`
886 }
887
888 func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) {
889 cli := dbx.Client
890
891 dbx.Config.LogDebug("arg: %v", arg)
892 b, err := json.Marshal(arg)
893 if err != nil {
894 return
895 }
896
897 headers := map[string]string{
898 "Content-Type": "application/json",
899 }
900 if dbx.Config.AsMemberID != "" {
901 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
902 }
903
904 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/add", headers, bytes.NewReader(b))
905 if err != nil {
906 return
907 }
908 dbx.Config.LogInfo("req: %v", req)
909
910 resp, err := cli.Do(req)
911 if err != nil {
912 return
913 }
914
915 dbx.Config.LogInfo("resp: %v", resp)
916 defer resp.Body.Close()
917 body, err := ioutil.ReadAll(resp.Body)
918 if err != nil {
919 return
920 }
921
922 dbx.Config.LogDebug("body: %s", body)
923 if resp.StatusCode == http.StatusOK {
924 err = json.Unmarshal(body, &res)
925 if err != nil {
926 return
927 }
928
929 return
930 }
931 if resp.StatusCode == http.StatusConflict {
932 var apiError DocsUsersAddAPIError
933 err = json.Unmarshal(body, &apiError)
934 if err != nil {
935 return
936 }
937 err = apiError
938 return
939 }
940 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
941 if err != nil {
942 return
943 }
944 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
945 return
946 }
947
948 //DocsUsersListAPIError is an error-wrapper for the docs/users/list route
949 type DocsUsersListAPIError struct {
950 dropbox.APIError
951 EndpointError *DocLookupError `json:"error"`
952 }
953
954 func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) {
955 cli := dbx.Client
956
957 dbx.Config.LogDebug("arg: %v", arg)
958 b, err := json.Marshal(arg)
959 if err != nil {
960 return
961 }
962
963 headers := map[string]string{
964 "Content-Type": "application/json",
965 }
966 if dbx.Config.AsMemberID != "" {
967 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
968 }
969
970 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/list", headers, bytes.NewReader(b))
971 if err != nil {
972 return
973 }
974 dbx.Config.LogInfo("req: %v", req)
975
976 resp, err := cli.Do(req)
977 if err != nil {
978 return
979 }
980
981 dbx.Config.LogInfo("resp: %v", resp)
982 defer resp.Body.Close()
983 body, err := ioutil.ReadAll(resp.Body)
984 if err != nil {
985 return
986 }
987
988 dbx.Config.LogDebug("body: %s", body)
989 if resp.StatusCode == http.StatusOK {
990 err = json.Unmarshal(body, &res)
991 if err != nil {
992 return
993 }
994
995 return
996 }
997 if resp.StatusCode == http.StatusConflict {
998 var apiError DocsUsersListAPIError
999 err = json.Unmarshal(body, &apiError)
1000 if err != nil {
1001 return
1002 }
1003 err = apiError
1004 return
1005 }
1006 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1007 if err != nil {
1008 return
1009 }
1010 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1011 return
1012 }
1013
1014 //DocsUsersListContinueAPIError is an error-wrapper for the docs/users/list/continue route
1015 type DocsUsersListContinueAPIError struct {
1016 dropbox.APIError
1017 EndpointError *ListUsersCursorError `json:"error"`
1018 }
1019
1020 func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) {
1021 cli := dbx.Client
1022
1023 dbx.Config.LogDebug("arg: %v", arg)
1024 b, err := json.Marshal(arg)
1025 if err != nil {
1026 return
1027 }
1028
1029 headers := map[string]string{
1030 "Content-Type": "application/json",
1031 }
1032 if dbx.Config.AsMemberID != "" {
1033 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1034 }
1035
1036 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/list/continue", headers, bytes.NewReader(b))
1037 if err != nil {
1038 return
1039 }
1040 dbx.Config.LogInfo("req: %v", req)
1041
1042 resp, err := cli.Do(req)
1043 if err != nil {
1044 return
1045 }
1046
1047 dbx.Config.LogInfo("resp: %v", resp)
1048 defer resp.Body.Close()
1049 body, err := ioutil.ReadAll(resp.Body)
1050 if err != nil {
1051 return
1052 }
1053
1054 dbx.Config.LogDebug("body: %s", body)
1055 if resp.StatusCode == http.StatusOK {
1056 err = json.Unmarshal(body, &res)
1057 if err != nil {
1058 return
1059 }
1060
1061 return
1062 }
1063 if resp.StatusCode == http.StatusConflict {
1064 var apiError DocsUsersListContinueAPIError
1065 err = json.Unmarshal(body, &apiError)
1066 if err != nil {
1067 return
1068 }
1069 err = apiError
1070 return
1071 }
1072 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1073 if err != nil {
1074 return
1075 }
1076 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1077 return
1078 }
1079
1080 //DocsUsersRemoveAPIError is an error-wrapper for the docs/users/remove route
1081 type DocsUsersRemoveAPIError struct {
1082 dropbox.APIError
1083 EndpointError *DocLookupError `json:"error"`
1084 }
1085
1086 func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
1087 cli := dbx.Client
1088
1089 dbx.Config.LogDebug("arg: %v", arg)
1090 b, err := json.Marshal(arg)
1091 if err != nil {
1092 return
1093 }
1094
1095 headers := map[string]string{
1096 "Content-Type": "application/json",
1097 }
1098 if dbx.Config.AsMemberID != "" {
1099 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1100 }
1101
1102 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/remove", headers, bytes.NewReader(b))
1103 if err != nil {
1104 return
1105 }
1106 dbx.Config.LogInfo("req: %v", req)
1107
1108 resp, err := cli.Do(req)
1109 if err != nil {
1110 return
1111 }
1112
1113 dbx.Config.LogInfo("resp: %v", resp)
1114 defer resp.Body.Close()
1115 body, err := ioutil.ReadAll(resp.Body)
1116 if err != nil {
1117 return
1118 }
1119
1120 dbx.Config.LogDebug("body: %s", body)
1121 if resp.StatusCode == http.StatusOK {
1122 return
1123 }
1124 if resp.StatusCode == http.StatusConflict {
1125 var apiError DocsUsersRemoveAPIError
1126 err = json.Unmarshal(body, &apiError)
1127 if err != nil {
1128 return
1129 }
1130 err = apiError
1131 return
1132 }
1133 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1134 if err != nil {
1135 return
1136 }
1137 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1138 return
1139 }
1140
1141 // New returns a Client implementation for this namespace
1142 func New(c dropbox.Config) Client {
1143 ctx := apiImpl(dropbox.NewContext(c))
1144 return &ctx
1145 }
+0
-854
dropbox/paper/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package paper : This namespace contains endpoints and data types for managing
21 // docs and folders in Dropbox Paper.
22 package paper
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing"
30 )
31
32 // AddMember : has no documentation (yet)
33 type AddMember struct {
34 // PermissionLevel : Permission for the user.
35 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
36 // Member : User which should be added to the Paper doc. Specify only email
37 // address or Dropbox account ID.
38 Member *sharing.MemberSelector `json:"member"`
39 }
40
41 // NewAddMember returns a new AddMember instance
42 func NewAddMember(Member *sharing.MemberSelector) *AddMember {
43 s := new(AddMember)
44 s.Member = Member
45 s.PermissionLevel = &PaperDocPermissionLevel{Tagged: dropbox.Tagged{"edit"}}
46 return s
47 }
48
49 // RefPaperDoc : has no documentation (yet)
50 type RefPaperDoc struct {
51 // DocId : The Paper doc ID.
52 DocId string `json:"doc_id"`
53 }
54
55 // NewRefPaperDoc returns a new RefPaperDoc instance
56 func NewRefPaperDoc(DocId string) *RefPaperDoc {
57 s := new(RefPaperDoc)
58 s.DocId = DocId
59 return s
60 }
61
62 // AddPaperDocUser : has no documentation (yet)
63 type AddPaperDocUser struct {
64 RefPaperDoc
65 // Members : User which should be added to the Paper doc. Specify only email
66 // address or Dropbox account ID.
67 Members []*AddMember `json:"members"`
68 // CustomMessage : A personal message that will be emailed to each
69 // successfully added member.
70 CustomMessage string `json:"custom_message,omitempty"`
71 // Quiet : Clients should set this to true if no email message shall be sent
72 // to added users.
73 Quiet bool `json:"quiet"`
74 }
75
76 // NewAddPaperDocUser returns a new AddPaperDocUser instance
77 func NewAddPaperDocUser(DocId string, Members []*AddMember) *AddPaperDocUser {
78 s := new(AddPaperDocUser)
79 s.DocId = DocId
80 s.Members = Members
81 s.Quiet = false
82 return s
83 }
84
85 // AddPaperDocUserMemberResult : Per-member result for `docsUsersAdd`.
86 type AddPaperDocUserMemberResult struct {
87 // Member : One of specified input members.
88 Member *sharing.MemberSelector `json:"member"`
89 // Result : The outcome of the action on this member.
90 Result *AddPaperDocUserResult `json:"result"`
91 }
92
93 // NewAddPaperDocUserMemberResult returns a new AddPaperDocUserMemberResult instance
94 func NewAddPaperDocUserMemberResult(Member *sharing.MemberSelector, Result *AddPaperDocUserResult) *AddPaperDocUserMemberResult {
95 s := new(AddPaperDocUserMemberResult)
96 s.Member = Member
97 s.Result = Result
98 return s
99 }
100
101 // AddPaperDocUserResult : has no documentation (yet)
102 type AddPaperDocUserResult struct {
103 dropbox.Tagged
104 }
105
106 // Valid tag values for AddPaperDocUserResult
107 const (
108 AddPaperDocUserResultSuccess = "success"
109 AddPaperDocUserResultUnknownError = "unknown_error"
110 AddPaperDocUserResultSharingOutsideTeamDisabled = "sharing_outside_team_disabled"
111 AddPaperDocUserResultDailyLimitReached = "daily_limit_reached"
112 AddPaperDocUserResultUserIsOwner = "user_is_owner"
113 AddPaperDocUserResultFailedUserDataRetrieval = "failed_user_data_retrieval"
114 AddPaperDocUserResultPermissionAlreadyGranted = "permission_already_granted"
115 AddPaperDocUserResultOther = "other"
116 )
117
118 // Cursor : has no documentation (yet)
119 type Cursor struct {
120 // Value : The actual cursor value.
121 Value string `json:"value"`
122 // Expiration : Expiration time of `value`. Some cursors might have
123 // expiration time assigned. This is a UTC value after which the cursor is
124 // no longer valid and the API starts returning an error. If cursor expires
125 // a new one needs to be obtained and pagination needs to be restarted. Some
126 // cursors might be short-lived some cursors might be long-lived. This
127 // really depends on the sorting type and order, e.g.: 1. on one hand,
128 // listing docs created by the user, sorted by the created time ascending
129 // will have undefinite expiration because the results cannot change while
130 // the iteration is happening. This cursor would be suitable for long term
131 // polling. 2. on the other hand, listing docs sorted by the last modified
132 // time will have a very short expiration as docs do get modified very often
133 // and the modified time can be changed while the iteration is happening
134 // thus altering the results.
135 Expiration time.Time `json:"expiration,omitempty"`
136 }
137
138 // NewCursor returns a new Cursor instance
139 func NewCursor(Value string) *Cursor {
140 s := new(Cursor)
141 s.Value = Value
142 return s
143 }
144
145 // PaperApiBaseError : has no documentation (yet)
146 type PaperApiBaseError struct {
147 dropbox.Tagged
148 }
149
150 // Valid tag values for PaperApiBaseError
151 const (
152 PaperApiBaseErrorInsufficientPermissions = "insufficient_permissions"
153 PaperApiBaseErrorOther = "other"
154 )
155
156 // DocLookupError : has no documentation (yet)
157 type DocLookupError struct {
158 dropbox.Tagged
159 }
160
161 // Valid tag values for DocLookupError
162 const (
163 DocLookupErrorInsufficientPermissions = "insufficient_permissions"
164 DocLookupErrorOther = "other"
165 DocLookupErrorDocNotFound = "doc_not_found"
166 )
167
168 // DocSubscriptionLevel : The subscription level of a Paper doc.
169 type DocSubscriptionLevel struct {
170 dropbox.Tagged
171 }
172
173 // Valid tag values for DocSubscriptionLevel
174 const (
175 DocSubscriptionLevelDefault = "default"
176 DocSubscriptionLevelIgnore = "ignore"
177 DocSubscriptionLevelEvery = "every"
178 DocSubscriptionLevelNoEmail = "no_email"
179 )
180
181 // ExportFormat : The desired export format of the Paper doc.
182 type ExportFormat struct {
183 dropbox.Tagged
184 }
185
186 // Valid tag values for ExportFormat
187 const (
188 ExportFormatHtml = "html"
189 ExportFormatMarkdown = "markdown"
190 ExportFormatOther = "other"
191 )
192
193 // Folder : Data structure representing a Paper folder.
194 type Folder struct {
195 // Id : Paper folder ID. This ID uniquely identifies the folder.
196 Id string `json:"id"`
197 // Name : Paper folder name.
198 Name string `json:"name"`
199 }
200
201 // NewFolder returns a new Folder instance
202 func NewFolder(Id string, Name string) *Folder {
203 s := new(Folder)
204 s.Id = Id
205 s.Name = Name
206 return s
207 }
208
209 // FolderSharingPolicyType : The sharing policy of a Paper folder. Note: The
210 // sharing policy of subfolders is inherited from the root folder.
211 type FolderSharingPolicyType struct {
212 dropbox.Tagged
213 }
214
215 // Valid tag values for FolderSharingPolicyType
216 const (
217 FolderSharingPolicyTypeTeam = "team"
218 FolderSharingPolicyTypeInviteOnly = "invite_only"
219 )
220
221 // FolderSubscriptionLevel : The subscription level of a Paper folder.
222 type FolderSubscriptionLevel struct {
223 dropbox.Tagged
224 }
225
226 // Valid tag values for FolderSubscriptionLevel
227 const (
228 FolderSubscriptionLevelNone = "none"
229 FolderSubscriptionLevelActivityOnly = "activity_only"
230 FolderSubscriptionLevelDailyEmails = "daily_emails"
231 FolderSubscriptionLevelWeeklyEmails = "weekly_emails"
232 )
233
234 // FoldersContainingPaperDoc : Metadata about Paper folders containing the
235 // specififed Paper doc.
236 type FoldersContainingPaperDoc struct {
237 // FolderSharingPolicyType : The sharing policy of the folder containing the
238 // Paper doc.
239 FolderSharingPolicyType *FolderSharingPolicyType `json:"folder_sharing_policy_type,omitempty"`
240 // Folders : The folder path. If present the first folder is the root
241 // folder.
242 Folders []*Folder `json:"folders,omitempty"`
243 }
244
245 // NewFoldersContainingPaperDoc returns a new FoldersContainingPaperDoc instance
246 func NewFoldersContainingPaperDoc() *FoldersContainingPaperDoc {
247 s := new(FoldersContainingPaperDoc)
248 return s
249 }
250
251 // ImportFormat : The import format of the incoming data.
252 type ImportFormat struct {
253 dropbox.Tagged
254 }
255
256 // Valid tag values for ImportFormat
257 const (
258 ImportFormatHtml = "html"
259 ImportFormatMarkdown = "markdown"
260 ImportFormatPlainText = "plain_text"
261 ImportFormatOther = "other"
262 )
263
264 // InviteeInfoWithPermissionLevel : has no documentation (yet)
265 type InviteeInfoWithPermissionLevel struct {
266 // Invitee : Email address invited to the Paper doc.
267 Invitee *sharing.InviteeInfo `json:"invitee"`
268 // PermissionLevel : Permission level for the invitee.
269 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
270 }
271
272 // NewInviteeInfoWithPermissionLevel returns a new InviteeInfoWithPermissionLevel instance
273 func NewInviteeInfoWithPermissionLevel(Invitee *sharing.InviteeInfo, PermissionLevel *PaperDocPermissionLevel) *InviteeInfoWithPermissionLevel {
274 s := new(InviteeInfoWithPermissionLevel)
275 s.Invitee = Invitee
276 s.PermissionLevel = PermissionLevel
277 return s
278 }
279
280 // ListDocsCursorError : has no documentation (yet)
281 type ListDocsCursorError struct {
282 dropbox.Tagged
283 // CursorError : has no documentation (yet)
284 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
285 }
286
287 // Valid tag values for ListDocsCursorError
288 const (
289 ListDocsCursorErrorCursorError = "cursor_error"
290 ListDocsCursorErrorOther = "other"
291 )
292
293 // UnmarshalJSON deserializes into a ListDocsCursorError instance
294 func (u *ListDocsCursorError) UnmarshalJSON(body []byte) error {
295 type wrap struct {
296 dropbox.Tagged
297 // CursorError : has no documentation (yet)
298 CursorError json.RawMessage `json:"cursor_error,omitempty"`
299 }
300 var w wrap
301 var err error
302 if err = json.Unmarshal(body, &w); err != nil {
303 return err
304 }
305 u.Tag = w.Tag
306 switch u.Tag {
307 case "cursor_error":
308 err = json.Unmarshal(w.CursorError, &u.CursorError)
309
310 if err != nil {
311 return err
312 }
313 }
314 return nil
315 }
316
317 // ListPaperDocsArgs : has no documentation (yet)
318 type ListPaperDocsArgs struct {
319 // FilterBy : Allows user to specify how the Paper docs should be filtered.
320 FilterBy *ListPaperDocsFilterBy `json:"filter_by"`
321 // SortBy : Allows user to specify how the Paper docs should be sorted.
322 SortBy *ListPaperDocsSortBy `json:"sort_by"`
323 // SortOrder : Allows user to specify the sort order of the result.
324 SortOrder *ListPaperDocsSortOrder `json:"sort_order"`
325 // Limit : Size limit per batch. The maximum number of docs that can be
326 // retrieved per batch is 1000. Higher value results in invalid arguments
327 // error.
328 Limit int32 `json:"limit"`
329 }
330
331 // NewListPaperDocsArgs returns a new ListPaperDocsArgs instance
332 func NewListPaperDocsArgs() *ListPaperDocsArgs {
333 s := new(ListPaperDocsArgs)
334 s.FilterBy = &ListPaperDocsFilterBy{Tagged: dropbox.Tagged{"docs_accessed"}}
335 s.SortBy = &ListPaperDocsSortBy{Tagged: dropbox.Tagged{"accessed"}}
336 s.SortOrder = &ListPaperDocsSortOrder{Tagged: dropbox.Tagged{"ascending"}}
337 s.Limit = 1000
338 return s
339 }
340
341 // ListPaperDocsContinueArgs : has no documentation (yet)
342 type ListPaperDocsContinueArgs struct {
343 // Cursor : The cursor obtained from `docsList` or `docsListContinue`.
344 // Allows for pagination.
345 Cursor string `json:"cursor"`
346 }
347
348 // NewListPaperDocsContinueArgs returns a new ListPaperDocsContinueArgs instance
349 func NewListPaperDocsContinueArgs(Cursor string) *ListPaperDocsContinueArgs {
350 s := new(ListPaperDocsContinueArgs)
351 s.Cursor = Cursor
352 return s
353 }
354
355 // ListPaperDocsFilterBy : has no documentation (yet)
356 type ListPaperDocsFilterBy struct {
357 dropbox.Tagged
358 }
359
360 // Valid tag values for ListPaperDocsFilterBy
361 const (
362 ListPaperDocsFilterByDocsAccessed = "docs_accessed"
363 ListPaperDocsFilterByDocsCreated = "docs_created"
364 ListPaperDocsFilterByOther = "other"
365 )
366
367 // ListPaperDocsResponse : has no documentation (yet)
368 type ListPaperDocsResponse struct {
369 // DocIds : The list of Paper doc IDs that can be used to access the given
370 // Paper docs or supplied to other API methods. The list is sorted in the
371 // order specified by the initial call to `docsList`.
372 DocIds []string `json:"doc_ids"`
373 // Cursor : Pass the cursor into `docsListContinue` to paginate through all
374 // files. The cursor preserves all properties as specified in the original
375 // call to `docsList`.
376 Cursor *Cursor `json:"cursor"`
377 // HasMore : Will be set to True if a subsequent call with the provided
378 // cursor to `docsListContinue` returns immediately with some results. If
379 // set to False please allow some delay before making another call to
380 // `docsListContinue`.
381 HasMore bool `json:"has_more"`
382 }
383
384 // NewListPaperDocsResponse returns a new ListPaperDocsResponse instance
385 func NewListPaperDocsResponse(DocIds []string, Cursor *Cursor, HasMore bool) *ListPaperDocsResponse {
386 s := new(ListPaperDocsResponse)
387 s.DocIds = DocIds
388 s.Cursor = Cursor
389 s.HasMore = HasMore
390 return s
391 }
392
393 // ListPaperDocsSortBy : has no documentation (yet)
394 type ListPaperDocsSortBy struct {
395 dropbox.Tagged
396 }
397
398 // Valid tag values for ListPaperDocsSortBy
399 const (
400 ListPaperDocsSortByAccessed = "accessed"
401 ListPaperDocsSortByModified = "modified"
402 ListPaperDocsSortByCreated = "created"
403 ListPaperDocsSortByOther = "other"
404 )
405
406 // ListPaperDocsSortOrder : has no documentation (yet)
407 type ListPaperDocsSortOrder struct {
408 dropbox.Tagged
409 }
410
411 // Valid tag values for ListPaperDocsSortOrder
412 const (
413 ListPaperDocsSortOrderAscending = "ascending"
414 ListPaperDocsSortOrderDescending = "descending"
415 ListPaperDocsSortOrderOther = "other"
416 )
417
418 // ListUsersCursorError : has no documentation (yet)
419 type ListUsersCursorError struct {
420 dropbox.Tagged
421 // CursorError : has no documentation (yet)
422 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
423 }
424
425 // Valid tag values for ListUsersCursorError
426 const (
427 ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions"
428 ListUsersCursorErrorOther = "other"
429 ListUsersCursorErrorDocNotFound = "doc_not_found"
430 ListUsersCursorErrorCursorError = "cursor_error"
431 )
432
433 // UnmarshalJSON deserializes into a ListUsersCursorError instance
434 func (u *ListUsersCursorError) UnmarshalJSON(body []byte) error {
435 type wrap struct {
436 dropbox.Tagged
437 // CursorError : has no documentation (yet)
438 CursorError json.RawMessage `json:"cursor_error,omitempty"`
439 }
440 var w wrap
441 var err error
442 if err = json.Unmarshal(body, &w); err != nil {
443 return err
444 }
445 u.Tag = w.Tag
446 switch u.Tag {
447 case "cursor_error":
448 err = json.Unmarshal(w.CursorError, &u.CursorError)
449
450 if err != nil {
451 return err
452 }
453 }
454 return nil
455 }
456
457 // ListUsersOnFolderArgs : has no documentation (yet)
458 type ListUsersOnFolderArgs struct {
459 RefPaperDoc
460 // Limit : Size limit per batch. The maximum number of users that can be
461 // retrieved per batch is 1000. Higher value results in invalid arguments
462 // error.
463 Limit int32 `json:"limit"`
464 }
465
466 // NewListUsersOnFolderArgs returns a new ListUsersOnFolderArgs instance
467 func NewListUsersOnFolderArgs(DocId string) *ListUsersOnFolderArgs {
468 s := new(ListUsersOnFolderArgs)
469 s.DocId = DocId
470 s.Limit = 1000
471 return s
472 }
473
474 // ListUsersOnFolderContinueArgs : has no documentation (yet)
475 type ListUsersOnFolderContinueArgs struct {
476 RefPaperDoc
477 // Cursor : The cursor obtained from `docsFolderUsersList` or
478 // `docsFolderUsersListContinue`. Allows for pagination.
479 Cursor string `json:"cursor"`
480 }
481
482 // NewListUsersOnFolderContinueArgs returns a new ListUsersOnFolderContinueArgs instance
483 func NewListUsersOnFolderContinueArgs(DocId string, Cursor string) *ListUsersOnFolderContinueArgs {
484 s := new(ListUsersOnFolderContinueArgs)
485 s.DocId = DocId
486 s.Cursor = Cursor
487 return s
488 }
489
490 // ListUsersOnFolderResponse : has no documentation (yet)
491 type ListUsersOnFolderResponse struct {
492 // Invitees : List of email addresses that are invited on the Paper folder.
493 Invitees []*sharing.InviteeInfo `json:"invitees"`
494 // Users : List of users that are invited on the Paper folder.
495 Users []*sharing.UserInfo `json:"users"`
496 // Cursor : Pass the cursor into `docsFolderUsersListContinue` to paginate
497 // through all users. The cursor preserves all properties as specified in
498 // the original call to `docsFolderUsersList`.
499 Cursor *Cursor `json:"cursor"`
500 // HasMore : Will be set to True if a subsequent call with the provided
501 // cursor to `docsFolderUsersListContinue` returns immediately with some
502 // results. If set to False please allow some delay before making another
503 // call to `docsFolderUsersListContinue`.
504 HasMore bool `json:"has_more"`
505 }
506
507 // NewListUsersOnFolderResponse returns a new ListUsersOnFolderResponse instance
508 func NewListUsersOnFolderResponse(Invitees []*sharing.InviteeInfo, Users []*sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnFolderResponse {
509 s := new(ListUsersOnFolderResponse)
510 s.Invitees = Invitees
511 s.Users = Users
512 s.Cursor = Cursor
513 s.HasMore = HasMore
514 return s
515 }
516
517 // ListUsersOnPaperDocArgs : has no documentation (yet)
518 type ListUsersOnPaperDocArgs struct {
519 RefPaperDoc
520 // Limit : Size limit per batch. The maximum number of users that can be
521 // retrieved per batch is 1000. Higher value results in invalid arguments
522 // error.
523 Limit int32 `json:"limit"`
524 // FilterBy : Specify this attribute if you want to obtain users that have
525 // already accessed the Paper doc.
526 FilterBy *UserOnPaperDocFilter `json:"filter_by"`
527 }
528
529 // NewListUsersOnPaperDocArgs returns a new ListUsersOnPaperDocArgs instance
530 func NewListUsersOnPaperDocArgs(DocId string) *ListUsersOnPaperDocArgs {
531 s := new(ListUsersOnPaperDocArgs)
532 s.DocId = DocId
533 s.Limit = 1000
534 s.FilterBy = &UserOnPaperDocFilter{Tagged: dropbox.Tagged{"shared"}}
535 return s
536 }
537
538 // ListUsersOnPaperDocContinueArgs : has no documentation (yet)
539 type ListUsersOnPaperDocContinueArgs struct {
540 RefPaperDoc
541 // Cursor : The cursor obtained from `docsUsersList` or
542 // `docsUsersListContinue`. Allows for pagination.
543 Cursor string `json:"cursor"`
544 }
545
546 // NewListUsersOnPaperDocContinueArgs returns a new ListUsersOnPaperDocContinueArgs instance
547 func NewListUsersOnPaperDocContinueArgs(DocId string, Cursor string) *ListUsersOnPaperDocContinueArgs {
548 s := new(ListUsersOnPaperDocContinueArgs)
549 s.DocId = DocId
550 s.Cursor = Cursor
551 return s
552 }
553
554 // ListUsersOnPaperDocResponse : has no documentation (yet)
555 type ListUsersOnPaperDocResponse struct {
556 // Invitees : List of email addresses with their respective permission
557 // levels that are invited on the Paper doc.
558 Invitees []*InviteeInfoWithPermissionLevel `json:"invitees"`
559 // Users : List of users with their respective permission levels that are
560 // invited on the Paper folder.
561 Users []*UserInfoWithPermissionLevel `json:"users"`
562 // DocOwner : The Paper doc owner. This field is populated on every single
563 // response.
564 DocOwner *sharing.UserInfo `json:"doc_owner"`
565 // Cursor : Pass the cursor into `docsUsersListContinue` to paginate through
566 // all users. The cursor preserves all properties as specified in the
567 // original call to `docsUsersList`.
568 Cursor *Cursor `json:"cursor"`
569 // HasMore : Will be set to True if a subsequent call with the provided
570 // cursor to `docsUsersListContinue` returns immediately with some results.
571 // If set to False please allow some delay before making another call to
572 // `docsUsersListContinue`.
573 HasMore bool `json:"has_more"`
574 }
575
576 // NewListUsersOnPaperDocResponse returns a new ListUsersOnPaperDocResponse instance
577 func NewListUsersOnPaperDocResponse(Invitees []*InviteeInfoWithPermissionLevel, Users []*UserInfoWithPermissionLevel, DocOwner *sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnPaperDocResponse {
578 s := new(ListUsersOnPaperDocResponse)
579 s.Invitees = Invitees
580 s.Users = Users
581 s.DocOwner = DocOwner
582 s.Cursor = Cursor
583 s.HasMore = HasMore
584 return s
585 }
586
587 // PaperApiCursorError : has no documentation (yet)
588 type PaperApiCursorError struct {
589 dropbox.Tagged
590 }
591
592 // Valid tag values for PaperApiCursorError
593 const (
594 PaperApiCursorErrorExpiredCursor = "expired_cursor"
595 PaperApiCursorErrorInvalidCursor = "invalid_cursor"
596 PaperApiCursorErrorWrongUserInCursor = "wrong_user_in_cursor"
597 PaperApiCursorErrorReset = "reset"
598 PaperApiCursorErrorOther = "other"
599 )
600
601 // PaperDocCreateArgs : has no documentation (yet)
602 type PaperDocCreateArgs struct {
603 // ParentFolderId : The Paper folder ID where the Paper document should be
604 // created. The API user has to have write access to this folder or error is
605 // thrown.
606 ParentFolderId string `json:"parent_folder_id,omitempty"`
607 // ImportFormat : The format of provided data.
608 ImportFormat *ImportFormat `json:"import_format"`
609 }
610
611 // NewPaperDocCreateArgs returns a new PaperDocCreateArgs instance
612 func NewPaperDocCreateArgs(ImportFormat *ImportFormat) *PaperDocCreateArgs {
613 s := new(PaperDocCreateArgs)
614 s.ImportFormat = ImportFormat
615 return s
616 }
617
618 // PaperDocCreateError : has no documentation (yet)
619 type PaperDocCreateError struct {
620 dropbox.Tagged
621 }
622
623 // Valid tag values for PaperDocCreateError
624 const (
625 PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions"
626 PaperDocCreateErrorOther = "other"
627 PaperDocCreateErrorContentMalformed = "content_malformed"
628 PaperDocCreateErrorFolderNotFound = "folder_not_found"
629 PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
630 PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
631 )
632
633 // PaperDocCreateUpdateResult : has no documentation (yet)
634 type PaperDocCreateUpdateResult struct {
635 // DocId : Doc ID of the newly created doc.
636 DocId string `json:"doc_id"`
637 // Revision : The Paper doc revision. Simply an ever increasing number.
638 Revision int64 `json:"revision"`
639 // Title : The Paper doc title.
640 Title string `json:"title"`
641 }
642
643 // NewPaperDocCreateUpdateResult returns a new PaperDocCreateUpdateResult instance
644 func NewPaperDocCreateUpdateResult(DocId string, Revision int64, Title string) *PaperDocCreateUpdateResult {
645 s := new(PaperDocCreateUpdateResult)
646 s.DocId = DocId
647 s.Revision = Revision
648 s.Title = Title
649 return s
650 }
651
652 // PaperDocExport : has no documentation (yet)
653 type PaperDocExport struct {
654 RefPaperDoc
655 // ExportFormat : has no documentation (yet)
656 ExportFormat *ExportFormat `json:"export_format"`
657 }
658
659 // NewPaperDocExport returns a new PaperDocExport instance
660 func NewPaperDocExport(DocId string, ExportFormat *ExportFormat) *PaperDocExport {
661 s := new(PaperDocExport)
662 s.DocId = DocId
663 s.ExportFormat = ExportFormat
664 return s
665 }
666
667 // PaperDocExportResult : has no documentation (yet)
668 type PaperDocExportResult struct {
669 // Owner : The Paper doc owner's email address.
670 Owner string `json:"owner"`
671 // Title : The Paper doc title.
672 Title string `json:"title"`
673 // Revision : The Paper doc revision. Simply an ever increasing number.
674 Revision int64 `json:"revision"`
675 // MimeType : MIME type of the export. This corresponds to `ExportFormat`
676 // specified in the request.
677 MimeType string `json:"mime_type"`
678 }
679
680 // NewPaperDocExportResult returns a new PaperDocExportResult instance
681 func NewPaperDocExportResult(Owner string, Title string, Revision int64, MimeType string) *PaperDocExportResult {
682 s := new(PaperDocExportResult)
683 s.Owner = Owner
684 s.Title = Title
685 s.Revision = Revision
686 s.MimeType = MimeType
687 return s
688 }
689
690 // PaperDocPermissionLevel : has no documentation (yet)
691 type PaperDocPermissionLevel struct {
692 dropbox.Tagged
693 }
694
695 // Valid tag values for PaperDocPermissionLevel
696 const (
697 PaperDocPermissionLevelEdit = "edit"
698 PaperDocPermissionLevelViewAndComment = "view_and_comment"
699 PaperDocPermissionLevelOther = "other"
700 )
701
702 // PaperDocSharingPolicy : has no documentation (yet)
703 type PaperDocSharingPolicy struct {
704 RefPaperDoc
705 // SharingPolicy : The default sharing policy to be set for the Paper doc.
706 SharingPolicy *SharingPolicy `json:"sharing_policy"`
707 }
708
709 // NewPaperDocSharingPolicy returns a new PaperDocSharingPolicy instance
710 func NewPaperDocSharingPolicy(DocId string, SharingPolicy *SharingPolicy) *PaperDocSharingPolicy {
711 s := new(PaperDocSharingPolicy)
712 s.DocId = DocId
713 s.SharingPolicy = SharingPolicy
714 return s
715 }
716
717 // PaperDocUpdateArgs : has no documentation (yet)
718 type PaperDocUpdateArgs struct {
719 RefPaperDoc
720 // DocUpdatePolicy : The policy used for the current update call.
721 DocUpdatePolicy *PaperDocUpdatePolicy `json:"doc_update_policy"`
722 // Revision : The latest doc revision. This value must match the head
723 // revision or an error code will be returned. This is to prevent colliding
724 // writes.
725 Revision int64 `json:"revision"`
726 // ImportFormat : The format of provided data.
727 ImportFormat *ImportFormat `json:"import_format"`
728 }
729
730 // NewPaperDocUpdateArgs returns a new PaperDocUpdateArgs instance
731 func NewPaperDocUpdateArgs(DocId string, DocUpdatePolicy *PaperDocUpdatePolicy, Revision int64, ImportFormat *ImportFormat) *PaperDocUpdateArgs {
732 s := new(PaperDocUpdateArgs)
733 s.DocId = DocId
734 s.DocUpdatePolicy = DocUpdatePolicy
735 s.Revision = Revision
736 s.ImportFormat = ImportFormat
737 return s
738 }
739
740 // PaperDocUpdateError : has no documentation (yet)
741 type PaperDocUpdateError struct {
742 dropbox.Tagged
743 }
744
745 // Valid tag values for PaperDocUpdateError
746 const (
747 PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions"
748 PaperDocUpdateErrorOther = "other"
749 PaperDocUpdateErrorDocNotFound = "doc_not_found"
750 PaperDocUpdateErrorContentMalformed = "content_malformed"
751 PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
752 PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
753 PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
754 PaperDocUpdateErrorDocArchived = "doc_archived"
755 PaperDocUpdateErrorDocDeleted = "doc_deleted"
756 )
757
758 // PaperDocUpdatePolicy : has no documentation (yet)
759 type PaperDocUpdatePolicy struct {
760 dropbox.Tagged
761 }
762
763 // Valid tag values for PaperDocUpdatePolicy
764 const (
765 PaperDocUpdatePolicyAppend = "append"
766 PaperDocUpdatePolicyPrepend = "prepend"
767 PaperDocUpdatePolicyOverwriteAll = "overwrite_all"
768 PaperDocUpdatePolicyOther = "other"
769 )
770
771 // RemovePaperDocUser : has no documentation (yet)
772 type RemovePaperDocUser struct {
773 RefPaperDoc
774 // Member : User which should be removed from the Paper doc. Specify only
775 // email address or Dropbox account ID.
776 Member *sharing.MemberSelector `json:"member"`
777 }
778
779 // NewRemovePaperDocUser returns a new RemovePaperDocUser instance
780 func NewRemovePaperDocUser(DocId string, Member *sharing.MemberSelector) *RemovePaperDocUser {
781 s := new(RemovePaperDocUser)
782 s.DocId = DocId
783 s.Member = Member
784 return s
785 }
786
787 // SharingPolicy : Sharing policy of Paper doc.
788 type SharingPolicy struct {
789 // PublicSharingPolicy : This value applies to the non-team members.
790 PublicSharingPolicy *SharingPublicPolicyType `json:"public_sharing_policy,omitempty"`
791 // TeamSharingPolicy : This value applies to the team members only. The
792 // value is null for all personal accounts.
793 TeamSharingPolicy *SharingTeamPolicyType `json:"team_sharing_policy,omitempty"`
794 }
795
796 // NewSharingPolicy returns a new SharingPolicy instance
797 func NewSharingPolicy() *SharingPolicy {
798 s := new(SharingPolicy)
799 return s
800 }
801
802 // SharingTeamPolicyType : The sharing policy type of the Paper doc.
803 type SharingTeamPolicyType struct {
804 dropbox.Tagged
805 }
806
807 // Valid tag values for SharingTeamPolicyType
808 const (
809 SharingTeamPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit"
810 SharingTeamPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment"
811 SharingTeamPolicyTypeInviteOnly = "invite_only"
812 )
813
814 // SharingPublicPolicyType : has no documentation (yet)
815 type SharingPublicPolicyType struct {
816 dropbox.Tagged
817 }
818
819 // Valid tag values for SharingPublicPolicyType
820 const (
821 SharingPublicPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit"
822 SharingPublicPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment"
823 SharingPublicPolicyTypeInviteOnly = "invite_only"
824 SharingPublicPolicyTypeDisabled = "disabled"
825 )
826
827 // UserInfoWithPermissionLevel : has no documentation (yet)
828 type UserInfoWithPermissionLevel struct {
829 // User : User shared on the Paper doc.
830 User *sharing.UserInfo `json:"user"`
831 // PermissionLevel : Permission level for the user.
832 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
833 }
834
835 // NewUserInfoWithPermissionLevel returns a new UserInfoWithPermissionLevel instance
836 func NewUserInfoWithPermissionLevel(User *sharing.UserInfo, PermissionLevel *PaperDocPermissionLevel) *UserInfoWithPermissionLevel {
837 s := new(UserInfoWithPermissionLevel)
838 s.User = User
839 s.PermissionLevel = PermissionLevel
840 return s
841 }
842
843 // UserOnPaperDocFilter : has no documentation (yet)
844 type UserOnPaperDocFilter struct {
845 dropbox.Tagged
846 }
847
848 // Valid tag values for UserOnPaperDocFilter
849 const (
850 UserOnPaperDocFilterVisited = "visited"
851 UserOnPaperDocFilterShared = "shared"
852 UserOnPaperDocFilterOther = "other"
853 )
+0
-223
dropbox/sdk.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package dropbox
21
22 import (
23 "encoding/json"
24 "fmt"
25 "io"
26 "log"
27 "net/http"
28
29 "golang.org/x/net/context"
30 "golang.org/x/oauth2"
31 )
32
33 const (
34 apiVersion = 2
35 defaultDomain = ".dropboxapi.com"
36 hostAPI = "api"
37 hostContent = "content"
38 hostNotify = "notify"
39 sdkVersion = "5.4.0"
40 specVersion = "097e9ba"
41 )
42
43 // Version returns the current SDK version and API Spec version
44 func Version() (string, string) {
45 return sdkVersion, specVersion
46 }
47
48 // Config contains parameters for configuring the SDK.
49 type Config struct {
50 // OAuth2 access token
51 Token string
52 // Logging level for SDK generated logs
53 LogLevel LogLevel
54 // Logging target for verbose SDK logging
55 Logger *log.Logger
56 // Used with APIs that support operations as another user
57 AsMemberID string
58 // No need to set -- for testing only
59 Domain string
60 // No need to set -- for testing only
61 Client *http.Client
62 // No need to set -- for testing only
63 HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string
64 // No need to set -- for testing only
65 URLGenerator func(hostType string, style string, namespace string, route string) string
66 }
67
68 // LogLevel defines a type that can set the desired level of logging the SDK will generate.
69 type LogLevel uint
70
71 const (
72 // LogOff will disable all SDK logging. This is the default log level
73 LogOff LogLevel = iota * (1 << 8)
74 // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments),
75 // response and body contents.
76 LogDebug
77 // LogInfo will log SDK request (not including arguments) and responses.
78 LogInfo
79 )
80
81 func (l LogLevel) shouldLog(v LogLevel) bool {
82 return l > v || l&v == v
83 }
84
85 func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
86 if !c.LogLevel.shouldLog(l) {
87 return
88 }
89
90 if c.Logger != nil {
91 c.Logger.Printf(format, v...)
92 } else {
93 log.Printf(format, v...)
94 }
95 }
96
97 // LogDebug emits a debug level SDK log if config's log level is at least LogDebug
98 func (c *Config) LogDebug(format string, v ...interface{}) {
99 c.doLog(LogDebug, format, v...)
100 }
101
102 // LogInfo emits an info level SDK log if config's log level is at least LogInfo
103 func (c *Config) LogInfo(format string, v ...interface{}) {
104 c.doLog(LogInfo, format, v...)
105 }
106
107 // Context is the base client context used to implement per-namespace clients.
108 type Context struct {
109 Config Config
110 Client *http.Client
111 HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string
112 URLGenerator func(hostType string, style string, namespace string, route string) string
113 }
114
115 // NewRequest returns an appropriate Request object for the given namespace/route.
116 func (c *Context) NewRequest(
117 hostType string,
118 style string,
119 authed bool,
120 namespace string,
121 route string,
122 headers map[string]string,
123 body io.Reader,
124 ) (*http.Request, error) {
125 url := c.URLGenerator(hostType, style, namespace, route)
126 req, err := http.NewRequest("POST", url, body)
127 if err != nil {
128 return nil, err
129 }
130 for k, v := range headers {
131 req.Header.Add(k, v)
132 }
133 for k, v := range c.HeaderGenerator(hostType, style, namespace, route) {
134 req.Header.Add(k, v)
135 }
136 if req.Header.Get("Host") != "" {
137 req.Host = req.Header.Get("Host")
138 }
139 if !authed {
140 req.Header.Del("Authorization")
141 }
142 return req, nil
143 }
144
145 // NewContext returns a new Context with the given Config.
146 func NewContext(c Config) Context {
147 domain := c.Domain
148 if domain == "" {
149 domain = defaultDomain
150 }
151
152 client := c.Client
153 if client == nil {
154 var conf = &oauth2.Config{Endpoint: OAuthEndpoint(domain)}
155 tok := &oauth2.Token{AccessToken: c.Token}
156 client = conf.Client(context.Background(), tok)
157 }
158
159 headerGenerator := c.HeaderGenerator
160 if headerGenerator == nil {
161 headerGenerator = func(hostType string, style string, namespace string, route string) map[string]string {
162 return map[string]string{}
163 }
164 }
165
166 urlGenerator := c.URLGenerator
167 if urlGenerator == nil {
168 hostMap := map[string]string{
169 hostAPI: hostAPI + domain,
170 hostContent: hostContent + domain,
171 hostNotify: hostNotify + domain,
172 }
173 urlGenerator = func(hostType string, style string, namespace string, route string) string {
174 fqHost := hostMap[hostType]
175 return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route)
176 }
177 }
178
179 return Context{c, client, headerGenerator, urlGenerator}
180 }
181
182 // OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain
183 func OAuthEndpoint(domain string) oauth2.Endpoint {
184 if domain == "" {
185 domain = defaultDomain
186 }
187 authURL := fmt.Sprintf("https://meta%s/1/oauth2/authorize", domain)
188 tokenURL := fmt.Sprintf("https://api%s/1/oauth2/token", domain)
189 if domain == defaultDomain {
190 authURL = "https://www.dropbox.com/1/oauth2/authorize"
191 }
192 return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL}
193 }
194
195 // Tagged is used for tagged unions.
196 type Tagged struct {
197 Tag string `json:".tag"`
198 }
199
200 // APIError is the base type for endpoint-specific errors.
201 type APIError struct {
202 ErrorSummary string `json:"error_summary"`
203 }
204
205 func (e APIError) Error() string {
206 return e.ErrorSummary
207 }
208
209 // HandleCommonAPIErrors handles common API errors
210 func HandleCommonAPIErrors(c Config, resp *http.Response, body []byte) error {
211 var apiError APIError
212 if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
213 apiError.ErrorSummary = string(body)
214 return apiError
215 }
216 e := json.Unmarshal(body, &apiError)
217 if e != nil {
218 c.LogDebug("%v", e)
219 return e
220 }
221 return apiError
222 }
+0
-171
dropbox/sdk_test.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package dropbox_test
21
22 import (
23 "fmt"
24 "net/http"
25 "net/http/httptest"
26 "strings"
27 "testing"
28
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
32 )
33
34 func generateURL(base string, namespace string, route string) string {
35 return fmt.Sprintf("%s/%s/%s", base, namespace, route)
36 }
37
38 func TestInternalError(t *testing.T) {
39 eString := "internal server error"
40 ts := httptest.NewServer(http.HandlerFunc(
41 func(w http.ResponseWriter, r *http.Request) {
42 http.Error(w, eString, http.StatusInternalServerError)
43 }))
44 defer ts.Close()
45
46 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
47 URLGenerator: func(hostType string, style string, namespace string, route string) string {
48 return generateURL(ts.URL, namespace, route)
49 }}
50 client := users.New(config)
51 v, e := client.GetCurrentAccount()
52 if v != nil || strings.Trim(e.Error(), "\n") != eString {
53 t.Errorf("v: %v e: '%s'\n", v, e.Error())
54 }
55 }
56
57 func TestRateLimitPlainText(t *testing.T) {
58 eString := "too_many_requests"
59 ts := httptest.NewServer(http.HandlerFunc(
60 func(w http.ResponseWriter, r *http.Request) {
61 w.Header().Set("Content-Type", "text/plain; charset=utf-8")
62 w.Header().Set("Retry-After", "10")
63 http.Error(w, eString, http.StatusTooManyRequests)
64 }))
65 defer ts.Close()
66
67 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
68 URLGenerator: func(hostType string, style string, namespace string, route string) string {
69 return generateURL(ts.URL, namespace, route)
70 }}
71 client := users.New(config)
72 _, e := client.GetCurrentAccount()
73 re, ok := e.(auth.RateLimitAPIError)
74 if !ok {
75 t.Errorf("Unexpected error type: %T\n", e)
76 }
77 if re.RateLimitError.RetryAfter != 10 {
78 t.Errorf("Unexpected retry-after value: %d\n", re.RateLimitError.RetryAfter)
79 }
80 if re.RateLimitError.Reason.Tag != auth.RateLimitReasonTooManyRequests {
81 t.Errorf("Unexpected reason: %v\n", re.RateLimitError.Reason)
82 }
83 }
84
85 func TestRateLimitJSON(t *testing.T) {
86 eString := `{"error_summary": "too_many_requests/..", "error": {"reason": {".tag": "too_many_requests"}, "retry_after": 300}}`
87 ts := httptest.NewServer(http.HandlerFunc(
88 func(w http.ResponseWriter, r *http.Request) {
89 w.Header().Set("Content-Type", "application/json; charset=utf-8")
90 w.Header().Set("Retry-After", "10")
91 w.WriteHeader(http.StatusTooManyRequests)
92 w.Write([]byte(eString))
93 }))
94 defer ts.Close()
95
96 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
97 URLGenerator: func(hostType string, style string, namespace string, route string) string {
98 return generateURL(ts.URL, namespace, route)
99 }}
100 client := users.New(config)
101 _, e := client.GetCurrentAccount()
102 re, ok := e.(auth.RateLimitAPIError)
103 if !ok {
104 t.Errorf("Unexpected error type: %T\n", e)
105 }
106 if re.RateLimitError.RetryAfter != 300 {
107 t.Errorf("Unexpected retry-after value: %d\n", re.RateLimitError.RetryAfter)
108 }
109 if re.RateLimitError.Reason.Tag != auth.RateLimitReasonTooManyRequests {
110 t.Errorf("Unexpected reason: %v\n", re.RateLimitError.Reason)
111 }
112 }
113
114 func TestAuthError(t *testing.T) {
115 eString := `{"error_summary": "user_suspended/...", "error": {".tag": "user_suspended"}}`
116 ts := httptest.NewServer(http.HandlerFunc(
117 func(w http.ResponseWriter, r *http.Request) {
118 w.Header().Set("Content-Type", "application/json; charset=utf-8")
119 w.WriteHeader(http.StatusUnauthorized)
120 w.Write([]byte(eString))
121 }))
122 defer ts.Close()
123
124 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
125 URLGenerator: func(hostType string, style string, namespace string, route string) string {
126 return generateURL(ts.URL, namespace, route)
127 }}
128 client := users.New(config)
129 _, e := client.GetCurrentAccount()
130 re, ok := e.(auth.AuthAPIError)
131 if !ok {
132 t.Errorf("Unexpected error type: %T\n", e)
133 }
134 fmt.Printf("ERROR is %v\n", re)
135 if re.AuthError.Tag != auth.AuthErrorUserSuspended {
136 t.Errorf("Unexpected tag: %s\n", re.AuthError.Tag)
137 }
138 }
139
140 func TestAccessError(t *testing.T) {
141 eString := `{"error_summary": "access_error/...",
142 "error": {
143 ".tag": "paper_access_denied",
144 "paper_access_denied": {".tag": "not_paper_user"}
145 }}`
146 ts := httptest.NewServer(http.HandlerFunc(
147 func(w http.ResponseWriter, r *http.Request) {
148 w.Header().Set("Content-Type", "application/json; charset=utf-8")
149 w.WriteHeader(http.StatusForbidden)
150 w.Write([]byte(eString))
151 }))
152 defer ts.Close()
153
154 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
155 URLGenerator: func(hostType string, style string, namespace string, route string) string {
156 return generateURL(ts.URL, namespace, route)
157 }}
158 client := users.New(config)
159 _, e := client.GetCurrentAccount()
160 re, ok := e.(auth.AccessAPIError)
161 if !ok {
162 t.Errorf("Unexpected error type: %T\n", e)
163 }
164 if re.AccessError.Tag != auth.AccessErrorPaperAccessDenied {
165 t.Errorf("Unexpected tag: %s\n", re.AccessError.Tag)
166 }
167 if re.AccessError.PaperAccessDenied.Tag != auth.PaperAccessErrorNotPaperUser {
168 t.Errorf("Unexpected tag: %s\n", re.AccessError.PaperAccessDenied.Tag)
169 }
170 }
+0
-38
dropbox/seen_state/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package seen_state : has no documentation (yet)
21 package seen_state
22
23 import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
24
25 // PlatformType : Possible platforms on which a user may view content.
26 type PlatformType struct {
27 dropbox.Tagged
28 }
29
30 // Valid tag values for PlatformType
31 const (
32 PlatformTypeWeb = "web"
33 PlatformTypeMobile = "mobile"
34 PlatformTypeDesktop = "desktop"
35 PlatformTypeUnknown = "unknown"
36 PlatformTypeOther = "other"
37 )
+0
-3075
dropbox/sharing/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package sharing
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io"
26 "io/ioutil"
27 "log"
28 "net/http"
29
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
33 )
34
35 // Client interface describes all routes in this namespace
36 type Client interface {
37 // AddFileMember : Adds specified members to a file.
38 AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error)
39 // AddFolderMember : Allows an owner or editor (if the ACL update policy
40 // allows) of a shared folder to add another member. For the new member to
41 // get access to all the functionality for this folder, you will need to
42 // call `mountFolder` on their behalf.
43 AddFolderMember(arg *AddFolderMemberArg) (err error)
44 // ChangeFileMemberAccess : Identical to update_file_member but with less
45 // information returned.
46 // Deprecated: Use `UpdateFileMember` instead
47 ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error)
48 // CheckJobStatus : Returns the status of an asynchronous job.
49 CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error)
50 // CheckRemoveMemberJobStatus : Returns the status of an asynchronous job
51 // for sharing a folder.
52 CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error)
53 // CheckShareJobStatus : Returns the status of an asynchronous job for
54 // sharing a folder.
55 CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error)
56 // CreateSharedLink : Create a shared link. If a shared link already exists
57 // for the given path, that link is returned. Note that in the returned
58 // `PathLinkMetadata`, the `PathLinkMetadata.url` field is the shortened URL
59 // if `CreateSharedLinkArg.short_url` argument is set to true. Previously,
60 // it was technically possible to break a shared link by moving or renaming
61 // the corresponding file or folder. In the future, this will no longer be
62 // the case, so your app shouldn't rely on this behavior. Instead, if your
63 // app needs to revoke a shared link, use `revokeSharedLink`.
64 // Deprecated: Use `CreateSharedLinkWithSettings` instead
65 CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error)
66 // CreateSharedLinkWithSettings : Create a shared link with custom settings.
67 // If no settings are given then the default visibility is
68 // `RequestedVisibility.public` (The resolved visibility, though, may depend
69 // on other aspects such as team and shared folder settings).
70 CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error)
71 // GetFileMetadata : Returns shared file metadata.
72 GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error)
73 // GetFileMetadataBatch : Returns shared file metadata.
74 GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error)
75 // GetFolderMetadata : Returns shared folder metadata by its folder ID.
76 GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error)
77 // GetSharedLinkFile : Download the shared link's file from a user's
78 // Dropbox.
79 GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error)
80 // GetSharedLinkMetadata : Get the shared link's metadata.
81 GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error)
82 // GetSharedLinks : Returns a list of `LinkMetadata` objects for this user,
83 // including collection links. If no path is given, returns a list of all
84 // shared links for the current user, including collection links, up to a
85 // maximum of 1000 links. If a non-empty path is given, returns a list of
86 // all shared links that allow access to the given path. Collection links
87 // are never returned in this case. Note that the url field in the response
88 // is never the shortened URL.
89 // Deprecated: Use `ListSharedLinks` instead
90 GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error)
91 // ListFileMembers : Use to obtain the members who have been invited to a
92 // file, both inherited and uninherited members.
93 ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error)
94 // ListFileMembersBatch : Get members of multiple files at once. The
95 // arguments to this route are more limited, and the limit on query result
96 // size per file is more strict. To customize the results more, use the
97 // individual file endpoint. Inherited users and groups are not included in
98 // the result, and permissions are not returned for this endpoint.
99 ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error)
100 // ListFileMembersContinue : Once a cursor has been retrieved from
101 // `listFileMembers` or `listFileMembersBatch`, use this to paginate through
102 // all shared file members.
103 ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error)
104 // ListFolderMembers : Returns shared folder membership by its folder ID.
105 ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error)
106 // ListFolderMembersContinue : Once a cursor has been retrieved from
107 // `listFolderMembers`, use this to paginate through all shared folder
108 // members.
109 ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error)
110 // ListFolders : Return the list of all shared folders the current user has
111 // access to.
112 ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error)
113 // ListFoldersContinue : Once a cursor has been retrieved from
114 // `listFolders`, use this to paginate through all shared folders. The
115 // cursor must come from a previous call to `listFolders` or
116 // `listFoldersContinue`.
117 ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error)
118 // ListMountableFolders : Return the list of all shared folders the current
119 // user can mount or unmount.
120 ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error)
121 // ListMountableFoldersContinue : Once a cursor has been retrieved from
122 // `listMountableFolders`, use this to paginate through all mountable shared
123 // folders. The cursor must come from a previous call to
124 // `listMountableFolders` or `listMountableFoldersContinue`.
125 ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error)
126 // ListReceivedFiles : Returns a list of all files shared with current user.
127 // Does not include files the user has received via shared folders, and does
128 // not include unclaimed invitations.
129 ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error)
130 // ListReceivedFilesContinue : Get more results with a cursor from
131 // `listReceivedFiles`.
132 ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error)
133 // ListSharedLinks : List shared links of this user. If no path is given,
134 // returns a list of all shared links for the current user. If a non-empty
135 // path is given, returns a list of all shared links that allow access to
136 // the given path - direct links to the given path and links to parent
137 // folders of the given path. Links to parent folders can be suppressed by
138 // setting direct_only to true.
139 ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error)
140 // ModifySharedLinkSettings : Modify the shared link's settings. If the
141 // requested visibility conflict with the shared links policy of the team or
142 // the shared folder (in case the linked file is part of a shared folder)
143 // then the `LinkPermissions.resolved_visibility` of the returned
144 // `SharedLinkMetadata` will reflect the actual visibility of the shared
145 // link and the `LinkPermissions.requested_visibility` will reflect the
146 // requested visibility.
147 ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error)
148 // MountFolder : The current user mounts the designated folder. Mount a
149 // shared folder for a user after they have been added as a member. Once
150 // mounted, the shared folder will appear in their Dropbox.
151 MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error)
152 // RelinquishFileMembership : The current user relinquishes their membership
153 // in the designated file. Note that the current user may still have
154 // inherited access to this file through the parent folder.
155 RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error)
156 // RelinquishFolderMembership : The current user relinquishes their
157 // membership in the designated shared folder and will no longer have access
158 // to the folder. A folder owner cannot relinquish membership in their own
159 // folder. This will run synchronously if leave_a_copy is false, and
160 // asynchronously if leave_a_copy is true.
161 RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error)
162 // RemoveFileMember : Identical to remove_file_member_2 but with less
163 // information returned.
164 // Deprecated: Use `RemoveFileMember2` instead
165 RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error)
166 // RemoveFileMember2 : Removes a specified member from the file.
167 RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error)
168 // RemoveFolderMember : Allows an owner or editor (if the ACL update policy
169 // allows) of a shared folder to remove another member.
170 RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error)
171 // RevokeSharedLink : Revoke a shared link. Note that even after revoking a
172 // shared link to a file, the file may be accessible if there are shared
173 // links leading to any of the file parent folders. To list all shared links
174 // that enable access to a specific file, you can use the `listSharedLinks`
175 // with the file as the `ListSharedLinksArg.path` argument.
176 RevokeSharedLink(arg *RevokeSharedLinkArg) (err error)
177 // SetAccessInheritance : Change the inheritance policy of an existing
178 // Shared Folder. Only permitted for shared folders in a shared team root.
179 // If a `ShareFolderLaunch.async_job_id` is returned, you'll need to call
180 // `checkShareJobStatus` until the action completes to get the metadata for
181 // the folder.
182 SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error)
183 // ShareFolder : Share a folder with collaborators. Most sharing will be
184 // completed synchronously. Large folders will be completed asynchronously.
185 // To make testing the async case repeatable, set
186 // `ShareFolderArg.force_async`. If a `ShareFolderLaunch.async_job_id` is
187 // returned, you'll need to call `checkShareJobStatus` until the action
188 // completes to get the metadata for the folder.
189 ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error)
190 // TransferFolder : Transfer ownership of a shared folder to a member of the
191 // shared folder. User must have `AccessLevel.owner` access to the shared
192 // folder to perform a transfer.
193 TransferFolder(arg *TransferFolderArg) (err error)
194 // UnmountFolder : The current user unmounts the designated folder. They can
195 // re-mount the folder at a later time using `mountFolder`.
196 UnmountFolder(arg *UnmountFolderArg) (err error)
197 // UnshareFile : Remove all members from this file. Does not remove
198 // inherited members.
199 UnshareFile(arg *UnshareFileArg) (err error)
200 // UnshareFolder : Allows a shared folder owner to unshare the folder.
201 // You'll need to call `checkJobStatus` to determine if the action has
202 // completed successfully.
203 UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error)
204 // UpdateFileMember : Changes a member's access on a shared file.
205 UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error)
206 // UpdateFolderMember : Allows an owner or editor of a shared folder to
207 // update another member's permissions.
208 UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error)
209 // UpdateFolderPolicy : Update the sharing policies for a shared folder.
210 // User must have `AccessLevel.owner` access to the shared folder to update
211 // its policies.
212 UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error)
213 }
214
215 type apiImpl dropbox.Context
216
217 //AddFileMemberAPIError is an error-wrapper for the add_file_member route
218 type AddFileMemberAPIError struct {
219 dropbox.APIError
220 EndpointError *AddFileMemberError `json:"error"`
221 }
222
223 func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error) {
224 cli := dbx.Client
225
226 dbx.Config.LogDebug("arg: %v", arg)
227 b, err := json.Marshal(arg)
228 if err != nil {
229 return
230 }
231
232 headers := map[string]string{
233 "Content-Type": "application/json",
234 }
235 if dbx.Config.AsMemberID != "" {
236 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
237 }
238
239 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "add_file_member", headers, bytes.NewReader(b))
240 if err != nil {
241 return
242 }
243 dbx.Config.LogInfo("req: %v", req)
244
245 resp, err := cli.Do(req)
246 if err != nil {
247 return
248 }
249
250 dbx.Config.LogInfo("resp: %v", resp)
251 defer resp.Body.Close()
252 body, err := ioutil.ReadAll(resp.Body)
253 if err != nil {
254 return
255 }
256
257 dbx.Config.LogDebug("body: %s", body)
258 if resp.StatusCode == http.StatusOK {
259 err = json.Unmarshal(body, &res)
260 if err != nil {
261 return
262 }
263
264 return
265 }
266 if resp.StatusCode == http.StatusConflict {
267 var apiError AddFileMemberAPIError
268 err = json.Unmarshal(body, &apiError)
269 if err != nil {
270 return
271 }
272 err = apiError
273 return
274 }
275 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
276 if err != nil {
277 return
278 }
279 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
280 return
281 }
282
283 //AddFolderMemberAPIError is an error-wrapper for the add_folder_member route
284 type AddFolderMemberAPIError struct {
285 dropbox.APIError
286 EndpointError *AddFolderMemberError `json:"error"`
287 }
288
289 func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) {
290 cli := dbx.Client
291
292 dbx.Config.LogDebug("arg: %v", arg)
293 b, err := json.Marshal(arg)
294 if err != nil {
295 return
296 }
297
298 headers := map[string]string{
299 "Content-Type": "application/json",
300 }
301 if dbx.Config.AsMemberID != "" {
302 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
303 }
304
305 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "add_folder_member", headers, bytes.NewReader(b))
306 if err != nil {
307 return
308 }
309 dbx.Config.LogInfo("req: %v", req)
310
311 resp, err := cli.Do(req)
312 if err != nil {
313 return
314 }
315
316 dbx.Config.LogInfo("resp: %v", resp)
317 defer resp.Body.Close()
318 body, err := ioutil.ReadAll(resp.Body)
319 if err != nil {
320 return
321 }
322
323 dbx.Config.LogDebug("body: %s", body)
324 if resp.StatusCode == http.StatusOK {
325 return
326 }
327 if resp.StatusCode == http.StatusConflict {
328 var apiError AddFolderMemberAPIError
329 err = json.Unmarshal(body, &apiError)
330 if err != nil {
331 return
332 }
333 err = apiError
334 return
335 }
336 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
337 if err != nil {
338 return
339 }
340 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
341 return
342 }
343
344 //ChangeFileMemberAccessAPIError is an error-wrapper for the change_file_member_access route
345 type ChangeFileMemberAccessAPIError struct {
346 dropbox.APIError
347 EndpointError *FileMemberActionError `json:"error"`
348 }
349
350 func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error) {
351 log.Printf("WARNING: API `ChangeFileMemberAccess` is deprecated")
352 log.Printf("Use API `UpdateFileMember` instead")
353
354 cli := dbx.Client
355
356 dbx.Config.LogDebug("arg: %v", arg)
357 b, err := json.Marshal(arg)
358 if err != nil {
359 return
360 }
361
362 headers := map[string]string{
363 "Content-Type": "application/json",
364 }
365 if dbx.Config.AsMemberID != "" {
366 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
367 }
368
369 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "change_file_member_access", headers, bytes.NewReader(b))
370 if err != nil {
371 return
372 }
373 dbx.Config.LogInfo("req: %v", req)
374
375 resp, err := cli.Do(req)
376 if err != nil {
377 return
378 }
379
380 dbx.Config.LogInfo("resp: %v", resp)
381 defer resp.Body.Close()
382 body, err := ioutil.ReadAll(resp.Body)
383 if err != nil {
384 return
385 }
386
387 dbx.Config.LogDebug("body: %s", body)
388 if resp.StatusCode == http.StatusOK {
389 err = json.Unmarshal(body, &res)
390 if err != nil {
391 return
392 }
393
394 return
395 }
396 if resp.StatusCode == http.StatusConflict {
397 var apiError ChangeFileMemberAccessAPIError
398 err = json.Unmarshal(body, &apiError)
399 if err != nil {
400 return
401 }
402 err = apiError
403 return
404 }
405 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
406 if err != nil {
407 return
408 }
409 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
410 return
411 }
412
413 //CheckJobStatusAPIError is an error-wrapper for the check_job_status route
414 type CheckJobStatusAPIError struct {
415 dropbox.APIError
416 EndpointError *async.PollError `json:"error"`
417 }
418
419 func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) {
420 cli := dbx.Client
421
422 dbx.Config.LogDebug("arg: %v", arg)
423 b, err := json.Marshal(arg)
424 if err != nil {
425 return
426 }
427
428 headers := map[string]string{
429 "Content-Type": "application/json",
430 }
431 if dbx.Config.AsMemberID != "" {
432 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
433 }
434
435 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_job_status", headers, bytes.NewReader(b))
436 if err != nil {
437 return
438 }
439 dbx.Config.LogInfo("req: %v", req)
440
441 resp, err := cli.Do(req)
442 if err != nil {
443 return
444 }
445
446 dbx.Config.LogInfo("resp: %v", resp)
447 defer resp.Body.Close()
448 body, err := ioutil.ReadAll(resp.Body)
449 if err != nil {
450 return
451 }
452
453 dbx.Config.LogDebug("body: %s", body)
454 if resp.StatusCode == http.StatusOK {
455 err = json.Unmarshal(body, &res)
456 if err != nil {
457 return
458 }
459
460 return
461 }
462 if resp.StatusCode == http.StatusConflict {
463 var apiError CheckJobStatusAPIError
464 err = json.Unmarshal(body, &apiError)
465 if err != nil {
466 return
467 }
468 err = apiError
469 return
470 }
471 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
472 if err != nil {
473 return
474 }
475 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
476 return
477 }
478
479 //CheckRemoveMemberJobStatusAPIError is an error-wrapper for the check_remove_member_job_status route
480 type CheckRemoveMemberJobStatusAPIError struct {
481 dropbox.APIError
482 EndpointError *async.PollError `json:"error"`
483 }
484
485 func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error) {
486 cli := dbx.Client
487
488 dbx.Config.LogDebug("arg: %v", arg)
489 b, err := json.Marshal(arg)
490 if err != nil {
491 return
492 }
493
494 headers := map[string]string{
495 "Content-Type": "application/json",
496 }
497 if dbx.Config.AsMemberID != "" {
498 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
499 }
500
501 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_remove_member_job_status", headers, bytes.NewReader(b))
502 if err != nil {
503 return
504 }
505 dbx.Config.LogInfo("req: %v", req)
506
507 resp, err := cli.Do(req)
508 if err != nil {
509 return
510 }
511
512 dbx.Config.LogInfo("resp: %v", resp)
513 defer resp.Body.Close()
514 body, err := ioutil.ReadAll(resp.Body)
515 if err != nil {
516 return
517 }
518
519 dbx.Config.LogDebug("body: %s", body)
520 if resp.StatusCode == http.StatusOK {
521 err = json.Unmarshal(body, &res)
522 if err != nil {
523 return
524 }
525
526 return
527 }
528 if resp.StatusCode == http.StatusConflict {
529 var apiError CheckRemoveMemberJobStatusAPIError
530 err = json.Unmarshal(body, &apiError)
531 if err != nil {
532 return
533 }
534 err = apiError
535 return
536 }
537 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
538 if err != nil {
539 return
540 }
541 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
542 return
543 }
544
545 //CheckShareJobStatusAPIError is an error-wrapper for the check_share_job_status route
546 type CheckShareJobStatusAPIError struct {
547 dropbox.APIError
548 EndpointError *async.PollError `json:"error"`
549 }
550
551 func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) {
552 cli := dbx.Client
553
554 dbx.Config.LogDebug("arg: %v", arg)
555 b, err := json.Marshal(arg)
556 if err != nil {
557 return
558 }
559
560 headers := map[string]string{
561 "Content-Type": "application/json",
562 }
563 if dbx.Config.AsMemberID != "" {
564 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
565 }
566
567 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_share_job_status", headers, bytes.NewReader(b))
568 if err != nil {
569 return
570 }
571 dbx.Config.LogInfo("req: %v", req)
572
573 resp, err := cli.Do(req)
574 if err != nil {
575 return
576 }
577
578 dbx.Config.LogInfo("resp: %v", resp)
579 defer resp.Body.Close()
580 body, err := ioutil.ReadAll(resp.Body)
581 if err != nil {
582 return
583 }
584
585 dbx.Config.LogDebug("body: %s", body)
586 if resp.StatusCode == http.StatusOK {
587 err = json.Unmarshal(body, &res)
588 if err != nil {
589 return
590 }
591
592 return
593 }
594 if resp.StatusCode == http.StatusConflict {
595 var apiError CheckShareJobStatusAPIError
596 err = json.Unmarshal(body, &apiError)
597 if err != nil {
598 return
599 }
600 err = apiError
601 return
602 }
603 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
604 if err != nil {
605 return
606 }
607 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
608 return
609 }
610
611 //CreateSharedLinkAPIError is an error-wrapper for the create_shared_link route
612 type CreateSharedLinkAPIError struct {
613 dropbox.APIError
614 EndpointError *CreateSharedLinkError `json:"error"`
615 }
616
617 func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error) {
618 log.Printf("WARNING: API `CreateSharedLink` is deprecated")
619 log.Printf("Use API `CreateSharedLinkWithSettings` instead")
620
621 cli := dbx.Client
622
623 dbx.Config.LogDebug("arg: %v", arg)
624 b, err := json.Marshal(arg)
625 if err != nil {
626 return
627 }
628
629 headers := map[string]string{
630 "Content-Type": "application/json",
631 }
632 if dbx.Config.AsMemberID != "" {
633 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
634 }
635
636 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "create_shared_link", headers, bytes.NewReader(b))
637 if err != nil {
638 return
639 }
640 dbx.Config.LogInfo("req: %v", req)
641
642 resp, err := cli.Do(req)
643 if err != nil {
644 return
645 }
646
647 dbx.Config.LogInfo("resp: %v", resp)
648 defer resp.Body.Close()
649 body, err := ioutil.ReadAll(resp.Body)
650 if err != nil {
651 return
652 }
653
654 dbx.Config.LogDebug("body: %s", body)
655 if resp.StatusCode == http.StatusOK {
656 err = json.Unmarshal(body, &res)
657 if err != nil {
658 return
659 }
660
661 return
662 }
663 if resp.StatusCode == http.StatusConflict {
664 var apiError CreateSharedLinkAPIError
665 err = json.Unmarshal(body, &apiError)
666 if err != nil {
667 return
668 }
669 err = apiError
670 return
671 }
672 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
673 if err != nil {
674 return
675 }
676 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
677 return
678 }
679
680 //CreateSharedLinkWithSettingsAPIError is an error-wrapper for the create_shared_link_with_settings route
681 type CreateSharedLinkWithSettingsAPIError struct {
682 dropbox.APIError
683 EndpointError *CreateSharedLinkWithSettingsError `json:"error"`
684 }
685
686 func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error) {
687 cli := dbx.Client
688
689 dbx.Config.LogDebug("arg: %v", arg)
690 b, err := json.Marshal(arg)
691 if err != nil {
692 return
693 }
694
695 headers := map[string]string{
696 "Content-Type": "application/json",
697 }
698 if dbx.Config.AsMemberID != "" {
699 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
700 }
701
702 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "create_shared_link_with_settings", headers, bytes.NewReader(b))
703 if err != nil {
704 return
705 }
706 dbx.Config.LogInfo("req: %v", req)
707
708 resp, err := cli.Do(req)
709 if err != nil {
710 return
711 }
712
713 dbx.Config.LogInfo("resp: %v", resp)
714 defer resp.Body.Close()
715 body, err := ioutil.ReadAll(resp.Body)
716 if err != nil {
717 return
718 }
719
720 dbx.Config.LogDebug("body: %s", body)
721 if resp.StatusCode == http.StatusOK {
722 var tmp sharedLinkMetadataUnion
723 err = json.Unmarshal(body, &tmp)
724 if err != nil {
725 return
726 }
727 switch tmp.Tag {
728 case "file":
729 res = tmp.File
730
731 case "folder":
732 res = tmp.Folder
733
734 }
735 return
736 }
737 if resp.StatusCode == http.StatusConflict {
738 var apiError CreateSharedLinkWithSettingsAPIError
739 err = json.Unmarshal(body, &apiError)
740 if err != nil {
741 return
742 }
743 err = apiError
744 return
745 }
746 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
747 if err != nil {
748 return
749 }
750 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
751 return
752 }
753
754 //GetFileMetadataAPIError is an error-wrapper for the get_file_metadata route
755 type GetFileMetadataAPIError struct {
756 dropbox.APIError
757 EndpointError *GetFileMetadataError `json:"error"`
758 }
759
760 func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error) {
761 cli := dbx.Client
762
763 dbx.Config.LogDebug("arg: %v", arg)
764 b, err := json.Marshal(arg)
765 if err != nil {
766 return
767 }
768
769 headers := map[string]string{
770 "Content-Type": "application/json",
771 }
772 if dbx.Config.AsMemberID != "" {
773 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
774 }
775
776 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_file_metadata", headers, bytes.NewReader(b))
777 if err != nil {
778 return
779 }
780 dbx.Config.LogInfo("req: %v", req)
781
782 resp, err := cli.Do(req)
783 if err != nil {
784 return
785 }
786
787 dbx.Config.LogInfo("resp: %v", resp)
788 defer resp.Body.Close()
789 body, err := ioutil.ReadAll(resp.Body)
790 if err != nil {
791 return
792 }
793
794 dbx.Config.LogDebug("body: %s", body)
795 if resp.StatusCode == http.StatusOK {
796 err = json.Unmarshal(body, &res)
797 if err != nil {
798 return
799 }
800
801 return
802 }
803 if resp.StatusCode == http.StatusConflict {
804 var apiError GetFileMetadataAPIError
805 err = json.Unmarshal(body, &apiError)
806 if err != nil {
807 return
808 }
809 err = apiError
810 return
811 }
812 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
813 if err != nil {
814 return
815 }
816 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
817 return
818 }
819
820 //GetFileMetadataBatchAPIError is an error-wrapper for the get_file_metadata/batch route
821 type GetFileMetadataBatchAPIError struct {
822 dropbox.APIError
823 EndpointError *SharingUserError `json:"error"`
824 }
825
826 func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error) {
827 cli := dbx.Client
828
829 dbx.Config.LogDebug("arg: %v", arg)
830 b, err := json.Marshal(arg)
831 if err != nil {
832 return
833 }
834
835 headers := map[string]string{
836 "Content-Type": "application/json",
837 }
838 if dbx.Config.AsMemberID != "" {
839 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
840 }
841
842 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_file_metadata/batch", headers, bytes.NewReader(b))
843 if err != nil {
844 return
845 }
846 dbx.Config.LogInfo("req: %v", req)
847
848 resp, err := cli.Do(req)
849 if err != nil {
850 return
851 }
852
853 dbx.Config.LogInfo("resp: %v", resp)
854 defer resp.Body.Close()
855 body, err := ioutil.ReadAll(resp.Body)
856 if err != nil {
857 return
858 }
859
860 dbx.Config.LogDebug("body: %s", body)
861 if resp.StatusCode == http.StatusOK {
862 err = json.Unmarshal(body, &res)
863 if err != nil {
864 return
865 }
866
867 return
868 }
869 if resp.StatusCode == http.StatusConflict {
870 var apiError GetFileMetadataBatchAPIError
871 err = json.Unmarshal(body, &apiError)
872 if err != nil {
873 return
874 }
875 err = apiError
876 return
877 }
878 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
879 if err != nil {
880 return
881 }
882 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
883 return
884 }
885
886 //GetFolderMetadataAPIError is an error-wrapper for the get_folder_metadata route
887 type GetFolderMetadataAPIError struct {
888 dropbox.APIError
889 EndpointError *SharedFolderAccessError `json:"error"`
890 }
891
892 func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) {
893 cli := dbx.Client
894
895 dbx.Config.LogDebug("arg: %v", arg)
896 b, err := json.Marshal(arg)
897 if err != nil {
898 return
899 }
900
901 headers := map[string]string{
902 "Content-Type": "application/json",
903 }
904 if dbx.Config.AsMemberID != "" {
905 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
906 }
907
908 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_folder_metadata", headers, bytes.NewReader(b))
909 if err != nil {
910 return
911 }
912 dbx.Config.LogInfo("req: %v", req)
913
914 resp, err := cli.Do(req)
915 if err != nil {
916 return
917 }
918
919 dbx.Config.LogInfo("resp: %v", resp)
920 defer resp.Body.Close()
921 body, err := ioutil.ReadAll(resp.Body)
922 if err != nil {
923 return
924 }
925
926 dbx.Config.LogDebug("body: %s", body)
927 if resp.StatusCode == http.StatusOK {
928 err = json.Unmarshal(body, &res)
929 if err != nil {
930 return
931 }
932
933 return
934 }
935 if resp.StatusCode == http.StatusConflict {
936 var apiError GetFolderMetadataAPIError
937 err = json.Unmarshal(body, &apiError)
938 if err != nil {
939 return
940 }
941 err = apiError
942 return
943 }
944 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
945 if err != nil {
946 return
947 }
948 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
949 return
950 }
951
952 //GetSharedLinkFileAPIError is an error-wrapper for the get_shared_link_file route
953 type GetSharedLinkFileAPIError struct {
954 dropbox.APIError
955 EndpointError *GetSharedLinkFileError `json:"error"`
956 }
957
958 func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error) {
959 cli := dbx.Client
960
961 dbx.Config.LogDebug("arg: %v", arg)
962 b, err := json.Marshal(arg)
963 if err != nil {
964 return
965 }
966
967 headers := map[string]string{
968 "Dropbox-API-Arg": string(b),
969 }
970 if dbx.Config.AsMemberID != "" {
971 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
972 }
973
974 req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "sharing", "get_shared_link_file", headers, nil)
975 if err != nil {
976 return
977 }
978 dbx.Config.LogInfo("req: %v", req)
979
980 resp, err := cli.Do(req)
981 if err != nil {
982 return
983 }
984
985 dbx.Config.LogInfo("resp: %v", resp)
986 body := []byte(resp.Header.Get("Dropbox-API-Result"))
987 content = resp.Body
988 dbx.Config.LogDebug("body: %s", body)
989 if resp.StatusCode == http.StatusOK {
990 var tmp sharedLinkMetadataUnion
991 err = json.Unmarshal(body, &tmp)
992 if err != nil {
993 return
994 }
995 switch tmp.Tag {
996 case "file":
997 res = tmp.File
998
999 case "folder":
1000 res = tmp.Folder
1001
1002 }
1003 return
1004 }
1005 if resp.StatusCode == http.StatusConflict {
1006 defer resp.Body.Close()
1007 body, err = ioutil.ReadAll(resp.Body)
1008 if err != nil {
1009 return
1010 }
1011 var apiError GetSharedLinkFileAPIError
1012 err = json.Unmarshal(body, &apiError)
1013 if err != nil {
1014 return
1015 }
1016 err = apiError
1017 return
1018 }
1019 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1020 if err != nil {
1021 return
1022 }
1023 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1024 return
1025 }
1026
1027 //GetSharedLinkMetadataAPIError is an error-wrapper for the get_shared_link_metadata route
1028 type GetSharedLinkMetadataAPIError struct {
1029 dropbox.APIError
1030 EndpointError *SharedLinkError `json:"error"`
1031 }
1032
1033 func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error) {
1034 cli := dbx.Client
1035
1036 dbx.Config.LogDebug("arg: %v", arg)
1037 b, err := json.Marshal(arg)
1038 if err != nil {
1039 return
1040 }
1041
1042 headers := map[string]string{
1043 "Content-Type": "application/json",
1044 }
1045 if dbx.Config.AsMemberID != "" {
1046 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1047 }
1048
1049 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_shared_link_metadata", headers, bytes.NewReader(b))
1050 if err != nil {
1051 return
1052 }
1053 dbx.Config.LogInfo("req: %v", req)
1054
1055 resp, err := cli.Do(req)
1056 if err != nil {
1057 return
1058 }
1059
1060 dbx.Config.LogInfo("resp: %v", resp)
1061 defer resp.Body.Close()
1062 body, err := ioutil.ReadAll(resp.Body)
1063 if err != nil {
1064 return
1065 }
1066
1067 dbx.Config.LogDebug("body: %s", body)
1068 if resp.StatusCode == http.StatusOK {
1069 var tmp sharedLinkMetadataUnion
1070 err = json.Unmarshal(body, &tmp)
1071 if err != nil {
1072 return
1073 }
1074 switch tmp.Tag {
1075 case "file":
1076 res = tmp.File
1077
1078 case "folder":
1079 res = tmp.Folder
1080
1081 }
1082 return
1083 }
1084 if resp.StatusCode == http.StatusConflict {
1085 var apiError GetSharedLinkMetadataAPIError
1086 err = json.Unmarshal(body, &apiError)
1087 if err != nil {
1088 return
1089 }
1090 err = apiError
1091 return
1092 }
1093 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1094 if err != nil {
1095 return
1096 }
1097 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1098 return
1099 }
1100
1101 //GetSharedLinksAPIError is an error-wrapper for the get_shared_links route
1102 type GetSharedLinksAPIError struct {
1103 dropbox.APIError
1104 EndpointError *GetSharedLinksError `json:"error"`
1105 }
1106
1107 func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error) {
1108 log.Printf("WARNING: API `GetSharedLinks` is deprecated")
1109 log.Printf("Use API `ListSharedLinks` instead")
1110
1111 cli := dbx.Client
1112
1113 dbx.Config.LogDebug("arg: %v", arg)
1114 b, err := json.Marshal(arg)
1115 if err != nil {
1116 return
1117 }
1118
1119 headers := map[string]string{
1120 "Content-Type": "application/json",
1121 }
1122 if dbx.Config.AsMemberID != "" {
1123 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1124 }
1125
1126 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_shared_links", headers, bytes.NewReader(b))
1127 if err != nil {
1128 return
1129 }
1130 dbx.Config.LogInfo("req: %v", req)
1131
1132 resp, err := cli.Do(req)
1133 if err != nil {
1134 return
1135 }
1136
1137 dbx.Config.LogInfo("resp: %v", resp)
1138 defer resp.Body.Close()
1139 body, err := ioutil.ReadAll(resp.Body)
1140 if err != nil {
1141 return
1142 }
1143
1144 dbx.Config.LogDebug("body: %s", body)
1145 if resp.StatusCode == http.StatusOK {
1146 err = json.Unmarshal(body, &res)
1147 if err != nil {
1148 return
1149 }
1150
1151 return
1152 }
1153 if resp.StatusCode == http.StatusConflict {
1154 var apiError GetSharedLinksAPIError
1155 err = json.Unmarshal(body, &apiError)
1156 if err != nil {
1157 return
1158 }
1159 err = apiError
1160 return
1161 }
1162 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1163 if err != nil {
1164 return
1165 }
1166 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1167 return
1168 }
1169
1170 //ListFileMembersAPIError is an error-wrapper for the list_file_members route
1171 type ListFileMembersAPIError struct {
1172 dropbox.APIError
1173 EndpointError *ListFileMembersError `json:"error"`
1174 }
1175
1176 func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error) {
1177 cli := dbx.Client
1178
1179 dbx.Config.LogDebug("arg: %v", arg)
1180 b, err := json.Marshal(arg)
1181 if err != nil {
1182 return
1183 }
1184
1185 headers := map[string]string{
1186 "Content-Type": "application/json",
1187 }
1188 if dbx.Config.AsMemberID != "" {
1189 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1190 }
1191
1192 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members", headers, bytes.NewReader(b))
1193 if err != nil {
1194 return
1195 }
1196 dbx.Config.LogInfo("req: %v", req)
1197
1198 resp, err := cli.Do(req)
1199 if err != nil {
1200 return
1201 }
1202
1203 dbx.Config.LogInfo("resp: %v", resp)
1204 defer resp.Body.Close()
1205 body, err := ioutil.ReadAll(resp.Body)
1206 if err != nil {
1207 return
1208 }
1209
1210 dbx.Config.LogDebug("body: %s", body)
1211 if resp.StatusCode == http.StatusOK {
1212 err = json.Unmarshal(body, &res)
1213 if err != nil {
1214 return
1215 }
1216
1217 return
1218 }
1219 if resp.StatusCode == http.StatusConflict {
1220 var apiError ListFileMembersAPIError
1221 err = json.Unmarshal(body, &apiError)
1222 if err != nil {
1223 return
1224 }
1225 err = apiError
1226 return
1227 }
1228 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1229 if err != nil {
1230 return
1231 }
1232 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1233 return
1234 }
1235
1236 //ListFileMembersBatchAPIError is an error-wrapper for the list_file_members/batch route
1237 type ListFileMembersBatchAPIError struct {
1238 dropbox.APIError
1239 EndpointError *SharingUserError `json:"error"`
1240 }
1241
1242 func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error) {
1243 cli := dbx.Client
1244
1245 dbx.Config.LogDebug("arg: %v", arg)
1246 b, err := json.Marshal(arg)
1247 if err != nil {
1248 return
1249 }
1250
1251 headers := map[string]string{
1252 "Content-Type": "application/json",
1253 }
1254 if dbx.Config.AsMemberID != "" {
1255 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1256 }
1257
1258 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members/batch", headers, bytes.NewReader(b))
1259 if err != nil {
1260 return
1261 }
1262 dbx.Config.LogInfo("req: %v", req)
1263
1264 resp, err := cli.Do(req)
1265 if err != nil {
1266 return
1267 }
1268
1269 dbx.Config.LogInfo("resp: %v", resp)
1270 defer resp.Body.Close()
1271 body, err := ioutil.ReadAll(resp.Body)
1272 if err != nil {
1273 return
1274 }
1275
1276 dbx.Config.LogDebug("body: %s", body)
1277 if resp.StatusCode == http.StatusOK {
1278 err = json.Unmarshal(body, &res)
1279 if err != nil {
1280 return
1281 }
1282
1283 return
1284 }
1285 if resp.StatusCode == http.StatusConflict {
1286 var apiError ListFileMembersBatchAPIError
1287 err = json.Unmarshal(body, &apiError)
1288 if err != nil {
1289 return
1290 }
1291 err = apiError
1292 return
1293 }
1294 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1295 if err != nil {
1296 return
1297 }
1298 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1299 return
1300 }
1301
1302 //ListFileMembersContinueAPIError is an error-wrapper for the list_file_members/continue route
1303 type ListFileMembersContinueAPIError struct {
1304 dropbox.APIError
1305 EndpointError *ListFileMembersContinueError `json:"error"`
1306 }
1307
1308 func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error) {
1309 cli := dbx.Client
1310
1311 dbx.Config.LogDebug("arg: %v", arg)
1312 b, err := json.Marshal(arg)
1313 if err != nil {
1314 return
1315 }
1316
1317 headers := map[string]string{
1318 "Content-Type": "application/json",
1319 }
1320 if dbx.Config.AsMemberID != "" {
1321 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1322 }
1323
1324 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members/continue", headers, bytes.NewReader(b))
1325 if err != nil {
1326 return
1327 }
1328 dbx.Config.LogInfo("req: %v", req)
1329
1330 resp, err := cli.Do(req)
1331 if err != nil {
1332 return
1333 }
1334
1335 dbx.Config.LogInfo("resp: %v", resp)
1336 defer resp.Body.Close()
1337 body, err := ioutil.ReadAll(resp.Body)
1338 if err != nil {
1339 return
1340 }
1341
1342 dbx.Config.LogDebug("body: %s", body)
1343 if resp.StatusCode == http.StatusOK {
1344 err = json.Unmarshal(body, &res)
1345 if err != nil {
1346 return
1347 }
1348
1349 return
1350 }
1351 if resp.StatusCode == http.StatusConflict {
1352 var apiError ListFileMembersContinueAPIError
1353 err = json.Unmarshal(body, &apiError)
1354 if err != nil {
1355 return
1356 }
1357 err = apiError
1358 return
1359 }
1360 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1361 if err != nil {
1362 return
1363 }
1364 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1365 return
1366 }
1367
1368 //ListFolderMembersAPIError is an error-wrapper for the list_folder_members route
1369 type ListFolderMembersAPIError struct {
1370 dropbox.APIError
1371 EndpointError *SharedFolderAccessError `json:"error"`
1372 }
1373
1374 func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) {
1375 cli := dbx.Client
1376
1377 dbx.Config.LogDebug("arg: %v", arg)
1378 b, err := json.Marshal(arg)
1379 if err != nil {
1380 return
1381 }
1382
1383 headers := map[string]string{
1384 "Content-Type": "application/json",
1385 }
1386 if dbx.Config.AsMemberID != "" {
1387 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1388 }
1389
1390 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folder_members", headers, bytes.NewReader(b))
1391 if err != nil {
1392 return
1393 }
1394 dbx.Config.LogInfo("req: %v", req)
1395
1396 resp, err := cli.Do(req)
1397 if err != nil {
1398 return
1399 }
1400
1401 dbx.Config.LogInfo("resp: %v", resp)
1402 defer resp.Body.Close()
1403 body, err := ioutil.ReadAll(resp.Body)
1404 if err != nil {
1405 return
1406 }
1407
1408 dbx.Config.LogDebug("body: %s", body)
1409 if resp.StatusCode == http.StatusOK {
1410 err = json.Unmarshal(body, &res)
1411 if err != nil {
1412 return
1413 }
1414
1415 return
1416 }
1417 if resp.StatusCode == http.StatusConflict {
1418 var apiError ListFolderMembersAPIError
1419 err = json.Unmarshal(body, &apiError)
1420 if err != nil {
1421 return
1422 }
1423 err = apiError
1424 return
1425 }
1426 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1427 if err != nil {
1428 return
1429 }
1430 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1431 return
1432 }
1433
1434 //ListFolderMembersContinueAPIError is an error-wrapper for the list_folder_members/continue route
1435 type ListFolderMembersContinueAPIError struct {
1436 dropbox.APIError
1437 EndpointError *ListFolderMembersContinueError `json:"error"`
1438 }
1439
1440 func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) {
1441 cli := dbx.Client
1442
1443 dbx.Config.LogDebug("arg: %v", arg)
1444 b, err := json.Marshal(arg)
1445 if err != nil {
1446 return
1447 }
1448
1449 headers := map[string]string{
1450 "Content-Type": "application/json",
1451 }
1452 if dbx.Config.AsMemberID != "" {
1453 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1454 }
1455
1456 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folder_members/continue", headers, bytes.NewReader(b))
1457 if err != nil {
1458 return
1459 }
1460 dbx.Config.LogInfo("req: %v", req)
1461
1462 resp, err := cli.Do(req)
1463 if err != nil {
1464 return
1465 }
1466
1467 dbx.Config.LogInfo("resp: %v", resp)
1468 defer resp.Body.Close()
1469 body, err := ioutil.ReadAll(resp.Body)
1470 if err != nil {
1471 return
1472 }
1473
1474 dbx.Config.LogDebug("body: %s", body)
1475 if resp.StatusCode == http.StatusOK {
1476 err = json.Unmarshal(body, &res)
1477 if err != nil {
1478 return
1479 }
1480
1481 return
1482 }
1483 if resp.StatusCode == http.StatusConflict {
1484 var apiError ListFolderMembersContinueAPIError
1485 err = json.Unmarshal(body, &apiError)
1486 if err != nil {
1487 return
1488 }
1489 err = apiError
1490 return
1491 }
1492 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1493 if err != nil {
1494 return
1495 }
1496 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1497 return
1498 }
1499
1500 //ListFoldersAPIError is an error-wrapper for the list_folders route
1501 type ListFoldersAPIError struct {
1502 dropbox.APIError
1503 EndpointError struct{} `json:"error"`
1504 }
1505
1506 func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
1507 cli := dbx.Client
1508
1509 dbx.Config.LogDebug("arg: %v", arg)
1510 b, err := json.Marshal(arg)
1511 if err != nil {
1512 return
1513 }
1514
1515 headers := map[string]string{
1516 "Content-Type": "application/json",
1517 }
1518 if dbx.Config.AsMemberID != "" {
1519 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1520 }
1521
1522 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folders", headers, bytes.NewReader(b))
1523 if err != nil {
1524 return
1525 }
1526 dbx.Config.LogInfo("req: %v", req)
1527
1528 resp, err := cli.Do(req)
1529 if err != nil {
1530 return
1531 }
1532
1533 dbx.Config.LogInfo("resp: %v", resp)
1534 defer resp.Body.Close()
1535 body, err := ioutil.ReadAll(resp.Body)
1536 if err != nil {
1537 return
1538 }
1539
1540 dbx.Config.LogDebug("body: %s", body)
1541 if resp.StatusCode == http.StatusOK {
1542 err = json.Unmarshal(body, &res)
1543 if err != nil {
1544 return
1545 }
1546
1547 return
1548 }
1549 if resp.StatusCode == http.StatusConflict {
1550 var apiError ListFoldersAPIError
1551 err = json.Unmarshal(body, &apiError)
1552 if err != nil {
1553 return
1554 }
1555 err = apiError
1556 return
1557 }
1558 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1559 if err != nil {
1560 return
1561 }
1562 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1563 return
1564 }
1565
1566 //ListFoldersContinueAPIError is an error-wrapper for the list_folders/continue route
1567 type ListFoldersContinueAPIError struct {
1568 dropbox.APIError
1569 EndpointError *ListFoldersContinueError `json:"error"`
1570 }
1571
1572 func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
1573 cli := dbx.Client
1574
1575 dbx.Config.LogDebug("arg: %v", arg)
1576 b, err := json.Marshal(arg)
1577 if err != nil {
1578 return
1579 }
1580
1581 headers := map[string]string{
1582 "Content-Type": "application/json",
1583 }
1584 if dbx.Config.AsMemberID != "" {
1585 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1586 }
1587
1588 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folders/continue", headers, bytes.NewReader(b))
1589 if err != nil {
1590 return
1591 }
1592 dbx.Config.LogInfo("req: %v", req)
1593
1594 resp, err := cli.Do(req)
1595 if err != nil {
1596 return
1597 }
1598
1599 dbx.Config.LogInfo("resp: %v", resp)
1600 defer resp.Body.Close()
1601 body, err := ioutil.ReadAll(resp.Body)
1602 if err != nil {
1603 return
1604 }
1605
1606 dbx.Config.LogDebug("body: %s", body)
1607 if resp.StatusCode == http.StatusOK {
1608 err = json.Unmarshal(body, &res)
1609 if err != nil {
1610 return
1611 }
1612
1613 return
1614 }
1615 if resp.StatusCode == http.StatusConflict {
1616 var apiError ListFoldersContinueAPIError
1617 err = json.Unmarshal(body, &apiError)
1618 if err != nil {
1619 return
1620 }
1621 err = apiError
1622 return
1623 }
1624 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1625 if err != nil {
1626 return
1627 }
1628 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1629 return
1630 }
1631
1632 //ListMountableFoldersAPIError is an error-wrapper for the list_mountable_folders route
1633 type ListMountableFoldersAPIError struct {
1634 dropbox.APIError
1635 EndpointError struct{} `json:"error"`
1636 }
1637
1638 func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
1639 cli := dbx.Client
1640
1641 dbx.Config.LogDebug("arg: %v", arg)
1642 b, err := json.Marshal(arg)
1643 if err != nil {
1644 return
1645 }
1646
1647 headers := map[string]string{
1648 "Content-Type": "application/json",
1649 }
1650 if dbx.Config.AsMemberID != "" {
1651 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1652 }
1653
1654 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_mountable_folders", headers, bytes.NewReader(b))
1655 if err != nil {
1656 return
1657 }
1658 dbx.Config.LogInfo("req: %v", req)
1659
1660 resp, err := cli.Do(req)
1661 if err != nil {
1662 return
1663 }
1664
1665 dbx.Config.LogInfo("resp: %v", resp)
1666 defer resp.Body.Close()
1667 body, err := ioutil.ReadAll(resp.Body)
1668 if err != nil {
1669 return
1670 }
1671
1672 dbx.Config.LogDebug("body: %s", body)
1673 if resp.StatusCode == http.StatusOK {
1674 err = json.Unmarshal(body, &res)
1675 if err != nil {
1676 return
1677 }
1678
1679 return
1680 }
1681 if resp.StatusCode == http.StatusConflict {
1682 var apiError ListMountableFoldersAPIError
1683 err = json.Unmarshal(body, &apiError)
1684 if err != nil {
1685 return
1686 }
1687 err = apiError
1688 return
1689 }
1690 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1691 if err != nil {
1692 return
1693 }
1694 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1695 return
1696 }
1697
1698 //ListMountableFoldersContinueAPIError is an error-wrapper for the list_mountable_folders/continue route
1699 type ListMountableFoldersContinueAPIError struct {
1700 dropbox.APIError
1701 EndpointError *ListFoldersContinueError `json:"error"`
1702 }
1703
1704 func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
1705 cli := dbx.Client
1706
1707 dbx.Config.LogDebug("arg: %v", arg)
1708 b, err := json.Marshal(arg)
1709 if err != nil {
1710 return
1711 }
1712
1713 headers := map[string]string{
1714 "Content-Type": "application/json",
1715 }
1716 if dbx.Config.AsMemberID != "" {
1717 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1718 }
1719
1720 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_mountable_folders/continue", headers, bytes.NewReader(b))
1721 if err != nil {
1722 return
1723 }
1724 dbx.Config.LogInfo("req: %v", req)
1725
1726 resp, err := cli.Do(req)
1727 if err != nil {
1728 return
1729 }
1730
1731 dbx.Config.LogInfo("resp: %v", resp)
1732 defer resp.Body.Close()
1733 body, err := ioutil.ReadAll(resp.Body)
1734 if err != nil {
1735 return
1736 }
1737
1738 dbx.Config.LogDebug("body: %s", body)
1739 if resp.StatusCode == http.StatusOK {
1740 err = json.Unmarshal(body, &res)
1741 if err != nil {
1742 return
1743 }
1744
1745 return
1746 }
1747 if resp.StatusCode == http.StatusConflict {
1748 var apiError ListMountableFoldersContinueAPIError
1749 err = json.Unmarshal(body, &apiError)
1750 if err != nil {
1751 return
1752 }
1753 err = apiError
1754 return
1755 }
1756 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1757 if err != nil {
1758 return
1759 }
1760 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1761 return
1762 }
1763
1764 //ListReceivedFilesAPIError is an error-wrapper for the list_received_files route
1765 type ListReceivedFilesAPIError struct {
1766 dropbox.APIError
1767 EndpointError *SharingUserError `json:"error"`
1768 }
1769
1770 func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error) {
1771 cli := dbx.Client
1772
1773 dbx.Config.LogDebug("arg: %v", arg)
1774 b, err := json.Marshal(arg)
1775 if err != nil {
1776 return
1777 }
1778
1779 headers := map[string]string{
1780 "Content-Type": "application/json",
1781 }
1782 if dbx.Config.AsMemberID != "" {
1783 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1784 }
1785
1786 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_received_files", headers, bytes.NewReader(b))
1787 if err != nil {
1788 return
1789 }
1790 dbx.Config.LogInfo("req: %v", req)
1791
1792 resp, err := cli.Do(req)
1793 if err != nil {
1794 return
1795 }
1796
1797 dbx.Config.LogInfo("resp: %v", resp)
1798 defer resp.Body.Close()
1799 body, err := ioutil.ReadAll(resp.Body)
1800 if err != nil {
1801 return
1802 }
1803
1804 dbx.Config.LogDebug("body: %s", body)
1805 if resp.StatusCode == http.StatusOK {
1806 err = json.Unmarshal(body, &res)
1807 if err != nil {
1808 return
1809 }
1810
1811 return
1812 }
1813 if resp.StatusCode == http.StatusConflict {
1814 var apiError ListReceivedFilesAPIError
1815 err = json.Unmarshal(body, &apiError)
1816 if err != nil {
1817 return
1818 }
1819 err = apiError
1820 return
1821 }
1822 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1823 if err != nil {
1824 return
1825 }
1826 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1827 return
1828 }
1829
1830 //ListReceivedFilesContinueAPIError is an error-wrapper for the list_received_files/continue route
1831 type ListReceivedFilesContinueAPIError struct {
1832 dropbox.APIError
1833 EndpointError *ListFilesContinueError `json:"error"`
1834 }
1835
1836 func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error) {
1837 cli := dbx.Client
1838
1839 dbx.Config.LogDebug("arg: %v", arg)
1840 b, err := json.Marshal(arg)
1841 if err != nil {
1842 return
1843 }
1844
1845 headers := map[string]string{
1846 "Content-Type": "application/json",
1847 }
1848 if dbx.Config.AsMemberID != "" {
1849 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1850 }
1851
1852 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_received_files/continue", headers, bytes.NewReader(b))
1853 if err != nil {
1854 return
1855 }
1856 dbx.Config.LogInfo("req: %v", req)
1857
1858 resp, err := cli.Do(req)
1859 if err != nil {
1860 return
1861 }
1862
1863 dbx.Config.LogInfo("resp: %v", resp)
1864 defer resp.Body.Close()
1865 body, err := ioutil.ReadAll(resp.Body)
1866 if err != nil {
1867 return
1868 }
1869
1870 dbx.Config.LogDebug("body: %s", body)
1871 if resp.StatusCode == http.StatusOK {
1872 err = json.Unmarshal(body, &res)
1873 if err != nil {
1874 return
1875 }
1876
1877 return
1878 }
1879 if resp.StatusCode == http.StatusConflict {
1880 var apiError ListReceivedFilesContinueAPIError
1881 err = json.Unmarshal(body, &apiError)
1882 if err != nil {
1883 return
1884 }
1885 err = apiError
1886 return
1887 }
1888 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1889 if err != nil {
1890 return
1891 }
1892 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1893 return
1894 }
1895
1896 //ListSharedLinksAPIError is an error-wrapper for the list_shared_links route
1897 type ListSharedLinksAPIError struct {
1898 dropbox.APIError
1899 EndpointError *ListSharedLinksError `json:"error"`
1900 }
1901
1902 func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) {
1903 cli := dbx.Client
1904
1905 dbx.Config.LogDebug("arg: %v", arg)
1906 b, err := json.Marshal(arg)
1907 if err != nil {
1908 return
1909 }
1910
1911 headers := map[string]string{
1912 "Content-Type": "application/json",
1913 }
1914 if dbx.Config.AsMemberID != "" {
1915 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1916 }
1917
1918 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_shared_links", headers, bytes.NewReader(b))
1919 if err != nil {
1920 return
1921 }
1922 dbx.Config.LogInfo("req: %v", req)
1923
1924 resp, err := cli.Do(req)
1925 if err != nil {
1926 return
1927 }
1928
1929 dbx.Config.LogInfo("resp: %v", resp)
1930 defer resp.Body.Close()
1931 body, err := ioutil.ReadAll(resp.Body)
1932 if err != nil {
1933 return
1934 }
1935
1936 dbx.Config.LogDebug("body: %s", body)
1937 if resp.StatusCode == http.StatusOK {
1938 err = json.Unmarshal(body, &res)
1939 if err != nil {
1940 return
1941 }
1942
1943 return
1944 }
1945 if resp.StatusCode == http.StatusConflict {
1946 var apiError ListSharedLinksAPIError
1947 err = json.Unmarshal(body, &apiError)
1948 if err != nil {
1949 return
1950 }
1951 err = apiError
1952 return
1953 }
1954 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1955 if err != nil {
1956 return
1957 }
1958 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1959 return
1960 }
1961
1962 //ModifySharedLinkSettingsAPIError is an error-wrapper for the modify_shared_link_settings route
1963 type ModifySharedLinkSettingsAPIError struct {
1964 dropbox.APIError
1965 EndpointError *ModifySharedLinkSettingsError `json:"error"`
1966 }
1967
1968 func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error) {
1969 cli := dbx.Client
1970
1971 dbx.Config.LogDebug("arg: %v", arg)
1972 b, err := json.Marshal(arg)
1973 if err != nil {
1974 return
1975 }
1976
1977 headers := map[string]string{
1978 "Content-Type": "application/json",
1979 }
1980 if dbx.Config.AsMemberID != "" {
1981 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
1982 }
1983
1984 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "modify_shared_link_settings", headers, bytes.NewReader(b))
1985 if err != nil {
1986 return
1987 }
1988 dbx.Config.LogInfo("req: %v", req)
1989
1990 resp, err := cli.Do(req)
1991 if err != nil {
1992 return
1993 }
1994
1995 dbx.Config.LogInfo("resp: %v", resp)
1996 defer resp.Body.Close()
1997 body, err := ioutil.ReadAll(resp.Body)
1998 if err != nil {
1999 return
2000 }
2001
2002 dbx.Config.LogDebug("body: %s", body)
2003 if resp.StatusCode == http.StatusOK {
2004 var tmp sharedLinkMetadataUnion
2005 err = json.Unmarshal(body, &tmp)
2006 if err != nil {
2007 return
2008 }
2009 switch tmp.Tag {
2010 case "file":
2011 res = tmp.File
2012
2013 case "folder":
2014 res = tmp.Folder
2015
2016 }
2017 return
2018 }
2019 if resp.StatusCode == http.StatusConflict {
2020 var apiError ModifySharedLinkSettingsAPIError
2021 err = json.Unmarshal(body, &apiError)
2022 if err != nil {
2023 return
2024 }
2025 err = apiError
2026 return
2027 }
2028 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2029 if err != nil {
2030 return
2031 }
2032 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2033 return
2034 }
2035
2036 //MountFolderAPIError is an error-wrapper for the mount_folder route
2037 type MountFolderAPIError struct {
2038 dropbox.APIError
2039 EndpointError *MountFolderError `json:"error"`
2040 }
2041
2042 func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) {
2043 cli := dbx.Client
2044
2045 dbx.Config.LogDebug("arg: %v", arg)
2046 b, err := json.Marshal(arg)
2047 if err != nil {
2048 return
2049 }
2050
2051 headers := map[string]string{
2052 "Content-Type": "application/json",
2053 }
2054 if dbx.Config.AsMemberID != "" {
2055 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2056 }
2057
2058 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "mount_folder", headers, bytes.NewReader(b))
2059 if err != nil {
2060 return
2061 }
2062 dbx.Config.LogInfo("req: %v", req)
2063
2064 resp, err := cli.Do(req)
2065 if err != nil {
2066 return
2067 }
2068
2069 dbx.Config.LogInfo("resp: %v", resp)
2070 defer resp.Body.Close()
2071 body, err := ioutil.ReadAll(resp.Body)
2072 if err != nil {
2073 return
2074 }
2075
2076 dbx.Config.LogDebug("body: %s", body)
2077 if resp.StatusCode == http.StatusOK {
2078 err = json.Unmarshal(body, &res)
2079 if err != nil {
2080 return
2081 }
2082
2083 return
2084 }
2085 if resp.StatusCode == http.StatusConflict {
2086 var apiError MountFolderAPIError
2087 err = json.Unmarshal(body, &apiError)
2088 if err != nil {
2089 return
2090 }
2091 err = apiError
2092 return
2093 }
2094 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2095 if err != nil {
2096 return
2097 }
2098 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2099 return
2100 }
2101
2102 //RelinquishFileMembershipAPIError is an error-wrapper for the relinquish_file_membership route
2103 type RelinquishFileMembershipAPIError struct {
2104 dropbox.APIError
2105 EndpointError *RelinquishFileMembershipError `json:"error"`
2106 }
2107
2108 func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error) {
2109 cli := dbx.Client
2110
2111 dbx.Config.LogDebug("arg: %v", arg)
2112 b, err := json.Marshal(arg)
2113 if err != nil {
2114 return
2115 }
2116
2117 headers := map[string]string{
2118 "Content-Type": "application/json",
2119 }
2120 if dbx.Config.AsMemberID != "" {
2121 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2122 }
2123
2124 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "relinquish_file_membership", headers, bytes.NewReader(b))
2125 if err != nil {
2126 return
2127 }
2128 dbx.Config.LogInfo("req: %v", req)
2129
2130 resp, err := cli.Do(req)
2131 if err != nil {
2132 return
2133 }
2134
2135 dbx.Config.LogInfo("resp: %v", resp)
2136 defer resp.Body.Close()
2137 body, err := ioutil.ReadAll(resp.Body)
2138 if err != nil {
2139 return
2140 }
2141
2142 dbx.Config.LogDebug("body: %s", body)
2143 if resp.StatusCode == http.StatusOK {
2144 return
2145 }
2146 if resp.StatusCode == http.StatusConflict {
2147 var apiError RelinquishFileMembershipAPIError
2148 err = json.Unmarshal(body, &apiError)
2149 if err != nil {
2150 return
2151 }
2152 err = apiError
2153 return
2154 }
2155 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2156 if err != nil {
2157 return
2158 }
2159 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2160 return
2161 }
2162
2163 //RelinquishFolderMembershipAPIError is an error-wrapper for the relinquish_folder_membership route
2164 type RelinquishFolderMembershipAPIError struct {
2165 dropbox.APIError
2166 EndpointError *RelinquishFolderMembershipError `json:"error"`
2167 }
2168
2169 func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error) {
2170 cli := dbx.Client
2171
2172 dbx.Config.LogDebug("arg: %v", arg)
2173 b, err := json.Marshal(arg)
2174 if err != nil {
2175 return
2176 }
2177
2178 headers := map[string]string{
2179 "Content-Type": "application/json",
2180 }
2181 if dbx.Config.AsMemberID != "" {
2182 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2183 }
2184
2185 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "relinquish_folder_membership", headers, bytes.NewReader(b))
2186 if err != nil {
2187 return
2188 }
2189 dbx.Config.LogInfo("req: %v", req)
2190
2191 resp, err := cli.Do(req)
2192 if err != nil {
2193 return
2194 }
2195
2196 dbx.Config.LogInfo("resp: %v", resp)
2197 defer resp.Body.Close()
2198 body, err := ioutil.ReadAll(resp.Body)
2199 if err != nil {
2200 return
2201 }
2202
2203 dbx.Config.LogDebug("body: %s", body)
2204 if resp.StatusCode == http.StatusOK {
2205 err = json.Unmarshal(body, &res)
2206 if err != nil {
2207 return
2208 }
2209
2210 return
2211 }
2212 if resp.StatusCode == http.StatusConflict {
2213 var apiError RelinquishFolderMembershipAPIError
2214 err = json.Unmarshal(body, &apiError)
2215 if err != nil {
2216 return
2217 }
2218 err = apiError
2219 return
2220 }
2221 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2222 if err != nil {
2223 return
2224 }
2225 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2226 return
2227 }
2228
2229 //RemoveFileMemberAPIError is an error-wrapper for the remove_file_member route
2230 type RemoveFileMemberAPIError struct {
2231 dropbox.APIError
2232 EndpointError *RemoveFileMemberError `json:"error"`
2233 }
2234
2235 func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error) {
2236 log.Printf("WARNING: API `RemoveFileMember` is deprecated")
2237 log.Printf("Use API `RemoveFileMember2` instead")
2238
2239 cli := dbx.Client
2240
2241 dbx.Config.LogDebug("arg: %v", arg)
2242 b, err := json.Marshal(arg)
2243 if err != nil {
2244 return
2245 }
2246
2247 headers := map[string]string{
2248 "Content-Type": "application/json",
2249 }
2250 if dbx.Config.AsMemberID != "" {
2251 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2252 }
2253
2254 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_file_member", headers, bytes.NewReader(b))
2255 if err != nil {
2256 return
2257 }
2258 dbx.Config.LogInfo("req: %v", req)
2259
2260 resp, err := cli.Do(req)
2261 if err != nil {
2262 return
2263 }
2264
2265 dbx.Config.LogInfo("resp: %v", resp)
2266 defer resp.Body.Close()
2267 body, err := ioutil.ReadAll(resp.Body)
2268 if err != nil {
2269 return
2270 }
2271
2272 dbx.Config.LogDebug("body: %s", body)
2273 if resp.StatusCode == http.StatusOK {
2274 err = json.Unmarshal(body, &res)
2275 if err != nil {
2276 return
2277 }
2278
2279 return
2280 }
2281 if resp.StatusCode == http.StatusConflict {
2282 var apiError RemoveFileMemberAPIError
2283 err = json.Unmarshal(body, &apiError)
2284 if err != nil {
2285 return
2286 }
2287 err = apiError
2288 return
2289 }
2290 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2291 if err != nil {
2292 return
2293 }
2294 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2295 return
2296 }
2297
2298 //RemoveFileMember2APIError is an error-wrapper for the remove_file_member_2 route
2299 type RemoveFileMember2APIError struct {
2300 dropbox.APIError
2301 EndpointError *RemoveFileMemberError `json:"error"`
2302 }
2303
2304 func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error) {
2305 cli := dbx.Client
2306
2307 dbx.Config.LogDebug("arg: %v", arg)
2308 b, err := json.Marshal(arg)
2309 if err != nil {
2310 return
2311 }
2312
2313 headers := map[string]string{
2314 "Content-Type": "application/json",
2315 }
2316 if dbx.Config.AsMemberID != "" {
2317 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2318 }
2319
2320 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_file_member_2", headers, bytes.NewReader(b))
2321 if err != nil {
2322 return
2323 }
2324 dbx.Config.LogInfo("req: %v", req)
2325
2326 resp, err := cli.Do(req)
2327 if err != nil {
2328 return
2329 }
2330
2331 dbx.Config.LogInfo("resp: %v", resp)
2332 defer resp.Body.Close()
2333 body, err := ioutil.ReadAll(resp.Body)
2334 if err != nil {
2335 return
2336 }
2337
2338 dbx.Config.LogDebug("body: %s", body)
2339 if resp.StatusCode == http.StatusOK {
2340 err = json.Unmarshal(body, &res)
2341 if err != nil {
2342 return
2343 }
2344
2345 return
2346 }
2347 if resp.StatusCode == http.StatusConflict {
2348 var apiError RemoveFileMember2APIError
2349 err = json.Unmarshal(body, &apiError)
2350 if err != nil {
2351 return
2352 }
2353 err = apiError
2354 return
2355 }
2356 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2357 if err != nil {
2358 return
2359 }
2360 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2361 return
2362 }
2363
2364 //RemoveFolderMemberAPIError is an error-wrapper for the remove_folder_member route
2365 type RemoveFolderMemberAPIError struct {
2366 dropbox.APIError
2367 EndpointError *RemoveFolderMemberError `json:"error"`
2368 }
2369
2370 func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error) {
2371 cli := dbx.Client
2372
2373 dbx.Config.LogDebug("arg: %v", arg)
2374 b, err := json.Marshal(arg)
2375 if err != nil {
2376 return
2377 }
2378
2379 headers := map[string]string{
2380 "Content-Type": "application/json",
2381 }
2382 if dbx.Config.AsMemberID != "" {
2383 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2384 }
2385
2386 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_folder_member", headers, bytes.NewReader(b))
2387 if err != nil {
2388 return
2389 }
2390 dbx.Config.LogInfo("req: %v", req)
2391
2392 resp, err := cli.Do(req)
2393 if err != nil {
2394 return
2395 }
2396
2397 dbx.Config.LogInfo("resp: %v", resp)
2398 defer resp.Body.Close()
2399 body, err := ioutil.ReadAll(resp.Body)
2400 if err != nil {
2401 return
2402 }
2403
2404 dbx.Config.LogDebug("body: %s", body)
2405 if resp.StatusCode == http.StatusOK {
2406 err = json.Unmarshal(body, &res)
2407 if err != nil {
2408 return
2409 }
2410
2411 return
2412 }
2413 if resp.StatusCode == http.StatusConflict {
2414 var apiError RemoveFolderMemberAPIError
2415 err = json.Unmarshal(body, &apiError)
2416 if err != nil {
2417 return
2418 }
2419 err = apiError
2420 return
2421 }
2422 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2423 if err != nil {
2424 return
2425 }
2426 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2427 return
2428 }
2429
2430 //RevokeSharedLinkAPIError is an error-wrapper for the revoke_shared_link route
2431 type RevokeSharedLinkAPIError struct {
2432 dropbox.APIError
2433 EndpointError *RevokeSharedLinkError `json:"error"`
2434 }
2435
2436 func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) {
2437 cli := dbx.Client
2438
2439 dbx.Config.LogDebug("arg: %v", arg)
2440 b, err := json.Marshal(arg)
2441 if err != nil {
2442 return
2443 }
2444
2445 headers := map[string]string{
2446 "Content-Type": "application/json",
2447 }
2448 if dbx.Config.AsMemberID != "" {
2449 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2450 }
2451
2452 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "revoke_shared_link", headers, bytes.NewReader(b))
2453 if err != nil {
2454 return
2455 }
2456 dbx.Config.LogInfo("req: %v", req)
2457
2458 resp, err := cli.Do(req)
2459 if err != nil {
2460 return
2461 }
2462
2463 dbx.Config.LogInfo("resp: %v", resp)
2464 defer resp.Body.Close()
2465 body, err := ioutil.ReadAll(resp.Body)
2466 if err != nil {
2467 return
2468 }
2469
2470 dbx.Config.LogDebug("body: %s", body)
2471 if resp.StatusCode == http.StatusOK {
2472 return
2473 }
2474 if resp.StatusCode == http.StatusConflict {
2475 var apiError RevokeSharedLinkAPIError
2476 err = json.Unmarshal(body, &apiError)
2477 if err != nil {
2478 return
2479 }
2480 err = apiError
2481 return
2482 }
2483 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2484 if err != nil {
2485 return
2486 }
2487 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2488 return
2489 }
2490
2491 //SetAccessInheritanceAPIError is an error-wrapper for the set_access_inheritance route
2492 type SetAccessInheritanceAPIError struct {
2493 dropbox.APIError
2494 EndpointError *SetAccessInheritanceError `json:"error"`
2495 }
2496
2497 func (dbx *apiImpl) SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error) {
2498 cli := dbx.Client
2499
2500 dbx.Config.LogDebug("arg: %v", arg)
2501 b, err := json.Marshal(arg)
2502 if err != nil {
2503 return
2504 }
2505
2506 headers := map[string]string{
2507 "Content-Type": "application/json",
2508 }
2509 if dbx.Config.AsMemberID != "" {
2510 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2511 }
2512
2513 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "set_access_inheritance", headers, bytes.NewReader(b))
2514 if err != nil {
2515 return
2516 }
2517 dbx.Config.LogInfo("req: %v", req)
2518
2519 resp, err := cli.Do(req)
2520 if err != nil {
2521 return
2522 }
2523
2524 dbx.Config.LogInfo("resp: %v", resp)
2525 defer resp.Body.Close()
2526 body, err := ioutil.ReadAll(resp.Body)
2527 if err != nil {
2528 return
2529 }
2530
2531 dbx.Config.LogDebug("body: %s", body)
2532 if resp.StatusCode == http.StatusOK {
2533 err = json.Unmarshal(body, &res)
2534 if err != nil {
2535 return
2536 }
2537
2538 return
2539 }
2540 if resp.StatusCode == http.StatusConflict {
2541 var apiError SetAccessInheritanceAPIError
2542 err = json.Unmarshal(body, &apiError)
2543 if err != nil {
2544 return
2545 }
2546 err = apiError
2547 return
2548 }
2549 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2550 if err != nil {
2551 return
2552 }
2553 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2554 return
2555 }
2556
2557 //ShareFolderAPIError is an error-wrapper for the share_folder route
2558 type ShareFolderAPIError struct {
2559 dropbox.APIError
2560 EndpointError *ShareFolderError `json:"error"`
2561 }
2562
2563 func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) {
2564 cli := dbx.Client
2565
2566 dbx.Config.LogDebug("arg: %v", arg)
2567 b, err := json.Marshal(arg)
2568 if err != nil {
2569 return
2570 }
2571
2572 headers := map[string]string{
2573 "Content-Type": "application/json",
2574 }
2575 if dbx.Config.AsMemberID != "" {
2576 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2577 }
2578
2579 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "share_folder", headers, bytes.NewReader(b))
2580 if err != nil {
2581 return
2582 }
2583 dbx.Config.LogInfo("req: %v", req)
2584
2585 resp, err := cli.Do(req)
2586 if err != nil {
2587 return
2588 }
2589
2590 dbx.Config.LogInfo("resp: %v", resp)
2591 defer resp.Body.Close()
2592 body, err := ioutil.ReadAll(resp.Body)
2593 if err != nil {
2594 return
2595 }
2596
2597 dbx.Config.LogDebug("body: %s", body)
2598 if resp.StatusCode == http.StatusOK {
2599 err = json.Unmarshal(body, &res)
2600 if err != nil {
2601 return
2602 }
2603
2604 return
2605 }
2606 if resp.StatusCode == http.StatusConflict {
2607 var apiError ShareFolderAPIError
2608 err = json.Unmarshal(body, &apiError)
2609 if err != nil {
2610 return
2611 }
2612 err = apiError
2613 return
2614 }
2615 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2616 if err != nil {
2617 return
2618 }
2619 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2620 return
2621 }
2622
2623 //TransferFolderAPIError is an error-wrapper for the transfer_folder route
2624 type TransferFolderAPIError struct {
2625 dropbox.APIError
2626 EndpointError *TransferFolderError `json:"error"`
2627 }
2628
2629 func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
2630 cli := dbx.Client
2631
2632 dbx.Config.LogDebug("arg: %v", arg)
2633 b, err := json.Marshal(arg)
2634 if err != nil {
2635 return
2636 }
2637
2638 headers := map[string]string{
2639 "Content-Type": "application/json",
2640 }
2641 if dbx.Config.AsMemberID != "" {
2642 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2643 }
2644
2645 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "transfer_folder", headers, bytes.NewReader(b))
2646 if err != nil {
2647 return
2648 }
2649 dbx.Config.LogInfo("req: %v", req)
2650
2651 resp, err := cli.Do(req)
2652 if err != nil {
2653 return
2654 }
2655
2656 dbx.Config.LogInfo("resp: %v", resp)
2657 defer resp.Body.Close()
2658 body, err := ioutil.ReadAll(resp.Body)
2659 if err != nil {
2660 return
2661 }
2662
2663 dbx.Config.LogDebug("body: %s", body)
2664 if resp.StatusCode == http.StatusOK {
2665 return
2666 }
2667 if resp.StatusCode == http.StatusConflict {
2668 var apiError TransferFolderAPIError
2669 err = json.Unmarshal(body, &apiError)
2670 if err != nil {
2671 return
2672 }
2673 err = apiError
2674 return
2675 }
2676 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2677 if err != nil {
2678 return
2679 }
2680 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2681 return
2682 }
2683
2684 //UnmountFolderAPIError is an error-wrapper for the unmount_folder route
2685 type UnmountFolderAPIError struct {
2686 dropbox.APIError
2687 EndpointError *UnmountFolderError `json:"error"`
2688 }
2689
2690 func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
2691 cli := dbx.Client
2692
2693 dbx.Config.LogDebug("arg: %v", arg)
2694 b, err := json.Marshal(arg)
2695 if err != nil {
2696 return
2697 }
2698
2699 headers := map[string]string{
2700 "Content-Type": "application/json",
2701 }
2702 if dbx.Config.AsMemberID != "" {
2703 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2704 }
2705
2706 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unmount_folder", headers, bytes.NewReader(b))
2707 if err != nil {
2708 return
2709 }
2710 dbx.Config.LogInfo("req: %v", req)
2711
2712 resp, err := cli.Do(req)
2713 if err != nil {
2714 return
2715 }
2716
2717 dbx.Config.LogInfo("resp: %v", resp)
2718 defer resp.Body.Close()
2719 body, err := ioutil.ReadAll(resp.Body)
2720 if err != nil {
2721 return
2722 }
2723
2724 dbx.Config.LogDebug("body: %s", body)
2725 if resp.StatusCode == http.StatusOK {
2726 return
2727 }
2728 if resp.StatusCode == http.StatusConflict {
2729 var apiError UnmountFolderAPIError
2730 err = json.Unmarshal(body, &apiError)
2731 if err != nil {
2732 return
2733 }
2734 err = apiError
2735 return
2736 }
2737 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2738 if err != nil {
2739 return
2740 }
2741 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2742 return
2743 }
2744
2745 //UnshareFileAPIError is an error-wrapper for the unshare_file route
2746 type UnshareFileAPIError struct {
2747 dropbox.APIError
2748 EndpointError *UnshareFileError `json:"error"`
2749 }
2750
2751 func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
2752 cli := dbx.Client
2753
2754 dbx.Config.LogDebug("arg: %v", arg)
2755 b, err := json.Marshal(arg)
2756 if err != nil {
2757 return
2758 }
2759
2760 headers := map[string]string{
2761 "Content-Type": "application/json",
2762 }
2763 if dbx.Config.AsMemberID != "" {
2764 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2765 }
2766
2767 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unshare_file", headers, bytes.NewReader(b))
2768 if err != nil {
2769 return
2770 }
2771 dbx.Config.LogInfo("req: %v", req)
2772
2773 resp, err := cli.Do(req)
2774 if err != nil {
2775 return
2776 }
2777
2778 dbx.Config.LogInfo("resp: %v", resp)
2779 defer resp.Body.Close()
2780 body, err := ioutil.ReadAll(resp.Body)
2781 if err != nil {
2782 return
2783 }
2784
2785 dbx.Config.LogDebug("body: %s", body)
2786 if resp.StatusCode == http.StatusOK {
2787 return
2788 }
2789 if resp.StatusCode == http.StatusConflict {
2790 var apiError UnshareFileAPIError
2791 err = json.Unmarshal(body, &apiError)
2792 if err != nil {
2793 return
2794 }
2795 err = apiError
2796 return
2797 }
2798 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2799 if err != nil {
2800 return
2801 }
2802 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2803 return
2804 }
2805
2806 //UnshareFolderAPIError is an error-wrapper for the unshare_folder route
2807 type UnshareFolderAPIError struct {
2808 dropbox.APIError
2809 EndpointError *UnshareFolderError `json:"error"`
2810 }
2811
2812 func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) {
2813 cli := dbx.Client
2814
2815 dbx.Config.LogDebug("arg: %v", arg)
2816 b, err := json.Marshal(arg)
2817 if err != nil {
2818 return
2819 }
2820
2821 headers := map[string]string{
2822 "Content-Type": "application/json",
2823 }
2824 if dbx.Config.AsMemberID != "" {
2825 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2826 }
2827
2828 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unshare_folder", headers, bytes.NewReader(b))
2829 if err != nil {
2830 return
2831 }
2832 dbx.Config.LogInfo("req: %v", req)
2833
2834 resp, err := cli.Do(req)
2835 if err != nil {
2836 return
2837 }
2838
2839 dbx.Config.LogInfo("resp: %v", resp)
2840 defer resp.Body.Close()
2841 body, err := ioutil.ReadAll(resp.Body)
2842 if err != nil {
2843 return
2844 }
2845
2846 dbx.Config.LogDebug("body: %s", body)
2847 if resp.StatusCode == http.StatusOK {
2848 err = json.Unmarshal(body, &res)
2849 if err != nil {
2850 return
2851 }
2852
2853 return
2854 }
2855 if resp.StatusCode == http.StatusConflict {
2856 var apiError UnshareFolderAPIError
2857 err = json.Unmarshal(body, &apiError)
2858 if err != nil {
2859 return
2860 }
2861 err = apiError
2862 return
2863 }
2864 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2865 if err != nil {
2866 return
2867 }
2868 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2869 return
2870 }
2871
2872 //UpdateFileMemberAPIError is an error-wrapper for the update_file_member route
2873 type UpdateFileMemberAPIError struct {
2874 dropbox.APIError
2875 EndpointError *FileMemberActionError `json:"error"`
2876 }
2877
2878 func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error) {
2879 cli := dbx.Client
2880
2881 dbx.Config.LogDebug("arg: %v", arg)
2882 b, err := json.Marshal(arg)
2883 if err != nil {
2884 return
2885 }
2886
2887 headers := map[string]string{
2888 "Content-Type": "application/json",
2889 }
2890 if dbx.Config.AsMemberID != "" {
2891 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2892 }
2893
2894 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_file_member", headers, bytes.NewReader(b))
2895 if err != nil {
2896 return
2897 }
2898 dbx.Config.LogInfo("req: %v", req)
2899
2900 resp, err := cli.Do(req)
2901 if err != nil {
2902 return
2903 }
2904
2905 dbx.Config.LogInfo("resp: %v", resp)
2906 defer resp.Body.Close()
2907 body, err := ioutil.ReadAll(resp.Body)
2908 if err != nil {
2909 return
2910 }
2911
2912 dbx.Config.LogDebug("body: %s", body)
2913 if resp.StatusCode == http.StatusOK {
2914 err = json.Unmarshal(body, &res)
2915 if err != nil {
2916 return
2917 }
2918
2919 return
2920 }
2921 if resp.StatusCode == http.StatusConflict {
2922 var apiError UpdateFileMemberAPIError
2923 err = json.Unmarshal(body, &apiError)
2924 if err != nil {
2925 return
2926 }
2927 err = apiError
2928 return
2929 }
2930 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2931 if err != nil {
2932 return
2933 }
2934 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2935 return
2936 }
2937
2938 //UpdateFolderMemberAPIError is an error-wrapper for the update_folder_member route
2939 type UpdateFolderMemberAPIError struct {
2940 dropbox.APIError
2941 EndpointError *UpdateFolderMemberError `json:"error"`
2942 }
2943
2944 func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error) {
2945 cli := dbx.Client
2946
2947 dbx.Config.LogDebug("arg: %v", arg)
2948 b, err := json.Marshal(arg)
2949 if err != nil {
2950 return
2951 }
2952
2953 headers := map[string]string{
2954 "Content-Type": "application/json",
2955 }
2956 if dbx.Config.AsMemberID != "" {
2957 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
2958 }
2959
2960 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_folder_member", headers, bytes.NewReader(b))
2961 if err != nil {
2962 return
2963 }
2964 dbx.Config.LogInfo("req: %v", req)
2965
2966 resp, err := cli.Do(req)
2967 if err != nil {
2968 return
2969 }
2970
2971 dbx.Config.LogInfo("resp: %v", resp)
2972 defer resp.Body.Close()
2973 body, err := ioutil.ReadAll(resp.Body)
2974 if err != nil {
2975 return
2976 }
2977
2978 dbx.Config.LogDebug("body: %s", body)
2979 if resp.StatusCode == http.StatusOK {
2980 err = json.Unmarshal(body, &res)
2981 if err != nil {
2982 return
2983 }
2984
2985 return
2986 }
2987 if resp.StatusCode == http.StatusConflict {
2988 var apiError UpdateFolderMemberAPIError
2989 err = json.Unmarshal(body, &apiError)
2990 if err != nil {
2991 return
2992 }
2993 err = apiError
2994 return
2995 }
2996 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2997 if err != nil {
2998 return
2999 }
3000 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3001 return
3002 }
3003
3004 //UpdateFolderPolicyAPIError is an error-wrapper for the update_folder_policy route
3005 type UpdateFolderPolicyAPIError struct {
3006 dropbox.APIError
3007 EndpointError *UpdateFolderPolicyError `json:"error"`
3008 }
3009
3010 func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) {
3011 cli := dbx.Client
3012
3013 dbx.Config.LogDebug("arg: %v", arg)
3014 b, err := json.Marshal(arg)
3015 if err != nil {
3016 return
3017 }
3018
3019 headers := map[string]string{
3020 "Content-Type": "application/json",
3021 }
3022 if dbx.Config.AsMemberID != "" {
3023 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
3024 }
3025
3026 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_folder_policy", headers, bytes.NewReader(b))
3027 if err != nil {
3028 return
3029 }
3030 dbx.Config.LogInfo("req: %v", req)
3031
3032 resp, err := cli.Do(req)
3033 if err != nil {
3034 return
3035 }
3036
3037 dbx.Config.LogInfo("resp: %v", resp)
3038 defer resp.Body.Close()
3039 body, err := ioutil.ReadAll(resp.Body)
3040 if err != nil {
3041 return
3042 }
3043
3044 dbx.Config.LogDebug("body: %s", body)
3045 if resp.StatusCode == http.StatusOK {
3046 err = json.Unmarshal(body, &res)
3047 if err != nil {
3048 return
3049 }
3050
3051 return
3052 }
3053 if resp.StatusCode == http.StatusConflict {
3054 var apiError UpdateFolderPolicyAPIError
3055 err = json.Unmarshal(body, &apiError)
3056 if err != nil {
3057 return
3058 }
3059 err = apiError
3060 return
3061 }
3062 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3063 if err != nil {
3064 return
3065 }
3066 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3067 return
3068 }
3069
3070 // New returns a Client implementation for this namespace
3071 func New(c dropbox.Config) Client {
3072 ctx := apiImpl(dropbox.NewContext(c))
3073 return &ctx
3074 }
+0
-4393
dropbox/sharing/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package sharing : This namespace contains endpoints and data types for
21 // creating and managing shared links and shared folders.
22 package sharing
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/seen_state"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
33 )
34
35 // AccessInheritance : Information about the inheritance policy of a shared
36 // folder.
37 type AccessInheritance struct {
38 dropbox.Tagged
39 }
40
41 // Valid tag values for AccessInheritance
42 const (
43 AccessInheritanceInherit = "inherit"
44 AccessInheritanceNoInherit = "no_inherit"
45 AccessInheritanceOther = "other"
46 )
47
48 // AccessLevel : Defines the access levels for collaborators.
49 type AccessLevel struct {
50 dropbox.Tagged
51 }
52
53 // Valid tag values for AccessLevel
54 const (
55 AccessLevelOwner = "owner"
56 AccessLevelEditor = "editor"
57 AccessLevelViewer = "viewer"
58 AccessLevelViewerNoComment = "viewer_no_comment"
59 AccessLevelOther = "other"
60 )
61
62 // AclUpdatePolicy : Who can change a shared folder's access control list (ACL).
63 // In other words, who can add, remove, or change the privileges of members.
64 type AclUpdatePolicy struct {
65 dropbox.Tagged
66 }
67
68 // Valid tag values for AclUpdatePolicy
69 const (
70 AclUpdatePolicyOwner = "owner"
71 AclUpdatePolicyEditors = "editors"
72 AclUpdatePolicyOther = "other"
73 )
74
75 // AddFileMemberArgs : Arguments for `addFileMember`.
76 type AddFileMemberArgs struct {
77 // File : File to which to add members.
78 File string `json:"file"`
79 // Members : Members to add. Note that even an email address is given, this
80 // may result in a user being directy added to the membership if that email
81 // is the user's main account email.
82 Members []*MemberSelector `json:"members"`
83 // CustomMessage : Message to send to added members in their invitation.
84 CustomMessage string `json:"custom_message,omitempty"`
85 // Quiet : Whether added members should be notified via device notifications
86 // of their invitation.
87 Quiet bool `json:"quiet"`
88 // AccessLevel : AccessLevel union object, describing what access level we
89 // want to give new members.
90 AccessLevel *AccessLevel `json:"access_level"`
91 // AddMessageAsComment : If the custom message should be added as a comment
92 // on the file.
93 AddMessageAsComment bool `json:"add_message_as_comment"`
94 }
95
96 // NewAddFileMemberArgs returns a new AddFileMemberArgs instance
97 func NewAddFileMemberArgs(File string, Members []*MemberSelector) *AddFileMemberArgs {
98 s := new(AddFileMemberArgs)
99 s.File = File
100 s.Members = Members
101 s.Quiet = false
102 s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{"viewer"}}
103 s.AddMessageAsComment = false
104 return s
105 }
106
107 // AddFileMemberError : Errors for `addFileMember`.
108 type AddFileMemberError struct {
109 dropbox.Tagged
110 // UserError : has no documentation (yet)
111 UserError *SharingUserError `json:"user_error,omitempty"`
112 // AccessError : has no documentation (yet)
113 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
114 }
115
116 // Valid tag values for AddFileMemberError
117 const (
118 AddFileMemberErrorUserError = "user_error"
119 AddFileMemberErrorAccessError = "access_error"
120 AddFileMemberErrorRateLimit = "rate_limit"
121 AddFileMemberErrorInvalidComment = "invalid_comment"
122 AddFileMemberErrorOther = "other"
123 )
124
125 // UnmarshalJSON deserializes into a AddFileMemberError instance
126 func (u *AddFileMemberError) UnmarshalJSON(body []byte) error {
127 type wrap struct {
128 dropbox.Tagged
129 // UserError : has no documentation (yet)
130 UserError json.RawMessage `json:"user_error,omitempty"`
131 // AccessError : has no documentation (yet)
132 AccessError json.RawMessage `json:"access_error,omitempty"`
133 }
134 var w wrap
135 var err error
136 if err = json.Unmarshal(body, &w); err != nil {
137 return err
138 }
139 u.Tag = w.Tag
140 switch u.Tag {
141 case "user_error":
142 err = json.Unmarshal(w.UserError, &u.UserError)
143
144 if err != nil {
145 return err
146 }
147 case "access_error":
148 err = json.Unmarshal(w.AccessError, &u.AccessError)
149
150 if err != nil {
151 return err
152 }
153 }
154 return nil
155 }
156
157 // AddFolderMemberArg : has no documentation (yet)
158 type AddFolderMemberArg struct {
159 // SharedFolderId : The ID for the shared folder.
160 SharedFolderId string `json:"shared_folder_id"`
161 // Members : The intended list of members to add. Added members will
162 // receive invites to join the shared folder.
163 Members []*AddMember `json:"members"`
164 // Quiet : Whether added members should be notified via email and device
165 // notifications of their invite.
166 Quiet bool `json:"quiet"`
167 // CustomMessage : Optional message to display to added members in their
168 // invitation.
169 CustomMessage string `json:"custom_message,omitempty"`
170 }
171
172 // NewAddFolderMemberArg returns a new AddFolderMemberArg instance
173 func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) *AddFolderMemberArg {
174 s := new(AddFolderMemberArg)
175 s.SharedFolderId = SharedFolderId
176 s.Members = Members
177 s.Quiet = false
178 return s
179 }
180
181 // AddFolderMemberError : has no documentation (yet)
182 type AddFolderMemberError struct {
183 dropbox.Tagged
184 // AccessError : Unable to access shared folder.
185 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
186 // BadMember : `AddFolderMemberArg.members` contains a bad invitation
187 // recipient.
188 BadMember *AddMemberSelectorError `json:"bad_member,omitempty"`
189 // TooManyMembers : The value is the member limit that was reached.
190 TooManyMembers uint64 `json:"too_many_members,omitempty"`
191 // TooManyPendingInvites : The value is the pending invite limit that was
192 // reached.
193 TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"`
194 }
195
196 // Valid tag values for AddFolderMemberError
197 const (
198 AddFolderMemberErrorAccessError = "access_error"
199 AddFolderMemberErrorEmailUnverified = "email_unverified"
200 AddFolderMemberErrorBadMember = "bad_member"
201 AddFolderMemberErrorCantShareOutsideTeam = "cant_share_outside_team"
202 AddFolderMemberErrorTooManyMembers = "too_many_members"
203 AddFolderMemberErrorTooManyPendingInvites = "too_many_pending_invites"
204 AddFolderMemberErrorRateLimit = "rate_limit"
205 AddFolderMemberErrorTooManyInvitees = "too_many_invitees"
206 AddFolderMemberErrorInsufficientPlan = "insufficient_plan"
207 AddFolderMemberErrorTeamFolder = "team_folder"
208 AddFolderMemberErrorNoPermission = "no_permission"
209 AddFolderMemberErrorOther = "other"
210 )
211
212 // UnmarshalJSON deserializes into a AddFolderMemberError instance
213 func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error {
214 type wrap struct {
215 dropbox.Tagged
216 // AccessError : Unable to access shared folder.
217 AccessError json.RawMessage `json:"access_error,omitempty"`
218 // BadMember : `AddFolderMemberArg.members` contains a bad invitation
219 // recipient.
220 BadMember json.RawMessage `json:"bad_member,omitempty"`
221 }
222 var w wrap
223 var err error
224 if err = json.Unmarshal(body, &w); err != nil {
225 return err
226 }
227 u.Tag = w.Tag
228 switch u.Tag {
229 case "access_error":
230 err = json.Unmarshal(w.AccessError, &u.AccessError)
231
232 if err != nil {
233 return err
234 }
235 case "bad_member":
236 err = json.Unmarshal(w.BadMember, &u.BadMember)
237
238 if err != nil {
239 return err
240 }
241 case "too_many_members":
242 err = json.Unmarshal(body, &u.TooManyMembers)
243
244 if err != nil {
245 return err
246 }
247 case "too_many_pending_invites":
248 err = json.Unmarshal(body, &u.TooManyPendingInvites)
249
250 if err != nil {
251 return err
252 }
253 }
254 return nil
255 }
256
257 // AddMember : The member and type of access the member should have when added
258 // to a shared folder.
259 type AddMember struct {
260 // Member : The member to add to the shared folder.
261 Member *MemberSelector `json:"member"`
262 // AccessLevel : The access level to grant `member` to the shared folder.
263 // `AccessLevel.owner` is disallowed.
264 AccessLevel *AccessLevel `json:"access_level"`
265 }
266
267 // NewAddMember returns a new AddMember instance
268 func NewAddMember(Member *MemberSelector) *AddMember {
269 s := new(AddMember)
270 s.Member = Member
271 s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{"viewer"}}
272 return s
273 }
274
275 // AddMemberSelectorError : has no documentation (yet)
276 type AddMemberSelectorError struct {
277 dropbox.Tagged
278 // InvalidDropboxId : The value is the ID that could not be identified.
279 InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"`
280 // InvalidEmail : The value is the e-email address that is malformed.
281 InvalidEmail string `json:"invalid_email,omitempty"`
282 // UnverifiedDropboxId : The value is the ID of the Dropbox user with an
283 // unverified e-mail address. Invite unverified users by e-mail address
284 // instead of by their Dropbox ID.
285 UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"`
286 }
287
288 // Valid tag values for AddMemberSelectorError
289 const (
290 AddMemberSelectorErrorAutomaticGroup = "automatic_group"
291 AddMemberSelectorErrorInvalidDropboxId = "invalid_dropbox_id"
292 AddMemberSelectorErrorInvalidEmail = "invalid_email"
293 AddMemberSelectorErrorUnverifiedDropboxId = "unverified_dropbox_id"
294 AddMemberSelectorErrorGroupDeleted = "group_deleted"
295 AddMemberSelectorErrorGroupNotOnTeam = "group_not_on_team"
296 AddMemberSelectorErrorOther = "other"
297 )
298
299 // UnmarshalJSON deserializes into a AddMemberSelectorError instance
300 func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error {
301 type wrap struct {
302 dropbox.Tagged
303 }
304 var w wrap
305 var err error
306 if err = json.Unmarshal(body, &w); err != nil {
307 return err
308 }
309 u.Tag = w.Tag
310 switch u.Tag {
311 case "invalid_dropbox_id":
312 err = json.Unmarshal(body, &u.InvalidDropboxId)
313
314 if err != nil {
315 return err
316 }
317 case "invalid_email":
318 err = json.Unmarshal(body, &u.InvalidEmail)
319
320 if err != nil {
321 return err
322 }
323 case "unverified_dropbox_id":
324 err = json.Unmarshal(body, &u.UnverifiedDropboxId)
325
326 if err != nil {
327 return err
328 }
329 }
330 return nil
331 }
332
333 // AudienceExceptionContentInfo : Information about the content that has a link
334 // audience different than that of this folder.
335 type AudienceExceptionContentInfo struct {
336 // Name : The name of the content, which is either a file or a folder.
337 Name string `json:"name"`
338 }
339
340 // NewAudienceExceptionContentInfo returns a new AudienceExceptionContentInfo instance
341 func NewAudienceExceptionContentInfo(Name string) *AudienceExceptionContentInfo {
342 s := new(AudienceExceptionContentInfo)
343 s.Name = Name
344 return s
345 }
346
347 // AudienceExceptions : The total count and truncated list of information of
348 // content inside this folder that has a different audience than the link on
349 // this folder. This is only returned for folders.
350 type AudienceExceptions struct {
351 // Count : has no documentation (yet)
352 Count uint32 `json:"count"`
353 // Exceptions : A truncated list of some of the content that is an
354 // exception. The length of this list could be smaller than the count since
355 // it is only a sample but will not be empty as long as count is not 0.
356 Exceptions []*AudienceExceptionContentInfo `json:"exceptions"`
357 }
358
359 // NewAudienceExceptions returns a new AudienceExceptions instance
360 func NewAudienceExceptions(Count uint32, Exceptions []*AudienceExceptionContentInfo) *AudienceExceptions {
361 s := new(AudienceExceptions)
362 s.Count = Count
363 s.Exceptions = Exceptions
364 return s
365 }
366
367 // AudienceRestrictingSharedFolder : Information about the shared folder that
368 // prevents the link audience for this link from being more restrictive.
369 type AudienceRestrictingSharedFolder struct {
370 // SharedFolderId : The ID of the shared folder.
371 SharedFolderId string `json:"shared_folder_id"`
372 // Name : The name of the shared folder.
373 Name string `json:"name"`
374 // Audience : The link audience of the shared folder.
375 Audience *LinkAudience `json:"audience"`
376 }
377
378 // NewAudienceRestrictingSharedFolder returns a new AudienceRestrictingSharedFolder instance
379 func NewAudienceRestrictingSharedFolder(SharedFolderId string, Name string, Audience *LinkAudience) *AudienceRestrictingSharedFolder {
380 s := new(AudienceRestrictingSharedFolder)
381 s.SharedFolderId = SharedFolderId
382 s.Name = Name
383 s.Audience = Audience
384 return s
385 }
386
387 // ChangeFileMemberAccessArgs : Arguments for `changeFileMemberAccess`.
388 type ChangeFileMemberAccessArgs struct {
389 // File : File for which we are changing a member's access.
390 File string `json:"file"`
391 // Member : The member whose access we are changing.
392 Member *MemberSelector `json:"member"`
393 // AccessLevel : The new access level for the member.
394 AccessLevel *AccessLevel `json:"access_level"`
395 }
396
397 // NewChangeFileMemberAccessArgs returns a new ChangeFileMemberAccessArgs instance
398 func NewChangeFileMemberAccessArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *ChangeFileMemberAccessArgs {
399 s := new(ChangeFileMemberAccessArgs)
400 s.File = File
401 s.Member = Member
402 s.AccessLevel = AccessLevel
403 return s
404 }
405
406 // LinkMetadata : Metadata for a shared link. This can be either a
407 // `PathLinkMetadata` or `CollectionLinkMetadata`.
408 type LinkMetadata struct {
409 // Url : URL of the shared link.
410 Url string `json:"url"`
411 // Visibility : Who can access the link.
412 Visibility *Visibility `json:"visibility"`
413 // Expires : Expiration time, if set. By default the link won't expire.
414 Expires time.Time `json:"expires,omitempty"`
415 }
416
417 // NewLinkMetadata returns a new LinkMetadata instance
418 func NewLinkMetadata(Url string, Visibility *Visibility) *LinkMetadata {
419 s := new(LinkMetadata)
420 s.Url = Url
421 s.Visibility = Visibility
422 return s
423 }
424
425 // IsLinkMetadata is the interface type for LinkMetadata and its subtypes
426 type IsLinkMetadata interface {
427 IsLinkMetadata()
428 }
429
430 // IsLinkMetadata implements the IsLinkMetadata interface
431 func (u *LinkMetadata) IsLinkMetadata() {}
432
433 type linkMetadataUnion struct {
434 dropbox.Tagged
435 // Path : has no documentation (yet)
436 Path *PathLinkMetadata `json:"path,omitempty"`
437 // Collection : has no documentation (yet)
438 Collection *CollectionLinkMetadata `json:"collection,omitempty"`
439 }
440
441 // Valid tag values for LinkMetadata
442 const (
443 LinkMetadataPath = "path"
444 LinkMetadataCollection = "collection"
445 )
446
447 // UnmarshalJSON deserializes into a linkMetadataUnion instance
448 func (u *linkMetadataUnion) UnmarshalJSON(body []byte) error {
449 type wrap struct {
450 dropbox.Tagged
451 // Path : has no documentation (yet)
452 Path json.RawMessage `json:"path,omitempty"`
453 // Collection : has no documentation (yet)
454 Collection json.RawMessage `json:"collection,omitempty"`
455 }
456 var w wrap
457 var err error
458 if err = json.Unmarshal(body, &w); err != nil {
459 return err
460 }
461 u.Tag = w.Tag
462 switch u.Tag {
463 case "path":
464 err = json.Unmarshal(body, &u.Path)
465
466 if err != nil {
467 return err
468 }
469 case "collection":
470 err = json.Unmarshal(body, &u.Collection)
471
472 if err != nil {
473 return err
474 }
475 }
476 return nil
477 }
478
479 // IsLinkMetadataFromJSON converts JSON to a concrete IsLinkMetadata instance
480 func IsLinkMetadataFromJSON(data []byte) (IsLinkMetadata, error) {
481 var t linkMetadataUnion
482 if err := json.Unmarshal(data, &t); err != nil {
483 return nil, err
484 }
485 switch t.Tag {
486 case "path":
487 return t.Path, nil
488
489 case "collection":
490 return t.Collection, nil
491
492 }
493 return nil, nil
494 }
495
496 // CollectionLinkMetadata : Metadata for a collection-based shared link.
497 type CollectionLinkMetadata struct {
498 LinkMetadata
499 }
500
501 // NewCollectionLinkMetadata returns a new CollectionLinkMetadata instance
502 func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *CollectionLinkMetadata {
503 s := new(CollectionLinkMetadata)
504 s.Url = Url
505 s.Visibility = Visibility
506 return s
507 }
508
509 // CreateSharedLinkArg : has no documentation (yet)
510 type CreateSharedLinkArg struct {
511 // Path : The path to share.
512 Path string `json:"path"`
513 // ShortUrl : Whether to return a shortened URL.
514 ShortUrl bool `json:"short_url"`
515 // PendingUpload : If it's okay to share a path that does not yet exist, set
516 // this to either `PendingUploadMode.file` or `PendingUploadMode.folder` to
517 // indicate whether to assume it's a file or folder.
518 PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"`
519 }
520
521 // NewCreateSharedLinkArg returns a new CreateSharedLinkArg instance
522 func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg {
523 s := new(CreateSharedLinkArg)
524 s.Path = Path
525 s.ShortUrl = false
526 return s
527 }
528
529 // CreateSharedLinkError : has no documentation (yet)
530 type CreateSharedLinkError struct {
531 dropbox.Tagged
532 // Path : has no documentation (yet)
533 Path *files.LookupError `json:"path,omitempty"`
534 }
535
536 // Valid tag values for CreateSharedLinkError
537 const (
538 CreateSharedLinkErrorPath = "path"
539 CreateSharedLinkErrorOther = "other"
540 )
541
542 // UnmarshalJSON deserializes into a CreateSharedLinkError instance
543 func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error {
544 type wrap struct {
545 dropbox.Tagged
546 // Path : has no documentation (yet)
547 Path json.RawMessage `json:"path,omitempty"`
548 }
549 var w wrap
550 var err error
551 if err = json.Unmarshal(body, &w); err != nil {
552 return err
553 }
554 u.Tag = w.Tag
555 switch u.Tag {
556 case "path":
557 err = json.Unmarshal(w.Path, &u.Path)
558
559 if err != nil {
560 return err
561 }
562 }
563 return nil
564 }
565
566 // CreateSharedLinkWithSettingsArg : has no documentation (yet)
567 type CreateSharedLinkWithSettingsArg struct {
568 // Path : The path to be shared by the shared link.
569 Path string `json:"path"`
570 // Settings : The requested settings for the newly created shared link.
571 Settings *SharedLinkSettings `json:"settings,omitempty"`
572 }
573
574 // NewCreateSharedLinkWithSettingsArg returns a new CreateSharedLinkWithSettingsArg instance
575 func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg {
576 s := new(CreateSharedLinkWithSettingsArg)
577 s.Path = Path
578 return s
579 }
580
581 // CreateSharedLinkWithSettingsError : has no documentation (yet)
582 type CreateSharedLinkWithSettingsError struct {
583 dropbox.Tagged
584 // Path : has no documentation (yet)
585 Path *files.LookupError `json:"path,omitempty"`
586 // SettingsError : There is an error with the given settings.
587 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
588 }
589
590 // Valid tag values for CreateSharedLinkWithSettingsError
591 const (
592 CreateSharedLinkWithSettingsErrorPath = "path"
593 CreateSharedLinkWithSettingsErrorEmailNotVerified = "email_not_verified"
594 CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists = "shared_link_already_exists"
595 CreateSharedLinkWithSettingsErrorSettingsError = "settings_error"
596 CreateSharedLinkWithSettingsErrorAccessDenied = "access_denied"
597 )
598
599 // UnmarshalJSON deserializes into a CreateSharedLinkWithSettingsError instance
600 func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte) error {
601 type wrap struct {
602 dropbox.Tagged
603 // Path : has no documentation (yet)
604 Path json.RawMessage `json:"path,omitempty"`
605 // SettingsError : There is an error with the given settings.
606 SettingsError json.RawMessage `json:"settings_error,omitempty"`
607 }
608 var w wrap
609 var err error
610 if err = json.Unmarshal(body, &w); err != nil {
611 return err
612 }
613 u.Tag = w.Tag
614 switch u.Tag {
615 case "path":
616 err = json.Unmarshal(w.Path, &u.Path)
617
618 if err != nil {
619 return err
620 }
621 case "settings_error":
622 err = json.Unmarshal(w.SettingsError, &u.SettingsError)
623
624 if err != nil {
625 return err
626 }
627 }
628 return nil
629 }
630
631 // SharedContentLinkMetadataBase : has no documentation (yet)
632 type SharedContentLinkMetadataBase struct {
633 // AccessLevel : The access level on the link for this file.
634 AccessLevel *AccessLevel `json:"access_level,omitempty"`
635 // AudienceOptions : The audience options that are available for the
636 // content. Some audience options may be unavailable. For example, team_only
637 // may be unavailable if the content is not owned by a user on a team. The
638 // 'default' audience option is always available if the user can modify link
639 // settings.
640 AudienceOptions []*LinkAudience `json:"audience_options"`
641 // AudienceRestrictingSharedFolder : The shared folder that prevents the
642 // link audience for this link from being more restrictive.
643 AudienceRestrictingSharedFolder *AudienceRestrictingSharedFolder `json:"audience_restricting_shared_folder,omitempty"`
644 // CurrentAudience : The current audience of the link.
645 CurrentAudience *LinkAudience `json:"current_audience"`
646 // Expiry : Whether the link has an expiry set on it. A link with an expiry
647 // will have its audience changed to members when the expiry is reached.
648 Expiry time.Time `json:"expiry,omitempty"`
649 // LinkPermissions : A list of permissions for actions you can perform on
650 // the link.
651 LinkPermissions []*LinkPermission `json:"link_permissions"`
652 // PasswordProtected : Whether the link is protected by a password.
653 PasswordProtected bool `json:"password_protected"`
654 }
655
656 // NewSharedContentLinkMetadataBase returns a new SharedContentLinkMetadataBase instance
657 func NewSharedContentLinkMetadataBase(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *SharedContentLinkMetadataBase {
658 s := new(SharedContentLinkMetadataBase)
659 s.AudienceOptions = AudienceOptions
660 s.CurrentAudience = CurrentAudience
661 s.LinkPermissions = LinkPermissions
662 s.PasswordProtected = PasswordProtected
663 return s
664 }
665
666 // ExpectedSharedContentLinkMetadata : The expected metadata of a shared link
667 // for a file or folder when a link is first created for the content. Absent if
668 // the link already exists.
669 type ExpectedSharedContentLinkMetadata struct {
670 SharedContentLinkMetadataBase
671 }
672
673 // NewExpectedSharedContentLinkMetadata returns a new ExpectedSharedContentLinkMetadata instance
674 func NewExpectedSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *ExpectedSharedContentLinkMetadata {
675 s := new(ExpectedSharedContentLinkMetadata)
676 s.AudienceOptions = AudienceOptions
677 s.CurrentAudience = CurrentAudience
678 s.LinkPermissions = LinkPermissions
679 s.PasswordProtected = PasswordProtected
680 return s
681 }
682
683 // FileAction : Sharing actions that may be taken on files.
684 type FileAction struct {
685 dropbox.Tagged
686 }
687
688 // Valid tag values for FileAction
689 const (
690 FileActionDisableViewerInfo = "disable_viewer_info"
691 FileActionEditContents = "edit_contents"
692 FileActionEnableViewerInfo = "enable_viewer_info"
693 FileActionInviteViewer = "invite_viewer"
694 FileActionInviteViewerNoComment = "invite_viewer_no_comment"
695 FileActionInviteEditor = "invite_editor"
696 FileActionUnshare = "unshare"
697 FileActionRelinquishMembership = "relinquish_membership"
698 FileActionShareLink = "share_link"
699 FileActionCreateLink = "create_link"
700 FileActionOther = "other"
701 )
702
703 // FileErrorResult : has no documentation (yet)
704 type FileErrorResult struct {
705 dropbox.Tagged
706 // FileNotFoundError : File specified by id was not found.
707 FileNotFoundError string `json:"file_not_found_error,omitempty"`
708 // InvalidFileActionError : User does not have permission to take the
709 // specified action on the file.
710 InvalidFileActionError string `json:"invalid_file_action_error,omitempty"`
711 // PermissionDeniedError : User does not have permission to access file
712 // specified by file.Id.
713 PermissionDeniedError string `json:"permission_denied_error,omitempty"`
714 }
715
716 // Valid tag values for FileErrorResult
717 const (
718 FileErrorResultFileNotFoundError = "file_not_found_error"
719 FileErrorResultInvalidFileActionError = "invalid_file_action_error"
720 FileErrorResultPermissionDeniedError = "permission_denied_error"
721 FileErrorResultOther = "other"
722 )
723
724 // UnmarshalJSON deserializes into a FileErrorResult instance
725 func (u *FileErrorResult) UnmarshalJSON(body []byte) error {
726 type wrap struct {
727 dropbox.Tagged
728 }
729 var w wrap
730 var err error
731 if err = json.Unmarshal(body, &w); err != nil {
732 return err
733 }
734 u.Tag = w.Tag
735 switch u.Tag {
736 case "file_not_found_error":
737 err = json.Unmarshal(body, &u.FileNotFoundError)
738
739 if err != nil {
740 return err
741 }
742 case "invalid_file_action_error":
743 err = json.Unmarshal(body, &u.InvalidFileActionError)
744
745 if err != nil {
746 return err
747 }
748 case "permission_denied_error":
749 err = json.Unmarshal(body, &u.PermissionDeniedError)
750
751 if err != nil {
752 return err
753 }
754 }
755 return nil
756 }
757
758 // SharedLinkMetadata : The metadata of a shared link.
759 type SharedLinkMetadata struct {
760 // Url : URL of the shared link.
761 Url string `json:"url"`
762 // Id : A unique identifier for the linked file.
763 Id string `json:"id,omitempty"`
764 // Name : The linked file name (including extension). This never contains a
765 // slash.
766 Name string `json:"name"`
767 // Expires : Expiration time, if set. By default the link won't expire.
768 Expires time.Time `json:"expires,omitempty"`
769 // PathLower : The lowercased full path in the user's Dropbox. This always
770 // starts with a slash. This field will only be present only if the linked
771 // file is in the authenticated user's dropbox.
772 PathLower string `json:"path_lower,omitempty"`
773 // LinkPermissions : The link's access permissions.
774 LinkPermissions *LinkPermissions `json:"link_permissions"`
775 // TeamMemberInfo : The team membership information of the link's owner.
776 // This field will only be present if the link's owner is a team member.
777 TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"`
778 // ContentOwnerTeamInfo : The team information of the content's owner. This
779 // field will only be present if the content's owner is a team member and
780 // the content's owner team is different from the link's owner team.
781 ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"`
782 }
783
784 // NewSharedLinkMetadata returns a new SharedLinkMetadata instance
785 func NewSharedLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *SharedLinkMetadata {
786 s := new(SharedLinkMetadata)
787 s.Url = Url
788 s.Name = Name
789 s.LinkPermissions = LinkPermissions
790 return s
791 }
792
793 // IsSharedLinkMetadata is the interface type for SharedLinkMetadata and its subtypes
794 type IsSharedLinkMetadata interface {
795 IsSharedLinkMetadata()
796 }
797
798 // IsSharedLinkMetadata implements the IsSharedLinkMetadata interface
799 func (u *SharedLinkMetadata) IsSharedLinkMetadata() {}
800
801 type sharedLinkMetadataUnion struct {
802 dropbox.Tagged
803 // File : has no documentation (yet)
804 File *FileLinkMetadata `json:"file,omitempty"`
805 // Folder : has no documentation (yet)
806 Folder *FolderLinkMetadata `json:"folder,omitempty"`
807 }
808
809 // Valid tag values for SharedLinkMetadata
810 const (
811 SharedLinkMetadataFile = "file"
812 SharedLinkMetadataFolder = "folder"
813 )
814
815 // UnmarshalJSON deserializes into a sharedLinkMetadataUnion instance
816 func (u *sharedLinkMetadataUnion) UnmarshalJSON(body []byte) error {
817 type wrap struct {
818 dropbox.Tagged
819 // File : has no documentation (yet)
820 File json.RawMessage `json:"file,omitempty"`
821 // Folder : has no documentation (yet)
822 Folder json.RawMessage `json:"folder,omitempty"`
823 }
824 var w wrap
825 var err error
826 if err = json.Unmarshal(body, &w); err != nil {
827 return err
828 }
829 u.Tag = w.Tag
830 switch u.Tag {
831 case "file":
832 err = json.Unmarshal(body, &u.File)
833
834 if err != nil {
835 return err
836 }
837 case "folder":
838 err = json.Unmarshal(body, &u.Folder)
839
840 if err != nil {
841 return err
842 }
843 }
844 return nil
845 }
846
847 // IsSharedLinkMetadataFromJSON converts JSON to a concrete IsSharedLinkMetadata instance
848 func IsSharedLinkMetadataFromJSON(data []byte) (IsSharedLinkMetadata, error) {
849 var t sharedLinkMetadataUnion
850 if err := json.Unmarshal(data, &t); err != nil {
851 return nil, err
852 }
853 switch t.Tag {
854 case "file":
855 return t.File, nil
856
857 case "folder":
858 return t.Folder, nil
859
860 }
861 return nil, nil
862 }
863
864 // FileLinkMetadata : The metadata of a file shared link.
865 type FileLinkMetadata struct {
866 SharedLinkMetadata
867 // ClientModified : The modification time set by the desktop client when the
868 // file was added to Dropbox. Since this time is not verified (the Dropbox
869 // server stores whatever the desktop client sends up), this should only be
870 // used for display purposes (such as sorting) and not, for example, to
871 // determine if a file has changed or not.
872 ClientModified time.Time `json:"client_modified"`
873 // ServerModified : The last time the file was modified on Dropbox.
874 ServerModified time.Time `json:"server_modified"`
875 // Rev : A unique identifier for the current revision of a file. This field
876 // is the same rev as elsewhere in the API and can be used to detect changes
877 // and avoid conflicts.
878 Rev string `json:"rev"`
879 // Size : The file size in bytes.
880 Size uint64 `json:"size"`
881 }
882
883 // NewFileLinkMetadata returns a new FileLinkMetadata instance
884 func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileLinkMetadata {
885 s := new(FileLinkMetadata)
886 s.Url = Url
887 s.Name = Name
888 s.LinkPermissions = LinkPermissions
889 s.ClientModified = ClientModified
890 s.ServerModified = ServerModified
891 s.Rev = Rev
892 s.Size = Size
893 return s
894 }
895
896 // FileMemberActionError : has no documentation (yet)
897 type FileMemberActionError struct {
898 dropbox.Tagged
899 // AccessError : Specified file was invalid or user does not have access.
900 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
901 // NoExplicitAccess : The action cannot be completed because the target
902 // member does not have explicit access to the file. The return value is the
903 // access that the member has to the file from a parent folder.
904 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
905 }
906
907 // Valid tag values for FileMemberActionError
908 const (
909 FileMemberActionErrorInvalidMember = "invalid_member"
910 FileMemberActionErrorNoPermission = "no_permission"
911 FileMemberActionErrorAccessError = "access_error"
912 FileMemberActionErrorNoExplicitAccess = "no_explicit_access"
913 FileMemberActionErrorOther = "other"
914 )
915
916 // UnmarshalJSON deserializes into a FileMemberActionError instance
917 func (u *FileMemberActionError) UnmarshalJSON(body []byte) error {
918 type wrap struct {
919 dropbox.Tagged
920 // AccessError : Specified file was invalid or user does not have
921 // access.
922 AccessError json.RawMessage `json:"access_error,omitempty"`
923 // NoExplicitAccess : The action cannot be completed because the target
924 // member does not have explicit access to the file. The return value is
925 // the access that the member has to the file from a parent folder.
926 NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"`
927 }
928 var w wrap
929 var err error
930 if err = json.Unmarshal(body, &w); err != nil {
931 return err
932 }
933 u.Tag = w.Tag
934 switch u.Tag {
935 case "access_error":
936 err = json.Unmarshal(w.AccessError, &u.AccessError)
937
938 if err != nil {
939 return err
940 }
941 case "no_explicit_access":
942 err = json.Unmarshal(body, &u.NoExplicitAccess)
943
944 if err != nil {
945 return err
946 }
947 }
948 return nil
949 }
950
951 // FileMemberActionIndividualResult : has no documentation (yet)
952 type FileMemberActionIndividualResult struct {
953 dropbox.Tagged
954 // Success : Member was successfully removed from this file. If AccessLevel
955 // is given, the member still has access via a parent shared folder.
956 Success *AccessLevel `json:"success,omitempty"`
957 // MemberError : User was not able to perform this action.
958 MemberError *FileMemberActionError `json:"member_error,omitempty"`
959 }
960
961 // Valid tag values for FileMemberActionIndividualResult
962 const (
963 FileMemberActionIndividualResultSuccess = "success"
964 FileMemberActionIndividualResultMemberError = "member_error"
965 )
966
967 // UnmarshalJSON deserializes into a FileMemberActionIndividualResult instance
968 func (u *FileMemberActionIndividualResult) UnmarshalJSON(body []byte) error {
969 type wrap struct {
970 dropbox.Tagged
971 // Success : Member was successfully removed from this file. If
972 // AccessLevel is given, the member still has access via a parent shared
973 // folder.
974 Success json.RawMessage `json:"success,omitempty"`
975 // MemberError : User was not able to perform this action.
976 MemberError json.RawMessage `json:"member_error,omitempty"`
977 }
978 var w wrap
979 var err error
980 if err = json.Unmarshal(body, &w); err != nil {
981 return err
982 }
983 u.Tag = w.Tag
984 switch u.Tag {
985 case "success":
986 err = json.Unmarshal(body, &u.Success)
987
988 if err != nil {
989 return err
990 }
991 case "member_error":
992 err = json.Unmarshal(w.MemberError, &u.MemberError)
993
994 if err != nil {
995 return err
996 }
997 }
998 return nil
999 }
1000
1001 // FileMemberActionResult : Per-member result for `addFileMember` or
1002 // `changeFileMemberAccess`.
1003 type FileMemberActionResult struct {
1004 // Member : One of specified input members.
1005 Member *MemberSelector `json:"member"`
1006 // Result : The outcome of the action on this member.
1007 Result *FileMemberActionIndividualResult `json:"result"`
1008 }
1009
1010 // NewFileMemberActionResult returns a new FileMemberActionResult instance
1011 func NewFileMemberActionResult(Member *MemberSelector, Result *FileMemberActionIndividualResult) *FileMemberActionResult {
1012 s := new(FileMemberActionResult)
1013 s.Member = Member
1014 s.Result = Result
1015 return s
1016 }
1017
1018 // FileMemberRemoveActionResult : has no documentation (yet)
1019 type FileMemberRemoveActionResult struct {
1020 dropbox.Tagged
1021 // Success : Member was successfully removed from this file.
1022 Success *MemberAccessLevelResult `json:"success,omitempty"`
1023 // MemberError : User was not able to remove this member.
1024 MemberError *FileMemberActionError `json:"member_error,omitempty"`
1025 }
1026
1027 // Valid tag values for FileMemberRemoveActionResult
1028 const (
1029 FileMemberRemoveActionResultSuccess = "success"
1030 FileMemberRemoveActionResultMemberError = "member_error"
1031 FileMemberRemoveActionResultOther = "other"
1032 )
1033
1034 // UnmarshalJSON deserializes into a FileMemberRemoveActionResult instance
1035 func (u *FileMemberRemoveActionResult) UnmarshalJSON(body []byte) error {
1036 type wrap struct {
1037 dropbox.Tagged
1038 // Success : Member was successfully removed from this file.
1039 Success json.RawMessage `json:"success,omitempty"`
1040 // MemberError : User was not able to remove this member.
1041 MemberError json.RawMessage `json:"member_error,omitempty"`
1042 }
1043 var w wrap
1044 var err error
1045 if err = json.Unmarshal(body, &w); err != nil {
1046 return err
1047 }
1048 u.Tag = w.Tag
1049 switch u.Tag {
1050 case "success":
1051 err = json.Unmarshal(body, &u.Success)
1052
1053 if err != nil {
1054 return err
1055 }
1056 case "member_error":
1057 err = json.Unmarshal(w.MemberError, &u.MemberError)
1058
1059 if err != nil {
1060 return err
1061 }
1062 }
1063 return nil
1064 }
1065
1066 // FilePermission : Whether the user is allowed to take the sharing action on
1067 // the file.
1068 type FilePermission struct {
1069 // Action : The action that the user may wish to take on the file.
1070 Action *FileAction `json:"action"`
1071 // Allow : True if the user is allowed to take the action.
1072 Allow bool `json:"allow"`
1073 // Reason : The reason why the user is denied the permission. Not present if
1074 // the action is allowed.
1075 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1076 }
1077
1078 // NewFilePermission returns a new FilePermission instance
1079 func NewFilePermission(Action *FileAction, Allow bool) *FilePermission {
1080 s := new(FilePermission)
1081 s.Action = Action
1082 s.Allow = Allow
1083 return s
1084 }
1085
1086 // FolderAction : Actions that may be taken on shared folders.
1087 type FolderAction struct {
1088 dropbox.Tagged
1089 }
1090
1091 // Valid tag values for FolderAction
1092 const (
1093 FolderActionChangeOptions = "change_options"
1094 FolderActionDisableViewerInfo = "disable_viewer_info"
1095 FolderActionEditContents = "edit_contents"
1096 FolderActionEnableViewerInfo = "enable_viewer_info"
1097 FolderActionInviteEditor = "invite_editor"
1098 FolderActionInviteViewer = "invite_viewer"
1099 FolderActionInviteViewerNoComment = "invite_viewer_no_comment"
1100 FolderActionRelinquishMembership = "relinquish_membership"
1101 FolderActionUnmount = "unmount"
1102 FolderActionUnshare = "unshare"
1103 FolderActionLeaveACopy = "leave_a_copy"
1104 FolderActionShareLink = "share_link"
1105 FolderActionCreateLink = "create_link"
1106 FolderActionSetAccessInheritance = "set_access_inheritance"
1107 FolderActionOther = "other"
1108 )
1109
1110 // FolderLinkMetadata : The metadata of a folder shared link.
1111 type FolderLinkMetadata struct {
1112 SharedLinkMetadata
1113 }
1114
1115 // NewFolderLinkMetadata returns a new FolderLinkMetadata instance
1116 func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *FolderLinkMetadata {
1117 s := new(FolderLinkMetadata)
1118 s.Url = Url
1119 s.Name = Name
1120 s.LinkPermissions = LinkPermissions
1121 return s
1122 }
1123
1124 // FolderPermission : Whether the user is allowed to take the action on the
1125 // shared folder.
1126 type FolderPermission struct {
1127 // Action : The action that the user may wish to take on the folder.
1128 Action *FolderAction `json:"action"`
1129 // Allow : True if the user is allowed to take the action.
1130 Allow bool `json:"allow"`
1131 // Reason : The reason why the user is denied the permission. Not present if
1132 // the action is allowed, or if no reason is available.
1133 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1134 }
1135
1136 // NewFolderPermission returns a new FolderPermission instance
1137 func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermission {
1138 s := new(FolderPermission)
1139 s.Action = Action
1140 s.Allow = Allow
1141 return s
1142 }
1143
1144 // FolderPolicy : A set of policies governing membership and privileges for a
1145 // shared folder.
1146 type FolderPolicy struct {
1147 // MemberPolicy : Who can be a member of this shared folder, as set on the
1148 // folder itself. The effective policy may differ from this value if the
1149 // team-wide policy is more restrictive. Present only if the folder is owned
1150 // by a team.
1151 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
1152 // ResolvedMemberPolicy : Who can be a member of this shared folder, taking
1153 // into account both the folder and the team-wide policy. This value may
1154 // differ from that of member_policy if the team-wide policy is more
1155 // restrictive than the folder policy. Present only if the folder is owned
1156 // by a team.
1157 ResolvedMemberPolicy *MemberPolicy `json:"resolved_member_policy,omitempty"`
1158 // AclUpdatePolicy : Who can add and remove members from this shared folder.
1159 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"`
1160 // SharedLinkPolicy : Who links can be shared with.
1161 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"`
1162 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
1163 // folder.
1164 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
1165 }
1166
1167 // NewFolderPolicy returns a new FolderPolicy instance
1168 func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy *SharedLinkPolicy) *FolderPolicy {
1169 s := new(FolderPolicy)
1170 s.AclUpdatePolicy = AclUpdatePolicy
1171 s.SharedLinkPolicy = SharedLinkPolicy
1172 return s
1173 }
1174
1175 // GetFileMetadataArg : Arguments of `getFileMetadata`.
1176 type GetFileMetadataArg struct {
1177 // File : The file to query.
1178 File string `json:"file"`
1179 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
1180 // should appear in the response's `SharedFileMetadata.permissions` field
1181 // describing the actions the authenticated user can perform on the file.
1182 Actions []*FileAction `json:"actions,omitempty"`
1183 }
1184
1185 // NewGetFileMetadataArg returns a new GetFileMetadataArg instance
1186 func NewGetFileMetadataArg(File string) *GetFileMetadataArg {
1187 s := new(GetFileMetadataArg)
1188 s.File = File
1189 return s
1190 }
1191
1192 // GetFileMetadataBatchArg : Arguments of `getFileMetadataBatch`.
1193 type GetFileMetadataBatchArg struct {
1194 // Files : The files to query.
1195 Files []string `json:"files"`
1196 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
1197 // should appear in the response's `SharedFileMetadata.permissions` field
1198 // describing the actions the authenticated user can perform on the file.
1199 Actions []*FileAction `json:"actions,omitempty"`
1200 }
1201
1202 // NewGetFileMetadataBatchArg returns a new GetFileMetadataBatchArg instance
1203 func NewGetFileMetadataBatchArg(Files []string) *GetFileMetadataBatchArg {
1204 s := new(GetFileMetadataBatchArg)
1205 s.Files = Files
1206 return s
1207 }
1208
1209 // GetFileMetadataBatchResult : Per file results of `getFileMetadataBatch`.
1210 type GetFileMetadataBatchResult struct {
1211 // File : This is the input file identifier corresponding to one of
1212 // `GetFileMetadataBatchArg.files`.
1213 File string `json:"file"`
1214 // Result : The result for this particular file.
1215 Result *GetFileMetadataIndividualResult `json:"result"`
1216 }
1217
1218 // NewGetFileMetadataBatchResult returns a new GetFileMetadataBatchResult instance
1219 func NewGetFileMetadataBatchResult(File string, Result *GetFileMetadataIndividualResult) *GetFileMetadataBatchResult {
1220 s := new(GetFileMetadataBatchResult)
1221 s.File = File
1222 s.Result = Result
1223 return s
1224 }
1225
1226 // GetFileMetadataError : Error result for `getFileMetadata`.
1227 type GetFileMetadataError struct {
1228 dropbox.Tagged
1229 // UserError : has no documentation (yet)
1230 UserError *SharingUserError `json:"user_error,omitempty"`
1231 // AccessError : has no documentation (yet)
1232 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1233 }
1234
1235 // Valid tag values for GetFileMetadataError
1236 const (
1237 GetFileMetadataErrorUserError = "user_error"
1238 GetFileMetadataErrorAccessError = "access_error"
1239 GetFileMetadataErrorOther = "other"
1240 )
1241
1242 // UnmarshalJSON deserializes into a GetFileMetadataError instance
1243 func (u *GetFileMetadataError) UnmarshalJSON(body []byte) error {
1244 type wrap struct {
1245 dropbox.Tagged
1246 // UserError : has no documentation (yet)
1247 UserError json.RawMessage `json:"user_error,omitempty"`
1248 // AccessError : has no documentation (yet)
1249 AccessError json.RawMessage `json:"access_error,omitempty"`
1250 }
1251 var w wrap
1252 var err error
1253 if err = json.Unmarshal(body, &w); err != nil {
1254 return err
1255 }
1256 u.Tag = w.Tag
1257 switch u.Tag {
1258 case "user_error":
1259 err = json.Unmarshal(w.UserError, &u.UserError)
1260
1261 if err != nil {
1262 return err
1263 }
1264 case "access_error":
1265 err = json.Unmarshal(w.AccessError, &u.AccessError)
1266
1267 if err != nil {
1268 return err
1269 }
1270 }
1271 return nil
1272 }
1273
1274 // GetFileMetadataIndividualResult : has no documentation (yet)
1275 type GetFileMetadataIndividualResult struct {
1276 dropbox.Tagged
1277 // Metadata : The result for this file if it was successful.
1278 Metadata *SharedFileMetadata `json:"metadata,omitempty"`
1279 // AccessError : The result for this file if it was an error.
1280 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1281 }
1282
1283 // Valid tag values for GetFileMetadataIndividualResult
1284 const (
1285 GetFileMetadataIndividualResultMetadata = "metadata"
1286 GetFileMetadataIndividualResultAccessError = "access_error"
1287 GetFileMetadataIndividualResultOther = "other"
1288 )
1289
1290 // UnmarshalJSON deserializes into a GetFileMetadataIndividualResult instance
1291 func (u *GetFileMetadataIndividualResult) UnmarshalJSON(body []byte) error {
1292 type wrap struct {
1293 dropbox.Tagged
1294 // Metadata : The result for this file if it was successful.
1295 Metadata json.RawMessage `json:"metadata,omitempty"`
1296 // AccessError : The result for this file if it was an error.
1297 AccessError json.RawMessage `json:"access_error,omitempty"`
1298 }
1299 var w wrap
1300 var err error
1301 if err = json.Unmarshal(body, &w); err != nil {
1302 return err
1303 }
1304 u.Tag = w.Tag
1305 switch u.Tag {
1306 case "metadata":
1307 err = json.Unmarshal(body, &u.Metadata)
1308
1309 if err != nil {
1310 return err
1311 }
1312 case "access_error":
1313 err = json.Unmarshal(w.AccessError, &u.AccessError)
1314
1315 if err != nil {
1316 return err
1317 }
1318 }
1319 return nil
1320 }
1321
1322 // GetMetadataArgs : has no documentation (yet)
1323 type GetMetadataArgs struct {
1324 // SharedFolderId : The ID for the shared folder.
1325 SharedFolderId string `json:"shared_folder_id"`
1326 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
1327 // that should appear in the response's `SharedFolderMetadata.permissions`
1328 // field describing the actions the authenticated user can perform on the
1329 // folder.
1330 Actions []*FolderAction `json:"actions,omitempty"`
1331 }
1332
1333 // NewGetMetadataArgs returns a new GetMetadataArgs instance
1334 func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs {
1335 s := new(GetMetadataArgs)
1336 s.SharedFolderId = SharedFolderId
1337 return s
1338 }
1339
1340 // SharedLinkError : has no documentation (yet)
1341 type SharedLinkError struct {
1342 dropbox.Tagged
1343 }
1344
1345 // Valid tag values for SharedLinkError
1346 const (
1347 SharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
1348 SharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
1349 SharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
1350 SharedLinkErrorOther = "other"
1351 )
1352
1353 // GetSharedLinkFileError : has no documentation (yet)
1354 type GetSharedLinkFileError struct {
1355 dropbox.Tagged
1356 }
1357
1358 // Valid tag values for GetSharedLinkFileError
1359 const (
1360 GetSharedLinkFileErrorSharedLinkNotFound = "shared_link_not_found"
1361 GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied"
1362 GetSharedLinkFileErrorUnsupportedLinkType = "unsupported_link_type"
1363 GetSharedLinkFileErrorOther = "other"
1364 GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory"
1365 )
1366
1367 // GetSharedLinkMetadataArg : has no documentation (yet)
1368 type GetSharedLinkMetadataArg struct {
1369 // Url : URL of the shared link.
1370 Url string `json:"url"`
1371 // Path : If the shared link is to a folder, this parameter can be used to
1372 // retrieve the metadata for a specific file or sub-folder in this folder. A
1373 // relative path should be used.
1374 Path string `json:"path,omitempty"`
1375 // LinkPassword : If the shared link has a password, this parameter can be
1376 // used.
1377 LinkPassword string `json:"link_password,omitempty"`
1378 }
1379
1380 // NewGetSharedLinkMetadataArg returns a new GetSharedLinkMetadataArg instance
1381 func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg {
1382 s := new(GetSharedLinkMetadataArg)
1383 s.Url = Url
1384 return s
1385 }
1386
1387 // GetSharedLinksArg : has no documentation (yet)
1388 type GetSharedLinksArg struct {
1389 // Path : See `getSharedLinks` description.
1390 Path string `json:"path,omitempty"`
1391 }
1392
1393 // NewGetSharedLinksArg returns a new GetSharedLinksArg instance
1394 func NewGetSharedLinksArg() *GetSharedLinksArg {
1395 s := new(GetSharedLinksArg)
1396 return s
1397 }
1398
1399 // GetSharedLinksError : has no documentation (yet)
1400 type GetSharedLinksError struct {
1401 dropbox.Tagged
1402 // Path : has no documentation (yet)
1403 Path string `json:"path,omitempty"`
1404 }
1405
1406 // Valid tag values for GetSharedLinksError
1407 const (
1408 GetSharedLinksErrorPath = "path"
1409 GetSharedLinksErrorOther = "other"
1410 )
1411
1412 // UnmarshalJSON deserializes into a GetSharedLinksError instance
1413 func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error {
1414 type wrap struct {
1415 dropbox.Tagged
1416 // Path : has no documentation (yet)
1417 Path json.RawMessage `json:"path,omitempty"`
1418 }
1419 var w wrap
1420 var err error
1421 if err = json.Unmarshal(body, &w); err != nil {
1422 return err
1423 }
1424 u.Tag = w.Tag
1425 switch u.Tag {
1426 case "path":
1427 err = json.Unmarshal(body, &u.Path)
1428
1429 if err != nil {
1430 return err
1431 }
1432 }
1433 return nil
1434 }
1435
1436 // GetSharedLinksResult : has no documentation (yet)
1437 type GetSharedLinksResult struct {
1438 // Links : Shared links applicable to the path argument.
1439 Links []IsLinkMetadata `json:"links"`
1440 }
1441
1442 // NewGetSharedLinksResult returns a new GetSharedLinksResult instance
1443 func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResult {
1444 s := new(GetSharedLinksResult)
1445 s.Links = Links
1446 return s
1447 }
1448
1449 // UnmarshalJSON deserializes into a GetSharedLinksResult instance
1450 func (u *GetSharedLinksResult) UnmarshalJSON(b []byte) error {
1451 type wrap struct {
1452 // Links : Shared links applicable to the path argument.
1453 Links []json.RawMessage `json:"links"`
1454 }
1455 var w wrap
1456 if err := json.Unmarshal(b, &w); err != nil {
1457 return err
1458 }
1459 u.Links = make([]IsLinkMetadata, len(w.Links))
1460 for i, e := range w.Links {
1461 v, err := IsLinkMetadataFromJSON(e)
1462 if err != nil {
1463 return err
1464 }
1465 u.Links[i] = v
1466 }
1467 return nil
1468 }
1469
1470 // GroupInfo : The information about a group. Groups is a way to manage a list
1471 // of users who need same access permission to the shared folder.
1472 type GroupInfo struct {
1473 team_common.GroupSummary
1474 // GroupType : The type of group.
1475 GroupType *team_common.GroupType `json:"group_type"`
1476 // IsMember : If the current user is a member of the group.
1477 IsMember bool `json:"is_member"`
1478 // IsOwner : If the current user is an owner of the group.
1479 IsOwner bool `json:"is_owner"`
1480 // SameTeam : If the group is owned by the current user's team.
1481 SameTeam bool `json:"same_team"`
1482 }
1483
1484 // NewGroupInfo returns a new GroupInfo instance
1485 func NewGroupInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, GroupType *team_common.GroupType, IsMember bool, IsOwner bool, SameTeam bool) *GroupInfo {
1486 s := new(GroupInfo)
1487 s.GroupName = GroupName
1488 s.GroupId = GroupId
1489 s.GroupManagementType = GroupManagementType
1490 s.GroupType = GroupType
1491 s.IsMember = IsMember
1492 s.IsOwner = IsOwner
1493 s.SameTeam = SameTeam
1494 return s
1495 }
1496
1497 // MembershipInfo : The information about a member of the shared content.
1498 type MembershipInfo struct {
1499 // AccessType : The access type for this member. It contains inherited
1500 // access type from parent folder, and acquired access type from this
1501 // folder.
1502 AccessType *AccessLevel `json:"access_type"`
1503 // Permissions : The permissions that requesting user has on this member.
1504 // The set of permissions corresponds to the MemberActions in the request.
1505 Permissions []*MemberPermission `json:"permissions,omitempty"`
1506 // Initials : Never set.
1507 Initials string `json:"initials,omitempty"`
1508 // IsInherited : True if the member has access from a parent folder.
1509 IsInherited bool `json:"is_inherited"`
1510 }
1511
1512 // NewMembershipInfo returns a new MembershipInfo instance
1513 func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo {
1514 s := new(MembershipInfo)
1515 s.AccessType = AccessType
1516 s.IsInherited = false
1517 return s
1518 }
1519
1520 // GroupMembershipInfo : The information about a group member of the shared
1521 // content.
1522 type GroupMembershipInfo struct {
1523 MembershipInfo
1524 // Group : The information about the membership group.
1525 Group *GroupInfo `json:"group"`
1526 }
1527
1528 // NewGroupMembershipInfo returns a new GroupMembershipInfo instance
1529 func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *GroupMembershipInfo {
1530 s := new(GroupMembershipInfo)
1531 s.AccessType = AccessType
1532 s.Group = Group
1533 s.IsInherited = false
1534 return s
1535 }
1536
1537 // InsufficientPlan : has no documentation (yet)
1538 type InsufficientPlan struct {
1539 // Message : A message to tell the user to upgrade in order to support
1540 // expected action.
1541 Message string `json:"message"`
1542 // UpsellUrl : A URL to send the user to in order to obtain the account type
1543 // they need, e.g. upgrading. Absent if there is no action the user can take
1544 // to upgrade.
1545 UpsellUrl string `json:"upsell_url,omitempty"`
1546 }
1547
1548 // NewInsufficientPlan returns a new InsufficientPlan instance
1549 func NewInsufficientPlan(Message string) *InsufficientPlan {
1550 s := new(InsufficientPlan)
1551 s.Message = Message
1552 return s
1553 }
1554
1555 // InsufficientQuotaAmounts : has no documentation (yet)
1556 type InsufficientQuotaAmounts struct {
1557 // SpaceNeeded : The amount of space needed to add the item (the size of the
1558 // item).
1559 SpaceNeeded uint64 `json:"space_needed"`
1560 // SpaceShortage : The amount of extra space needed to add the item.
1561 SpaceShortage uint64 `json:"space_shortage"`
1562 // SpaceLeft : The amount of space left in the user's Dropbox, less than
1563 // space_needed.
1564 SpaceLeft uint64 `json:"space_left"`
1565 }
1566
1567 // NewInsufficientQuotaAmounts returns a new InsufficientQuotaAmounts instance
1568 func NewInsufficientQuotaAmounts(SpaceNeeded uint64, SpaceShortage uint64, SpaceLeft uint64) *InsufficientQuotaAmounts {
1569 s := new(InsufficientQuotaAmounts)
1570 s.SpaceNeeded = SpaceNeeded
1571 s.SpaceShortage = SpaceShortage
1572 s.SpaceLeft = SpaceLeft
1573 return s
1574 }
1575
1576 // InviteeInfo : Information about the recipient of a shared content invitation.
1577 type InviteeInfo struct {
1578 dropbox.Tagged
1579 // Email : E-mail address of invited user.
1580 Email string `json:"email,omitempty"`
1581 }
1582
1583 // Valid tag values for InviteeInfo
1584 const (
1585 InviteeInfoEmail = "email"
1586 InviteeInfoOther = "other"
1587 )
1588
1589 // UnmarshalJSON deserializes into a InviteeInfo instance
1590 func (u *InviteeInfo) UnmarshalJSON(body []byte) error {
1591 type wrap struct {
1592 dropbox.Tagged
1593 }
1594 var w wrap
1595 var err error
1596 if err = json.Unmarshal(body, &w); err != nil {
1597 return err
1598 }
1599 u.Tag = w.Tag
1600 switch u.Tag {
1601 case "email":
1602 err = json.Unmarshal(body, &u.Email)
1603
1604 if err != nil {
1605 return err
1606 }
1607 }
1608 return nil
1609 }
1610
1611 // InviteeMembershipInfo : Information about an invited member of a shared
1612 // content.
1613 type InviteeMembershipInfo struct {
1614 MembershipInfo
1615 // Invitee : Recipient of the invitation.
1616 Invitee *InviteeInfo `json:"invitee"`
1617 // User : The user this invitation is tied to, if available.
1618 User *UserInfo `json:"user,omitempty"`
1619 }
1620
1621 // NewInviteeMembershipInfo returns a new InviteeMembershipInfo instance
1622 func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeInfo) *InviteeMembershipInfo {
1623 s := new(InviteeMembershipInfo)
1624 s.AccessType = AccessType
1625 s.Invitee = Invitee
1626 s.IsInherited = false
1627 return s
1628 }
1629
1630 // JobError : Error occurred while performing an asynchronous job from
1631 // `unshareFolder` or `removeFolderMember`.
1632 type JobError struct {
1633 dropbox.Tagged
1634 // UnshareFolderError : Error occurred while performing `unshareFolder`
1635 // action.
1636 UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"`
1637 // RemoveFolderMemberError : Error occurred while performing
1638 // `removeFolderMember` action.
1639 RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"`
1640 // RelinquishFolderMembershipError : Error occurred while performing
1641 // `relinquishFolderMembership` action.
1642 RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"`
1643 }
1644
1645 // Valid tag values for JobError
1646 const (
1647 JobErrorUnshareFolderError = "unshare_folder_error"
1648 JobErrorRemoveFolderMemberError = "remove_folder_member_error"
1649 JobErrorRelinquishFolderMembershipError = "relinquish_folder_membership_error"
1650 JobErrorOther = "other"
1651 )
1652
1653 // UnmarshalJSON deserializes into a JobError instance
1654 func (u *JobError) UnmarshalJSON(body []byte) error {
1655 type wrap struct {
1656 dropbox.Tagged
1657 // UnshareFolderError : Error occurred while performing `unshareFolder`
1658 // action.
1659 UnshareFolderError json.RawMessage `json:"unshare_folder_error,omitempty"`
1660 // RemoveFolderMemberError : Error occurred while performing
1661 // `removeFolderMember` action.
1662 RemoveFolderMemberError json.RawMessage `json:"remove_folder_member_error,omitempty"`
1663 // RelinquishFolderMembershipError : Error occurred while performing
1664 // `relinquishFolderMembership` action.
1665 RelinquishFolderMembershipError json.RawMessage `json:"relinquish_folder_membership_error,omitempty"`
1666 }
1667 var w wrap
1668 var err error
1669 if err = json.Unmarshal(body, &w); err != nil {
1670 return err
1671 }
1672 u.Tag = w.Tag
1673 switch u.Tag {
1674 case "unshare_folder_error":
1675 err = json.Unmarshal(w.UnshareFolderError, &u.UnshareFolderError)
1676
1677 if err != nil {
1678 return err
1679 }
1680 case "remove_folder_member_error":
1681 err = json.Unmarshal(w.RemoveFolderMemberError, &u.RemoveFolderMemberError)
1682
1683 if err != nil {
1684 return err
1685 }
1686 case "relinquish_folder_membership_error":
1687 err = json.Unmarshal(w.RelinquishFolderMembershipError, &u.RelinquishFolderMembershipError)
1688
1689 if err != nil {
1690 return err
1691 }
1692 }
1693 return nil
1694 }
1695
1696 // JobStatus : has no documentation (yet)
1697 type JobStatus struct {
1698 dropbox.Tagged
1699 // Failed : The asynchronous job returned an error.
1700 Failed *JobError `json:"failed,omitempty"`
1701 }
1702
1703 // Valid tag values for JobStatus
1704 const (
1705 JobStatusInProgress = "in_progress"
1706 JobStatusComplete = "complete"
1707 JobStatusFailed = "failed"
1708 )
1709
1710 // UnmarshalJSON deserializes into a JobStatus instance
1711 func (u *JobStatus) UnmarshalJSON(body []byte) error {
1712 type wrap struct {
1713 dropbox.Tagged
1714 // Failed : The asynchronous job returned an error.
1715 Failed json.RawMessage `json:"failed,omitempty"`
1716 }
1717 var w wrap
1718 var err error
1719 if err = json.Unmarshal(body, &w); err != nil {
1720 return err
1721 }
1722 u.Tag = w.Tag
1723 switch u.Tag {
1724 case "failed":
1725 err = json.Unmarshal(w.Failed, &u.Failed)
1726
1727 if err != nil {
1728 return err
1729 }
1730 }
1731 return nil
1732 }
1733
1734 // LinkAction : Actions that can be performed on a link.
1735 type LinkAction struct {
1736 dropbox.Tagged
1737 }
1738
1739 // Valid tag values for LinkAction
1740 const (
1741 LinkActionChangeAccessLevel = "change_access_level"
1742 LinkActionChangeAudience = "change_audience"
1743 LinkActionRemoveExpiry = "remove_expiry"
1744 LinkActionRemovePassword = "remove_password"
1745 LinkActionSetExpiry = "set_expiry"
1746 LinkActionSetPassword = "set_password"
1747 LinkActionOther = "other"
1748 )
1749
1750 // LinkAudience : has no documentation (yet)
1751 type LinkAudience struct {
1752 dropbox.Tagged
1753 }
1754
1755 // Valid tag values for LinkAudience
1756 const (
1757 LinkAudiencePublic = "public"
1758 LinkAudienceTeam = "team"
1759 LinkAudienceNoOne = "no_one"
1760 LinkAudienceMembers = "members"
1761 LinkAudienceOther = "other"
1762 )
1763
1764 // LinkExpiry : has no documentation (yet)
1765 type LinkExpiry struct {
1766 dropbox.Tagged
1767 // SetExpiry : Set a new expiry or change an existing expiry.
1768 SetExpiry time.Time `json:"set_expiry,omitempty"`
1769 }
1770
1771 // Valid tag values for LinkExpiry
1772 const (
1773 LinkExpiryRemoveExpiry = "remove_expiry"
1774 LinkExpirySetExpiry = "set_expiry"
1775 LinkExpiryOther = "other"
1776 )
1777
1778 // UnmarshalJSON deserializes into a LinkExpiry instance
1779 func (u *LinkExpiry) UnmarshalJSON(body []byte) error {
1780 type wrap struct {
1781 dropbox.Tagged
1782 }
1783 var w wrap
1784 var err error
1785 if err = json.Unmarshal(body, &w); err != nil {
1786 return err
1787 }
1788 u.Tag = w.Tag
1789 switch u.Tag {
1790 case "set_expiry":
1791 err = json.Unmarshal(body, &u.SetExpiry)
1792
1793 if err != nil {
1794 return err
1795 }
1796 }
1797 return nil
1798 }
1799
1800 // LinkPassword : has no documentation (yet)
1801 type LinkPassword struct {
1802 dropbox.Tagged
1803 // SetPassword : Set a new password or change an existing password.
1804 SetPassword string `json:"set_password,omitempty"`
1805 }
1806
1807 // Valid tag values for LinkPassword
1808 const (
1809 LinkPasswordRemovePassword = "remove_password"
1810 LinkPasswordSetPassword = "set_password"
1811 LinkPasswordOther = "other"
1812 )
1813
1814 // UnmarshalJSON deserializes into a LinkPassword instance
1815 func (u *LinkPassword) UnmarshalJSON(body []byte) error {
1816 type wrap struct {
1817 dropbox.Tagged
1818 }
1819 var w wrap
1820 var err error
1821 if err = json.Unmarshal(body, &w); err != nil {
1822 return err
1823 }
1824 u.Tag = w.Tag
1825 switch u.Tag {
1826 case "set_password":
1827 err = json.Unmarshal(body, &u.SetPassword)
1828
1829 if err != nil {
1830 return err
1831 }
1832 }
1833 return nil
1834 }
1835
1836 // LinkPermission : Permissions for actions that can be performed on a link.
1837 type LinkPermission struct {
1838 // Action : has no documentation (yet)
1839 Action *LinkAction `json:"action"`
1840 // Allow : has no documentation (yet)
1841 Allow bool `json:"allow"`
1842 // Reason : has no documentation (yet)
1843 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1844 }
1845
1846 // NewLinkPermission returns a new LinkPermission instance
1847 func NewLinkPermission(Action *LinkAction, Allow bool) *LinkPermission {
1848 s := new(LinkPermission)
1849 s.Action = Action
1850 s.Allow = Allow
1851 return s
1852 }
1853
1854 // LinkPermissions : has no documentation (yet)
1855 type LinkPermissions struct {
1856 // ResolvedVisibility : The current visibility of the link after considering
1857 // the shared links policies of the the team (in case the link's owner is
1858 // part of a team) and the shared folder (in case the linked file is part of
1859 // a shared folder). This field is shown only if the caller has access to
1860 // this info (the link's owner always has access to this data).
1861 ResolvedVisibility *ResolvedVisibility `json:"resolved_visibility,omitempty"`
1862 // RequestedVisibility : The shared link's requested visibility. This can be
1863 // overridden by the team and shared folder policies. The final visibility,
1864 // after considering these policies, can be found in `resolved_visibility`.
1865 // This is shown only if the caller is the link's owner.
1866 RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
1867 // CanRevoke : Whether the caller can revoke the shared link.
1868 CanRevoke bool `json:"can_revoke"`
1869 // RevokeFailureReason : The failure reason for revoking the link. This
1870 // field will only be present if the `can_revoke` is false.
1871 RevokeFailureReason *SharedLinkAccessFailureReason `json:"revoke_failure_reason,omitempty"`
1872 }
1873
1874 // NewLinkPermissions returns a new LinkPermissions instance
1875 func NewLinkPermissions(CanRevoke bool) *LinkPermissions {
1876 s := new(LinkPermissions)
1877 s.CanRevoke = CanRevoke
1878 return s
1879 }
1880
1881 // LinkSettings : Settings that apply to a link.
1882 type LinkSettings struct {
1883 // AccessLevel : The access level on the link for this file. Currently, it
1884 // only accepts 'viewer' and 'viewer_no_comment'.
1885 AccessLevel *AccessLevel `json:"access_level,omitempty"`
1886 // Audience : The type of audience on the link for this file.
1887 Audience *LinkAudience `json:"audience,omitempty"`
1888 // Expiry : An expiry timestamp to set on a link.
1889 Expiry *LinkExpiry `json:"expiry,omitempty"`
1890 // Password : The password for the link.
1891 Password *LinkPassword `json:"password,omitempty"`
1892 }
1893
1894 // NewLinkSettings returns a new LinkSettings instance
1895 func NewLinkSettings() *LinkSettings {
1896 s := new(LinkSettings)
1897 return s
1898 }
1899
1900 // ListFileMembersArg : Arguments for `listFileMembers`.
1901 type ListFileMembersArg struct {
1902 // File : The file for which you want to see members.
1903 File string `json:"file"`
1904 // Actions : The actions for which to return permissions on a member.
1905 Actions []*MemberAction `json:"actions,omitempty"`
1906 // IncludeInherited : Whether to include members who only have access from a
1907 // parent shared folder.
1908 IncludeInherited bool `json:"include_inherited"`
1909 // Limit : Number of members to return max per query. Defaults to 100 if no
1910 // limit is specified.
1911 Limit uint32 `json:"limit"`
1912 }
1913
1914 // NewListFileMembersArg returns a new ListFileMembersArg instance
1915 func NewListFileMembersArg(File string) *ListFileMembersArg {
1916 s := new(ListFileMembersArg)
1917 s.File = File
1918 s.IncludeInherited = true
1919 s.Limit = 100
1920 return s
1921 }
1922
1923 // ListFileMembersBatchArg : Arguments for `listFileMembersBatch`.
1924 type ListFileMembersBatchArg struct {
1925 // Files : Files for which to return members.
1926 Files []string `json:"files"`
1927 // Limit : Number of members to return max per query. Defaults to 10 if no
1928 // limit is specified.
1929 Limit uint32 `json:"limit"`
1930 }
1931
1932 // NewListFileMembersBatchArg returns a new ListFileMembersBatchArg instance
1933 func NewListFileMembersBatchArg(Files []string) *ListFileMembersBatchArg {
1934 s := new(ListFileMembersBatchArg)
1935 s.Files = Files
1936 s.Limit = 10
1937 return s
1938 }
1939
1940 // ListFileMembersBatchResult : Per-file result for `listFileMembersBatch`.
1941 type ListFileMembersBatchResult struct {
1942 // File : This is the input file identifier, whether an ID or a path.
1943 File string `json:"file"`
1944 // Result : The result for this particular file.
1945 Result *ListFileMembersIndividualResult `json:"result"`
1946 }
1947
1948 // NewListFileMembersBatchResult returns a new ListFileMembersBatchResult instance
1949 func NewListFileMembersBatchResult(File string, Result *ListFileMembersIndividualResult) *ListFileMembersBatchResult {
1950 s := new(ListFileMembersBatchResult)
1951 s.File = File
1952 s.Result = Result
1953 return s
1954 }
1955
1956 // ListFileMembersContinueArg : Arguments for `listFileMembersContinue`.
1957 type ListFileMembersContinueArg struct {
1958 // Cursor : The cursor returned by your last call to `listFileMembers`,
1959 // `listFileMembersContinue`, or `listFileMembersBatch`.
1960 Cursor string `json:"cursor"`
1961 }
1962
1963 // NewListFileMembersContinueArg returns a new ListFileMembersContinueArg instance
1964 func NewListFileMembersContinueArg(Cursor string) *ListFileMembersContinueArg {
1965 s := new(ListFileMembersContinueArg)
1966 s.Cursor = Cursor
1967 return s
1968 }
1969
1970 // ListFileMembersContinueError : Error for `listFileMembersContinue`.
1971 type ListFileMembersContinueError struct {
1972 dropbox.Tagged
1973 // UserError : has no documentation (yet)
1974 UserError *SharingUserError `json:"user_error,omitempty"`
1975 // AccessError : has no documentation (yet)
1976 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1977 }
1978
1979 // Valid tag values for ListFileMembersContinueError
1980 const (
1981 ListFileMembersContinueErrorUserError = "user_error"
1982 ListFileMembersContinueErrorAccessError = "access_error"
1983 ListFileMembersContinueErrorInvalidCursor = "invalid_cursor"
1984 ListFileMembersContinueErrorOther = "other"
1985 )
1986
1987 // UnmarshalJSON deserializes into a ListFileMembersContinueError instance
1988 func (u *ListFileMembersContinueError) UnmarshalJSON(body []byte) error {
1989 type wrap struct {
1990 dropbox.Tagged
1991 // UserError : has no documentation (yet)
1992 UserError json.RawMessage `json:"user_error,omitempty"`
1993 // AccessError : has no documentation (yet)
1994 AccessError json.RawMessage `json:"access_error,omitempty"`
1995 }
1996 var w wrap
1997 var err error
1998 if err = json.Unmarshal(body, &w); err != nil {
1999 return err
2000 }
2001 u.Tag = w.Tag
2002 switch u.Tag {
2003 case "user_error":
2004 err = json.Unmarshal(w.UserError, &u.UserError)
2005
2006 if err != nil {
2007 return err
2008 }
2009 case "access_error":
2010 err = json.Unmarshal(w.AccessError, &u.AccessError)
2011
2012 if err != nil {
2013 return err
2014 }
2015 }
2016 return nil
2017 }
2018
2019 // ListFileMembersCountResult : has no documentation (yet)
2020 type ListFileMembersCountResult struct {
2021 // Members : A list of members on this file.
2022 Members *SharedFileMembers `json:"members"`
2023 // MemberCount : The number of members on this file. This does not include
2024 // inherited members.
2025 MemberCount uint32 `json:"member_count"`
2026 }
2027
2028 // NewListFileMembersCountResult returns a new ListFileMembersCountResult instance
2029 func NewListFileMembersCountResult(Members *SharedFileMembers, MemberCount uint32) *ListFileMembersCountResult {
2030 s := new(ListFileMembersCountResult)
2031 s.Members = Members
2032 s.MemberCount = MemberCount
2033 return s
2034 }
2035
2036 // ListFileMembersError : Error for `listFileMembers`.
2037 type ListFileMembersError struct {
2038 dropbox.Tagged
2039 // UserError : has no documentation (yet)
2040 UserError *SharingUserError `json:"user_error,omitempty"`
2041 // AccessError : has no documentation (yet)
2042 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2043 }
2044
2045 // Valid tag values for ListFileMembersError
2046 const (
2047 ListFileMembersErrorUserError = "user_error"
2048 ListFileMembersErrorAccessError = "access_error"
2049 ListFileMembersErrorOther = "other"
2050 )
2051
2052 // UnmarshalJSON deserializes into a ListFileMembersError instance
2053 func (u *ListFileMembersError) UnmarshalJSON(body []byte) error {
2054 type wrap struct {
2055 dropbox.Tagged
2056 // UserError : has no documentation (yet)
2057 UserError json.RawMessage `json:"user_error,omitempty"`
2058 // AccessError : has no documentation (yet)
2059 AccessError json.RawMessage `json:"access_error,omitempty"`
2060 }
2061 var w wrap
2062 var err error
2063 if err = json.Unmarshal(body, &w); err != nil {
2064 return err
2065 }
2066 u.Tag = w.Tag
2067 switch u.Tag {
2068 case "user_error":
2069 err = json.Unmarshal(w.UserError, &u.UserError)
2070
2071 if err != nil {
2072 return err
2073 }
2074 case "access_error":
2075 err = json.Unmarshal(w.AccessError, &u.AccessError)
2076
2077 if err != nil {
2078 return err
2079 }
2080 }
2081 return nil
2082 }
2083
2084 // ListFileMembersIndividualResult : has no documentation (yet)
2085 type ListFileMembersIndividualResult struct {
2086 dropbox.Tagged
2087 // Result : The results of the query for this file if it was successful.
2088 Result *ListFileMembersCountResult `json:"result,omitempty"`
2089 // AccessError : The result of the query for this file if it was an error.
2090 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2091 }
2092
2093 // Valid tag values for ListFileMembersIndividualResult
2094 const (
2095 ListFileMembersIndividualResultResult = "result"
2096 ListFileMembersIndividualResultAccessError = "access_error"
2097 ListFileMembersIndividualResultOther = "other"
2098 )
2099
2100 // UnmarshalJSON deserializes into a ListFileMembersIndividualResult instance
2101 func (u *ListFileMembersIndividualResult) UnmarshalJSON(body []byte) error {
2102 type wrap struct {
2103 dropbox.Tagged
2104 // Result : The results of the query for this file if it was successful.
2105 Result json.RawMessage `json:"result,omitempty"`
2106 // AccessError : The result of the query for this file if it was an
2107 // error.
2108 AccessError json.RawMessage `json:"access_error,omitempty"`
2109 }
2110 var w wrap
2111 var err error
2112 if err = json.Unmarshal(body, &w); err != nil {
2113 return err
2114 }
2115 u.Tag = w.Tag
2116 switch u.Tag {
2117 case "result":
2118 err = json.Unmarshal(body, &u.Result)
2119
2120 if err != nil {
2121 return err
2122 }
2123 case "access_error":
2124 err = json.Unmarshal(w.AccessError, &u.AccessError)
2125
2126 if err != nil {
2127 return err
2128 }
2129 }
2130 return nil
2131 }
2132
2133 // ListFilesArg : Arguments for `listReceivedFiles`.
2134 type ListFilesArg struct {
2135 // Limit : Number of files to return max per query. Defaults to 100 if no
2136 // limit is specified.
2137 Limit uint32 `json:"limit"`
2138 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
2139 // should appear in the response's `SharedFileMetadata.permissions` field
2140 // describing the actions the authenticated user can perform on the file.
2141 Actions []*FileAction `json:"actions,omitempty"`
2142 }
2143
2144 // NewListFilesArg returns a new ListFilesArg instance
2145 func NewListFilesArg() *ListFilesArg {
2146 s := new(ListFilesArg)
2147 s.Limit = 100
2148 return s
2149 }
2150
2151 // ListFilesContinueArg : Arguments for `listReceivedFilesContinue`.
2152 type ListFilesContinueArg struct {
2153 // Cursor : Cursor in `ListFilesResult.cursor`.
2154 Cursor string `json:"cursor"`
2155 }
2156
2157 // NewListFilesContinueArg returns a new ListFilesContinueArg instance
2158 func NewListFilesContinueArg(Cursor string) *ListFilesContinueArg {
2159 s := new(ListFilesContinueArg)
2160 s.Cursor = Cursor
2161 return s
2162 }
2163
2164 // ListFilesContinueError : Error results for `listReceivedFilesContinue`.
2165 type ListFilesContinueError struct {
2166 dropbox.Tagged
2167 // UserError : User account had a problem.
2168 UserError *SharingUserError `json:"user_error,omitempty"`
2169 }
2170
2171 // Valid tag values for ListFilesContinueError
2172 const (
2173 ListFilesContinueErrorUserError = "user_error"
2174 ListFilesContinueErrorInvalidCursor = "invalid_cursor"
2175 ListFilesContinueErrorOther = "other"
2176 )
2177
2178 // UnmarshalJSON deserializes into a ListFilesContinueError instance
2179 func (u *ListFilesContinueError) UnmarshalJSON(body []byte) error {
2180 type wrap struct {
2181 dropbox.Tagged
2182 // UserError : User account had a problem.
2183 UserError json.RawMessage `json:"user_error,omitempty"`
2184 }
2185 var w wrap
2186 var err error
2187 if err = json.Unmarshal(body, &w); err != nil {
2188 return err
2189 }
2190 u.Tag = w.Tag
2191 switch u.Tag {
2192 case "user_error":
2193 err = json.Unmarshal(w.UserError, &u.UserError)
2194
2195 if err != nil {
2196 return err
2197 }
2198 }
2199 return nil
2200 }
2201
2202 // ListFilesResult : Success results for `listReceivedFiles`.
2203 type ListFilesResult struct {
2204 // Entries : Information about the files shared with current user.
2205 Entries []*SharedFileMetadata `json:"entries"`
2206 // Cursor : Cursor used to obtain additional shared files.
2207 Cursor string `json:"cursor,omitempty"`
2208 }
2209
2210 // NewListFilesResult returns a new ListFilesResult instance
2211 func NewListFilesResult(Entries []*SharedFileMetadata) *ListFilesResult {
2212 s := new(ListFilesResult)
2213 s.Entries = Entries
2214 return s
2215 }
2216
2217 // ListFolderMembersCursorArg : has no documentation (yet)
2218 type ListFolderMembersCursorArg struct {
2219 // Actions : This is a list indicating whether each returned member will
2220 // include a boolean value `MemberPermission.allow` that describes whether
2221 // the current user can perform the MemberAction on the member.
2222 Actions []*MemberAction `json:"actions,omitempty"`
2223 // Limit : The maximum number of results that include members, groups and
2224 // invitees to return per request.
2225 Limit uint32 `json:"limit"`
2226 }
2227
2228 // NewListFolderMembersCursorArg returns a new ListFolderMembersCursorArg instance
2229 func NewListFolderMembersCursorArg() *ListFolderMembersCursorArg {
2230 s := new(ListFolderMembersCursorArg)
2231 s.Limit = 1000
2232 return s
2233 }
2234
2235 // ListFolderMembersArgs : has no documentation (yet)
2236 type ListFolderMembersArgs struct {
2237 ListFolderMembersCursorArg
2238 // SharedFolderId : The ID for the shared folder.
2239 SharedFolderId string `json:"shared_folder_id"`
2240 }
2241
2242 // NewListFolderMembersArgs returns a new ListFolderMembersArgs instance
2243 func NewListFolderMembersArgs(SharedFolderId string) *ListFolderMembersArgs {
2244 s := new(ListFolderMembersArgs)
2245 s.SharedFolderId = SharedFolderId
2246 s.Limit = 1000
2247 return s
2248 }
2249
2250 // ListFolderMembersContinueArg : has no documentation (yet)
2251 type ListFolderMembersContinueArg struct {
2252 // Cursor : The cursor returned by your last call to `listFolderMembers` or
2253 // `listFolderMembersContinue`.
2254 Cursor string `json:"cursor"`
2255 }
2256
2257 // NewListFolderMembersContinueArg returns a new ListFolderMembersContinueArg instance
2258 func NewListFolderMembersContinueArg(Cursor string) *ListFolderMembersContinueArg {
2259 s := new(ListFolderMembersContinueArg)
2260 s.Cursor = Cursor
2261 return s
2262 }
2263
2264 // ListFolderMembersContinueError : has no documentation (yet)
2265 type ListFolderMembersContinueError struct {
2266 dropbox.Tagged
2267 // AccessError : has no documentation (yet)
2268 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2269 }
2270
2271 // Valid tag values for ListFolderMembersContinueError
2272 const (
2273 ListFolderMembersContinueErrorAccessError = "access_error"
2274 ListFolderMembersContinueErrorInvalidCursor = "invalid_cursor"
2275 ListFolderMembersContinueErrorOther = "other"
2276 )
2277
2278 // UnmarshalJSON deserializes into a ListFolderMembersContinueError instance
2279 func (u *ListFolderMembersContinueError) UnmarshalJSON(body []byte) error {
2280 type wrap struct {
2281 dropbox.Tagged
2282 // AccessError : has no documentation (yet)
2283 AccessError json.RawMessage `json:"access_error,omitempty"`
2284 }
2285 var w wrap
2286 var err error
2287 if err = json.Unmarshal(body, &w); err != nil {
2288 return err
2289 }
2290 u.Tag = w.Tag
2291 switch u.Tag {
2292 case "access_error":
2293 err = json.Unmarshal(w.AccessError, &u.AccessError)
2294
2295 if err != nil {
2296 return err
2297 }
2298 }
2299 return nil
2300 }
2301
2302 // ListFoldersArgs : has no documentation (yet)
2303 type ListFoldersArgs struct {
2304 // Limit : The maximum number of results to return per request.
2305 Limit uint32 `json:"limit"`
2306 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
2307 // that should appear in the response's `SharedFolderMetadata.permissions`
2308 // field describing the actions the authenticated user can perform on the
2309 // folder.
2310 Actions []*FolderAction `json:"actions,omitempty"`
2311 }
2312
2313 // NewListFoldersArgs returns a new ListFoldersArgs instance
2314 func NewListFoldersArgs() *ListFoldersArgs {
2315 s := new(ListFoldersArgs)
2316 s.Limit = 1000
2317 return s
2318 }
2319
2320 // ListFoldersContinueArg : has no documentation (yet)
2321 type ListFoldersContinueArg struct {
2322 // Cursor : The cursor returned by the previous API call specified in the
2323 // endpoint description.
2324 Cursor string `json:"cursor"`
2325 }
2326
2327 // NewListFoldersContinueArg returns a new ListFoldersContinueArg instance
2328 func NewListFoldersContinueArg(Cursor string) *ListFoldersContinueArg {
2329 s := new(ListFoldersContinueArg)
2330 s.Cursor = Cursor
2331 return s
2332 }
2333
2334 // ListFoldersContinueError : has no documentation (yet)
2335 type ListFoldersContinueError struct {
2336 dropbox.Tagged
2337 }
2338
2339 // Valid tag values for ListFoldersContinueError
2340 const (
2341 ListFoldersContinueErrorInvalidCursor = "invalid_cursor"
2342 ListFoldersContinueErrorOther = "other"
2343 )
2344
2345 // ListFoldersResult : Result for `listFolders` or `listMountableFolders`,
2346 // depending on which endpoint was requested. Unmounted shared folders can be
2347 // identified by the absence of `SharedFolderMetadata.path_lower`.
2348 type ListFoldersResult struct {
2349 // Entries : List of all shared folders the authenticated user has access
2350 // to.
2351 Entries []*SharedFolderMetadata `json:"entries"`
2352 // Cursor : Present if there are additional shared folders that have not
2353 // been returned yet. Pass the cursor into the corresponding continue
2354 // endpoint (either `listFoldersContinue` or `listMountableFoldersContinue`)
2355 // to list additional folders.
2356 Cursor string `json:"cursor,omitempty"`
2357 }
2358
2359 // NewListFoldersResult returns a new ListFoldersResult instance
2360 func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult {
2361 s := new(ListFoldersResult)
2362 s.Entries = Entries
2363 return s
2364 }
2365
2366 // ListSharedLinksArg : has no documentation (yet)
2367 type ListSharedLinksArg struct {
2368 // Path : See `listSharedLinks` description.
2369 Path string `json:"path,omitempty"`
2370 // Cursor : The cursor returned by your last call to `listSharedLinks`.
2371 Cursor string `json:"cursor,omitempty"`
2372 // DirectOnly : See `listSharedLinks` description.
2373 DirectOnly bool `json:"direct_only,omitempty"`
2374 }
2375
2376 // NewListSharedLinksArg returns a new ListSharedLinksArg instance
2377 func NewListSharedLinksArg() *ListSharedLinksArg {
2378 s := new(ListSharedLinksArg)
2379 return s
2380 }
2381
2382 // ListSharedLinksError : has no documentation (yet)
2383 type ListSharedLinksError struct {
2384 dropbox.Tagged
2385 // Path : has no documentation (yet)
2386 Path *files.LookupError `json:"path,omitempty"`
2387 }
2388
2389 // Valid tag values for ListSharedLinksError
2390 const (
2391 ListSharedLinksErrorPath = "path"
2392 ListSharedLinksErrorReset = "reset"
2393 ListSharedLinksErrorOther = "other"
2394 )
2395
2396 // UnmarshalJSON deserializes into a ListSharedLinksError instance
2397 func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error {
2398 type wrap struct {
2399 dropbox.Tagged
2400 // Path : has no documentation (yet)
2401 Path json.RawMessage `json:"path,omitempty"`
2402 }
2403 var w wrap
2404 var err error
2405 if err = json.Unmarshal(body, &w); err != nil {
2406 return err
2407 }
2408 u.Tag = w.Tag
2409 switch u.Tag {
2410 case "path":
2411 err = json.Unmarshal(w.Path, &u.Path)
2412
2413 if err != nil {
2414 return err
2415 }
2416 }
2417 return nil
2418 }
2419
2420 // ListSharedLinksResult : has no documentation (yet)
2421 type ListSharedLinksResult struct {
2422 // Links : Shared links applicable to the path argument.
2423 Links []IsSharedLinkMetadata `json:"links"`
2424 // HasMore : Is true if there are additional shared links that have not been
2425 // returned yet. Pass the cursor into `listSharedLinks` to retrieve them.
2426 HasMore bool `json:"has_more"`
2427 // Cursor : Pass the cursor into `listSharedLinks` to obtain the additional
2428 // links. Cursor is returned only if no path is given.
2429 Cursor string `json:"cursor,omitempty"`
2430 }
2431
2432 // NewListSharedLinksResult returns a new ListSharedLinksResult instance
2433 func NewListSharedLinksResult(Links []IsSharedLinkMetadata, HasMore bool) *ListSharedLinksResult {
2434 s := new(ListSharedLinksResult)
2435 s.Links = Links
2436 s.HasMore = HasMore
2437 return s
2438 }
2439
2440 // UnmarshalJSON deserializes into a ListSharedLinksResult instance
2441 func (u *ListSharedLinksResult) UnmarshalJSON(b []byte) error {
2442 type wrap struct {
2443 // Links : Shared links applicable to the path argument.
2444 Links []json.RawMessage `json:"links"`
2445 // HasMore : Is true if there are additional shared links that have not
2446 // been returned yet. Pass the cursor into `listSharedLinks` to retrieve
2447 // them.
2448 HasMore bool `json:"has_more"`
2449 // Cursor : Pass the cursor into `listSharedLinks` to obtain the
2450 // additional links. Cursor is returned only if no path is given.
2451 Cursor string `json:"cursor,omitempty"`
2452 }
2453 var w wrap
2454 if err := json.Unmarshal(b, &w); err != nil {
2455 return err
2456 }
2457 u.Links = make([]IsSharedLinkMetadata, len(w.Links))
2458 for i, e := range w.Links {
2459 v, err := IsSharedLinkMetadataFromJSON(e)
2460 if err != nil {
2461 return err
2462 }
2463 u.Links[i] = v
2464 }
2465 u.HasMore = w.HasMore
2466 u.Cursor = w.Cursor
2467 return nil
2468 }
2469
2470 // MemberAccessLevelResult : Contains information about a member's access level
2471 // to content after an operation.
2472 type MemberAccessLevelResult struct {
2473 // AccessLevel : The member still has this level of access to the content
2474 // through a parent folder.
2475 AccessLevel *AccessLevel `json:"access_level,omitempty"`
2476 // Warning : A localized string with additional information about why the
2477 // user has this access level to the content.
2478 Warning string `json:"warning,omitempty"`
2479 // AccessDetails : The parent folders that a member has access to. The field
2480 // is present if the user has access to the first parent folder where the
2481 // member gains access.
2482 AccessDetails []*ParentFolderAccessInfo `json:"access_details,omitempty"`
2483 }
2484
2485 // NewMemberAccessLevelResult returns a new MemberAccessLevelResult instance
2486 func NewMemberAccessLevelResult() *MemberAccessLevelResult {
2487 s := new(MemberAccessLevelResult)
2488 return s
2489 }
2490
2491 // MemberAction : Actions that may be taken on members of a shared folder.
2492 type MemberAction struct {
2493 dropbox.Tagged
2494 }
2495
2496 // Valid tag values for MemberAction
2497 const (
2498 MemberActionLeaveACopy = "leave_a_copy"
2499 MemberActionMakeEditor = "make_editor"
2500 MemberActionMakeOwner = "make_owner"
2501 MemberActionMakeViewer = "make_viewer"
2502 MemberActionMakeViewerNoComment = "make_viewer_no_comment"
2503 MemberActionRemove = "remove"
2504 MemberActionOther = "other"
2505 )
2506
2507 // MemberPermission : Whether the user is allowed to take the action on the
2508 // associated member.
2509 type MemberPermission struct {
2510 // Action : The action that the user may wish to take on the member.
2511 Action *MemberAction `json:"action"`
2512 // Allow : True if the user is allowed to take the action.
2513 Allow bool `json:"allow"`
2514 // Reason : The reason why the user is denied the permission. Not present if
2515 // the action is allowed.
2516 Reason *PermissionDeniedReason `json:"reason,omitempty"`
2517 }
2518
2519 // NewMemberPermission returns a new MemberPermission instance
2520 func NewMemberPermission(Action *MemberAction, Allow bool) *MemberPermission {
2521 s := new(MemberPermission)
2522 s.Action = Action
2523 s.Allow = Allow
2524 return s
2525 }
2526
2527 // MemberPolicy : Policy governing who can be a member of a shared folder. Only
2528 // applicable to folders owned by a user on a team.
2529 type MemberPolicy struct {
2530 dropbox.Tagged
2531 }
2532
2533 // Valid tag values for MemberPolicy
2534 const (
2535 MemberPolicyTeam = "team"
2536 MemberPolicyAnyone = "anyone"
2537 MemberPolicyOther = "other"
2538 )
2539
2540 // MemberSelector : Includes different ways to identify a member of a shared
2541 // folder.
2542 type MemberSelector struct {
2543 dropbox.Tagged
2544 // DropboxId : Dropbox account, team member, or group ID of member.
2545 DropboxId string `json:"dropbox_id,omitempty"`
2546 // Email : E-mail address of member.
2547 Email string `json:"email,omitempty"`
2548 }
2549
2550 // Valid tag values for MemberSelector
2551 const (
2552 MemberSelectorDropboxId = "dropbox_id"
2553 MemberSelectorEmail = "email"
2554 MemberSelectorOther = "other"
2555 )
2556
2557 // UnmarshalJSON deserializes into a MemberSelector instance
2558 func (u *MemberSelector) UnmarshalJSON(body []byte) error {
2559 type wrap struct {
2560 dropbox.Tagged
2561 }
2562 var w wrap
2563 var err error
2564 if err = json.Unmarshal(body, &w); err != nil {
2565 return err
2566 }
2567 u.Tag = w.Tag
2568 switch u.Tag {
2569 case "dropbox_id":
2570 err = json.Unmarshal(body, &u.DropboxId)
2571
2572 if err != nil {
2573 return err
2574 }
2575 case "email":
2576 err = json.Unmarshal(body, &u.Email)
2577
2578 if err != nil {
2579 return err
2580 }
2581 }
2582 return nil
2583 }
2584
2585 // ModifySharedLinkSettingsArgs : has no documentation (yet)
2586 type ModifySharedLinkSettingsArgs struct {
2587 // Url : URL of the shared link to change its settings.
2588 Url string `json:"url"`
2589 // Settings : Set of settings for the shared link.
2590 Settings *SharedLinkSettings `json:"settings"`
2591 // RemoveExpiration : If set to true, removes the expiration of the shared
2592 // link.
2593 RemoveExpiration bool `json:"remove_expiration"`
2594 }
2595
2596 // NewModifySharedLinkSettingsArgs returns a new ModifySharedLinkSettingsArgs instance
2597 func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs {
2598 s := new(ModifySharedLinkSettingsArgs)
2599 s.Url = Url
2600 s.Settings = Settings
2601 s.RemoveExpiration = false
2602 return s
2603 }
2604
2605 // ModifySharedLinkSettingsError : has no documentation (yet)
2606 type ModifySharedLinkSettingsError struct {
2607 dropbox.Tagged
2608 // SettingsError : There is an error with the given settings.
2609 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
2610 }
2611
2612 // Valid tag values for ModifySharedLinkSettingsError
2613 const (
2614 ModifySharedLinkSettingsErrorSharedLinkNotFound = "shared_link_not_found"
2615 ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied"
2616 ModifySharedLinkSettingsErrorUnsupportedLinkType = "unsupported_link_type"
2617 ModifySharedLinkSettingsErrorOther = "other"
2618 ModifySharedLinkSettingsErrorSettingsError = "settings_error"
2619 ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
2620 )
2621
2622 // UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
2623 func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error {
2624 type wrap struct {
2625 dropbox.Tagged
2626 // SettingsError : There is an error with the given settings.
2627 SettingsError json.RawMessage `json:"settings_error,omitempty"`
2628 }
2629 var w wrap
2630 var err error
2631 if err = json.Unmarshal(body, &w); err != nil {
2632 return err
2633 }
2634 u.Tag = w.Tag
2635 switch u.Tag {
2636 case "settings_error":
2637 err = json.Unmarshal(w.SettingsError, &u.SettingsError)
2638
2639 if err != nil {
2640 return err
2641 }
2642 }
2643 return nil
2644 }
2645
2646 // MountFolderArg : has no documentation (yet)
2647 type MountFolderArg struct {
2648 // SharedFolderId : The ID of the shared folder to mount.
2649 SharedFolderId string `json:"shared_folder_id"`
2650 }
2651
2652 // NewMountFolderArg returns a new MountFolderArg instance
2653 func NewMountFolderArg(SharedFolderId string) *MountFolderArg {
2654 s := new(MountFolderArg)
2655 s.SharedFolderId = SharedFolderId
2656 return s
2657 }
2658
2659 // MountFolderError : has no documentation (yet)
2660 type MountFolderError struct {
2661 dropbox.Tagged
2662 // AccessError : has no documentation (yet)
2663 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2664 // InsufficientQuota : The current user does not have enough space to mount
2665 // the shared folder.
2666 InsufficientQuota *InsufficientQuotaAmounts `json:"insufficient_quota,omitempty"`
2667 }
2668
2669 // Valid tag values for MountFolderError
2670 const (
2671 MountFolderErrorAccessError = "access_error"
2672 MountFolderErrorInsideSharedFolder = "inside_shared_folder"
2673 MountFolderErrorInsufficientQuota = "insufficient_quota"
2674 MountFolderErrorAlreadyMounted = "already_mounted"
2675 MountFolderErrorNoPermission = "no_permission"
2676 MountFolderErrorNotMountable = "not_mountable"
2677 MountFolderErrorOther = "other"
2678 )
2679
2680 // UnmarshalJSON deserializes into a MountFolderError instance
2681 func (u *MountFolderError) UnmarshalJSON(body []byte) error {
2682 type wrap struct {
2683 dropbox.Tagged
2684 // AccessError : has no documentation (yet)
2685 AccessError json.RawMessage `json:"access_error,omitempty"`
2686 // InsufficientQuota : The current user does not have enough space to
2687 // mount the shared folder.
2688 InsufficientQuota json.RawMessage `json:"insufficient_quota,omitempty"`
2689 }
2690 var w wrap
2691 var err error
2692 if err = json.Unmarshal(body, &w); err != nil {
2693 return err
2694 }
2695 u.Tag = w.Tag
2696 switch u.Tag {
2697 case "access_error":
2698 err = json.Unmarshal(w.AccessError, &u.AccessError)
2699
2700 if err != nil {
2701 return err
2702 }
2703 case "insufficient_quota":
2704 err = json.Unmarshal(body, &u.InsufficientQuota)
2705
2706 if err != nil {
2707 return err
2708 }
2709 }
2710 return nil
2711 }
2712
2713 // ParentFolderAccessInfo : Contains information about a parent folder that a
2714 // member has access to.
2715 type ParentFolderAccessInfo struct {
2716 // FolderName : Display name for the folder.
2717 FolderName string `json:"folder_name"`
2718 // SharedFolderId : The identifier of the parent shared folder.
2719 SharedFolderId string `json:"shared_folder_id"`
2720 // Permissions : The user's permissions for the parent shared folder.
2721 Permissions []*MemberPermission `json:"permissions"`
2722 // Path : The full path to the parent shared folder relative to the acting
2723 // user's root.
2724 Path string `json:"path"`
2725 }
2726
2727 // NewParentFolderAccessInfo returns a new ParentFolderAccessInfo instance
2728 func NewParentFolderAccessInfo(FolderName string, SharedFolderId string, Permissions []*MemberPermission, Path string) *ParentFolderAccessInfo {
2729 s := new(ParentFolderAccessInfo)
2730 s.FolderName = FolderName
2731 s.SharedFolderId = SharedFolderId
2732 s.Permissions = Permissions
2733 s.Path = Path
2734 return s
2735 }
2736
2737 // PathLinkMetadata : Metadata for a path-based shared link.
2738 type PathLinkMetadata struct {
2739 LinkMetadata
2740 // Path : Path in user's Dropbox.
2741 Path string `json:"path"`
2742 }
2743
2744 // NewPathLinkMetadata returns a new PathLinkMetadata instance
2745 func NewPathLinkMetadata(Url string, Visibility *Visibility, Path string) *PathLinkMetadata {
2746 s := new(PathLinkMetadata)
2747 s.Url = Url
2748 s.Visibility = Visibility
2749 s.Path = Path
2750 return s
2751 }
2752
2753 // PendingUploadMode : Flag to indicate pending upload default (for linking to
2754 // not-yet-existing paths).
2755 type PendingUploadMode struct {
2756 dropbox.Tagged
2757 }
2758
2759 // Valid tag values for PendingUploadMode
2760 const (
2761 PendingUploadModeFile = "file"
2762 PendingUploadModeFolder = "folder"
2763 )
2764
2765 // PermissionDeniedReason : Possible reasons the user is denied a permission.
2766 type PermissionDeniedReason struct {
2767 dropbox.Tagged
2768 // InsufficientPlan : has no documentation (yet)
2769 InsufficientPlan *InsufficientPlan `json:"insufficient_plan,omitempty"`
2770 }
2771
2772 // Valid tag values for PermissionDeniedReason
2773 const (
2774 PermissionDeniedReasonUserNotSameTeamAsOwner = "user_not_same_team_as_owner"
2775 PermissionDeniedReasonUserNotAllowedByOwner = "user_not_allowed_by_owner"
2776 PermissionDeniedReasonTargetIsIndirectMember = "target_is_indirect_member"
2777 PermissionDeniedReasonTargetIsOwner = "target_is_owner"
2778 PermissionDeniedReasonTargetIsSelf = "target_is_self"
2779 PermissionDeniedReasonTargetNotActive = "target_not_active"
2780 PermissionDeniedReasonFolderIsLimitedTeamFolder = "folder_is_limited_team_folder"
2781 PermissionDeniedReasonOwnerNotOnTeam = "owner_not_on_team"
2782 PermissionDeniedReasonPermissionDenied = "permission_denied"
2783 PermissionDeniedReasonRestrictedByTeam = "restricted_by_team"
2784 PermissionDeniedReasonUserAccountType = "user_account_type"
2785 PermissionDeniedReasonUserNotOnTeam = "user_not_on_team"
2786 PermissionDeniedReasonFolderIsInsideSharedFolder = "folder_is_inside_shared_folder"
2787 PermissionDeniedReasonRestrictedByParentFolder = "restricted_by_parent_folder"
2788 PermissionDeniedReasonInsufficientPlan = "insufficient_plan"
2789 PermissionDeniedReasonOther = "other"
2790 )
2791
2792 // UnmarshalJSON deserializes into a PermissionDeniedReason instance
2793 func (u *PermissionDeniedReason) UnmarshalJSON(body []byte) error {
2794 type wrap struct {
2795 dropbox.Tagged
2796 // InsufficientPlan : has no documentation (yet)
2797 InsufficientPlan json.RawMessage `json:"insufficient_plan,omitempty"`
2798 }
2799 var w wrap
2800 var err error
2801 if err = json.Unmarshal(body, &w); err != nil {
2802 return err
2803 }
2804 u.Tag = w.Tag
2805 switch u.Tag {
2806 case "insufficient_plan":
2807 err = json.Unmarshal(body, &u.InsufficientPlan)
2808
2809 if err != nil {
2810 return err
2811 }
2812 }
2813 return nil
2814 }
2815
2816 // RelinquishFileMembershipArg : has no documentation (yet)
2817 type RelinquishFileMembershipArg struct {
2818 // File : The path or id for the file.
2819 File string `json:"file"`
2820 }
2821
2822 // NewRelinquishFileMembershipArg returns a new RelinquishFileMembershipArg instance
2823 func NewRelinquishFileMembershipArg(File string) *RelinquishFileMembershipArg {
2824 s := new(RelinquishFileMembershipArg)
2825 s.File = File
2826 return s
2827 }
2828
2829 // RelinquishFileMembershipError : has no documentation (yet)
2830 type RelinquishFileMembershipError struct {
2831 dropbox.Tagged
2832 // AccessError : has no documentation (yet)
2833 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2834 }
2835
2836 // Valid tag values for RelinquishFileMembershipError
2837 const (
2838 RelinquishFileMembershipErrorAccessError = "access_error"
2839 RelinquishFileMembershipErrorGroupAccess = "group_access"
2840 RelinquishFileMembershipErrorNoPermission = "no_permission"
2841 RelinquishFileMembershipErrorOther = "other"
2842 )
2843
2844 // UnmarshalJSON deserializes into a RelinquishFileMembershipError instance
2845 func (u *RelinquishFileMembershipError) UnmarshalJSON(body []byte) error {
2846 type wrap struct {
2847 dropbox.Tagged
2848 // AccessError : has no documentation (yet)
2849 AccessError json.RawMessage `json:"access_error,omitempty"`
2850 }
2851 var w wrap
2852 var err error
2853 if err = json.Unmarshal(body, &w); err != nil {
2854 return err
2855 }
2856 u.Tag = w.Tag
2857 switch u.Tag {
2858 case "access_error":
2859 err = json.Unmarshal(w.AccessError, &u.AccessError)
2860
2861 if err != nil {
2862 return err
2863 }
2864 }
2865 return nil
2866 }
2867
2868 // RelinquishFolderMembershipArg : has no documentation (yet)
2869 type RelinquishFolderMembershipArg struct {
2870 // SharedFolderId : The ID for the shared folder.
2871 SharedFolderId string `json:"shared_folder_id"`
2872 // LeaveACopy : Keep a copy of the folder's contents upon relinquishing
2873 // membership.
2874 LeaveACopy bool `json:"leave_a_copy"`
2875 }
2876
2877 // NewRelinquishFolderMembershipArg returns a new RelinquishFolderMembershipArg instance
2878 func NewRelinquishFolderMembershipArg(SharedFolderId string) *RelinquishFolderMembershipArg {
2879 s := new(RelinquishFolderMembershipArg)
2880 s.SharedFolderId = SharedFolderId
2881 s.LeaveACopy = false
2882 return s
2883 }
2884
2885 // RelinquishFolderMembershipError : has no documentation (yet)
2886 type RelinquishFolderMembershipError struct {
2887 dropbox.Tagged
2888 // AccessError : has no documentation (yet)
2889 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2890 }
2891
2892 // Valid tag values for RelinquishFolderMembershipError
2893 const (
2894 RelinquishFolderMembershipErrorAccessError = "access_error"
2895 RelinquishFolderMembershipErrorFolderOwner = "folder_owner"
2896 RelinquishFolderMembershipErrorMounted = "mounted"
2897 RelinquishFolderMembershipErrorGroupAccess = "group_access"
2898 RelinquishFolderMembershipErrorTeamFolder = "team_folder"
2899 RelinquishFolderMembershipErrorNoPermission = "no_permission"
2900 RelinquishFolderMembershipErrorNoExplicitAccess = "no_explicit_access"
2901 RelinquishFolderMembershipErrorOther = "other"
2902 )
2903
2904 // UnmarshalJSON deserializes into a RelinquishFolderMembershipError instance
2905 func (u *RelinquishFolderMembershipError) UnmarshalJSON(body []byte) error {
2906 type wrap struct {
2907 dropbox.Tagged
2908 // AccessError : has no documentation (yet)
2909 AccessError json.RawMessage `json:"access_error,omitempty"`
2910 }
2911 var w wrap
2912 var err error
2913 if err = json.Unmarshal(body, &w); err != nil {
2914 return err
2915 }
2916 u.Tag = w.Tag
2917 switch u.Tag {
2918 case "access_error":
2919 err = json.Unmarshal(w.AccessError, &u.AccessError)
2920
2921 if err != nil {
2922 return err
2923 }
2924 }
2925 return nil
2926 }
2927
2928 // RemoveFileMemberArg : Arguments for `removeFileMember2`.
2929 type RemoveFileMemberArg struct {
2930 // File : File from which to remove members.
2931 File string `json:"file"`
2932 // Member : Member to remove from this file. Note that even if an email is
2933 // specified, it may result in the removal of a user (not an invitee) if the
2934 // user's main account corresponds to that email address.
2935 Member *MemberSelector `json:"member"`
2936 }
2937
2938 // NewRemoveFileMemberArg returns a new RemoveFileMemberArg instance
2939 func NewRemoveFileMemberArg(File string, Member *MemberSelector) *RemoveFileMemberArg {
2940 s := new(RemoveFileMemberArg)
2941 s.File = File
2942 s.Member = Member
2943 return s
2944 }
2945
2946 // RemoveFileMemberError : Errors for `removeFileMember2`.
2947 type RemoveFileMemberError struct {
2948 dropbox.Tagged
2949 // UserError : has no documentation (yet)
2950 UserError *SharingUserError `json:"user_error,omitempty"`
2951 // AccessError : has no documentation (yet)
2952 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2953 // NoExplicitAccess : This member does not have explicit access to the file
2954 // and therefore cannot be removed. The return value is the access that a
2955 // user might have to the file from a parent folder.
2956 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
2957 }
2958
2959 // Valid tag values for RemoveFileMemberError
2960 const (
2961 RemoveFileMemberErrorUserError = "user_error"
2962 RemoveFileMemberErrorAccessError = "access_error"
2963 RemoveFileMemberErrorNoExplicitAccess = "no_explicit_access"
2964 RemoveFileMemberErrorOther = "other"
2965 )
2966
2967 // UnmarshalJSON deserializes into a RemoveFileMemberError instance
2968 func (u *RemoveFileMemberError) UnmarshalJSON(body []byte) error {
2969 type wrap struct {
2970 dropbox.Tagged
2971 // UserError : has no documentation (yet)
2972 UserError json.RawMessage `json:"user_error,omitempty"`
2973 // AccessError : has no documentation (yet)
2974 AccessError json.RawMessage `json:"access_error,omitempty"`
2975 // NoExplicitAccess : This member does not have explicit access to the
2976 // file and therefore cannot be removed. The return value is the access
2977 // that a user might have to the file from a parent folder.
2978 NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"`
2979 }
2980 var w wrap
2981 var err error
2982 if err = json.Unmarshal(body, &w); err != nil {
2983 return err
2984 }
2985 u.Tag = w.Tag
2986 switch u.Tag {
2987 case "user_error":
2988 err = json.Unmarshal(w.UserError, &u.UserError)
2989
2990 if err != nil {
2991 return err
2992 }
2993 case "access_error":
2994 err = json.Unmarshal(w.AccessError, &u.AccessError)
2995
2996 if err != nil {
2997 return err
2998 }
2999 case "no_explicit_access":
3000 err = json.Unmarshal(body, &u.NoExplicitAccess)
3001
3002 if err != nil {
3003 return err
3004 }
3005 }
3006 return nil
3007 }
3008
3009 // RemoveFolderMemberArg : has no documentation (yet)
3010 type RemoveFolderMemberArg struct {
3011 // SharedFolderId : The ID for the shared folder.
3012 SharedFolderId string `json:"shared_folder_id"`
3013 // Member : The member to remove from the folder.
3014 Member *MemberSelector `json:"member"`
3015 // LeaveACopy : If true, the removed user will keep their copy of the folder
3016 // after it's unshared, assuming it was mounted. Otherwise, it will be
3017 // removed from their Dropbox. Also, this must be set to false when kicking
3018 // a group.
3019 LeaveACopy bool `json:"leave_a_copy"`
3020 }
3021
3022 // NewRemoveFolderMemberArg returns a new RemoveFolderMemberArg instance
3023 func NewRemoveFolderMemberArg(SharedFolderId string, Member *MemberSelector, LeaveACopy bool) *RemoveFolderMemberArg {
3024 s := new(RemoveFolderMemberArg)
3025 s.SharedFolderId = SharedFolderId
3026 s.Member = Member
3027 s.LeaveACopy = LeaveACopy
3028 return s
3029 }
3030
3031 // RemoveFolderMemberError : has no documentation (yet)
3032 type RemoveFolderMemberError struct {
3033 dropbox.Tagged
3034 // AccessError : has no documentation (yet)
3035 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3036 // MemberError : has no documentation (yet)
3037 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
3038 }
3039
3040 // Valid tag values for RemoveFolderMemberError
3041 const (
3042 RemoveFolderMemberErrorAccessError = "access_error"
3043 RemoveFolderMemberErrorMemberError = "member_error"
3044 RemoveFolderMemberErrorFolderOwner = "folder_owner"
3045 RemoveFolderMemberErrorGroupAccess = "group_access"
3046 RemoveFolderMemberErrorTeamFolder = "team_folder"
3047 RemoveFolderMemberErrorNoPermission = "no_permission"
3048 RemoveFolderMemberErrorTooManyFiles = "too_many_files"
3049 RemoveFolderMemberErrorOther = "other"
3050 )
3051
3052 // UnmarshalJSON deserializes into a RemoveFolderMemberError instance
3053 func (u *RemoveFolderMemberError) UnmarshalJSON(body []byte) error {
3054 type wrap struct {
3055 dropbox.Tagged
3056 // AccessError : has no documentation (yet)
3057 AccessError json.RawMessage `json:"access_error,omitempty"`
3058 // MemberError : has no documentation (yet)
3059 MemberError json.RawMessage `json:"member_error,omitempty"`
3060 }
3061 var w wrap
3062 var err error
3063 if err = json.Unmarshal(body, &w); err != nil {
3064 return err
3065 }
3066 u.Tag = w.Tag
3067 switch u.Tag {
3068 case "access_error":
3069 err = json.Unmarshal(w.AccessError, &u.AccessError)
3070
3071 if err != nil {
3072 return err
3073 }
3074 case "member_error":
3075 err = json.Unmarshal(w.MemberError, &u.MemberError)
3076
3077 if err != nil {
3078 return err
3079 }
3080 }
3081 return nil
3082 }
3083
3084 // RemoveMemberJobStatus : has no documentation (yet)
3085 type RemoveMemberJobStatus struct {
3086 dropbox.Tagged
3087 // Complete : Removing the folder member has finished. The value is
3088 // information about whether the member has another form of access.
3089 Complete *MemberAccessLevelResult `json:"complete,omitempty"`
3090 // Failed : has no documentation (yet)
3091 Failed *RemoveFolderMemberError `json:"failed,omitempty"`
3092 }
3093
3094 // Valid tag values for RemoveMemberJobStatus
3095 const (
3096 RemoveMemberJobStatusInProgress = "in_progress"
3097 RemoveMemberJobStatusComplete = "complete"
3098 RemoveMemberJobStatusFailed = "failed"
3099 )
3100
3101 // UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
3102 func (u *RemoveMemberJobStatus) UnmarshalJSON(body []byte) error {
3103 type wrap struct {
3104 dropbox.Tagged
3105 // Complete : Removing the folder member has finished. The value is
3106 // information about whether the member has another form of access.
3107 Complete json.RawMessage `json:"complete,omitempty"`
3108 // Failed : has no documentation (yet)
3109 Failed json.RawMessage `json:"failed,omitempty"`
3110 }
3111 var w wrap
3112 var err error
3113 if err = json.Unmarshal(body, &w); err != nil {
3114 return err
3115 }
3116 u.Tag = w.Tag
3117 switch u.Tag {
3118 case "complete":
3119 err = json.Unmarshal(body, &u.Complete)
3120
3121 if err != nil {
3122 return err
3123 }
3124 case "failed":
3125 err = json.Unmarshal(w.Failed, &u.Failed)
3126
3127 if err != nil {
3128 return err
3129 }
3130 }
3131 return nil
3132 }
3133
3134 // RequestedVisibility : The access permission that can be requested by the
3135 // caller for the shared link. Note that the final resolved visibility of the
3136 // shared link takes into account other aspects, such as team and shared folder
3137 // settings. Check the `ResolvedVisibility` for more info on the possible
3138 // resolved visibility values of shared links.
3139 type RequestedVisibility struct {
3140 dropbox.Tagged
3141 }
3142
3143 // Valid tag values for RequestedVisibility
3144 const (
3145 RequestedVisibilityPublic = "public"
3146 RequestedVisibilityTeamOnly = "team_only"
3147 RequestedVisibilityPassword = "password"
3148 )
3149
3150 // ResolvedVisibility : The actual access permissions values of shared links
3151 // after taking into account user preferences and the team and shared folder
3152 // settings. Check the `RequestedVisibility` for more info on the possible
3153 // visibility values that can be set by the shared link's owner.
3154 type ResolvedVisibility struct {
3155 dropbox.Tagged
3156 }
3157
3158 // Valid tag values for ResolvedVisibility
3159 const (
3160 ResolvedVisibilityPublic = "public"
3161 ResolvedVisibilityTeamOnly = "team_only"
3162 ResolvedVisibilityPassword = "password"
3163 ResolvedVisibilityTeamAndPassword = "team_and_password"
3164 ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
3165 ResolvedVisibilityOther = "other"
3166 )
3167
3168 // RevokeSharedLinkArg : has no documentation (yet)
3169 type RevokeSharedLinkArg struct {
3170 // Url : URL of the shared link.
3171 Url string `json:"url"`
3172 }
3173
3174 // NewRevokeSharedLinkArg returns a new RevokeSharedLinkArg instance
3175 func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg {
3176 s := new(RevokeSharedLinkArg)
3177 s.Url = Url
3178 return s
3179 }
3180
3181 // RevokeSharedLinkError : has no documentation (yet)
3182 type RevokeSharedLinkError struct {
3183 dropbox.Tagged
3184 }
3185
3186 // Valid tag values for RevokeSharedLinkError
3187 const (
3188 RevokeSharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
3189 RevokeSharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
3190 RevokeSharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
3191 RevokeSharedLinkErrorOther = "other"
3192 RevokeSharedLinkErrorSharedLinkMalformed = "shared_link_malformed"
3193 )
3194
3195 // SetAccessInheritanceArg : has no documentation (yet)
3196 type SetAccessInheritanceArg struct {
3197 // AccessInheritance : The access inheritance settings for the folder.
3198 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3199 // SharedFolderId : The ID for the shared folder.
3200 SharedFolderId string `json:"shared_folder_id"`
3201 }
3202
3203 // NewSetAccessInheritanceArg returns a new SetAccessInheritanceArg instance
3204 func NewSetAccessInheritanceArg(SharedFolderId string) *SetAccessInheritanceArg {
3205 s := new(SetAccessInheritanceArg)
3206 s.SharedFolderId = SharedFolderId
3207 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}}
3208 return s
3209 }
3210
3211 // SetAccessInheritanceError : has no documentation (yet)
3212 type SetAccessInheritanceError struct {
3213 dropbox.Tagged
3214 // AccessError : Unable to access shared folder.
3215 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3216 }
3217
3218 // Valid tag values for SetAccessInheritanceError
3219 const (
3220 SetAccessInheritanceErrorAccessError = "access_error"
3221 SetAccessInheritanceErrorNoPermission = "no_permission"
3222 SetAccessInheritanceErrorOther = "other"
3223 )
3224
3225 // UnmarshalJSON deserializes into a SetAccessInheritanceError instance
3226 func (u *SetAccessInheritanceError) UnmarshalJSON(body []byte) error {
3227 type wrap struct {
3228 dropbox.Tagged
3229 // AccessError : Unable to access shared folder.
3230 AccessError json.RawMessage `json:"access_error,omitempty"`
3231 }
3232 var w wrap
3233 var err error
3234 if err = json.Unmarshal(body, &w); err != nil {
3235 return err
3236 }
3237 u.Tag = w.Tag
3238 switch u.Tag {
3239 case "access_error":
3240 err = json.Unmarshal(w.AccessError, &u.AccessError)
3241
3242 if err != nil {
3243 return err
3244 }
3245 }
3246 return nil
3247 }
3248
3249 // ShareFolderArgBase : has no documentation (yet)
3250 type ShareFolderArgBase struct {
3251 // AclUpdatePolicy : Who can add and remove members of this shared folder.
3252 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
3253 // ForceAsync : Whether to force the share to happen asynchronously.
3254 ForceAsync bool `json:"force_async"`
3255 // MemberPolicy : Who can be a member of this shared folder. Only applicable
3256 // if the current user is on a team.
3257 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
3258 // Path : The path to the folder to share. If it does not exist, then a new
3259 // one is created.
3260 Path string `json:"path"`
3261 // SharedLinkPolicy : The policy to apply to shared links created for
3262 // content inside this shared folder. The current user must be on a team to
3263 // set this policy to `SharedLinkPolicy.members`.
3264 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
3265 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
3266 // folder.
3267 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
3268 // AccessInheritance : The access inheritance settings for the folder.
3269 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3270 }
3271
3272 // NewShareFolderArgBase returns a new ShareFolderArgBase instance
3273 func NewShareFolderArgBase(Path string) *ShareFolderArgBase {
3274 s := new(ShareFolderArgBase)
3275 s.Path = Path
3276 s.ForceAsync = false
3277 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}}
3278 return s
3279 }
3280
3281 // ShareFolderArg : has no documentation (yet)
3282 type ShareFolderArg struct {
3283 ShareFolderArgBase
3284 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
3285 // that should appear in the response's `SharedFolderMetadata.permissions`
3286 // field describing the actions the authenticated user can perform on the
3287 // folder.
3288 Actions []*FolderAction `json:"actions,omitempty"`
3289 // LinkSettings : Settings on the link for this folder.
3290 LinkSettings *LinkSettings `json:"link_settings,omitempty"`
3291 }
3292
3293 // NewShareFolderArg returns a new ShareFolderArg instance
3294 func NewShareFolderArg(Path string) *ShareFolderArg {
3295 s := new(ShareFolderArg)
3296 s.Path = Path
3297 s.ForceAsync = false
3298 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}}
3299 return s
3300 }
3301
3302 // ShareFolderErrorBase : has no documentation (yet)
3303 type ShareFolderErrorBase struct {
3304 dropbox.Tagged
3305 // BadPath : `ShareFolderArg.path` is invalid.
3306 BadPath *SharePathError `json:"bad_path,omitempty"`
3307 }
3308
3309 // Valid tag values for ShareFolderErrorBase
3310 const (
3311 ShareFolderErrorBaseEmailUnverified = "email_unverified"
3312 ShareFolderErrorBaseBadPath = "bad_path"
3313 ShareFolderErrorBaseTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
3314 ShareFolderErrorBaseDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
3315 ShareFolderErrorBaseOther = "other"
3316 )
3317
3318 // UnmarshalJSON deserializes into a ShareFolderErrorBase instance
3319 func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error {
3320 type wrap struct {
3321 dropbox.Tagged
3322 // BadPath : `ShareFolderArg.path` is invalid.
3323 BadPath json.RawMessage `json:"bad_path,omitempty"`
3324 }
3325 var w wrap
3326 var err error
3327 if err = json.Unmarshal(body, &w); err != nil {
3328 return err
3329 }
3330 u.Tag = w.Tag
3331 switch u.Tag {
3332 case "bad_path":
3333 err = json.Unmarshal(w.BadPath, &u.BadPath)
3334
3335 if err != nil {
3336 return err
3337 }
3338 }
3339 return nil
3340 }
3341
3342 // ShareFolderError : has no documentation (yet)
3343 type ShareFolderError struct {
3344 dropbox.Tagged
3345 // BadPath : `ShareFolderArg.path` is invalid.
3346 BadPath *SharePathError `json:"bad_path,omitempty"`
3347 }
3348
3349 // Valid tag values for ShareFolderError
3350 const (
3351 ShareFolderErrorEmailUnverified = "email_unverified"
3352 ShareFolderErrorBadPath = "bad_path"
3353 ShareFolderErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
3354 ShareFolderErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
3355 ShareFolderErrorOther = "other"
3356 ShareFolderErrorNoPermission = "no_permission"
3357 )
3358
3359 // UnmarshalJSON deserializes into a ShareFolderError instance
3360 func (u *ShareFolderError) UnmarshalJSON(body []byte) error {
3361 type wrap struct {
3362 dropbox.Tagged
3363 // BadPath : `ShareFolderArg.path` is invalid.
3364 BadPath json.RawMessage `json:"bad_path,omitempty"`
3365 }
3366 var w wrap
3367 var err error
3368 if err = json.Unmarshal(body, &w); err != nil {
3369 return err
3370 }
3371 u.Tag = w.Tag
3372 switch u.Tag {
3373 case "bad_path":
3374 err = json.Unmarshal(w.BadPath, &u.BadPath)
3375
3376 if err != nil {
3377 return err
3378 }
3379 }
3380 return nil
3381 }
3382
3383 // ShareFolderJobStatus : has no documentation (yet)
3384 type ShareFolderJobStatus struct {
3385 dropbox.Tagged
3386 // Complete : The share job has finished. The value is the metadata for the
3387 // folder.
3388 Complete *SharedFolderMetadata `json:"complete,omitempty"`
3389 // Failed : has no documentation (yet)
3390 Failed *ShareFolderError `json:"failed,omitempty"`
3391 }
3392
3393 // Valid tag values for ShareFolderJobStatus
3394 const (
3395 ShareFolderJobStatusInProgress = "in_progress"
3396 ShareFolderJobStatusComplete = "complete"
3397 ShareFolderJobStatusFailed = "failed"
3398 )
3399
3400 // UnmarshalJSON deserializes into a ShareFolderJobStatus instance
3401 func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error {
3402 type wrap struct {
3403 dropbox.Tagged
3404 // Complete : The share job has finished. The value is the metadata for
3405 // the folder.
3406 Complete json.RawMessage `json:"complete,omitempty"`
3407 // Failed : has no documentation (yet)
3408 Failed json.RawMessage `json:"failed,omitempty"`
3409 }
3410 var w wrap
3411 var err error
3412 if err = json.Unmarshal(body, &w); err != nil {
3413 return err
3414 }
3415 u.Tag = w.Tag
3416 switch u.Tag {
3417 case "complete":
3418 err = json.Unmarshal(body, &u.Complete)
3419
3420 if err != nil {
3421 return err
3422 }
3423 case "failed":
3424 err = json.Unmarshal(w.Failed, &u.Failed)
3425
3426 if err != nil {
3427 return err
3428 }
3429 }
3430 return nil
3431 }
3432
3433 // ShareFolderLaunch : has no documentation (yet)
3434 type ShareFolderLaunch struct {
3435 dropbox.Tagged
3436 // AsyncJobId : This response indicates that the processing is asynchronous.
3437 // The string is an id that can be used to obtain the status of the
3438 // asynchronous job.
3439 AsyncJobId string `json:"async_job_id,omitempty"`
3440 // Complete : has no documentation (yet)
3441 Complete *SharedFolderMetadata `json:"complete,omitempty"`
3442 }
3443
3444 // Valid tag values for ShareFolderLaunch
3445 const (
3446 ShareFolderLaunchAsyncJobId = "async_job_id"
3447 ShareFolderLaunchComplete = "complete"
3448 )
3449
3450 // UnmarshalJSON deserializes into a ShareFolderLaunch instance
3451 func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error {
3452 type wrap struct {
3453 dropbox.Tagged
3454 // Complete : has no documentation (yet)
3455 Complete json.RawMessage `json:"complete,omitempty"`
3456 }
3457 var w wrap
3458 var err error
3459 if err = json.Unmarshal(body, &w); err != nil {
3460 return err
3461 }
3462 u.Tag = w.Tag
3463 switch u.Tag {
3464 case "async_job_id":
3465 err = json.Unmarshal(body, &u.AsyncJobId)
3466
3467 if err != nil {
3468 return err
3469 }
3470 case "complete":
3471 err = json.Unmarshal(body, &u.Complete)
3472
3473 if err != nil {
3474 return err
3475 }
3476 }
3477 return nil
3478 }
3479
3480 // SharePathError : has no documentation (yet)
3481 type SharePathError struct {
3482 dropbox.Tagged
3483 // AlreadyShared : Folder is already shared. Contains metadata about the
3484 // existing shared folder.
3485 AlreadyShared *SharedFolderMetadata `json:"already_shared,omitempty"`
3486 }
3487
3488 // Valid tag values for SharePathError
3489 const (
3490 SharePathErrorIsFile = "is_file"
3491 SharePathErrorInsideSharedFolder = "inside_shared_folder"
3492 SharePathErrorContainsSharedFolder = "contains_shared_folder"
3493 SharePathErrorContainsAppFolder = "contains_app_folder"
3494 SharePathErrorContainsTeamFolder = "contains_team_folder"
3495 SharePathErrorIsAppFolder = "is_app_folder"
3496 SharePathErrorInsideAppFolder = "inside_app_folder"
3497 SharePathErrorIsPublicFolder = "is_public_folder"
3498 SharePathErrorInsidePublicFolder = "inside_public_folder"
3499 SharePathErrorAlreadyShared = "already_shared"
3500 SharePathErrorInvalidPath = "invalid_path"
3501 SharePathErrorIsOsxPackage = "is_osx_package"
3502 SharePathErrorInsideOsxPackage = "inside_osx_package"
3503 SharePathErrorOther = "other"
3504 )
3505
3506 // UnmarshalJSON deserializes into a SharePathError instance
3507 func (u *SharePathError) UnmarshalJSON(body []byte) error {
3508 type wrap struct {
3509 dropbox.Tagged
3510 // AlreadyShared : Folder is already shared. Contains metadata about the
3511 // existing shared folder.
3512 AlreadyShared json.RawMessage `json:"already_shared,omitempty"`
3513 }
3514 var w wrap
3515 var err error
3516 if err = json.Unmarshal(body, &w); err != nil {
3517 return err
3518 }
3519 u.Tag = w.Tag
3520 switch u.Tag {
3521 case "already_shared":
3522 err = json.Unmarshal(body, &u.AlreadyShared)
3523
3524 if err != nil {
3525 return err
3526 }
3527 }
3528 return nil
3529 }
3530
3531 // SharedContentLinkMetadata : Metadata of a shared link for a file or folder.
3532 type SharedContentLinkMetadata struct {
3533 SharedContentLinkMetadataBase
3534 // AudienceExceptions : The content inside this folder with link audience
3535 // different than this folder's. This is only returned when an endpoint that
3536 // returns metadata for a single shared folder is called, e.g.
3537 // /get_folder_metadata.
3538 AudienceExceptions *AudienceExceptions `json:"audience_exceptions,omitempty"`
3539 // Url : The URL of the link.
3540 Url string `json:"url"`
3541 }
3542
3543 // NewSharedContentLinkMetadata returns a new SharedContentLinkMetadata instance
3544 func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool, Url string) *SharedContentLinkMetadata {
3545 s := new(SharedContentLinkMetadata)
3546 s.AudienceOptions = AudienceOptions
3547 s.CurrentAudience = CurrentAudience
3548 s.LinkPermissions = LinkPermissions
3549 s.PasswordProtected = PasswordProtected
3550 s.Url = Url
3551 return s
3552 }
3553
3554 // SharedFileMembers : Shared file user, group, and invitee membership. Used for
3555 // the results of `listFileMembers` and `listFileMembersContinue`, and used as
3556 // part of the results for `listFileMembersBatch`.
3557 type SharedFileMembers struct {
3558 // Users : The list of user members of the shared file.
3559 Users []*UserFileMembershipInfo `json:"users"`
3560 // Groups : The list of group members of the shared file.
3561 Groups []*GroupMembershipInfo `json:"groups"`
3562 // Invitees : The list of invited members of a file, but have not logged in
3563 // and claimed this.
3564 Invitees []*InviteeMembershipInfo `json:"invitees"`
3565 // Cursor : Present if there are additional shared file members that have
3566 // not been returned yet. Pass the cursor into `listFileMembersContinue` to
3567 // list additional members.
3568 Cursor string `json:"cursor,omitempty"`
3569 }
3570
3571 // NewSharedFileMembers returns a new SharedFileMembers instance
3572 func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
3573 s := new(SharedFileMembers)
3574 s.Users = Users
3575 s.Groups = Groups
3576 s.Invitees = Invitees
3577 return s
3578 }
3579
3580 // SharedFileMetadata : Properties of the shared file.
3581 type SharedFileMetadata struct {
3582 // AccessType : The current user's access level for this shared file.
3583 AccessType *AccessLevel `json:"access_type,omitempty"`
3584 // Id : The ID of the file.
3585 Id string `json:"id"`
3586 // ExpectedLinkMetadata : The expected metadata of the link associated for
3587 // the file when it is first shared. Absent if the link already exists. This
3588 // is for an unreleased feature so it may not be returned yet.
3589 ExpectedLinkMetadata *ExpectedSharedContentLinkMetadata `json:"expected_link_metadata,omitempty"`
3590 // LinkMetadata : The metadata of the link associated for the file. This is
3591 // for an unreleased feature so it may not be returned yet.
3592 LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
3593 // Name : The name of this file.
3594 Name string `json:"name"`
3595 // OwnerDisplayNames : The display names of the users that own the file. If
3596 // the file is part of a team folder, the display names of the team admins
3597 // are also included. Absent if the owner display names cannot be fetched.
3598 OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
3599 // OwnerTeam : The team that owns the file. This field is not present if the
3600 // file is not owned by a team.
3601 OwnerTeam *users.Team `json:"owner_team,omitempty"`
3602 // ParentSharedFolderId : The ID of the parent shared folder. This field is
3603 // present only if the file is contained within a shared folder.
3604 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
3605 // PathDisplay : The cased path to be used for display purposes only. In
3606 // rare instances the casing will not correctly match the user's filesystem,
3607 // but this behavior will match the path provided in the Core API v1. Absent
3608 // for unmounted files.
3609 PathDisplay string `json:"path_display,omitempty"`
3610 // PathLower : The lower-case full path of this file. Absent for unmounted
3611 // files.
3612 PathLower string `json:"path_lower,omitempty"`
3613 // Permissions : The sharing permissions that requesting user has on this
3614 // file. This corresponds to the entries given in
3615 // `GetFileMetadataBatchArg.actions` or `GetFileMetadataArg.actions`.
3616 Permissions []*FilePermission `json:"permissions,omitempty"`
3617 // Policy : Policies governing this shared file.
3618 Policy *FolderPolicy `json:"policy"`
3619 // PreviewUrl : URL for displaying a web preview of the shared file.
3620 PreviewUrl string `json:"preview_url"`
3621 // TimeInvited : Timestamp indicating when the current user was invited to
3622 // this shared file. If the user was not invited to the shared file, the
3623 // timestamp will indicate when the user was invited to the parent shared
3624 // folder. This value may be absent.
3625 TimeInvited time.Time `json:"time_invited,omitempty"`
3626 }
3627
3628 // NewSharedFileMetadata returns a new SharedFileMetadata instance
3629 func NewSharedFileMetadata(Id string, Name string, Policy *FolderPolicy, PreviewUrl string) *SharedFileMetadata {
3630 s := new(SharedFileMetadata)
3631 s.Id = Id
3632 s.Name = Name
3633 s.Policy = Policy
3634 s.PreviewUrl = PreviewUrl
3635 return s
3636 }
3637
3638 // SharedFolderAccessError : There is an error accessing the shared folder.
3639 type SharedFolderAccessError struct {
3640 dropbox.Tagged
3641 }
3642
3643 // Valid tag values for SharedFolderAccessError
3644 const (
3645 SharedFolderAccessErrorInvalidId = "invalid_id"
3646 SharedFolderAccessErrorNotAMember = "not_a_member"
3647 SharedFolderAccessErrorEmailUnverified = "email_unverified"
3648 SharedFolderAccessErrorUnmounted = "unmounted"
3649 SharedFolderAccessErrorOther = "other"
3650 )
3651
3652 // SharedFolderMemberError : has no documentation (yet)
3653 type SharedFolderMemberError struct {
3654 dropbox.Tagged
3655 // NoExplicitAccess : The target member only has inherited access to the
3656 // shared folder.
3657 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
3658 }
3659
3660 // Valid tag values for SharedFolderMemberError
3661 const (
3662 SharedFolderMemberErrorInvalidDropboxId = "invalid_dropbox_id"
3663 SharedFolderMemberErrorNotAMember = "not_a_member"
3664 SharedFolderMemberErrorNoExplicitAccess = "no_explicit_access"
3665 SharedFolderMemberErrorOther = "other"
3666 )
3667
3668 // UnmarshalJSON deserializes into a SharedFolderMemberError instance
3669 func (u *SharedFolderMemberError) UnmarshalJSON(body []byte) error {
3670 type wrap struct {
3671 dropbox.Tagged
3672 // NoExplicitAccess : The target member only has inherited access to the
3673 // shared folder.
3674 NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"`
3675 }
3676 var w wrap
3677 var err error
3678 if err = json.Unmarshal(body, &w); err != nil {
3679 return err
3680 }
3681 u.Tag = w.Tag
3682 switch u.Tag {
3683 case "no_explicit_access":
3684 err = json.Unmarshal(body, &u.NoExplicitAccess)
3685
3686 if err != nil {
3687 return err
3688 }
3689 }
3690 return nil
3691 }
3692
3693 // SharedFolderMembers : Shared folder user and group membership.
3694 type SharedFolderMembers struct {
3695 // Users : The list of user members of the shared folder.
3696 Users []*UserMembershipInfo `json:"users"`
3697 // Groups : The list of group members of the shared folder.
3698 Groups []*GroupMembershipInfo `json:"groups"`
3699 // Invitees : The list of invitees to the shared folder.
3700 Invitees []*InviteeMembershipInfo `json:"invitees"`
3701 // Cursor : Present if there are additional shared folder members that have
3702 // not been returned yet. Pass the cursor into `listFolderMembersContinue`
3703 // to list additional members.
3704 Cursor string `json:"cursor,omitempty"`
3705 }
3706
3707 // NewSharedFolderMembers returns a new SharedFolderMembers instance
3708 func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers {
3709 s := new(SharedFolderMembers)
3710 s.Users = Users
3711 s.Groups = Groups
3712 s.Invitees = Invitees
3713 return s
3714 }
3715
3716 // SharedFolderMetadataBase : Properties of the shared folder.
3717 type SharedFolderMetadataBase struct {
3718 // AccessType : The current user's access level for this shared folder.
3719 AccessType *AccessLevel `json:"access_type"`
3720 // IsInsideTeamFolder : Whether this folder is inside of a team folder.
3721 IsInsideTeamFolder bool `json:"is_inside_team_folder"`
3722 // IsTeamFolder : Whether this folder is a `team folder`
3723 // <https://www.dropbox.com/en/help/986>.
3724 IsTeamFolder bool `json:"is_team_folder"`
3725 // OwnerDisplayNames : The display names of the users that own the folder.
3726 // If the folder is part of a team folder, the display names of the team
3727 // admins are also included. Absent if the owner display names cannot be
3728 // fetched.
3729 OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
3730 // OwnerTeam : The team that owns the folder. This field is not present if
3731 // the folder is not owned by a team.
3732 OwnerTeam *users.Team `json:"owner_team,omitempty"`
3733 // ParentSharedFolderId : The ID of the parent shared folder. This field is
3734 // present only if the folder is contained within another shared folder.
3735 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
3736 // PathLower : The lower-cased full path of this shared folder. Absent for
3737 // unmounted folders.
3738 PathLower string `json:"path_lower,omitempty"`
3739 }
3740
3741 // NewSharedFolderMetadataBase returns a new SharedFolderMetadataBase instance
3742 func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool) *SharedFolderMetadataBase {
3743 s := new(SharedFolderMetadataBase)
3744 s.AccessType = AccessType
3745 s.IsInsideTeamFolder = IsInsideTeamFolder
3746 s.IsTeamFolder = IsTeamFolder
3747 return s
3748 }
3749
3750 // SharedFolderMetadata : The metadata which includes basic information about
3751 // the shared folder.
3752 type SharedFolderMetadata struct {
3753 SharedFolderMetadataBase
3754 // LinkMetadata : The metadata of the shared content link to this shared
3755 // folder. Absent if there is no link on the folder. This is for an
3756 // unreleased feature so it may not be returned yet.
3757 LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
3758 // Name : The name of the this shared folder.
3759 Name string `json:"name"`
3760 // Permissions : Actions the current user may perform on the folder and its
3761 // contents. The set of permissions corresponds to the FolderActions in the
3762 // request.
3763 Permissions []*FolderPermission `json:"permissions,omitempty"`
3764 // Policy : Policies governing this shared folder.
3765 Policy *FolderPolicy `json:"policy"`
3766 // PreviewUrl : URL for displaying a web preview of the shared folder.
3767 PreviewUrl string `json:"preview_url"`
3768 // SharedFolderId : The ID of the shared folder.
3769 SharedFolderId string `json:"shared_folder_id"`
3770 // TimeInvited : Timestamp indicating when the current user was invited to
3771 // this shared folder.
3772 TimeInvited time.Time `json:"time_invited"`
3773 // AccessInheritance : Whether the folder inherits its members from its
3774 // parent.
3775 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3776 }
3777
3778 // NewSharedFolderMetadata returns a new SharedFolderMetadata instance
3779 func NewSharedFolderMetadata(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool, Name string, Policy *FolderPolicy, PreviewUrl string, SharedFolderId string, TimeInvited time.Time) *SharedFolderMetadata {
3780 s := new(SharedFolderMetadata)
3781 s.AccessType = AccessType
3782 s.IsInsideTeamFolder = IsInsideTeamFolder
3783 s.IsTeamFolder = IsTeamFolder
3784 s.Name = Name
3785 s.Policy = Policy
3786 s.PreviewUrl = PreviewUrl
3787 s.SharedFolderId = SharedFolderId
3788 s.TimeInvited = TimeInvited
3789 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}}
3790 return s
3791 }
3792
3793 // SharedLinkAccessFailureReason : has no documentation (yet)
3794 type SharedLinkAccessFailureReason struct {
3795 dropbox.Tagged
3796 }
3797
3798 // Valid tag values for SharedLinkAccessFailureReason
3799 const (
3800 SharedLinkAccessFailureReasonLoginRequired = "login_required"
3801 SharedLinkAccessFailureReasonEmailVerifyRequired = "email_verify_required"
3802 SharedLinkAccessFailureReasonPasswordRequired = "password_required"
3803 SharedLinkAccessFailureReasonTeamOnly = "team_only"
3804 SharedLinkAccessFailureReasonOwnerOnly = "owner_only"
3805 SharedLinkAccessFailureReasonOther = "other"
3806 )
3807
3808 // SharedLinkPolicy : Who can view shared links in this folder.
3809 type SharedLinkPolicy struct {
3810 dropbox.Tagged
3811 }
3812
3813 // Valid tag values for SharedLinkPolicy
3814 const (
3815 SharedLinkPolicyAnyone = "anyone"
3816 SharedLinkPolicyTeam = "team"
3817 SharedLinkPolicyMembers = "members"
3818 SharedLinkPolicyOther = "other"
3819 )
3820
3821 // SharedLinkSettings : has no documentation (yet)
3822 type SharedLinkSettings struct {
3823 // RequestedVisibility : The requested access for this shared link.
3824 RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
3825 // LinkPassword : If `requested_visibility` is
3826 // `RequestedVisibility.password` this is needed to specify the password to
3827 // access the link.
3828 LinkPassword string `json:"link_password,omitempty"`
3829 // Expires : Expiration time of the shared link. By default the link won't
3830 // expire.
3831 Expires time.Time `json:"expires,omitempty"`
3832 }
3833
3834 // NewSharedLinkSettings returns a new SharedLinkSettings instance
3835 func NewSharedLinkSettings() *SharedLinkSettings {
3836 s := new(SharedLinkSettings)
3837 return s
3838 }
3839
3840 // SharedLinkSettingsError : has no documentation (yet)
3841 type SharedLinkSettingsError struct {
3842 dropbox.Tagged
3843 }
3844
3845 // Valid tag values for SharedLinkSettingsError
3846 const (
3847 SharedLinkSettingsErrorInvalidSettings = "invalid_settings"
3848 SharedLinkSettingsErrorNotAuthorized = "not_authorized"
3849 )
3850
3851 // SharingFileAccessError : User could not access this file.
3852 type SharingFileAccessError struct {
3853 dropbox.Tagged
3854 }
3855
3856 // Valid tag values for SharingFileAccessError
3857 const (
3858 SharingFileAccessErrorNoPermission = "no_permission"
3859 SharingFileAccessErrorInvalidFile = "invalid_file"
3860 SharingFileAccessErrorIsFolder = "is_folder"
3861 SharingFileAccessErrorInsidePublicFolder = "inside_public_folder"
3862 SharingFileAccessErrorInsideOsxPackage = "inside_osx_package"
3863 SharingFileAccessErrorOther = "other"
3864 )
3865
3866 // SharingUserError : User account had a problem preventing this action.
3867 type SharingUserError struct {
3868 dropbox.Tagged
3869 }
3870
3871 // Valid tag values for SharingUserError
3872 const (
3873 SharingUserErrorEmailUnverified = "email_unverified"
3874 SharingUserErrorOther = "other"
3875 )
3876
3877 // TeamMemberInfo : Information about a team member.
3878 type TeamMemberInfo struct {
3879 // TeamInfo : Information about the member's team.
3880 TeamInfo *users.Team `json:"team_info"`
3881 // DisplayName : The display name of the user.
3882 DisplayName string `json:"display_name"`
3883 // MemberId : ID of user as a member of a team. This field will only be
3884 // present if the member is in the same team as current user.
3885 MemberId string `json:"member_id,omitempty"`
3886 }
3887
3888 // NewTeamMemberInfo returns a new TeamMemberInfo instance
3889 func NewTeamMemberInfo(TeamInfo *users.Team, DisplayName string) *TeamMemberInfo {
3890 s := new(TeamMemberInfo)
3891 s.TeamInfo = TeamInfo
3892 s.DisplayName = DisplayName
3893 return s
3894 }
3895
3896 // TransferFolderArg : has no documentation (yet)
3897 type TransferFolderArg struct {
3898 // SharedFolderId : The ID for the shared folder.
3899 SharedFolderId string `json:"shared_folder_id"`
3900 // ToDropboxId : A account or team member ID to transfer ownership to.
3901 ToDropboxId string `json:"to_dropbox_id"`
3902 }
3903
3904 // NewTransferFolderArg returns a new TransferFolderArg instance
3905 func NewTransferFolderArg(SharedFolderId string, ToDropboxId string) *TransferFolderArg {
3906 s := new(TransferFolderArg)
3907 s.SharedFolderId = SharedFolderId
3908 s.ToDropboxId = ToDropboxId
3909 return s
3910 }
3911
3912 // TransferFolderError : has no documentation (yet)
3913 type TransferFolderError struct {
3914 dropbox.Tagged
3915 // AccessError : has no documentation (yet)
3916 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3917 }
3918
3919 // Valid tag values for TransferFolderError
3920 const (
3921 TransferFolderErrorAccessError = "access_error"
3922 TransferFolderErrorInvalidDropboxId = "invalid_dropbox_id"
3923 TransferFolderErrorNewOwnerNotAMember = "new_owner_not_a_member"
3924 TransferFolderErrorNewOwnerUnmounted = "new_owner_unmounted"
3925 TransferFolderErrorNewOwnerEmailUnverified = "new_owner_email_unverified"
3926 TransferFolderErrorTeamFolder = "team_folder"
3927 TransferFolderErrorNoPermission = "no_permission"
3928 TransferFolderErrorOther = "other"
3929 )
3930
3931 // UnmarshalJSON deserializes into a TransferFolderError instance
3932 func (u *TransferFolderError) UnmarshalJSON(body []byte) error {
3933 type wrap struct {
3934 dropbox.Tagged
3935 // AccessError : has no documentation (yet)
3936 AccessError json.RawMessage `json:"access_error,omitempty"`
3937 }
3938 var w wrap
3939 var err error
3940 if err = json.Unmarshal(body, &w); err != nil {
3941 return err
3942 }
3943 u.Tag = w.Tag
3944 switch u.Tag {
3945 case "access_error":
3946 err = json.Unmarshal(w.AccessError, &u.AccessError)
3947
3948 if err != nil {
3949 return err
3950 }
3951 }
3952 return nil
3953 }
3954
3955 // UnmountFolderArg : has no documentation (yet)
3956 type UnmountFolderArg struct {
3957 // SharedFolderId : The ID for the shared folder.
3958 SharedFolderId string `json:"shared_folder_id"`
3959 }
3960
3961 // NewUnmountFolderArg returns a new UnmountFolderArg instance
3962 func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg {
3963 s := new(UnmountFolderArg)
3964 s.SharedFolderId = SharedFolderId
3965 return s
3966 }
3967
3968 // UnmountFolderError : has no documentation (yet)
3969 type UnmountFolderError struct {
3970 dropbox.Tagged
3971 // AccessError : has no documentation (yet)
3972 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3973 }
3974
3975 // Valid tag values for UnmountFolderError
3976 const (
3977 UnmountFolderErrorAccessError = "access_error"
3978 UnmountFolderErrorNoPermission = "no_permission"
3979 UnmountFolderErrorNotUnmountable = "not_unmountable"
3980 UnmountFolderErrorOther = "other"
3981 )
3982
3983 // UnmarshalJSON deserializes into a UnmountFolderError instance
3984 func (u *UnmountFolderError) UnmarshalJSON(body []byte) error {
3985 type wrap struct {
3986 dropbox.Tagged
3987 // AccessError : has no documentation (yet)
3988 AccessError json.RawMessage `json:"access_error,omitempty"`
3989 }
3990 var w wrap
3991 var err error
3992 if err = json.Unmarshal(body, &w); err != nil {
3993 return err
3994 }
3995 u.Tag = w.Tag
3996 switch u.Tag {
3997 case "access_error":
3998 err = json.Unmarshal(w.AccessError, &u.AccessError)
3999
4000 if err != nil {
4001 return err
4002 }
4003 }
4004 return nil
4005 }
4006
4007 // UnshareFileArg : Arguments for `unshareFile`.
4008 type UnshareFileArg struct {
4009 // File : The file to unshare.
4010 File string `json:"file"`
4011 }
4012
4013 // NewUnshareFileArg returns a new UnshareFileArg instance
4014 func NewUnshareFileArg(File string) *UnshareFileArg {
4015 s := new(UnshareFileArg)
4016 s.File = File
4017 return s
4018 }
4019
4020 // UnshareFileError : Error result for `unshareFile`.
4021 type UnshareFileError struct {
4022 dropbox.Tagged
4023 // UserError : has no documentation (yet)
4024 UserError *SharingUserError `json:"user_error,omitempty"`
4025 // AccessError : has no documentation (yet)
4026 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
4027 }
4028
4029 // Valid tag values for UnshareFileError
4030 const (
4031 UnshareFileErrorUserError = "user_error"
4032 UnshareFileErrorAccessError = "access_error"
4033 UnshareFileErrorOther = "other"
4034 )
4035
4036 // UnmarshalJSON deserializes into a UnshareFileError instance
4037 func (u *UnshareFileError) UnmarshalJSON(body []byte) error {
4038 type wrap struct {
4039 dropbox.Tagged
4040 // UserError : has no documentation (yet)
4041 UserError json.RawMessage `json:"user_error,omitempty"`
4042 // AccessError : has no documentation (yet)
4043 AccessError json.RawMessage `json:"access_error,omitempty"`
4044 }
4045 var w wrap
4046 var err error
4047 if err = json.Unmarshal(body, &w); err != nil {
4048 return err
4049 }
4050 u.Tag = w.Tag
4051 switch u.Tag {
4052 case "user_error":
4053 err = json.Unmarshal(w.UserError, &u.UserError)
4054
4055 if err != nil {
4056 return err
4057 }
4058 case "access_error":
4059 err = json.Unmarshal(w.AccessError, &u.AccessError)
4060
4061 if err != nil {
4062 return err
4063 }
4064 }
4065 return nil
4066 }
4067
4068 // UnshareFolderArg : has no documentation (yet)
4069 type UnshareFolderArg struct {
4070 // SharedFolderId : The ID for the shared folder.
4071 SharedFolderId string `json:"shared_folder_id"`
4072 // LeaveACopy : If true, members of this shared folder will get a copy of
4073 // this folder after it's unshared. Otherwise, it will be removed from their
4074 // Dropbox. The current user, who is an owner, will always retain their
4075 // copy.
4076 LeaveACopy bool `json:"leave_a_copy"`
4077 }
4078
4079 // NewUnshareFolderArg returns a new UnshareFolderArg instance
4080 func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg {
4081 s := new(UnshareFolderArg)
4082 s.SharedFolderId = SharedFolderId
4083 s.LeaveACopy = false
4084 return s
4085 }
4086
4087 // UnshareFolderError : has no documentation (yet)
4088 type UnshareFolderError struct {
4089 dropbox.Tagged
4090 // AccessError : has no documentation (yet)
4091 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4092 }
4093
4094 // Valid tag values for UnshareFolderError
4095 const (
4096 UnshareFolderErrorAccessError = "access_error"
4097 UnshareFolderErrorTeamFolder = "team_folder"
4098 UnshareFolderErrorNoPermission = "no_permission"
4099 UnshareFolderErrorTooManyFiles = "too_many_files"
4100 UnshareFolderErrorOther = "other"
4101 )
4102
4103 // UnmarshalJSON deserializes into a UnshareFolderError instance
4104 func (u *UnshareFolderError) UnmarshalJSON(body []byte) error {
4105 type wrap struct {
4106 dropbox.Tagged
4107 // AccessError : has no documentation (yet)
4108 AccessError json.RawMessage `json:"access_error,omitempty"`
4109 }
4110 var w wrap
4111 var err error
4112 if err = json.Unmarshal(body, &w); err != nil {
4113 return err
4114 }
4115 u.Tag = w.Tag
4116 switch u.Tag {
4117 case "access_error":
4118 err = json.Unmarshal(w.AccessError, &u.AccessError)
4119
4120 if err != nil {
4121 return err
4122 }
4123 }
4124 return nil
4125 }
4126
4127 // UpdateFileMemberArgs : Arguments for `updateFileMember`.
4128 type UpdateFileMemberArgs struct {
4129 ChangeFileMemberAccessArgs
4130 }
4131
4132 // NewUpdateFileMemberArgs returns a new UpdateFileMemberArgs instance
4133 func NewUpdateFileMemberArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFileMemberArgs {
4134 s := new(UpdateFileMemberArgs)
4135 s.File = File
4136 s.Member = Member
4137 s.AccessLevel = AccessLevel
4138 return s
4139 }
4140
4141 // UpdateFolderMemberArg : has no documentation (yet)
4142 type UpdateFolderMemberArg struct {
4143 // SharedFolderId : The ID for the shared folder.
4144 SharedFolderId string `json:"shared_folder_id"`
4145 // Member : The member of the shared folder to update. Only the
4146 // `MemberSelector.dropbox_id` may be set at this time.
4147 Member *MemberSelector `json:"member"`
4148 // AccessLevel : The new access level for `member`. `AccessLevel.owner` is
4149 // disallowed.
4150 AccessLevel *AccessLevel `json:"access_level"`
4151 }
4152
4153 // NewUpdateFolderMemberArg returns a new UpdateFolderMemberArg instance
4154 func NewUpdateFolderMemberArg(SharedFolderId string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFolderMemberArg {
4155 s := new(UpdateFolderMemberArg)
4156 s.SharedFolderId = SharedFolderId
4157 s.Member = Member
4158 s.AccessLevel = AccessLevel
4159 return s
4160 }
4161
4162 // UpdateFolderMemberError : has no documentation (yet)
4163 type UpdateFolderMemberError struct {
4164 dropbox.Tagged
4165 // AccessError : has no documentation (yet)
4166 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4167 // MemberError : has no documentation (yet)
4168 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
4169 // NoExplicitAccess : If updating the access type required the member to be
4170 // added to the shared folder and there was an error when adding the member.
4171 NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"`
4172 }
4173
4174 // Valid tag values for UpdateFolderMemberError
4175 const (
4176 UpdateFolderMemberErrorAccessError = "access_error"
4177 UpdateFolderMemberErrorMemberError = "member_error"
4178 UpdateFolderMemberErrorNoExplicitAccess = "no_explicit_access"
4179 UpdateFolderMemberErrorInsufficientPlan = "insufficient_plan"
4180 UpdateFolderMemberErrorNoPermission = "no_permission"
4181 UpdateFolderMemberErrorOther = "other"
4182 )
4183
4184 // UnmarshalJSON deserializes into a UpdateFolderMemberError instance
4185 func (u *UpdateFolderMemberError) UnmarshalJSON(body []byte) error {
4186 type wrap struct {
4187 dropbox.Tagged
4188 // AccessError : has no documentation (yet)
4189 AccessError json.RawMessage `json:"access_error,omitempty"`
4190 // MemberError : has no documentation (yet)
4191 MemberError json.RawMessage `json:"member_error,omitempty"`
4192 // NoExplicitAccess : If updating the access type required the member to
4193 // be added to the shared folder and there was an error when adding the
4194 // member.
4195 NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"`
4196 }
4197 var w wrap
4198 var err error
4199 if err = json.Unmarshal(body, &w); err != nil {
4200 return err
4201 }
4202 u.Tag = w.Tag
4203 switch u.Tag {
4204 case "access_error":
4205 err = json.Unmarshal(w.AccessError, &u.AccessError)
4206
4207 if err != nil {
4208 return err
4209 }
4210 case "member_error":
4211 err = json.Unmarshal(w.MemberError, &u.MemberError)
4212
4213 if err != nil {
4214 return err
4215 }
4216 case "no_explicit_access":
4217 err = json.Unmarshal(w.NoExplicitAccess, &u.NoExplicitAccess)
4218
4219 if err != nil {
4220 return err
4221 }
4222 }
4223 return nil
4224 }
4225
4226 // UpdateFolderPolicyArg : If any of the policies are unset, then they retain
4227 // their current setting.
4228 type UpdateFolderPolicyArg struct {
4229 // SharedFolderId : The ID for the shared folder.
4230 SharedFolderId string `json:"shared_folder_id"`
4231 // MemberPolicy : Who can be a member of this shared folder. Only applicable
4232 // if the current user is on a team.
4233 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
4234 // AclUpdatePolicy : Who can add and remove members of this shared folder.
4235 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
4236 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
4237 // folder.
4238 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
4239 // SharedLinkPolicy : The policy to apply to shared links created for
4240 // content inside this shared folder. The current user must be on a team to
4241 // set this policy to `SharedLinkPolicy.members`.
4242 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
4243 // LinkSettings : Settings on the link for this folder.
4244 LinkSettings *LinkSettings `json:"link_settings,omitempty"`
4245 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
4246 // that should appear in the response's `SharedFolderMetadata.permissions`
4247 // field describing the actions the authenticated user can perform on the
4248 // folder.
4249 Actions []*FolderAction `json:"actions,omitempty"`
4250 }
4251
4252 // NewUpdateFolderPolicyArg returns a new UpdateFolderPolicyArg instance
4253 func NewUpdateFolderPolicyArg(SharedFolderId string) *UpdateFolderPolicyArg {
4254 s := new(UpdateFolderPolicyArg)
4255 s.SharedFolderId = SharedFolderId
4256 return s
4257 }
4258
4259 // UpdateFolderPolicyError : has no documentation (yet)
4260 type UpdateFolderPolicyError struct {
4261 dropbox.Tagged
4262 // AccessError : has no documentation (yet)
4263 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4264 }
4265
4266 // Valid tag values for UpdateFolderPolicyError
4267 const (
4268 UpdateFolderPolicyErrorAccessError = "access_error"
4269 UpdateFolderPolicyErrorNotOnTeam = "not_on_team"
4270 UpdateFolderPolicyErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
4271 UpdateFolderPolicyErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
4272 UpdateFolderPolicyErrorNoPermission = "no_permission"
4273 UpdateFolderPolicyErrorTeamFolder = "team_folder"
4274 UpdateFolderPolicyErrorOther = "other"
4275 )
4276
4277 // UnmarshalJSON deserializes into a UpdateFolderPolicyError instance
4278 func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
4279 type wrap struct {
4280 dropbox.Tagged
4281 // AccessError : has no documentation (yet)
4282 AccessError json.RawMessage `json:"access_error,omitempty"`
4283 }
4284 var w wrap
4285 var err error
4286 if err = json.Unmarshal(body, &w); err != nil {
4287 return err
4288 }
4289 u.Tag = w.Tag
4290 switch u.Tag {
4291 case "access_error":
4292 err = json.Unmarshal(w.AccessError, &u.AccessError)
4293
4294 if err != nil {
4295 return err
4296 }
4297 }
4298 return nil
4299 }
4300
4301 // UserMembershipInfo : The information about a user member of the shared
4302 // content.
4303 type UserMembershipInfo struct {
4304 MembershipInfo
4305 // User : The account information for the membership user.
4306 User *UserInfo `json:"user"`
4307 }
4308
4309 // NewUserMembershipInfo returns a new UserMembershipInfo instance
4310 func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
4311 s := new(UserMembershipInfo)
4312 s.AccessType = AccessType
4313 s.User = User
4314 s.IsInherited = false
4315 return s
4316 }
4317
4318 // UserFileMembershipInfo : The information about a user member of the shared
4319 // content with an appended last seen timestamp.
4320 type UserFileMembershipInfo struct {
4321 UserMembershipInfo
4322 // TimeLastSeen : The UTC timestamp of when the user has last seen the
4323 // content, if they have.
4324 TimeLastSeen time.Time `json:"time_last_seen,omitempty"`
4325 // PlatformType : The platform on which the user has last seen the content,
4326 // or unknown.
4327 PlatformType *seen_state.PlatformType `json:"platform_type,omitempty"`
4328 }
4329
4330 // NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance
4331 func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo {
4332 s := new(UserFileMembershipInfo)
4333 s.AccessType = AccessType
4334 s.User = User
4335 s.IsInherited = false
4336 return s
4337 }
4338
4339 // UserInfo : Basic information about a user. Use `usersAccount` and
4340 // `usersAccountBatch` to obtain more detailed information.
4341 type UserInfo struct {
4342 // AccountId : The account ID of the user.
4343 AccountId string `json:"account_id"`
4344 // Email : Email address of user.
4345 Email string `json:"email"`
4346 // DisplayName : The display name of the user.
4347 DisplayName string `json:"display_name"`
4348 // SameTeam : If the user is in the same team as current user.
4349 SameTeam bool `json:"same_team"`
4350 // TeamMemberId : The team member ID of the shared folder member. Only
4351 // present if `same_team` is true.
4352 TeamMemberId string `json:"team_member_id,omitempty"`
4353 }
4354
4355 // NewUserInfo returns a new UserInfo instance
4356 func NewUserInfo(AccountId string, Email string, DisplayName string, SameTeam bool) *UserInfo {
4357 s := new(UserInfo)
4358 s.AccountId = AccountId
4359 s.Email = Email
4360 s.DisplayName = DisplayName
4361 s.SameTeam = SameTeam
4362 return s
4363 }
4364
4365 // ViewerInfoPolicy : has no documentation (yet)
4366 type ViewerInfoPolicy struct {
4367 dropbox.Tagged
4368 }
4369
4370 // Valid tag values for ViewerInfoPolicy
4371 const (
4372 ViewerInfoPolicyEnabled = "enabled"
4373 ViewerInfoPolicyDisabled = "disabled"
4374 ViewerInfoPolicyOther = "other"
4375 )
4376
4377 // Visibility : Who can access a shared link. The most open visibility is
4378 // `public`. The default depends on many aspects, such as team and user
4379 // preferences and shared folder settings.
4380 type Visibility struct {
4381 dropbox.Tagged
4382 }
4383
4384 // Valid tag values for Visibility
4385 const (
4386 VisibilityPublic = "public"
4387 VisibilityTeamOnly = "team_only"
4388 VisibilityPassword = "password"
4389 VisibilityTeamAndPassword = "team_and_password"
4390 VisibilitySharedFolderOnly = "shared_folder_only"
4391 VisibilityOther = "other"
4392 )
+0
-4479
dropbox/team/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package team
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "log"
27 "net/http"
28
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties"
33 )
34
35 // Client interface describes all routes in this namespace
36 type Client interface {
37 // DevicesListMemberDevices : List all device sessions of a team's member.
38 DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error)
39 // DevicesListMembersDevices : List all device sessions of a team.
40 // Permission : Team member file access.
41 DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error)
42 // DevicesListTeamDevices : List all device sessions of a team. Permission :
43 // Team member file access.
44 // Deprecated: Use `DevicesListMembersDevices` instead
45 DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error)
46 // DevicesRevokeDeviceSession : Revoke a device session of a team's member.
47 DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error)
48 // DevicesRevokeDeviceSessionBatch : Revoke a list of device sessions of
49 // team members.
50 DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error)
51 // FeaturesGetValues : Get the values for one or more featues. This route
52 // allows you to check your account's capability for what feature you can
53 // access or what value you have for certain features. Permission : Team
54 // information.
55 FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error)
56 // GetInfo : Retrieves information about a team.
57 GetInfo() (res *TeamGetInfoResult, err error)
58 // GroupsCreate : Creates a new, empty group, with a requested name.
59 // Permission : Team member management.
60 GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error)
61 // GroupsDelete : Deletes a group. The group is deleted immediately. However
62 // the revoking of group-owned resources may take additional time. Use the
63 // `groupsJobStatusGet` to determine whether this process has completed.
64 // Permission : Team member management.
65 GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error)
66 // GroupsGetInfo : Retrieves information about one or more groups. Note that
67 // the optional field `GroupFullInfo.members` is not returned for
68 // system-managed groups. Permission : Team Information.
69 GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error)
70 // GroupsJobStatusGet : Once an async_job_id is returned from
71 // `groupsDelete`, `groupsMembersAdd` , or `groupsMembersRemove` use this
72 // method to poll the status of granting/revoking group members' access to
73 // group-owned resources. Permission : Team member management.
74 GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error)
75 // GroupsList : Lists groups on a team. Permission : Team Information.
76 GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error)
77 // GroupsListContinue : Once a cursor has been retrieved from `groupsList`,
78 // use this to paginate through all groups. Permission : Team Information.
79 GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error)
80 // GroupsMembersAdd : Adds members to a group. The members are added
81 // immediately. However the granting of group-owned resources may take
82 // additional time. Use the `groupsJobStatusGet` to determine whether this
83 // process has completed. Permission : Team member management.
84 GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error)
85 // GroupsMembersList : Lists members of a group. Permission : Team
86 // Information.
87 GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error)
88 // GroupsMembersListContinue : Once a cursor has been retrieved from
89 // `groupsMembersList`, use this to paginate through all members of the
90 // group. Permission : Team information.
91 GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error)
92 // GroupsMembersRemove : Removes members from a group. The members are
93 // removed immediately. However the revoking of group-owned resources may
94 // take additional time. Use the `groupsJobStatusGet` to determine whether
95 // this process has completed. This method permits removing the only owner
96 // of a group, even in cases where this is not possible via the web client.
97 // Permission : Team member management.
98 GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error)
99 // GroupsMembersSetAccessType : Sets a member's access type in a group.
100 // Permission : Team member management.
101 GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error)
102 // GroupsUpdate : Updates a group's name and/or external ID. Permission :
103 // Team member management.
104 GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error)
105 // LinkedAppsListMemberLinkedApps : List all linked applications of the team
106 // member. Note, this endpoint does not list any team-linked applications.
107 LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error)
108 // LinkedAppsListMembersLinkedApps : List all applications linked to the
109 // team members' accounts. Note, this endpoint does not list any team-linked
110 // applications.
111 LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error)
112 // LinkedAppsListTeamLinkedApps : List all applications linked to the team
113 // members' accounts. Note, this endpoint doesn't list any team-linked
114 // applications.
115 // Deprecated: Use `LinkedAppsListMembersLinkedApps` instead
116 LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error)
117 // LinkedAppsRevokeLinkedApp : Revoke a linked application of the team
118 // member.
119 LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error)
120 // LinkedAppsRevokeLinkedAppBatch : Revoke a list of linked applications of
121 // the team members.
122 LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error)
123 // MemberSpaceLimitsExcludedUsersAdd : Add users to member space limits
124 // excluded users list.
125 MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
126 // MemberSpaceLimitsExcludedUsersList : List member space limits excluded
127 // users.
128 MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error)
129 // MemberSpaceLimitsExcludedUsersListContinue : Continue listing member
130 // space limits excluded users.
131 MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error)
132 // MemberSpaceLimitsExcludedUsersRemove : Remove users from member space
133 // limits excluded users list.
134 MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
135 // MemberSpaceLimitsGetCustomQuota : Get users custom quota. Returns none as
136 // the custom quota if none was set. A maximum of 1000 members can be
137 // specified in a single call.
138 MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error)
139 // MemberSpaceLimitsRemoveCustomQuota : Remove users custom quota. A maximum
140 // of 1000 members can be specified in a single call.
141 MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error)
142 // MemberSpaceLimitsSetCustomQuota : Set users custom quota. Custom quota
143 // has to be at least 15GB. A maximum of 1000 members can be specified in a
144 // single call.
145 MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error)
146 // MembersAdd : Adds members to a team. Permission : Team member management
147 // A maximum of 20 members can be specified in a single call. If no Dropbox
148 // account exists with the email address specified, a new Dropbox account
149 // will be created with the given email address, and that account will be
150 // invited to the team. If a personal Dropbox account exists with the email
151 // address specified in the call, this call will create a placeholder
152 // Dropbox account for the user on the team and send an email inviting the
153 // user to migrate their existing personal account onto the team. Team
154 // member management apps are required to set an initial given_name and
155 // surname for a user to use in the team invitation and for 'Perform as team
156 // member' actions taken on the user before they become 'active'.
157 MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error)
158 // MembersAddJobStatusGet : Once an async_job_id is returned from
159 // `membersAdd` , use this to poll the status of the asynchronous request.
160 // Permission : Team member management.
161 MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error)
162 // MembersGetInfo : Returns information about multiple team members.
163 // Permission : Team information This endpoint will return
164 // `MembersGetInfoItem.id_not_found`, for IDs (or emails) that cannot be
165 // matched to a valid team member.
166 MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error)
167 // MembersList : Lists members of a team. Permission : Team information.
168 MembersList(arg *MembersListArg) (res *MembersListResult, err error)
169 // MembersListContinue : Once a cursor has been retrieved from
170 // `membersList`, use this to paginate through all team members. Permission
171 // : Team information.
172 MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error)
173 // MembersMoveFormerMemberFiles : Moves removed member's files to a
174 // different member. This endpoint initiates an asynchronous job. To obtain
175 // the final result of the job, the client should periodically poll
176 // `membersMoveFormerMemberFilesJobStatusCheck`. Permission : Team member
177 // management.
178 MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error)
179 // MembersMoveFormerMemberFilesJobStatusCheck : Once an async_job_id is
180 // returned from `membersMoveFormerMemberFiles` , use this to poll the
181 // status of the asynchronous request. Permission : Team member management.
182 MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error)
183 // MembersRecover : Recover a deleted member. Permission : Team member
184 // management Exactly one of team_member_id, email, or external_id must be
185 // provided to identify the user account.
186 MembersRecover(arg *MembersRecoverArg) (err error)
187 // MembersRemove : Removes a member from a team. Permission : Team member
188 // management Exactly one of team_member_id, email, or external_id must be
189 // provided to identify the user account. Accounts can be recovered via
190 // `membersRecover` for a 7 day period or until the account has been
191 // permanently deleted or transferred to another account (whichever comes
192 // first). Calling `membersAdd` while a user is still recoverable on your
193 // team will return with `MemberAddResult.user_already_on_team`. Accounts
194 // can have their files transferred via the admin console for a limited
195 // time, based on the version history length associated with the team (120
196 // days for most teams). This endpoint may initiate an asynchronous job. To
197 // obtain the final result of the job, the client should periodically poll
198 // `membersRemoveJobStatusGet`.
199 MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error)
200 // MembersRemoveJobStatusGet : Once an async_job_id is returned from
201 // `membersRemove` , use this to poll the status of the asynchronous
202 // request. Permission : Team member management.
203 MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error)
204 // MembersSendWelcomeEmail : Sends welcome email to pending team member.
205 // Permission : Team member management Exactly one of team_member_id, email,
206 // or external_id must be provided to identify the user account. No-op if
207 // team member is not pending.
208 MembersSendWelcomeEmail(arg *UserSelectorArg) (err error)
209 // MembersSetAdminPermissions : Updates a team member's permissions.
210 // Permission : Team member management.
211 MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error)
212 // MembersSetProfile : Updates a team member's profile. Permission : Team
213 // member management.
214 MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error)
215 // MembersSuspend : Suspend a member from a team. Permission : Team member
216 // management Exactly one of team_member_id, email, or external_id must be
217 // provided to identify the user account.
218 MembersSuspend(arg *MembersDeactivateArg) (err error)
219 // MembersUnsuspend : Unsuspend a member from a team. Permission : Team
220 // member management Exactly one of team_member_id, email, or external_id
221 // must be provided to identify the user account.
222 MembersUnsuspend(arg *MembersUnsuspendArg) (err error)
223 // NamespacesList : Returns a list of all team-accessible namespaces. This
224 // list includes team folders, shared folders containing team members, team
225 // members' home namespaces, and team members' app folders. Home namespaces
226 // and app folders are always owned by this team or members of the team, but
227 // shared folders may be owned by other users or other teams. Duplicates may
228 // occur in the list.
229 NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error)
230 // NamespacesListContinue : Once a cursor has been retrieved from
231 // `namespacesList`, use this to paginate through all team-accessible
232 // namespaces. Duplicates may occur in the list.
233 NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error)
234 // PropertiesTemplateAdd : Permission : Team member file access.
235 // Deprecated:
236 PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error)
237 // PropertiesTemplateGet : Permission : Team member file access.
238 // Deprecated:
239 PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error)
240 // PropertiesTemplateList : Permission : Team member file access.
241 // Deprecated:
242 PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error)
243 // PropertiesTemplateUpdate : Permission : Team member file access.
244 // Deprecated:
245 PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error)
246 // ReportsGetActivity : Retrieves reporting data about a team's user
247 // activity.
248 ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error)
249 // ReportsGetDevices : Retrieves reporting data about a team's linked
250 // devices.
251 ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error)
252 // ReportsGetMembership : Retrieves reporting data about a team's
253 // membership.
254 ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error)
255 // ReportsGetStorage : Retrieves reporting data about a team's storage
256 // usage.
257 ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error)
258 // TeamFolderActivate : Sets an archived team folder's status to active.
259 // Permission : Team member file access.
260 TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error)
261 // TeamFolderArchive : Sets an active team folder's status to archived and
262 // removes all folder and file members. Permission : Team member file
263 // access.
264 TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error)
265 // TeamFolderArchiveCheck : Returns the status of an asynchronous job for
266 // archiving a team folder. Permission : Team member file access.
267 TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error)
268 // TeamFolderCreate : Creates a new, active, team folder with no members.
269 // Permission : Team member file access.
270 TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error)
271 // TeamFolderGetInfo : Retrieves metadata for team folders. Permission :
272 // Team member file access.
273 TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error)
274 // TeamFolderList : Lists all team folders. Permission : Team member file
275 // access.
276 TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error)
277 // TeamFolderListContinue : Once a cursor has been retrieved from
278 // `teamFolderList`, use this to paginate through all team folders.
279 // Permission : Team member file access.
280 TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error)
281 // TeamFolderPermanentlyDelete : Permanently deletes an archived team
282 // folder. Permission : Team member file access.
283 TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error)
284 // TeamFolderRename : Changes an active team folder's name. Permission :
285 // Team member file access.
286 TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error)
287 // TeamFolderUpdateSyncSettings : Updates the sync settings on a team folder
288 // or its contents. Use of this endpoint requires that the team has team
289 // selective sync enabled.
290 TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error)
291 // TokenGetAuthenticatedAdmin : Returns the member profile of the admin who
292 // generated the team access token used to make the call.
293 TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error)
294 }
295
296 type apiImpl dropbox.Context
297
298 //DevicesListMemberDevicesAPIError is an error-wrapper for the devices/list_member_devices route
299 type DevicesListMemberDevicesAPIError struct {
300 dropbox.APIError
301 EndpointError *ListMemberDevicesError `json:"error"`
302 }
303
304 func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error) {
305 cli := dbx.Client
306
307 dbx.Config.LogDebug("arg: %v", arg)
308 b, err := json.Marshal(arg)
309 if err != nil {
310 return
311 }
312
313 headers := map[string]string{
314 "Content-Type": "application/json",
315 }
316
317 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_member_devices", headers, bytes.NewReader(b))
318 if err != nil {
319 return
320 }
321 dbx.Config.LogInfo("req: %v", req)
322
323 resp, err := cli.Do(req)
324 if err != nil {
325 return
326 }
327
328 dbx.Config.LogInfo("resp: %v", resp)
329 defer resp.Body.Close()
330 body, err := ioutil.ReadAll(resp.Body)
331 if err != nil {
332 return
333 }
334
335 dbx.Config.LogDebug("body: %s", body)
336 if resp.StatusCode == http.StatusOK {
337 err = json.Unmarshal(body, &res)
338 if err != nil {
339 return
340 }
341
342 return
343 }
344 if resp.StatusCode == http.StatusConflict {
345 var apiError DevicesListMemberDevicesAPIError
346 err = json.Unmarshal(body, &apiError)
347 if err != nil {
348 return
349 }
350 err = apiError
351 return
352 }
353 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
354 if err != nil {
355 return
356 }
357 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
358 return
359 }
360
361 //DevicesListMembersDevicesAPIError is an error-wrapper for the devices/list_members_devices route
362 type DevicesListMembersDevicesAPIError struct {
363 dropbox.APIError
364 EndpointError *ListMembersDevicesError `json:"error"`
365 }
366
367 func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error) {
368 cli := dbx.Client
369
370 dbx.Config.LogDebug("arg: %v", arg)
371 b, err := json.Marshal(arg)
372 if err != nil {
373 return
374 }
375
376 headers := map[string]string{
377 "Content-Type": "application/json",
378 }
379
380 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_members_devices", headers, bytes.NewReader(b))
381 if err != nil {
382 return
383 }
384 dbx.Config.LogInfo("req: %v", req)
385
386 resp, err := cli.Do(req)
387 if err != nil {
388 return
389 }
390
391 dbx.Config.LogInfo("resp: %v", resp)
392 defer resp.Body.Close()
393 body, err := ioutil.ReadAll(resp.Body)
394 if err != nil {
395 return
396 }
397
398 dbx.Config.LogDebug("body: %s", body)
399 if resp.StatusCode == http.StatusOK {
400 err = json.Unmarshal(body, &res)
401 if err != nil {
402 return
403 }
404
405 return
406 }
407 if resp.StatusCode == http.StatusConflict {
408 var apiError DevicesListMembersDevicesAPIError
409 err = json.Unmarshal(body, &apiError)
410 if err != nil {
411 return
412 }
413 err = apiError
414 return
415 }
416 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
417 if err != nil {
418 return
419 }
420 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
421 return
422 }
423
424 //DevicesListTeamDevicesAPIError is an error-wrapper for the devices/list_team_devices route
425 type DevicesListTeamDevicesAPIError struct {
426 dropbox.APIError
427 EndpointError *ListTeamDevicesError `json:"error"`
428 }
429
430 func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error) {
431 log.Printf("WARNING: API `DevicesListTeamDevices` is deprecated")
432 log.Printf("Use API `DevicesListMembersDevices` instead")
433
434 cli := dbx.Client
435
436 dbx.Config.LogDebug("arg: %v", arg)
437 b, err := json.Marshal(arg)
438 if err != nil {
439 return
440 }
441
442 headers := map[string]string{
443 "Content-Type": "application/json",
444 }
445
446 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_team_devices", headers, bytes.NewReader(b))
447 if err != nil {
448 return
449 }
450 dbx.Config.LogInfo("req: %v", req)
451
452 resp, err := cli.Do(req)
453 if err != nil {
454 return
455 }
456
457 dbx.Config.LogInfo("resp: %v", resp)
458 defer resp.Body.Close()
459 body, err := ioutil.ReadAll(resp.Body)
460 if err != nil {
461 return
462 }
463
464 dbx.Config.LogDebug("body: %s", body)
465 if resp.StatusCode == http.StatusOK {
466 err = json.Unmarshal(body, &res)
467 if err != nil {
468 return
469 }
470
471 return
472 }
473 if resp.StatusCode == http.StatusConflict {
474 var apiError DevicesListTeamDevicesAPIError
475 err = json.Unmarshal(body, &apiError)
476 if err != nil {
477 return
478 }
479 err = apiError
480 return
481 }
482 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
483 if err != nil {
484 return
485 }
486 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
487 return
488 }
489
490 //DevicesRevokeDeviceSessionAPIError is an error-wrapper for the devices/revoke_device_session route
491 type DevicesRevokeDeviceSessionAPIError struct {
492 dropbox.APIError
493 EndpointError *RevokeDeviceSessionError `json:"error"`
494 }
495
496 func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error) {
497 cli := dbx.Client
498
499 dbx.Config.LogDebug("arg: %v", arg)
500 b, err := json.Marshal(arg)
501 if err != nil {
502 return
503 }
504
505 headers := map[string]string{
506 "Content-Type": "application/json",
507 }
508
509 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/revoke_device_session", headers, bytes.NewReader(b))
510 if err != nil {
511 return
512 }
513 dbx.Config.LogInfo("req: %v", req)
514
515 resp, err := cli.Do(req)
516 if err != nil {
517 return
518 }
519
520 dbx.Config.LogInfo("resp: %v", resp)
521 defer resp.Body.Close()
522 body, err := ioutil.ReadAll(resp.Body)
523 if err != nil {
524 return
525 }
526
527 dbx.Config.LogDebug("body: %s", body)
528 if resp.StatusCode == http.StatusOK {
529 return
530 }
531 if resp.StatusCode == http.StatusConflict {
532 var apiError DevicesRevokeDeviceSessionAPIError
533 err = json.Unmarshal(body, &apiError)
534 if err != nil {
535 return
536 }
537 err = apiError
538 return
539 }
540 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
541 if err != nil {
542 return
543 }
544 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
545 return
546 }
547
548 //DevicesRevokeDeviceSessionBatchAPIError is an error-wrapper for the devices/revoke_device_session_batch route
549 type DevicesRevokeDeviceSessionBatchAPIError struct {
550 dropbox.APIError
551 EndpointError *RevokeDeviceSessionBatchError `json:"error"`
552 }
553
554 func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error) {
555 cli := dbx.Client
556
557 dbx.Config.LogDebug("arg: %v", arg)
558 b, err := json.Marshal(arg)
559 if err != nil {
560 return
561 }
562
563 headers := map[string]string{
564 "Content-Type": "application/json",
565 }
566
567 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/revoke_device_session_batch", headers, bytes.NewReader(b))
568 if err != nil {
569 return
570 }
571 dbx.Config.LogInfo("req: %v", req)
572
573 resp, err := cli.Do(req)
574 if err != nil {
575 return
576 }
577
578 dbx.Config.LogInfo("resp: %v", resp)
579 defer resp.Body.Close()
580 body, err := ioutil.ReadAll(resp.Body)
581 if err != nil {
582 return
583 }
584
585 dbx.Config.LogDebug("body: %s", body)
586 if resp.StatusCode == http.StatusOK {
587 err = json.Unmarshal(body, &res)
588 if err != nil {
589 return
590 }
591
592 return
593 }
594 if resp.StatusCode == http.StatusConflict {
595 var apiError DevicesRevokeDeviceSessionBatchAPIError
596 err = json.Unmarshal(body, &apiError)
597 if err != nil {
598 return
599 }
600 err = apiError
601 return
602 }
603 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
604 if err != nil {
605 return
606 }
607 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
608 return
609 }
610
611 //FeaturesGetValuesAPIError is an error-wrapper for the features/get_values route
612 type FeaturesGetValuesAPIError struct {
613 dropbox.APIError
614 EndpointError *FeaturesGetValuesBatchError `json:"error"`
615 }
616
617 func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error) {
618 cli := dbx.Client
619
620 dbx.Config.LogDebug("arg: %v", arg)
621 b, err := json.Marshal(arg)
622 if err != nil {
623 return
624 }
625
626 headers := map[string]string{
627 "Content-Type": "application/json",
628 }
629
630 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "features/get_values", headers, bytes.NewReader(b))
631 if err != nil {
632 return
633 }
634 dbx.Config.LogInfo("req: %v", req)
635
636 resp, err := cli.Do(req)
637 if err != nil {
638 return
639 }
640
641 dbx.Config.LogInfo("resp: %v", resp)
642 defer resp.Body.Close()
643 body, err := ioutil.ReadAll(resp.Body)
644 if err != nil {
645 return
646 }
647
648 dbx.Config.LogDebug("body: %s", body)
649 if resp.StatusCode == http.StatusOK {
650 err = json.Unmarshal(body, &res)
651 if err != nil {
652 return
653 }
654
655 return
656 }
657 if resp.StatusCode == http.StatusConflict {
658 var apiError FeaturesGetValuesAPIError
659 err = json.Unmarshal(body, &apiError)
660 if err != nil {
661 return
662 }
663 err = apiError
664 return
665 }
666 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
667 if err != nil {
668 return
669 }
670 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
671 return
672 }
673
674 //GetInfoAPIError is an error-wrapper for the get_info route
675 type GetInfoAPIError struct {
676 dropbox.APIError
677 EndpointError struct{} `json:"error"`
678 }
679
680 func (dbx *apiImpl) GetInfo() (res *TeamGetInfoResult, err error) {
681 cli := dbx.Client
682
683 headers := map[string]string{}
684
685 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "get_info", headers, nil)
686 if err != nil {
687 return
688 }
689 dbx.Config.LogInfo("req: %v", req)
690
691 resp, err := cli.Do(req)
692 if err != nil {
693 return
694 }
695
696 dbx.Config.LogInfo("resp: %v", resp)
697 defer resp.Body.Close()
698 body, err := ioutil.ReadAll(resp.Body)
699 if err != nil {
700 return
701 }
702
703 dbx.Config.LogDebug("body: %s", body)
704 if resp.StatusCode == http.StatusOK {
705 err = json.Unmarshal(body, &res)
706 if err != nil {
707 return
708 }
709
710 return
711 }
712 if resp.StatusCode == http.StatusConflict {
713 var apiError GetInfoAPIError
714 err = json.Unmarshal(body, &apiError)
715 if err != nil {
716 return
717 }
718 err = apiError
719 return
720 }
721 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
722 if err != nil {
723 return
724 }
725 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
726 return
727 }
728
729 //GroupsCreateAPIError is an error-wrapper for the groups/create route
730 type GroupsCreateAPIError struct {
731 dropbox.APIError
732 EndpointError *GroupCreateError `json:"error"`
733 }
734
735 func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error) {
736 cli := dbx.Client
737
738 dbx.Config.LogDebug("arg: %v", arg)
739 b, err := json.Marshal(arg)
740 if err != nil {
741 return
742 }
743
744 headers := map[string]string{
745 "Content-Type": "application/json",
746 }
747
748 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/create", headers, bytes.NewReader(b))
749 if err != nil {
750 return
751 }
752 dbx.Config.LogInfo("req: %v", req)
753
754 resp, err := cli.Do(req)
755 if err != nil {
756 return
757 }
758
759 dbx.Config.LogInfo("resp: %v", resp)
760 defer resp.Body.Close()
761 body, err := ioutil.ReadAll(resp.Body)
762 if err != nil {
763 return
764 }
765
766 dbx.Config.LogDebug("body: %s", body)
767 if resp.StatusCode == http.StatusOK {
768 err = json.Unmarshal(body, &res)
769 if err != nil {
770 return
771 }
772
773 return
774 }
775 if resp.StatusCode == http.StatusConflict {
776 var apiError GroupsCreateAPIError
777 err = json.Unmarshal(body, &apiError)
778 if err != nil {
779 return
780 }
781 err = apiError
782 return
783 }
784 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
785 if err != nil {
786 return
787 }
788 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
789 return
790 }
791
792 //GroupsDeleteAPIError is an error-wrapper for the groups/delete route
793 type GroupsDeleteAPIError struct {
794 dropbox.APIError
795 EndpointError *GroupDeleteError `json:"error"`
796 }
797
798 func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error) {
799 cli := dbx.Client
800
801 dbx.Config.LogDebug("arg: %v", arg)
802 b, err := json.Marshal(arg)
803 if err != nil {
804 return
805 }
806
807 headers := map[string]string{
808 "Content-Type": "application/json",
809 }
810
811 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/delete", headers, bytes.NewReader(b))
812 if err != nil {
813 return
814 }
815 dbx.Config.LogInfo("req: %v", req)
816
817 resp, err := cli.Do(req)
818 if err != nil {
819 return
820 }
821
822 dbx.Config.LogInfo("resp: %v", resp)
823 defer resp.Body.Close()
824 body, err := ioutil.ReadAll(resp.Body)
825 if err != nil {
826 return
827 }
828
829 dbx.Config.LogDebug("body: %s", body)
830 if resp.StatusCode == http.StatusOK {
831 err = json.Unmarshal(body, &res)
832 if err != nil {
833 return
834 }
835
836 return
837 }
838 if resp.StatusCode == http.StatusConflict {
839 var apiError GroupsDeleteAPIError
840 err = json.Unmarshal(body, &apiError)
841 if err != nil {
842 return
843 }
844 err = apiError
845 return
846 }
847 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
848 if err != nil {
849 return
850 }
851 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
852 return
853 }
854
855 //GroupsGetInfoAPIError is an error-wrapper for the groups/get_info route
856 type GroupsGetInfoAPIError struct {
857 dropbox.APIError
858 EndpointError *GroupsGetInfoError `json:"error"`
859 }
860
861 func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error) {
862 cli := dbx.Client
863
864 dbx.Config.LogDebug("arg: %v", arg)
865 b, err := json.Marshal(arg)
866 if err != nil {
867 return
868 }
869
870 headers := map[string]string{
871 "Content-Type": "application/json",
872 }
873
874 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/get_info", headers, bytes.NewReader(b))
875 if err != nil {
876 return
877 }
878 dbx.Config.LogInfo("req: %v", req)
879
880 resp, err := cli.Do(req)
881 if err != nil {
882 return
883 }
884
885 dbx.Config.LogInfo("resp: %v", resp)
886 defer resp.Body.Close()
887 body, err := ioutil.ReadAll(resp.Body)
888 if err != nil {
889 return
890 }
891
892 dbx.Config.LogDebug("body: %s", body)
893 if resp.StatusCode == http.StatusOK {
894 err = json.Unmarshal(body, &res)
895 if err != nil {
896 return
897 }
898
899 return
900 }
901 if resp.StatusCode == http.StatusConflict {
902 var apiError GroupsGetInfoAPIError
903 err = json.Unmarshal(body, &apiError)
904 if err != nil {
905 return
906 }
907 err = apiError
908 return
909 }
910 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
911 if err != nil {
912 return
913 }
914 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
915 return
916 }
917
918 //GroupsJobStatusGetAPIError is an error-wrapper for the groups/job_status/get route
919 type GroupsJobStatusGetAPIError struct {
920 dropbox.APIError
921 EndpointError *GroupsPollError `json:"error"`
922 }
923
924 func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
925 cli := dbx.Client
926
927 dbx.Config.LogDebug("arg: %v", arg)
928 b, err := json.Marshal(arg)
929 if err != nil {
930 return
931 }
932
933 headers := map[string]string{
934 "Content-Type": "application/json",
935 }
936
937 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/job_status/get", headers, bytes.NewReader(b))
938 if err != nil {
939 return
940 }
941 dbx.Config.LogInfo("req: %v", req)
942
943 resp, err := cli.Do(req)
944 if err != nil {
945 return
946 }
947
948 dbx.Config.LogInfo("resp: %v", resp)
949 defer resp.Body.Close()
950 body, err := ioutil.ReadAll(resp.Body)
951 if err != nil {
952 return
953 }
954
955 dbx.Config.LogDebug("body: %s", body)
956 if resp.StatusCode == http.StatusOK {
957 err = json.Unmarshal(body, &res)
958 if err != nil {
959 return
960 }
961
962 return
963 }
964 if resp.StatusCode == http.StatusConflict {
965 var apiError GroupsJobStatusGetAPIError
966 err = json.Unmarshal(body, &apiError)
967 if err != nil {
968 return
969 }
970 err = apiError
971 return
972 }
973 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
974 if err != nil {
975 return
976 }
977 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
978 return
979 }
980
981 //GroupsListAPIError is an error-wrapper for the groups/list route
982 type GroupsListAPIError struct {
983 dropbox.APIError
984 EndpointError struct{} `json:"error"`
985 }
986
987 func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error) {
988 cli := dbx.Client
989
990 dbx.Config.LogDebug("arg: %v", arg)
991 b, err := json.Marshal(arg)
992 if err != nil {
993 return
994 }
995
996 headers := map[string]string{
997 "Content-Type": "application/json",
998 }
999
1000 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/list", headers, bytes.NewReader(b))
1001 if err != nil {
1002 return
1003 }
1004 dbx.Config.LogInfo("req: %v", req)
1005
1006 resp, err := cli.Do(req)
1007 if err != nil {
1008 return
1009 }
1010
1011 dbx.Config.LogInfo("resp: %v", resp)
1012 defer resp.Body.Close()
1013 body, err := ioutil.ReadAll(resp.Body)
1014 if err != nil {
1015 return
1016 }
1017
1018 dbx.Config.LogDebug("body: %s", body)
1019 if resp.StatusCode == http.StatusOK {
1020 err = json.Unmarshal(body, &res)
1021 if err != nil {
1022 return
1023 }
1024
1025 return
1026 }
1027 if resp.StatusCode == http.StatusConflict {
1028 var apiError GroupsListAPIError
1029 err = json.Unmarshal(body, &apiError)
1030 if err != nil {
1031 return
1032 }
1033 err = apiError
1034 return
1035 }
1036 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1037 if err != nil {
1038 return
1039 }
1040 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1041 return
1042 }
1043
1044 //GroupsListContinueAPIError is an error-wrapper for the groups/list/continue route
1045 type GroupsListContinueAPIError struct {
1046 dropbox.APIError
1047 EndpointError *GroupsListContinueError `json:"error"`
1048 }
1049
1050 func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error) {
1051 cli := dbx.Client
1052
1053 dbx.Config.LogDebug("arg: %v", arg)
1054 b, err := json.Marshal(arg)
1055 if err != nil {
1056 return
1057 }
1058
1059 headers := map[string]string{
1060 "Content-Type": "application/json",
1061 }
1062
1063 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/list/continue", headers, bytes.NewReader(b))
1064 if err != nil {
1065 return
1066 }
1067 dbx.Config.LogInfo("req: %v", req)
1068
1069 resp, err := cli.Do(req)
1070 if err != nil {
1071 return
1072 }
1073
1074 dbx.Config.LogInfo("resp: %v", resp)
1075 defer resp.Body.Close()
1076 body, err := ioutil.ReadAll(resp.Body)
1077 if err != nil {
1078 return
1079 }
1080
1081 dbx.Config.LogDebug("body: %s", body)
1082 if resp.StatusCode == http.StatusOK {
1083 err = json.Unmarshal(body, &res)
1084 if err != nil {
1085 return
1086 }
1087
1088 return
1089 }
1090 if resp.StatusCode == http.StatusConflict {
1091 var apiError GroupsListContinueAPIError
1092 err = json.Unmarshal(body, &apiError)
1093 if err != nil {
1094 return
1095 }
1096 err = apiError
1097 return
1098 }
1099 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1100 if err != nil {
1101 return
1102 }
1103 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1104 return
1105 }
1106
1107 //GroupsMembersAddAPIError is an error-wrapper for the groups/members/add route
1108 type GroupsMembersAddAPIError struct {
1109 dropbox.APIError
1110 EndpointError *GroupMembersAddError `json:"error"`
1111 }
1112
1113 func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error) {
1114 cli := dbx.Client
1115
1116 dbx.Config.LogDebug("arg: %v", arg)
1117 b, err := json.Marshal(arg)
1118 if err != nil {
1119 return
1120 }
1121
1122 headers := map[string]string{
1123 "Content-Type": "application/json",
1124 }
1125
1126 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/add", headers, bytes.NewReader(b))
1127 if err != nil {
1128 return
1129 }
1130 dbx.Config.LogInfo("req: %v", req)
1131
1132 resp, err := cli.Do(req)
1133 if err != nil {
1134 return
1135 }
1136
1137 dbx.Config.LogInfo("resp: %v", resp)
1138 defer resp.Body.Close()
1139 body, err := ioutil.ReadAll(resp.Body)
1140 if err != nil {
1141 return
1142 }
1143
1144 dbx.Config.LogDebug("body: %s", body)
1145 if resp.StatusCode == http.StatusOK {
1146 err = json.Unmarshal(body, &res)
1147 if err != nil {
1148 return
1149 }
1150
1151 return
1152 }
1153 if resp.StatusCode == http.StatusConflict {
1154 var apiError GroupsMembersAddAPIError
1155 err = json.Unmarshal(body, &apiError)
1156 if err != nil {
1157 return
1158 }
1159 err = apiError
1160 return
1161 }
1162 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1163 if err != nil {
1164 return
1165 }
1166 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1167 return
1168 }
1169
1170 //GroupsMembersListAPIError is an error-wrapper for the groups/members/list route
1171 type GroupsMembersListAPIError struct {
1172 dropbox.APIError
1173 EndpointError *GroupSelectorError `json:"error"`
1174 }
1175
1176 func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error) {
1177 cli := dbx.Client
1178
1179 dbx.Config.LogDebug("arg: %v", arg)
1180 b, err := json.Marshal(arg)
1181 if err != nil {
1182 return
1183 }
1184
1185 headers := map[string]string{
1186 "Content-Type": "application/json",
1187 }
1188
1189 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/list", headers, bytes.NewReader(b))
1190 if err != nil {
1191 return
1192 }
1193 dbx.Config.LogInfo("req: %v", req)
1194
1195 resp, err := cli.Do(req)
1196 if err != nil {
1197 return
1198 }
1199
1200 dbx.Config.LogInfo("resp: %v", resp)
1201 defer resp.Body.Close()
1202 body, err := ioutil.ReadAll(resp.Body)
1203 if err != nil {
1204 return
1205 }
1206
1207 dbx.Config.LogDebug("body: %s", body)
1208 if resp.StatusCode == http.StatusOK {
1209 err = json.Unmarshal(body, &res)
1210 if err != nil {
1211 return
1212 }
1213
1214 return
1215 }
1216 if resp.StatusCode == http.StatusConflict {
1217 var apiError GroupsMembersListAPIError
1218 err = json.Unmarshal(body, &apiError)
1219 if err != nil {
1220 return
1221 }
1222 err = apiError
1223 return
1224 }
1225 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1226 if err != nil {
1227 return
1228 }
1229 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1230 return
1231 }
1232
1233 //GroupsMembersListContinueAPIError is an error-wrapper for the groups/members/list/continue route
1234 type GroupsMembersListContinueAPIError struct {
1235 dropbox.APIError
1236 EndpointError *GroupsMembersListContinueError `json:"error"`
1237 }
1238
1239 func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error) {
1240 cli := dbx.Client
1241
1242 dbx.Config.LogDebug("arg: %v", arg)
1243 b, err := json.Marshal(arg)
1244 if err != nil {
1245 return
1246 }
1247
1248 headers := map[string]string{
1249 "Content-Type": "application/json",
1250 }
1251
1252 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/list/continue", headers, bytes.NewReader(b))
1253 if err != nil {
1254 return
1255 }
1256 dbx.Config.LogInfo("req: %v", req)
1257
1258 resp, err := cli.Do(req)
1259 if err != nil {
1260 return
1261 }
1262
1263 dbx.Config.LogInfo("resp: %v", resp)
1264 defer resp.Body.Close()
1265 body, err := ioutil.ReadAll(resp.Body)
1266 if err != nil {
1267 return
1268 }
1269
1270 dbx.Config.LogDebug("body: %s", body)
1271 if resp.StatusCode == http.StatusOK {
1272 err = json.Unmarshal(body, &res)
1273 if err != nil {
1274 return
1275 }
1276
1277 return
1278 }
1279 if resp.StatusCode == http.StatusConflict {
1280 var apiError GroupsMembersListContinueAPIError
1281 err = json.Unmarshal(body, &apiError)
1282 if err != nil {
1283 return
1284 }
1285 err = apiError
1286 return
1287 }
1288 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1289 if err != nil {
1290 return
1291 }
1292 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1293 return
1294 }
1295
1296 //GroupsMembersRemoveAPIError is an error-wrapper for the groups/members/remove route
1297 type GroupsMembersRemoveAPIError struct {
1298 dropbox.APIError
1299 EndpointError *GroupMembersRemoveError `json:"error"`
1300 }
1301
1302 func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error) {
1303 cli := dbx.Client
1304
1305 dbx.Config.LogDebug("arg: %v", arg)
1306 b, err := json.Marshal(arg)
1307 if err != nil {
1308 return
1309 }
1310
1311 headers := map[string]string{
1312 "Content-Type": "application/json",
1313 }
1314
1315 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/remove", headers, bytes.NewReader(b))
1316 if err != nil {
1317 return
1318 }
1319 dbx.Config.LogInfo("req: %v", req)
1320
1321 resp, err := cli.Do(req)
1322 if err != nil {
1323 return
1324 }
1325
1326 dbx.Config.LogInfo("resp: %v", resp)
1327 defer resp.Body.Close()
1328 body, err := ioutil.ReadAll(resp.Body)
1329 if err != nil {
1330 return
1331 }
1332
1333 dbx.Config.LogDebug("body: %s", body)
1334 if resp.StatusCode == http.StatusOK {
1335 err = json.Unmarshal(body, &res)
1336 if err != nil {
1337 return
1338 }
1339
1340 return
1341 }
1342 if resp.StatusCode == http.StatusConflict {
1343 var apiError GroupsMembersRemoveAPIError
1344 err = json.Unmarshal(body, &apiError)
1345 if err != nil {
1346 return
1347 }
1348 err = apiError
1349 return
1350 }
1351 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1352 if err != nil {
1353 return
1354 }
1355 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1356 return
1357 }
1358
1359 //GroupsMembersSetAccessTypeAPIError is an error-wrapper for the groups/members/set_access_type route
1360 type GroupsMembersSetAccessTypeAPIError struct {
1361 dropbox.APIError
1362 EndpointError *GroupMemberSetAccessTypeError `json:"error"`
1363 }
1364
1365 func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error) {
1366 cli := dbx.Client
1367
1368 dbx.Config.LogDebug("arg: %v", arg)
1369 b, err := json.Marshal(arg)
1370 if err != nil {
1371 return
1372 }
1373
1374 headers := map[string]string{
1375 "Content-Type": "application/json",
1376 }
1377
1378 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/set_access_type", headers, bytes.NewReader(b))
1379 if err != nil {
1380 return
1381 }
1382 dbx.Config.LogInfo("req: %v", req)
1383
1384 resp, err := cli.Do(req)
1385 if err != nil {
1386 return
1387 }
1388
1389 dbx.Config.LogInfo("resp: %v", resp)
1390 defer resp.Body.Close()
1391 body, err := ioutil.ReadAll(resp.Body)
1392 if err != nil {
1393 return
1394 }
1395
1396 dbx.Config.LogDebug("body: %s", body)
1397 if resp.StatusCode == http.StatusOK {
1398 err = json.Unmarshal(body, &res)
1399 if err != nil {
1400 return
1401 }
1402
1403 return
1404 }
1405 if resp.StatusCode == http.StatusConflict {
1406 var apiError GroupsMembersSetAccessTypeAPIError
1407 err = json.Unmarshal(body, &apiError)
1408 if err != nil {
1409 return
1410 }
1411 err = apiError
1412 return
1413 }
1414 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1415 if err != nil {
1416 return
1417 }
1418 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1419 return
1420 }
1421
1422 //GroupsUpdateAPIError is an error-wrapper for the groups/update route
1423 type GroupsUpdateAPIError struct {
1424 dropbox.APIError
1425 EndpointError *GroupUpdateError `json:"error"`
1426 }
1427
1428 func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error) {
1429 cli := dbx.Client
1430
1431 dbx.Config.LogDebug("arg: %v", arg)
1432 b, err := json.Marshal(arg)
1433 if err != nil {
1434 return
1435 }
1436
1437 headers := map[string]string{
1438 "Content-Type": "application/json",
1439 }
1440
1441 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/update", headers, bytes.NewReader(b))
1442 if err != nil {
1443 return
1444 }
1445 dbx.Config.LogInfo("req: %v", req)
1446
1447 resp, err := cli.Do(req)
1448 if err != nil {
1449 return
1450 }
1451
1452 dbx.Config.LogInfo("resp: %v", resp)
1453 defer resp.Body.Close()
1454 body, err := ioutil.ReadAll(resp.Body)
1455 if err != nil {
1456 return
1457 }
1458
1459 dbx.Config.LogDebug("body: %s", body)
1460 if resp.StatusCode == http.StatusOK {
1461 err = json.Unmarshal(body, &res)
1462 if err != nil {
1463 return
1464 }
1465
1466 return
1467 }
1468 if resp.StatusCode == http.StatusConflict {
1469 var apiError GroupsUpdateAPIError
1470 err = json.Unmarshal(body, &apiError)
1471 if err != nil {
1472 return
1473 }
1474 err = apiError
1475 return
1476 }
1477 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1478 if err != nil {
1479 return
1480 }
1481 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1482 return
1483 }
1484
1485 //LinkedAppsListMemberLinkedAppsAPIError is an error-wrapper for the linked_apps/list_member_linked_apps route
1486 type LinkedAppsListMemberLinkedAppsAPIError struct {
1487 dropbox.APIError
1488 EndpointError *ListMemberAppsError `json:"error"`
1489 }
1490
1491 func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error) {
1492 cli := dbx.Client
1493
1494 dbx.Config.LogDebug("arg: %v", arg)
1495 b, err := json.Marshal(arg)
1496 if err != nil {
1497 return
1498 }
1499
1500 headers := map[string]string{
1501 "Content-Type": "application/json",
1502 }
1503
1504 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_member_linked_apps", headers, bytes.NewReader(b))
1505 if err != nil {
1506 return
1507 }
1508 dbx.Config.LogInfo("req: %v", req)
1509
1510 resp, err := cli.Do(req)
1511 if err != nil {
1512 return
1513 }
1514
1515 dbx.Config.LogInfo("resp: %v", resp)
1516 defer resp.Body.Close()
1517 body, err := ioutil.ReadAll(resp.Body)
1518 if err != nil {
1519 return
1520 }
1521
1522 dbx.Config.LogDebug("body: %s", body)
1523 if resp.StatusCode == http.StatusOK {
1524 err = json.Unmarshal(body, &res)
1525 if err != nil {
1526 return
1527 }
1528
1529 return
1530 }
1531 if resp.StatusCode == http.StatusConflict {
1532 var apiError LinkedAppsListMemberLinkedAppsAPIError
1533 err = json.Unmarshal(body, &apiError)
1534 if err != nil {
1535 return
1536 }
1537 err = apiError
1538 return
1539 }
1540 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1541 if err != nil {
1542 return
1543 }
1544 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1545 return
1546 }
1547
1548 //LinkedAppsListMembersLinkedAppsAPIError is an error-wrapper for the linked_apps/list_members_linked_apps route
1549 type LinkedAppsListMembersLinkedAppsAPIError struct {
1550 dropbox.APIError
1551 EndpointError *ListMembersAppsError `json:"error"`
1552 }
1553
1554 func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error) {
1555 cli := dbx.Client
1556
1557 dbx.Config.LogDebug("arg: %v", arg)
1558 b, err := json.Marshal(arg)
1559 if err != nil {
1560 return
1561 }
1562
1563 headers := map[string]string{
1564 "Content-Type": "application/json",
1565 }
1566
1567 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_members_linked_apps", headers, bytes.NewReader(b))
1568 if err != nil {
1569 return
1570 }
1571 dbx.Config.LogInfo("req: %v", req)
1572
1573 resp, err := cli.Do(req)
1574 if err != nil {
1575 return
1576 }
1577
1578 dbx.Config.LogInfo("resp: %v", resp)
1579 defer resp.Body.Close()
1580 body, err := ioutil.ReadAll(resp.Body)
1581 if err != nil {
1582 return
1583 }
1584
1585 dbx.Config.LogDebug("body: %s", body)
1586 if resp.StatusCode == http.StatusOK {
1587 err = json.Unmarshal(body, &res)
1588 if err != nil {
1589 return
1590 }
1591
1592 return
1593 }
1594 if resp.StatusCode == http.StatusConflict {
1595 var apiError LinkedAppsListMembersLinkedAppsAPIError
1596 err = json.Unmarshal(body, &apiError)
1597 if err != nil {
1598 return
1599 }
1600 err = apiError
1601 return
1602 }
1603 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1604 if err != nil {
1605 return
1606 }
1607 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1608 return
1609 }
1610
1611 //LinkedAppsListTeamLinkedAppsAPIError is an error-wrapper for the linked_apps/list_team_linked_apps route
1612 type LinkedAppsListTeamLinkedAppsAPIError struct {
1613 dropbox.APIError
1614 EndpointError *ListTeamAppsError `json:"error"`
1615 }
1616
1617 func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error) {
1618 log.Printf("WARNING: API `LinkedAppsListTeamLinkedApps` is deprecated")
1619 log.Printf("Use API `LinkedAppsListMembersLinkedApps` instead")
1620
1621 cli := dbx.Client
1622
1623 dbx.Config.LogDebug("arg: %v", arg)
1624 b, err := json.Marshal(arg)
1625 if err != nil {
1626 return
1627 }
1628
1629 headers := map[string]string{
1630 "Content-Type": "application/json",
1631 }
1632
1633 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_team_linked_apps", headers, bytes.NewReader(b))
1634 if err != nil {
1635 return
1636 }
1637 dbx.Config.LogInfo("req: %v", req)
1638
1639 resp, err := cli.Do(req)
1640 if err != nil {
1641 return
1642 }
1643
1644 dbx.Config.LogInfo("resp: %v", resp)
1645 defer resp.Body.Close()
1646 body, err := ioutil.ReadAll(resp.Body)
1647 if err != nil {
1648 return
1649 }
1650
1651 dbx.Config.LogDebug("body: %s", body)
1652 if resp.StatusCode == http.StatusOK {
1653 err = json.Unmarshal(body, &res)
1654 if err != nil {
1655 return
1656 }
1657
1658 return
1659 }
1660 if resp.StatusCode == http.StatusConflict {
1661 var apiError LinkedAppsListTeamLinkedAppsAPIError
1662 err = json.Unmarshal(body, &apiError)
1663 if err != nil {
1664 return
1665 }
1666 err = apiError
1667 return
1668 }
1669 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1670 if err != nil {
1671 return
1672 }
1673 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1674 return
1675 }
1676
1677 //LinkedAppsRevokeLinkedAppAPIError is an error-wrapper for the linked_apps/revoke_linked_app route
1678 type LinkedAppsRevokeLinkedAppAPIError struct {
1679 dropbox.APIError
1680 EndpointError *RevokeLinkedAppError `json:"error"`
1681 }
1682
1683 func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error) {
1684 cli := dbx.Client
1685
1686 dbx.Config.LogDebug("arg: %v", arg)
1687 b, err := json.Marshal(arg)
1688 if err != nil {
1689 return
1690 }
1691
1692 headers := map[string]string{
1693 "Content-Type": "application/json",
1694 }
1695
1696 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/revoke_linked_app", headers, bytes.NewReader(b))
1697 if err != nil {
1698 return
1699 }
1700 dbx.Config.LogInfo("req: %v", req)
1701
1702 resp, err := cli.Do(req)
1703 if err != nil {
1704 return
1705 }
1706
1707 dbx.Config.LogInfo("resp: %v", resp)
1708 defer resp.Body.Close()
1709 body, err := ioutil.ReadAll(resp.Body)
1710 if err != nil {
1711 return
1712 }
1713
1714 dbx.Config.LogDebug("body: %s", body)
1715 if resp.StatusCode == http.StatusOK {
1716 return
1717 }
1718 if resp.StatusCode == http.StatusConflict {
1719 var apiError LinkedAppsRevokeLinkedAppAPIError
1720 err = json.Unmarshal(body, &apiError)
1721 if err != nil {
1722 return
1723 }
1724 err = apiError
1725 return
1726 }
1727 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1728 if err != nil {
1729 return
1730 }
1731 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1732 return
1733 }
1734
1735 //LinkedAppsRevokeLinkedAppBatchAPIError is an error-wrapper for the linked_apps/revoke_linked_app_batch route
1736 type LinkedAppsRevokeLinkedAppBatchAPIError struct {
1737 dropbox.APIError
1738 EndpointError *RevokeLinkedAppBatchError `json:"error"`
1739 }
1740
1741 func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error) {
1742 cli := dbx.Client
1743
1744 dbx.Config.LogDebug("arg: %v", arg)
1745 b, err := json.Marshal(arg)
1746 if err != nil {
1747 return
1748 }
1749
1750 headers := map[string]string{
1751 "Content-Type": "application/json",
1752 }
1753
1754 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/revoke_linked_app_batch", headers, bytes.NewReader(b))
1755 if err != nil {
1756 return
1757 }
1758 dbx.Config.LogInfo("req: %v", req)
1759
1760 resp, err := cli.Do(req)
1761 if err != nil {
1762 return
1763 }
1764
1765 dbx.Config.LogInfo("resp: %v", resp)
1766 defer resp.Body.Close()
1767 body, err := ioutil.ReadAll(resp.Body)
1768 if err != nil {
1769 return
1770 }
1771
1772 dbx.Config.LogDebug("body: %s", body)
1773 if resp.StatusCode == http.StatusOK {
1774 err = json.Unmarshal(body, &res)
1775 if err != nil {
1776 return
1777 }
1778
1779 return
1780 }
1781 if resp.StatusCode == http.StatusConflict {
1782 var apiError LinkedAppsRevokeLinkedAppBatchAPIError
1783 err = json.Unmarshal(body, &apiError)
1784 if err != nil {
1785 return
1786 }
1787 err = apiError
1788 return
1789 }
1790 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1791 if err != nil {
1792 return
1793 }
1794 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1795 return
1796 }
1797
1798 //MemberSpaceLimitsExcludedUsersAddAPIError is an error-wrapper for the member_space_limits/excluded_users/add route
1799 type MemberSpaceLimitsExcludedUsersAddAPIError struct {
1800 dropbox.APIError
1801 EndpointError *ExcludedUsersUpdateError `json:"error"`
1802 }
1803
1804 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
1805 cli := dbx.Client
1806
1807 dbx.Config.LogDebug("arg: %v", arg)
1808 b, err := json.Marshal(arg)
1809 if err != nil {
1810 return
1811 }
1812
1813 headers := map[string]string{
1814 "Content-Type": "application/json",
1815 }
1816
1817 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/add", headers, bytes.NewReader(b))
1818 if err != nil {
1819 return
1820 }
1821 dbx.Config.LogInfo("req: %v", req)
1822
1823 resp, err := cli.Do(req)
1824 if err != nil {
1825 return
1826 }
1827
1828 dbx.Config.LogInfo("resp: %v", resp)
1829 defer resp.Body.Close()
1830 body, err := ioutil.ReadAll(resp.Body)
1831 if err != nil {
1832 return
1833 }
1834
1835 dbx.Config.LogDebug("body: %s", body)
1836 if resp.StatusCode == http.StatusOK {
1837 err = json.Unmarshal(body, &res)
1838 if err != nil {
1839 return
1840 }
1841
1842 return
1843 }
1844 if resp.StatusCode == http.StatusConflict {
1845 var apiError MemberSpaceLimitsExcludedUsersAddAPIError
1846 err = json.Unmarshal(body, &apiError)
1847 if err != nil {
1848 return
1849 }
1850 err = apiError
1851 return
1852 }
1853 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1854 if err != nil {
1855 return
1856 }
1857 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1858 return
1859 }
1860
1861 //MemberSpaceLimitsExcludedUsersListAPIError is an error-wrapper for the member_space_limits/excluded_users/list route
1862 type MemberSpaceLimitsExcludedUsersListAPIError struct {
1863 dropbox.APIError
1864 EndpointError *ExcludedUsersListError `json:"error"`
1865 }
1866
1867 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error) {
1868 cli := dbx.Client
1869
1870 dbx.Config.LogDebug("arg: %v", arg)
1871 b, err := json.Marshal(arg)
1872 if err != nil {
1873 return
1874 }
1875
1876 headers := map[string]string{
1877 "Content-Type": "application/json",
1878 }
1879
1880 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list", headers, bytes.NewReader(b))
1881 if err != nil {
1882 return
1883 }
1884 dbx.Config.LogInfo("req: %v", req)
1885
1886 resp, err := cli.Do(req)
1887 if err != nil {
1888 return
1889 }
1890
1891 dbx.Config.LogInfo("resp: %v", resp)
1892 defer resp.Body.Close()
1893 body, err := ioutil.ReadAll(resp.Body)
1894 if err != nil {
1895 return
1896 }
1897
1898 dbx.Config.LogDebug("body: %s", body)
1899 if resp.StatusCode == http.StatusOK {
1900 err = json.Unmarshal(body, &res)
1901 if err != nil {
1902 return
1903 }
1904
1905 return
1906 }
1907 if resp.StatusCode == http.StatusConflict {
1908 var apiError MemberSpaceLimitsExcludedUsersListAPIError
1909 err = json.Unmarshal(body, &apiError)
1910 if err != nil {
1911 return
1912 }
1913 err = apiError
1914 return
1915 }
1916 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1917 if err != nil {
1918 return
1919 }
1920 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1921 return
1922 }
1923
1924 //MemberSpaceLimitsExcludedUsersListContinueAPIError is an error-wrapper for the member_space_limits/excluded_users/list/continue route
1925 type MemberSpaceLimitsExcludedUsersListContinueAPIError struct {
1926 dropbox.APIError
1927 EndpointError *ExcludedUsersListContinueError `json:"error"`
1928 }
1929
1930 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error) {
1931 cli := dbx.Client
1932
1933 dbx.Config.LogDebug("arg: %v", arg)
1934 b, err := json.Marshal(arg)
1935 if err != nil {
1936 return
1937 }
1938
1939 headers := map[string]string{
1940 "Content-Type": "application/json",
1941 }
1942
1943 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list/continue", headers, bytes.NewReader(b))
1944 if err != nil {
1945 return
1946 }
1947 dbx.Config.LogInfo("req: %v", req)
1948
1949 resp, err := cli.Do(req)
1950 if err != nil {
1951 return
1952 }
1953
1954 dbx.Config.LogInfo("resp: %v", resp)
1955 defer resp.Body.Close()
1956 body, err := ioutil.ReadAll(resp.Body)
1957 if err != nil {
1958 return
1959 }
1960
1961 dbx.Config.LogDebug("body: %s", body)
1962 if resp.StatusCode == http.StatusOK {
1963 err = json.Unmarshal(body, &res)
1964 if err != nil {
1965 return
1966 }
1967
1968 return
1969 }
1970 if resp.StatusCode == http.StatusConflict {
1971 var apiError MemberSpaceLimitsExcludedUsersListContinueAPIError
1972 err = json.Unmarshal(body, &apiError)
1973 if err != nil {
1974 return
1975 }
1976 err = apiError
1977 return
1978 }
1979 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
1980 if err != nil {
1981 return
1982 }
1983 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
1984 return
1985 }
1986
1987 //MemberSpaceLimitsExcludedUsersRemoveAPIError is an error-wrapper for the member_space_limits/excluded_users/remove route
1988 type MemberSpaceLimitsExcludedUsersRemoveAPIError struct {
1989 dropbox.APIError
1990 EndpointError *ExcludedUsersUpdateError `json:"error"`
1991 }
1992
1993 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
1994 cli := dbx.Client
1995
1996 dbx.Config.LogDebug("arg: %v", arg)
1997 b, err := json.Marshal(arg)
1998 if err != nil {
1999 return
2000 }
2001
2002 headers := map[string]string{
2003 "Content-Type": "application/json",
2004 }
2005
2006 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/remove", headers, bytes.NewReader(b))
2007 if err != nil {
2008 return
2009 }
2010 dbx.Config.LogInfo("req: %v", req)
2011
2012 resp, err := cli.Do(req)
2013 if err != nil {
2014 return
2015 }
2016
2017 dbx.Config.LogInfo("resp: %v", resp)
2018 defer resp.Body.Close()
2019 body, err := ioutil.ReadAll(resp.Body)
2020 if err != nil {
2021 return
2022 }
2023
2024 dbx.Config.LogDebug("body: %s", body)
2025 if resp.StatusCode == http.StatusOK {
2026 err = json.Unmarshal(body, &res)
2027 if err != nil {
2028 return
2029 }
2030
2031 return
2032 }
2033 if resp.StatusCode == http.StatusConflict {
2034 var apiError MemberSpaceLimitsExcludedUsersRemoveAPIError
2035 err = json.Unmarshal(body, &apiError)
2036 if err != nil {
2037 return
2038 }
2039 err = apiError
2040 return
2041 }
2042 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2043 if err != nil {
2044 return
2045 }
2046 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2047 return
2048 }
2049
2050 //MemberSpaceLimitsGetCustomQuotaAPIError is an error-wrapper for the member_space_limits/get_custom_quota route
2051 type MemberSpaceLimitsGetCustomQuotaAPIError struct {
2052 dropbox.APIError
2053 EndpointError *CustomQuotaError `json:"error"`
2054 }
2055
2056 func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error) {
2057 cli := dbx.Client
2058
2059 dbx.Config.LogDebug("arg: %v", arg)
2060 b, err := json.Marshal(arg)
2061 if err != nil {
2062 return
2063 }
2064
2065 headers := map[string]string{
2066 "Content-Type": "application/json",
2067 }
2068
2069 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/get_custom_quota", headers, bytes.NewReader(b))
2070 if err != nil {
2071 return
2072 }
2073 dbx.Config.LogInfo("req: %v", req)
2074
2075 resp, err := cli.Do(req)
2076 if err != nil {
2077 return
2078 }
2079
2080 dbx.Config.LogInfo("resp: %v", resp)
2081 defer resp.Body.Close()
2082 body, err := ioutil.ReadAll(resp.Body)
2083 if err != nil {
2084 return
2085 }
2086
2087 dbx.Config.LogDebug("body: %s", body)
2088 if resp.StatusCode == http.StatusOK {
2089 err = json.Unmarshal(body, &res)
2090 if err != nil {
2091 return
2092 }
2093
2094 return
2095 }
2096 if resp.StatusCode == http.StatusConflict {
2097 var apiError MemberSpaceLimitsGetCustomQuotaAPIError
2098 err = json.Unmarshal(body, &apiError)
2099 if err != nil {
2100 return
2101 }
2102 err = apiError
2103 return
2104 }
2105 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2106 if err != nil {
2107 return
2108 }
2109 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2110 return
2111 }
2112
2113 //MemberSpaceLimitsRemoveCustomQuotaAPIError is an error-wrapper for the member_space_limits/remove_custom_quota route
2114 type MemberSpaceLimitsRemoveCustomQuotaAPIError struct {
2115 dropbox.APIError
2116 EndpointError *CustomQuotaError `json:"error"`
2117 }
2118
2119 func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error) {
2120 cli := dbx.Client
2121
2122 dbx.Config.LogDebug("arg: %v", arg)
2123 b, err := json.Marshal(arg)
2124 if err != nil {
2125 return
2126 }
2127
2128 headers := map[string]string{
2129 "Content-Type": "application/json",
2130 }
2131
2132 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/remove_custom_quota", headers, bytes.NewReader(b))
2133 if err != nil {
2134 return
2135 }
2136 dbx.Config.LogInfo("req: %v", req)
2137
2138 resp, err := cli.Do(req)
2139 if err != nil {
2140 return
2141 }
2142
2143 dbx.Config.LogInfo("resp: %v", resp)
2144 defer resp.Body.Close()
2145 body, err := ioutil.ReadAll(resp.Body)
2146 if err != nil {
2147 return
2148 }
2149
2150 dbx.Config.LogDebug("body: %s", body)
2151 if resp.StatusCode == http.StatusOK {
2152 err = json.Unmarshal(body, &res)
2153 if err != nil {
2154 return
2155 }
2156
2157 return
2158 }
2159 if resp.StatusCode == http.StatusConflict {
2160 var apiError MemberSpaceLimitsRemoveCustomQuotaAPIError
2161 err = json.Unmarshal(body, &apiError)
2162 if err != nil {
2163 return
2164 }
2165 err = apiError
2166 return
2167 }
2168 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2169 if err != nil {
2170 return
2171 }
2172 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2173 return
2174 }
2175
2176 //MemberSpaceLimitsSetCustomQuotaAPIError is an error-wrapper for the member_space_limits/set_custom_quota route
2177 type MemberSpaceLimitsSetCustomQuotaAPIError struct {
2178 dropbox.APIError
2179 EndpointError *SetCustomQuotaError `json:"error"`
2180 }
2181
2182 func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) {
2183 cli := dbx.Client
2184
2185 dbx.Config.LogDebug("arg: %v", arg)
2186 b, err := json.Marshal(arg)
2187 if err != nil {
2188 return
2189 }
2190
2191 headers := map[string]string{
2192 "Content-Type": "application/json",
2193 }
2194
2195 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/set_custom_quota", headers, bytes.NewReader(b))
2196 if err != nil {
2197 return
2198 }
2199 dbx.Config.LogInfo("req: %v", req)
2200
2201 resp, err := cli.Do(req)
2202 if err != nil {
2203 return
2204 }
2205
2206 dbx.Config.LogInfo("resp: %v", resp)
2207 defer resp.Body.Close()
2208 body, err := ioutil.ReadAll(resp.Body)
2209 if err != nil {
2210 return
2211 }
2212
2213 dbx.Config.LogDebug("body: %s", body)
2214 if resp.StatusCode == http.StatusOK {
2215 err = json.Unmarshal(body, &res)
2216 if err != nil {
2217 return
2218 }
2219
2220 return
2221 }
2222 if resp.StatusCode == http.StatusConflict {
2223 var apiError MemberSpaceLimitsSetCustomQuotaAPIError
2224 err = json.Unmarshal(body, &apiError)
2225 if err != nil {
2226 return
2227 }
2228 err = apiError
2229 return
2230 }
2231 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2232 if err != nil {
2233 return
2234 }
2235 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2236 return
2237 }
2238
2239 //MembersAddAPIError is an error-wrapper for the members/add route
2240 type MembersAddAPIError struct {
2241 dropbox.APIError
2242 EndpointError struct{} `json:"error"`
2243 }
2244
2245 func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error) {
2246 cli := dbx.Client
2247
2248 dbx.Config.LogDebug("arg: %v", arg)
2249 b, err := json.Marshal(arg)
2250 if err != nil {
2251 return
2252 }
2253
2254 headers := map[string]string{
2255 "Content-Type": "application/json",
2256 }
2257
2258 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/add", headers, bytes.NewReader(b))
2259 if err != nil {
2260 return
2261 }
2262 dbx.Config.LogInfo("req: %v", req)
2263
2264 resp, err := cli.Do(req)
2265 if err != nil {
2266 return
2267 }
2268
2269 dbx.Config.LogInfo("resp: %v", resp)
2270 defer resp.Body.Close()
2271 body, err := ioutil.ReadAll(resp.Body)
2272 if err != nil {
2273 return
2274 }
2275
2276 dbx.Config.LogDebug("body: %s", body)
2277 if resp.StatusCode == http.StatusOK {
2278 err = json.Unmarshal(body, &res)
2279 if err != nil {
2280 return
2281 }
2282
2283 return
2284 }
2285 if resp.StatusCode == http.StatusConflict {
2286 var apiError MembersAddAPIError
2287 err = json.Unmarshal(body, &apiError)
2288 if err != nil {
2289 return
2290 }
2291 err = apiError
2292 return
2293 }
2294 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2295 if err != nil {
2296 return
2297 }
2298 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2299 return
2300 }
2301
2302 //MembersAddJobStatusGetAPIError is an error-wrapper for the members/add/job_status/get route
2303 type MembersAddJobStatusGetAPIError struct {
2304 dropbox.APIError
2305 EndpointError *async.PollError `json:"error"`
2306 }
2307
2308 func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error) {
2309 cli := dbx.Client
2310
2311 dbx.Config.LogDebug("arg: %v", arg)
2312 b, err := json.Marshal(arg)
2313 if err != nil {
2314 return
2315 }
2316
2317 headers := map[string]string{
2318 "Content-Type": "application/json",
2319 }
2320
2321 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/add/job_status/get", headers, bytes.NewReader(b))
2322 if err != nil {
2323 return
2324 }
2325 dbx.Config.LogInfo("req: %v", req)
2326
2327 resp, err := cli.Do(req)
2328 if err != nil {
2329 return
2330 }
2331
2332 dbx.Config.LogInfo("resp: %v", resp)
2333 defer resp.Body.Close()
2334 body, err := ioutil.ReadAll(resp.Body)
2335 if err != nil {
2336 return
2337 }
2338
2339 dbx.Config.LogDebug("body: %s", body)
2340 if resp.StatusCode == http.StatusOK {
2341 err = json.Unmarshal(body, &res)
2342 if err != nil {
2343 return
2344 }
2345
2346 return
2347 }
2348 if resp.StatusCode == http.StatusConflict {
2349 var apiError MembersAddJobStatusGetAPIError
2350 err = json.Unmarshal(body, &apiError)
2351 if err != nil {
2352 return
2353 }
2354 err = apiError
2355 return
2356 }
2357 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2358 if err != nil {
2359 return
2360 }
2361 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2362 return
2363 }
2364
2365 //MembersGetInfoAPIError is an error-wrapper for the members/get_info route
2366 type MembersGetInfoAPIError struct {
2367 dropbox.APIError
2368 EndpointError *MembersGetInfoError `json:"error"`
2369 }
2370
2371 func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error) {
2372 cli := dbx.Client
2373
2374 dbx.Config.LogDebug("arg: %v", arg)
2375 b, err := json.Marshal(arg)
2376 if err != nil {
2377 return
2378 }
2379
2380 headers := map[string]string{
2381 "Content-Type": "application/json",
2382 }
2383
2384 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/get_info", headers, bytes.NewReader(b))
2385 if err != nil {
2386 return
2387 }
2388 dbx.Config.LogInfo("req: %v", req)
2389
2390 resp, err := cli.Do(req)
2391 if err != nil {
2392 return
2393 }
2394
2395 dbx.Config.LogInfo("resp: %v", resp)
2396 defer resp.Body.Close()
2397 body, err := ioutil.ReadAll(resp.Body)
2398 if err != nil {
2399 return
2400 }
2401
2402 dbx.Config.LogDebug("body: %s", body)
2403 if resp.StatusCode == http.StatusOK {
2404 err = json.Unmarshal(body, &res)
2405 if err != nil {
2406 return
2407 }
2408
2409 return
2410 }
2411 if resp.StatusCode == http.StatusConflict {
2412 var apiError MembersGetInfoAPIError
2413 err = json.Unmarshal(body, &apiError)
2414 if err != nil {
2415 return
2416 }
2417 err = apiError
2418 return
2419 }
2420 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2421 if err != nil {
2422 return
2423 }
2424 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2425 return
2426 }
2427
2428 //MembersListAPIError is an error-wrapper for the members/list route
2429 type MembersListAPIError struct {
2430 dropbox.APIError
2431 EndpointError *MembersListError `json:"error"`
2432 }
2433
2434 func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, err error) {
2435 cli := dbx.Client
2436
2437 dbx.Config.LogDebug("arg: %v", arg)
2438 b, err := json.Marshal(arg)
2439 if err != nil {
2440 return
2441 }
2442
2443 headers := map[string]string{
2444 "Content-Type": "application/json",
2445 }
2446
2447 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/list", headers, bytes.NewReader(b))
2448 if err != nil {
2449 return
2450 }
2451 dbx.Config.LogInfo("req: %v", req)
2452
2453 resp, err := cli.Do(req)
2454 if err != nil {
2455 return
2456 }
2457
2458 dbx.Config.LogInfo("resp: %v", resp)
2459 defer resp.Body.Close()
2460 body, err := ioutil.ReadAll(resp.Body)
2461 if err != nil {
2462 return
2463 }
2464
2465 dbx.Config.LogDebug("body: %s", body)
2466 if resp.StatusCode == http.StatusOK {
2467 err = json.Unmarshal(body, &res)
2468 if err != nil {
2469 return
2470 }
2471
2472 return
2473 }
2474 if resp.StatusCode == http.StatusConflict {
2475 var apiError MembersListAPIError
2476 err = json.Unmarshal(body, &apiError)
2477 if err != nil {
2478 return
2479 }
2480 err = apiError
2481 return
2482 }
2483 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2484 if err != nil {
2485 return
2486 }
2487 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2488 return
2489 }
2490
2491 //MembersListContinueAPIError is an error-wrapper for the members/list/continue route
2492 type MembersListContinueAPIError struct {
2493 dropbox.APIError
2494 EndpointError *MembersListContinueError `json:"error"`
2495 }
2496
2497 func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error) {
2498 cli := dbx.Client
2499
2500 dbx.Config.LogDebug("arg: %v", arg)
2501 b, err := json.Marshal(arg)
2502 if err != nil {
2503 return
2504 }
2505
2506 headers := map[string]string{
2507 "Content-Type": "application/json",
2508 }
2509
2510 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/list/continue", headers, bytes.NewReader(b))
2511 if err != nil {
2512 return
2513 }
2514 dbx.Config.LogInfo("req: %v", req)
2515
2516 resp, err := cli.Do(req)
2517 if err != nil {
2518 return
2519 }
2520
2521 dbx.Config.LogInfo("resp: %v", resp)
2522 defer resp.Body.Close()
2523 body, err := ioutil.ReadAll(resp.Body)
2524 if err != nil {
2525 return
2526 }
2527
2528 dbx.Config.LogDebug("body: %s", body)
2529 if resp.StatusCode == http.StatusOK {
2530 err = json.Unmarshal(body, &res)
2531 if err != nil {
2532 return
2533 }
2534
2535 return
2536 }
2537 if resp.StatusCode == http.StatusConflict {
2538 var apiError MembersListContinueAPIError
2539 err = json.Unmarshal(body, &apiError)
2540 if err != nil {
2541 return
2542 }
2543 err = apiError
2544 return
2545 }
2546 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2547 if err != nil {
2548 return
2549 }
2550 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2551 return
2552 }
2553
2554 //MembersMoveFormerMemberFilesAPIError is an error-wrapper for the members/move_former_member_files route
2555 type MembersMoveFormerMemberFilesAPIError struct {
2556 dropbox.APIError
2557 EndpointError *MembersTransferFormerMembersFilesError `json:"error"`
2558 }
2559
2560 func (dbx *apiImpl) MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error) {
2561 cli := dbx.Client
2562
2563 dbx.Config.LogDebug("arg: %v", arg)
2564 b, err := json.Marshal(arg)
2565 if err != nil {
2566 return
2567 }
2568
2569 headers := map[string]string{
2570 "Content-Type": "application/json",
2571 }
2572
2573 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/move_former_member_files", headers, bytes.NewReader(b))
2574 if err != nil {
2575 return
2576 }
2577 dbx.Config.LogInfo("req: %v", req)
2578
2579 resp, err := cli.Do(req)
2580 if err != nil {
2581 return
2582 }
2583
2584 dbx.Config.LogInfo("resp: %v", resp)
2585 defer resp.Body.Close()
2586 body, err := ioutil.ReadAll(resp.Body)
2587 if err != nil {
2588 return
2589 }
2590
2591 dbx.Config.LogDebug("body: %s", body)
2592 if resp.StatusCode == http.StatusOK {
2593 err = json.Unmarshal(body, &res)
2594 if err != nil {
2595 return
2596 }
2597
2598 return
2599 }
2600 if resp.StatusCode == http.StatusConflict {
2601 var apiError MembersMoveFormerMemberFilesAPIError
2602 err = json.Unmarshal(body, &apiError)
2603 if err != nil {
2604 return
2605 }
2606 err = apiError
2607 return
2608 }
2609 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2610 if err != nil {
2611 return
2612 }
2613 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2614 return
2615 }
2616
2617 //MembersMoveFormerMemberFilesJobStatusCheckAPIError is an error-wrapper for the members/move_former_member_files/job_status/check route
2618 type MembersMoveFormerMemberFilesJobStatusCheckAPIError struct {
2619 dropbox.APIError
2620 EndpointError *async.PollError `json:"error"`
2621 }
2622
2623 func (dbx *apiImpl) MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
2624 cli := dbx.Client
2625
2626 dbx.Config.LogDebug("arg: %v", arg)
2627 b, err := json.Marshal(arg)
2628 if err != nil {
2629 return
2630 }
2631
2632 headers := map[string]string{
2633 "Content-Type": "application/json",
2634 }
2635
2636 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/move_former_member_files/job_status/check", headers, bytes.NewReader(b))
2637 if err != nil {
2638 return
2639 }
2640 dbx.Config.LogInfo("req: %v", req)
2641
2642 resp, err := cli.Do(req)
2643 if err != nil {
2644 return
2645 }
2646
2647 dbx.Config.LogInfo("resp: %v", resp)
2648 defer resp.Body.Close()
2649 body, err := ioutil.ReadAll(resp.Body)
2650 if err != nil {
2651 return
2652 }
2653
2654 dbx.Config.LogDebug("body: %s", body)
2655 if resp.StatusCode == http.StatusOK {
2656 err = json.Unmarshal(body, &res)
2657 if err != nil {
2658 return
2659 }
2660
2661 return
2662 }
2663 if resp.StatusCode == http.StatusConflict {
2664 var apiError MembersMoveFormerMemberFilesJobStatusCheckAPIError
2665 err = json.Unmarshal(body, &apiError)
2666 if err != nil {
2667 return
2668 }
2669 err = apiError
2670 return
2671 }
2672 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2673 if err != nil {
2674 return
2675 }
2676 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2677 return
2678 }
2679
2680 //MembersRecoverAPIError is an error-wrapper for the members/recover route
2681 type MembersRecoverAPIError struct {
2682 dropbox.APIError
2683 EndpointError *MembersRecoverError `json:"error"`
2684 }
2685
2686 func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) {
2687 cli := dbx.Client
2688
2689 dbx.Config.LogDebug("arg: %v", arg)
2690 b, err := json.Marshal(arg)
2691 if err != nil {
2692 return
2693 }
2694
2695 headers := map[string]string{
2696 "Content-Type": "application/json",
2697 }
2698
2699 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/recover", headers, bytes.NewReader(b))
2700 if err != nil {
2701 return
2702 }
2703 dbx.Config.LogInfo("req: %v", req)
2704
2705 resp, err := cli.Do(req)
2706 if err != nil {
2707 return
2708 }
2709
2710 dbx.Config.LogInfo("resp: %v", resp)
2711 defer resp.Body.Close()
2712 body, err := ioutil.ReadAll(resp.Body)
2713 if err != nil {
2714 return
2715 }
2716
2717 dbx.Config.LogDebug("body: %s", body)
2718 if resp.StatusCode == http.StatusOK {
2719 return
2720 }
2721 if resp.StatusCode == http.StatusConflict {
2722 var apiError MembersRecoverAPIError
2723 err = json.Unmarshal(body, &apiError)
2724 if err != nil {
2725 return
2726 }
2727 err = apiError
2728 return
2729 }
2730 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2731 if err != nil {
2732 return
2733 }
2734 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2735 return
2736 }
2737
2738 //MembersRemoveAPIError is an error-wrapper for the members/remove route
2739 type MembersRemoveAPIError struct {
2740 dropbox.APIError
2741 EndpointError *MembersRemoveError `json:"error"`
2742 }
2743
2744 func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error) {
2745 cli := dbx.Client
2746
2747 dbx.Config.LogDebug("arg: %v", arg)
2748 b, err := json.Marshal(arg)
2749 if err != nil {
2750 return
2751 }
2752
2753 headers := map[string]string{
2754 "Content-Type": "application/json",
2755 }
2756
2757 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/remove", headers, bytes.NewReader(b))
2758 if err != nil {
2759 return
2760 }
2761 dbx.Config.LogInfo("req: %v", req)
2762
2763 resp, err := cli.Do(req)
2764 if err != nil {
2765 return
2766 }
2767
2768 dbx.Config.LogInfo("resp: %v", resp)
2769 defer resp.Body.Close()
2770 body, err := ioutil.ReadAll(resp.Body)
2771 if err != nil {
2772 return
2773 }
2774
2775 dbx.Config.LogDebug("body: %s", body)
2776 if resp.StatusCode == http.StatusOK {
2777 err = json.Unmarshal(body, &res)
2778 if err != nil {
2779 return
2780 }
2781
2782 return
2783 }
2784 if resp.StatusCode == http.StatusConflict {
2785 var apiError MembersRemoveAPIError
2786 err = json.Unmarshal(body, &apiError)
2787 if err != nil {
2788 return
2789 }
2790 err = apiError
2791 return
2792 }
2793 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2794 if err != nil {
2795 return
2796 }
2797 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2798 return
2799 }
2800
2801 //MembersRemoveJobStatusGetAPIError is an error-wrapper for the members/remove/job_status/get route
2802 type MembersRemoveJobStatusGetAPIError struct {
2803 dropbox.APIError
2804 EndpointError *async.PollError `json:"error"`
2805 }
2806
2807 func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
2808 cli := dbx.Client
2809
2810 dbx.Config.LogDebug("arg: %v", arg)
2811 b, err := json.Marshal(arg)
2812 if err != nil {
2813 return
2814 }
2815
2816 headers := map[string]string{
2817 "Content-Type": "application/json",
2818 }
2819
2820 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/remove/job_status/get", headers, bytes.NewReader(b))
2821 if err != nil {
2822 return
2823 }
2824 dbx.Config.LogInfo("req: %v", req)
2825
2826 resp, err := cli.Do(req)
2827 if err != nil {
2828 return
2829 }
2830
2831 dbx.Config.LogInfo("resp: %v", resp)
2832 defer resp.Body.Close()
2833 body, err := ioutil.ReadAll(resp.Body)
2834 if err != nil {
2835 return
2836 }
2837
2838 dbx.Config.LogDebug("body: %s", body)
2839 if resp.StatusCode == http.StatusOK {
2840 err = json.Unmarshal(body, &res)
2841 if err != nil {
2842 return
2843 }
2844
2845 return
2846 }
2847 if resp.StatusCode == http.StatusConflict {
2848 var apiError MembersRemoveJobStatusGetAPIError
2849 err = json.Unmarshal(body, &apiError)
2850 if err != nil {
2851 return
2852 }
2853 err = apiError
2854 return
2855 }
2856 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2857 if err != nil {
2858 return
2859 }
2860 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2861 return
2862 }
2863
2864 //MembersSendWelcomeEmailAPIError is an error-wrapper for the members/send_welcome_email route
2865 type MembersSendWelcomeEmailAPIError struct {
2866 dropbox.APIError
2867 EndpointError *MembersSendWelcomeError `json:"error"`
2868 }
2869
2870 func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) {
2871 cli := dbx.Client
2872
2873 dbx.Config.LogDebug("arg: %v", arg)
2874 b, err := json.Marshal(arg)
2875 if err != nil {
2876 return
2877 }
2878
2879 headers := map[string]string{
2880 "Content-Type": "application/json",
2881 }
2882
2883 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/send_welcome_email", headers, bytes.NewReader(b))
2884 if err != nil {
2885 return
2886 }
2887 dbx.Config.LogInfo("req: %v", req)
2888
2889 resp, err := cli.Do(req)
2890 if err != nil {
2891 return
2892 }
2893
2894 dbx.Config.LogInfo("resp: %v", resp)
2895 defer resp.Body.Close()
2896 body, err := ioutil.ReadAll(resp.Body)
2897 if err != nil {
2898 return
2899 }
2900
2901 dbx.Config.LogDebug("body: %s", body)
2902 if resp.StatusCode == http.StatusOK {
2903 return
2904 }
2905 if resp.StatusCode == http.StatusConflict {
2906 var apiError MembersSendWelcomeEmailAPIError
2907 err = json.Unmarshal(body, &apiError)
2908 if err != nil {
2909 return
2910 }
2911 err = apiError
2912 return
2913 }
2914 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2915 if err != nil {
2916 return
2917 }
2918 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2919 return
2920 }
2921
2922 //MembersSetAdminPermissionsAPIError is an error-wrapper for the members/set_admin_permissions route
2923 type MembersSetAdminPermissionsAPIError struct {
2924 dropbox.APIError
2925 EndpointError *MembersSetPermissionsError `json:"error"`
2926 }
2927
2928 func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error) {
2929 cli := dbx.Client
2930
2931 dbx.Config.LogDebug("arg: %v", arg)
2932 b, err := json.Marshal(arg)
2933 if err != nil {
2934 return
2935 }
2936
2937 headers := map[string]string{
2938 "Content-Type": "application/json",
2939 }
2940
2941 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/set_admin_permissions", headers, bytes.NewReader(b))
2942 if err != nil {
2943 return
2944 }
2945 dbx.Config.LogInfo("req: %v", req)
2946
2947 resp, err := cli.Do(req)
2948 if err != nil {
2949 return
2950 }
2951
2952 dbx.Config.LogInfo("resp: %v", resp)
2953 defer resp.Body.Close()
2954 body, err := ioutil.ReadAll(resp.Body)
2955 if err != nil {
2956 return
2957 }
2958
2959 dbx.Config.LogDebug("body: %s", body)
2960 if resp.StatusCode == http.StatusOK {
2961 err = json.Unmarshal(body, &res)
2962 if err != nil {
2963 return
2964 }
2965
2966 return
2967 }
2968 if resp.StatusCode == http.StatusConflict {
2969 var apiError MembersSetAdminPermissionsAPIError
2970 err = json.Unmarshal(body, &apiError)
2971 if err != nil {
2972 return
2973 }
2974 err = apiError
2975 return
2976 }
2977 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
2978 if err != nil {
2979 return
2980 }
2981 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
2982 return
2983 }
2984
2985 //MembersSetProfileAPIError is an error-wrapper for the members/set_profile route
2986 type MembersSetProfileAPIError struct {
2987 dropbox.APIError
2988 EndpointError *MembersSetProfileError `json:"error"`
2989 }
2990
2991 func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error) {
2992 cli := dbx.Client
2993
2994 dbx.Config.LogDebug("arg: %v", arg)
2995 b, err := json.Marshal(arg)
2996 if err != nil {
2997 return
2998 }
2999
3000 headers := map[string]string{
3001 "Content-Type": "application/json",
3002 }
3003
3004 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/set_profile", headers, bytes.NewReader(b))
3005 if err != nil {
3006 return
3007 }
3008 dbx.Config.LogInfo("req: %v", req)
3009
3010 resp, err := cli.Do(req)
3011 if err != nil {
3012 return
3013 }
3014
3015 dbx.Config.LogInfo("resp: %v", resp)
3016 defer resp.Body.Close()
3017 body, err := ioutil.ReadAll(resp.Body)
3018 if err != nil {
3019 return
3020 }
3021
3022 dbx.Config.LogDebug("body: %s", body)
3023 if resp.StatusCode == http.StatusOK {
3024 err = json.Unmarshal(body, &res)
3025 if err != nil {
3026 return
3027 }
3028
3029 return
3030 }
3031 if resp.StatusCode == http.StatusConflict {
3032 var apiError MembersSetProfileAPIError
3033 err = json.Unmarshal(body, &apiError)
3034 if err != nil {
3035 return
3036 }
3037 err = apiError
3038 return
3039 }
3040 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3041 if err != nil {
3042 return
3043 }
3044 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3045 return
3046 }
3047
3048 //MembersSuspendAPIError is an error-wrapper for the members/suspend route
3049 type MembersSuspendAPIError struct {
3050 dropbox.APIError
3051 EndpointError *MembersSuspendError `json:"error"`
3052 }
3053
3054 func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) {
3055 cli := dbx.Client
3056
3057 dbx.Config.LogDebug("arg: %v", arg)
3058 b, err := json.Marshal(arg)
3059 if err != nil {
3060 return
3061 }
3062
3063 headers := map[string]string{
3064 "Content-Type": "application/json",
3065 }
3066
3067 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/suspend", headers, bytes.NewReader(b))
3068 if err != nil {
3069 return
3070 }
3071 dbx.Config.LogInfo("req: %v", req)
3072
3073 resp, err := cli.Do(req)
3074 if err != nil {
3075 return
3076 }
3077
3078 dbx.Config.LogInfo("resp: %v", resp)
3079 defer resp.Body.Close()
3080 body, err := ioutil.ReadAll(resp.Body)
3081 if err != nil {
3082 return
3083 }
3084
3085 dbx.Config.LogDebug("body: %s", body)
3086 if resp.StatusCode == http.StatusOK {
3087 return
3088 }
3089 if resp.StatusCode == http.StatusConflict {
3090 var apiError MembersSuspendAPIError
3091 err = json.Unmarshal(body, &apiError)
3092 if err != nil {
3093 return
3094 }
3095 err = apiError
3096 return
3097 }
3098 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3099 if err != nil {
3100 return
3101 }
3102 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3103 return
3104 }
3105
3106 //MembersUnsuspendAPIError is an error-wrapper for the members/unsuspend route
3107 type MembersUnsuspendAPIError struct {
3108 dropbox.APIError
3109 EndpointError *MembersUnsuspendError `json:"error"`
3110 }
3111
3112 func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) {
3113 cli := dbx.Client
3114
3115 dbx.Config.LogDebug("arg: %v", arg)
3116 b, err := json.Marshal(arg)
3117 if err != nil {
3118 return
3119 }
3120
3121 headers := map[string]string{
3122 "Content-Type": "application/json",
3123 }
3124
3125 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/unsuspend", headers, bytes.NewReader(b))
3126 if err != nil {
3127 return
3128 }
3129 dbx.Config.LogInfo("req: %v", req)
3130
3131 resp, err := cli.Do(req)
3132 if err != nil {
3133 return
3134 }
3135
3136 dbx.Config.LogInfo("resp: %v", resp)
3137 defer resp.Body.Close()
3138 body, err := ioutil.ReadAll(resp.Body)
3139 if err != nil {
3140 return
3141 }
3142
3143 dbx.Config.LogDebug("body: %s", body)
3144 if resp.StatusCode == http.StatusOK {
3145 return
3146 }
3147 if resp.StatusCode == http.StatusConflict {
3148 var apiError MembersUnsuspendAPIError
3149 err = json.Unmarshal(body, &apiError)
3150 if err != nil {
3151 return
3152 }
3153 err = apiError
3154 return
3155 }
3156 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3157 if err != nil {
3158 return
3159 }
3160 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3161 return
3162 }
3163
3164 //NamespacesListAPIError is an error-wrapper for the namespaces/list route
3165 type NamespacesListAPIError struct {
3166 dropbox.APIError
3167 EndpointError *TeamNamespacesListError `json:"error"`
3168 }
3169
3170 func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error) {
3171 cli := dbx.Client
3172
3173 dbx.Config.LogDebug("arg: %v", arg)
3174 b, err := json.Marshal(arg)
3175 if err != nil {
3176 return
3177 }
3178
3179 headers := map[string]string{
3180 "Content-Type": "application/json",
3181 }
3182
3183 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "namespaces/list", headers, bytes.NewReader(b))
3184 if err != nil {
3185 return
3186 }
3187 dbx.Config.LogInfo("req: %v", req)
3188
3189 resp, err := cli.Do(req)
3190 if err != nil {
3191 return
3192 }
3193
3194 dbx.Config.LogInfo("resp: %v", resp)
3195 defer resp.Body.Close()
3196 body, err := ioutil.ReadAll(resp.Body)
3197 if err != nil {
3198 return
3199 }
3200
3201 dbx.Config.LogDebug("body: %s", body)
3202 if resp.StatusCode == http.StatusOK {
3203 err = json.Unmarshal(body, &res)
3204 if err != nil {
3205 return
3206 }
3207
3208 return
3209 }
3210 if resp.StatusCode == http.StatusConflict {
3211 var apiError NamespacesListAPIError
3212 err = json.Unmarshal(body, &apiError)
3213 if err != nil {
3214 return
3215 }
3216 err = apiError
3217 return
3218 }
3219 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3220 if err != nil {
3221 return
3222 }
3223 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3224 return
3225 }
3226
3227 //NamespacesListContinueAPIError is an error-wrapper for the namespaces/list/continue route
3228 type NamespacesListContinueAPIError struct {
3229 dropbox.APIError
3230 EndpointError *TeamNamespacesListContinueError `json:"error"`
3231 }
3232
3233 func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error) {
3234 cli := dbx.Client
3235
3236 dbx.Config.LogDebug("arg: %v", arg)
3237 b, err := json.Marshal(arg)
3238 if err != nil {
3239 return
3240 }
3241
3242 headers := map[string]string{
3243 "Content-Type": "application/json",
3244 }
3245
3246 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "namespaces/list/continue", headers, bytes.NewReader(b))
3247 if err != nil {
3248 return
3249 }
3250 dbx.Config.LogInfo("req: %v", req)
3251
3252 resp, err := cli.Do(req)
3253 if err != nil {
3254 return
3255 }
3256
3257 dbx.Config.LogInfo("resp: %v", resp)
3258 defer resp.Body.Close()
3259 body, err := ioutil.ReadAll(resp.Body)
3260 if err != nil {
3261 return
3262 }
3263
3264 dbx.Config.LogDebug("body: %s", body)
3265 if resp.StatusCode == http.StatusOK {
3266 err = json.Unmarshal(body, &res)
3267 if err != nil {
3268 return
3269 }
3270
3271 return
3272 }
3273 if resp.StatusCode == http.StatusConflict {
3274 var apiError NamespacesListContinueAPIError
3275 err = json.Unmarshal(body, &apiError)
3276 if err != nil {
3277 return
3278 }
3279 err = apiError
3280 return
3281 }
3282 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3283 if err != nil {
3284 return
3285 }
3286 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3287 return
3288 }
3289
3290 //PropertiesTemplateAddAPIError is an error-wrapper for the properties/template/add route
3291 type PropertiesTemplateAddAPIError struct {
3292 dropbox.APIError
3293 EndpointError *file_properties.ModifyTemplateError `json:"error"`
3294 }
3295
3296 func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error) {
3297 log.Printf("WARNING: API `PropertiesTemplateAdd` is deprecated")
3298
3299 cli := dbx.Client
3300
3301 dbx.Config.LogDebug("arg: %v", arg)
3302 b, err := json.Marshal(arg)
3303 if err != nil {
3304 return
3305 }
3306
3307 headers := map[string]string{
3308 "Content-Type": "application/json",
3309 }
3310
3311 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/add", headers, bytes.NewReader(b))
3312 if err != nil {
3313 return
3314 }
3315 dbx.Config.LogInfo("req: %v", req)
3316
3317 resp, err := cli.Do(req)
3318 if err != nil {
3319 return
3320 }
3321
3322 dbx.Config.LogInfo("resp: %v", resp)
3323 defer resp.Body.Close()
3324 body, err := ioutil.ReadAll(resp.Body)
3325 if err != nil {
3326 return
3327 }
3328
3329 dbx.Config.LogDebug("body: %s", body)
3330 if resp.StatusCode == http.StatusOK {
3331 err = json.Unmarshal(body, &res)
3332 if err != nil {
3333 return
3334 }
3335
3336 return
3337 }
3338 if resp.StatusCode == http.StatusConflict {
3339 var apiError PropertiesTemplateAddAPIError
3340 err = json.Unmarshal(body, &apiError)
3341 if err != nil {
3342 return
3343 }
3344 err = apiError
3345 return
3346 }
3347 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3348 if err != nil {
3349 return
3350 }
3351 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3352 return
3353 }
3354
3355 //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route
3356 type PropertiesTemplateGetAPIError struct {
3357 dropbox.APIError
3358 EndpointError *file_properties.TemplateError `json:"error"`
3359 }
3360
3361 func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) {
3362 log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated")
3363
3364 cli := dbx.Client
3365
3366 dbx.Config.LogDebug("arg: %v", arg)
3367 b, err := json.Marshal(arg)
3368 if err != nil {
3369 return
3370 }
3371
3372 headers := map[string]string{
3373 "Content-Type": "application/json",
3374 }
3375
3376 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/get", headers, bytes.NewReader(b))
3377 if err != nil {
3378 return
3379 }
3380 dbx.Config.LogInfo("req: %v", req)
3381
3382 resp, err := cli.Do(req)
3383 if err != nil {
3384 return
3385 }
3386
3387 dbx.Config.LogInfo("resp: %v", resp)
3388 defer resp.Body.Close()
3389 body, err := ioutil.ReadAll(resp.Body)
3390 if err != nil {
3391 return
3392 }
3393
3394 dbx.Config.LogDebug("body: %s", body)
3395 if resp.StatusCode == http.StatusOK {
3396 err = json.Unmarshal(body, &res)
3397 if err != nil {
3398 return
3399 }
3400
3401 return
3402 }
3403 if resp.StatusCode == http.StatusConflict {
3404 var apiError PropertiesTemplateGetAPIError
3405 err = json.Unmarshal(body, &apiError)
3406 if err != nil {
3407 return
3408 }
3409 err = apiError
3410 return
3411 }
3412 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3413 if err != nil {
3414 return
3415 }
3416 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3417 return
3418 }
3419
3420 //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route
3421 type PropertiesTemplateListAPIError struct {
3422 dropbox.APIError
3423 EndpointError *file_properties.TemplateError `json:"error"`
3424 }
3425
3426 func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) {
3427 log.Printf("WARNING: API `PropertiesTemplateList` is deprecated")
3428
3429 cli := dbx.Client
3430
3431 headers := map[string]string{}
3432
3433 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/list", headers, nil)
3434 if err != nil {
3435 return
3436 }
3437 dbx.Config.LogInfo("req: %v", req)
3438
3439 resp, err := cli.Do(req)
3440 if err != nil {
3441 return
3442 }
3443
3444 dbx.Config.LogInfo("resp: %v", resp)
3445 defer resp.Body.Close()
3446 body, err := ioutil.ReadAll(resp.Body)
3447 if err != nil {
3448 return
3449 }
3450
3451 dbx.Config.LogDebug("body: %s", body)
3452 if resp.StatusCode == http.StatusOK {
3453 err = json.Unmarshal(body, &res)
3454 if err != nil {
3455 return
3456 }
3457
3458 return
3459 }
3460 if resp.StatusCode == http.StatusConflict {
3461 var apiError PropertiesTemplateListAPIError
3462 err = json.Unmarshal(body, &apiError)
3463 if err != nil {
3464 return
3465 }
3466 err = apiError
3467 return
3468 }
3469 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3470 if err != nil {
3471 return
3472 }
3473 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3474 return
3475 }
3476
3477 //PropertiesTemplateUpdateAPIError is an error-wrapper for the properties/template/update route
3478 type PropertiesTemplateUpdateAPIError struct {
3479 dropbox.APIError
3480 EndpointError *file_properties.ModifyTemplateError `json:"error"`
3481 }
3482
3483 func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error) {
3484 log.Printf("WARNING: API `PropertiesTemplateUpdate` is deprecated")
3485
3486 cli := dbx.Client
3487
3488 dbx.Config.LogDebug("arg: %v", arg)
3489 b, err := json.Marshal(arg)
3490 if err != nil {
3491 return
3492 }
3493
3494 headers := map[string]string{
3495 "Content-Type": "application/json",
3496 }
3497
3498 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/update", headers, bytes.NewReader(b))
3499 if err != nil {
3500 return
3501 }
3502 dbx.Config.LogInfo("req: %v", req)
3503
3504 resp, err := cli.Do(req)
3505 if err != nil {
3506 return
3507 }
3508
3509 dbx.Config.LogInfo("resp: %v", resp)
3510 defer resp.Body.Close()
3511 body, err := ioutil.ReadAll(resp.Body)
3512 if err != nil {
3513 return
3514 }
3515
3516 dbx.Config.LogDebug("body: %s", body)
3517 if resp.StatusCode == http.StatusOK {
3518 err = json.Unmarshal(body, &res)
3519 if err != nil {
3520 return
3521 }
3522
3523 return
3524 }
3525 if resp.StatusCode == http.StatusConflict {
3526 var apiError PropertiesTemplateUpdateAPIError
3527 err = json.Unmarshal(body, &apiError)
3528 if err != nil {
3529 return
3530 }
3531 err = apiError
3532 return
3533 }
3534 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3535 if err != nil {
3536 return
3537 }
3538 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3539 return
3540 }
3541
3542 //ReportsGetActivityAPIError is an error-wrapper for the reports/get_activity route
3543 type ReportsGetActivityAPIError struct {
3544 dropbox.APIError
3545 EndpointError *DateRangeError `json:"error"`
3546 }
3547
3548 func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error) {
3549 cli := dbx.Client
3550
3551 dbx.Config.LogDebug("arg: %v", arg)
3552 b, err := json.Marshal(arg)
3553 if err != nil {
3554 return
3555 }
3556
3557 headers := map[string]string{
3558 "Content-Type": "application/json",
3559 }
3560
3561 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_activity", headers, bytes.NewReader(b))
3562 if err != nil {
3563 return
3564 }
3565 dbx.Config.LogInfo("req: %v", req)
3566
3567 resp, err := cli.Do(req)
3568 if err != nil {
3569 return
3570 }
3571
3572 dbx.Config.LogInfo("resp: %v", resp)
3573 defer resp.Body.Close()
3574 body, err := ioutil.ReadAll(resp.Body)
3575 if err != nil {
3576 return
3577 }
3578
3579 dbx.Config.LogDebug("body: %s", body)
3580 if resp.StatusCode == http.StatusOK {
3581 err = json.Unmarshal(body, &res)
3582 if err != nil {
3583 return
3584 }
3585
3586 return
3587 }
3588 if resp.StatusCode == http.StatusConflict {
3589 var apiError ReportsGetActivityAPIError
3590 err = json.Unmarshal(body, &apiError)
3591 if err != nil {
3592 return
3593 }
3594 err = apiError
3595 return
3596 }
3597 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3598 if err != nil {
3599 return
3600 }
3601 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3602 return
3603 }
3604
3605 //ReportsGetDevicesAPIError is an error-wrapper for the reports/get_devices route
3606 type ReportsGetDevicesAPIError struct {
3607 dropbox.APIError
3608 EndpointError *DateRangeError `json:"error"`
3609 }
3610
3611 func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error) {
3612 cli := dbx.Client
3613
3614 dbx.Config.LogDebug("arg: %v", arg)
3615 b, err := json.Marshal(arg)
3616 if err != nil {
3617 return
3618 }
3619
3620 headers := map[string]string{
3621 "Content-Type": "application/json",
3622 }
3623
3624 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_devices", headers, bytes.NewReader(b))
3625 if err != nil {
3626 return
3627 }
3628 dbx.Config.LogInfo("req: %v", req)
3629
3630 resp, err := cli.Do(req)
3631 if err != nil {
3632 return
3633 }
3634
3635 dbx.Config.LogInfo("resp: %v", resp)
3636 defer resp.Body.Close()
3637 body, err := ioutil.ReadAll(resp.Body)
3638 if err != nil {
3639 return
3640 }
3641
3642 dbx.Config.LogDebug("body: %s", body)
3643 if resp.StatusCode == http.StatusOK {
3644 err = json.Unmarshal(body, &res)
3645 if err != nil {
3646 return
3647 }
3648
3649 return
3650 }
3651 if resp.StatusCode == http.StatusConflict {
3652 var apiError ReportsGetDevicesAPIError
3653 err = json.Unmarshal(body, &apiError)
3654 if err != nil {
3655 return
3656 }
3657 err = apiError
3658 return
3659 }
3660 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3661 if err != nil {
3662 return
3663 }
3664 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3665 return
3666 }
3667
3668 //ReportsGetMembershipAPIError is an error-wrapper for the reports/get_membership route
3669 type ReportsGetMembershipAPIError struct {
3670 dropbox.APIError
3671 EndpointError *DateRangeError `json:"error"`
3672 }
3673
3674 func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error) {
3675 cli := dbx.Client
3676
3677 dbx.Config.LogDebug("arg: %v", arg)
3678 b, err := json.Marshal(arg)
3679 if err != nil {
3680 return
3681 }
3682
3683 headers := map[string]string{
3684 "Content-Type": "application/json",
3685 }
3686
3687 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_membership", headers, bytes.NewReader(b))
3688 if err != nil {
3689 return
3690 }
3691 dbx.Config.LogInfo("req: %v", req)
3692
3693 resp, err := cli.Do(req)
3694 if err != nil {
3695 return
3696 }
3697
3698 dbx.Config.LogInfo("resp: %v", resp)
3699 defer resp.Body.Close()
3700 body, err := ioutil.ReadAll(resp.Body)
3701 if err != nil {
3702 return
3703 }
3704
3705 dbx.Config.LogDebug("body: %s", body)
3706 if resp.StatusCode == http.StatusOK {
3707 err = json.Unmarshal(body, &res)
3708 if err != nil {
3709 return
3710 }
3711
3712 return
3713 }
3714 if resp.StatusCode == http.StatusConflict {
3715 var apiError ReportsGetMembershipAPIError
3716 err = json.Unmarshal(body, &apiError)
3717 if err != nil {
3718 return
3719 }
3720 err = apiError
3721 return
3722 }
3723 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3724 if err != nil {
3725 return
3726 }
3727 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3728 return
3729 }
3730
3731 //ReportsGetStorageAPIError is an error-wrapper for the reports/get_storage route
3732 type ReportsGetStorageAPIError struct {
3733 dropbox.APIError
3734 EndpointError *DateRangeError `json:"error"`
3735 }
3736
3737 func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error) {
3738 cli := dbx.Client
3739
3740 dbx.Config.LogDebug("arg: %v", arg)
3741 b, err := json.Marshal(arg)
3742 if err != nil {
3743 return
3744 }
3745
3746 headers := map[string]string{
3747 "Content-Type": "application/json",
3748 }
3749
3750 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_storage", headers, bytes.NewReader(b))
3751 if err != nil {
3752 return
3753 }
3754 dbx.Config.LogInfo("req: %v", req)
3755
3756 resp, err := cli.Do(req)
3757 if err != nil {
3758 return
3759 }
3760
3761 dbx.Config.LogInfo("resp: %v", resp)
3762 defer resp.Body.Close()
3763 body, err := ioutil.ReadAll(resp.Body)
3764 if err != nil {
3765 return
3766 }
3767
3768 dbx.Config.LogDebug("body: %s", body)
3769 if resp.StatusCode == http.StatusOK {
3770 err = json.Unmarshal(body, &res)
3771 if err != nil {
3772 return
3773 }
3774
3775 return
3776 }
3777 if resp.StatusCode == http.StatusConflict {
3778 var apiError ReportsGetStorageAPIError
3779 err = json.Unmarshal(body, &apiError)
3780 if err != nil {
3781 return
3782 }
3783 err = apiError
3784 return
3785 }
3786 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3787 if err != nil {
3788 return
3789 }
3790 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3791 return
3792 }
3793
3794 //TeamFolderActivateAPIError is an error-wrapper for the team_folder/activate route
3795 type TeamFolderActivateAPIError struct {
3796 dropbox.APIError
3797 EndpointError *TeamFolderActivateError `json:"error"`
3798 }
3799
3800 func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error) {
3801 cli := dbx.Client
3802
3803 dbx.Config.LogDebug("arg: %v", arg)
3804 b, err := json.Marshal(arg)
3805 if err != nil {
3806 return
3807 }
3808
3809 headers := map[string]string{
3810 "Content-Type": "application/json",
3811 }
3812
3813 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/activate", headers, bytes.NewReader(b))
3814 if err != nil {
3815 return
3816 }
3817 dbx.Config.LogInfo("req: %v", req)
3818
3819 resp, err := cli.Do(req)
3820 if err != nil {
3821 return
3822 }
3823
3824 dbx.Config.LogInfo("resp: %v", resp)
3825 defer resp.Body.Close()
3826 body, err := ioutil.ReadAll(resp.Body)
3827 if err != nil {
3828 return
3829 }
3830
3831 dbx.Config.LogDebug("body: %s", body)
3832 if resp.StatusCode == http.StatusOK {
3833 err = json.Unmarshal(body, &res)
3834 if err != nil {
3835 return
3836 }
3837
3838 return
3839 }
3840 if resp.StatusCode == http.StatusConflict {
3841 var apiError TeamFolderActivateAPIError
3842 err = json.Unmarshal(body, &apiError)
3843 if err != nil {
3844 return
3845 }
3846 err = apiError
3847 return
3848 }
3849 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3850 if err != nil {
3851 return
3852 }
3853 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3854 return
3855 }
3856
3857 //TeamFolderArchiveAPIError is an error-wrapper for the team_folder/archive route
3858 type TeamFolderArchiveAPIError struct {
3859 dropbox.APIError
3860 EndpointError *TeamFolderArchiveError `json:"error"`
3861 }
3862
3863 func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error) {
3864 cli := dbx.Client
3865
3866 dbx.Config.LogDebug("arg: %v", arg)
3867 b, err := json.Marshal(arg)
3868 if err != nil {
3869 return
3870 }
3871
3872 headers := map[string]string{
3873 "Content-Type": "application/json",
3874 }
3875
3876 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/archive", headers, bytes.NewReader(b))
3877 if err != nil {
3878 return
3879 }
3880 dbx.Config.LogInfo("req: %v", req)
3881
3882 resp, err := cli.Do(req)
3883 if err != nil {
3884 return
3885 }
3886
3887 dbx.Config.LogInfo("resp: %v", resp)
3888 defer resp.Body.Close()
3889 body, err := ioutil.ReadAll(resp.Body)
3890 if err != nil {
3891 return
3892 }
3893
3894 dbx.Config.LogDebug("body: %s", body)
3895 if resp.StatusCode == http.StatusOK {
3896 err = json.Unmarshal(body, &res)
3897 if err != nil {
3898 return
3899 }
3900
3901 return
3902 }
3903 if resp.StatusCode == http.StatusConflict {
3904 var apiError TeamFolderArchiveAPIError
3905 err = json.Unmarshal(body, &apiError)
3906 if err != nil {
3907 return
3908 }
3909 err = apiError
3910 return
3911 }
3912 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3913 if err != nil {
3914 return
3915 }
3916 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3917 return
3918 }
3919
3920 //TeamFolderArchiveCheckAPIError is an error-wrapper for the team_folder/archive/check route
3921 type TeamFolderArchiveCheckAPIError struct {
3922 dropbox.APIError
3923 EndpointError *async.PollError `json:"error"`
3924 }
3925
3926 func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error) {
3927 cli := dbx.Client
3928
3929 dbx.Config.LogDebug("arg: %v", arg)
3930 b, err := json.Marshal(arg)
3931 if err != nil {
3932 return
3933 }
3934
3935 headers := map[string]string{
3936 "Content-Type": "application/json",
3937 }
3938
3939 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/archive/check", headers, bytes.NewReader(b))
3940 if err != nil {
3941 return
3942 }
3943 dbx.Config.LogInfo("req: %v", req)
3944
3945 resp, err := cli.Do(req)
3946 if err != nil {
3947 return
3948 }
3949
3950 dbx.Config.LogInfo("resp: %v", resp)
3951 defer resp.Body.Close()
3952 body, err := ioutil.ReadAll(resp.Body)
3953 if err != nil {
3954 return
3955 }
3956
3957 dbx.Config.LogDebug("body: %s", body)
3958 if resp.StatusCode == http.StatusOK {
3959 err = json.Unmarshal(body, &res)
3960 if err != nil {
3961 return
3962 }
3963
3964 return
3965 }
3966 if resp.StatusCode == http.StatusConflict {
3967 var apiError TeamFolderArchiveCheckAPIError
3968 err = json.Unmarshal(body, &apiError)
3969 if err != nil {
3970 return
3971 }
3972 err = apiError
3973 return
3974 }
3975 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
3976 if err != nil {
3977 return
3978 }
3979 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
3980 return
3981 }
3982
3983 //TeamFolderCreateAPIError is an error-wrapper for the team_folder/create route
3984 type TeamFolderCreateAPIError struct {
3985 dropbox.APIError
3986 EndpointError *TeamFolderCreateError `json:"error"`
3987 }
3988
3989 func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error) {
3990 cli := dbx.Client
3991
3992 dbx.Config.LogDebug("arg: %v", arg)
3993 b, err := json.Marshal(arg)
3994 if err != nil {
3995 return
3996 }
3997
3998 headers := map[string]string{
3999 "Content-Type": "application/json",
4000 }
4001
4002 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/create", headers, bytes.NewReader(b))
4003 if err != nil {
4004 return
4005 }
4006 dbx.Config.LogInfo("req: %v", req)
4007
4008 resp, err := cli.Do(req)
4009 if err != nil {
4010 return
4011 }
4012
4013 dbx.Config.LogInfo("resp: %v", resp)
4014 defer resp.Body.Close()
4015 body, err := ioutil.ReadAll(resp.Body)
4016 if err != nil {
4017 return
4018 }
4019
4020 dbx.Config.LogDebug("body: %s", body)
4021 if resp.StatusCode == http.StatusOK {
4022 err = json.Unmarshal(body, &res)
4023 if err != nil {
4024 return
4025 }
4026
4027 return
4028 }
4029 if resp.StatusCode == http.StatusConflict {
4030 var apiError TeamFolderCreateAPIError
4031 err = json.Unmarshal(body, &apiError)
4032 if err != nil {
4033 return
4034 }
4035 err = apiError
4036 return
4037 }
4038 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4039 if err != nil {
4040 return
4041 }
4042 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4043 return
4044 }
4045
4046 //TeamFolderGetInfoAPIError is an error-wrapper for the team_folder/get_info route
4047 type TeamFolderGetInfoAPIError struct {
4048 dropbox.APIError
4049 EndpointError struct{} `json:"error"`
4050 }
4051
4052 func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error) {
4053 cli := dbx.Client
4054
4055 dbx.Config.LogDebug("arg: %v", arg)
4056 b, err := json.Marshal(arg)
4057 if err != nil {
4058 return
4059 }
4060
4061 headers := map[string]string{
4062 "Content-Type": "application/json",
4063 }
4064
4065 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/get_info", headers, bytes.NewReader(b))
4066 if err != nil {
4067 return
4068 }
4069 dbx.Config.LogInfo("req: %v", req)
4070
4071 resp, err := cli.Do(req)
4072 if err != nil {
4073 return
4074 }
4075
4076 dbx.Config.LogInfo("resp: %v", resp)
4077 defer resp.Body.Close()
4078 body, err := ioutil.ReadAll(resp.Body)
4079 if err != nil {
4080 return
4081 }
4082
4083 dbx.Config.LogDebug("body: %s", body)
4084 if resp.StatusCode == http.StatusOK {
4085 err = json.Unmarshal(body, &res)
4086 if err != nil {
4087 return
4088 }
4089
4090 return
4091 }
4092 if resp.StatusCode == http.StatusConflict {
4093 var apiError TeamFolderGetInfoAPIError
4094 err = json.Unmarshal(body, &apiError)
4095 if err != nil {
4096 return
4097 }
4098 err = apiError
4099 return
4100 }
4101 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4102 if err != nil {
4103 return
4104 }
4105 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4106 return
4107 }
4108
4109 //TeamFolderListAPIError is an error-wrapper for the team_folder/list route
4110 type TeamFolderListAPIError struct {
4111 dropbox.APIError
4112 EndpointError *TeamFolderListError `json:"error"`
4113 }
4114
4115 func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error) {
4116 cli := dbx.Client
4117
4118 dbx.Config.LogDebug("arg: %v", arg)
4119 b, err := json.Marshal(arg)
4120 if err != nil {
4121 return
4122 }
4123
4124 headers := map[string]string{
4125 "Content-Type": "application/json",
4126 }
4127
4128 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/list", headers, bytes.NewReader(b))
4129 if err != nil {
4130 return
4131 }
4132 dbx.Config.LogInfo("req: %v", req)
4133
4134 resp, err := cli.Do(req)
4135 if err != nil {
4136 return
4137 }
4138
4139 dbx.Config.LogInfo("resp: %v", resp)
4140 defer resp.Body.Close()
4141 body, err := ioutil.ReadAll(resp.Body)
4142 if err != nil {
4143 return
4144 }
4145
4146 dbx.Config.LogDebug("body: %s", body)
4147 if resp.StatusCode == http.StatusOK {
4148 err = json.Unmarshal(body, &res)
4149 if err != nil {
4150 return
4151 }
4152
4153 return
4154 }
4155 if resp.StatusCode == http.StatusConflict {
4156 var apiError TeamFolderListAPIError
4157 err = json.Unmarshal(body, &apiError)
4158 if err != nil {
4159 return
4160 }
4161 err = apiError
4162 return
4163 }
4164 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4165 if err != nil {
4166 return
4167 }
4168 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4169 return
4170 }
4171
4172 //TeamFolderListContinueAPIError is an error-wrapper for the team_folder/list/continue route
4173 type TeamFolderListContinueAPIError struct {
4174 dropbox.APIError
4175 EndpointError *TeamFolderListContinueError `json:"error"`
4176 }
4177
4178 func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error) {
4179 cli := dbx.Client
4180
4181 dbx.Config.LogDebug("arg: %v", arg)
4182 b, err := json.Marshal(arg)
4183 if err != nil {
4184 return
4185 }
4186
4187 headers := map[string]string{
4188 "Content-Type": "application/json",
4189 }
4190
4191 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/list/continue", headers, bytes.NewReader(b))
4192 if err != nil {
4193 return
4194 }
4195 dbx.Config.LogInfo("req: %v", req)
4196
4197 resp, err := cli.Do(req)
4198 if err != nil {
4199 return
4200 }
4201
4202 dbx.Config.LogInfo("resp: %v", resp)
4203 defer resp.Body.Close()
4204 body, err := ioutil.ReadAll(resp.Body)
4205 if err != nil {
4206 return
4207 }
4208
4209 dbx.Config.LogDebug("body: %s", body)
4210 if resp.StatusCode == http.StatusOK {
4211 err = json.Unmarshal(body, &res)
4212 if err != nil {
4213 return
4214 }
4215
4216 return
4217 }
4218 if resp.StatusCode == http.StatusConflict {
4219 var apiError TeamFolderListContinueAPIError
4220 err = json.Unmarshal(body, &apiError)
4221 if err != nil {
4222 return
4223 }
4224 err = apiError
4225 return
4226 }
4227 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4228 if err != nil {
4229 return
4230 }
4231 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4232 return
4233 }
4234
4235 //TeamFolderPermanentlyDeleteAPIError is an error-wrapper for the team_folder/permanently_delete route
4236 type TeamFolderPermanentlyDeleteAPIError struct {
4237 dropbox.APIError
4238 EndpointError *TeamFolderPermanentlyDeleteError `json:"error"`
4239 }
4240
4241 func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error) {
4242 cli := dbx.Client
4243
4244 dbx.Config.LogDebug("arg: %v", arg)
4245 b, err := json.Marshal(arg)
4246 if err != nil {
4247 return
4248 }
4249
4250 headers := map[string]string{
4251 "Content-Type": "application/json",
4252 }
4253
4254 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/permanently_delete", headers, bytes.NewReader(b))
4255 if err != nil {
4256 return
4257 }
4258 dbx.Config.LogInfo("req: %v", req)
4259
4260 resp, err := cli.Do(req)
4261 if err != nil {
4262 return
4263 }
4264
4265 dbx.Config.LogInfo("resp: %v", resp)
4266 defer resp.Body.Close()
4267 body, err := ioutil.ReadAll(resp.Body)
4268 if err != nil {
4269 return
4270 }
4271
4272 dbx.Config.LogDebug("body: %s", body)
4273 if resp.StatusCode == http.StatusOK {
4274 return
4275 }
4276 if resp.StatusCode == http.StatusConflict {
4277 var apiError TeamFolderPermanentlyDeleteAPIError
4278 err = json.Unmarshal(body, &apiError)
4279 if err != nil {
4280 return
4281 }
4282 err = apiError
4283 return
4284 }
4285 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4286 if err != nil {
4287 return
4288 }
4289 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4290 return
4291 }
4292
4293 //TeamFolderRenameAPIError is an error-wrapper for the team_folder/rename route
4294 type TeamFolderRenameAPIError struct {
4295 dropbox.APIError
4296 EndpointError *TeamFolderRenameError `json:"error"`
4297 }
4298
4299 func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error) {
4300 cli := dbx.Client
4301
4302 dbx.Config.LogDebug("arg: %v", arg)
4303 b, err := json.Marshal(arg)
4304 if err != nil {
4305 return
4306 }
4307
4308 headers := map[string]string{
4309 "Content-Type": "application/json",
4310 }
4311
4312 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/rename", headers, bytes.NewReader(b))
4313 if err != nil {
4314 return
4315 }
4316 dbx.Config.LogInfo("req: %v", req)
4317
4318 resp, err := cli.Do(req)
4319 if err != nil {
4320 return
4321 }
4322
4323 dbx.Config.LogInfo("resp: %v", resp)
4324 defer resp.Body.Close()
4325 body, err := ioutil.ReadAll(resp.Body)
4326 if err != nil {
4327 return
4328 }
4329
4330 dbx.Config.LogDebug("body: %s", body)
4331 if resp.StatusCode == http.StatusOK {
4332 err = json.Unmarshal(body, &res)
4333 if err != nil {
4334 return
4335 }
4336
4337 return
4338 }
4339 if resp.StatusCode == http.StatusConflict {
4340 var apiError TeamFolderRenameAPIError
4341 err = json.Unmarshal(body, &apiError)
4342 if err != nil {
4343 return
4344 }
4345 err = apiError
4346 return
4347 }
4348 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4349 if err != nil {
4350 return
4351 }
4352 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4353 return
4354 }
4355
4356 //TeamFolderUpdateSyncSettingsAPIError is an error-wrapper for the team_folder/update_sync_settings route
4357 type TeamFolderUpdateSyncSettingsAPIError struct {
4358 dropbox.APIError
4359 EndpointError *TeamFolderUpdateSyncSettingsError `json:"error"`
4360 }
4361
4362 func (dbx *apiImpl) TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error) {
4363 cli := dbx.Client
4364
4365 dbx.Config.LogDebug("arg: %v", arg)
4366 b, err := json.Marshal(arg)
4367 if err != nil {
4368 return
4369 }
4370
4371 headers := map[string]string{
4372 "Content-Type": "application/json",
4373 }
4374
4375 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/update_sync_settings", headers, bytes.NewReader(b))
4376 if err != nil {
4377 return
4378 }
4379 dbx.Config.LogInfo("req: %v", req)
4380
4381 resp, err := cli.Do(req)
4382 if err != nil {
4383 return
4384 }
4385
4386 dbx.Config.LogInfo("resp: %v", resp)
4387 defer resp.Body.Close()
4388 body, err := ioutil.ReadAll(resp.Body)
4389 if err != nil {
4390 return
4391 }
4392
4393 dbx.Config.LogDebug("body: %s", body)
4394 if resp.StatusCode == http.StatusOK {
4395 err = json.Unmarshal(body, &res)
4396 if err != nil {
4397 return
4398 }
4399
4400 return
4401 }
4402 if resp.StatusCode == http.StatusConflict {
4403 var apiError TeamFolderUpdateSyncSettingsAPIError
4404 err = json.Unmarshal(body, &apiError)
4405 if err != nil {
4406 return
4407 }
4408 err = apiError
4409 return
4410 }
4411 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4412 if err != nil {
4413 return
4414 }
4415 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4416 return
4417 }
4418
4419 //TokenGetAuthenticatedAdminAPIError is an error-wrapper for the token/get_authenticated_admin route
4420 type TokenGetAuthenticatedAdminAPIError struct {
4421 dropbox.APIError
4422 EndpointError *TokenGetAuthenticatedAdminError `json:"error"`
4423 }
4424
4425 func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error) {
4426 cli := dbx.Client
4427
4428 headers := map[string]string{}
4429
4430 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "token/get_authenticated_admin", headers, nil)
4431 if err != nil {
4432 return
4433 }
4434 dbx.Config.LogInfo("req: %v", req)
4435
4436 resp, err := cli.Do(req)
4437 if err != nil {
4438 return
4439 }
4440
4441 dbx.Config.LogInfo("resp: %v", resp)
4442 defer resp.Body.Close()
4443 body, err := ioutil.ReadAll(resp.Body)
4444 if err != nil {
4445 return
4446 }
4447
4448 dbx.Config.LogDebug("body: %s", body)
4449 if resp.StatusCode == http.StatusOK {
4450 err = json.Unmarshal(body, &res)
4451 if err != nil {
4452 return
4453 }
4454
4455 return
4456 }
4457 if resp.StatusCode == http.StatusConflict {
4458 var apiError TokenGetAuthenticatedAdminAPIError
4459 err = json.Unmarshal(body, &apiError)
4460 if err != nil {
4461 return
4462 }
4463 err = apiError
4464 return
4465 }
4466 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
4467 if err != nil {
4468 return
4469 }
4470 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
4471 return
4472 }
4473
4474 // New returns a Client implementation for this namespace
4475 func New(c dropbox.Config) Client {
4476 ctx := apiImpl(dropbox.NewContext(c))
4477 return &ctx
4478 }
+0
-4337
dropbox/team/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team : has no documentation (yet)
21 package team
22
23 import (
24 "encoding/json"
25 "time"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users"
32 )
33
34 // DeviceSession : has no documentation (yet)
35 type DeviceSession struct {
36 // SessionId : The session id.
37 SessionId string `json:"session_id"`
38 // IpAddress : The IP address of the last activity from this session.
39 IpAddress string `json:"ip_address,omitempty"`
40 // Country : The country from which the last activity from this session was
41 // made.
42 Country string `json:"country,omitempty"`
43 // Created : The time this session was created.
44 Created time.Time `json:"created,omitempty"`
45 // Updated : The time of the last activity from this session.
46 Updated time.Time `json:"updated,omitempty"`
47 }
48
49 // NewDeviceSession returns a new DeviceSession instance
50 func NewDeviceSession(SessionId string) *DeviceSession {
51 s := new(DeviceSession)
52 s.SessionId = SessionId
53 return s
54 }
55
56 // ActiveWebSession : Information on active web sessions.
57 type ActiveWebSession struct {
58 DeviceSession
59 // UserAgent : Information on the hosting device.
60 UserAgent string `json:"user_agent"`
61 // Os : Information on the hosting operating system.
62 Os string `json:"os"`
63 // Browser : Information on the browser used for this web session.
64 Browser string `json:"browser"`
65 // Expires : The time this session expires.
66 Expires time.Time `json:"expires,omitempty"`
67 }
68
69 // NewActiveWebSession returns a new ActiveWebSession instance
70 func NewActiveWebSession(SessionId string, UserAgent string, Os string, Browser string) *ActiveWebSession {
71 s := new(ActiveWebSession)
72 s.SessionId = SessionId
73 s.UserAgent = UserAgent
74 s.Os = Os
75 s.Browser = Browser
76 return s
77 }
78
79 // AdminTier : Describes which team-related admin permissions a user has.
80 type AdminTier struct {
81 dropbox.Tagged
82 }
83
84 // Valid tag values for AdminTier
85 const (
86 AdminTierTeamAdmin = "team_admin"
87 AdminTierUserManagementAdmin = "user_management_admin"
88 AdminTierSupportAdmin = "support_admin"
89 AdminTierMemberOnly = "member_only"
90 )
91
92 // ApiApp : Information on linked third party applications.
93 type ApiApp struct {
94 // AppId : The application unique id.
95 AppId string `json:"app_id"`
96 // AppName : The application name.
97 AppName string `json:"app_name"`
98 // Publisher : The application publisher name.
99 Publisher string `json:"publisher,omitempty"`
100 // PublisherUrl : The publisher's URL.
101 PublisherUrl string `json:"publisher_url,omitempty"`
102 // Linked : The time this application was linked.
103 Linked time.Time `json:"linked,omitempty"`
104 // IsAppFolder : Whether the linked application uses a dedicated folder.
105 IsAppFolder bool `json:"is_app_folder"`
106 }
107
108 // NewApiApp returns a new ApiApp instance
109 func NewApiApp(AppId string, AppName string, IsAppFolder bool) *ApiApp {
110 s := new(ApiApp)
111 s.AppId = AppId
112 s.AppName = AppName
113 s.IsAppFolder = IsAppFolder
114 return s
115 }
116
117 // BaseDfbReport : Base report structure.
118 type BaseDfbReport struct {
119 // StartDate : First date present in the results as 'YYYY-MM-DD' or None.
120 StartDate string `json:"start_date"`
121 }
122
123 // NewBaseDfbReport returns a new BaseDfbReport instance
124 func NewBaseDfbReport(StartDate string) *BaseDfbReport {
125 s := new(BaseDfbReport)
126 s.StartDate = StartDate
127 return s
128 }
129
130 // BaseTeamFolderError : Base error that all errors for existing team folders
131 // should extend.
132 type BaseTeamFolderError struct {
133 dropbox.Tagged
134 // AccessError : has no documentation (yet)
135 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
136 // StatusError : has no documentation (yet)
137 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
138 // TeamSharedDropboxError : has no documentation (yet)
139 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
140 }
141
142 // Valid tag values for BaseTeamFolderError
143 const (
144 BaseTeamFolderErrorAccessError = "access_error"
145 BaseTeamFolderErrorStatusError = "status_error"
146 BaseTeamFolderErrorTeamSharedDropboxError = "team_shared_dropbox_error"
147 BaseTeamFolderErrorOther = "other"
148 )
149
150 // UnmarshalJSON deserializes into a BaseTeamFolderError instance
151 func (u *BaseTeamFolderError) UnmarshalJSON(body []byte) error {
152 type wrap struct {
153 dropbox.Tagged
154 // AccessError : has no documentation (yet)
155 AccessError json.RawMessage `json:"access_error,omitempty"`
156 // StatusError : has no documentation (yet)
157 StatusError json.RawMessage `json:"status_error,omitempty"`
158 // TeamSharedDropboxError : has no documentation (yet)
159 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
160 }
161 var w wrap
162 var err error
163 if err = json.Unmarshal(body, &w); err != nil {
164 return err
165 }
166 u.Tag = w.Tag
167 switch u.Tag {
168 case "access_error":
169 err = json.Unmarshal(w.AccessError, &u.AccessError)
170
171 if err != nil {
172 return err
173 }
174 case "status_error":
175 err = json.Unmarshal(w.StatusError, &u.StatusError)
176
177 if err != nil {
178 return err
179 }
180 case "team_shared_dropbox_error":
181 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
182
183 if err != nil {
184 return err
185 }
186 }
187 return nil
188 }
189
190 // CustomQuotaError : Error returned when getting member custom quota.
191 type CustomQuotaError struct {
192 dropbox.Tagged
193 }
194
195 // Valid tag values for CustomQuotaError
196 const (
197 CustomQuotaErrorTooManyUsers = "too_many_users"
198 CustomQuotaErrorOther = "other"
199 )
200
201 // CustomQuotaResult : User custom quota.
202 type CustomQuotaResult struct {
203 dropbox.Tagged
204 // Success : User's custom quota.
205 Success *UserCustomQuotaResult `json:"success,omitempty"`
206 // InvalidUser : Invalid user (not in team).
207 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
208 }
209
210 // Valid tag values for CustomQuotaResult
211 const (
212 CustomQuotaResultSuccess = "success"
213 CustomQuotaResultInvalidUser = "invalid_user"
214 CustomQuotaResultOther = "other"
215 )
216
217 // UnmarshalJSON deserializes into a CustomQuotaResult instance
218 func (u *CustomQuotaResult) UnmarshalJSON(body []byte) error {
219 type wrap struct {
220 dropbox.Tagged
221 // Success : User's custom quota.
222 Success json.RawMessage `json:"success,omitempty"`
223 // InvalidUser : Invalid user (not in team).
224 InvalidUser json.RawMessage `json:"invalid_user,omitempty"`
225 }
226 var w wrap
227 var err error
228 if err = json.Unmarshal(body, &w); err != nil {
229 return err
230 }
231 u.Tag = w.Tag
232 switch u.Tag {
233 case "success":
234 err = json.Unmarshal(body, &u.Success)
235
236 if err != nil {
237 return err
238 }
239 case "invalid_user":
240 err = json.Unmarshal(w.InvalidUser, &u.InvalidUser)
241
242 if err != nil {
243 return err
244 }
245 }
246 return nil
247 }
248
249 // CustomQuotaUsersArg : has no documentation (yet)
250 type CustomQuotaUsersArg struct {
251 // Users : List of users.
252 Users []*UserSelectorArg `json:"users"`
253 }
254
255 // NewCustomQuotaUsersArg returns a new CustomQuotaUsersArg instance
256 func NewCustomQuotaUsersArg(Users []*UserSelectorArg) *CustomQuotaUsersArg {
257 s := new(CustomQuotaUsersArg)
258 s.Users = Users
259 return s
260 }
261
262 // DateRange : Input arguments that can be provided for most reports.
263 type DateRange struct {
264 // StartDate : Optional starting date (inclusive).
265 StartDate time.Time `json:"start_date,omitempty"`
266 // EndDate : Optional ending date (exclusive).
267 EndDate time.Time `json:"end_date,omitempty"`
268 }
269
270 // NewDateRange returns a new DateRange instance
271 func NewDateRange() *DateRange {
272 s := new(DateRange)
273 return s
274 }
275
276 // DateRangeError : Errors that can originate from problems in input arguments
277 // to reports.
278 type DateRangeError struct {
279 dropbox.Tagged
280 }
281
282 // Valid tag values for DateRangeError
283 const (
284 DateRangeErrorOther = "other"
285 )
286
287 // DesktopClientSession : Information about linked Dropbox desktop client
288 // sessions.
289 type DesktopClientSession struct {
290 DeviceSession
291 // HostName : Name of the hosting desktop.
292 HostName string `json:"host_name"`
293 // ClientType : The Dropbox desktop client type.
294 ClientType *DesktopPlatform `json:"client_type"`
295 // ClientVersion : The Dropbox client version.
296 ClientVersion string `json:"client_version"`
297 // Platform : Information on the hosting platform.
298 Platform string `json:"platform"`
299 // IsDeleteOnUnlinkSupported : Whether it's possible to delete all of the
300 // account files upon unlinking.
301 IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"`
302 }
303
304 // NewDesktopClientSession returns a new DesktopClientSession instance
305 func NewDesktopClientSession(SessionId string, HostName string, ClientType *DesktopPlatform, ClientVersion string, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopClientSession {
306 s := new(DesktopClientSession)
307 s.SessionId = SessionId
308 s.HostName = HostName
309 s.ClientType = ClientType
310 s.ClientVersion = ClientVersion
311 s.Platform = Platform
312 s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported
313 return s
314 }
315
316 // DesktopPlatform : has no documentation (yet)
317 type DesktopPlatform struct {
318 dropbox.Tagged
319 }
320
321 // Valid tag values for DesktopPlatform
322 const (
323 DesktopPlatformWindows = "windows"
324 DesktopPlatformMac = "mac"
325 DesktopPlatformLinux = "linux"
326 DesktopPlatformOther = "other"
327 )
328
329 // DeviceSessionArg : has no documentation (yet)
330 type DeviceSessionArg struct {
331 // SessionId : The session id.
332 SessionId string `json:"session_id"`
333 // TeamMemberId : The unique id of the member owning the device.
334 TeamMemberId string `json:"team_member_id"`
335 }
336
337 // NewDeviceSessionArg returns a new DeviceSessionArg instance
338 func NewDeviceSessionArg(SessionId string, TeamMemberId string) *DeviceSessionArg {
339 s := new(DeviceSessionArg)
340 s.SessionId = SessionId
341 s.TeamMemberId = TeamMemberId
342 return s
343 }
344
345 // DevicesActive : Each of the items is an array of values, one value per day.
346 // The value is the number of devices active within a time window, ending with
347 // that day. If there is no data for a day, then the value will be None.
348 type DevicesActive struct {
349 // Windows : Array of number of linked windows (desktop) clients with
350 // activity.
351 Windows []uint64 `json:"windows"`
352 // Macos : Array of number of linked mac (desktop) clients with activity.
353 Macos []uint64 `json:"macos"`
354 // Linux : Array of number of linked linus (desktop) clients with activity.
355 Linux []uint64 `json:"linux"`
356 // Ios : Array of number of linked ios devices with activity.
357 Ios []uint64 `json:"ios"`
358 // Android : Array of number of linked android devices with activity.
359 Android []uint64 `json:"android"`
360 // Other : Array of number of other linked devices (blackberry, windows
361 // phone, etc) with activity.
362 Other []uint64 `json:"other"`
363 // Total : Array of total number of linked clients with activity.
364 Total []uint64 `json:"total"`
365 }
366
367 // NewDevicesActive returns a new DevicesActive instance
368 func NewDevicesActive(Windows []uint64, Macos []uint64, Linux []uint64, Ios []uint64, Android []uint64, Other []uint64, Total []uint64) *DevicesActive {
369 s := new(DevicesActive)
370 s.Windows = Windows
371 s.Macos = Macos
372 s.Linux = Linux
373 s.Ios = Ios
374 s.Android = Android
375 s.Other = Other
376 s.Total = Total
377 return s
378 }
379
380 // ExcludedUsersListArg : Excluded users list argument.
381 type ExcludedUsersListArg struct {
382 // Limit : Number of results to return per call.
383 Limit uint32 `json:"limit"`
384 }
385
386 // NewExcludedUsersListArg returns a new ExcludedUsersListArg instance
387 func NewExcludedUsersListArg() *ExcludedUsersListArg {
388 s := new(ExcludedUsersListArg)
389 s.Limit = 1000
390 return s
391 }
392
393 // ExcludedUsersListContinueArg : Excluded users list continue argument.
394 type ExcludedUsersListContinueArg struct {
395 // Cursor : Indicates from what point to get the next set of users.
396 Cursor string `json:"cursor"`
397 }
398
399 // NewExcludedUsersListContinueArg returns a new ExcludedUsersListContinueArg instance
400 func NewExcludedUsersListContinueArg(Cursor string) *ExcludedUsersListContinueArg {
401 s := new(ExcludedUsersListContinueArg)
402 s.Cursor = Cursor
403 return s
404 }
405
406 // ExcludedUsersListContinueError : Excluded users list continue error.
407 type ExcludedUsersListContinueError struct {
408 dropbox.Tagged
409 }
410
411 // Valid tag values for ExcludedUsersListContinueError
412 const (
413 ExcludedUsersListContinueErrorInvalidCursor = "invalid_cursor"
414 ExcludedUsersListContinueErrorOther = "other"
415 )
416
417 // ExcludedUsersListError : Excluded users list error.
418 type ExcludedUsersListError struct {
419 dropbox.Tagged
420 }
421
422 // Valid tag values for ExcludedUsersListError
423 const (
424 ExcludedUsersListErrorListError = "list_error"
425 ExcludedUsersListErrorOther = "other"
426 )
427
428 // ExcludedUsersListResult : Excluded users list result.
429 type ExcludedUsersListResult struct {
430 // Users : has no documentation (yet)
431 Users []*MemberProfile `json:"users"`
432 // Cursor : Pass the cursor into
433 // `memberSpaceLimitsExcludedUsersListContinue` to obtain additional
434 // excluded users.
435 Cursor string `json:"cursor,omitempty"`
436 // HasMore : Is true if there are additional excluded users that have not
437 // been returned yet. An additional call to
438 // `memberSpaceLimitsExcludedUsersListContinue` can retrieve them.
439 HasMore bool `json:"has_more"`
440 }
441
442 // NewExcludedUsersListResult returns a new ExcludedUsersListResult instance
443 func NewExcludedUsersListResult(Users []*MemberProfile, HasMore bool) *ExcludedUsersListResult {
444 s := new(ExcludedUsersListResult)
445 s.Users = Users
446 s.HasMore = HasMore
447 return s
448 }
449
450 // ExcludedUsersUpdateArg : Argument of excluded users update operation. Should
451 // include a list of users to add/remove (according to endpoint), Maximum size
452 // of the list is 1000 users.
453 type ExcludedUsersUpdateArg struct {
454 // Users : List of users to be added/removed.
455 Users []*UserSelectorArg `json:"users,omitempty"`
456 }
457
458 // NewExcludedUsersUpdateArg returns a new ExcludedUsersUpdateArg instance
459 func NewExcludedUsersUpdateArg() *ExcludedUsersUpdateArg {
460 s := new(ExcludedUsersUpdateArg)
461 return s
462 }
463
464 // ExcludedUsersUpdateError : Excluded users update error.
465 type ExcludedUsersUpdateError struct {
466 dropbox.Tagged
467 }
468
469 // Valid tag values for ExcludedUsersUpdateError
470 const (
471 ExcludedUsersUpdateErrorUsersNotInTeam = "users_not_in_team"
472 ExcludedUsersUpdateErrorTooManyUsers = "too_many_users"
473 ExcludedUsersUpdateErrorOther = "other"
474 )
475
476 // ExcludedUsersUpdateResult : Excluded users update result.
477 type ExcludedUsersUpdateResult struct {
478 // Status : Update status.
479 Status *ExcludedUsersUpdateStatus `json:"status"`
480 }
481
482 // NewExcludedUsersUpdateResult returns a new ExcludedUsersUpdateResult instance
483 func NewExcludedUsersUpdateResult(Status *ExcludedUsersUpdateStatus) *ExcludedUsersUpdateResult {
484 s := new(ExcludedUsersUpdateResult)
485 s.Status = Status
486 return s
487 }
488
489 // ExcludedUsersUpdateStatus : Excluded users update operation status.
490 type ExcludedUsersUpdateStatus struct {
491 dropbox.Tagged
492 }
493
494 // Valid tag values for ExcludedUsersUpdateStatus
495 const (
496 ExcludedUsersUpdateStatusSuccess = "success"
497 ExcludedUsersUpdateStatusOther = "other"
498 )
499
500 // Feature : A set of features that a Dropbox Business account may support.
501 type Feature struct {
502 dropbox.Tagged
503 }
504
505 // Valid tag values for Feature
506 const (
507 FeatureUploadApiRateLimit = "upload_api_rate_limit"
508 FeatureHasTeamSharedDropbox = "has_team_shared_dropbox"
509 FeatureHasTeamFileEvents = "has_team_file_events"
510 FeatureHasTeamSelectiveSync = "has_team_selective_sync"
511 FeatureOther = "other"
512 )
513
514 // FeatureValue : The values correspond to entries in `Feature`. You may get
515 // different value according to your Dropbox Business plan.
516 type FeatureValue struct {
517 dropbox.Tagged
518 // UploadApiRateLimit : has no documentation (yet)
519 UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"`
520 // HasTeamSharedDropbox : has no documentation (yet)
521 HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"`
522 // HasTeamFileEvents : has no documentation (yet)
523 HasTeamFileEvents *HasTeamFileEventsValue `json:"has_team_file_events,omitempty"`
524 // HasTeamSelectiveSync : has no documentation (yet)
525 HasTeamSelectiveSync *HasTeamSelectiveSyncValue `json:"has_team_selective_sync,omitempty"`
526 }
527
528 // Valid tag values for FeatureValue
529 const (
530 FeatureValueUploadApiRateLimit = "upload_api_rate_limit"
531 FeatureValueHasTeamSharedDropbox = "has_team_shared_dropbox"
532 FeatureValueHasTeamFileEvents = "has_team_file_events"
533 FeatureValueHasTeamSelectiveSync = "has_team_selective_sync"
534 FeatureValueOther = "other"
535 )
536
537 // UnmarshalJSON deserializes into a FeatureValue instance
538 func (u *FeatureValue) UnmarshalJSON(body []byte) error {
539 type wrap struct {
540 dropbox.Tagged
541 // UploadApiRateLimit : has no documentation (yet)
542 UploadApiRateLimit json.RawMessage `json:"upload_api_rate_limit,omitempty"`
543 // HasTeamSharedDropbox : has no documentation (yet)
544 HasTeamSharedDropbox json.RawMessage `json:"has_team_shared_dropbox,omitempty"`
545 // HasTeamFileEvents : has no documentation (yet)
546 HasTeamFileEvents json.RawMessage `json:"has_team_file_events,omitempty"`
547 // HasTeamSelectiveSync : has no documentation (yet)
548 HasTeamSelectiveSync json.RawMessage `json:"has_team_selective_sync,omitempty"`
549 }
550 var w wrap
551 var err error
552 if err = json.Unmarshal(body, &w); err != nil {
553 return err
554 }
555 u.Tag = w.Tag
556 switch u.Tag {
557 case "upload_api_rate_limit":
558 err = json.Unmarshal(w.UploadApiRateLimit, &u.UploadApiRateLimit)
559
560 if err != nil {
561 return err
562 }
563 case "has_team_shared_dropbox":
564 err = json.Unmarshal(w.HasTeamSharedDropbox, &u.HasTeamSharedDropbox)
565
566 if err != nil {
567 return err
568 }
569 case "has_team_file_events":
570 err = json.Unmarshal(w.HasTeamFileEvents, &u.HasTeamFileEvents)
571
572 if err != nil {
573 return err
574 }
575 case "has_team_selective_sync":
576 err = json.Unmarshal(w.HasTeamSelectiveSync, &u.HasTeamSelectiveSync)
577
578 if err != nil {
579 return err
580 }
581 }
582 return nil
583 }
584
585 // FeaturesGetValuesBatchArg : has no documentation (yet)
586 type FeaturesGetValuesBatchArg struct {
587 // Features : A list of features in `Feature`. If the list is empty, this
588 // route will return `FeaturesGetValuesBatchError`.
589 Features []*Feature `json:"features"`
590 }
591
592 // NewFeaturesGetValuesBatchArg returns a new FeaturesGetValuesBatchArg instance
593 func NewFeaturesGetValuesBatchArg(Features []*Feature) *FeaturesGetValuesBatchArg {
594 s := new(FeaturesGetValuesBatchArg)
595 s.Features = Features
596 return s
597 }
598
599 // FeaturesGetValuesBatchError : has no documentation (yet)
600 type FeaturesGetValuesBatchError struct {
601 dropbox.Tagged
602 }
603
604 // Valid tag values for FeaturesGetValuesBatchError
605 const (
606 FeaturesGetValuesBatchErrorEmptyFeaturesList = "empty_features_list"
607 FeaturesGetValuesBatchErrorOther = "other"
608 )
609
610 // FeaturesGetValuesBatchResult : has no documentation (yet)
611 type FeaturesGetValuesBatchResult struct {
612 // Values : has no documentation (yet)
613 Values []*FeatureValue `json:"values"`
614 }
615
616 // NewFeaturesGetValuesBatchResult returns a new FeaturesGetValuesBatchResult instance
617 func NewFeaturesGetValuesBatchResult(Values []*FeatureValue) *FeaturesGetValuesBatchResult {
618 s := new(FeaturesGetValuesBatchResult)
619 s.Values = Values
620 return s
621 }
622
623 // GetActivityReport : Activity Report Result. Each of the items in the storage
624 // report is an array of values, one value per day. If there is no data for a
625 // day, then the value will be None.
626 type GetActivityReport struct {
627 BaseDfbReport
628 // Adds : Array of total number of adds by team members.
629 Adds []uint64 `json:"adds"`
630 // Edits : Array of number of edits by team members. If the same user edits
631 // the same file multiple times this is counted as a single edit.
632 Edits []uint64 `json:"edits"`
633 // Deletes : Array of total number of deletes by team members.
634 Deletes []uint64 `json:"deletes"`
635 // ActiveUsers28Day : Array of the number of users who have been active in
636 // the last 28 days.
637 ActiveUsers28Day []uint64 `json:"active_users_28_day"`
638 // ActiveUsers7Day : Array of the number of users who have been active in
639 // the last week.
640 ActiveUsers7Day []uint64 `json:"active_users_7_day"`
641 // ActiveUsers1Day : Array of the number of users who have been active in
642 // the last day.
643 ActiveUsers1Day []uint64 `json:"active_users_1_day"`
644 // ActiveSharedFolders28Day : Array of the number of shared folders with
645 // some activity in the last 28 days.
646 ActiveSharedFolders28Day []uint64 `json:"active_shared_folders_28_day"`
647 // ActiveSharedFolders7Day : Array of the number of shared folders with some
648 // activity in the last week.
649 ActiveSharedFolders7Day []uint64 `json:"active_shared_folders_7_day"`
650 // ActiveSharedFolders1Day : Array of the number of shared folders with some
651 // activity in the last day.
652 ActiveSharedFolders1Day []uint64 `json:"active_shared_folders_1_day"`
653 // SharedLinksCreated : Array of the number of shared links created.
654 SharedLinksCreated []uint64 `json:"shared_links_created"`
655 // SharedLinksViewedByTeam : Array of the number of views by team users to
656 // shared links created by the team.
657 SharedLinksViewedByTeam []uint64 `json:"shared_links_viewed_by_team"`
658 // SharedLinksViewedByOutsideUser : Array of the number of views by users
659 // outside of the team to shared links created by the team.
660 SharedLinksViewedByOutsideUser []uint64 `json:"shared_links_viewed_by_outside_user"`
661 // SharedLinksViewedByNotLoggedIn : Array of the number of views by
662 // non-logged-in users to shared links created by the team.
663 SharedLinksViewedByNotLoggedIn []uint64 `json:"shared_links_viewed_by_not_logged_in"`
664 // SharedLinksViewedTotal : Array of the total number of views to shared
665 // links created by the team.
666 SharedLinksViewedTotal []uint64 `json:"shared_links_viewed_total"`
667 }
668
669 // NewGetActivityReport returns a new GetActivityReport instance
670 func NewGetActivityReport(StartDate string, Adds []uint64, Edits []uint64, Deletes []uint64, ActiveUsers28Day []uint64, ActiveUsers7Day []uint64, ActiveUsers1Day []uint64, ActiveSharedFolders28Day []uint64, ActiveSharedFolders7Day []uint64, ActiveSharedFolders1Day []uint64, SharedLinksCreated []uint64, SharedLinksViewedByTeam []uint64, SharedLinksViewedByOutsideUser []uint64, SharedLinksViewedByNotLoggedIn []uint64, SharedLinksViewedTotal []uint64) *GetActivityReport {
671 s := new(GetActivityReport)
672 s.StartDate = StartDate
673 s.Adds = Adds
674 s.Edits = Edits
675 s.Deletes = Deletes
676 s.ActiveUsers28Day = ActiveUsers28Day
677 s.ActiveUsers7Day = ActiveUsers7Day
678 s.ActiveUsers1Day = ActiveUsers1Day
679 s.ActiveSharedFolders28Day = ActiveSharedFolders28Day
680 s.ActiveSharedFolders7Day = ActiveSharedFolders7Day
681 s.ActiveSharedFolders1Day = ActiveSharedFolders1Day
682 s.SharedLinksCreated = SharedLinksCreated
683 s.SharedLinksViewedByTeam = SharedLinksViewedByTeam
684 s.SharedLinksViewedByOutsideUser = SharedLinksViewedByOutsideUser
685 s.SharedLinksViewedByNotLoggedIn = SharedLinksViewedByNotLoggedIn
686 s.SharedLinksViewedTotal = SharedLinksViewedTotal
687 return s
688 }
689
690 // GetDevicesReport : Devices Report Result. Contains subsections for different
691 // time ranges of activity. Each of the items in each subsection of the storage
692 // report is an array of values, one value per day. If there is no data for a
693 // day, then the value will be None.
694 type GetDevicesReport struct {
695 BaseDfbReport
696 // Active1Day : Report of the number of devices active in the last day.
697 Active1Day *DevicesActive `json:"active_1_day"`
698 // Active7Day : Report of the number of devices active in the last 7 days.
699 Active7Day *DevicesActive `json:"active_7_day"`
700 // Active28Day : Report of the number of devices active in the last 28 days.
701 Active28Day *DevicesActive `json:"active_28_day"`
702 }
703
704 // NewGetDevicesReport returns a new GetDevicesReport instance
705 func NewGetDevicesReport(StartDate string, Active1Day *DevicesActive, Active7Day *DevicesActive, Active28Day *DevicesActive) *GetDevicesReport {
706 s := new(GetDevicesReport)
707 s.StartDate = StartDate
708 s.Active1Day = Active1Day
709 s.Active7Day = Active7Day
710 s.Active28Day = Active28Day
711 return s
712 }
713
714 // GetMembershipReport : Membership Report Result. Each of the items in the
715 // storage report is an array of values, one value per day. If there is no data
716 // for a day, then the value will be None.
717 type GetMembershipReport struct {
718 BaseDfbReport
719 // TeamSize : Team size, for each day.
720 TeamSize []uint64 `json:"team_size"`
721 // PendingInvites : The number of pending invites to the team, for each day.
722 PendingInvites []uint64 `json:"pending_invites"`
723 // MembersJoined : The number of members that joined the team, for each day.
724 MembersJoined []uint64 `json:"members_joined"`
725 // SuspendedMembers : The number of suspended team members, for each day.
726 SuspendedMembers []uint64 `json:"suspended_members"`
727 // Licenses : The total number of licenses the team has, for each day.
728 Licenses []uint64 `json:"licenses"`
729 }
730
731 // NewGetMembershipReport returns a new GetMembershipReport instance
732 func NewGetMembershipReport(StartDate string, TeamSize []uint64, PendingInvites []uint64, MembersJoined []uint64, SuspendedMembers []uint64, Licenses []uint64) *GetMembershipReport {
733 s := new(GetMembershipReport)
734 s.StartDate = StartDate
735 s.TeamSize = TeamSize
736 s.PendingInvites = PendingInvites
737 s.MembersJoined = MembersJoined
738 s.SuspendedMembers = SuspendedMembers
739 s.Licenses = Licenses
740 return s
741 }
742
743 // GetStorageReport : Storage Report Result. Each of the items in the storage
744 // report is an array of values, one value per day. If there is no data for a
745 // day, then the value will be None.
746 type GetStorageReport struct {
747 BaseDfbReport
748 // TotalUsage : Sum of the shared, unshared, and datastore usages, for each
749 // day.
750 TotalUsage []uint64 `json:"total_usage"`
751 // SharedUsage : Array of the combined size (bytes) of team members' shared
752 // folders, for each day.
753 SharedUsage []uint64 `json:"shared_usage"`
754 // UnsharedUsage : Array of the combined size (bytes) of team members' root
755 // namespaces, for each day.
756 UnsharedUsage []uint64 `json:"unshared_usage"`
757 // SharedFolders : Array of the number of shared folders owned by team
758 // members, for each day.
759 SharedFolders []uint64 `json:"shared_folders"`
760 // MemberStorageMap : Array of storage summaries of team members' account
761 // sizes. Each storage summary is an array of key, value pairs, where each
762 // pair describes a storage bucket. The key indicates the upper bound of the
763 // bucket and the value is the number of users in that bucket. There is one
764 // such summary per day. If there is no data for a day, the storage summary
765 // will be empty.
766 MemberStorageMap [][]*StorageBucket `json:"member_storage_map"`
767 }
768
769 // NewGetStorageReport returns a new GetStorageReport instance
770 func NewGetStorageReport(StartDate string, TotalUsage []uint64, SharedUsage []uint64, UnsharedUsage []uint64, SharedFolders []uint64, MemberStorageMap [][]*StorageBucket) *GetStorageReport {
771 s := new(GetStorageReport)
772 s.StartDate = StartDate
773 s.TotalUsage = TotalUsage
774 s.SharedUsage = SharedUsage
775 s.UnsharedUsage = UnsharedUsage
776 s.SharedFolders = SharedFolders
777 s.MemberStorageMap = MemberStorageMap
778 return s
779 }
780
781 // GroupAccessType : Role of a user in group.
782 type GroupAccessType struct {
783 dropbox.Tagged
784 }
785
786 // Valid tag values for GroupAccessType
787 const (
788 GroupAccessTypeMember = "member"
789 GroupAccessTypeOwner = "owner"
790 )
791
792 // GroupCreateArg : has no documentation (yet)
793 type GroupCreateArg struct {
794 // GroupName : Group name.
795 GroupName string `json:"group_name"`
796 // GroupExternalId : The creator of a team can associate an arbitrary
797 // external ID to the group.
798 GroupExternalId string `json:"group_external_id,omitempty"`
799 // GroupManagementType : Whether the team can be managed by selected users,
800 // or only by team admins.
801 GroupManagementType *team_common.GroupManagementType `json:"group_management_type,omitempty"`
802 }
803
804 // NewGroupCreateArg returns a new GroupCreateArg instance
805 func NewGroupCreateArg(GroupName string) *GroupCreateArg {
806 s := new(GroupCreateArg)
807 s.GroupName = GroupName
808 return s
809 }
810
811 // GroupCreateError : has no documentation (yet)
812 type GroupCreateError struct {
813 dropbox.Tagged
814 }
815
816 // Valid tag values for GroupCreateError
817 const (
818 GroupCreateErrorGroupNameAlreadyUsed = "group_name_already_used"
819 GroupCreateErrorGroupNameInvalid = "group_name_invalid"
820 GroupCreateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
821 GroupCreateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
822 GroupCreateErrorOther = "other"
823 )
824
825 // GroupSelectorError : Error that can be raised when `GroupSelector` is used.
826 type GroupSelectorError struct {
827 dropbox.Tagged
828 }
829
830 // Valid tag values for GroupSelectorError
831 const (
832 GroupSelectorErrorGroupNotFound = "group_not_found"
833 GroupSelectorErrorOther = "other"
834 )
835
836 // GroupSelectorWithTeamGroupError : Error that can be raised when
837 // `GroupSelector` is used and team groups are disallowed from being used.
838 type GroupSelectorWithTeamGroupError struct {
839 dropbox.Tagged
840 }
841
842 // Valid tag values for GroupSelectorWithTeamGroupError
843 const (
844 GroupSelectorWithTeamGroupErrorGroupNotFound = "group_not_found"
845 GroupSelectorWithTeamGroupErrorOther = "other"
846 GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
847 )
848
849 // GroupDeleteError : has no documentation (yet)
850 type GroupDeleteError struct {
851 dropbox.Tagged
852 }
853
854 // Valid tag values for GroupDeleteError
855 const (
856 GroupDeleteErrorGroupNotFound = "group_not_found"
857 GroupDeleteErrorOther = "other"
858 GroupDeleteErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
859 GroupDeleteErrorGroupAlreadyDeleted = "group_already_deleted"
860 )
861
862 // GroupFullInfo : Full description of a group.
863 type GroupFullInfo struct {
864 team_common.GroupSummary
865 // Members : List of group members.
866 Members []*GroupMemberInfo `json:"members,omitempty"`
867 // Created : The group creation time as a UTC timestamp in milliseconds
868 // since the Unix epoch.
869 Created uint64 `json:"created"`
870 }
871
872 // NewGroupFullInfo returns a new GroupFullInfo instance
873 func NewGroupFullInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, Created uint64) *GroupFullInfo {
874 s := new(GroupFullInfo)
875 s.GroupName = GroupName
876 s.GroupId = GroupId
877 s.GroupManagementType = GroupManagementType
878 s.Created = Created
879 return s
880 }
881
882 // GroupMemberInfo : Profile of group member, and role in group.
883 type GroupMemberInfo struct {
884 // Profile : Profile of group member.
885 Profile *MemberProfile `json:"profile"`
886 // AccessType : The role that the user has in the group.
887 AccessType *GroupAccessType `json:"access_type"`
888 }
889
890 // NewGroupMemberInfo returns a new GroupMemberInfo instance
891 func NewGroupMemberInfo(Profile *MemberProfile, AccessType *GroupAccessType) *GroupMemberInfo {
892 s := new(GroupMemberInfo)
893 s.Profile = Profile
894 s.AccessType = AccessType
895 return s
896 }
897
898 // GroupMemberSelector : Argument for selecting a group and a single user.
899 type GroupMemberSelector struct {
900 // Group : Specify a group.
901 Group *GroupSelector `json:"group"`
902 // User : Identity of a user that is a member of `group`.
903 User *UserSelectorArg `json:"user"`
904 }
905
906 // NewGroupMemberSelector returns a new GroupMemberSelector instance
907 func NewGroupMemberSelector(Group *GroupSelector, User *UserSelectorArg) *GroupMemberSelector {
908 s := new(GroupMemberSelector)
909 s.Group = Group
910 s.User = User
911 return s
912 }
913
914 // GroupMemberSelectorError : Error that can be raised when
915 // `GroupMemberSelector` is used, and the user is required to be a member of the
916 // specified group.
917 type GroupMemberSelectorError struct {
918 dropbox.Tagged
919 }
920
921 // Valid tag values for GroupMemberSelectorError
922 const (
923 GroupMemberSelectorErrorGroupNotFound = "group_not_found"
924 GroupMemberSelectorErrorOther = "other"
925 GroupMemberSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
926 GroupMemberSelectorErrorMemberNotInGroup = "member_not_in_group"
927 )
928
929 // GroupMemberSetAccessTypeError : has no documentation (yet)
930 type GroupMemberSetAccessTypeError struct {
931 dropbox.Tagged
932 }
933
934 // Valid tag values for GroupMemberSetAccessTypeError
935 const (
936 GroupMemberSetAccessTypeErrorGroupNotFound = "group_not_found"
937 GroupMemberSetAccessTypeErrorOther = "other"
938 GroupMemberSetAccessTypeErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
939 GroupMemberSetAccessTypeErrorMemberNotInGroup = "member_not_in_group"
940 GroupMemberSetAccessTypeErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
941 )
942
943 // IncludeMembersArg : has no documentation (yet)
944 type IncludeMembersArg struct {
945 // ReturnMembers : Whether to return the list of members in the group. Note
946 // that the default value will cause all the group members to be returned
947 // in the response. This may take a long time for large groups.
948 ReturnMembers bool `json:"return_members"`
949 }
950
951 // NewIncludeMembersArg returns a new IncludeMembersArg instance
952 func NewIncludeMembersArg() *IncludeMembersArg {
953 s := new(IncludeMembersArg)
954 s.ReturnMembers = true
955 return s
956 }
957
958 // GroupMembersAddArg : has no documentation (yet)
959 type GroupMembersAddArg struct {
960 IncludeMembersArg
961 // Group : Group to which users will be added.
962 Group *GroupSelector `json:"group"`
963 // Members : List of users to be added to the group.
964 Members []*MemberAccess `json:"members"`
965 }
966
967 // NewGroupMembersAddArg returns a new GroupMembersAddArg instance
968 func NewGroupMembersAddArg(Group *GroupSelector, Members []*MemberAccess) *GroupMembersAddArg {
969 s := new(GroupMembersAddArg)
970 s.Group = Group
971 s.Members = Members
972 s.ReturnMembers = true
973 return s
974 }
975
976 // GroupMembersAddError : has no documentation (yet)
977 type GroupMembersAddError struct {
978 dropbox.Tagged
979 // MembersNotInTeam : These members are not part of your team. Currently,
980 // you cannot add members to a group if they are not part of your team,
981 // though this may change in a subsequent version. To add new members to
982 // your Dropbox Business team, use the `membersAdd` endpoint.
983 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
984 // UsersNotFound : These users were not found in Dropbox.
985 UsersNotFound []string `json:"users_not_found,omitempty"`
986 // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group cannot
987 // be managed by a user.
988 UserCannotBeManagerOfCompanyManagedGroup []string `json:"user_cannot_be_manager_of_company_managed_group,omitempty"`
989 }
990
991 // Valid tag values for GroupMembersAddError
992 const (
993 GroupMembersAddErrorGroupNotFound = "group_not_found"
994 GroupMembersAddErrorOther = "other"
995 GroupMembersAddErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
996 GroupMembersAddErrorDuplicateUser = "duplicate_user"
997 GroupMembersAddErrorGroupNotInTeam = "group_not_in_team"
998 GroupMembersAddErrorMembersNotInTeam = "members_not_in_team"
999 GroupMembersAddErrorUsersNotFound = "users_not_found"
1000 GroupMembersAddErrorUserMustBeActiveToBeOwner = "user_must_be_active_to_be_owner"
1001 GroupMembersAddErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
1002 )
1003
1004 // UnmarshalJSON deserializes into a GroupMembersAddError instance
1005 func (u *GroupMembersAddError) UnmarshalJSON(body []byte) error {
1006 type wrap struct {
1007 dropbox.Tagged
1008 // MembersNotInTeam : These members are not part of your team.
1009 // Currently, you cannot add members to a group if they are not part of
1010 // your team, though this may change in a subsequent version. To add new
1011 // members to your Dropbox Business team, use the `membersAdd` endpoint.
1012 MembersNotInTeam json.RawMessage `json:"members_not_in_team,omitempty"`
1013 // UsersNotFound : These users were not found in Dropbox.
1014 UsersNotFound json.RawMessage `json:"users_not_found,omitempty"`
1015 // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group
1016 // cannot be managed by a user.
1017 UserCannotBeManagerOfCompanyManagedGroup json.RawMessage `json:"user_cannot_be_manager_of_company_managed_group,omitempty"`
1018 }
1019 var w wrap
1020 var err error
1021 if err = json.Unmarshal(body, &w); err != nil {
1022 return err
1023 }
1024 u.Tag = w.Tag
1025 switch u.Tag {
1026 case "members_not_in_team":
1027 err = json.Unmarshal(body, &u.MembersNotInTeam)
1028
1029 if err != nil {
1030 return err
1031 }
1032 case "users_not_found":
1033 err = json.Unmarshal(body, &u.UsersNotFound)
1034
1035 if err != nil {
1036 return err
1037 }
1038 case "user_cannot_be_manager_of_company_managed_group":
1039 err = json.Unmarshal(body, &u.UserCannotBeManagerOfCompanyManagedGroup)
1040
1041 if err != nil {
1042 return err
1043 }
1044 }
1045 return nil
1046 }
1047
1048 // GroupMembersChangeResult : Result returned by `groupsMembersAdd` and
1049 // `groupsMembersRemove`.
1050 type GroupMembersChangeResult struct {
1051 // GroupInfo : The group info after member change operation has been
1052 // performed.
1053 GroupInfo *GroupFullInfo `json:"group_info"`
1054 // AsyncJobId : An ID that can be used to obtain the status of
1055 // granting/revoking group-owned resources.
1056 AsyncJobId string `json:"async_job_id"`
1057 }
1058
1059 // NewGroupMembersChangeResult returns a new GroupMembersChangeResult instance
1060 func NewGroupMembersChangeResult(GroupInfo *GroupFullInfo, AsyncJobId string) *GroupMembersChangeResult {
1061 s := new(GroupMembersChangeResult)
1062 s.GroupInfo = GroupInfo
1063 s.AsyncJobId = AsyncJobId
1064 return s
1065 }
1066
1067 // GroupMembersRemoveArg : has no documentation (yet)
1068 type GroupMembersRemoveArg struct {
1069 IncludeMembersArg
1070 // Group : Group from which users will be removed.
1071 Group *GroupSelector `json:"group"`
1072 // Users : List of users to be removed from the group.
1073 Users []*UserSelectorArg `json:"users"`
1074 }
1075
1076 // NewGroupMembersRemoveArg returns a new GroupMembersRemoveArg instance
1077 func NewGroupMembersRemoveArg(Group *GroupSelector, Users []*UserSelectorArg) *GroupMembersRemoveArg {
1078 s := new(GroupMembersRemoveArg)
1079 s.Group = Group
1080 s.Users = Users
1081 s.ReturnMembers = true
1082 return s
1083 }
1084
1085 // GroupMembersSelectorError : Error that can be raised when
1086 // `GroupMembersSelector` is used, and the users are required to be members of
1087 // the specified group.
1088 type GroupMembersSelectorError struct {
1089 dropbox.Tagged
1090 }
1091
1092 // Valid tag values for GroupMembersSelectorError
1093 const (
1094 GroupMembersSelectorErrorGroupNotFound = "group_not_found"
1095 GroupMembersSelectorErrorOther = "other"
1096 GroupMembersSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1097 GroupMembersSelectorErrorMemberNotInGroup = "member_not_in_group"
1098 )
1099
1100 // GroupMembersRemoveError : has no documentation (yet)
1101 type GroupMembersRemoveError struct {
1102 dropbox.Tagged
1103 // MembersNotInTeam : These members are not part of your team.
1104 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
1105 // UsersNotFound : These users were not found in Dropbox.
1106 UsersNotFound []string `json:"users_not_found,omitempty"`
1107 }
1108
1109 // Valid tag values for GroupMembersRemoveError
1110 const (
1111 GroupMembersRemoveErrorGroupNotFound = "group_not_found"
1112 GroupMembersRemoveErrorOther = "other"
1113 GroupMembersRemoveErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1114 GroupMembersRemoveErrorMemberNotInGroup = "member_not_in_group"
1115 GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team"
1116 GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team"
1117 GroupMembersRemoveErrorUsersNotFound = "users_not_found"
1118 )
1119
1120 // UnmarshalJSON deserializes into a GroupMembersRemoveError instance
1121 func (u *GroupMembersRemoveError) UnmarshalJSON(body []byte) error {
1122 type wrap struct {
1123 dropbox.Tagged
1124 // MembersNotInTeam : These members are not part of your team.
1125 MembersNotInTeam json.RawMessage `json:"members_not_in_team,omitempty"`
1126 // UsersNotFound : These users were not found in Dropbox.
1127 UsersNotFound json.RawMessage `json:"users_not_found,omitempty"`
1128 }
1129 var w wrap
1130 var err error
1131 if err = json.Unmarshal(body, &w); err != nil {
1132 return err
1133 }
1134 u.Tag = w.Tag
1135 switch u.Tag {
1136 case "members_not_in_team":
1137 err = json.Unmarshal(body, &u.MembersNotInTeam)
1138
1139 if err != nil {
1140 return err
1141 }
1142 case "users_not_found":
1143 err = json.Unmarshal(body, &u.UsersNotFound)
1144
1145 if err != nil {
1146 return err
1147 }
1148 }
1149 return nil
1150 }
1151
1152 // GroupMembersSelector : Argument for selecting a group and a list of users.
1153 type GroupMembersSelector struct {
1154 // Group : Specify a group.
1155 Group *GroupSelector `json:"group"`
1156 // Users : A list of users that are members of `group`.
1157 Users *UsersSelectorArg `json:"users"`
1158 }
1159
1160 // NewGroupMembersSelector returns a new GroupMembersSelector instance
1161 func NewGroupMembersSelector(Group *GroupSelector, Users *UsersSelectorArg) *GroupMembersSelector {
1162 s := new(GroupMembersSelector)
1163 s.Group = Group
1164 s.Users = Users
1165 return s
1166 }
1167
1168 // GroupMembersSetAccessTypeArg : has no documentation (yet)
1169 type GroupMembersSetAccessTypeArg struct {
1170 GroupMemberSelector
1171 // AccessType : New group access type the user will have.
1172 AccessType *GroupAccessType `json:"access_type"`
1173 // ReturnMembers : Whether to return the list of members in the group. Note
1174 // that the default value will cause all the group members to be returned
1175 // in the response. This may take a long time for large groups.
1176 ReturnMembers bool `json:"return_members"`
1177 }
1178
1179 // NewGroupMembersSetAccessTypeArg returns a new GroupMembersSetAccessTypeArg instance
1180 func NewGroupMembersSetAccessTypeArg(Group *GroupSelector, User *UserSelectorArg, AccessType *GroupAccessType) *GroupMembersSetAccessTypeArg {
1181 s := new(GroupMembersSetAccessTypeArg)
1182 s.Group = Group
1183 s.User = User
1184 s.AccessType = AccessType
1185 s.ReturnMembers = true
1186 return s
1187 }
1188
1189 // GroupSelector : Argument for selecting a single group, either by group_id or
1190 // by external group ID.
1191 type GroupSelector struct {
1192 dropbox.Tagged
1193 // GroupId : Group ID.
1194 GroupId string `json:"group_id,omitempty"`
1195 // GroupExternalId : External ID of the group.
1196 GroupExternalId string `json:"group_external_id,omitempty"`
1197 }
1198
1199 // Valid tag values for GroupSelector
1200 const (
1201 GroupSelectorGroupId = "group_id"
1202 GroupSelectorGroupExternalId = "group_external_id"
1203 )
1204
1205 // UnmarshalJSON deserializes into a GroupSelector instance
1206 func (u *GroupSelector) UnmarshalJSON(body []byte) error {
1207 type wrap struct {
1208 dropbox.Tagged
1209 }
1210 var w wrap
1211 var err error
1212 if err = json.Unmarshal(body, &w); err != nil {
1213 return err
1214 }
1215 u.Tag = w.Tag
1216 switch u.Tag {
1217 case "group_id":
1218 err = json.Unmarshal(body, &u.GroupId)
1219
1220 if err != nil {
1221 return err
1222 }
1223 case "group_external_id":
1224 err = json.Unmarshal(body, &u.GroupExternalId)
1225
1226 if err != nil {
1227 return err
1228 }
1229 }
1230 return nil
1231 }
1232
1233 // GroupUpdateArgs : has no documentation (yet)
1234 type GroupUpdateArgs struct {
1235 IncludeMembersArg
1236 // Group : Specify a group.
1237 Group *GroupSelector `json:"group"`
1238 // NewGroupName : Optional argument. Set group name to this if provided.
1239 NewGroupName string `json:"new_group_name,omitempty"`
1240 // NewGroupExternalId : Optional argument. New group external ID. If the
1241 // argument is None, the group's external_id won't be updated. If the
1242 // argument is empty string, the group's external id will be cleared.
1243 NewGroupExternalId string `json:"new_group_external_id,omitempty"`
1244 // NewGroupManagementType : Set new group management type, if provided.
1245 NewGroupManagementType *team_common.GroupManagementType `json:"new_group_management_type,omitempty"`
1246 }
1247
1248 // NewGroupUpdateArgs returns a new GroupUpdateArgs instance
1249 func NewGroupUpdateArgs(Group *GroupSelector) *GroupUpdateArgs {
1250 s := new(GroupUpdateArgs)
1251 s.Group = Group
1252 s.ReturnMembers = true
1253 return s
1254 }
1255
1256 // GroupUpdateError : has no documentation (yet)
1257 type GroupUpdateError struct {
1258 dropbox.Tagged
1259 }
1260
1261 // Valid tag values for GroupUpdateError
1262 const (
1263 GroupUpdateErrorGroupNotFound = "group_not_found"
1264 GroupUpdateErrorOther = "other"
1265 GroupUpdateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1266 GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used"
1267 GroupUpdateErrorGroupNameInvalid = "group_name_invalid"
1268 GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
1269 )
1270
1271 // GroupsGetInfoError : has no documentation (yet)
1272 type GroupsGetInfoError struct {
1273 dropbox.Tagged
1274 }
1275
1276 // Valid tag values for GroupsGetInfoError
1277 const (
1278 GroupsGetInfoErrorGroupNotOnTeam = "group_not_on_team"
1279 GroupsGetInfoErrorOther = "other"
1280 )
1281
1282 // GroupsGetInfoItem : has no documentation (yet)
1283 type GroupsGetInfoItem struct {
1284 dropbox.Tagged
1285 // IdNotFound : An ID that was provided as a parameter to `groupsGetInfo`,
1286 // and did not match a corresponding group. The ID can be a group ID, or an
1287 // external ID, depending on how the method was called.
1288 IdNotFound string `json:"id_not_found,omitempty"`
1289 // GroupInfo : Info about a group.
1290 GroupInfo *GroupFullInfo `json:"group_info,omitempty"`
1291 }
1292
1293 // Valid tag values for GroupsGetInfoItem
1294 const (
1295 GroupsGetInfoItemIdNotFound = "id_not_found"
1296 GroupsGetInfoItemGroupInfo = "group_info"
1297 )
1298
1299 // UnmarshalJSON deserializes into a GroupsGetInfoItem instance
1300 func (u *GroupsGetInfoItem) UnmarshalJSON(body []byte) error {
1301 type wrap struct {
1302 dropbox.Tagged
1303 // GroupInfo : Info about a group.
1304 GroupInfo json.RawMessage `json:"group_info,omitempty"`
1305 }
1306 var w wrap
1307 var err error
1308 if err = json.Unmarshal(body, &w); err != nil {
1309 return err
1310 }
1311 u.Tag = w.Tag
1312 switch u.Tag {
1313 case "id_not_found":
1314 err = json.Unmarshal(body, &u.IdNotFound)
1315
1316 if err != nil {
1317 return err
1318 }
1319 case "group_info":
1320 err = json.Unmarshal(body, &u.GroupInfo)
1321
1322 if err != nil {
1323 return err
1324 }
1325 }
1326 return nil
1327 }
1328
1329 // GroupsListArg : has no documentation (yet)
1330 type GroupsListArg struct {
1331 // Limit : Number of results to return per call.
1332 Limit uint32 `json:"limit"`
1333 }
1334
1335 // NewGroupsListArg returns a new GroupsListArg instance
1336 func NewGroupsListArg() *GroupsListArg {
1337 s := new(GroupsListArg)
1338 s.Limit = 1000
1339 return s
1340 }
1341
1342 // GroupsListContinueArg : has no documentation (yet)
1343 type GroupsListContinueArg struct {
1344 // Cursor : Indicates from what point to get the next set of groups.
1345 Cursor string `json:"cursor"`
1346 }
1347
1348 // NewGroupsListContinueArg returns a new GroupsListContinueArg instance
1349 func NewGroupsListContinueArg(Cursor string) *GroupsListContinueArg {
1350 s := new(GroupsListContinueArg)
1351 s.Cursor = Cursor
1352 return s
1353 }
1354
1355 // GroupsListContinueError : has no documentation (yet)
1356 type GroupsListContinueError struct {
1357 dropbox.Tagged
1358 }
1359
1360 // Valid tag values for GroupsListContinueError
1361 const (
1362 GroupsListContinueErrorInvalidCursor = "invalid_cursor"
1363 GroupsListContinueErrorOther = "other"
1364 )
1365
1366 // GroupsListResult : has no documentation (yet)
1367 type GroupsListResult struct {
1368 // Groups : has no documentation (yet)
1369 Groups []*team_common.GroupSummary `json:"groups"`
1370 // Cursor : Pass the cursor into `groupsListContinue` to obtain the
1371 // additional groups.
1372 Cursor string `json:"cursor"`
1373 // HasMore : Is true if there are additional groups that have not been
1374 // returned yet. An additional call to `groupsListContinue` can retrieve
1375 // them.
1376 HasMore bool `json:"has_more"`
1377 }
1378
1379 // NewGroupsListResult returns a new GroupsListResult instance
1380 func NewGroupsListResult(Groups []*team_common.GroupSummary, Cursor string, HasMore bool) *GroupsListResult {
1381 s := new(GroupsListResult)
1382 s.Groups = Groups
1383 s.Cursor = Cursor
1384 s.HasMore = HasMore
1385 return s
1386 }
1387
1388 // GroupsMembersListArg : has no documentation (yet)
1389 type GroupsMembersListArg struct {
1390 // Group : The group whose members are to be listed.
1391 Group *GroupSelector `json:"group"`
1392 // Limit : Number of results to return per call.
1393 Limit uint32 `json:"limit"`
1394 }
1395
1396 // NewGroupsMembersListArg returns a new GroupsMembersListArg instance
1397 func NewGroupsMembersListArg(Group *GroupSelector) *GroupsMembersListArg {
1398 s := new(GroupsMembersListArg)
1399 s.Group = Group
1400 s.Limit = 1000
1401 return s
1402 }
1403
1404 // GroupsMembersListContinueArg : has no documentation (yet)
1405 type GroupsMembersListContinueArg struct {
1406 // Cursor : Indicates from what point to get the next set of groups.
1407 Cursor string `json:"cursor"`
1408 }
1409
1410 // NewGroupsMembersListContinueArg returns a new GroupsMembersListContinueArg instance
1411 func NewGroupsMembersListContinueArg(Cursor string) *GroupsMembersListContinueArg {
1412 s := new(GroupsMembersListContinueArg)
1413 s.Cursor = Cursor
1414 return s
1415 }
1416
1417 // GroupsMembersListContinueError : has no documentation (yet)
1418 type GroupsMembersListContinueError struct {
1419 dropbox.Tagged
1420 }
1421
1422 // Valid tag values for GroupsMembersListContinueError
1423 const (
1424 GroupsMembersListContinueErrorInvalidCursor = "invalid_cursor"
1425 GroupsMembersListContinueErrorOther = "other"
1426 )
1427
1428 // GroupsMembersListResult : has no documentation (yet)
1429 type GroupsMembersListResult struct {
1430 // Members : has no documentation (yet)
1431 Members []*GroupMemberInfo `json:"members"`
1432 // Cursor : Pass the cursor into `groupsMembersListContinue` to obtain
1433 // additional group members.
1434 Cursor string `json:"cursor"`
1435 // HasMore : Is true if there are additional group members that have not
1436 // been returned yet. An additional call to `groupsMembersListContinue` can
1437 // retrieve them.
1438 HasMore bool `json:"has_more"`
1439 }
1440
1441 // NewGroupsMembersListResult returns a new GroupsMembersListResult instance
1442 func NewGroupsMembersListResult(Members []*GroupMemberInfo, Cursor string, HasMore bool) *GroupsMembersListResult {
1443 s := new(GroupsMembersListResult)
1444 s.Members = Members
1445 s.Cursor = Cursor
1446 s.HasMore = HasMore
1447 return s
1448 }
1449
1450 // GroupsPollError : has no documentation (yet)
1451 type GroupsPollError struct {
1452 dropbox.Tagged
1453 }
1454
1455 // Valid tag values for GroupsPollError
1456 const (
1457 GroupsPollErrorInvalidAsyncJobId = "invalid_async_job_id"
1458 GroupsPollErrorInternalError = "internal_error"
1459 GroupsPollErrorOther = "other"
1460 GroupsPollErrorAccessDenied = "access_denied"
1461 )
1462
1463 // GroupsSelector : Argument for selecting a list of groups, either by
1464 // group_ids, or external group IDs.
1465 type GroupsSelector struct {
1466 dropbox.Tagged
1467 // GroupIds : List of group IDs.
1468 GroupIds []string `json:"group_ids,omitempty"`
1469 // GroupExternalIds : List of external IDs of groups.
1470 GroupExternalIds []string `json:"group_external_ids,omitempty"`
1471 }
1472
1473 // Valid tag values for GroupsSelector
1474 const (
1475 GroupsSelectorGroupIds = "group_ids"
1476 GroupsSelectorGroupExternalIds = "group_external_ids"
1477 )
1478
1479 // UnmarshalJSON deserializes into a GroupsSelector instance
1480 func (u *GroupsSelector) UnmarshalJSON(body []byte) error {
1481 type wrap struct {
1482 dropbox.Tagged
1483 // GroupIds : List of group IDs.
1484 GroupIds json.RawMessage `json:"group_ids,omitempty"`
1485 // GroupExternalIds : List of external IDs of groups.
1486 GroupExternalIds json.RawMessage `json:"group_external_ids,omitempty"`
1487 }
1488 var w wrap
1489 var err error
1490 if err = json.Unmarshal(body, &w); err != nil {
1491 return err
1492 }
1493 u.Tag = w.Tag
1494 switch u.Tag {
1495 case "group_ids":
1496 err = json.Unmarshal(body, &u.GroupIds)
1497
1498 if err != nil {
1499 return err
1500 }
1501 case "group_external_ids":
1502 err = json.Unmarshal(body, &u.GroupExternalIds)
1503
1504 if err != nil {
1505 return err
1506 }
1507 }
1508 return nil
1509 }
1510
1511 // HasTeamFileEventsValue : The value for `Feature.has_team_file_events`.
1512 type HasTeamFileEventsValue struct {
1513 dropbox.Tagged
1514 // Enabled : Does this team have file events.
1515 Enabled bool `json:"enabled,omitempty"`
1516 }
1517
1518 // Valid tag values for HasTeamFileEventsValue
1519 const (
1520 HasTeamFileEventsValueEnabled = "enabled"
1521 HasTeamFileEventsValueOther = "other"
1522 )
1523
1524 // UnmarshalJSON deserializes into a HasTeamFileEventsValue instance
1525 func (u *HasTeamFileEventsValue) UnmarshalJSON(body []byte) error {
1526 type wrap struct {
1527 dropbox.Tagged
1528 }
1529 var w wrap
1530 var err error
1531 if err = json.Unmarshal(body, &w); err != nil {
1532 return err
1533 }
1534 u.Tag = w.Tag
1535 switch u.Tag {
1536 case "enabled":
1537 err = json.Unmarshal(body, &u.Enabled)
1538
1539 if err != nil {
1540 return err
1541 }
1542 }
1543 return nil
1544 }
1545
1546 // HasTeamSelectiveSyncValue : The value for `Feature.has_team_selective_sync`.
1547 type HasTeamSelectiveSyncValue struct {
1548 dropbox.Tagged
1549 // HasTeamSelectiveSync : Does this team have team selective sync enabled.
1550 HasTeamSelectiveSync bool `json:"has_team_selective_sync,omitempty"`
1551 }
1552
1553 // Valid tag values for HasTeamSelectiveSyncValue
1554 const (
1555 HasTeamSelectiveSyncValueHasTeamSelectiveSync = "has_team_selective_sync"
1556 HasTeamSelectiveSyncValueOther = "other"
1557 )
1558
1559 // UnmarshalJSON deserializes into a HasTeamSelectiveSyncValue instance
1560 func (u *HasTeamSelectiveSyncValue) UnmarshalJSON(body []byte) error {
1561 type wrap struct {
1562 dropbox.Tagged
1563 }
1564 var w wrap
1565 var err error
1566 if err = json.Unmarshal(body, &w); err != nil {
1567 return err
1568 }
1569 u.Tag = w.Tag
1570 switch u.Tag {
1571 case "has_team_selective_sync":
1572 err = json.Unmarshal(body, &u.HasTeamSelectiveSync)
1573
1574 if err != nil {
1575 return err
1576 }
1577 }
1578 return nil
1579 }
1580
1581 // HasTeamSharedDropboxValue : The value for `Feature.has_team_shared_dropbox`.
1582 type HasTeamSharedDropboxValue struct {
1583 dropbox.Tagged
1584 // HasTeamSharedDropbox : Does this team have a shared team root.
1585 HasTeamSharedDropbox bool `json:"has_team_shared_dropbox,omitempty"`
1586 }
1587
1588 // Valid tag values for HasTeamSharedDropboxValue
1589 const (
1590 HasTeamSharedDropboxValueHasTeamSharedDropbox = "has_team_shared_dropbox"
1591 HasTeamSharedDropboxValueOther = "other"
1592 )
1593
1594 // UnmarshalJSON deserializes into a HasTeamSharedDropboxValue instance
1595 func (u *HasTeamSharedDropboxValue) UnmarshalJSON(body []byte) error {
1596 type wrap struct {
1597 dropbox.Tagged
1598 }
1599 var w wrap
1600 var err error
1601 if err = json.Unmarshal(body, &w); err != nil {
1602 return err
1603 }
1604 u.Tag = w.Tag
1605 switch u.Tag {
1606 case "has_team_shared_dropbox":
1607 err = json.Unmarshal(body, &u.HasTeamSharedDropbox)
1608
1609 if err != nil {
1610 return err
1611 }
1612 }
1613 return nil
1614 }
1615
1616 // ListMemberAppsArg : has no documentation (yet)
1617 type ListMemberAppsArg struct {
1618 // TeamMemberId : The team member id.
1619 TeamMemberId string `json:"team_member_id"`
1620 }
1621
1622 // NewListMemberAppsArg returns a new ListMemberAppsArg instance
1623 func NewListMemberAppsArg(TeamMemberId string) *ListMemberAppsArg {
1624 s := new(ListMemberAppsArg)
1625 s.TeamMemberId = TeamMemberId
1626 return s
1627 }
1628
1629 // ListMemberAppsError : Error returned by `linkedAppsListMemberLinkedApps`.
1630 type ListMemberAppsError struct {
1631 dropbox.Tagged
1632 }
1633
1634 // Valid tag values for ListMemberAppsError
1635 const (
1636 ListMemberAppsErrorMemberNotFound = "member_not_found"
1637 ListMemberAppsErrorOther = "other"
1638 )
1639
1640 // ListMemberAppsResult : has no documentation (yet)
1641 type ListMemberAppsResult struct {
1642 // LinkedApiApps : List of third party applications linked by this team
1643 // member.
1644 LinkedApiApps []*ApiApp `json:"linked_api_apps"`
1645 }
1646
1647 // NewListMemberAppsResult returns a new ListMemberAppsResult instance
1648 func NewListMemberAppsResult(LinkedApiApps []*ApiApp) *ListMemberAppsResult {
1649 s := new(ListMemberAppsResult)
1650 s.LinkedApiApps = LinkedApiApps
1651 return s
1652 }
1653
1654 // ListMemberDevicesArg : has no documentation (yet)
1655 type ListMemberDevicesArg struct {
1656 // TeamMemberId : The team's member id.
1657 TeamMemberId string `json:"team_member_id"`
1658 // IncludeWebSessions : Whether to list web sessions of the team's member.
1659 IncludeWebSessions bool `json:"include_web_sessions"`
1660 // IncludeDesktopClients : Whether to list linked desktop devices of the
1661 // team's member.
1662 IncludeDesktopClients bool `json:"include_desktop_clients"`
1663 // IncludeMobileClients : Whether to list linked mobile devices of the
1664 // team's member.
1665 IncludeMobileClients bool `json:"include_mobile_clients"`
1666 }
1667
1668 // NewListMemberDevicesArg returns a new ListMemberDevicesArg instance
1669 func NewListMemberDevicesArg(TeamMemberId string) *ListMemberDevicesArg {
1670 s := new(ListMemberDevicesArg)
1671 s.TeamMemberId = TeamMemberId
1672 s.IncludeWebSessions = true
1673 s.IncludeDesktopClients = true
1674 s.IncludeMobileClients = true
1675 return s
1676 }
1677
1678 // ListMemberDevicesError : has no documentation (yet)
1679 type ListMemberDevicesError struct {
1680 dropbox.Tagged
1681 }
1682
1683 // Valid tag values for ListMemberDevicesError
1684 const (
1685 ListMemberDevicesErrorMemberNotFound = "member_not_found"
1686 ListMemberDevicesErrorOther = "other"
1687 )
1688
1689 // ListMemberDevicesResult : has no documentation (yet)
1690 type ListMemberDevicesResult struct {
1691 // ActiveWebSessions : List of web sessions made by this team member.
1692 ActiveWebSessions []*ActiveWebSession `json:"active_web_sessions,omitempty"`
1693 // DesktopClientSessions : List of desktop clients used by this team member.
1694 DesktopClientSessions []*DesktopClientSession `json:"desktop_client_sessions,omitempty"`
1695 // MobileClientSessions : List of mobile client used by this team member.
1696 MobileClientSessions []*MobileClientSession `json:"mobile_client_sessions,omitempty"`
1697 }
1698
1699 // NewListMemberDevicesResult returns a new ListMemberDevicesResult instance
1700 func NewListMemberDevicesResult() *ListMemberDevicesResult {
1701 s := new(ListMemberDevicesResult)
1702 return s
1703 }
1704
1705 // ListMembersAppsArg : Arguments for `linkedAppsListMembersLinkedApps`.
1706 type ListMembersAppsArg struct {
1707 // Cursor : At the first call to the `linkedAppsListMembersLinkedApps` the
1708 // cursor shouldn't be passed. Then, if the result of the call includes a
1709 // cursor, the following requests should include the received cursors in
1710 // order to receive the next sub list of the team applications.
1711 Cursor string `json:"cursor,omitempty"`
1712 }
1713
1714 // NewListMembersAppsArg returns a new ListMembersAppsArg instance
1715 func NewListMembersAppsArg() *ListMembersAppsArg {
1716 s := new(ListMembersAppsArg)
1717 return s
1718 }
1719
1720 // ListMembersAppsError : Error returned by `linkedAppsListMembersLinkedApps`.
1721 type ListMembersAppsError struct {
1722 dropbox.Tagged
1723 }
1724
1725 // Valid tag values for ListMembersAppsError
1726 const (
1727 ListMembersAppsErrorReset = "reset"
1728 ListMembersAppsErrorOther = "other"
1729 )
1730
1731 // ListMembersAppsResult : Information returned by
1732 // `linkedAppsListMembersLinkedApps`.
1733 type ListMembersAppsResult struct {
1734 // Apps : The linked applications of each member of the team.
1735 Apps []*MemberLinkedApps `json:"apps"`
1736 // HasMore : If true, then there are more apps available. Pass the cursor to
1737 // `linkedAppsListMembersLinkedApps` to retrieve the rest.
1738 HasMore bool `json:"has_more"`
1739 // Cursor : Pass the cursor into `linkedAppsListMembersLinkedApps` to
1740 // receive the next sub list of team's applications.
1741 Cursor string `json:"cursor,omitempty"`
1742 }
1743
1744 // NewListMembersAppsResult returns a new ListMembersAppsResult instance
1745 func NewListMembersAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListMembersAppsResult {
1746 s := new(ListMembersAppsResult)
1747 s.Apps = Apps
1748 s.HasMore = HasMore
1749 return s
1750 }
1751
1752 // ListMembersDevicesArg : has no documentation (yet)
1753 type ListMembersDevicesArg struct {
1754 // Cursor : At the first call to the `devicesListMembersDevices` the cursor
1755 // shouldn't be passed. Then, if the result of the call includes a cursor,
1756 // the following requests should include the received cursors in order to
1757 // receive the next sub list of team devices.
1758 Cursor string `json:"cursor,omitempty"`
1759 // IncludeWebSessions : Whether to list web sessions of the team members.
1760 IncludeWebSessions bool `json:"include_web_sessions"`
1761 // IncludeDesktopClients : Whether to list desktop clients of the team
1762 // members.
1763 IncludeDesktopClients bool `json:"include_desktop_clients"`
1764 // IncludeMobileClients : Whether to list mobile clients of the team
1765 // members.
1766 IncludeMobileClients bool `json:"include_mobile_clients"`
1767 }
1768
1769 // NewListMembersDevicesArg returns a new ListMembersDevicesArg instance
1770 func NewListMembersDevicesArg() *ListMembersDevicesArg {
1771 s := new(ListMembersDevicesArg)
1772 s.IncludeWebSessions = true
1773 s.IncludeDesktopClients = true
1774 s.IncludeMobileClients = true
1775 return s
1776 }
1777
1778 // ListMembersDevicesError : has no documentation (yet)
1779 type ListMembersDevicesError struct {
1780 dropbox.Tagged
1781 }
1782
1783 // Valid tag values for ListMembersDevicesError
1784 const (
1785 ListMembersDevicesErrorReset = "reset"
1786 ListMembersDevicesErrorOther = "other"
1787 )
1788
1789 // ListMembersDevicesResult : has no documentation (yet)
1790 type ListMembersDevicesResult struct {
1791 // Devices : The devices of each member of the team.
1792 Devices []*MemberDevices `json:"devices"`
1793 // HasMore : If true, then there are more devices available. Pass the cursor
1794 // to `devicesListMembersDevices` to retrieve the rest.
1795 HasMore bool `json:"has_more"`
1796 // Cursor : Pass the cursor into `devicesListMembersDevices` to receive the
1797 // next sub list of team's devices.
1798 Cursor string `json:"cursor,omitempty"`
1799 }
1800
1801 // NewListMembersDevicesResult returns a new ListMembersDevicesResult instance
1802 func NewListMembersDevicesResult(Devices []*MemberDevices, HasMore bool) *ListMembersDevicesResult {
1803 s := new(ListMembersDevicesResult)
1804 s.Devices = Devices
1805 s.HasMore = HasMore
1806 return s
1807 }
1808
1809 // ListTeamAppsArg : Arguments for `linkedAppsListTeamLinkedApps`.
1810 type ListTeamAppsArg struct {
1811 // Cursor : At the first call to the `linkedAppsListTeamLinkedApps` the
1812 // cursor shouldn't be passed. Then, if the result of the call includes a
1813 // cursor, the following requests should include the received cursors in
1814 // order to receive the next sub list of the team applications.
1815 Cursor string `json:"cursor,omitempty"`
1816 }
1817
1818 // NewListTeamAppsArg returns a new ListTeamAppsArg instance
1819 func NewListTeamAppsArg() *ListTeamAppsArg {
1820 s := new(ListTeamAppsArg)
1821 return s
1822 }
1823
1824 // ListTeamAppsError : Error returned by `linkedAppsListTeamLinkedApps`.
1825 type ListTeamAppsError struct {
1826 dropbox.Tagged
1827 }
1828
1829 // Valid tag values for ListTeamAppsError
1830 const (
1831 ListTeamAppsErrorReset = "reset"
1832 ListTeamAppsErrorOther = "other"
1833 )
1834
1835 // ListTeamAppsResult : Information returned by `linkedAppsListTeamLinkedApps`.
1836 type ListTeamAppsResult struct {
1837 // Apps : The linked applications of each member of the team.
1838 Apps []*MemberLinkedApps `json:"apps"`
1839 // HasMore : If true, then there are more apps available. Pass the cursor to
1840 // `linkedAppsListTeamLinkedApps` to retrieve the rest.
1841 HasMore bool `json:"has_more"`
1842 // Cursor : Pass the cursor into `linkedAppsListTeamLinkedApps` to receive
1843 // the next sub list of team's applications.
1844 Cursor string `json:"cursor,omitempty"`
1845 }
1846
1847 // NewListTeamAppsResult returns a new ListTeamAppsResult instance
1848 func NewListTeamAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListTeamAppsResult {
1849 s := new(ListTeamAppsResult)
1850 s.Apps = Apps
1851 s.HasMore = HasMore
1852 return s
1853 }
1854
1855 // ListTeamDevicesArg : has no documentation (yet)
1856 type ListTeamDevicesArg struct {
1857 // Cursor : At the first call to the `devicesListTeamDevices` the cursor
1858 // shouldn't be passed. Then, if the result of the call includes a cursor,
1859 // the following requests should include the received cursors in order to
1860 // receive the next sub list of team devices.
1861 Cursor string `json:"cursor,omitempty"`
1862 // IncludeWebSessions : Whether to list web sessions of the team members.
1863 IncludeWebSessions bool `json:"include_web_sessions"`
1864 // IncludeDesktopClients : Whether to list desktop clients of the team
1865 // members.
1866 IncludeDesktopClients bool `json:"include_desktop_clients"`
1867 // IncludeMobileClients : Whether to list mobile clients of the team
1868 // members.
1869 IncludeMobileClients bool `json:"include_mobile_clients"`
1870 }
1871
1872 // NewListTeamDevicesArg returns a new ListTeamDevicesArg instance
1873 func NewListTeamDevicesArg() *ListTeamDevicesArg {
1874 s := new(ListTeamDevicesArg)
1875 s.IncludeWebSessions = true
1876 s.IncludeDesktopClients = true
1877 s.IncludeMobileClients = true
1878 return s
1879 }
1880
1881 // ListTeamDevicesError : has no documentation (yet)
1882 type ListTeamDevicesError struct {
1883 dropbox.Tagged
1884 }
1885
1886 // Valid tag values for ListTeamDevicesError
1887 const (
1888 ListTeamDevicesErrorReset = "reset"
1889 ListTeamDevicesErrorOther = "other"
1890 )
1891
1892 // ListTeamDevicesResult : has no documentation (yet)
1893 type ListTeamDevicesResult struct {
1894 // Devices : The devices of each member of the team.
1895 Devices []*MemberDevices `json:"devices"`
1896 // HasMore : If true, then there are more devices available. Pass the cursor
1897 // to `devicesListTeamDevices` to retrieve the rest.
1898 HasMore bool `json:"has_more"`
1899 // Cursor : Pass the cursor into `devicesListTeamDevices` to receive the
1900 // next sub list of team's devices.
1901 Cursor string `json:"cursor,omitempty"`
1902 }
1903
1904 // NewListTeamDevicesResult returns a new ListTeamDevicesResult instance
1905 func NewListTeamDevicesResult(Devices []*MemberDevices, HasMore bool) *ListTeamDevicesResult {
1906 s := new(ListTeamDevicesResult)
1907 s.Devices = Devices
1908 s.HasMore = HasMore
1909 return s
1910 }
1911
1912 // MemberAccess : Specify access type a member should have when joined to a
1913 // group.
1914 type MemberAccess struct {
1915 // User : Identity of a user.
1916 User *UserSelectorArg `json:"user"`
1917 // AccessType : Access type.
1918 AccessType *GroupAccessType `json:"access_type"`
1919 }
1920
1921 // NewMemberAccess returns a new MemberAccess instance
1922 func NewMemberAccess(User *UserSelectorArg, AccessType *GroupAccessType) *MemberAccess {
1923 s := new(MemberAccess)
1924 s.User = User
1925 s.AccessType = AccessType
1926 return s
1927 }
1928
1929 // MemberAddArg : has no documentation (yet)
1930 type MemberAddArg struct {
1931 // MemberEmail : has no documentation (yet)
1932 MemberEmail string `json:"member_email"`
1933 // MemberGivenName : Member's first name.
1934 MemberGivenName string `json:"member_given_name,omitempty"`
1935 // MemberSurname : Member's last name.
1936 MemberSurname string `json:"member_surname,omitempty"`
1937 // MemberExternalId : External ID for member.
1938 MemberExternalId string `json:"member_external_id,omitempty"`
1939 // MemberPersistentId : Persistent ID for member. This field is only
1940 // available to teams using persistent ID SAML configuration.
1941 MemberPersistentId string `json:"member_persistent_id,omitempty"`
1942 // SendWelcomeEmail : Whether to send a welcome email to the member. If
1943 // send_welcome_email is false, no email invitation will be sent to the
1944 // user. This may be useful for apps using single sign-on (SSO) flows for
1945 // onboarding that want to handle announcements themselves.
1946 SendWelcomeEmail bool `json:"send_welcome_email"`
1947 // Role : has no documentation (yet)
1948 Role *AdminTier `json:"role"`
1949 // IsDirectoryRestricted : Whether a user is directory restricted.
1950 IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
1951 }
1952
1953 // NewMemberAddArg returns a new MemberAddArg instance
1954 func NewMemberAddArg(MemberEmail string) *MemberAddArg {
1955 s := new(MemberAddArg)
1956 s.MemberEmail = MemberEmail
1957 s.SendWelcomeEmail = true
1958 s.Role = &AdminTier{Tagged: dropbox.Tagged{"member_only"}}
1959 return s
1960 }
1961
1962 // MemberAddResult : Describes the result of attempting to add a single user to
1963 // the team. 'success' is the only value indicating that a user was indeed added
1964 // to the team - the other values explain the type of failure that occurred, and
1965 // include the email of the user for which the operation has failed.
1966 type MemberAddResult struct {
1967 dropbox.Tagged
1968 // Success : Describes a user that was successfully added to the team.
1969 Success *TeamMemberInfo `json:"success,omitempty"`
1970 // TeamLicenseLimit : Team is already full. The organization has no
1971 // available licenses.
1972 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
1973 // FreeTeamMemberLimitReached : Team is already full. The free team member
1974 // limit has been reached.
1975 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
1976 // UserAlreadyOnTeam : User is already on this team. The provided email
1977 // address is associated with a user who is already a member of (including
1978 // in recoverable state) or invited to the team.
1979 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
1980 // UserOnAnotherTeam : User is already on another team. The provided email
1981 // address is associated with a user that is already a member or invited to
1982 // another team.
1983 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
1984 // UserAlreadyPaired : User is already paired.
1985 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
1986 // UserMigrationFailed : User migration has failed.
1987 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
1988 // DuplicateExternalMemberId : A user with the given external member ID
1989 // already exists on the team (including in recoverable state).
1990 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
1991 // DuplicateMemberPersistentId : A user with the given persistent ID already
1992 // exists on the team (including in recoverable state).
1993 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
1994 // PersistentIdDisabled : Persistent ID is only available to teams with
1995 // persistent ID SAML configuration. Please contact Dropbox for more
1996 // information.
1997 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
1998 // UserCreationFailed : User creation has failed.
1999 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2000 }
2001
2002 // Valid tag values for MemberAddResult
2003 const (
2004 MemberAddResultSuccess = "success"
2005 MemberAddResultTeamLicenseLimit = "team_license_limit"
2006 MemberAddResultFreeTeamMemberLimitReached = "free_team_member_limit_reached"
2007 MemberAddResultUserAlreadyOnTeam = "user_already_on_team"
2008 MemberAddResultUserOnAnotherTeam = "user_on_another_team"
2009 MemberAddResultUserAlreadyPaired = "user_already_paired"
2010 MemberAddResultUserMigrationFailed = "user_migration_failed"
2011 MemberAddResultDuplicateExternalMemberId = "duplicate_external_member_id"
2012 MemberAddResultDuplicateMemberPersistentId = "duplicate_member_persistent_id"
2013 MemberAddResultPersistentIdDisabled = "persistent_id_disabled"
2014 MemberAddResultUserCreationFailed = "user_creation_failed"
2015 )
2016
2017 // UnmarshalJSON deserializes into a MemberAddResult instance
2018 func (u *MemberAddResult) UnmarshalJSON(body []byte) error {
2019 type wrap struct {
2020 dropbox.Tagged
2021 // Success : Describes a user that was successfully added to the team.
2022 Success json.RawMessage `json:"success,omitempty"`
2023 }
2024 var w wrap
2025 var err error
2026 if err = json.Unmarshal(body, &w); err != nil {
2027 return err
2028 }
2029 u.Tag = w.Tag
2030 switch u.Tag {
2031 case "success":
2032 err = json.Unmarshal(body, &u.Success)
2033
2034 if err != nil {
2035 return err
2036 }
2037 case "team_license_limit":
2038 err = json.Unmarshal(body, &u.TeamLicenseLimit)
2039
2040 if err != nil {
2041 return err
2042 }
2043 case "free_team_member_limit_reached":
2044 err = json.Unmarshal(body, &u.FreeTeamMemberLimitReached)
2045
2046 if err != nil {
2047 return err
2048 }
2049 case "user_already_on_team":
2050 err = json.Unmarshal(body, &u.UserAlreadyOnTeam)
2051
2052 if err != nil {
2053 return err
2054 }
2055 case "user_on_another_team":
2056 err = json.Unmarshal(body, &u.UserOnAnotherTeam)
2057
2058 if err != nil {
2059 return err
2060 }
2061 case "user_already_paired":
2062 err = json.Unmarshal(body, &u.UserAlreadyPaired)
2063
2064 if err != nil {
2065 return err
2066 }
2067 case "user_migration_failed":
2068 err = json.Unmarshal(body, &u.UserMigrationFailed)
2069
2070 if err != nil {
2071 return err
2072 }
2073 case "duplicate_external_member_id":
2074 err = json.Unmarshal(body, &u.DuplicateExternalMemberId)
2075
2076 if err != nil {
2077 return err
2078 }
2079 case "duplicate_member_persistent_id":
2080 err = json.Unmarshal(body, &u.DuplicateMemberPersistentId)
2081
2082 if err != nil {
2083 return err
2084 }
2085 case "persistent_id_disabled":
2086 err = json.Unmarshal(body, &u.PersistentIdDisabled)
2087
2088 if err != nil {
2089 return err
2090 }
2091 case "user_creation_failed":
2092 err = json.Unmarshal(body, &u.UserCreationFailed)
2093
2094 if err != nil {
2095 return err
2096 }
2097 }
2098 return nil
2099 }
2100
2101 // MemberDevices : Information on devices of a team's member.
2102 type MemberDevices struct {
2103 // TeamMemberId : The member unique Id.
2104 TeamMemberId string `json:"team_member_id"`
2105 // WebSessions : List of web sessions made by this team member.
2106 WebSessions []*ActiveWebSession `json:"web_sessions,omitempty"`
2107 // DesktopClients : List of desktop clients by this team member.
2108 DesktopClients []*DesktopClientSession `json:"desktop_clients,omitempty"`
2109 // MobileClients : List of mobile clients by this team member.
2110 MobileClients []*MobileClientSession `json:"mobile_clients,omitempty"`
2111 }
2112
2113 // NewMemberDevices returns a new MemberDevices instance
2114 func NewMemberDevices(TeamMemberId string) *MemberDevices {
2115 s := new(MemberDevices)
2116 s.TeamMemberId = TeamMemberId
2117 return s
2118 }
2119
2120 // MemberLinkedApps : Information on linked applications of a team member.
2121 type MemberLinkedApps struct {
2122 // TeamMemberId : The member unique Id.
2123 TeamMemberId string `json:"team_member_id"`
2124 // LinkedApiApps : List of third party applications linked by this team
2125 // member.
2126 LinkedApiApps []*ApiApp `json:"linked_api_apps"`
2127 }
2128
2129 // NewMemberLinkedApps returns a new MemberLinkedApps instance
2130 func NewMemberLinkedApps(TeamMemberId string, LinkedApiApps []*ApiApp) *MemberLinkedApps {
2131 s := new(MemberLinkedApps)
2132 s.TeamMemberId = TeamMemberId
2133 s.LinkedApiApps = LinkedApiApps
2134 return s
2135 }
2136
2137 // MemberProfile : Basic member profile.
2138 type MemberProfile struct {
2139 // TeamMemberId : ID of user as a member of a team.
2140 TeamMemberId string `json:"team_member_id"`
2141 // ExternalId : External ID that a team can attach to the user. An
2142 // application using the API may find it easier to use their own IDs instead
2143 // of Dropbox IDs like account_id or team_member_id.
2144 ExternalId string `json:"external_id,omitempty"`
2145 // AccountId : A user's account identifier.
2146 AccountId string `json:"account_id,omitempty"`
2147 // Email : Email address of user.
2148 Email string `json:"email"`
2149 // EmailVerified : Is true if the user's email is verified to be owned by
2150 // the user.
2151 EmailVerified bool `json:"email_verified"`
2152 // Status : The user's status as a member of a specific team.
2153 Status *TeamMemberStatus `json:"status"`
2154 // Name : Representations for a person's name.
2155 Name *users.Name `json:"name"`
2156 // MembershipType : The user's membership type: full (normal team member) vs
2157 // limited (does not use a license; no access to the team's shared quota).
2158 MembershipType *TeamMembershipType `json:"membership_type"`
2159 // JoinedOn : The date and time the user joined as a member of a specific
2160 // team.
2161 JoinedOn time.Time `json:"joined_on,omitempty"`
2162 // PersistentId : Persistent ID that a team can attach to the user. The
2163 // persistent ID is unique ID to be used for SAML authentication.
2164 PersistentId string `json:"persistent_id,omitempty"`
2165 // IsDirectoryRestricted : Whether the user is a directory restricted user.
2166 IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
2167 }
2168
2169 // NewMemberProfile returns a new MemberProfile instance
2170 func NewMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType) *MemberProfile {
2171 s := new(MemberProfile)
2172 s.TeamMemberId = TeamMemberId
2173 s.Email = Email
2174 s.EmailVerified = EmailVerified
2175 s.Status = Status
2176 s.Name = Name
2177 s.MembershipType = MembershipType
2178 return s
2179 }
2180
2181 // UserSelectorError : Error that can be returned whenever a struct derived from
2182 // `UserSelectorArg` is used.
2183 type UserSelectorError struct {
2184 dropbox.Tagged
2185 }
2186
2187 // Valid tag values for UserSelectorError
2188 const (
2189 UserSelectorErrorUserNotFound = "user_not_found"
2190 )
2191
2192 // MemberSelectorError : has no documentation (yet)
2193 type MemberSelectorError struct {
2194 dropbox.Tagged
2195 }
2196
2197 // Valid tag values for MemberSelectorError
2198 const (
2199 MemberSelectorErrorUserNotFound = "user_not_found"
2200 MemberSelectorErrorUserNotInTeam = "user_not_in_team"
2201 )
2202
2203 // MembersAddArg : has no documentation (yet)
2204 type MembersAddArg struct {
2205 // NewMembers : Details of new members to be added to the team.
2206 NewMembers []*MemberAddArg `json:"new_members"`
2207 // ForceAsync : Whether to force the add to happen asynchronously.
2208 ForceAsync bool `json:"force_async"`
2209 }
2210
2211 // NewMembersAddArg returns a new MembersAddArg instance
2212 func NewMembersAddArg(NewMembers []*MemberAddArg) *MembersAddArg {
2213 s := new(MembersAddArg)
2214 s.NewMembers = NewMembers
2215 s.ForceAsync = false
2216 return s
2217 }
2218
2219 // MembersAddJobStatus : has no documentation (yet)
2220 type MembersAddJobStatus struct {
2221 dropbox.Tagged
2222 // Complete : The asynchronous job has finished. For each member that was
2223 // specified in the parameter `MembersAddArg` that was provided to
2224 // `membersAdd`, a corresponding item is returned in this list.
2225 Complete []*MemberAddResult `json:"complete,omitempty"`
2226 // Failed : The asynchronous job returned an error. The string contains an
2227 // error message.
2228 Failed string `json:"failed,omitempty"`
2229 }
2230
2231 // Valid tag values for MembersAddJobStatus
2232 const (
2233 MembersAddJobStatusInProgress = "in_progress"
2234 MembersAddJobStatusComplete = "complete"
2235 MembersAddJobStatusFailed = "failed"
2236 )
2237
2238 // UnmarshalJSON deserializes into a MembersAddJobStatus instance
2239 func (u *MembersAddJobStatus) UnmarshalJSON(body []byte) error {
2240 type wrap struct {
2241 dropbox.Tagged
2242 // Complete : The asynchronous job has finished. For each member that
2243 // was specified in the parameter `MembersAddArg` that was provided to
2244 // `membersAdd`, a corresponding item is returned in this list.
2245 Complete []json.RawMessage `json:"complete,omitempty"`
2246 }
2247 var w wrap
2248 var err error
2249 if err = json.Unmarshal(body, &w); err != nil {
2250 return err
2251 }
2252 u.Tag = w.Tag
2253 switch u.Tag {
2254 case "complete":
2255 err = json.Unmarshal(body, &u.Complete)
2256
2257 if err != nil {
2258 return err
2259 }
2260 case "failed":
2261 err = json.Unmarshal(body, &u.Failed)
2262
2263 if err != nil {
2264 return err
2265 }
2266 }
2267 return nil
2268 }
2269
2270 // MembersAddLaunch : has no documentation (yet)
2271 type MembersAddLaunch struct {
2272 dropbox.Tagged
2273 // AsyncJobId : This response indicates that the processing is asynchronous.
2274 // The string is an id that can be used to obtain the status of the
2275 // asynchronous job.
2276 AsyncJobId string `json:"async_job_id,omitempty"`
2277 // Complete : has no documentation (yet)
2278 Complete []*MemberAddResult `json:"complete,omitempty"`
2279 }
2280
2281 // Valid tag values for MembersAddLaunch
2282 const (
2283 MembersAddLaunchAsyncJobId = "async_job_id"
2284 MembersAddLaunchComplete = "complete"
2285 )
2286
2287 // UnmarshalJSON deserializes into a MembersAddLaunch instance
2288 func (u *MembersAddLaunch) UnmarshalJSON(body []byte) error {
2289 type wrap struct {
2290 dropbox.Tagged
2291 // Complete : has no documentation (yet)
2292 Complete []json.RawMessage `json:"complete,omitempty"`
2293 }
2294 var w wrap
2295 var err error
2296 if err = json.Unmarshal(body, &w); err != nil {
2297 return err
2298 }
2299 u.Tag = w.Tag
2300 switch u.Tag {
2301 case "async_job_id":
2302 err = json.Unmarshal(body, &u.AsyncJobId)
2303
2304 if err != nil {
2305 return err
2306 }
2307 case "complete":
2308 err = json.Unmarshal(body, &u.Complete)
2309
2310 if err != nil {
2311 return err
2312 }
2313 }
2314 return nil
2315 }
2316
2317 // MembersDeactivateBaseArg : Exactly one of team_member_id, email, or
2318 // external_id must be provided to identify the user account.
2319 type MembersDeactivateBaseArg struct {
2320 // User : Identity of user to remove/suspend/have their files moved.
2321 User *UserSelectorArg `json:"user"`
2322 }
2323
2324 // NewMembersDeactivateBaseArg returns a new MembersDeactivateBaseArg instance
2325 func NewMembersDeactivateBaseArg(User *UserSelectorArg) *MembersDeactivateBaseArg {
2326 s := new(MembersDeactivateBaseArg)
2327 s.User = User
2328 return s
2329 }
2330
2331 // MembersDataTransferArg : has no documentation (yet)
2332 type MembersDataTransferArg struct {
2333 MembersDeactivateBaseArg
2334 // TransferDestId : Files from the deleted member account will be
2335 // transferred to this user.
2336 TransferDestId *UserSelectorArg `json:"transfer_dest_id"`
2337 // TransferAdminId : Errors during the transfer process will be sent via
2338 // email to this user.
2339 TransferAdminId *UserSelectorArg `json:"transfer_admin_id"`
2340 }
2341
2342 // NewMembersDataTransferArg returns a new MembersDataTransferArg instance
2343 func NewMembersDataTransferArg(User *UserSelectorArg, TransferDestId *UserSelectorArg, TransferAdminId *UserSelectorArg) *MembersDataTransferArg {
2344 s := new(MembersDataTransferArg)
2345 s.User = User
2346 s.TransferDestId = TransferDestId
2347 s.TransferAdminId = TransferAdminId
2348 return s
2349 }
2350
2351 // MembersDeactivateArg : has no documentation (yet)
2352 type MembersDeactivateArg struct {
2353 MembersDeactivateBaseArg
2354 // WipeData : If provided, controls if the user's data will be deleted on
2355 // their linked devices.
2356 WipeData bool `json:"wipe_data"`
2357 }
2358
2359 // NewMembersDeactivateArg returns a new MembersDeactivateArg instance
2360 func NewMembersDeactivateArg(User *UserSelectorArg) *MembersDeactivateArg {
2361 s := new(MembersDeactivateArg)
2362 s.User = User
2363 s.WipeData = true
2364 return s
2365 }
2366
2367 // MembersDeactivateError : has no documentation (yet)
2368 type MembersDeactivateError struct {
2369 dropbox.Tagged
2370 }
2371
2372 // Valid tag values for MembersDeactivateError
2373 const (
2374 MembersDeactivateErrorUserNotFound = "user_not_found"
2375 MembersDeactivateErrorUserNotInTeam = "user_not_in_team"
2376 MembersDeactivateErrorOther = "other"
2377 )
2378
2379 // MembersGetInfoArgs : has no documentation (yet)
2380 type MembersGetInfoArgs struct {
2381 // Members : List of team members.
2382 Members []*UserSelectorArg `json:"members"`
2383 }
2384
2385 // NewMembersGetInfoArgs returns a new MembersGetInfoArgs instance
2386 func NewMembersGetInfoArgs(Members []*UserSelectorArg) *MembersGetInfoArgs {
2387 s := new(MembersGetInfoArgs)
2388 s.Members = Members
2389 return s
2390 }
2391
2392 // MembersGetInfoError :
2393 type MembersGetInfoError struct {
2394 dropbox.Tagged
2395 }
2396
2397 // Valid tag values for MembersGetInfoError
2398 const (
2399 MembersGetInfoErrorOther = "other"
2400 )
2401
2402 // MembersGetInfoItem : Describes a result obtained for a single user whose id
2403 // was specified in the parameter of `membersGetInfo`.
2404 type MembersGetInfoItem struct {
2405 dropbox.Tagged
2406 // IdNotFound : An ID that was provided as a parameter to `membersGetInfo`,
2407 // and did not match a corresponding user. This might be a team_member_id,
2408 // an email, or an external ID, depending on how the method was called.
2409 IdNotFound string `json:"id_not_found,omitempty"`
2410 // MemberInfo : Info about a team member.
2411 MemberInfo *TeamMemberInfo `json:"member_info,omitempty"`
2412 }
2413
2414 // Valid tag values for MembersGetInfoItem
2415 const (
2416 MembersGetInfoItemIdNotFound = "id_not_found"
2417 MembersGetInfoItemMemberInfo = "member_info"
2418 )
2419
2420 // UnmarshalJSON deserializes into a MembersGetInfoItem instance
2421 func (u *MembersGetInfoItem) UnmarshalJSON(body []byte) error {
2422 type wrap struct {
2423 dropbox.Tagged
2424 // MemberInfo : Info about a team member.
2425 MemberInfo json.RawMessage `json:"member_info,omitempty"`
2426 }
2427 var w wrap
2428 var err error
2429 if err = json.Unmarshal(body, &w); err != nil {
2430 return err
2431 }
2432 u.Tag = w.Tag
2433 switch u.Tag {
2434 case "id_not_found":
2435 err = json.Unmarshal(body, &u.IdNotFound)
2436
2437 if err != nil {
2438 return err
2439 }
2440 case "member_info":
2441 err = json.Unmarshal(body, &u.MemberInfo)
2442
2443 if err != nil {
2444 return err
2445 }
2446 }
2447 return nil
2448 }
2449
2450 // MembersListArg : has no documentation (yet)
2451 type MembersListArg struct {
2452 // Limit : Number of results to return per call.
2453 Limit uint32 `json:"limit"`
2454 // IncludeRemoved : Whether to return removed members.
2455 IncludeRemoved bool `json:"include_removed"`
2456 }
2457
2458 // NewMembersListArg returns a new MembersListArg instance
2459 func NewMembersListArg() *MembersListArg {
2460 s := new(MembersListArg)
2461 s.Limit = 1000
2462 s.IncludeRemoved = false
2463 return s
2464 }
2465
2466 // MembersListContinueArg : has no documentation (yet)
2467 type MembersListContinueArg struct {
2468 // Cursor : Indicates from what point to get the next set of members.
2469 Cursor string `json:"cursor"`
2470 }
2471
2472 // NewMembersListContinueArg returns a new MembersListContinueArg instance
2473 func NewMembersListContinueArg(Cursor string) *MembersListContinueArg {
2474 s := new(MembersListContinueArg)
2475 s.Cursor = Cursor
2476 return s
2477 }
2478
2479 // MembersListContinueError : has no documentation (yet)
2480 type MembersListContinueError struct {
2481 dropbox.Tagged
2482 }
2483
2484 // Valid tag values for MembersListContinueError
2485 const (
2486 MembersListContinueErrorInvalidCursor = "invalid_cursor"
2487 MembersListContinueErrorOther = "other"
2488 )
2489
2490 // MembersListError :
2491 type MembersListError struct {
2492 dropbox.Tagged
2493 }
2494
2495 // Valid tag values for MembersListError
2496 const (
2497 MembersListErrorOther = "other"
2498 )
2499
2500 // MembersListResult : has no documentation (yet)
2501 type MembersListResult struct {
2502 // Members : List of team members.
2503 Members []*TeamMemberInfo `json:"members"`
2504 // Cursor : Pass the cursor into `membersListContinue` to obtain the
2505 // additional members.
2506 Cursor string `json:"cursor"`
2507 // HasMore : Is true if there are additional team members that have not been
2508 // returned yet. An additional call to `membersListContinue` can retrieve
2509 // them.
2510 HasMore bool `json:"has_more"`
2511 }
2512
2513 // NewMembersListResult returns a new MembersListResult instance
2514 func NewMembersListResult(Members []*TeamMemberInfo, Cursor string, HasMore bool) *MembersListResult {
2515 s := new(MembersListResult)
2516 s.Members = Members
2517 s.Cursor = Cursor
2518 s.HasMore = HasMore
2519 return s
2520 }
2521
2522 // MembersRecoverArg : Exactly one of team_member_id, email, or external_id must
2523 // be provided to identify the user account.
2524 type MembersRecoverArg struct {
2525 // User : Identity of user to recover.
2526 User *UserSelectorArg `json:"user"`
2527 }
2528
2529 // NewMembersRecoverArg returns a new MembersRecoverArg instance
2530 func NewMembersRecoverArg(User *UserSelectorArg) *MembersRecoverArg {
2531 s := new(MembersRecoverArg)
2532 s.User = User
2533 return s
2534 }
2535
2536 // MembersRecoverError : has no documentation (yet)
2537 type MembersRecoverError struct {
2538 dropbox.Tagged
2539 }
2540
2541 // Valid tag values for MembersRecoverError
2542 const (
2543 MembersRecoverErrorUserNotFound = "user_not_found"
2544 MembersRecoverErrorUserUnrecoverable = "user_unrecoverable"
2545 MembersRecoverErrorUserNotInTeam = "user_not_in_team"
2546 MembersRecoverErrorTeamLicenseLimit = "team_license_limit"
2547 MembersRecoverErrorOther = "other"
2548 )
2549
2550 // MembersRemoveArg : has no documentation (yet)
2551 type MembersRemoveArg struct {
2552 MembersDeactivateArg
2553 // TransferDestId : If provided, files from the deleted member account will
2554 // be transferred to this user.
2555 TransferDestId *UserSelectorArg `json:"transfer_dest_id,omitempty"`
2556 // TransferAdminId : If provided, errors during the transfer process will be
2557 // sent via email to this user. If the transfer_dest_id argument was
2558 // provided, then this argument must be provided as well.
2559 TransferAdminId *UserSelectorArg `json:"transfer_admin_id,omitempty"`
2560 // KeepAccount : Downgrade the member to a Basic account. The user will
2561 // retain the email address associated with their Dropbox account and data
2562 // in their account that is not restricted to team members. In order to keep
2563 // the account the argument wipe_data should be set to False.
2564 KeepAccount bool `json:"keep_account"`
2565 }
2566
2567 // NewMembersRemoveArg returns a new MembersRemoveArg instance
2568 func NewMembersRemoveArg(User *UserSelectorArg) *MembersRemoveArg {
2569 s := new(MembersRemoveArg)
2570 s.User = User
2571 s.WipeData = true
2572 s.KeepAccount = false
2573 return s
2574 }
2575
2576 // MembersTransferFilesError : has no documentation (yet)
2577 type MembersTransferFilesError struct {
2578 dropbox.Tagged
2579 }
2580
2581 // Valid tag values for MembersTransferFilesError
2582 const (
2583 MembersTransferFilesErrorUserNotFound = "user_not_found"
2584 MembersTransferFilesErrorUserNotInTeam = "user_not_in_team"
2585 MembersTransferFilesErrorOther = "other"
2586 MembersTransferFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
2587 MembersTransferFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
2588 MembersTransferFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
2589 MembersTransferFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
2590 MembersTransferFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
2591 MembersTransferFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
2592 MembersTransferFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
2593 MembersTransferFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
2594 MembersTransferFilesErrorRecipientNotVerified = "recipient_not_verified"
2595 )
2596
2597 // MembersRemoveError : has no documentation (yet)
2598 type MembersRemoveError struct {
2599 dropbox.Tagged
2600 }
2601
2602 // Valid tag values for MembersRemoveError
2603 const (
2604 MembersRemoveErrorUserNotFound = "user_not_found"
2605 MembersRemoveErrorUserNotInTeam = "user_not_in_team"
2606 MembersRemoveErrorOther = "other"
2607 MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
2608 MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
2609 MembersRemoveErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
2610 MembersRemoveErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
2611 MembersRemoveErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
2612 MembersRemoveErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
2613 MembersRemoveErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
2614 MembersRemoveErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
2615 MembersRemoveErrorRecipientNotVerified = "recipient_not_verified"
2616 MembersRemoveErrorRemoveLastAdmin = "remove_last_admin"
2617 MembersRemoveErrorCannotKeepAccountAndTransfer = "cannot_keep_account_and_transfer"
2618 MembersRemoveErrorCannotKeepAccountAndDeleteData = "cannot_keep_account_and_delete_data"
2619 MembersRemoveErrorEmailAddressTooLongToBeDisabled = "email_address_too_long_to_be_disabled"
2620 MembersRemoveErrorCannotKeepInvitedUserAccount = "cannot_keep_invited_user_account"
2621 )
2622
2623 // MembersSendWelcomeError :
2624 type MembersSendWelcomeError struct {
2625 dropbox.Tagged
2626 }
2627
2628 // Valid tag values for MembersSendWelcomeError
2629 const (
2630 MembersSendWelcomeErrorUserNotFound = "user_not_found"
2631 MembersSendWelcomeErrorUserNotInTeam = "user_not_in_team"
2632 MembersSendWelcomeErrorOther = "other"
2633 )
2634
2635 // MembersSetPermissionsArg : Exactly one of team_member_id, email, or
2636 // external_id must be provided to identify the user account.
2637 type MembersSetPermissionsArg struct {
2638 // User : Identity of user whose role will be set.
2639 User *UserSelectorArg `json:"user"`
2640 // NewRole : The new role of the member.
2641 NewRole *AdminTier `json:"new_role"`
2642 }
2643
2644 // NewMembersSetPermissionsArg returns a new MembersSetPermissionsArg instance
2645 func NewMembersSetPermissionsArg(User *UserSelectorArg, NewRole *AdminTier) *MembersSetPermissionsArg {
2646 s := new(MembersSetPermissionsArg)
2647 s.User = User
2648 s.NewRole = NewRole
2649 return s
2650 }
2651
2652 // MembersSetPermissionsError : has no documentation (yet)
2653 type MembersSetPermissionsError struct {
2654 dropbox.Tagged
2655 }
2656
2657 // Valid tag values for MembersSetPermissionsError
2658 const (
2659 MembersSetPermissionsErrorUserNotFound = "user_not_found"
2660 MembersSetPermissionsErrorLastAdmin = "last_admin"
2661 MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team"
2662 MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions"
2663 MembersSetPermissionsErrorTeamLicenseLimit = "team_license_limit"
2664 MembersSetPermissionsErrorOther = "other"
2665 )
2666
2667 // MembersSetPermissionsResult : has no documentation (yet)
2668 type MembersSetPermissionsResult struct {
2669 // TeamMemberId : The member ID of the user to which the change was applied.
2670 TeamMemberId string `json:"team_member_id"`
2671 // Role : The role after the change.
2672 Role *AdminTier `json:"role"`
2673 }
2674
2675 // NewMembersSetPermissionsResult returns a new MembersSetPermissionsResult instance
2676 func NewMembersSetPermissionsResult(TeamMemberId string, Role *AdminTier) *MembersSetPermissionsResult {
2677 s := new(MembersSetPermissionsResult)
2678 s.TeamMemberId = TeamMemberId
2679 s.Role = Role
2680 return s
2681 }
2682
2683 // MembersSetProfileArg : Exactly one of team_member_id, email, or external_id
2684 // must be provided to identify the user account. At least one of new_email,
2685 // new_external_id, new_given_name, and/or new_surname must be provided.
2686 type MembersSetProfileArg struct {
2687 // User : Identity of user whose profile will be set.
2688 User *UserSelectorArg `json:"user"`
2689 // NewEmail : New email for member.
2690 NewEmail string `json:"new_email,omitempty"`
2691 // NewExternalId : New external ID for member.
2692 NewExternalId string `json:"new_external_id,omitempty"`
2693 // NewGivenName : New given name for member.
2694 NewGivenName string `json:"new_given_name,omitempty"`
2695 // NewSurname : New surname for member.
2696 NewSurname string `json:"new_surname,omitempty"`
2697 // NewPersistentId : New persistent ID. This field only available to teams
2698 // using persistent ID SAML configuration.
2699 NewPersistentId string `json:"new_persistent_id,omitempty"`
2700 // NewIsDirectoryRestricted : New value for whether the user is a directory
2701 // restricted user.
2702 NewIsDirectoryRestricted bool `json:"new_is_directory_restricted,omitempty"`
2703 }
2704
2705 // NewMembersSetProfileArg returns a new MembersSetProfileArg instance
2706 func NewMembersSetProfileArg(User *UserSelectorArg) *MembersSetProfileArg {
2707 s := new(MembersSetProfileArg)
2708 s.User = User
2709 return s
2710 }
2711
2712 // MembersSetProfileError : has no documentation (yet)
2713 type MembersSetProfileError struct {
2714 dropbox.Tagged
2715 }
2716
2717 // Valid tag values for MembersSetProfileError
2718 const (
2719 MembersSetProfileErrorUserNotFound = "user_not_found"
2720 MembersSetProfileErrorUserNotInTeam = "user_not_in_team"
2721 MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe"
2722 MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified"
2723 MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user"
2724 MembersSetProfileErrorExternalIdUsedByOtherUser = "external_id_used_by_other_user"
2725 MembersSetProfileErrorSetProfileDisallowed = "set_profile_disallowed"
2726 MembersSetProfileErrorParamCannotBeEmpty = "param_cannot_be_empty"
2727 MembersSetProfileErrorPersistentIdDisabled = "persistent_id_disabled"
2728 MembersSetProfileErrorPersistentIdUsedByOtherUser = "persistent_id_used_by_other_user"
2729 MembersSetProfileErrorDirectoryRestrictedOff = "directory_restricted_off"
2730 MembersSetProfileErrorOther = "other"
2731 )
2732
2733 // MembersSuspendError : has no documentation (yet)
2734 type MembersSuspendError struct {
2735 dropbox.Tagged
2736 }
2737
2738 // Valid tag values for MembersSuspendError
2739 const (
2740 MembersSuspendErrorUserNotFound = "user_not_found"
2741 MembersSuspendErrorUserNotInTeam = "user_not_in_team"
2742 MembersSuspendErrorOther = "other"
2743 MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user"
2744 MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin"
2745 MembersSuspendErrorTeamLicenseLimit = "team_license_limit"
2746 )
2747
2748 // MembersTransferFormerMembersFilesError : has no documentation (yet)
2749 type MembersTransferFormerMembersFilesError struct {
2750 dropbox.Tagged
2751 }
2752
2753 // Valid tag values for MembersTransferFormerMembersFilesError
2754 const (
2755 MembersTransferFormerMembersFilesErrorUserNotFound = "user_not_found"
2756 MembersTransferFormerMembersFilesErrorUserNotInTeam = "user_not_in_team"
2757 MembersTransferFormerMembersFilesErrorOther = "other"
2758 MembersTransferFormerMembersFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
2759 MembersTransferFormerMembersFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
2760 MembersTransferFormerMembersFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
2761 MembersTransferFormerMembersFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
2762 MembersTransferFormerMembersFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
2763 MembersTransferFormerMembersFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
2764 MembersTransferFormerMembersFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
2765 MembersTransferFormerMembersFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
2766 MembersTransferFormerMembersFilesErrorRecipientNotVerified = "recipient_not_verified"
2767 MembersTransferFormerMembersFilesErrorUserDataIsBeingTransferred = "user_data_is_being_transferred"
2768 MembersTransferFormerMembersFilesErrorUserNotRemoved = "user_not_removed"
2769 MembersTransferFormerMembersFilesErrorUserDataCannotBeTransferred = "user_data_cannot_be_transferred"
2770 MembersTransferFormerMembersFilesErrorUserDataAlreadyTransferred = "user_data_already_transferred"
2771 )
2772
2773 // MembersUnsuspendArg : Exactly one of team_member_id, email, or external_id
2774 // must be provided to identify the user account.
2775 type MembersUnsuspendArg struct {
2776 // User : Identity of user to unsuspend.
2777 User *UserSelectorArg `json:"user"`
2778 }
2779
2780 // NewMembersUnsuspendArg returns a new MembersUnsuspendArg instance
2781 func NewMembersUnsuspendArg(User *UserSelectorArg) *MembersUnsuspendArg {
2782 s := new(MembersUnsuspendArg)
2783 s.User = User
2784 return s
2785 }
2786
2787 // MembersUnsuspendError : has no documentation (yet)
2788 type MembersUnsuspendError struct {
2789 dropbox.Tagged
2790 }
2791
2792 // Valid tag values for MembersUnsuspendError
2793 const (
2794 MembersUnsuspendErrorUserNotFound = "user_not_found"
2795 MembersUnsuspendErrorUserNotInTeam = "user_not_in_team"
2796 MembersUnsuspendErrorOther = "other"
2797 MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member"
2798 MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit"
2799 )
2800
2801 // MobileClientPlatform : has no documentation (yet)
2802 type MobileClientPlatform struct {
2803 dropbox.Tagged
2804 }
2805
2806 // Valid tag values for MobileClientPlatform
2807 const (
2808 MobileClientPlatformIphone = "iphone"
2809 MobileClientPlatformIpad = "ipad"
2810 MobileClientPlatformAndroid = "android"
2811 MobileClientPlatformWindowsPhone = "windows_phone"
2812 MobileClientPlatformBlackberry = "blackberry"
2813 MobileClientPlatformOther = "other"
2814 )
2815
2816 // MobileClientSession : Information about linked Dropbox mobile client
2817 // sessions.
2818 type MobileClientSession struct {
2819 DeviceSession
2820 // DeviceName : The device name.
2821 DeviceName string `json:"device_name"`
2822 // ClientType : The mobile application type.
2823 ClientType *MobileClientPlatform `json:"client_type"`
2824 // ClientVersion : The dropbox client version.
2825 ClientVersion string `json:"client_version,omitempty"`
2826 // OsVersion : The hosting OS version.
2827 OsVersion string `json:"os_version,omitempty"`
2828 // LastCarrier : last carrier used by the device.
2829 LastCarrier string `json:"last_carrier,omitempty"`
2830 }
2831
2832 // NewMobileClientSession returns a new MobileClientSession instance
2833 func NewMobileClientSession(SessionId string, DeviceName string, ClientType *MobileClientPlatform) *MobileClientSession {
2834 s := new(MobileClientSession)
2835 s.SessionId = SessionId
2836 s.DeviceName = DeviceName
2837 s.ClientType = ClientType
2838 return s
2839 }
2840
2841 // NamespaceMetadata : Properties of a namespace.
2842 type NamespaceMetadata struct {
2843 // Name : The name of this namespace.
2844 Name string `json:"name"`
2845 // NamespaceId : The ID of this namespace.
2846 NamespaceId string `json:"namespace_id"`
2847 // NamespaceType : The type of this namespace.
2848 NamespaceType *NamespaceType `json:"namespace_type"`
2849 // TeamMemberId : If this is a team member or app folder, the ID of the
2850 // owning team member. Otherwise, this field is not present.
2851 TeamMemberId string `json:"team_member_id,omitempty"`
2852 }
2853
2854 // NewNamespaceMetadata returns a new NamespaceMetadata instance
2855 func NewNamespaceMetadata(Name string, NamespaceId string, NamespaceType *NamespaceType) *NamespaceMetadata {
2856 s := new(NamespaceMetadata)
2857 s.Name = Name
2858 s.NamespaceId = NamespaceId
2859 s.NamespaceType = NamespaceType
2860 return s
2861 }
2862
2863 // NamespaceType : has no documentation (yet)
2864 type NamespaceType struct {
2865 dropbox.Tagged
2866 }
2867
2868 // Valid tag values for NamespaceType
2869 const (
2870 NamespaceTypeAppFolder = "app_folder"
2871 NamespaceTypeSharedFolder = "shared_folder"
2872 NamespaceTypeTeamFolder = "team_folder"
2873 NamespaceTypeTeamMemberFolder = "team_member_folder"
2874 NamespaceTypeOther = "other"
2875 )
2876
2877 // RemoveCustomQuotaResult : User result for setting member custom quota.
2878 type RemoveCustomQuotaResult struct {
2879 dropbox.Tagged
2880 // Success : Successfully removed user.
2881 Success *UserSelectorArg `json:"success,omitempty"`
2882 // InvalidUser : Invalid user (not in team).
2883 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
2884 }
2885
2886 // Valid tag values for RemoveCustomQuotaResult
2887 const (
2888 RemoveCustomQuotaResultSuccess = "success"
2889 RemoveCustomQuotaResultInvalidUser = "invalid_user"
2890 RemoveCustomQuotaResultOther = "other"
2891 )
2892
2893 // UnmarshalJSON deserializes into a RemoveCustomQuotaResult instance
2894 func (u *RemoveCustomQuotaResult) UnmarshalJSON(body []byte) error {
2895 type wrap struct {
2896 dropbox.Tagged
2897 // Success : Successfully removed user.
2898 Success json.RawMessage `json:"success,omitempty"`
2899 // InvalidUser : Invalid user (not in team).
2900 InvalidUser json.RawMessage `json:"invalid_user,omitempty"`
2901 }
2902 var w wrap
2903 var err error
2904 if err = json.Unmarshal(body, &w); err != nil {
2905 return err
2906 }
2907 u.Tag = w.Tag
2908 switch u.Tag {
2909 case "success":
2910 err = json.Unmarshal(w.Success, &u.Success)
2911
2912 if err != nil {
2913 return err
2914 }
2915 case "invalid_user":
2916 err = json.Unmarshal(w.InvalidUser, &u.InvalidUser)
2917
2918 if err != nil {
2919 return err
2920 }
2921 }
2922 return nil
2923 }
2924
2925 // RemovedStatus : has no documentation (yet)
2926 type RemovedStatus struct {
2927 // IsRecoverable : True if the removed team member is recoverable.
2928 IsRecoverable bool `json:"is_recoverable"`
2929 // IsDisconnected : True if the team member's account was converted to
2930 // individual account.
2931 IsDisconnected bool `json:"is_disconnected"`
2932 }
2933
2934 // NewRemovedStatus returns a new RemovedStatus instance
2935 func NewRemovedStatus(IsRecoverable bool, IsDisconnected bool) *RemovedStatus {
2936 s := new(RemovedStatus)
2937 s.IsRecoverable = IsRecoverable
2938 s.IsDisconnected = IsDisconnected
2939 return s
2940 }
2941
2942 // RevokeDesktopClientArg : has no documentation (yet)
2943 type RevokeDesktopClientArg struct {
2944 DeviceSessionArg
2945 // DeleteOnUnlink : Whether to delete all files of the account (this is
2946 // possible only if supported by the desktop client and will be made the
2947 // next time the client access the account).
2948 DeleteOnUnlink bool `json:"delete_on_unlink"`
2949 }
2950
2951 // NewRevokeDesktopClientArg returns a new RevokeDesktopClientArg instance
2952 func NewRevokeDesktopClientArg(SessionId string, TeamMemberId string) *RevokeDesktopClientArg {
2953 s := new(RevokeDesktopClientArg)
2954 s.SessionId = SessionId
2955 s.TeamMemberId = TeamMemberId
2956 s.DeleteOnUnlink = false
2957 return s
2958 }
2959
2960 // RevokeDeviceSessionArg : has no documentation (yet)
2961 type RevokeDeviceSessionArg struct {
2962 dropbox.Tagged
2963 // WebSession : End an active session.
2964 WebSession *DeviceSessionArg `json:"web_session,omitempty"`
2965 // DesktopClient : Unlink a linked desktop device.
2966 DesktopClient *RevokeDesktopClientArg `json:"desktop_client,omitempty"`
2967 // MobileClient : Unlink a linked mobile device.
2968 MobileClient *DeviceSessionArg `json:"mobile_client,omitempty"`
2969 }
2970
2971 // Valid tag values for RevokeDeviceSessionArg
2972 const (
2973 RevokeDeviceSessionArgWebSession = "web_session"
2974 RevokeDeviceSessionArgDesktopClient = "desktop_client"
2975 RevokeDeviceSessionArgMobileClient = "mobile_client"
2976 )
2977
2978 // UnmarshalJSON deserializes into a RevokeDeviceSessionArg instance
2979 func (u *RevokeDeviceSessionArg) UnmarshalJSON(body []byte) error {
2980 type wrap struct {
2981 dropbox.Tagged
2982 // WebSession : End an active session.
2983 WebSession json.RawMessage `json:"web_session,omitempty"`
2984 // DesktopClient : Unlink a linked desktop device.
2985 DesktopClient json.RawMessage `json:"desktop_client,omitempty"`
2986 // MobileClient : Unlink a linked mobile device.
2987 MobileClient json.RawMessage `json:"mobile_client,omitempty"`
2988 }
2989 var w wrap
2990 var err error
2991 if err = json.Unmarshal(body, &w); err != nil {
2992 return err
2993 }
2994 u.Tag = w.Tag
2995 switch u.Tag {
2996 case "web_session":
2997 err = json.Unmarshal(body, &u.WebSession)
2998
2999 if err != nil {
3000 return err
3001 }
3002 case "desktop_client":
3003 err = json.Unmarshal(body, &u.DesktopClient)
3004
3005 if err != nil {
3006 return err
3007 }
3008 case "mobile_client":
3009 err = json.Unmarshal(body, &u.MobileClient)
3010
3011 if err != nil {
3012 return err
3013 }
3014 }
3015 return nil
3016 }
3017
3018 // RevokeDeviceSessionBatchArg : has no documentation (yet)
3019 type RevokeDeviceSessionBatchArg struct {
3020 // RevokeDevices : has no documentation (yet)
3021 RevokeDevices []*RevokeDeviceSessionArg `json:"revoke_devices"`
3022 }
3023
3024 // NewRevokeDeviceSessionBatchArg returns a new RevokeDeviceSessionBatchArg instance
3025 func NewRevokeDeviceSessionBatchArg(RevokeDevices []*RevokeDeviceSessionArg) *RevokeDeviceSessionBatchArg {
3026 s := new(RevokeDeviceSessionBatchArg)
3027 s.RevokeDevices = RevokeDevices
3028 return s
3029 }
3030
3031 // RevokeDeviceSessionBatchError :
3032 type RevokeDeviceSessionBatchError struct {
3033 dropbox.Tagged
3034 }
3035
3036 // Valid tag values for RevokeDeviceSessionBatchError
3037 const (
3038 RevokeDeviceSessionBatchErrorOther = "other"
3039 )
3040
3041 // RevokeDeviceSessionBatchResult : has no documentation (yet)
3042 type RevokeDeviceSessionBatchResult struct {
3043 // RevokeDevicesStatus : has no documentation (yet)
3044 RevokeDevicesStatus []*RevokeDeviceSessionStatus `json:"revoke_devices_status"`
3045 }
3046
3047 // NewRevokeDeviceSessionBatchResult returns a new RevokeDeviceSessionBatchResult instance
3048 func NewRevokeDeviceSessionBatchResult(RevokeDevicesStatus []*RevokeDeviceSessionStatus) *RevokeDeviceSessionBatchResult {
3049 s := new(RevokeDeviceSessionBatchResult)
3050 s.RevokeDevicesStatus = RevokeDevicesStatus
3051 return s
3052 }
3053
3054 // RevokeDeviceSessionError : has no documentation (yet)
3055 type RevokeDeviceSessionError struct {
3056 dropbox.Tagged
3057 }
3058
3059 // Valid tag values for RevokeDeviceSessionError
3060 const (
3061 RevokeDeviceSessionErrorDeviceSessionNotFound = "device_session_not_found"
3062 RevokeDeviceSessionErrorMemberNotFound = "member_not_found"
3063 RevokeDeviceSessionErrorOther = "other"
3064 )
3065
3066 // RevokeDeviceSessionStatus : has no documentation (yet)
3067 type RevokeDeviceSessionStatus struct {
3068 // Success : Result of the revoking request.
3069 Success bool `json:"success"`
3070 // ErrorType : The error cause in case of a failure.
3071 ErrorType *RevokeDeviceSessionError `json:"error_type,omitempty"`
3072 }
3073
3074 // NewRevokeDeviceSessionStatus returns a new RevokeDeviceSessionStatus instance
3075 func NewRevokeDeviceSessionStatus(Success bool) *RevokeDeviceSessionStatus {
3076 s := new(RevokeDeviceSessionStatus)
3077 s.Success = Success
3078 return s
3079 }
3080
3081 // RevokeLinkedApiAppArg : has no documentation (yet)
3082 type RevokeLinkedApiAppArg struct {
3083 // AppId : The application's unique id.
3084 AppId string `json:"app_id"`
3085 // TeamMemberId : The unique id of the member owning the device.
3086 TeamMemberId string `json:"team_member_id"`
3087 // KeepAppFolder : Whether to keep the application dedicated folder (in case
3088 // the application uses one).
3089 KeepAppFolder bool `json:"keep_app_folder"`
3090 }
3091
3092 // NewRevokeLinkedApiAppArg returns a new RevokeLinkedApiAppArg instance
3093 func NewRevokeLinkedApiAppArg(AppId string, TeamMemberId string) *RevokeLinkedApiAppArg {
3094 s := new(RevokeLinkedApiAppArg)
3095 s.AppId = AppId
3096 s.TeamMemberId = TeamMemberId
3097 s.KeepAppFolder = true
3098 return s
3099 }
3100
3101 // RevokeLinkedApiAppBatchArg : has no documentation (yet)
3102 type RevokeLinkedApiAppBatchArg struct {
3103 // RevokeLinkedApp : has no documentation (yet)
3104 RevokeLinkedApp []*RevokeLinkedApiAppArg `json:"revoke_linked_app"`
3105 }
3106
3107 // NewRevokeLinkedApiAppBatchArg returns a new RevokeLinkedApiAppBatchArg instance
3108 func NewRevokeLinkedApiAppBatchArg(RevokeLinkedApp []*RevokeLinkedApiAppArg) *RevokeLinkedApiAppBatchArg {
3109 s := new(RevokeLinkedApiAppBatchArg)
3110 s.RevokeLinkedApp = RevokeLinkedApp
3111 return s
3112 }
3113
3114 // RevokeLinkedAppBatchError : Error returned by
3115 // `linkedAppsRevokeLinkedAppBatch`.
3116 type RevokeLinkedAppBatchError struct {
3117 dropbox.Tagged
3118 }
3119
3120 // Valid tag values for RevokeLinkedAppBatchError
3121 const (
3122 RevokeLinkedAppBatchErrorOther = "other"
3123 )
3124
3125 // RevokeLinkedAppBatchResult : has no documentation (yet)
3126 type RevokeLinkedAppBatchResult struct {
3127 // RevokeLinkedAppStatus : has no documentation (yet)
3128 RevokeLinkedAppStatus []*RevokeLinkedAppStatus `json:"revoke_linked_app_status"`
3129 }
3130
3131 // NewRevokeLinkedAppBatchResult returns a new RevokeLinkedAppBatchResult instance
3132 func NewRevokeLinkedAppBatchResult(RevokeLinkedAppStatus []*RevokeLinkedAppStatus) *RevokeLinkedAppBatchResult {
3133 s := new(RevokeLinkedAppBatchResult)
3134 s.RevokeLinkedAppStatus = RevokeLinkedAppStatus
3135 return s
3136 }
3137
3138 // RevokeLinkedAppError : Error returned by `linkedAppsRevokeLinkedApp`.
3139 type RevokeLinkedAppError struct {
3140 dropbox.Tagged
3141 }
3142
3143 // Valid tag values for RevokeLinkedAppError
3144 const (
3145 RevokeLinkedAppErrorAppNotFound = "app_not_found"
3146 RevokeLinkedAppErrorMemberNotFound = "member_not_found"
3147 RevokeLinkedAppErrorOther = "other"
3148 )
3149
3150 // RevokeLinkedAppStatus : has no documentation (yet)
3151 type RevokeLinkedAppStatus struct {
3152 // Success : Result of the revoking request.
3153 Success bool `json:"success"`
3154 // ErrorType : The error cause in case of a failure.
3155 ErrorType *RevokeLinkedAppError `json:"error_type,omitempty"`
3156 }
3157
3158 // NewRevokeLinkedAppStatus returns a new RevokeLinkedAppStatus instance
3159 func NewRevokeLinkedAppStatus(Success bool) *RevokeLinkedAppStatus {
3160 s := new(RevokeLinkedAppStatus)
3161 s.Success = Success
3162 return s
3163 }
3164
3165 // SetCustomQuotaArg : has no documentation (yet)
3166 type SetCustomQuotaArg struct {
3167 // UsersAndQuotas : List of users and their custom quotas.
3168 UsersAndQuotas []*UserCustomQuotaArg `json:"users_and_quotas"`
3169 }
3170
3171 // NewSetCustomQuotaArg returns a new SetCustomQuotaArg instance
3172 func NewSetCustomQuotaArg(UsersAndQuotas []*UserCustomQuotaArg) *SetCustomQuotaArg {
3173 s := new(SetCustomQuotaArg)
3174 s.UsersAndQuotas = UsersAndQuotas
3175 return s
3176 }
3177
3178 // SetCustomQuotaError : Error returned when setting member custom quota.
3179 type SetCustomQuotaError struct {
3180 dropbox.Tagged
3181 }
3182
3183 // Valid tag values for SetCustomQuotaError
3184 const (
3185 SetCustomQuotaErrorTooManyUsers = "too_many_users"
3186 SetCustomQuotaErrorOther = "other"
3187 SetCustomQuotaErrorSomeUsersAreExcluded = "some_users_are_excluded"
3188 )
3189
3190 // StorageBucket : Describes the number of users in a specific storage bucket.
3191 type StorageBucket struct {
3192 // Bucket : The name of the storage bucket. For example, '1G' is a bucket of
3193 // users with storage size up to 1 Giga.
3194 Bucket string `json:"bucket"`
3195 // Users : The number of people whose storage is in the range of this
3196 // storage bucket.
3197 Users uint64 `json:"users"`
3198 }
3199
3200 // NewStorageBucket returns a new StorageBucket instance
3201 func NewStorageBucket(Bucket string, Users uint64) *StorageBucket {
3202 s := new(StorageBucket)
3203 s.Bucket = Bucket
3204 s.Users = Users
3205 return s
3206 }
3207
3208 // TeamFolderAccessError : has no documentation (yet)
3209 type TeamFolderAccessError struct {
3210 dropbox.Tagged
3211 }
3212
3213 // Valid tag values for TeamFolderAccessError
3214 const (
3215 TeamFolderAccessErrorInvalidTeamFolderId = "invalid_team_folder_id"
3216 TeamFolderAccessErrorNoAccess = "no_access"
3217 TeamFolderAccessErrorOther = "other"
3218 )
3219
3220 // TeamFolderActivateError :
3221 type TeamFolderActivateError struct {
3222 dropbox.Tagged
3223 // AccessError : has no documentation (yet)
3224 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
3225 // StatusError : has no documentation (yet)
3226 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
3227 // TeamSharedDropboxError : has no documentation (yet)
3228 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
3229 }
3230
3231 // Valid tag values for TeamFolderActivateError
3232 const (
3233 TeamFolderActivateErrorAccessError = "access_error"
3234 TeamFolderActivateErrorStatusError = "status_error"
3235 TeamFolderActivateErrorTeamSharedDropboxError = "team_shared_dropbox_error"
3236 TeamFolderActivateErrorOther = "other"
3237 )
3238
3239 // UnmarshalJSON deserializes into a TeamFolderActivateError instance
3240 func (u *TeamFolderActivateError) UnmarshalJSON(body []byte) error {
3241 type wrap struct {
3242 dropbox.Tagged
3243 // AccessError : has no documentation (yet)
3244 AccessError json.RawMessage `json:"access_error,omitempty"`
3245 // StatusError : has no documentation (yet)
3246 StatusError json.RawMessage `json:"status_error,omitempty"`
3247 // TeamSharedDropboxError : has no documentation (yet)
3248 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
3249 }
3250 var w wrap
3251 var err error
3252 if err = json.Unmarshal(body, &w); err != nil {
3253 return err
3254 }
3255 u.Tag = w.Tag
3256 switch u.Tag {
3257 case "access_error":
3258 err = json.Unmarshal(w.AccessError, &u.AccessError)
3259
3260 if err != nil {
3261 return err
3262 }
3263 case "status_error":
3264 err = json.Unmarshal(w.StatusError, &u.StatusError)
3265
3266 if err != nil {
3267 return err
3268 }
3269 case "team_shared_dropbox_error":
3270 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
3271
3272 if err != nil {
3273 return err
3274 }
3275 }
3276 return nil
3277 }
3278
3279 // TeamFolderIdArg : has no documentation (yet)
3280 type TeamFolderIdArg struct {
3281 // TeamFolderId : The ID of the team folder.
3282 TeamFolderId string `json:"team_folder_id"`
3283 }
3284
3285 // NewTeamFolderIdArg returns a new TeamFolderIdArg instance
3286 func NewTeamFolderIdArg(TeamFolderId string) *TeamFolderIdArg {
3287 s := new(TeamFolderIdArg)
3288 s.TeamFolderId = TeamFolderId
3289 return s
3290 }
3291
3292 // TeamFolderArchiveArg : has no documentation (yet)
3293 type TeamFolderArchiveArg struct {
3294 TeamFolderIdArg
3295 // ForceAsyncOff : Whether to force the archive to happen synchronously.
3296 ForceAsyncOff bool `json:"force_async_off"`
3297 }
3298
3299 // NewTeamFolderArchiveArg returns a new TeamFolderArchiveArg instance
3300 func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg {
3301 s := new(TeamFolderArchiveArg)
3302 s.TeamFolderId = TeamFolderId
3303 s.ForceAsyncOff = false
3304 return s
3305 }
3306
3307 // TeamFolderArchiveError :
3308 type TeamFolderArchiveError struct {
3309 dropbox.Tagged
3310 // AccessError : has no documentation (yet)
3311 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
3312 // StatusError : has no documentation (yet)
3313 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
3314 // TeamSharedDropboxError : has no documentation (yet)
3315 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
3316 }
3317
3318 // Valid tag values for TeamFolderArchiveError
3319 const (
3320 TeamFolderArchiveErrorAccessError = "access_error"
3321 TeamFolderArchiveErrorStatusError = "status_error"
3322 TeamFolderArchiveErrorTeamSharedDropboxError = "team_shared_dropbox_error"
3323 TeamFolderArchiveErrorOther = "other"
3324 )
3325
3326 // UnmarshalJSON deserializes into a TeamFolderArchiveError instance
3327 func (u *TeamFolderArchiveError) UnmarshalJSON(body []byte) error {
3328 type wrap struct {
3329 dropbox.Tagged
3330 // AccessError : has no documentation (yet)
3331 AccessError json.RawMessage `json:"access_error,omitempty"`
3332 // StatusError : has no documentation (yet)
3333 StatusError json.RawMessage `json:"status_error,omitempty"`
3334 // TeamSharedDropboxError : has no documentation (yet)
3335 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
3336 }
3337 var w wrap
3338 var err error
3339 if err = json.Unmarshal(body, &w); err != nil {
3340 return err
3341 }
3342 u.Tag = w.Tag
3343 switch u.Tag {
3344 case "access_error":
3345 err = json.Unmarshal(w.AccessError, &u.AccessError)
3346
3347 if err != nil {
3348 return err
3349 }
3350 case "status_error":
3351 err = json.Unmarshal(w.StatusError, &u.StatusError)
3352
3353 if err != nil {
3354 return err
3355 }
3356 case "team_shared_dropbox_error":
3357 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
3358
3359 if err != nil {
3360 return err
3361 }
3362 }
3363 return nil
3364 }
3365
3366 // TeamFolderArchiveJobStatus : has no documentation (yet)
3367 type TeamFolderArchiveJobStatus struct {
3368 dropbox.Tagged
3369 // Complete : The archive job has finished. The value is the metadata for
3370 // the resulting team folder.
3371 Complete *TeamFolderMetadata `json:"complete,omitempty"`
3372 // Failed : Error occurred while performing an asynchronous job from
3373 // `teamFolderArchive`.
3374 Failed *TeamFolderArchiveError `json:"failed,omitempty"`
3375 }
3376
3377 // Valid tag values for TeamFolderArchiveJobStatus
3378 const (
3379 TeamFolderArchiveJobStatusInProgress = "in_progress"
3380 TeamFolderArchiveJobStatusComplete = "complete"
3381 TeamFolderArchiveJobStatusFailed = "failed"
3382 )
3383
3384 // UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance
3385 func (u *TeamFolderArchiveJobStatus) UnmarshalJSON(body []byte) error {
3386 type wrap struct {
3387 dropbox.Tagged
3388 // Complete : The archive job has finished. The value is the metadata
3389 // for the resulting team folder.
3390 Complete json.RawMessage `json:"complete,omitempty"`
3391 // Failed : Error occurred while performing an asynchronous job from
3392 // `teamFolderArchive`.
3393 Failed json.RawMessage `json:"failed,omitempty"`
3394 }
3395 var w wrap
3396 var err error
3397 if err = json.Unmarshal(body, &w); err != nil {
3398 return err
3399 }
3400 u.Tag = w.Tag
3401 switch u.Tag {
3402 case "complete":
3403 err = json.Unmarshal(body, &u.Complete)
3404
3405 if err != nil {
3406 return err
3407 }
3408 case "failed":
3409 err = json.Unmarshal(w.Failed, &u.Failed)
3410
3411 if err != nil {
3412 return err
3413 }
3414 }
3415 return nil
3416 }
3417
3418 // TeamFolderArchiveLaunch : has no documentation (yet)
3419 type TeamFolderArchiveLaunch struct {
3420 dropbox.Tagged
3421 // AsyncJobId : This response indicates that the processing is asynchronous.
3422 // The string is an id that can be used to obtain the status of the
3423 // asynchronous job.
3424 AsyncJobId string `json:"async_job_id,omitempty"`
3425 // Complete : has no documentation (yet)
3426 Complete *TeamFolderMetadata `json:"complete,omitempty"`
3427 }
3428
3429 // Valid tag values for TeamFolderArchiveLaunch
3430 const (
3431 TeamFolderArchiveLaunchAsyncJobId = "async_job_id"
3432 TeamFolderArchiveLaunchComplete = "complete"
3433 )
3434
3435 // UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance
3436 func (u *TeamFolderArchiveLaunch) UnmarshalJSON(body []byte) error {
3437 type wrap struct {
3438 dropbox.Tagged
3439 // Complete : has no documentation (yet)
3440 Complete json.RawMessage `json:"complete,omitempty"`
3441 }
3442 var w wrap
3443 var err error
3444 if err = json.Unmarshal(body, &w); err != nil {
3445 return err
3446 }
3447 u.Tag = w.Tag
3448 switch u.Tag {
3449 case "async_job_id":
3450 err = json.Unmarshal(body, &u.AsyncJobId)
3451
3452 if err != nil {
3453 return err
3454 }
3455 case "complete":
3456 err = json.Unmarshal(body, &u.Complete)
3457
3458 if err != nil {
3459 return err
3460 }
3461 }
3462 return nil
3463 }
3464
3465 // TeamFolderCreateArg : has no documentation (yet)
3466 type TeamFolderCreateArg struct {
3467 // Name : Name for the new team folder.
3468 Name string `json:"name"`
3469 // SyncSetting : The sync setting to apply to this team folder. Only
3470 // permitted if the team has team selective sync enabled.
3471 SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"`
3472 }
3473
3474 // NewTeamFolderCreateArg returns a new TeamFolderCreateArg instance
3475 func NewTeamFolderCreateArg(Name string) *TeamFolderCreateArg {
3476 s := new(TeamFolderCreateArg)
3477 s.Name = Name
3478 return s
3479 }
3480
3481 // TeamFolderCreateError : has no documentation (yet)
3482 type TeamFolderCreateError struct {
3483 dropbox.Tagged
3484 // SyncSettingsError : An error occurred setting the sync settings.
3485 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
3486 }
3487
3488 // Valid tag values for TeamFolderCreateError
3489 const (
3490 TeamFolderCreateErrorInvalidFolderName = "invalid_folder_name"
3491 TeamFolderCreateErrorFolderNameAlreadyUsed = "folder_name_already_used"
3492 TeamFolderCreateErrorFolderNameReserved = "folder_name_reserved"
3493 TeamFolderCreateErrorSyncSettingsError = "sync_settings_error"
3494 TeamFolderCreateErrorOther = "other"
3495 )
3496
3497 // UnmarshalJSON deserializes into a TeamFolderCreateError instance
3498 func (u *TeamFolderCreateError) UnmarshalJSON(body []byte) error {
3499 type wrap struct {
3500 dropbox.Tagged
3501 // SyncSettingsError : An error occurred setting the sync settings.
3502 SyncSettingsError json.RawMessage `json:"sync_settings_error,omitempty"`
3503 }
3504 var w wrap
3505 var err error
3506 if err = json.Unmarshal(body, &w); err != nil {
3507 return err
3508 }
3509 u.Tag = w.Tag
3510 switch u.Tag {
3511 case "sync_settings_error":
3512 err = json.Unmarshal(w.SyncSettingsError, &u.SyncSettingsError)
3513
3514 if err != nil {
3515 return err
3516 }
3517 }
3518 return nil
3519 }
3520
3521 // TeamFolderGetInfoItem : has no documentation (yet)
3522 type TeamFolderGetInfoItem struct {
3523 dropbox.Tagged
3524 // IdNotFound : An ID that was provided as a parameter to
3525 // `teamFolderGetInfo` did not match any of the team's team folders.
3526 IdNotFound string `json:"id_not_found,omitempty"`
3527 // TeamFolderMetadata : Properties of a team folder.
3528 TeamFolderMetadata *TeamFolderMetadata `json:"team_folder_metadata,omitempty"`
3529 }
3530
3531 // Valid tag values for TeamFolderGetInfoItem
3532 const (
3533 TeamFolderGetInfoItemIdNotFound = "id_not_found"
3534 TeamFolderGetInfoItemTeamFolderMetadata = "team_folder_metadata"
3535 )
3536
3537 // UnmarshalJSON deserializes into a TeamFolderGetInfoItem instance
3538 func (u *TeamFolderGetInfoItem) UnmarshalJSON(body []byte) error {
3539 type wrap struct {
3540 dropbox.Tagged
3541 // TeamFolderMetadata : Properties of a team folder.
3542 TeamFolderMetadata json.RawMessage `json:"team_folder_metadata,omitempty"`
3543 }
3544 var w wrap
3545 var err error
3546 if err = json.Unmarshal(body, &w); err != nil {
3547 return err
3548 }
3549 u.Tag = w.Tag
3550 switch u.Tag {
3551 case "id_not_found":
3552 err = json.Unmarshal(body, &u.IdNotFound)
3553
3554 if err != nil {
3555 return err
3556 }
3557 case "team_folder_metadata":
3558 err = json.Unmarshal(body, &u.TeamFolderMetadata)
3559
3560 if err != nil {
3561 return err
3562 }
3563 }
3564 return nil
3565 }
3566
3567 // TeamFolderIdListArg : has no documentation (yet)
3568 type TeamFolderIdListArg struct {
3569 // TeamFolderIds : The list of team folder IDs.
3570 TeamFolderIds []string `json:"team_folder_ids"`
3571 }
3572
3573 // NewTeamFolderIdListArg returns a new TeamFolderIdListArg instance
3574 func NewTeamFolderIdListArg(TeamFolderIds []string) *TeamFolderIdListArg {
3575 s := new(TeamFolderIdListArg)
3576 s.TeamFolderIds = TeamFolderIds
3577 return s
3578 }
3579
3580 // TeamFolderInvalidStatusError : has no documentation (yet)
3581 type TeamFolderInvalidStatusError struct {
3582 dropbox.Tagged
3583 }
3584
3585 // Valid tag values for TeamFolderInvalidStatusError
3586 const (
3587 TeamFolderInvalidStatusErrorActive = "active"
3588 TeamFolderInvalidStatusErrorArchived = "archived"
3589 TeamFolderInvalidStatusErrorArchiveInProgress = "archive_in_progress"
3590 TeamFolderInvalidStatusErrorOther = "other"
3591 )
3592
3593 // TeamFolderListArg : has no documentation (yet)
3594 type TeamFolderListArg struct {
3595 // Limit : The maximum number of results to return per request.
3596 Limit uint32 `json:"limit"`
3597 }
3598
3599 // NewTeamFolderListArg returns a new TeamFolderListArg instance
3600 func NewTeamFolderListArg() *TeamFolderListArg {
3601 s := new(TeamFolderListArg)
3602 s.Limit = 1000
3603 return s
3604 }
3605
3606 // TeamFolderListContinueArg : has no documentation (yet)
3607 type TeamFolderListContinueArg struct {
3608 // Cursor : Indicates from what point to get the next set of team folders.
3609 Cursor string `json:"cursor"`
3610 }
3611
3612 // NewTeamFolderListContinueArg returns a new TeamFolderListContinueArg instance
3613 func NewTeamFolderListContinueArg(Cursor string) *TeamFolderListContinueArg {
3614 s := new(TeamFolderListContinueArg)
3615 s.Cursor = Cursor
3616 return s
3617 }
3618
3619 // TeamFolderListContinueError : has no documentation (yet)
3620 type TeamFolderListContinueError struct {
3621 dropbox.Tagged
3622 }
3623
3624 // Valid tag values for TeamFolderListContinueError
3625 const (
3626 TeamFolderListContinueErrorInvalidCursor = "invalid_cursor"
3627 TeamFolderListContinueErrorOther = "other"
3628 )
3629
3630 // TeamFolderListError : has no documentation (yet)
3631 type TeamFolderListError struct {
3632 // AccessError : has no documentation (yet)
3633 AccessError *TeamFolderAccessError `json:"access_error"`
3634 }
3635
3636 // NewTeamFolderListError returns a new TeamFolderListError instance
3637 func NewTeamFolderListError(AccessError *TeamFolderAccessError) *TeamFolderListError {
3638 s := new(TeamFolderListError)
3639 s.AccessError = AccessError
3640 return s
3641 }
3642
3643 // TeamFolderListResult : Result for `teamFolderList` and
3644 // `teamFolderListContinue`.
3645 type TeamFolderListResult struct {
3646 // TeamFolders : List of all team folders in the authenticated team.
3647 TeamFolders []*TeamFolderMetadata `json:"team_folders"`
3648 // Cursor : Pass the cursor into `teamFolderListContinue` to obtain
3649 // additional team folders.
3650 Cursor string `json:"cursor"`
3651 // HasMore : Is true if there are additional team folders that have not been
3652 // returned yet. An additional call to `teamFolderListContinue` can retrieve
3653 // them.
3654 HasMore bool `json:"has_more"`
3655 }
3656
3657 // NewTeamFolderListResult returns a new TeamFolderListResult instance
3658 func NewTeamFolderListResult(TeamFolders []*TeamFolderMetadata, Cursor string, HasMore bool) *TeamFolderListResult {
3659 s := new(TeamFolderListResult)
3660 s.TeamFolders = TeamFolders
3661 s.Cursor = Cursor
3662 s.HasMore = HasMore
3663 return s
3664 }
3665
3666 // TeamFolderMetadata : Properties of a team folder.
3667 type TeamFolderMetadata struct {
3668 // TeamFolderId : The ID of the team folder.
3669 TeamFolderId string `json:"team_folder_id"`
3670 // Name : The name of the team folder.
3671 Name string `json:"name"`
3672 // Status : The status of the team folder.
3673 Status *TeamFolderStatus `json:"status"`
3674 // IsTeamSharedDropbox : True if this team folder is a shared team root.
3675 IsTeamSharedDropbox bool `json:"is_team_shared_dropbox"`
3676 // SyncSetting : The sync setting applied to this team folder.
3677 SyncSetting *files.SyncSetting `json:"sync_setting"`
3678 // ContentSyncSettings : Sync settings applied to contents of this team
3679 // folder.
3680 ContentSyncSettings []*files.ContentSyncSetting `json:"content_sync_settings"`
3681 }
3682
3683 // NewTeamFolderMetadata returns a new TeamFolderMetadata instance
3684 func NewTeamFolderMetadata(TeamFolderId string, Name string, Status *TeamFolderStatus, IsTeamSharedDropbox bool, SyncSetting *files.SyncSetting, ContentSyncSettings []*files.ContentSyncSetting) *TeamFolderMetadata {
3685 s := new(TeamFolderMetadata)
3686 s.TeamFolderId = TeamFolderId
3687 s.Name = Name
3688 s.Status = Status
3689 s.IsTeamSharedDropbox = IsTeamSharedDropbox
3690 s.SyncSetting = SyncSetting
3691 s.ContentSyncSettings = ContentSyncSettings
3692 return s
3693 }
3694
3695 // TeamFolderPermanentlyDeleteError :
3696 type TeamFolderPermanentlyDeleteError struct {
3697 dropbox.Tagged
3698 // AccessError : has no documentation (yet)
3699 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
3700 // StatusError : has no documentation (yet)
3701 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
3702 // TeamSharedDropboxError : has no documentation (yet)
3703 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
3704 }
3705
3706 // Valid tag values for TeamFolderPermanentlyDeleteError
3707 const (
3708 TeamFolderPermanentlyDeleteErrorAccessError = "access_error"
3709 TeamFolderPermanentlyDeleteErrorStatusError = "status_error"
3710 TeamFolderPermanentlyDeleteErrorTeamSharedDropboxError = "team_shared_dropbox_error"
3711 TeamFolderPermanentlyDeleteErrorOther = "other"
3712 )
3713
3714 // UnmarshalJSON deserializes into a TeamFolderPermanentlyDeleteError instance
3715 func (u *TeamFolderPermanentlyDeleteError) UnmarshalJSON(body []byte) error {
3716 type wrap struct {
3717 dropbox.Tagged
3718 // AccessError : has no documentation (yet)
3719 AccessError json.RawMessage `json:"access_error,omitempty"`
3720 // StatusError : has no documentation (yet)
3721 StatusError json.RawMessage `json:"status_error,omitempty"`
3722 // TeamSharedDropboxError : has no documentation (yet)
3723 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
3724 }
3725 var w wrap
3726 var err error
3727 if err = json.Unmarshal(body, &w); err != nil {
3728 return err
3729 }
3730 u.Tag = w.Tag
3731 switch u.Tag {
3732 case "access_error":
3733 err = json.Unmarshal(w.AccessError, &u.AccessError)
3734
3735 if err != nil {
3736 return err
3737 }
3738 case "status_error":
3739 err = json.Unmarshal(w.StatusError, &u.StatusError)
3740
3741 if err != nil {
3742 return err
3743 }
3744 case "team_shared_dropbox_error":
3745 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
3746
3747 if err != nil {
3748 return err
3749 }
3750 }
3751 return nil
3752 }
3753
3754 // TeamFolderRenameArg : has no documentation (yet)
3755 type TeamFolderRenameArg struct {
3756 TeamFolderIdArg
3757 // Name : New team folder name.
3758 Name string `json:"name"`
3759 }
3760
3761 // NewTeamFolderRenameArg returns a new TeamFolderRenameArg instance
3762 func NewTeamFolderRenameArg(TeamFolderId string, Name string) *TeamFolderRenameArg {
3763 s := new(TeamFolderRenameArg)
3764 s.TeamFolderId = TeamFolderId
3765 s.Name = Name
3766 return s
3767 }
3768
3769 // TeamFolderRenameError : has no documentation (yet)
3770 type TeamFolderRenameError struct {
3771 dropbox.Tagged
3772 // AccessError : has no documentation (yet)
3773 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
3774 // StatusError : has no documentation (yet)
3775 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
3776 // TeamSharedDropboxError : has no documentation (yet)
3777 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
3778 }
3779
3780 // Valid tag values for TeamFolderRenameError
3781 const (
3782 TeamFolderRenameErrorAccessError = "access_error"
3783 TeamFolderRenameErrorStatusError = "status_error"
3784 TeamFolderRenameErrorTeamSharedDropboxError = "team_shared_dropbox_error"
3785 TeamFolderRenameErrorOther = "other"
3786 TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name"
3787 TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used"
3788 TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved"
3789 )
3790
3791 // UnmarshalJSON deserializes into a TeamFolderRenameError instance
3792 func (u *TeamFolderRenameError) UnmarshalJSON(body []byte) error {
3793 type wrap struct {
3794 dropbox.Tagged
3795 // AccessError : has no documentation (yet)
3796 AccessError json.RawMessage `json:"access_error,omitempty"`
3797 // StatusError : has no documentation (yet)
3798 StatusError json.RawMessage `json:"status_error,omitempty"`
3799 // TeamSharedDropboxError : has no documentation (yet)
3800 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
3801 }
3802 var w wrap
3803 var err error
3804 if err = json.Unmarshal(body, &w); err != nil {
3805 return err
3806 }
3807 u.Tag = w.Tag
3808 switch u.Tag {
3809 case "access_error":
3810 err = json.Unmarshal(w.AccessError, &u.AccessError)
3811
3812 if err != nil {
3813 return err
3814 }
3815 case "status_error":
3816 err = json.Unmarshal(w.StatusError, &u.StatusError)
3817
3818 if err != nil {
3819 return err
3820 }
3821 case "team_shared_dropbox_error":
3822 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
3823
3824 if err != nil {
3825 return err
3826 }
3827 }
3828 return nil
3829 }
3830
3831 // TeamFolderStatus : has no documentation (yet)
3832 type TeamFolderStatus struct {
3833 dropbox.Tagged
3834 }
3835
3836 // Valid tag values for TeamFolderStatus
3837 const (
3838 TeamFolderStatusActive = "active"
3839 TeamFolderStatusArchived = "archived"
3840 TeamFolderStatusArchiveInProgress = "archive_in_progress"
3841 TeamFolderStatusOther = "other"
3842 )
3843
3844 // TeamFolderTeamSharedDropboxError : has no documentation (yet)
3845 type TeamFolderTeamSharedDropboxError struct {
3846 dropbox.Tagged
3847 }
3848
3849 // Valid tag values for TeamFolderTeamSharedDropboxError
3850 const (
3851 TeamFolderTeamSharedDropboxErrorDisallowed = "disallowed"
3852 TeamFolderTeamSharedDropboxErrorOther = "other"
3853 )
3854
3855 // TeamFolderUpdateSyncSettingsArg : has no documentation (yet)
3856 type TeamFolderUpdateSyncSettingsArg struct {
3857 TeamFolderIdArg
3858 // SyncSetting : Sync setting to apply to the team folder itself. Only
3859 // meaningful if the team folder is not a shared team root.
3860 SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"`
3861 // ContentSyncSettings : Sync settings to apply to contents of this team
3862 // folder.
3863 ContentSyncSettings []*files.ContentSyncSettingArg `json:"content_sync_settings,omitempty"`
3864 }
3865
3866 // NewTeamFolderUpdateSyncSettingsArg returns a new TeamFolderUpdateSyncSettingsArg instance
3867 func NewTeamFolderUpdateSyncSettingsArg(TeamFolderId string) *TeamFolderUpdateSyncSettingsArg {
3868 s := new(TeamFolderUpdateSyncSettingsArg)
3869 s.TeamFolderId = TeamFolderId
3870 return s
3871 }
3872
3873 // TeamFolderUpdateSyncSettingsError : has no documentation (yet)
3874 type TeamFolderUpdateSyncSettingsError struct {
3875 dropbox.Tagged
3876 // AccessError : has no documentation (yet)
3877 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
3878 // StatusError : has no documentation (yet)
3879 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
3880 // TeamSharedDropboxError : has no documentation (yet)
3881 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
3882 // SyncSettingsError : An error occurred setting the sync settings.
3883 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
3884 }
3885
3886 // Valid tag values for TeamFolderUpdateSyncSettingsError
3887 const (
3888 TeamFolderUpdateSyncSettingsErrorAccessError = "access_error"
3889 TeamFolderUpdateSyncSettingsErrorStatusError = "status_error"
3890 TeamFolderUpdateSyncSettingsErrorTeamSharedDropboxError = "team_shared_dropbox_error"
3891 TeamFolderUpdateSyncSettingsErrorOther = "other"
3892 TeamFolderUpdateSyncSettingsErrorSyncSettingsError = "sync_settings_error"
3893 )
3894
3895 // UnmarshalJSON deserializes into a TeamFolderUpdateSyncSettingsError instance
3896 func (u *TeamFolderUpdateSyncSettingsError) UnmarshalJSON(body []byte) error {
3897 type wrap struct {
3898 dropbox.Tagged
3899 // AccessError : has no documentation (yet)
3900 AccessError json.RawMessage `json:"access_error,omitempty"`
3901 // StatusError : has no documentation (yet)
3902 StatusError json.RawMessage `json:"status_error,omitempty"`
3903 // TeamSharedDropboxError : has no documentation (yet)
3904 TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"`
3905 // SyncSettingsError : An error occurred setting the sync settings.
3906 SyncSettingsError json.RawMessage `json:"sync_settings_error,omitempty"`
3907 }
3908 var w wrap
3909 var err error
3910 if err = json.Unmarshal(body, &w); err != nil {
3911 return err
3912 }
3913 u.Tag = w.Tag
3914 switch u.Tag {
3915 case "access_error":
3916 err = json.Unmarshal(w.AccessError, &u.AccessError)
3917
3918 if err != nil {
3919 return err
3920 }
3921 case "status_error":
3922 err = json.Unmarshal(w.StatusError, &u.StatusError)
3923
3924 if err != nil {
3925 return err
3926 }
3927 case "team_shared_dropbox_error":
3928 err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError)
3929
3930 if err != nil {
3931 return err
3932 }
3933 case "sync_settings_error":
3934 err = json.Unmarshal(w.SyncSettingsError, &u.SyncSettingsError)
3935
3936 if err != nil {
3937 return err
3938 }
3939 }
3940 return nil
3941 }
3942
3943 // TeamGetInfoResult : has no documentation (yet)
3944 type TeamGetInfoResult struct {
3945 // Name : The name of the team.
3946 Name string `json:"name"`
3947 // TeamId : The ID of the team.
3948 TeamId string `json:"team_id"`
3949 // NumLicensedUsers : The number of licenses available to the team.
3950 NumLicensedUsers uint32 `json:"num_licensed_users"`
3951 // NumProvisionedUsers : The number of accounts that have been invited or
3952 // are already active members of the team.
3953 NumProvisionedUsers uint32 `json:"num_provisioned_users"`
3954 // Policies : has no documentation (yet)
3955 Policies *team_policies.TeamMemberPolicies `json:"policies"`
3956 }
3957
3958 // NewTeamGetInfoResult returns a new TeamGetInfoResult instance
3959 func NewTeamGetInfoResult(Name string, TeamId string, NumLicensedUsers uint32, NumProvisionedUsers uint32, Policies *team_policies.TeamMemberPolicies) *TeamGetInfoResult {
3960 s := new(TeamGetInfoResult)
3961 s.Name = Name
3962 s.TeamId = TeamId
3963 s.NumLicensedUsers = NumLicensedUsers
3964 s.NumProvisionedUsers = NumProvisionedUsers
3965 s.Policies = Policies
3966 return s
3967 }
3968
3969 // TeamMemberInfo : Information about a team member.
3970 type TeamMemberInfo struct {
3971 // Profile : Profile of a user as a member of a team.
3972 Profile *TeamMemberProfile `json:"profile"`
3973 // Role : The user's role in the team.
3974 Role *AdminTier `json:"role"`
3975 }
3976
3977 // NewTeamMemberInfo returns a new TeamMemberInfo instance
3978 func NewTeamMemberInfo(Profile *TeamMemberProfile, Role *AdminTier) *TeamMemberInfo {
3979 s := new(TeamMemberInfo)
3980 s.Profile = Profile
3981 s.Role = Role
3982 return s
3983 }
3984
3985 // TeamMemberProfile : Profile of a user as a member of a team.
3986 type TeamMemberProfile struct {
3987 MemberProfile
3988 // Groups : List of group IDs of groups that the user belongs to.
3989 Groups []string `json:"groups"`
3990 // MemberFolderId : The namespace id of the user's root folder.
3991 MemberFolderId string `json:"member_folder_id"`
3992 }
3993
3994 // NewTeamMemberProfile returns a new TeamMemberProfile instance
3995 func NewTeamMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType, Groups []string, MemberFolderId string) *TeamMemberProfile {
3996 s := new(TeamMemberProfile)
3997 s.TeamMemberId = TeamMemberId
3998 s.Email = Email
3999 s.EmailVerified = EmailVerified
4000 s.Status = Status
4001 s.Name = Name
4002 s.MembershipType = MembershipType
4003 s.Groups = Groups
4004 s.MemberFolderId = MemberFolderId
4005 return s
4006 }
4007
4008 // TeamMemberStatus : The user's status as a member of a specific team.
4009 type TeamMemberStatus struct {
4010 dropbox.Tagged
4011 // Removed : User is no longer a member of the team. Removed users are only
4012 // listed when include_removed is true in members/list.
4013 Removed *RemovedStatus `json:"removed,omitempty"`
4014 }
4015
4016 // Valid tag values for TeamMemberStatus
4017 const (
4018 TeamMemberStatusActive = "active"
4019 TeamMemberStatusInvited = "invited"
4020 TeamMemberStatusSuspended = "suspended"
4021 TeamMemberStatusRemoved = "removed"
4022 )
4023
4024 // UnmarshalJSON deserializes into a TeamMemberStatus instance
4025 func (u *TeamMemberStatus) UnmarshalJSON(body []byte) error {
4026 type wrap struct {
4027 dropbox.Tagged
4028 // Removed : User is no longer a member of the team. Removed users are
4029 // only listed when include_removed is true in members/list.
4030 Removed json.RawMessage `json:"removed,omitempty"`
4031 }
4032 var w wrap
4033 var err error
4034 if err = json.Unmarshal(body, &w); err != nil {
4035 return err
4036 }
4037 u.Tag = w.Tag
4038 switch u.Tag {
4039 case "removed":
4040 err = json.Unmarshal(body, &u.Removed)
4041
4042 if err != nil {
4043 return err
4044 }
4045 }
4046 return nil
4047 }
4048
4049 // TeamMembershipType : has no documentation (yet)
4050 type TeamMembershipType struct {
4051 dropbox.Tagged
4052 }
4053
4054 // Valid tag values for TeamMembershipType
4055 const (
4056 TeamMembershipTypeFull = "full"
4057 TeamMembershipTypeLimited = "limited"
4058 )
4059
4060 // TeamNamespacesListArg : has no documentation (yet)
4061 type TeamNamespacesListArg struct {
4062 // Limit : Specifying a value here has no effect.
4063 Limit uint32 `json:"limit"`
4064 }
4065
4066 // NewTeamNamespacesListArg returns a new TeamNamespacesListArg instance
4067 func NewTeamNamespacesListArg() *TeamNamespacesListArg {
4068 s := new(TeamNamespacesListArg)
4069 s.Limit = 1000
4070 return s
4071 }
4072
4073 // TeamNamespacesListContinueArg : has no documentation (yet)
4074 type TeamNamespacesListContinueArg struct {
4075 // Cursor : Indicates from what point to get the next set of team-accessible
4076 // namespaces.
4077 Cursor string `json:"cursor"`
4078 }
4079
4080 // NewTeamNamespacesListContinueArg returns a new TeamNamespacesListContinueArg instance
4081 func NewTeamNamespacesListContinueArg(Cursor string) *TeamNamespacesListContinueArg {
4082 s := new(TeamNamespacesListContinueArg)
4083 s.Cursor = Cursor
4084 return s
4085 }
4086
4087 // TeamNamespacesListError : has no documentation (yet)
4088 type TeamNamespacesListError struct {
4089 dropbox.Tagged
4090 }
4091
4092 // Valid tag values for TeamNamespacesListError
4093 const (
4094 TeamNamespacesListErrorInvalidArg = "invalid_arg"
4095 TeamNamespacesListErrorOther = "other"
4096 )
4097
4098 // TeamNamespacesListContinueError : has no documentation (yet)
4099 type TeamNamespacesListContinueError struct {
4100 dropbox.Tagged
4101 }
4102
4103 // Valid tag values for TeamNamespacesListContinueError
4104 const (
4105 TeamNamespacesListContinueErrorInvalidArg = "invalid_arg"
4106 TeamNamespacesListContinueErrorOther = "other"
4107 TeamNamespacesListContinueErrorInvalidCursor = "invalid_cursor"
4108 )
4109
4110 // TeamNamespacesListResult : Result for `namespacesList`.
4111 type TeamNamespacesListResult struct {
4112 // Namespaces : List of all namespaces the team can access.
4113 Namespaces []*NamespaceMetadata `json:"namespaces"`
4114 // Cursor : Pass the cursor into `namespacesListContinue` to obtain
4115 // additional namespaces. Note that duplicate namespaces may be returned.
4116 Cursor string `json:"cursor"`
4117 // HasMore : Is true if there are additional namespaces that have not been
4118 // returned yet.
4119 HasMore bool `json:"has_more"`
4120 }
4121
4122 // NewTeamNamespacesListResult returns a new TeamNamespacesListResult instance
4123 func NewTeamNamespacesListResult(Namespaces []*NamespaceMetadata, Cursor string, HasMore bool) *TeamNamespacesListResult {
4124 s := new(TeamNamespacesListResult)
4125 s.Namespaces = Namespaces
4126 s.Cursor = Cursor
4127 s.HasMore = HasMore
4128 return s
4129 }
4130
4131 // TokenGetAuthenticatedAdminError : Error returned by
4132 // `tokenGetAuthenticatedAdmin`.
4133 type TokenGetAuthenticatedAdminError struct {
4134 dropbox.Tagged
4135 }
4136
4137 // Valid tag values for TokenGetAuthenticatedAdminError
4138 const (
4139 TokenGetAuthenticatedAdminErrorMappingNotFound = "mapping_not_found"
4140 TokenGetAuthenticatedAdminErrorAdminNotActive = "admin_not_active"
4141 TokenGetAuthenticatedAdminErrorOther = "other"
4142 )
4143
4144 // TokenGetAuthenticatedAdminResult : Results for `tokenGetAuthenticatedAdmin`.
4145 type TokenGetAuthenticatedAdminResult struct {
4146 // AdminProfile : The admin who authorized the token.
4147 AdminProfile *TeamMemberProfile `json:"admin_profile"`
4148 }
4149
4150 // NewTokenGetAuthenticatedAdminResult returns a new TokenGetAuthenticatedAdminResult instance
4151 func NewTokenGetAuthenticatedAdminResult(AdminProfile *TeamMemberProfile) *TokenGetAuthenticatedAdminResult {
4152 s := new(TokenGetAuthenticatedAdminResult)
4153 s.AdminProfile = AdminProfile
4154 return s
4155 }
4156
4157 // UploadApiRateLimitValue : The value for `Feature.upload_api_rate_limit`.
4158 type UploadApiRateLimitValue struct {
4159 dropbox.Tagged
4160 // Limit : The number of upload API calls allowed per month.
4161 Limit uint32 `json:"limit,omitempty"`
4162 }
4163
4164 // Valid tag values for UploadApiRateLimitValue
4165 const (
4166 UploadApiRateLimitValueUnlimited = "unlimited"
4167 UploadApiRateLimitValueLimit = "limit"
4168 UploadApiRateLimitValueOther = "other"
4169 )
4170
4171 // UnmarshalJSON deserializes into a UploadApiRateLimitValue instance
4172 func (u *UploadApiRateLimitValue) UnmarshalJSON(body []byte) error {
4173 type wrap struct {
4174 dropbox.Tagged
4175 }
4176 var w wrap
4177 var err error
4178 if err = json.Unmarshal(body, &w); err != nil {
4179 return err
4180 }
4181 u.Tag = w.Tag
4182 switch u.Tag {
4183 case "limit":
4184 err = json.Unmarshal(body, &u.Limit)
4185
4186 if err != nil {
4187 return err
4188 }
4189 }
4190 return nil
4191 }
4192
4193 // UserCustomQuotaArg : User and their required custom quota in GB (1 TB = 1024
4194 // GB).
4195 type UserCustomQuotaArg struct {
4196 // User : has no documentation (yet)
4197 User *UserSelectorArg `json:"user"`
4198 // QuotaGb : has no documentation (yet)
4199 QuotaGb uint32 `json:"quota_gb"`
4200 }
4201
4202 // NewUserCustomQuotaArg returns a new UserCustomQuotaArg instance
4203 func NewUserCustomQuotaArg(User *UserSelectorArg, QuotaGb uint32) *UserCustomQuotaArg {
4204 s := new(UserCustomQuotaArg)
4205 s.User = User
4206 s.QuotaGb = QuotaGb
4207 return s
4208 }
4209
4210 // UserCustomQuotaResult : User and their custom quota in GB (1 TB = 1024 GB).
4211 // No quota returns if the user has no custom quota set.
4212 type UserCustomQuotaResult struct {
4213 // User : has no documentation (yet)
4214 User *UserSelectorArg `json:"user"`
4215 // QuotaGb : has no documentation (yet)
4216 QuotaGb uint32 `json:"quota_gb,omitempty"`
4217 }
4218
4219 // NewUserCustomQuotaResult returns a new UserCustomQuotaResult instance
4220 func NewUserCustomQuotaResult(User *UserSelectorArg) *UserCustomQuotaResult {
4221 s := new(UserCustomQuotaResult)
4222 s.User = User
4223 return s
4224 }
4225
4226 // UserSelectorArg : Argument for selecting a single user, either by
4227 // team_member_id, external_id or email.
4228 type UserSelectorArg struct {
4229 dropbox.Tagged
4230 // TeamMemberId : has no documentation (yet)
4231 TeamMemberId string `json:"team_member_id,omitempty"`
4232 // ExternalId : has no documentation (yet)
4233 ExternalId string `json:"external_id,omitempty"`
4234 // Email : has no documentation (yet)
4235 Email string `json:"email,omitempty"`
4236 }
4237
4238 // Valid tag values for UserSelectorArg
4239 const (
4240 UserSelectorArgTeamMemberId = "team_member_id"
4241 UserSelectorArgExternalId = "external_id"
4242 UserSelectorArgEmail = "email"
4243 )
4244
4245 // UnmarshalJSON deserializes into a UserSelectorArg instance
4246 func (u *UserSelectorArg) UnmarshalJSON(body []byte) error {
4247 type wrap struct {
4248 dropbox.Tagged
4249 }
4250 var w wrap
4251 var err error
4252 if err = json.Unmarshal(body, &w); err != nil {
4253 return err
4254 }
4255 u.Tag = w.Tag
4256 switch u.Tag {
4257 case "team_member_id":
4258 err = json.Unmarshal(body, &u.TeamMemberId)
4259
4260 if err != nil {
4261 return err
4262 }
4263 case "external_id":
4264 err = json.Unmarshal(body, &u.ExternalId)
4265
4266 if err != nil {
4267 return err
4268 }
4269 case "email":
4270 err = json.Unmarshal(body, &u.Email)
4271
4272 if err != nil {
4273 return err
4274 }
4275 }
4276 return nil
4277 }
4278
4279 // UsersSelectorArg : Argument for selecting a list of users, either by
4280 // team_member_ids, external_ids or emails.
4281 type UsersSelectorArg struct {
4282 dropbox.Tagged
4283 // TeamMemberIds : List of member IDs.
4284 TeamMemberIds []string `json:"team_member_ids,omitempty"`
4285 // ExternalIds : List of external user IDs.
4286 ExternalIds []string `json:"external_ids,omitempty"`
4287 // Emails : List of email addresses.
4288 Emails []string `json:"emails,omitempty"`
4289 }
4290
4291 // Valid tag values for UsersSelectorArg
4292 const (
4293 UsersSelectorArgTeamMemberIds = "team_member_ids"
4294 UsersSelectorArgExternalIds = "external_ids"
4295 UsersSelectorArgEmails = "emails"
4296 )
4297
4298 // UnmarshalJSON deserializes into a UsersSelectorArg instance
4299 func (u *UsersSelectorArg) UnmarshalJSON(body []byte) error {
4300 type wrap struct {
4301 dropbox.Tagged
4302 // TeamMemberIds : List of member IDs.
4303 TeamMemberIds json.RawMessage `json:"team_member_ids,omitempty"`
4304 // ExternalIds : List of external user IDs.
4305 ExternalIds json.RawMessage `json:"external_ids,omitempty"`
4306 // Emails : List of email addresses.
4307 Emails json.RawMessage `json:"emails,omitempty"`
4308 }
4309 var w wrap
4310 var err error
4311 if err = json.Unmarshal(body, &w); err != nil {
4312 return err
4313 }
4314 u.Tag = w.Tag
4315 switch u.Tag {
4316 case "team_member_ids":
4317 err = json.Unmarshal(body, &u.TeamMemberIds)
4318
4319 if err != nil {
4320 return err
4321 }
4322 case "external_ids":
4323 err = json.Unmarshal(body, &u.ExternalIds)
4324
4325 if err != nil {
4326 return err
4327 }
4328 case "emails":
4329 err = json.Unmarshal(body, &u.Emails)
4330
4331 if err != nil {
4332 return err
4333 }
4334 }
4335 return nil
4336 }
+0
-104
dropbox/team_common/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_common : has no documentation (yet)
21 package team_common
22
23 import (
24 "time"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27 )
28
29 // GroupManagementType : The group type determines how a group is managed.
30 type GroupManagementType struct {
31 dropbox.Tagged
32 }
33
34 // Valid tag values for GroupManagementType
35 const (
36 GroupManagementTypeUserManaged = "user_managed"
37 GroupManagementTypeCompanyManaged = "company_managed"
38 GroupManagementTypeSystemManaged = "system_managed"
39 GroupManagementTypeOther = "other"
40 )
41
42 // GroupSummary : Information about a group.
43 type GroupSummary struct {
44 // GroupName : has no documentation (yet)
45 GroupName string `json:"group_name"`
46 // GroupId : has no documentation (yet)
47 GroupId string `json:"group_id"`
48 // GroupExternalId : External ID of group. This is an arbitrary ID that an
49 // admin can attach to a group.
50 GroupExternalId string `json:"group_external_id,omitempty"`
51 // MemberCount : The number of members in the group.
52 MemberCount uint32 `json:"member_count,omitempty"`
53 // GroupManagementType : Who is allowed to manage the group.
54 GroupManagementType *GroupManagementType `json:"group_management_type"`
55 }
56
57 // NewGroupSummary returns a new GroupSummary instance
58 func NewGroupSummary(GroupName string, GroupId string, GroupManagementType *GroupManagementType) *GroupSummary {
59 s := new(GroupSummary)
60 s.GroupName = GroupName
61 s.GroupId = GroupId
62 s.GroupManagementType = GroupManagementType
63 return s
64 }
65
66 // GroupType : The group type determines how a group is created and managed.
67 type GroupType struct {
68 dropbox.Tagged
69 }
70
71 // Valid tag values for GroupType
72 const (
73 GroupTypeTeam = "team"
74 GroupTypeUserManaged = "user_managed"
75 GroupTypeOther = "other"
76 )
77
78 // MemberSpaceLimitType : The type of the space limit imposed on a team member.
79 type MemberSpaceLimitType struct {
80 dropbox.Tagged
81 }
82
83 // Valid tag values for MemberSpaceLimitType
84 const (
85 MemberSpaceLimitTypeOff = "off"
86 MemberSpaceLimitTypeAlertOnly = "alert_only"
87 MemberSpaceLimitTypeStopSync = "stop_sync"
88 MemberSpaceLimitTypeOther = "other"
89 )
90
91 // TimeRange : Time range.
92 type TimeRange struct {
93 // StartTime : Optional starting time (inclusive).
94 StartTime time.Time `json:"start_time,omitempty"`
95 // EndTime : Optional ending time (exclusive).
96 EndTime time.Time `json:"end_time,omitempty"`
97 }
98
99 // NewTimeRange returns a new TimeRange instance
100 func NewTimeRange() *TimeRange {
101 s := new(TimeRange)
102 return s
103 }
+0
-181
dropbox/team_log/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package team_log
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // GetEvents : Retrieves team events. Events have a lifespan of two years.
35 // Events older than two years will not be returned. Many attributes note
36 // 'may be missing due to historical data gap'. Note that the
37 // file_operations category and & analogous paper events are not available
38 // on all Dropbox Business `plans` </business/plans-comparison>. Use
39 // `features/get_values`
40 // </developers/documentation/http/teams#team-features-get_values> to check
41 // for this feature. Permission : Team Auditing.
42 GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error)
43 // GetEventsContinue : Once a cursor has been retrieved from `getEvents`,
44 // use this to paginate through all events. Permission : Team Auditing.
45 GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error)
46 }
47
48 type apiImpl dropbox.Context
49
50 //GetEventsAPIError is an error-wrapper for the get_events route
51 type GetEventsAPIError struct {
52 dropbox.APIError
53 EndpointError *GetTeamEventsError `json:"error"`
54 }
55
56 func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) {
57 cli := dbx.Client
58
59 dbx.Config.LogDebug("arg: %v", arg)
60 b, err := json.Marshal(arg)
61 if err != nil {
62 return
63 }
64
65 headers := map[string]string{
66 "Content-Type": "application/json",
67 }
68
69 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team_log", "get_events", headers, bytes.NewReader(b))
70 if err != nil {
71 return
72 }
73 dbx.Config.LogInfo("req: %v", req)
74
75 resp, err := cli.Do(req)
76 if err != nil {
77 return
78 }
79
80 dbx.Config.LogInfo("resp: %v", resp)
81 defer resp.Body.Close()
82 body, err := ioutil.ReadAll(resp.Body)
83 if err != nil {
84 return
85 }
86
87 dbx.Config.LogDebug("body: %s", body)
88 if resp.StatusCode == http.StatusOK {
89 err = json.Unmarshal(body, &res)
90 if err != nil {
91 return
92 }
93
94 return
95 }
96 if resp.StatusCode == http.StatusConflict {
97 var apiError GetEventsAPIError
98 err = json.Unmarshal(body, &apiError)
99 if err != nil {
100 return
101 }
102 err = apiError
103 return
104 }
105 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
106 if err != nil {
107 return
108 }
109 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
110 return
111 }
112
113 //GetEventsContinueAPIError is an error-wrapper for the get_events/continue route
114 type GetEventsContinueAPIError struct {
115 dropbox.APIError
116 EndpointError *GetTeamEventsContinueError `json:"error"`
117 }
118
119 func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) {
120 cli := dbx.Client
121
122 dbx.Config.LogDebug("arg: %v", arg)
123 b, err := json.Marshal(arg)
124 if err != nil {
125 return
126 }
127
128 headers := map[string]string{
129 "Content-Type": "application/json",
130 }
131
132 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team_log", "get_events/continue", headers, bytes.NewReader(b))
133 if err != nil {
134 return
135 }
136 dbx.Config.LogInfo("req: %v", req)
137
138 resp, err := cli.Do(req)
139 if err != nil {
140 return
141 }
142
143 dbx.Config.LogInfo("resp: %v", resp)
144 defer resp.Body.Close()
145 body, err := ioutil.ReadAll(resp.Body)
146 if err != nil {
147 return
148 }
149
150 dbx.Config.LogDebug("body: %s", body)
151 if resp.StatusCode == http.StatusOK {
152 err = json.Unmarshal(body, &res)
153 if err != nil {
154 return
155 }
156
157 return
158 }
159 if resp.StatusCode == http.StatusConflict {
160 var apiError GetEventsContinueAPIError
161 err = json.Unmarshal(body, &apiError)
162 if err != nil {
163 return
164 }
165 err = apiError
166 return
167 }
168 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
169 if err != nil {
170 return
171 }
172 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
173 return
174 }
175
176 // New returns a Client implementation for this namespace
177 func New(c dropbox.Config) Client {
178 ctx := apiImpl(dropbox.NewContext(c))
179 return &ctx
180 }
+0
-18202
dropbox/team_log/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_log : has no documentation (yet)
21 package team_log
22
23 import (
24 "encoding/json"
25 "time"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
33 )
34
35 // AccessMethodLogInfo : Indicates the method in which the action was performed.
36 type AccessMethodLogInfo struct {
37 dropbox.Tagged
38 // EndUser : End user session details.
39 EndUser IsSessionLogInfo `json:"end_user,omitempty"`
40 // SignInAs : Sign in as session details.
41 SignInAs *WebSessionLogInfo `json:"sign_in_as,omitempty"`
42 // ContentManager : Content manager session details.
43 ContentManager *WebSessionLogInfo `json:"content_manager,omitempty"`
44 // AdminConsole : Admin console session details.
45 AdminConsole *WebSessionLogInfo `json:"admin_console,omitempty"`
46 // Api : Api session details.
47 Api *ApiSessionLogInfo `json:"api,omitempty"`
48 }
49
50 // Valid tag values for AccessMethodLogInfo
51 const (
52 AccessMethodLogInfoEndUser = "end_user"
53 AccessMethodLogInfoSignInAs = "sign_in_as"
54 AccessMethodLogInfoContentManager = "content_manager"
55 AccessMethodLogInfoAdminConsole = "admin_console"
56 AccessMethodLogInfoApi = "api"
57 AccessMethodLogInfoOther = "other"
58 )
59
60 // UnmarshalJSON deserializes into a AccessMethodLogInfo instance
61 func (u *AccessMethodLogInfo) UnmarshalJSON(body []byte) error {
62 type wrap struct {
63 dropbox.Tagged
64 // EndUser : End user session details.
65 EndUser json.RawMessage `json:"end_user,omitempty"`
66 // SignInAs : Sign in as session details.
67 SignInAs json.RawMessage `json:"sign_in_as,omitempty"`
68 // ContentManager : Content manager session details.
69 ContentManager json.RawMessage `json:"content_manager,omitempty"`
70 // AdminConsole : Admin console session details.
71 AdminConsole json.RawMessage `json:"admin_console,omitempty"`
72 // Api : Api session details.
73 Api json.RawMessage `json:"api,omitempty"`
74 }
75 var w wrap
76 var err error
77 if err = json.Unmarshal(body, &w); err != nil {
78 return err
79 }
80 u.Tag = w.Tag
81 switch u.Tag {
82 case "end_user":
83 u.EndUser, err = IsSessionLogInfoFromJSON(body)
84
85 if err != nil {
86 return err
87 }
88 case "sign_in_as":
89 err = json.Unmarshal(body, &u.SignInAs)
90
91 if err != nil {
92 return err
93 }
94 case "content_manager":
95 err = json.Unmarshal(body, &u.ContentManager)
96
97 if err != nil {
98 return err
99 }
100 case "admin_console":
101 err = json.Unmarshal(body, &u.AdminConsole)
102
103 if err != nil {
104 return err
105 }
106 case "api":
107 err = json.Unmarshal(body, &u.Api)
108
109 if err != nil {
110 return err
111 }
112 }
113 return nil
114 }
115
116 // AccountCaptureAvailability : has no documentation (yet)
117 type AccountCaptureAvailability struct {
118 dropbox.Tagged
119 }
120
121 // Valid tag values for AccountCaptureAvailability
122 const (
123 AccountCaptureAvailabilityUnavailable = "unavailable"
124 AccountCaptureAvailabilityAvailable = "available"
125 AccountCaptureAvailabilityOther = "other"
126 )
127
128 // AccountCaptureChangeAvailabilityDetails : Granted/revoked option to enable
129 // account capture on team domains.
130 type AccountCaptureChangeAvailabilityDetails struct {
131 // NewValue : New account capture availabilty value.
132 NewValue *AccountCaptureAvailability `json:"new_value"`
133 // PreviousValue : Previous account capture availabilty value. Might be
134 // missing due to historical data gap.
135 PreviousValue *AccountCaptureAvailability `json:"previous_value,omitempty"`
136 }
137
138 // NewAccountCaptureChangeAvailabilityDetails returns a new AccountCaptureChangeAvailabilityDetails instance
139 func NewAccountCaptureChangeAvailabilityDetails(NewValue *AccountCaptureAvailability) *AccountCaptureChangeAvailabilityDetails {
140 s := new(AccountCaptureChangeAvailabilityDetails)
141 s.NewValue = NewValue
142 return s
143 }
144
145 // AccountCaptureChangeAvailabilityType : has no documentation (yet)
146 type AccountCaptureChangeAvailabilityType struct {
147 // Description : has no documentation (yet)
148 Description string `json:"description"`
149 }
150
151 // NewAccountCaptureChangeAvailabilityType returns a new AccountCaptureChangeAvailabilityType instance
152 func NewAccountCaptureChangeAvailabilityType(Description string) *AccountCaptureChangeAvailabilityType {
153 s := new(AccountCaptureChangeAvailabilityType)
154 s.Description = Description
155 return s
156 }
157
158 // AccountCaptureChangePolicyDetails : Changed account capture setting on team
159 // domain.
160 type AccountCaptureChangePolicyDetails struct {
161 // NewValue : New account capture policy.
162 NewValue *AccountCapturePolicy `json:"new_value"`
163 // PreviousValue : Previous account capture policy. Might be missing due to
164 // historical data gap.
165 PreviousValue *AccountCapturePolicy `json:"previous_value,omitempty"`
166 }
167
168 // NewAccountCaptureChangePolicyDetails returns a new AccountCaptureChangePolicyDetails instance
169 func NewAccountCaptureChangePolicyDetails(NewValue *AccountCapturePolicy) *AccountCaptureChangePolicyDetails {
170 s := new(AccountCaptureChangePolicyDetails)
171 s.NewValue = NewValue
172 return s
173 }
174
175 // AccountCaptureChangePolicyType : has no documentation (yet)
176 type AccountCaptureChangePolicyType struct {
177 // Description : has no documentation (yet)
178 Description string `json:"description"`
179 }
180
181 // NewAccountCaptureChangePolicyType returns a new AccountCaptureChangePolicyType instance
182 func NewAccountCaptureChangePolicyType(Description string) *AccountCaptureChangePolicyType {
183 s := new(AccountCaptureChangePolicyType)
184 s.Description = Description
185 return s
186 }
187
188 // AccountCaptureMigrateAccountDetails : Account-captured user migrated account
189 // to team.
190 type AccountCaptureMigrateAccountDetails struct {
191 // DomainName : Domain name.
192 DomainName string `json:"domain_name"`
193 }
194
195 // NewAccountCaptureMigrateAccountDetails returns a new AccountCaptureMigrateAccountDetails instance
196 func NewAccountCaptureMigrateAccountDetails(DomainName string) *AccountCaptureMigrateAccountDetails {
197 s := new(AccountCaptureMigrateAccountDetails)
198 s.DomainName = DomainName
199 return s
200 }
201
202 // AccountCaptureMigrateAccountType : has no documentation (yet)
203 type AccountCaptureMigrateAccountType struct {
204 // Description : has no documentation (yet)
205 Description string `json:"description"`
206 }
207
208 // NewAccountCaptureMigrateAccountType returns a new AccountCaptureMigrateAccountType instance
209 func NewAccountCaptureMigrateAccountType(Description string) *AccountCaptureMigrateAccountType {
210 s := new(AccountCaptureMigrateAccountType)
211 s.Description = Description
212 return s
213 }
214
215 // AccountCaptureNotificationEmailsSentDetails : Sent proactive account capture
216 // email to all unmanaged members.
217 type AccountCaptureNotificationEmailsSentDetails struct {
218 // DomainName : Domain name.
219 DomainName string `json:"domain_name"`
220 }
221
222 // NewAccountCaptureNotificationEmailsSentDetails returns a new AccountCaptureNotificationEmailsSentDetails instance
223 func NewAccountCaptureNotificationEmailsSentDetails(DomainName string) *AccountCaptureNotificationEmailsSentDetails {
224 s := new(AccountCaptureNotificationEmailsSentDetails)
225 s.DomainName = DomainName
226 return s
227 }
228
229 // AccountCaptureNotificationEmailsSentType : has no documentation (yet)
230 type AccountCaptureNotificationEmailsSentType struct {
231 // Description : has no documentation (yet)
232 Description string `json:"description"`
233 }
234
235 // NewAccountCaptureNotificationEmailsSentType returns a new AccountCaptureNotificationEmailsSentType instance
236 func NewAccountCaptureNotificationEmailsSentType(Description string) *AccountCaptureNotificationEmailsSentType {
237 s := new(AccountCaptureNotificationEmailsSentType)
238 s.Description = Description
239 return s
240 }
241
242 // AccountCapturePolicy : has no documentation (yet)
243 type AccountCapturePolicy struct {
244 dropbox.Tagged
245 }
246
247 // Valid tag values for AccountCapturePolicy
248 const (
249 AccountCapturePolicyDisabled = "disabled"
250 AccountCapturePolicyInvitedUsers = "invited_users"
251 AccountCapturePolicyAllUsers = "all_users"
252 AccountCapturePolicyOther = "other"
253 )
254
255 // AccountCaptureRelinquishAccountDetails : Account-captured user changed
256 // account email to personal email.
257 type AccountCaptureRelinquishAccountDetails struct {
258 // DomainName : Domain name.
259 DomainName string `json:"domain_name"`
260 }
261
262 // NewAccountCaptureRelinquishAccountDetails returns a new AccountCaptureRelinquishAccountDetails instance
263 func NewAccountCaptureRelinquishAccountDetails(DomainName string) *AccountCaptureRelinquishAccountDetails {
264 s := new(AccountCaptureRelinquishAccountDetails)
265 s.DomainName = DomainName
266 return s
267 }
268
269 // AccountCaptureRelinquishAccountType : has no documentation (yet)
270 type AccountCaptureRelinquishAccountType struct {
271 // Description : has no documentation (yet)
272 Description string `json:"description"`
273 }
274
275 // NewAccountCaptureRelinquishAccountType returns a new AccountCaptureRelinquishAccountType instance
276 func NewAccountCaptureRelinquishAccountType(Description string) *AccountCaptureRelinquishAccountType {
277 s := new(AccountCaptureRelinquishAccountType)
278 s.Description = Description
279 return s
280 }
281
282 // ActionDetails : Additional information indicating the action taken that
283 // caused status change.
284 type ActionDetails struct {
285 dropbox.Tagged
286 // TeamJoinDetails : Additional information relevant when a new member joins
287 // the team.
288 TeamJoinDetails *JoinTeamDetails `json:"team_join_details,omitempty"`
289 // RemoveAction : Define how the user was removed from the team.
290 RemoveAction *MemberRemoveActionType `json:"remove_action,omitempty"`
291 }
292
293 // Valid tag values for ActionDetails
294 const (
295 ActionDetailsTeamJoinDetails = "team_join_details"
296 ActionDetailsRemoveAction = "remove_action"
297 ActionDetailsOther = "other"
298 )
299
300 // UnmarshalJSON deserializes into a ActionDetails instance
301 func (u *ActionDetails) UnmarshalJSON(body []byte) error {
302 type wrap struct {
303 dropbox.Tagged
304 // TeamJoinDetails : Additional information relevant when a new member
305 // joins the team.
306 TeamJoinDetails json.RawMessage `json:"team_join_details,omitempty"`
307 // RemoveAction : Define how the user was removed from the team.
308 RemoveAction json.RawMessage `json:"remove_action,omitempty"`
309 }
310 var w wrap
311 var err error
312 if err = json.Unmarshal(body, &w); err != nil {
313 return err
314 }
315 u.Tag = w.Tag
316 switch u.Tag {
317 case "team_join_details":
318 err = json.Unmarshal(body, &u.TeamJoinDetails)
319
320 if err != nil {
321 return err
322 }
323 case "remove_action":
324 err = json.Unmarshal(w.RemoveAction, &u.RemoveAction)
325
326 if err != nil {
327 return err
328 }
329 }
330 return nil
331 }
332
333 // ActorLogInfo : The entity who performed the action.
334 type ActorLogInfo struct {
335 dropbox.Tagged
336 // User : The user who did the action.
337 User IsUserLogInfo `json:"user,omitempty"`
338 // Admin : The admin who did the action.
339 Admin IsUserLogInfo `json:"admin,omitempty"`
340 // App : The application who did the action.
341 App IsAppLogInfo `json:"app,omitempty"`
342 // Reseller : Action done by reseller.
343 Reseller *ResellerLogInfo `json:"reseller,omitempty"`
344 }
345
346 // Valid tag values for ActorLogInfo
347 const (
348 ActorLogInfoUser = "user"
349 ActorLogInfoAdmin = "admin"
350 ActorLogInfoApp = "app"
351 ActorLogInfoReseller = "reseller"
352 ActorLogInfoDropbox = "dropbox"
353 ActorLogInfoAnonymous = "anonymous"
354 ActorLogInfoOther = "other"
355 )
356
357 // UnmarshalJSON deserializes into a ActorLogInfo instance
358 func (u *ActorLogInfo) UnmarshalJSON(body []byte) error {
359 type wrap struct {
360 dropbox.Tagged
361 // User : The user who did the action.
362 User json.RawMessage `json:"user,omitempty"`
363 // Admin : The admin who did the action.
364 Admin json.RawMessage `json:"admin,omitempty"`
365 // App : The application who did the action.
366 App json.RawMessage `json:"app,omitempty"`
367 // Reseller : Action done by reseller.
368 Reseller json.RawMessage `json:"reseller,omitempty"`
369 }
370 var w wrap
371 var err error
372 if err = json.Unmarshal(body, &w); err != nil {
373 return err
374 }
375 u.Tag = w.Tag
376 switch u.Tag {
377 case "user":
378 u.User, err = IsUserLogInfoFromJSON(body)
379
380 if err != nil {
381 return err
382 }
383 case "admin":
384 u.Admin, err = IsUserLogInfoFromJSON(body)
385
386 if err != nil {
387 return err
388 }
389 case "app":
390 u.App, err = IsAppLogInfoFromJSON(body)
391
392 if err != nil {
393 return err
394 }
395 case "reseller":
396 err = json.Unmarshal(body, &u.Reseller)
397
398 if err != nil {
399 return err
400 }
401 }
402 return nil
403 }
404
405 // AdminRole : has no documentation (yet)
406 type AdminRole struct {
407 dropbox.Tagged
408 }
409
410 // Valid tag values for AdminRole
411 const (
412 AdminRoleTeamAdmin = "team_admin"
413 AdminRoleUserManagementAdmin = "user_management_admin"
414 AdminRoleSupportAdmin = "support_admin"
415 AdminRoleLimitedAdmin = "limited_admin"
416 AdminRoleMemberOnly = "member_only"
417 AdminRoleOther = "other"
418 )
419
420 // AllowDownloadDisabledDetails : Disabled downloads.
421 type AllowDownloadDisabledDetails struct {
422 }
423
424 // NewAllowDownloadDisabledDetails returns a new AllowDownloadDisabledDetails instance
425 func NewAllowDownloadDisabledDetails() *AllowDownloadDisabledDetails {
426 s := new(AllowDownloadDisabledDetails)
427 return s
428 }
429
430 // AllowDownloadDisabledType : has no documentation (yet)
431 type AllowDownloadDisabledType struct {
432 // Description : has no documentation (yet)
433 Description string `json:"description"`
434 }
435
436 // NewAllowDownloadDisabledType returns a new AllowDownloadDisabledType instance
437 func NewAllowDownloadDisabledType(Description string) *AllowDownloadDisabledType {
438 s := new(AllowDownloadDisabledType)
439 s.Description = Description
440 return s
441 }
442
443 // AllowDownloadEnabledDetails : Enabled downloads.
444 type AllowDownloadEnabledDetails struct {
445 }
446
447 // NewAllowDownloadEnabledDetails returns a new AllowDownloadEnabledDetails instance
448 func NewAllowDownloadEnabledDetails() *AllowDownloadEnabledDetails {
449 s := new(AllowDownloadEnabledDetails)
450 return s
451 }
452
453 // AllowDownloadEnabledType : has no documentation (yet)
454 type AllowDownloadEnabledType struct {
455 // Description : has no documentation (yet)
456 Description string `json:"description"`
457 }
458
459 // NewAllowDownloadEnabledType returns a new AllowDownloadEnabledType instance
460 func NewAllowDownloadEnabledType(Description string) *AllowDownloadEnabledType {
461 s := new(AllowDownloadEnabledType)
462 s.Description = Description
463 return s
464 }
465
466 // ApiSessionLogInfo : Api session.
467 type ApiSessionLogInfo struct {
468 // RequestId : Api request ID.
469 RequestId string `json:"request_id"`
470 }
471
472 // NewApiSessionLogInfo returns a new ApiSessionLogInfo instance
473 func NewApiSessionLogInfo(RequestId string) *ApiSessionLogInfo {
474 s := new(ApiSessionLogInfo)
475 s.RequestId = RequestId
476 return s
477 }
478
479 // AppLinkTeamDetails : Linked app for team.
480 type AppLinkTeamDetails struct {
481 // AppInfo : Relevant application details.
482 AppInfo IsAppLogInfo `json:"app_info"`
483 }
484
485 // NewAppLinkTeamDetails returns a new AppLinkTeamDetails instance
486 func NewAppLinkTeamDetails(AppInfo IsAppLogInfo) *AppLinkTeamDetails {
487 s := new(AppLinkTeamDetails)
488 s.AppInfo = AppInfo
489 return s
490 }
491
492 // UnmarshalJSON deserializes into a AppLinkTeamDetails instance
493 func (u *AppLinkTeamDetails) UnmarshalJSON(b []byte) error {
494 type wrap struct {
495 // AppInfo : Relevant application details.
496 AppInfo json.RawMessage `json:"app_info"`
497 }
498 var w wrap
499 if err := json.Unmarshal(b, &w); err != nil {
500 return err
501 }
502 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
503 if err != nil {
504 return err
505 }
506 u.AppInfo = AppInfo
507 return nil
508 }
509
510 // AppLinkTeamType : has no documentation (yet)
511 type AppLinkTeamType struct {
512 // Description : has no documentation (yet)
513 Description string `json:"description"`
514 }
515
516 // NewAppLinkTeamType returns a new AppLinkTeamType instance
517 func NewAppLinkTeamType(Description string) *AppLinkTeamType {
518 s := new(AppLinkTeamType)
519 s.Description = Description
520 return s
521 }
522
523 // AppLinkUserDetails : Linked app for member.
524 type AppLinkUserDetails struct {
525 // AppInfo : Relevant application details.
526 AppInfo IsAppLogInfo `json:"app_info"`
527 }
528
529 // NewAppLinkUserDetails returns a new AppLinkUserDetails instance
530 func NewAppLinkUserDetails(AppInfo IsAppLogInfo) *AppLinkUserDetails {
531 s := new(AppLinkUserDetails)
532 s.AppInfo = AppInfo
533 return s
534 }
535
536 // UnmarshalJSON deserializes into a AppLinkUserDetails instance
537 func (u *AppLinkUserDetails) UnmarshalJSON(b []byte) error {
538 type wrap struct {
539 // AppInfo : Relevant application details.
540 AppInfo json.RawMessage `json:"app_info"`
541 }
542 var w wrap
543 if err := json.Unmarshal(b, &w); err != nil {
544 return err
545 }
546 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
547 if err != nil {
548 return err
549 }
550 u.AppInfo = AppInfo
551 return nil
552 }
553
554 // AppLinkUserType : has no documentation (yet)
555 type AppLinkUserType struct {
556 // Description : has no documentation (yet)
557 Description string `json:"description"`
558 }
559
560 // NewAppLinkUserType returns a new AppLinkUserType instance
561 func NewAppLinkUserType(Description string) *AppLinkUserType {
562 s := new(AppLinkUserType)
563 s.Description = Description
564 return s
565 }
566
567 // AppLogInfo : App's logged information.
568 type AppLogInfo struct {
569 // AppId : App unique ID. Might be missing due to historical data gap.
570 AppId string `json:"app_id,omitempty"`
571 // DisplayName : App display name. Might be missing due to historical data
572 // gap.
573 DisplayName string `json:"display_name,omitempty"`
574 }
575
576 // NewAppLogInfo returns a new AppLogInfo instance
577 func NewAppLogInfo() *AppLogInfo {
578 s := new(AppLogInfo)
579 return s
580 }
581
582 // IsAppLogInfo is the interface type for AppLogInfo and its subtypes
583 type IsAppLogInfo interface {
584 IsAppLogInfo()
585 }
586
587 // IsAppLogInfo implements the IsAppLogInfo interface
588 func (u *AppLogInfo) IsAppLogInfo() {}
589
590 type appLogInfoUnion struct {
591 dropbox.Tagged
592 // UserOrTeamLinkedApp : has no documentation (yet)
593 UserOrTeamLinkedApp *UserOrTeamLinkedAppLogInfo `json:"user_or_team_linked_app,omitempty"`
594 // UserLinkedApp : has no documentation (yet)
595 UserLinkedApp *UserLinkedAppLogInfo `json:"user_linked_app,omitempty"`
596 // TeamLinkedApp : has no documentation (yet)
597 TeamLinkedApp *TeamLinkedAppLogInfo `json:"team_linked_app,omitempty"`
598 }
599
600 // Valid tag values for AppLogInfo
601 const (
602 AppLogInfoUserOrTeamLinkedApp = "user_or_team_linked_app"
603 AppLogInfoUserLinkedApp = "user_linked_app"
604 AppLogInfoTeamLinkedApp = "team_linked_app"
605 )
606
607 // UnmarshalJSON deserializes into a appLogInfoUnion instance
608 func (u *appLogInfoUnion) UnmarshalJSON(body []byte) error {
609 type wrap struct {
610 dropbox.Tagged
611 // UserOrTeamLinkedApp : has no documentation (yet)
612 UserOrTeamLinkedApp json.RawMessage `json:"user_or_team_linked_app,omitempty"`
613 // UserLinkedApp : has no documentation (yet)
614 UserLinkedApp json.RawMessage `json:"user_linked_app,omitempty"`
615 // TeamLinkedApp : has no documentation (yet)
616 TeamLinkedApp json.RawMessage `json:"team_linked_app,omitempty"`
617 }
618 var w wrap
619 var err error
620 if err = json.Unmarshal(body, &w); err != nil {
621 return err
622 }
623 u.Tag = w.Tag
624 switch u.Tag {
625 case "user_or_team_linked_app":
626 err = json.Unmarshal(body, &u.UserOrTeamLinkedApp)
627
628 if err != nil {
629 return err
630 }
631 case "user_linked_app":
632 err = json.Unmarshal(body, &u.UserLinkedApp)
633
634 if err != nil {
635 return err
636 }
637 case "team_linked_app":
638 err = json.Unmarshal(body, &u.TeamLinkedApp)
639
640 if err != nil {
641 return err
642 }
643 }
644 return nil
645 }
646
647 // IsAppLogInfoFromJSON converts JSON to a concrete IsAppLogInfo instance
648 func IsAppLogInfoFromJSON(data []byte) (IsAppLogInfo, error) {
649 var t appLogInfoUnion
650 if err := json.Unmarshal(data, &t); err != nil {
651 return nil, err
652 }
653 switch t.Tag {
654 case "user_or_team_linked_app":
655 return t.UserOrTeamLinkedApp, nil
656
657 case "user_linked_app":
658 return t.UserLinkedApp, nil
659
660 case "team_linked_app":
661 return t.TeamLinkedApp, nil
662
663 }
664 return nil, nil
665 }
666
667 // AppUnlinkTeamDetails : Unlinked app for team.
668 type AppUnlinkTeamDetails struct {
669 // AppInfo : Relevant application details.
670 AppInfo IsAppLogInfo `json:"app_info"`
671 }
672
673 // NewAppUnlinkTeamDetails returns a new AppUnlinkTeamDetails instance
674 func NewAppUnlinkTeamDetails(AppInfo IsAppLogInfo) *AppUnlinkTeamDetails {
675 s := new(AppUnlinkTeamDetails)
676 s.AppInfo = AppInfo
677 return s
678 }
679
680 // UnmarshalJSON deserializes into a AppUnlinkTeamDetails instance
681 func (u *AppUnlinkTeamDetails) UnmarshalJSON(b []byte) error {
682 type wrap struct {
683 // AppInfo : Relevant application details.
684 AppInfo json.RawMessage `json:"app_info"`
685 }
686 var w wrap
687 if err := json.Unmarshal(b, &w); err != nil {
688 return err
689 }
690 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
691 if err != nil {
692 return err
693 }
694 u.AppInfo = AppInfo
695 return nil
696 }
697
698 // AppUnlinkTeamType : has no documentation (yet)
699 type AppUnlinkTeamType struct {
700 // Description : has no documentation (yet)
701 Description string `json:"description"`
702 }
703
704 // NewAppUnlinkTeamType returns a new AppUnlinkTeamType instance
705 func NewAppUnlinkTeamType(Description string) *AppUnlinkTeamType {
706 s := new(AppUnlinkTeamType)
707 s.Description = Description
708 return s
709 }
710
711 // AppUnlinkUserDetails : Unlinked app for member.
712 type AppUnlinkUserDetails struct {
713 // AppInfo : Relevant application details.
714 AppInfo IsAppLogInfo `json:"app_info"`
715 }
716
717 // NewAppUnlinkUserDetails returns a new AppUnlinkUserDetails instance
718 func NewAppUnlinkUserDetails(AppInfo IsAppLogInfo) *AppUnlinkUserDetails {
719 s := new(AppUnlinkUserDetails)
720 s.AppInfo = AppInfo
721 return s
722 }
723
724 // UnmarshalJSON deserializes into a AppUnlinkUserDetails instance
725 func (u *AppUnlinkUserDetails) UnmarshalJSON(b []byte) error {
726 type wrap struct {
727 // AppInfo : Relevant application details.
728 AppInfo json.RawMessage `json:"app_info"`
729 }
730 var w wrap
731 if err := json.Unmarshal(b, &w); err != nil {
732 return err
733 }
734 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
735 if err != nil {
736 return err
737 }
738 u.AppInfo = AppInfo
739 return nil
740 }
741
742 // AppUnlinkUserType : has no documentation (yet)
743 type AppUnlinkUserType struct {
744 // Description : has no documentation (yet)
745 Description string `json:"description"`
746 }
747
748 // NewAppUnlinkUserType returns a new AppUnlinkUserType instance
749 func NewAppUnlinkUserType(Description string) *AppUnlinkUserType {
750 s := new(AppUnlinkUserType)
751 s.Description = Description
752 return s
753 }
754
755 // AssetLogInfo : Asset details.
756 type AssetLogInfo struct {
757 dropbox.Tagged
758 // File : File's details.
759 File *FileLogInfo `json:"file,omitempty"`
760 // Folder : Folder's details.
761 Folder *FolderLogInfo `json:"folder,omitempty"`
762 // PaperDocument : Paper docuement's details.
763 PaperDocument *PaperDocumentLogInfo `json:"paper_document,omitempty"`
764 // PaperFolder : Paper folder's details.
765 PaperFolder *PaperFolderLogInfo `json:"paper_folder,omitempty"`
766 // ShowcaseDocument : Showcase document's details.
767 ShowcaseDocument *ShowcaseDocumentLogInfo `json:"showcase_document,omitempty"`
768 }
769
770 // Valid tag values for AssetLogInfo
771 const (
772 AssetLogInfoFile = "file"
773 AssetLogInfoFolder = "folder"
774 AssetLogInfoPaperDocument = "paper_document"
775 AssetLogInfoPaperFolder = "paper_folder"
776 AssetLogInfoShowcaseDocument = "showcase_document"
777 AssetLogInfoOther = "other"
778 )
779
780 // UnmarshalJSON deserializes into a AssetLogInfo instance
781 func (u *AssetLogInfo) UnmarshalJSON(body []byte) error {
782 type wrap struct {
783 dropbox.Tagged
784 // File : File's details.
785 File json.RawMessage `json:"file,omitempty"`
786 // Folder : Folder's details.
787 Folder json.RawMessage `json:"folder,omitempty"`
788 // PaperDocument : Paper docuement's details.
789 PaperDocument json.RawMessage `json:"paper_document,omitempty"`
790 // PaperFolder : Paper folder's details.
791 PaperFolder json.RawMessage `json:"paper_folder,omitempty"`
792 // ShowcaseDocument : Showcase document's details.
793 ShowcaseDocument json.RawMessage `json:"showcase_document,omitempty"`
794 }
795 var w wrap
796 var err error
797 if err = json.Unmarshal(body, &w); err != nil {
798 return err
799 }
800 u.Tag = w.Tag
801 switch u.Tag {
802 case "file":
803 err = json.Unmarshal(body, &u.File)
804
805 if err != nil {
806 return err
807 }
808 case "folder":
809 err = json.Unmarshal(body, &u.Folder)
810
811 if err != nil {
812 return err
813 }
814 case "paper_document":
815 err = json.Unmarshal(body, &u.PaperDocument)
816
817 if err != nil {
818 return err
819 }
820 case "paper_folder":
821 err = json.Unmarshal(body, &u.PaperFolder)
822
823 if err != nil {
824 return err
825 }
826 case "showcase_document":
827 err = json.Unmarshal(body, &u.ShowcaseDocument)
828
829 if err != nil {
830 return err
831 }
832 }
833 return nil
834 }
835
836 // CameraUploadsPolicy : Policy for controlling if team members can activate
837 // camera uploads
838 type CameraUploadsPolicy struct {
839 dropbox.Tagged
840 }
841
842 // Valid tag values for CameraUploadsPolicy
843 const (
844 CameraUploadsPolicyDisabled = "disabled"
845 CameraUploadsPolicyEnabled = "enabled"
846 CameraUploadsPolicyOther = "other"
847 )
848
849 // CameraUploadsPolicyChangedDetails : Changed camera uploads setting for team.
850 type CameraUploadsPolicyChangedDetails struct {
851 // NewValue : New camera uploads setting.
852 NewValue *CameraUploadsPolicy `json:"new_value"`
853 // PreviousValue : Previous camera uploads setting.
854 PreviousValue *CameraUploadsPolicy `json:"previous_value"`
855 }
856
857 // NewCameraUploadsPolicyChangedDetails returns a new CameraUploadsPolicyChangedDetails instance
858 func NewCameraUploadsPolicyChangedDetails(NewValue *CameraUploadsPolicy, PreviousValue *CameraUploadsPolicy) *CameraUploadsPolicyChangedDetails {
859 s := new(CameraUploadsPolicyChangedDetails)
860 s.NewValue = NewValue
861 s.PreviousValue = PreviousValue
862 return s
863 }
864
865 // CameraUploadsPolicyChangedType : has no documentation (yet)
866 type CameraUploadsPolicyChangedType struct {
867 // Description : has no documentation (yet)
868 Description string `json:"description"`
869 }
870
871 // NewCameraUploadsPolicyChangedType returns a new CameraUploadsPolicyChangedType instance
872 func NewCameraUploadsPolicyChangedType(Description string) *CameraUploadsPolicyChangedType {
873 s := new(CameraUploadsPolicyChangedType)
874 s.Description = Description
875 return s
876 }
877
878 // Certificate : Certificate details.
879 type Certificate struct {
880 // Subject : Certificate subject.
881 Subject string `json:"subject"`
882 // Issuer : Certificate issuer.
883 Issuer string `json:"issuer"`
884 // IssueDate : Certificate issue date.
885 IssueDate string `json:"issue_date"`
886 // ExpirationDate : Certificate expiration date.
887 ExpirationDate string `json:"expiration_date"`
888 // SerialNumber : Certificate serial number.
889 SerialNumber string `json:"serial_number"`
890 // Sha1Fingerprint : Certificate sha1 fingerprint.
891 Sha1Fingerprint string `json:"sha1_fingerprint"`
892 // CommonName : Certificate common name.
893 CommonName string `json:"common_name,omitempty"`
894 }
895
896 // NewCertificate returns a new Certificate instance
897 func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationDate string, SerialNumber string, Sha1Fingerprint string) *Certificate {
898 s := new(Certificate)
899 s.Subject = Subject
900 s.Issuer = Issuer
901 s.IssueDate = IssueDate
902 s.ExpirationDate = ExpirationDate
903 s.SerialNumber = SerialNumber
904 s.Sha1Fingerprint = Sha1Fingerprint
905 return s
906 }
907
908 // CollectionShareDetails : Shared album.
909 type CollectionShareDetails struct {
910 // AlbumName : Album name.
911 AlbumName string `json:"album_name"`
912 }
913
914 // NewCollectionShareDetails returns a new CollectionShareDetails instance
915 func NewCollectionShareDetails(AlbumName string) *CollectionShareDetails {
916 s := new(CollectionShareDetails)
917 s.AlbumName = AlbumName
918 return s
919 }
920
921 // CollectionShareType : has no documentation (yet)
922 type CollectionShareType struct {
923 // Description : has no documentation (yet)
924 Description string `json:"description"`
925 }
926
927 // NewCollectionShareType returns a new CollectionShareType instance
928 func NewCollectionShareType(Description string) *CollectionShareType {
929 s := new(CollectionShareType)
930 s.Description = Description
931 return s
932 }
933
934 // ContentPermanentDeletePolicy : Policy for pemanent content deletion
935 type ContentPermanentDeletePolicy struct {
936 dropbox.Tagged
937 }
938
939 // Valid tag values for ContentPermanentDeletePolicy
940 const (
941 ContentPermanentDeletePolicyDisabled = "disabled"
942 ContentPermanentDeletePolicyEnabled = "enabled"
943 ContentPermanentDeletePolicyOther = "other"
944 )
945
946 // ContextLogInfo : The primary entity on which the action was done.
947 type ContextLogInfo struct {
948 dropbox.Tagged
949 // TeamMember : Action was done on behalf of a team member.
950 TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"`
951 // NonTeamMember : Action was done on behalf of a non team member.
952 NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"`
953 // TrustedNonTeamMember : Action was done on behalf of a trusted non team
954 // member.
955 TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"`
956 }
957
958 // Valid tag values for ContextLogInfo
959 const (
960 ContextLogInfoTeamMember = "team_member"
961 ContextLogInfoNonTeamMember = "non_team_member"
962 ContextLogInfoAnonymous = "anonymous"
963 ContextLogInfoTeam = "team"
964 ContextLogInfoTrustedNonTeamMember = "trusted_non_team_member"
965 ContextLogInfoOther = "other"
966 )
967
968 // UnmarshalJSON deserializes into a ContextLogInfo instance
969 func (u *ContextLogInfo) UnmarshalJSON(body []byte) error {
970 type wrap struct {
971 dropbox.Tagged
972 // TeamMember : Action was done on behalf of a team member.
973 TeamMember json.RawMessage `json:"team_member,omitempty"`
974 // NonTeamMember : Action was done on behalf of a non team member.
975 NonTeamMember json.RawMessage `json:"non_team_member,omitempty"`
976 // TrustedNonTeamMember : Action was done on behalf of a trusted non
977 // team member.
978 TrustedNonTeamMember json.RawMessage `json:"trusted_non_team_member,omitempty"`
979 }
980 var w wrap
981 var err error
982 if err = json.Unmarshal(body, &w); err != nil {
983 return err
984 }
985 u.Tag = w.Tag
986 switch u.Tag {
987 case "team_member":
988 err = json.Unmarshal(body, &u.TeamMember)
989
990 if err != nil {
991 return err
992 }
993 case "non_team_member":
994 err = json.Unmarshal(body, &u.NonTeamMember)
995
996 if err != nil {
997 return err
998 }
999 case "trusted_non_team_member":
1000 err = json.Unmarshal(body, &u.TrustedNonTeamMember)
1001
1002 if err != nil {
1003 return err
1004 }
1005 }
1006 return nil
1007 }
1008
1009 // CreateFolderDetails : Created folders.
1010 type CreateFolderDetails struct {
1011 }
1012
1013 // NewCreateFolderDetails returns a new CreateFolderDetails instance
1014 func NewCreateFolderDetails() *CreateFolderDetails {
1015 s := new(CreateFolderDetails)
1016 return s
1017 }
1018
1019 // CreateFolderType : has no documentation (yet)
1020 type CreateFolderType struct {
1021 // Description : has no documentation (yet)
1022 Description string `json:"description"`
1023 }
1024
1025 // NewCreateFolderType returns a new CreateFolderType instance
1026 func NewCreateFolderType(Description string) *CreateFolderType {
1027 s := new(CreateFolderType)
1028 s.Description = Description
1029 return s
1030 }
1031
1032 // DataPlacementRestrictionChangePolicyDetails : Set restrictions on data center
1033 // locations where team data resides.
1034 type DataPlacementRestrictionChangePolicyDetails struct {
1035 // PreviousValue : Previous placement restriction.
1036 PreviousValue *PlacementRestriction `json:"previous_value"`
1037 // NewValue : New placement restriction.
1038 NewValue *PlacementRestriction `json:"new_value"`
1039 }
1040
1041 // NewDataPlacementRestrictionChangePolicyDetails returns a new DataPlacementRestrictionChangePolicyDetails instance
1042 func NewDataPlacementRestrictionChangePolicyDetails(PreviousValue *PlacementRestriction, NewValue *PlacementRestriction) *DataPlacementRestrictionChangePolicyDetails {
1043 s := new(DataPlacementRestrictionChangePolicyDetails)
1044 s.PreviousValue = PreviousValue
1045 s.NewValue = NewValue
1046 return s
1047 }
1048
1049 // DataPlacementRestrictionChangePolicyType : has no documentation (yet)
1050 type DataPlacementRestrictionChangePolicyType struct {
1051 // Description : has no documentation (yet)
1052 Description string `json:"description"`
1053 }
1054
1055 // NewDataPlacementRestrictionChangePolicyType returns a new DataPlacementRestrictionChangePolicyType instance
1056 func NewDataPlacementRestrictionChangePolicyType(Description string) *DataPlacementRestrictionChangePolicyType {
1057 s := new(DataPlacementRestrictionChangePolicyType)
1058 s.Description = Description
1059 return s
1060 }
1061
1062 // DataPlacementRestrictionSatisfyPolicyDetails : Completed restrictions on data
1063 // center locations where team data resides.
1064 type DataPlacementRestrictionSatisfyPolicyDetails struct {
1065 // PlacementRestriction : Placement restriction.
1066 PlacementRestriction *PlacementRestriction `json:"placement_restriction"`
1067 }
1068
1069 // NewDataPlacementRestrictionSatisfyPolicyDetails returns a new DataPlacementRestrictionSatisfyPolicyDetails instance
1070 func NewDataPlacementRestrictionSatisfyPolicyDetails(PlacementRestriction *PlacementRestriction) *DataPlacementRestrictionSatisfyPolicyDetails {
1071 s := new(DataPlacementRestrictionSatisfyPolicyDetails)
1072 s.PlacementRestriction = PlacementRestriction
1073 return s
1074 }
1075
1076 // DataPlacementRestrictionSatisfyPolicyType : has no documentation (yet)
1077 type DataPlacementRestrictionSatisfyPolicyType struct {
1078 // Description : has no documentation (yet)
1079 Description string `json:"description"`
1080 }
1081
1082 // NewDataPlacementRestrictionSatisfyPolicyType returns a new DataPlacementRestrictionSatisfyPolicyType instance
1083 func NewDataPlacementRestrictionSatisfyPolicyType(Description string) *DataPlacementRestrictionSatisfyPolicyType {
1084 s := new(DataPlacementRestrictionSatisfyPolicyType)
1085 s.Description = Description
1086 return s
1087 }
1088
1089 // DeviceSessionLogInfo : Device's session logged information.
1090 type DeviceSessionLogInfo struct {
1091 // IpAddress : The IP address of the last activity from this session. Might
1092 // be missing due to historical data gap.
1093 IpAddress string `json:"ip_address,omitempty"`
1094 // Created : The time this session was created. Might be missing due to
1095 // historical data gap.
1096 Created time.Time `json:"created,omitempty"`
1097 // Updated : The time of the last activity from this session. Might be
1098 // missing due to historical data gap.
1099 Updated time.Time `json:"updated,omitempty"`
1100 }
1101
1102 // NewDeviceSessionLogInfo returns a new DeviceSessionLogInfo instance
1103 func NewDeviceSessionLogInfo() *DeviceSessionLogInfo {
1104 s := new(DeviceSessionLogInfo)
1105 return s
1106 }
1107
1108 // IsDeviceSessionLogInfo is the interface type for DeviceSessionLogInfo and its subtypes
1109 type IsDeviceSessionLogInfo interface {
1110 IsDeviceSessionLogInfo()
1111 }
1112
1113 // IsDeviceSessionLogInfo implements the IsDeviceSessionLogInfo interface
1114 func (u *DeviceSessionLogInfo) IsDeviceSessionLogInfo() {}
1115
1116 type deviceSessionLogInfoUnion struct {
1117 dropbox.Tagged
1118 // DesktopDeviceSession : has no documentation (yet)
1119 DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"`
1120 // MobileDeviceSession : has no documentation (yet)
1121 MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"`
1122 // WebDeviceSession : has no documentation (yet)
1123 WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"`
1124 // LegacyDeviceSession : has no documentation (yet)
1125 LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"`
1126 }
1127
1128 // Valid tag values for DeviceSessionLogInfo
1129 const (
1130 DeviceSessionLogInfoDesktopDeviceSession = "desktop_device_session"
1131 DeviceSessionLogInfoMobileDeviceSession = "mobile_device_session"
1132 DeviceSessionLogInfoWebDeviceSession = "web_device_session"
1133 DeviceSessionLogInfoLegacyDeviceSession = "legacy_device_session"
1134 )
1135
1136 // UnmarshalJSON deserializes into a deviceSessionLogInfoUnion instance
1137 func (u *deviceSessionLogInfoUnion) UnmarshalJSON(body []byte) error {
1138 type wrap struct {
1139 dropbox.Tagged
1140 // DesktopDeviceSession : has no documentation (yet)
1141 DesktopDeviceSession json.RawMessage `json:"desktop_device_session,omitempty"`
1142 // MobileDeviceSession : has no documentation (yet)
1143 MobileDeviceSession json.RawMessage `json:"mobile_device_session,omitempty"`
1144 // WebDeviceSession : has no documentation (yet)
1145 WebDeviceSession json.RawMessage `json:"web_device_session,omitempty"`
1146 // LegacyDeviceSession : has no documentation (yet)
1147 LegacyDeviceSession json.RawMessage `json:"legacy_device_session,omitempty"`
1148 }
1149 var w wrap
1150 var err error
1151 if err = json.Unmarshal(body, &w); err != nil {
1152 return err
1153 }
1154 u.Tag = w.Tag
1155 switch u.Tag {
1156 case "desktop_device_session":
1157 err = json.Unmarshal(body, &u.DesktopDeviceSession)
1158
1159 if err != nil {
1160 return err
1161 }
1162 case "mobile_device_session":
1163 err = json.Unmarshal(body, &u.MobileDeviceSession)
1164
1165 if err != nil {
1166 return err
1167 }
1168 case "web_device_session":
1169 err = json.Unmarshal(body, &u.WebDeviceSession)
1170
1171 if err != nil {
1172 return err
1173 }
1174 case "legacy_device_session":
1175 err = json.Unmarshal(body, &u.LegacyDeviceSession)
1176
1177 if err != nil {
1178 return err
1179 }
1180 }
1181 return nil
1182 }
1183
1184 // IsDeviceSessionLogInfoFromJSON converts JSON to a concrete IsDeviceSessionLogInfo instance
1185 func IsDeviceSessionLogInfoFromJSON(data []byte) (IsDeviceSessionLogInfo, error) {
1186 var t deviceSessionLogInfoUnion
1187 if err := json.Unmarshal(data, &t); err != nil {
1188 return nil, err
1189 }
1190 switch t.Tag {
1191 case "desktop_device_session":
1192 return t.DesktopDeviceSession, nil
1193
1194 case "mobile_device_session":
1195 return t.MobileDeviceSession, nil
1196
1197 case "web_device_session":
1198 return t.WebDeviceSession, nil
1199
1200 case "legacy_device_session":
1201 return t.LegacyDeviceSession, nil
1202
1203 }
1204 return nil, nil
1205 }
1206
1207 // DesktopDeviceSessionLogInfo : Information about linked Dropbox desktop client
1208 // sessions
1209 type DesktopDeviceSessionLogInfo struct {
1210 DeviceSessionLogInfo
1211 // SessionInfo : Desktop session unique id. Might be missing due to
1212 // historical data gap.
1213 SessionInfo *DesktopSessionLogInfo `json:"session_info,omitempty"`
1214 // HostName : Name of the hosting desktop.
1215 HostName string `json:"host_name"`
1216 // ClientType : The Dropbox desktop client type.
1217 ClientType *team.DesktopPlatform `json:"client_type"`
1218 // ClientVersion : The Dropbox client version.
1219 ClientVersion string `json:"client_version,omitempty"`
1220 // Platform : Information on the hosting platform.
1221 Platform string `json:"platform"`
1222 // IsDeleteOnUnlinkSupported : Whether itu2019s possible to delete all of
1223 // the account files upon unlinking.
1224 IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"`
1225 }
1226
1227 // NewDesktopDeviceSessionLogInfo returns a new DesktopDeviceSessionLogInfo instance
1228 func NewDesktopDeviceSessionLogInfo(HostName string, ClientType *team.DesktopPlatform, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopDeviceSessionLogInfo {
1229 s := new(DesktopDeviceSessionLogInfo)
1230 s.HostName = HostName
1231 s.ClientType = ClientType
1232 s.Platform = Platform
1233 s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported
1234 return s
1235 }
1236
1237 // SessionLogInfo : Session's logged information.
1238 type SessionLogInfo struct {
1239 // SessionId : Session ID. Might be missing due to historical data gap.
1240 SessionId string `json:"session_id,omitempty"`
1241 }
1242
1243 // NewSessionLogInfo returns a new SessionLogInfo instance
1244 func NewSessionLogInfo() *SessionLogInfo {
1245 s := new(SessionLogInfo)
1246 return s
1247 }
1248
1249 // IsSessionLogInfo is the interface type for SessionLogInfo and its subtypes
1250 type IsSessionLogInfo interface {
1251 IsSessionLogInfo()
1252 }
1253
1254 // IsSessionLogInfo implements the IsSessionLogInfo interface
1255 func (u *SessionLogInfo) IsSessionLogInfo() {}
1256
1257 type sessionLogInfoUnion struct {
1258 dropbox.Tagged
1259 // Web : has no documentation (yet)
1260 Web *WebSessionLogInfo `json:"web,omitempty"`
1261 // Desktop : has no documentation (yet)
1262 Desktop *DesktopSessionLogInfo `json:"desktop,omitempty"`
1263 // Mobile : has no documentation (yet)
1264 Mobile *MobileSessionLogInfo `json:"mobile,omitempty"`
1265 }
1266
1267 // Valid tag values for SessionLogInfo
1268 const (
1269 SessionLogInfoWeb = "web"
1270 SessionLogInfoDesktop = "desktop"
1271 SessionLogInfoMobile = "mobile"
1272 )
1273
1274 // UnmarshalJSON deserializes into a sessionLogInfoUnion instance
1275 func (u *sessionLogInfoUnion) UnmarshalJSON(body []byte) error {
1276 type wrap struct {
1277 dropbox.Tagged
1278 // Web : has no documentation (yet)
1279 Web json.RawMessage `json:"web,omitempty"`
1280 // Desktop : has no documentation (yet)
1281 Desktop json.RawMessage `json:"desktop,omitempty"`
1282 // Mobile : has no documentation (yet)
1283 Mobile json.RawMessage `json:"mobile,omitempty"`
1284 }
1285 var w wrap
1286 var err error
1287 if err = json.Unmarshal(body, &w); err != nil {
1288 return err
1289 }
1290 u.Tag = w.Tag
1291 switch u.Tag {
1292 case "web":
1293 err = json.Unmarshal(body, &u.Web)
1294
1295 if err != nil {
1296 return err
1297 }
1298 case "desktop":
1299 err = json.Unmarshal(body, &u.Desktop)
1300
1301 if err != nil {
1302 return err
1303 }
1304 case "mobile":
1305 err = json.Unmarshal(body, &u.Mobile)
1306
1307 if err != nil {
1308 return err
1309 }
1310 }
1311 return nil
1312 }
1313
1314 // IsSessionLogInfoFromJSON converts JSON to a concrete IsSessionLogInfo instance
1315 func IsSessionLogInfoFromJSON(data []byte) (IsSessionLogInfo, error) {
1316 var t sessionLogInfoUnion
1317 if err := json.Unmarshal(data, &t); err != nil {
1318 return nil, err
1319 }
1320 switch t.Tag {
1321 case "web":
1322 return t.Web, nil
1323
1324 case "desktop":
1325 return t.Desktop, nil
1326
1327 case "mobile":
1328 return t.Mobile, nil
1329
1330 }
1331 return nil, nil
1332 }
1333
1334 // DesktopSessionLogInfo : Desktop session.
1335 type DesktopSessionLogInfo struct {
1336 SessionLogInfo
1337 }
1338
1339 // NewDesktopSessionLogInfo returns a new DesktopSessionLogInfo instance
1340 func NewDesktopSessionLogInfo() *DesktopSessionLogInfo {
1341 s := new(DesktopSessionLogInfo)
1342 return s
1343 }
1344
1345 // DeviceApprovalsChangeDesktopPolicyDetails : Set/removed limit on number of
1346 // computers member can link to team Dropbox account.
1347 type DeviceApprovalsChangeDesktopPolicyDetails struct {
1348 // NewValue : New desktop device approvals policy. Might be missing due to
1349 // historical data gap.
1350 NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"`
1351 // PreviousValue : Previous desktop device approvals policy. Might be
1352 // missing due to historical data gap.
1353 PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"`
1354 }
1355
1356 // NewDeviceApprovalsChangeDesktopPolicyDetails returns a new DeviceApprovalsChangeDesktopPolicyDetails instance
1357 func NewDeviceApprovalsChangeDesktopPolicyDetails() *DeviceApprovalsChangeDesktopPolicyDetails {
1358 s := new(DeviceApprovalsChangeDesktopPolicyDetails)
1359 return s
1360 }
1361
1362 // DeviceApprovalsChangeDesktopPolicyType : has no documentation (yet)
1363 type DeviceApprovalsChangeDesktopPolicyType struct {
1364 // Description : has no documentation (yet)
1365 Description string `json:"description"`
1366 }
1367
1368 // NewDeviceApprovalsChangeDesktopPolicyType returns a new DeviceApprovalsChangeDesktopPolicyType instance
1369 func NewDeviceApprovalsChangeDesktopPolicyType(Description string) *DeviceApprovalsChangeDesktopPolicyType {
1370 s := new(DeviceApprovalsChangeDesktopPolicyType)
1371 s.Description = Description
1372 return s
1373 }
1374
1375 // DeviceApprovalsChangeMobilePolicyDetails : Set/removed limit on number of
1376 // mobile devices member can link to team Dropbox account.
1377 type DeviceApprovalsChangeMobilePolicyDetails struct {
1378 // NewValue : New mobile device approvals policy. Might be missing due to
1379 // historical data gap.
1380 NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"`
1381 // PreviousValue : Previous mobile device approvals policy. Might be missing
1382 // due to historical data gap.
1383 PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"`
1384 }
1385
1386 // NewDeviceApprovalsChangeMobilePolicyDetails returns a new DeviceApprovalsChangeMobilePolicyDetails instance
1387 func NewDeviceApprovalsChangeMobilePolicyDetails() *DeviceApprovalsChangeMobilePolicyDetails {
1388 s := new(DeviceApprovalsChangeMobilePolicyDetails)
1389 return s
1390 }
1391
1392 // DeviceApprovalsChangeMobilePolicyType : has no documentation (yet)
1393 type DeviceApprovalsChangeMobilePolicyType struct {
1394 // Description : has no documentation (yet)
1395 Description string `json:"description"`
1396 }
1397
1398 // NewDeviceApprovalsChangeMobilePolicyType returns a new DeviceApprovalsChangeMobilePolicyType instance
1399 func NewDeviceApprovalsChangeMobilePolicyType(Description string) *DeviceApprovalsChangeMobilePolicyType {
1400 s := new(DeviceApprovalsChangeMobilePolicyType)
1401 s.Description = Description
1402 return s
1403 }
1404
1405 // DeviceApprovalsChangeOverageActionDetails : Changed device approvals setting
1406 // when member is over limit.
1407 type DeviceApprovalsChangeOverageActionDetails struct {
1408 // NewValue : New over the limits policy. Might be missing due to historical
1409 // data gap.
1410 NewValue *team_policies.RolloutMethod `json:"new_value,omitempty"`
1411 // PreviousValue : Previous over the limit policy. Might be missing due to
1412 // historical data gap.
1413 PreviousValue *team_policies.RolloutMethod `json:"previous_value,omitempty"`
1414 }
1415
1416 // NewDeviceApprovalsChangeOverageActionDetails returns a new DeviceApprovalsChangeOverageActionDetails instance
1417 func NewDeviceApprovalsChangeOverageActionDetails() *DeviceApprovalsChangeOverageActionDetails {
1418 s := new(DeviceApprovalsChangeOverageActionDetails)
1419 return s
1420 }
1421
1422 // DeviceApprovalsChangeOverageActionType : has no documentation (yet)
1423 type DeviceApprovalsChangeOverageActionType struct {
1424 // Description : has no documentation (yet)
1425 Description string `json:"description"`
1426 }
1427
1428 // NewDeviceApprovalsChangeOverageActionType returns a new DeviceApprovalsChangeOverageActionType instance
1429 func NewDeviceApprovalsChangeOverageActionType(Description string) *DeviceApprovalsChangeOverageActionType {
1430 s := new(DeviceApprovalsChangeOverageActionType)
1431 s.Description = Description
1432 return s
1433 }
1434
1435 // DeviceApprovalsChangeUnlinkActionDetails : Changed device approvals setting
1436 // when member unlinks approved device.
1437 type DeviceApprovalsChangeUnlinkActionDetails struct {
1438 // NewValue : New device unlink policy. Might be missing due to historical
1439 // data gap.
1440 NewValue *DeviceUnlinkPolicy `json:"new_value,omitempty"`
1441 // PreviousValue : Previous device unlink policy. Might be missing due to
1442 // historical data gap.
1443 PreviousValue *DeviceUnlinkPolicy `json:"previous_value,omitempty"`
1444 }
1445
1446 // NewDeviceApprovalsChangeUnlinkActionDetails returns a new DeviceApprovalsChangeUnlinkActionDetails instance
1447 func NewDeviceApprovalsChangeUnlinkActionDetails() *DeviceApprovalsChangeUnlinkActionDetails {
1448 s := new(DeviceApprovalsChangeUnlinkActionDetails)
1449 return s
1450 }
1451
1452 // DeviceApprovalsChangeUnlinkActionType : has no documentation (yet)
1453 type DeviceApprovalsChangeUnlinkActionType struct {
1454 // Description : has no documentation (yet)
1455 Description string `json:"description"`
1456 }
1457
1458 // NewDeviceApprovalsChangeUnlinkActionType returns a new DeviceApprovalsChangeUnlinkActionType instance
1459 func NewDeviceApprovalsChangeUnlinkActionType(Description string) *DeviceApprovalsChangeUnlinkActionType {
1460 s := new(DeviceApprovalsChangeUnlinkActionType)
1461 s.Description = Description
1462 return s
1463 }
1464
1465 // DeviceApprovalsPolicy : has no documentation (yet)
1466 type DeviceApprovalsPolicy struct {
1467 dropbox.Tagged
1468 }
1469
1470 // Valid tag values for DeviceApprovalsPolicy
1471 const (
1472 DeviceApprovalsPolicyUnlimited = "unlimited"
1473 DeviceApprovalsPolicyLimited = "limited"
1474 DeviceApprovalsPolicyOther = "other"
1475 )
1476
1477 // DeviceChangeIpDesktopDetails : Changed IP address associated with active
1478 // desktop session.
1479 type DeviceChangeIpDesktopDetails struct {
1480 // DeviceSessionInfo : Device's session logged information.
1481 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info"`
1482 }
1483
1484 // NewDeviceChangeIpDesktopDetails returns a new DeviceChangeIpDesktopDetails instance
1485 func NewDeviceChangeIpDesktopDetails(DeviceSessionInfo IsDeviceSessionLogInfo) *DeviceChangeIpDesktopDetails {
1486 s := new(DeviceChangeIpDesktopDetails)
1487 s.DeviceSessionInfo = DeviceSessionInfo
1488 return s
1489 }
1490
1491 // UnmarshalJSON deserializes into a DeviceChangeIpDesktopDetails instance
1492 func (u *DeviceChangeIpDesktopDetails) UnmarshalJSON(b []byte) error {
1493 type wrap struct {
1494 // DeviceSessionInfo : Device's session logged information.
1495 DeviceSessionInfo json.RawMessage `json:"device_session_info"`
1496 }
1497 var w wrap
1498 if err := json.Unmarshal(b, &w); err != nil {
1499 return err
1500 }
1501 DeviceSessionInfo, err := IsDeviceSessionLogInfoFromJSON(w.DeviceSessionInfo)
1502 if err != nil {
1503 return err
1504 }
1505 u.DeviceSessionInfo = DeviceSessionInfo
1506 return nil
1507 }
1508
1509 // DeviceChangeIpDesktopType : has no documentation (yet)
1510 type DeviceChangeIpDesktopType struct {
1511 // Description : has no documentation (yet)
1512 Description string `json:"description"`
1513 }
1514
1515 // NewDeviceChangeIpDesktopType returns a new DeviceChangeIpDesktopType instance
1516 func NewDeviceChangeIpDesktopType(Description string) *DeviceChangeIpDesktopType {
1517 s := new(DeviceChangeIpDesktopType)
1518 s.Description = Description
1519 return s
1520 }
1521
1522 // DeviceChangeIpMobileDetails : Changed IP address associated with active
1523 // mobile session.
1524 type DeviceChangeIpMobileDetails struct {
1525 // DeviceSessionInfo : Device's session logged information.
1526 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"`
1527 }
1528
1529 // NewDeviceChangeIpMobileDetails returns a new DeviceChangeIpMobileDetails instance
1530 func NewDeviceChangeIpMobileDetails() *DeviceChangeIpMobileDetails {
1531 s := new(DeviceChangeIpMobileDetails)
1532 return s
1533 }
1534
1535 // DeviceChangeIpMobileType : has no documentation (yet)
1536 type DeviceChangeIpMobileType struct {
1537 // Description : has no documentation (yet)
1538 Description string `json:"description"`
1539 }
1540
1541 // NewDeviceChangeIpMobileType returns a new DeviceChangeIpMobileType instance
1542 func NewDeviceChangeIpMobileType(Description string) *DeviceChangeIpMobileType {
1543 s := new(DeviceChangeIpMobileType)
1544 s.Description = Description
1545 return s
1546 }
1547
1548 // DeviceChangeIpWebDetails : Changed IP address associated with active web
1549 // session.
1550 type DeviceChangeIpWebDetails struct {
1551 // UserAgent : Web browser name.
1552 UserAgent string `json:"user_agent"`
1553 }
1554
1555 // NewDeviceChangeIpWebDetails returns a new DeviceChangeIpWebDetails instance
1556 func NewDeviceChangeIpWebDetails(UserAgent string) *DeviceChangeIpWebDetails {
1557 s := new(DeviceChangeIpWebDetails)
1558 s.UserAgent = UserAgent
1559 return s
1560 }
1561
1562 // DeviceChangeIpWebType : has no documentation (yet)
1563 type DeviceChangeIpWebType struct {
1564 // Description : has no documentation (yet)
1565 Description string `json:"description"`
1566 }
1567
1568 // NewDeviceChangeIpWebType returns a new DeviceChangeIpWebType instance
1569 func NewDeviceChangeIpWebType(Description string) *DeviceChangeIpWebType {
1570 s := new(DeviceChangeIpWebType)
1571 s.Description = Description
1572 return s
1573 }
1574
1575 // DeviceDeleteOnUnlinkFailDetails : Failed to delete all files from unlinked
1576 // device.
1577 type DeviceDeleteOnUnlinkFailDetails struct {
1578 // SessionInfo : Session unique id. Might be missing due to historical data
1579 // gap.
1580 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
1581 // DisplayName : The device name. Might be missing due to historical data
1582 // gap.
1583 DisplayName string `json:"display_name,omitempty"`
1584 // NumFailures : The number of times that remote file deletion failed.
1585 NumFailures int64 `json:"num_failures"`
1586 }
1587
1588 // NewDeviceDeleteOnUnlinkFailDetails returns a new DeviceDeleteOnUnlinkFailDetails instance
1589 func NewDeviceDeleteOnUnlinkFailDetails(NumFailures int64) *DeviceDeleteOnUnlinkFailDetails {
1590 s := new(DeviceDeleteOnUnlinkFailDetails)
1591 s.NumFailures = NumFailures
1592 return s
1593 }
1594
1595 // DeviceDeleteOnUnlinkFailType : has no documentation (yet)
1596 type DeviceDeleteOnUnlinkFailType struct {
1597 // Description : has no documentation (yet)
1598 Description string `json:"description"`
1599 }
1600
1601 // NewDeviceDeleteOnUnlinkFailType returns a new DeviceDeleteOnUnlinkFailType instance
1602 func NewDeviceDeleteOnUnlinkFailType(Description string) *DeviceDeleteOnUnlinkFailType {
1603 s := new(DeviceDeleteOnUnlinkFailType)
1604 s.Description = Description
1605 return s
1606 }
1607
1608 // DeviceDeleteOnUnlinkSuccessDetails : Deleted all files from unlinked device.
1609 type DeviceDeleteOnUnlinkSuccessDetails struct {
1610 // SessionInfo : Session unique id. Might be missing due to historical data
1611 // gap.
1612 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
1613 // DisplayName : The device name. Might be missing due to historical data
1614 // gap.
1615 DisplayName string `json:"display_name,omitempty"`
1616 }
1617
1618 // NewDeviceDeleteOnUnlinkSuccessDetails returns a new DeviceDeleteOnUnlinkSuccessDetails instance
1619 func NewDeviceDeleteOnUnlinkSuccessDetails() *DeviceDeleteOnUnlinkSuccessDetails {
1620 s := new(DeviceDeleteOnUnlinkSuccessDetails)
1621 return s
1622 }
1623
1624 // DeviceDeleteOnUnlinkSuccessType : has no documentation (yet)
1625 type DeviceDeleteOnUnlinkSuccessType struct {
1626 // Description : has no documentation (yet)
1627 Description string `json:"description"`
1628 }
1629
1630 // NewDeviceDeleteOnUnlinkSuccessType returns a new DeviceDeleteOnUnlinkSuccessType instance
1631 func NewDeviceDeleteOnUnlinkSuccessType(Description string) *DeviceDeleteOnUnlinkSuccessType {
1632 s := new(DeviceDeleteOnUnlinkSuccessType)
1633 s.Description = Description
1634 return s
1635 }
1636
1637 // DeviceLinkFailDetails : Failed to link device.
1638 type DeviceLinkFailDetails struct {
1639 // IpAddress : IP address. Might be missing due to historical data gap.
1640 IpAddress string `json:"ip_address,omitempty"`
1641 // DeviceType : A description of the device used while user approval
1642 // blocked.
1643 DeviceType *DeviceType `json:"device_type"`
1644 }
1645
1646 // NewDeviceLinkFailDetails returns a new DeviceLinkFailDetails instance
1647 func NewDeviceLinkFailDetails(DeviceType *DeviceType) *DeviceLinkFailDetails {
1648 s := new(DeviceLinkFailDetails)
1649 s.DeviceType = DeviceType
1650 return s
1651 }
1652
1653 // DeviceLinkFailType : has no documentation (yet)
1654 type DeviceLinkFailType struct {
1655 // Description : has no documentation (yet)
1656 Description string `json:"description"`
1657 }
1658
1659 // NewDeviceLinkFailType returns a new DeviceLinkFailType instance
1660 func NewDeviceLinkFailType(Description string) *DeviceLinkFailType {
1661 s := new(DeviceLinkFailType)
1662 s.Description = Description
1663 return s
1664 }
1665
1666 // DeviceLinkSuccessDetails : Linked device.
1667 type DeviceLinkSuccessDetails struct {
1668 // DeviceSessionInfo : Device's session logged information.
1669 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"`
1670 }
1671
1672 // NewDeviceLinkSuccessDetails returns a new DeviceLinkSuccessDetails instance
1673 func NewDeviceLinkSuccessDetails() *DeviceLinkSuccessDetails {
1674 s := new(DeviceLinkSuccessDetails)
1675 return s
1676 }
1677
1678 // DeviceLinkSuccessType : has no documentation (yet)
1679 type DeviceLinkSuccessType struct {
1680 // Description : has no documentation (yet)
1681 Description string `json:"description"`
1682 }
1683
1684 // NewDeviceLinkSuccessType returns a new DeviceLinkSuccessType instance
1685 func NewDeviceLinkSuccessType(Description string) *DeviceLinkSuccessType {
1686 s := new(DeviceLinkSuccessType)
1687 s.Description = Description
1688 return s
1689 }
1690
1691 // DeviceManagementDisabledDetails : Disabled device management.
1692 type DeviceManagementDisabledDetails struct {
1693 }
1694
1695 // NewDeviceManagementDisabledDetails returns a new DeviceManagementDisabledDetails instance
1696 func NewDeviceManagementDisabledDetails() *DeviceManagementDisabledDetails {
1697 s := new(DeviceManagementDisabledDetails)
1698 return s
1699 }
1700
1701 // DeviceManagementDisabledType : has no documentation (yet)
1702 type DeviceManagementDisabledType struct {
1703 // Description : has no documentation (yet)
1704 Description string `json:"description"`
1705 }
1706
1707 // NewDeviceManagementDisabledType returns a new DeviceManagementDisabledType instance
1708 func NewDeviceManagementDisabledType(Description string) *DeviceManagementDisabledType {
1709 s := new(DeviceManagementDisabledType)
1710 s.Description = Description
1711 return s
1712 }
1713
1714 // DeviceManagementEnabledDetails : Enabled device management.
1715 type DeviceManagementEnabledDetails struct {
1716 }
1717
1718 // NewDeviceManagementEnabledDetails returns a new DeviceManagementEnabledDetails instance
1719 func NewDeviceManagementEnabledDetails() *DeviceManagementEnabledDetails {
1720 s := new(DeviceManagementEnabledDetails)
1721 return s
1722 }
1723
1724 // DeviceManagementEnabledType : has no documentation (yet)
1725 type DeviceManagementEnabledType struct {
1726 // Description : has no documentation (yet)
1727 Description string `json:"description"`
1728 }
1729
1730 // NewDeviceManagementEnabledType returns a new DeviceManagementEnabledType instance
1731 func NewDeviceManagementEnabledType(Description string) *DeviceManagementEnabledType {
1732 s := new(DeviceManagementEnabledType)
1733 s.Description = Description
1734 return s
1735 }
1736
1737 // DeviceType : has no documentation (yet)
1738 type DeviceType struct {
1739 dropbox.Tagged
1740 }
1741
1742 // Valid tag values for DeviceType
1743 const (
1744 DeviceTypeDesktop = "desktop"
1745 DeviceTypeMobile = "mobile"
1746 DeviceTypeOther = "other"
1747 )
1748
1749 // DeviceUnlinkDetails : Disconnected device.
1750 type DeviceUnlinkDetails struct {
1751 // SessionInfo : Session unique id.
1752 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
1753 // DisplayName : The device name. Might be missing due to historical data
1754 // gap.
1755 DisplayName string `json:"display_name,omitempty"`
1756 // DeleteData : True if the user requested to delete data after device
1757 // unlink, false otherwise.
1758 DeleteData bool `json:"delete_data"`
1759 }
1760
1761 // NewDeviceUnlinkDetails returns a new DeviceUnlinkDetails instance
1762 func NewDeviceUnlinkDetails(DeleteData bool) *DeviceUnlinkDetails {
1763 s := new(DeviceUnlinkDetails)
1764 s.DeleteData = DeleteData
1765 return s
1766 }
1767
1768 // DeviceUnlinkPolicy : has no documentation (yet)
1769 type DeviceUnlinkPolicy struct {
1770 dropbox.Tagged
1771 }
1772
1773 // Valid tag values for DeviceUnlinkPolicy
1774 const (
1775 DeviceUnlinkPolicyRemove = "remove"
1776 DeviceUnlinkPolicyKeep = "keep"
1777 DeviceUnlinkPolicyOther = "other"
1778 )
1779
1780 // DeviceUnlinkType : has no documentation (yet)
1781 type DeviceUnlinkType struct {
1782 // Description : has no documentation (yet)
1783 Description string `json:"description"`
1784 }
1785
1786 // NewDeviceUnlinkType returns a new DeviceUnlinkType instance
1787 func NewDeviceUnlinkType(Description string) *DeviceUnlinkType {
1788 s := new(DeviceUnlinkType)
1789 s.Description = Description
1790 return s
1791 }
1792
1793 // DirectoryRestrictionsAddMembersDetails : Added members to directory
1794 // restrictions list.
1795 type DirectoryRestrictionsAddMembersDetails struct {
1796 }
1797
1798 // NewDirectoryRestrictionsAddMembersDetails returns a new DirectoryRestrictionsAddMembersDetails instance
1799 func NewDirectoryRestrictionsAddMembersDetails() *DirectoryRestrictionsAddMembersDetails {
1800 s := new(DirectoryRestrictionsAddMembersDetails)
1801 return s
1802 }
1803
1804 // DirectoryRestrictionsAddMembersType : has no documentation (yet)
1805 type DirectoryRestrictionsAddMembersType struct {
1806 // Description : has no documentation (yet)
1807 Description string `json:"description"`
1808 }
1809
1810 // NewDirectoryRestrictionsAddMembersType returns a new DirectoryRestrictionsAddMembersType instance
1811 func NewDirectoryRestrictionsAddMembersType(Description string) *DirectoryRestrictionsAddMembersType {
1812 s := new(DirectoryRestrictionsAddMembersType)
1813 s.Description = Description
1814 return s
1815 }
1816
1817 // DirectoryRestrictionsRemoveMembersDetails : Removed members from directory
1818 // restrictions list.
1819 type DirectoryRestrictionsRemoveMembersDetails struct {
1820 }
1821
1822 // NewDirectoryRestrictionsRemoveMembersDetails returns a new DirectoryRestrictionsRemoveMembersDetails instance
1823 func NewDirectoryRestrictionsRemoveMembersDetails() *DirectoryRestrictionsRemoveMembersDetails {
1824 s := new(DirectoryRestrictionsRemoveMembersDetails)
1825 return s
1826 }
1827
1828 // DirectoryRestrictionsRemoveMembersType : has no documentation (yet)
1829 type DirectoryRestrictionsRemoveMembersType struct {
1830 // Description : has no documentation (yet)
1831 Description string `json:"description"`
1832 }
1833
1834 // NewDirectoryRestrictionsRemoveMembersType returns a new DirectoryRestrictionsRemoveMembersType instance
1835 func NewDirectoryRestrictionsRemoveMembersType(Description string) *DirectoryRestrictionsRemoveMembersType {
1836 s := new(DirectoryRestrictionsRemoveMembersType)
1837 s.Description = Description
1838 return s
1839 }
1840
1841 // DisabledDomainInvitesDetails : Disabled domain invites.
1842 type DisabledDomainInvitesDetails struct {
1843 }
1844
1845 // NewDisabledDomainInvitesDetails returns a new DisabledDomainInvitesDetails instance
1846 func NewDisabledDomainInvitesDetails() *DisabledDomainInvitesDetails {
1847 s := new(DisabledDomainInvitesDetails)
1848 return s
1849 }
1850
1851 // DisabledDomainInvitesType : has no documentation (yet)
1852 type DisabledDomainInvitesType struct {
1853 // Description : has no documentation (yet)
1854 Description string `json:"description"`
1855 }
1856
1857 // NewDisabledDomainInvitesType returns a new DisabledDomainInvitesType instance
1858 func NewDisabledDomainInvitesType(Description string) *DisabledDomainInvitesType {
1859 s := new(DisabledDomainInvitesType)
1860 s.Description = Description
1861 return s
1862 }
1863
1864 // DomainInvitesApproveRequestToJoinTeamDetails : Approved user's request to
1865 // join team.
1866 type DomainInvitesApproveRequestToJoinTeamDetails struct {
1867 }
1868
1869 // NewDomainInvitesApproveRequestToJoinTeamDetails returns a new DomainInvitesApproveRequestToJoinTeamDetails instance
1870 func NewDomainInvitesApproveRequestToJoinTeamDetails() *DomainInvitesApproveRequestToJoinTeamDetails {
1871 s := new(DomainInvitesApproveRequestToJoinTeamDetails)
1872 return s
1873 }
1874
1875 // DomainInvitesApproveRequestToJoinTeamType : has no documentation (yet)
1876 type DomainInvitesApproveRequestToJoinTeamType struct {
1877 // Description : has no documentation (yet)
1878 Description string `json:"description"`
1879 }
1880
1881 // NewDomainInvitesApproveRequestToJoinTeamType returns a new DomainInvitesApproveRequestToJoinTeamType instance
1882 func NewDomainInvitesApproveRequestToJoinTeamType(Description string) *DomainInvitesApproveRequestToJoinTeamType {
1883 s := new(DomainInvitesApproveRequestToJoinTeamType)
1884 s.Description = Description
1885 return s
1886 }
1887
1888 // DomainInvitesDeclineRequestToJoinTeamDetails : Declined user's request to
1889 // join team.
1890 type DomainInvitesDeclineRequestToJoinTeamDetails struct {
1891 }
1892
1893 // NewDomainInvitesDeclineRequestToJoinTeamDetails returns a new DomainInvitesDeclineRequestToJoinTeamDetails instance
1894 func NewDomainInvitesDeclineRequestToJoinTeamDetails() *DomainInvitesDeclineRequestToJoinTeamDetails {
1895 s := new(DomainInvitesDeclineRequestToJoinTeamDetails)
1896 return s
1897 }
1898
1899 // DomainInvitesDeclineRequestToJoinTeamType : has no documentation (yet)
1900 type DomainInvitesDeclineRequestToJoinTeamType struct {
1901 // Description : has no documentation (yet)
1902 Description string `json:"description"`
1903 }
1904
1905 // NewDomainInvitesDeclineRequestToJoinTeamType returns a new DomainInvitesDeclineRequestToJoinTeamType instance
1906 func NewDomainInvitesDeclineRequestToJoinTeamType(Description string) *DomainInvitesDeclineRequestToJoinTeamType {
1907 s := new(DomainInvitesDeclineRequestToJoinTeamType)
1908 s.Description = Description
1909 return s
1910 }
1911
1912 // DomainInvitesEmailExistingUsersDetails : Sent domain invites to existing
1913 // domain accounts.
1914 type DomainInvitesEmailExistingUsersDetails struct {
1915 // DomainName : Domain names.
1916 DomainName string `json:"domain_name"`
1917 // NumRecipients : Number of recipients.
1918 NumRecipients uint64 `json:"num_recipients"`
1919 }
1920
1921 // NewDomainInvitesEmailExistingUsersDetails returns a new DomainInvitesEmailExistingUsersDetails instance
1922 func NewDomainInvitesEmailExistingUsersDetails(DomainName string, NumRecipients uint64) *DomainInvitesEmailExistingUsersDetails {
1923 s := new(DomainInvitesEmailExistingUsersDetails)
1924 s.DomainName = DomainName
1925 s.NumRecipients = NumRecipients
1926 return s
1927 }
1928
1929 // DomainInvitesEmailExistingUsersType : has no documentation (yet)
1930 type DomainInvitesEmailExistingUsersType struct {
1931 // Description : has no documentation (yet)
1932 Description string `json:"description"`
1933 }
1934
1935 // NewDomainInvitesEmailExistingUsersType returns a new DomainInvitesEmailExistingUsersType instance
1936 func NewDomainInvitesEmailExistingUsersType(Description string) *DomainInvitesEmailExistingUsersType {
1937 s := new(DomainInvitesEmailExistingUsersType)
1938 s.Description = Description
1939 return s
1940 }
1941
1942 // DomainInvitesRequestToJoinTeamDetails : Requested to join team.
1943 type DomainInvitesRequestToJoinTeamDetails struct {
1944 }
1945
1946 // NewDomainInvitesRequestToJoinTeamDetails returns a new DomainInvitesRequestToJoinTeamDetails instance
1947 func NewDomainInvitesRequestToJoinTeamDetails() *DomainInvitesRequestToJoinTeamDetails {
1948 s := new(DomainInvitesRequestToJoinTeamDetails)
1949 return s
1950 }
1951
1952 // DomainInvitesRequestToJoinTeamType : has no documentation (yet)
1953 type DomainInvitesRequestToJoinTeamType struct {
1954 // Description : has no documentation (yet)
1955 Description string `json:"description"`
1956 }
1957
1958 // NewDomainInvitesRequestToJoinTeamType returns a new DomainInvitesRequestToJoinTeamType instance
1959 func NewDomainInvitesRequestToJoinTeamType(Description string) *DomainInvitesRequestToJoinTeamType {
1960 s := new(DomainInvitesRequestToJoinTeamType)
1961 s.Description = Description
1962 return s
1963 }
1964
1965 // DomainInvitesSetInviteNewUserPrefToNoDetails : Disabled "Automatically invite
1966 // new users".
1967 type DomainInvitesSetInviteNewUserPrefToNoDetails struct {
1968 }
1969
1970 // NewDomainInvitesSetInviteNewUserPrefToNoDetails returns a new DomainInvitesSetInviteNewUserPrefToNoDetails instance
1971 func NewDomainInvitesSetInviteNewUserPrefToNoDetails() *DomainInvitesSetInviteNewUserPrefToNoDetails {
1972 s := new(DomainInvitesSetInviteNewUserPrefToNoDetails)
1973 return s
1974 }
1975
1976 // DomainInvitesSetInviteNewUserPrefToNoType : has no documentation (yet)
1977 type DomainInvitesSetInviteNewUserPrefToNoType struct {
1978 // Description : has no documentation (yet)
1979 Description string `json:"description"`
1980 }
1981
1982 // NewDomainInvitesSetInviteNewUserPrefToNoType returns a new DomainInvitesSetInviteNewUserPrefToNoType instance
1983 func NewDomainInvitesSetInviteNewUserPrefToNoType(Description string) *DomainInvitesSetInviteNewUserPrefToNoType {
1984 s := new(DomainInvitesSetInviteNewUserPrefToNoType)
1985 s.Description = Description
1986 return s
1987 }
1988
1989 // DomainInvitesSetInviteNewUserPrefToYesDetails : Enabled "Automatically invite
1990 // new users".
1991 type DomainInvitesSetInviteNewUserPrefToYesDetails struct {
1992 }
1993
1994 // NewDomainInvitesSetInviteNewUserPrefToYesDetails returns a new DomainInvitesSetInviteNewUserPrefToYesDetails instance
1995 func NewDomainInvitesSetInviteNewUserPrefToYesDetails() *DomainInvitesSetInviteNewUserPrefToYesDetails {
1996 s := new(DomainInvitesSetInviteNewUserPrefToYesDetails)
1997 return s
1998 }
1999
2000 // DomainInvitesSetInviteNewUserPrefToYesType : has no documentation (yet)
2001 type DomainInvitesSetInviteNewUserPrefToYesType struct {
2002 // Description : has no documentation (yet)
2003 Description string `json:"description"`
2004 }
2005
2006 // NewDomainInvitesSetInviteNewUserPrefToYesType returns a new DomainInvitesSetInviteNewUserPrefToYesType instance
2007 func NewDomainInvitesSetInviteNewUserPrefToYesType(Description string) *DomainInvitesSetInviteNewUserPrefToYesType {
2008 s := new(DomainInvitesSetInviteNewUserPrefToYesType)
2009 s.Description = Description
2010 return s
2011 }
2012
2013 // DomainVerificationAddDomainFailDetails : Failed to verify team domain.
2014 type DomainVerificationAddDomainFailDetails struct {
2015 // DomainName : Domain name.
2016 DomainName string `json:"domain_name"`
2017 // VerificationMethod : Domain name verification method. Might be missing
2018 // due to historical data gap.
2019 VerificationMethod string `json:"verification_method,omitempty"`
2020 }
2021
2022 // NewDomainVerificationAddDomainFailDetails returns a new DomainVerificationAddDomainFailDetails instance
2023 func NewDomainVerificationAddDomainFailDetails(DomainName string) *DomainVerificationAddDomainFailDetails {
2024 s := new(DomainVerificationAddDomainFailDetails)
2025 s.DomainName = DomainName
2026 return s
2027 }
2028
2029 // DomainVerificationAddDomainFailType : has no documentation (yet)
2030 type DomainVerificationAddDomainFailType struct {
2031 // Description : has no documentation (yet)
2032 Description string `json:"description"`
2033 }
2034
2035 // NewDomainVerificationAddDomainFailType returns a new DomainVerificationAddDomainFailType instance
2036 func NewDomainVerificationAddDomainFailType(Description string) *DomainVerificationAddDomainFailType {
2037 s := new(DomainVerificationAddDomainFailType)
2038 s.Description = Description
2039 return s
2040 }
2041
2042 // DomainVerificationAddDomainSuccessDetails : Verified team domain.
2043 type DomainVerificationAddDomainSuccessDetails struct {
2044 // DomainNames : Domain names.
2045 DomainNames []string `json:"domain_names"`
2046 // VerificationMethod : Domain name verification method. Might be missing
2047 // due to historical data gap.
2048 VerificationMethod string `json:"verification_method,omitempty"`
2049 }
2050
2051 // NewDomainVerificationAddDomainSuccessDetails returns a new DomainVerificationAddDomainSuccessDetails instance
2052 func NewDomainVerificationAddDomainSuccessDetails(DomainNames []string) *DomainVerificationAddDomainSuccessDetails {
2053 s := new(DomainVerificationAddDomainSuccessDetails)
2054 s.DomainNames = DomainNames
2055 return s
2056 }
2057
2058 // DomainVerificationAddDomainSuccessType : has no documentation (yet)
2059 type DomainVerificationAddDomainSuccessType struct {
2060 // Description : has no documentation (yet)
2061 Description string `json:"description"`
2062 }
2063
2064 // NewDomainVerificationAddDomainSuccessType returns a new DomainVerificationAddDomainSuccessType instance
2065 func NewDomainVerificationAddDomainSuccessType(Description string) *DomainVerificationAddDomainSuccessType {
2066 s := new(DomainVerificationAddDomainSuccessType)
2067 s.Description = Description
2068 return s
2069 }
2070
2071 // DomainVerificationRemoveDomainDetails : Removed domain from list of verified
2072 // team domains.
2073 type DomainVerificationRemoveDomainDetails struct {
2074 // DomainNames : Domain names.
2075 DomainNames []string `json:"domain_names"`
2076 }
2077
2078 // NewDomainVerificationRemoveDomainDetails returns a new DomainVerificationRemoveDomainDetails instance
2079 func NewDomainVerificationRemoveDomainDetails(DomainNames []string) *DomainVerificationRemoveDomainDetails {
2080 s := new(DomainVerificationRemoveDomainDetails)
2081 s.DomainNames = DomainNames
2082 return s
2083 }
2084
2085 // DomainVerificationRemoveDomainType : has no documentation (yet)
2086 type DomainVerificationRemoveDomainType struct {
2087 // Description : has no documentation (yet)
2088 Description string `json:"description"`
2089 }
2090
2091 // NewDomainVerificationRemoveDomainType returns a new DomainVerificationRemoveDomainType instance
2092 func NewDomainVerificationRemoveDomainType(Description string) *DomainVerificationRemoveDomainType {
2093 s := new(DomainVerificationRemoveDomainType)
2094 s.Description = Description
2095 return s
2096 }
2097
2098 // DownloadPolicyType : Shared content downloads policy
2099 type DownloadPolicyType struct {
2100 dropbox.Tagged
2101 }
2102
2103 // Valid tag values for DownloadPolicyType
2104 const (
2105 DownloadPolicyTypeAllow = "allow"
2106 DownloadPolicyTypeDisallow = "disallow"
2107 DownloadPolicyTypeOther = "other"
2108 )
2109
2110 // DurationLogInfo : Represents a time duration: unit and amount
2111 type DurationLogInfo struct {
2112 // Unit : Time unit.
2113 Unit *TimeUnit `json:"unit"`
2114 // Amount : Amount of time.
2115 Amount uint64 `json:"amount"`
2116 }
2117
2118 // NewDurationLogInfo returns a new DurationLogInfo instance
2119 func NewDurationLogInfo(Unit *TimeUnit, Amount uint64) *DurationLogInfo {
2120 s := new(DurationLogInfo)
2121 s.Unit = Unit
2122 s.Amount = Amount
2123 return s
2124 }
2125
2126 // EmmAddExceptionDetails : Added members to EMM exception list.
2127 type EmmAddExceptionDetails struct {
2128 }
2129
2130 // NewEmmAddExceptionDetails returns a new EmmAddExceptionDetails instance
2131 func NewEmmAddExceptionDetails() *EmmAddExceptionDetails {
2132 s := new(EmmAddExceptionDetails)
2133 return s
2134 }
2135
2136 // EmmAddExceptionType : has no documentation (yet)
2137 type EmmAddExceptionType struct {
2138 // Description : has no documentation (yet)
2139 Description string `json:"description"`
2140 }
2141
2142 // NewEmmAddExceptionType returns a new EmmAddExceptionType instance
2143 func NewEmmAddExceptionType(Description string) *EmmAddExceptionType {
2144 s := new(EmmAddExceptionType)
2145 s.Description = Description
2146 return s
2147 }
2148
2149 // EmmChangePolicyDetails : Enabled/disabled enterprise mobility management for
2150 // members.
2151 type EmmChangePolicyDetails struct {
2152 // NewValue : New enterprise mobility management policy.
2153 NewValue *team_policies.EmmState `json:"new_value"`
2154 // PreviousValue : Previous enterprise mobility management policy. Might be
2155 // missing due to historical data gap.
2156 PreviousValue *team_policies.EmmState `json:"previous_value,omitempty"`
2157 }
2158
2159 // NewEmmChangePolicyDetails returns a new EmmChangePolicyDetails instance
2160 func NewEmmChangePolicyDetails(NewValue *team_policies.EmmState) *EmmChangePolicyDetails {
2161 s := new(EmmChangePolicyDetails)
2162 s.NewValue = NewValue
2163 return s
2164 }
2165
2166 // EmmChangePolicyType : has no documentation (yet)
2167 type EmmChangePolicyType struct {
2168 // Description : has no documentation (yet)
2169 Description string `json:"description"`
2170 }
2171
2172 // NewEmmChangePolicyType returns a new EmmChangePolicyType instance
2173 func NewEmmChangePolicyType(Description string) *EmmChangePolicyType {
2174 s := new(EmmChangePolicyType)
2175 s.Description = Description
2176 return s
2177 }
2178
2179 // EmmCreateExceptionsReportDetails : Created EMM-excluded users report.
2180 type EmmCreateExceptionsReportDetails struct {
2181 }
2182
2183 // NewEmmCreateExceptionsReportDetails returns a new EmmCreateExceptionsReportDetails instance
2184 func NewEmmCreateExceptionsReportDetails() *EmmCreateExceptionsReportDetails {
2185 s := new(EmmCreateExceptionsReportDetails)
2186 return s
2187 }
2188
2189 // EmmCreateExceptionsReportType : has no documentation (yet)
2190 type EmmCreateExceptionsReportType struct {
2191 // Description : has no documentation (yet)
2192 Description string `json:"description"`
2193 }
2194
2195 // NewEmmCreateExceptionsReportType returns a new EmmCreateExceptionsReportType instance
2196 func NewEmmCreateExceptionsReportType(Description string) *EmmCreateExceptionsReportType {
2197 s := new(EmmCreateExceptionsReportType)
2198 s.Description = Description
2199 return s
2200 }
2201
2202 // EmmCreateUsageReportDetails : Created EMM mobile app usage report.
2203 type EmmCreateUsageReportDetails struct {
2204 }
2205
2206 // NewEmmCreateUsageReportDetails returns a new EmmCreateUsageReportDetails instance
2207 func NewEmmCreateUsageReportDetails() *EmmCreateUsageReportDetails {
2208 s := new(EmmCreateUsageReportDetails)
2209 return s
2210 }
2211
2212 // EmmCreateUsageReportType : has no documentation (yet)
2213 type EmmCreateUsageReportType struct {
2214 // Description : has no documentation (yet)
2215 Description string `json:"description"`
2216 }
2217
2218 // NewEmmCreateUsageReportType returns a new EmmCreateUsageReportType instance
2219 func NewEmmCreateUsageReportType(Description string) *EmmCreateUsageReportType {
2220 s := new(EmmCreateUsageReportType)
2221 s.Description = Description
2222 return s
2223 }
2224
2225 // EmmErrorDetails : Failed to sign in via EMM.
2226 type EmmErrorDetails struct {
2227 // ErrorDetails : Error details.
2228 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
2229 }
2230
2231 // NewEmmErrorDetails returns a new EmmErrorDetails instance
2232 func NewEmmErrorDetails(ErrorDetails *FailureDetailsLogInfo) *EmmErrorDetails {
2233 s := new(EmmErrorDetails)
2234 s.ErrorDetails = ErrorDetails
2235 return s
2236 }
2237
2238 // EmmErrorType : has no documentation (yet)
2239 type EmmErrorType struct {
2240 // Description : has no documentation (yet)
2241 Description string `json:"description"`
2242 }
2243
2244 // NewEmmErrorType returns a new EmmErrorType instance
2245 func NewEmmErrorType(Description string) *EmmErrorType {
2246 s := new(EmmErrorType)
2247 s.Description = Description
2248 return s
2249 }
2250
2251 // EmmRefreshAuthTokenDetails : Refreshed auth token used for setting up
2252 // enterprise mobility management.
2253 type EmmRefreshAuthTokenDetails struct {
2254 }
2255
2256 // NewEmmRefreshAuthTokenDetails returns a new EmmRefreshAuthTokenDetails instance
2257 func NewEmmRefreshAuthTokenDetails() *EmmRefreshAuthTokenDetails {
2258 s := new(EmmRefreshAuthTokenDetails)
2259 return s
2260 }
2261
2262 // EmmRefreshAuthTokenType : has no documentation (yet)
2263 type EmmRefreshAuthTokenType struct {
2264 // Description : has no documentation (yet)
2265 Description string `json:"description"`
2266 }
2267
2268 // NewEmmRefreshAuthTokenType returns a new EmmRefreshAuthTokenType instance
2269 func NewEmmRefreshAuthTokenType(Description string) *EmmRefreshAuthTokenType {
2270 s := new(EmmRefreshAuthTokenType)
2271 s.Description = Description
2272 return s
2273 }
2274
2275 // EmmRemoveExceptionDetails : Removed members from EMM exception list.
2276 type EmmRemoveExceptionDetails struct {
2277 }
2278
2279 // NewEmmRemoveExceptionDetails returns a new EmmRemoveExceptionDetails instance
2280 func NewEmmRemoveExceptionDetails() *EmmRemoveExceptionDetails {
2281 s := new(EmmRemoveExceptionDetails)
2282 return s
2283 }
2284
2285 // EmmRemoveExceptionType : has no documentation (yet)
2286 type EmmRemoveExceptionType struct {
2287 // Description : has no documentation (yet)
2288 Description string `json:"description"`
2289 }
2290
2291 // NewEmmRemoveExceptionType returns a new EmmRemoveExceptionType instance
2292 func NewEmmRemoveExceptionType(Description string) *EmmRemoveExceptionType {
2293 s := new(EmmRemoveExceptionType)
2294 s.Description = Description
2295 return s
2296 }
2297
2298 // EnabledDomainInvitesDetails : Enabled domain invites.
2299 type EnabledDomainInvitesDetails struct {
2300 }
2301
2302 // NewEnabledDomainInvitesDetails returns a new EnabledDomainInvitesDetails instance
2303 func NewEnabledDomainInvitesDetails() *EnabledDomainInvitesDetails {
2304 s := new(EnabledDomainInvitesDetails)
2305 return s
2306 }
2307
2308 // EnabledDomainInvitesType : has no documentation (yet)
2309 type EnabledDomainInvitesType struct {
2310 // Description : has no documentation (yet)
2311 Description string `json:"description"`
2312 }
2313
2314 // NewEnabledDomainInvitesType returns a new EnabledDomainInvitesType instance
2315 func NewEnabledDomainInvitesType(Description string) *EnabledDomainInvitesType {
2316 s := new(EnabledDomainInvitesType)
2317 s.Description = Description
2318 return s
2319 }
2320
2321 // EventCategory : Category of events in event audit log.
2322 type EventCategory struct {
2323 dropbox.Tagged
2324 }
2325
2326 // Valid tag values for EventCategory
2327 const (
2328 EventCategoryApps = "apps"
2329 EventCategoryComments = "comments"
2330 EventCategoryDevices = "devices"
2331 EventCategoryDomains = "domains"
2332 EventCategoryFileOperations = "file_operations"
2333 EventCategoryFileRequests = "file_requests"
2334 EventCategoryGroups = "groups"
2335 EventCategoryLogins = "logins"
2336 EventCategoryMembers = "members"
2337 EventCategoryPaper = "paper"
2338 EventCategoryPasswords = "passwords"
2339 EventCategoryReports = "reports"
2340 EventCategorySharing = "sharing"
2341 EventCategoryShowcase = "showcase"
2342 EventCategorySso = "sso"
2343 EventCategoryTeamFolders = "team_folders"
2344 EventCategoryTeamPolicies = "team_policies"
2345 EventCategoryTeamProfile = "team_profile"
2346 EventCategoryTfa = "tfa"
2347 EventCategoryOther = "other"
2348 )
2349
2350 // EventDetails : Additional fields depending on the event type.
2351 type EventDetails struct {
2352 dropbox.Tagged
2353 // AppLinkTeamDetails : has no documentation (yet)
2354 AppLinkTeamDetails *AppLinkTeamDetails `json:"app_link_team_details,omitempty"`
2355 // AppLinkUserDetails : has no documentation (yet)
2356 AppLinkUserDetails *AppLinkUserDetails `json:"app_link_user_details,omitempty"`
2357 // AppUnlinkTeamDetails : has no documentation (yet)
2358 AppUnlinkTeamDetails *AppUnlinkTeamDetails `json:"app_unlink_team_details,omitempty"`
2359 // AppUnlinkUserDetails : has no documentation (yet)
2360 AppUnlinkUserDetails *AppUnlinkUserDetails `json:"app_unlink_user_details,omitempty"`
2361 // FileAddCommentDetails : has no documentation (yet)
2362 FileAddCommentDetails *FileAddCommentDetails `json:"file_add_comment_details,omitempty"`
2363 // FileChangeCommentSubscriptionDetails : has no documentation (yet)
2364 FileChangeCommentSubscriptionDetails *FileChangeCommentSubscriptionDetails `json:"file_change_comment_subscription_details,omitempty"`
2365 // FileDeleteCommentDetails : has no documentation (yet)
2366 FileDeleteCommentDetails *FileDeleteCommentDetails `json:"file_delete_comment_details,omitempty"`
2367 // FileEditCommentDetails : has no documentation (yet)
2368 FileEditCommentDetails *FileEditCommentDetails `json:"file_edit_comment_details,omitempty"`
2369 // FileLikeCommentDetails : has no documentation (yet)
2370 FileLikeCommentDetails *FileLikeCommentDetails `json:"file_like_comment_details,omitempty"`
2371 // FileResolveCommentDetails : has no documentation (yet)
2372 FileResolveCommentDetails *FileResolveCommentDetails `json:"file_resolve_comment_details,omitempty"`
2373 // FileUnlikeCommentDetails : has no documentation (yet)
2374 FileUnlikeCommentDetails *FileUnlikeCommentDetails `json:"file_unlike_comment_details,omitempty"`
2375 // FileUnresolveCommentDetails : has no documentation (yet)
2376 FileUnresolveCommentDetails *FileUnresolveCommentDetails `json:"file_unresolve_comment_details,omitempty"`
2377 // DeviceChangeIpDesktopDetails : has no documentation (yet)
2378 DeviceChangeIpDesktopDetails *DeviceChangeIpDesktopDetails `json:"device_change_ip_desktop_details,omitempty"`
2379 // DeviceChangeIpMobileDetails : has no documentation (yet)
2380 DeviceChangeIpMobileDetails *DeviceChangeIpMobileDetails `json:"device_change_ip_mobile_details,omitempty"`
2381 // DeviceChangeIpWebDetails : has no documentation (yet)
2382 DeviceChangeIpWebDetails *DeviceChangeIpWebDetails `json:"device_change_ip_web_details,omitempty"`
2383 // DeviceDeleteOnUnlinkFailDetails : has no documentation (yet)
2384 DeviceDeleteOnUnlinkFailDetails *DeviceDeleteOnUnlinkFailDetails `json:"device_delete_on_unlink_fail_details,omitempty"`
2385 // DeviceDeleteOnUnlinkSuccessDetails : has no documentation (yet)
2386 DeviceDeleteOnUnlinkSuccessDetails *DeviceDeleteOnUnlinkSuccessDetails `json:"device_delete_on_unlink_success_details,omitempty"`
2387 // DeviceLinkFailDetails : has no documentation (yet)
2388 DeviceLinkFailDetails *DeviceLinkFailDetails `json:"device_link_fail_details,omitempty"`
2389 // DeviceLinkSuccessDetails : has no documentation (yet)
2390 DeviceLinkSuccessDetails *DeviceLinkSuccessDetails `json:"device_link_success_details,omitempty"`
2391 // DeviceManagementDisabledDetails : has no documentation (yet)
2392 DeviceManagementDisabledDetails *DeviceManagementDisabledDetails `json:"device_management_disabled_details,omitempty"`
2393 // DeviceManagementEnabledDetails : has no documentation (yet)
2394 DeviceManagementEnabledDetails *DeviceManagementEnabledDetails `json:"device_management_enabled_details,omitempty"`
2395 // DeviceUnlinkDetails : has no documentation (yet)
2396 DeviceUnlinkDetails *DeviceUnlinkDetails `json:"device_unlink_details,omitempty"`
2397 // EmmRefreshAuthTokenDetails : has no documentation (yet)
2398 EmmRefreshAuthTokenDetails *EmmRefreshAuthTokenDetails `json:"emm_refresh_auth_token_details,omitempty"`
2399 // AccountCaptureChangeAvailabilityDetails : has no documentation (yet)
2400 AccountCaptureChangeAvailabilityDetails *AccountCaptureChangeAvailabilityDetails `json:"account_capture_change_availability_details,omitempty"`
2401 // AccountCaptureMigrateAccountDetails : has no documentation (yet)
2402 AccountCaptureMigrateAccountDetails *AccountCaptureMigrateAccountDetails `json:"account_capture_migrate_account_details,omitempty"`
2403 // AccountCaptureNotificationEmailsSentDetails : has no documentation (yet)
2404 AccountCaptureNotificationEmailsSentDetails *AccountCaptureNotificationEmailsSentDetails `json:"account_capture_notification_emails_sent_details,omitempty"`
2405 // AccountCaptureRelinquishAccountDetails : has no documentation (yet)
2406 AccountCaptureRelinquishAccountDetails *AccountCaptureRelinquishAccountDetails `json:"account_capture_relinquish_account_details,omitempty"`
2407 // DisabledDomainInvitesDetails : has no documentation (yet)
2408 DisabledDomainInvitesDetails *DisabledDomainInvitesDetails `json:"disabled_domain_invites_details,omitempty"`
2409 // DomainInvitesApproveRequestToJoinTeamDetails : has no documentation (yet)
2410 DomainInvitesApproveRequestToJoinTeamDetails *DomainInvitesApproveRequestToJoinTeamDetails `json:"domain_invites_approve_request_to_join_team_details,omitempty"`
2411 // DomainInvitesDeclineRequestToJoinTeamDetails : has no documentation (yet)
2412 DomainInvitesDeclineRequestToJoinTeamDetails *DomainInvitesDeclineRequestToJoinTeamDetails `json:"domain_invites_decline_request_to_join_team_details,omitempty"`
2413 // DomainInvitesEmailExistingUsersDetails : has no documentation (yet)
2414 DomainInvitesEmailExistingUsersDetails *DomainInvitesEmailExistingUsersDetails `json:"domain_invites_email_existing_users_details,omitempty"`
2415 // DomainInvitesRequestToJoinTeamDetails : has no documentation (yet)
2416 DomainInvitesRequestToJoinTeamDetails *DomainInvitesRequestToJoinTeamDetails `json:"domain_invites_request_to_join_team_details,omitempty"`
2417 // DomainInvitesSetInviteNewUserPrefToNoDetails : has no documentation (yet)
2418 DomainInvitesSetInviteNewUserPrefToNoDetails *DomainInvitesSetInviteNewUserPrefToNoDetails `json:"domain_invites_set_invite_new_user_pref_to_no_details,omitempty"`
2419 // DomainInvitesSetInviteNewUserPrefToYesDetails : has no documentation
2420 // (yet)
2421 DomainInvitesSetInviteNewUserPrefToYesDetails *DomainInvitesSetInviteNewUserPrefToYesDetails `json:"domain_invites_set_invite_new_user_pref_to_yes_details,omitempty"`
2422 // DomainVerificationAddDomainFailDetails : has no documentation (yet)
2423 DomainVerificationAddDomainFailDetails *DomainVerificationAddDomainFailDetails `json:"domain_verification_add_domain_fail_details,omitempty"`
2424 // DomainVerificationAddDomainSuccessDetails : has no documentation (yet)
2425 DomainVerificationAddDomainSuccessDetails *DomainVerificationAddDomainSuccessDetails `json:"domain_verification_add_domain_success_details,omitempty"`
2426 // DomainVerificationRemoveDomainDetails : has no documentation (yet)
2427 DomainVerificationRemoveDomainDetails *DomainVerificationRemoveDomainDetails `json:"domain_verification_remove_domain_details,omitempty"`
2428 // EnabledDomainInvitesDetails : has no documentation (yet)
2429 EnabledDomainInvitesDetails *EnabledDomainInvitesDetails `json:"enabled_domain_invites_details,omitempty"`
2430 // CreateFolderDetails : has no documentation (yet)
2431 CreateFolderDetails *CreateFolderDetails `json:"create_folder_details,omitempty"`
2432 // FileAddDetails : has no documentation (yet)
2433 FileAddDetails *FileAddDetails `json:"file_add_details,omitempty"`
2434 // FileCopyDetails : has no documentation (yet)
2435 FileCopyDetails *FileCopyDetails `json:"file_copy_details,omitempty"`
2436 // FileDeleteDetails : has no documentation (yet)
2437 FileDeleteDetails *FileDeleteDetails `json:"file_delete_details,omitempty"`
2438 // FileDownloadDetails : has no documentation (yet)
2439 FileDownloadDetails *FileDownloadDetails `json:"file_download_details,omitempty"`
2440 // FileEditDetails : has no documentation (yet)
2441 FileEditDetails *FileEditDetails `json:"file_edit_details,omitempty"`
2442 // FileGetCopyReferenceDetails : has no documentation (yet)
2443 FileGetCopyReferenceDetails *FileGetCopyReferenceDetails `json:"file_get_copy_reference_details,omitempty"`
2444 // FileMoveDetails : has no documentation (yet)
2445 FileMoveDetails *FileMoveDetails `json:"file_move_details,omitempty"`
2446 // FilePermanentlyDeleteDetails : has no documentation (yet)
2447 FilePermanentlyDeleteDetails *FilePermanentlyDeleteDetails `json:"file_permanently_delete_details,omitempty"`
2448 // FilePreviewDetails : has no documentation (yet)
2449 FilePreviewDetails *FilePreviewDetails `json:"file_preview_details,omitempty"`
2450 // FileRenameDetails : has no documentation (yet)
2451 FileRenameDetails *FileRenameDetails `json:"file_rename_details,omitempty"`
2452 // FileRestoreDetails : has no documentation (yet)
2453 FileRestoreDetails *FileRestoreDetails `json:"file_restore_details,omitempty"`
2454 // FileRevertDetails : has no documentation (yet)
2455 FileRevertDetails *FileRevertDetails `json:"file_revert_details,omitempty"`
2456 // FileRollbackChangesDetails : has no documentation (yet)
2457 FileRollbackChangesDetails *FileRollbackChangesDetails `json:"file_rollback_changes_details,omitempty"`
2458 // FileSaveCopyReferenceDetails : has no documentation (yet)
2459 FileSaveCopyReferenceDetails *FileSaveCopyReferenceDetails `json:"file_save_copy_reference_details,omitempty"`
2460 // FileRequestChangeDetails : has no documentation (yet)
2461 FileRequestChangeDetails *FileRequestChangeDetails `json:"file_request_change_details,omitempty"`
2462 // FileRequestCloseDetails : has no documentation (yet)
2463 FileRequestCloseDetails *FileRequestCloseDetails `json:"file_request_close_details,omitempty"`
2464 // FileRequestCreateDetails : has no documentation (yet)
2465 FileRequestCreateDetails *FileRequestCreateDetails `json:"file_request_create_details,omitempty"`
2466 // FileRequestReceiveFileDetails : has no documentation (yet)
2467 FileRequestReceiveFileDetails *FileRequestReceiveFileDetails `json:"file_request_receive_file_details,omitempty"`
2468 // GroupAddExternalIdDetails : has no documentation (yet)
2469 GroupAddExternalIdDetails *GroupAddExternalIdDetails `json:"group_add_external_id_details,omitempty"`
2470 // GroupAddMemberDetails : has no documentation (yet)
2471 GroupAddMemberDetails *GroupAddMemberDetails `json:"group_add_member_details,omitempty"`
2472 // GroupChangeExternalIdDetails : has no documentation (yet)
2473 GroupChangeExternalIdDetails *GroupChangeExternalIdDetails `json:"group_change_external_id_details,omitempty"`
2474 // GroupChangeManagementTypeDetails : has no documentation (yet)
2475 GroupChangeManagementTypeDetails *GroupChangeManagementTypeDetails `json:"group_change_management_type_details,omitempty"`
2476 // GroupChangeMemberRoleDetails : has no documentation (yet)
2477 GroupChangeMemberRoleDetails *GroupChangeMemberRoleDetails `json:"group_change_member_role_details,omitempty"`
2478 // GroupCreateDetails : has no documentation (yet)
2479 GroupCreateDetails *GroupCreateDetails `json:"group_create_details,omitempty"`
2480 // GroupDeleteDetails : has no documentation (yet)
2481 GroupDeleteDetails *GroupDeleteDetails `json:"group_delete_details,omitempty"`
2482 // GroupDescriptionUpdatedDetails : has no documentation (yet)
2483 GroupDescriptionUpdatedDetails *GroupDescriptionUpdatedDetails `json:"group_description_updated_details,omitempty"`
2484 // GroupJoinPolicyUpdatedDetails : has no documentation (yet)
2485 GroupJoinPolicyUpdatedDetails *GroupJoinPolicyUpdatedDetails `json:"group_join_policy_updated_details,omitempty"`
2486 // GroupMovedDetails : has no documentation (yet)
2487 GroupMovedDetails *GroupMovedDetails `json:"group_moved_details,omitempty"`
2488 // GroupRemoveExternalIdDetails : has no documentation (yet)
2489 GroupRemoveExternalIdDetails *GroupRemoveExternalIdDetails `json:"group_remove_external_id_details,omitempty"`
2490 // GroupRemoveMemberDetails : has no documentation (yet)
2491 GroupRemoveMemberDetails *GroupRemoveMemberDetails `json:"group_remove_member_details,omitempty"`
2492 // GroupRenameDetails : has no documentation (yet)
2493 GroupRenameDetails *GroupRenameDetails `json:"group_rename_details,omitempty"`
2494 // EmmErrorDetails : has no documentation (yet)
2495 EmmErrorDetails *EmmErrorDetails `json:"emm_error_details,omitempty"`
2496 // LoginFailDetails : has no documentation (yet)
2497 LoginFailDetails *LoginFailDetails `json:"login_fail_details,omitempty"`
2498 // LoginSuccessDetails : has no documentation (yet)
2499 LoginSuccessDetails *LoginSuccessDetails `json:"login_success_details,omitempty"`
2500 // LogoutDetails : has no documentation (yet)
2501 LogoutDetails *LogoutDetails `json:"logout_details,omitempty"`
2502 // ResellerSupportSessionEndDetails : has no documentation (yet)
2503 ResellerSupportSessionEndDetails *ResellerSupportSessionEndDetails `json:"reseller_support_session_end_details,omitempty"`
2504 // ResellerSupportSessionStartDetails : has no documentation (yet)
2505 ResellerSupportSessionStartDetails *ResellerSupportSessionStartDetails `json:"reseller_support_session_start_details,omitempty"`
2506 // SignInAsSessionEndDetails : has no documentation (yet)
2507 SignInAsSessionEndDetails *SignInAsSessionEndDetails `json:"sign_in_as_session_end_details,omitempty"`
2508 // SignInAsSessionStartDetails : has no documentation (yet)
2509 SignInAsSessionStartDetails *SignInAsSessionStartDetails `json:"sign_in_as_session_start_details,omitempty"`
2510 // SsoErrorDetails : has no documentation (yet)
2511 SsoErrorDetails *SsoErrorDetails `json:"sso_error_details,omitempty"`
2512 // MemberAddNameDetails : has no documentation (yet)
2513 MemberAddNameDetails *MemberAddNameDetails `json:"member_add_name_details,omitempty"`
2514 // MemberChangeAdminRoleDetails : has no documentation (yet)
2515 MemberChangeAdminRoleDetails *MemberChangeAdminRoleDetails `json:"member_change_admin_role_details,omitempty"`
2516 // MemberChangeEmailDetails : has no documentation (yet)
2517 MemberChangeEmailDetails *MemberChangeEmailDetails `json:"member_change_email_details,omitempty"`
2518 // MemberChangeMembershipTypeDetails : has no documentation (yet)
2519 MemberChangeMembershipTypeDetails *MemberChangeMembershipTypeDetails `json:"member_change_membership_type_details,omitempty"`
2520 // MemberChangeNameDetails : has no documentation (yet)
2521 MemberChangeNameDetails *MemberChangeNameDetails `json:"member_change_name_details,omitempty"`
2522 // MemberChangeStatusDetails : has no documentation (yet)
2523 MemberChangeStatusDetails *MemberChangeStatusDetails `json:"member_change_status_details,omitempty"`
2524 // MemberDeleteManualContactsDetails : has no documentation (yet)
2525 MemberDeleteManualContactsDetails *MemberDeleteManualContactsDetails `json:"member_delete_manual_contacts_details,omitempty"`
2526 // MemberPermanentlyDeleteAccountContentsDetails : has no documentation
2527 // (yet)
2528 MemberPermanentlyDeleteAccountContentsDetails *MemberPermanentlyDeleteAccountContentsDetails `json:"member_permanently_delete_account_contents_details,omitempty"`
2529 // MemberSpaceLimitsAddCustomQuotaDetails : has no documentation (yet)
2530 MemberSpaceLimitsAddCustomQuotaDetails *MemberSpaceLimitsAddCustomQuotaDetails `json:"member_space_limits_add_custom_quota_details,omitempty"`
2531 // MemberSpaceLimitsChangeCustomQuotaDetails : has no documentation (yet)
2532 MemberSpaceLimitsChangeCustomQuotaDetails *MemberSpaceLimitsChangeCustomQuotaDetails `json:"member_space_limits_change_custom_quota_details,omitempty"`
2533 // MemberSpaceLimitsChangeStatusDetails : has no documentation (yet)
2534 MemberSpaceLimitsChangeStatusDetails *MemberSpaceLimitsChangeStatusDetails `json:"member_space_limits_change_status_details,omitempty"`
2535 // MemberSpaceLimitsRemoveCustomQuotaDetails : has no documentation (yet)
2536 MemberSpaceLimitsRemoveCustomQuotaDetails *MemberSpaceLimitsRemoveCustomQuotaDetails `json:"member_space_limits_remove_custom_quota_details,omitempty"`
2537 // MemberSuggestDetails : has no documentation (yet)
2538 MemberSuggestDetails *MemberSuggestDetails `json:"member_suggest_details,omitempty"`
2539 // MemberTransferAccountContentsDetails : has no documentation (yet)
2540 MemberTransferAccountContentsDetails *MemberTransferAccountContentsDetails `json:"member_transfer_account_contents_details,omitempty"`
2541 // SecondaryMailsPolicyChangedDetails : has no documentation (yet)
2542 SecondaryMailsPolicyChangedDetails *SecondaryMailsPolicyChangedDetails `json:"secondary_mails_policy_changed_details,omitempty"`
2543 // PaperContentAddMemberDetails : has no documentation (yet)
2544 PaperContentAddMemberDetails *PaperContentAddMemberDetails `json:"paper_content_add_member_details,omitempty"`
2545 // PaperContentAddToFolderDetails : has no documentation (yet)
2546 PaperContentAddToFolderDetails *PaperContentAddToFolderDetails `json:"paper_content_add_to_folder_details,omitempty"`
2547 // PaperContentArchiveDetails : has no documentation (yet)
2548 PaperContentArchiveDetails *PaperContentArchiveDetails `json:"paper_content_archive_details,omitempty"`
2549 // PaperContentCreateDetails : has no documentation (yet)
2550 PaperContentCreateDetails *PaperContentCreateDetails `json:"paper_content_create_details,omitempty"`
2551 // PaperContentPermanentlyDeleteDetails : has no documentation (yet)
2552 PaperContentPermanentlyDeleteDetails *PaperContentPermanentlyDeleteDetails `json:"paper_content_permanently_delete_details,omitempty"`
2553 // PaperContentRemoveFromFolderDetails : has no documentation (yet)
2554 PaperContentRemoveFromFolderDetails *PaperContentRemoveFromFolderDetails `json:"paper_content_remove_from_folder_details,omitempty"`
2555 // PaperContentRemoveMemberDetails : has no documentation (yet)
2556 PaperContentRemoveMemberDetails *PaperContentRemoveMemberDetails `json:"paper_content_remove_member_details,omitempty"`
2557 // PaperContentRenameDetails : has no documentation (yet)
2558 PaperContentRenameDetails *PaperContentRenameDetails `json:"paper_content_rename_details,omitempty"`
2559 // PaperContentRestoreDetails : has no documentation (yet)
2560 PaperContentRestoreDetails *PaperContentRestoreDetails `json:"paper_content_restore_details,omitempty"`
2561 // PaperDocAddCommentDetails : has no documentation (yet)
2562 PaperDocAddCommentDetails *PaperDocAddCommentDetails `json:"paper_doc_add_comment_details,omitempty"`
2563 // PaperDocChangeMemberRoleDetails : has no documentation (yet)
2564 PaperDocChangeMemberRoleDetails *PaperDocChangeMemberRoleDetails `json:"paper_doc_change_member_role_details,omitempty"`
2565 // PaperDocChangeSharingPolicyDetails : has no documentation (yet)
2566 PaperDocChangeSharingPolicyDetails *PaperDocChangeSharingPolicyDetails `json:"paper_doc_change_sharing_policy_details,omitempty"`
2567 // PaperDocChangeSubscriptionDetails : has no documentation (yet)
2568 PaperDocChangeSubscriptionDetails *PaperDocChangeSubscriptionDetails `json:"paper_doc_change_subscription_details,omitempty"`
2569 // PaperDocDeletedDetails : has no documentation (yet)
2570 PaperDocDeletedDetails *PaperDocDeletedDetails `json:"paper_doc_deleted_details,omitempty"`
2571 // PaperDocDeleteCommentDetails : has no documentation (yet)
2572 PaperDocDeleteCommentDetails *PaperDocDeleteCommentDetails `json:"paper_doc_delete_comment_details,omitempty"`
2573 // PaperDocDownloadDetails : has no documentation (yet)
2574 PaperDocDownloadDetails *PaperDocDownloadDetails `json:"paper_doc_download_details,omitempty"`
2575 // PaperDocEditDetails : has no documentation (yet)
2576 PaperDocEditDetails *PaperDocEditDetails `json:"paper_doc_edit_details,omitempty"`
2577 // PaperDocEditCommentDetails : has no documentation (yet)
2578 PaperDocEditCommentDetails *PaperDocEditCommentDetails `json:"paper_doc_edit_comment_details,omitempty"`
2579 // PaperDocFollowedDetails : has no documentation (yet)
2580 PaperDocFollowedDetails *PaperDocFollowedDetails `json:"paper_doc_followed_details,omitempty"`
2581 // PaperDocMentionDetails : has no documentation (yet)
2582 PaperDocMentionDetails *PaperDocMentionDetails `json:"paper_doc_mention_details,omitempty"`
2583 // PaperDocOwnershipChangedDetails : has no documentation (yet)
2584 PaperDocOwnershipChangedDetails *PaperDocOwnershipChangedDetails `json:"paper_doc_ownership_changed_details,omitempty"`
2585 // PaperDocRequestAccessDetails : has no documentation (yet)
2586 PaperDocRequestAccessDetails *PaperDocRequestAccessDetails `json:"paper_doc_request_access_details,omitempty"`
2587 // PaperDocResolveCommentDetails : has no documentation (yet)
2588 PaperDocResolveCommentDetails *PaperDocResolveCommentDetails `json:"paper_doc_resolve_comment_details,omitempty"`
2589 // PaperDocRevertDetails : has no documentation (yet)
2590 PaperDocRevertDetails *PaperDocRevertDetails `json:"paper_doc_revert_details,omitempty"`
2591 // PaperDocSlackShareDetails : has no documentation (yet)
2592 PaperDocSlackShareDetails *PaperDocSlackShareDetails `json:"paper_doc_slack_share_details,omitempty"`
2593 // PaperDocTeamInviteDetails : has no documentation (yet)
2594 PaperDocTeamInviteDetails *PaperDocTeamInviteDetails `json:"paper_doc_team_invite_details,omitempty"`
2595 // PaperDocTrashedDetails : has no documentation (yet)
2596 PaperDocTrashedDetails *PaperDocTrashedDetails `json:"paper_doc_trashed_details,omitempty"`
2597 // PaperDocUnresolveCommentDetails : has no documentation (yet)
2598 PaperDocUnresolveCommentDetails *PaperDocUnresolveCommentDetails `json:"paper_doc_unresolve_comment_details,omitempty"`
2599 // PaperDocUntrashedDetails : has no documentation (yet)
2600 PaperDocUntrashedDetails *PaperDocUntrashedDetails `json:"paper_doc_untrashed_details,omitempty"`
2601 // PaperDocViewDetails : has no documentation (yet)
2602 PaperDocViewDetails *PaperDocViewDetails `json:"paper_doc_view_details,omitempty"`
2603 // PaperExternalViewAllowDetails : has no documentation (yet)
2604 PaperExternalViewAllowDetails *PaperExternalViewAllowDetails `json:"paper_external_view_allow_details,omitempty"`
2605 // PaperExternalViewDefaultTeamDetails : has no documentation (yet)
2606 PaperExternalViewDefaultTeamDetails *PaperExternalViewDefaultTeamDetails `json:"paper_external_view_default_team_details,omitempty"`
2607 // PaperExternalViewForbidDetails : has no documentation (yet)
2608 PaperExternalViewForbidDetails *PaperExternalViewForbidDetails `json:"paper_external_view_forbid_details,omitempty"`
2609 // PaperFolderChangeSubscriptionDetails : has no documentation (yet)
2610 PaperFolderChangeSubscriptionDetails *PaperFolderChangeSubscriptionDetails `json:"paper_folder_change_subscription_details,omitempty"`
2611 // PaperFolderDeletedDetails : has no documentation (yet)
2612 PaperFolderDeletedDetails *PaperFolderDeletedDetails `json:"paper_folder_deleted_details,omitempty"`
2613 // PaperFolderFollowedDetails : has no documentation (yet)
2614 PaperFolderFollowedDetails *PaperFolderFollowedDetails `json:"paper_folder_followed_details,omitempty"`
2615 // PaperFolderTeamInviteDetails : has no documentation (yet)
2616 PaperFolderTeamInviteDetails *PaperFolderTeamInviteDetails `json:"paper_folder_team_invite_details,omitempty"`
2617 // PasswordChangeDetails : has no documentation (yet)
2618 PasswordChangeDetails *PasswordChangeDetails `json:"password_change_details,omitempty"`
2619 // PasswordResetDetails : has no documentation (yet)
2620 PasswordResetDetails *PasswordResetDetails `json:"password_reset_details,omitempty"`
2621 // PasswordResetAllDetails : has no documentation (yet)
2622 PasswordResetAllDetails *PasswordResetAllDetails `json:"password_reset_all_details,omitempty"`
2623 // EmmCreateExceptionsReportDetails : has no documentation (yet)
2624 EmmCreateExceptionsReportDetails *EmmCreateExceptionsReportDetails `json:"emm_create_exceptions_report_details,omitempty"`
2625 // EmmCreateUsageReportDetails : has no documentation (yet)
2626 EmmCreateUsageReportDetails *EmmCreateUsageReportDetails `json:"emm_create_usage_report_details,omitempty"`
2627 // ExportMembersReportDetails : has no documentation (yet)
2628 ExportMembersReportDetails *ExportMembersReportDetails `json:"export_members_report_details,omitempty"`
2629 // PaperAdminExportStartDetails : has no documentation (yet)
2630 PaperAdminExportStartDetails *PaperAdminExportStartDetails `json:"paper_admin_export_start_details,omitempty"`
2631 // SmartSyncCreateAdminPrivilegeReportDetails : has no documentation (yet)
2632 SmartSyncCreateAdminPrivilegeReportDetails *SmartSyncCreateAdminPrivilegeReportDetails `json:"smart_sync_create_admin_privilege_report_details,omitempty"`
2633 // TeamActivityCreateReportDetails : has no documentation (yet)
2634 TeamActivityCreateReportDetails *TeamActivityCreateReportDetails `json:"team_activity_create_report_details,omitempty"`
2635 // CollectionShareDetails : has no documentation (yet)
2636 CollectionShareDetails *CollectionShareDetails `json:"collection_share_details,omitempty"`
2637 // NoteAclInviteOnlyDetails : has no documentation (yet)
2638 NoteAclInviteOnlyDetails *NoteAclInviteOnlyDetails `json:"note_acl_invite_only_details,omitempty"`
2639 // NoteAclLinkDetails : has no documentation (yet)
2640 NoteAclLinkDetails *NoteAclLinkDetails `json:"note_acl_link_details,omitempty"`
2641 // NoteAclTeamLinkDetails : has no documentation (yet)
2642 NoteAclTeamLinkDetails *NoteAclTeamLinkDetails `json:"note_acl_team_link_details,omitempty"`
2643 // NoteSharedDetails : has no documentation (yet)
2644 NoteSharedDetails *NoteSharedDetails `json:"note_shared_details,omitempty"`
2645 // NoteShareReceiveDetails : has no documentation (yet)
2646 NoteShareReceiveDetails *NoteShareReceiveDetails `json:"note_share_receive_details,omitempty"`
2647 // OpenNoteSharedDetails : has no documentation (yet)
2648 OpenNoteSharedDetails *OpenNoteSharedDetails `json:"open_note_shared_details,omitempty"`
2649 // SfAddGroupDetails : has no documentation (yet)
2650 SfAddGroupDetails *SfAddGroupDetails `json:"sf_add_group_details,omitempty"`
2651 // SfAllowNonMembersToViewSharedLinksDetails : has no documentation (yet)
2652 SfAllowNonMembersToViewSharedLinksDetails *SfAllowNonMembersToViewSharedLinksDetails `json:"sf_allow_non_members_to_view_shared_links_details,omitempty"`
2653 // SfExternalInviteWarnDetails : has no documentation (yet)
2654 SfExternalInviteWarnDetails *SfExternalInviteWarnDetails `json:"sf_external_invite_warn_details,omitempty"`
2655 // SfFbInviteDetails : has no documentation (yet)
2656 SfFbInviteDetails *SfFbInviteDetails `json:"sf_fb_invite_details,omitempty"`
2657 // SfFbInviteChangeRoleDetails : has no documentation (yet)
2658 SfFbInviteChangeRoleDetails *SfFbInviteChangeRoleDetails `json:"sf_fb_invite_change_role_details,omitempty"`
2659 // SfFbUninviteDetails : has no documentation (yet)
2660 SfFbUninviteDetails *SfFbUninviteDetails `json:"sf_fb_uninvite_details,omitempty"`
2661 // SfInviteGroupDetails : has no documentation (yet)
2662 SfInviteGroupDetails *SfInviteGroupDetails `json:"sf_invite_group_details,omitempty"`
2663 // SfTeamGrantAccessDetails : has no documentation (yet)
2664 SfTeamGrantAccessDetails *SfTeamGrantAccessDetails `json:"sf_team_grant_access_details,omitempty"`
2665 // SfTeamInviteDetails : has no documentation (yet)
2666 SfTeamInviteDetails *SfTeamInviteDetails `json:"sf_team_invite_details,omitempty"`
2667 // SfTeamInviteChangeRoleDetails : has no documentation (yet)
2668 SfTeamInviteChangeRoleDetails *SfTeamInviteChangeRoleDetails `json:"sf_team_invite_change_role_details,omitempty"`
2669 // SfTeamJoinDetails : has no documentation (yet)
2670 SfTeamJoinDetails *SfTeamJoinDetails `json:"sf_team_join_details,omitempty"`
2671 // SfTeamJoinFromOobLinkDetails : has no documentation (yet)
2672 SfTeamJoinFromOobLinkDetails *SfTeamJoinFromOobLinkDetails `json:"sf_team_join_from_oob_link_details,omitempty"`
2673 // SfTeamUninviteDetails : has no documentation (yet)
2674 SfTeamUninviteDetails *SfTeamUninviteDetails `json:"sf_team_uninvite_details,omitempty"`
2675 // SharedContentAddInviteesDetails : has no documentation (yet)
2676 SharedContentAddInviteesDetails *SharedContentAddInviteesDetails `json:"shared_content_add_invitees_details,omitempty"`
2677 // SharedContentAddLinkExpiryDetails : has no documentation (yet)
2678 SharedContentAddLinkExpiryDetails *SharedContentAddLinkExpiryDetails `json:"shared_content_add_link_expiry_details,omitempty"`
2679 // SharedContentAddLinkPasswordDetails : has no documentation (yet)
2680 SharedContentAddLinkPasswordDetails *SharedContentAddLinkPasswordDetails `json:"shared_content_add_link_password_details,omitempty"`
2681 // SharedContentAddMemberDetails : has no documentation (yet)
2682 SharedContentAddMemberDetails *SharedContentAddMemberDetails `json:"shared_content_add_member_details,omitempty"`
2683 // SharedContentChangeDownloadsPolicyDetails : has no documentation (yet)
2684 SharedContentChangeDownloadsPolicyDetails *SharedContentChangeDownloadsPolicyDetails `json:"shared_content_change_downloads_policy_details,omitempty"`
2685 // SharedContentChangeInviteeRoleDetails : has no documentation (yet)
2686 SharedContentChangeInviteeRoleDetails *SharedContentChangeInviteeRoleDetails `json:"shared_content_change_invitee_role_details,omitempty"`
2687 // SharedContentChangeLinkAudienceDetails : has no documentation (yet)
2688 SharedContentChangeLinkAudienceDetails *SharedContentChangeLinkAudienceDetails `json:"shared_content_change_link_audience_details,omitempty"`
2689 // SharedContentChangeLinkExpiryDetails : has no documentation (yet)
2690 SharedContentChangeLinkExpiryDetails *SharedContentChangeLinkExpiryDetails `json:"shared_content_change_link_expiry_details,omitempty"`
2691 // SharedContentChangeLinkPasswordDetails : has no documentation (yet)
2692 SharedContentChangeLinkPasswordDetails *SharedContentChangeLinkPasswordDetails `json:"shared_content_change_link_password_details,omitempty"`
2693 // SharedContentChangeMemberRoleDetails : has no documentation (yet)
2694 SharedContentChangeMemberRoleDetails *SharedContentChangeMemberRoleDetails `json:"shared_content_change_member_role_details,omitempty"`
2695 // SharedContentChangeViewerInfoPolicyDetails : has no documentation (yet)
2696 SharedContentChangeViewerInfoPolicyDetails *SharedContentChangeViewerInfoPolicyDetails `json:"shared_content_change_viewer_info_policy_details,omitempty"`
2697 // SharedContentClaimInvitationDetails : has no documentation (yet)
2698 SharedContentClaimInvitationDetails *SharedContentClaimInvitationDetails `json:"shared_content_claim_invitation_details,omitempty"`
2699 // SharedContentCopyDetails : has no documentation (yet)
2700 SharedContentCopyDetails *SharedContentCopyDetails `json:"shared_content_copy_details,omitempty"`
2701 // SharedContentDownloadDetails : has no documentation (yet)
2702 SharedContentDownloadDetails *SharedContentDownloadDetails `json:"shared_content_download_details,omitempty"`
2703 // SharedContentRelinquishMembershipDetails : has no documentation (yet)
2704 SharedContentRelinquishMembershipDetails *SharedContentRelinquishMembershipDetails `json:"shared_content_relinquish_membership_details,omitempty"`
2705 // SharedContentRemoveInviteesDetails : has no documentation (yet)
2706 SharedContentRemoveInviteesDetails *SharedContentRemoveInviteesDetails `json:"shared_content_remove_invitees_details,omitempty"`
2707 // SharedContentRemoveLinkExpiryDetails : has no documentation (yet)
2708 SharedContentRemoveLinkExpiryDetails *SharedContentRemoveLinkExpiryDetails `json:"shared_content_remove_link_expiry_details,omitempty"`
2709 // SharedContentRemoveLinkPasswordDetails : has no documentation (yet)
2710 SharedContentRemoveLinkPasswordDetails *SharedContentRemoveLinkPasswordDetails `json:"shared_content_remove_link_password_details,omitempty"`
2711 // SharedContentRemoveMemberDetails : has no documentation (yet)
2712 SharedContentRemoveMemberDetails *SharedContentRemoveMemberDetails `json:"shared_content_remove_member_details,omitempty"`
2713 // SharedContentRequestAccessDetails : has no documentation (yet)
2714 SharedContentRequestAccessDetails *SharedContentRequestAccessDetails `json:"shared_content_request_access_details,omitempty"`
2715 // SharedContentUnshareDetails : has no documentation (yet)
2716 SharedContentUnshareDetails *SharedContentUnshareDetails `json:"shared_content_unshare_details,omitempty"`
2717 // SharedContentViewDetails : has no documentation (yet)
2718 SharedContentViewDetails *SharedContentViewDetails `json:"shared_content_view_details,omitempty"`
2719 // SharedFolderChangeLinkPolicyDetails : has no documentation (yet)
2720 SharedFolderChangeLinkPolicyDetails *SharedFolderChangeLinkPolicyDetails `json:"shared_folder_change_link_policy_details,omitempty"`
2721 // SharedFolderChangeMembersInheritancePolicyDetails : has no documentation
2722 // (yet)
2723 SharedFolderChangeMembersInheritancePolicyDetails *SharedFolderChangeMembersInheritancePolicyDetails `json:"shared_folder_change_members_inheritance_policy_details,omitempty"`
2724 // SharedFolderChangeMembersManagementPolicyDetails : has no documentation
2725 // (yet)
2726 SharedFolderChangeMembersManagementPolicyDetails *SharedFolderChangeMembersManagementPolicyDetails `json:"shared_folder_change_members_management_policy_details,omitempty"`
2727 // SharedFolderChangeMembersPolicyDetails : has no documentation (yet)
2728 SharedFolderChangeMembersPolicyDetails *SharedFolderChangeMembersPolicyDetails `json:"shared_folder_change_members_policy_details,omitempty"`
2729 // SharedFolderCreateDetails : has no documentation (yet)
2730 SharedFolderCreateDetails *SharedFolderCreateDetails `json:"shared_folder_create_details,omitempty"`
2731 // SharedFolderDeclineInvitationDetails : has no documentation (yet)
2732 SharedFolderDeclineInvitationDetails *SharedFolderDeclineInvitationDetails `json:"shared_folder_decline_invitation_details,omitempty"`
2733 // SharedFolderMountDetails : has no documentation (yet)
2734 SharedFolderMountDetails *SharedFolderMountDetails `json:"shared_folder_mount_details,omitempty"`
2735 // SharedFolderNestDetails : has no documentation (yet)
2736 SharedFolderNestDetails *SharedFolderNestDetails `json:"shared_folder_nest_details,omitempty"`
2737 // SharedFolderTransferOwnershipDetails : has no documentation (yet)
2738 SharedFolderTransferOwnershipDetails *SharedFolderTransferOwnershipDetails `json:"shared_folder_transfer_ownership_details,omitempty"`
2739 // SharedFolderUnmountDetails : has no documentation (yet)
2740 SharedFolderUnmountDetails *SharedFolderUnmountDetails `json:"shared_folder_unmount_details,omitempty"`
2741 // SharedLinkAddExpiryDetails : has no documentation (yet)
2742 SharedLinkAddExpiryDetails *SharedLinkAddExpiryDetails `json:"shared_link_add_expiry_details,omitempty"`
2743 // SharedLinkChangeExpiryDetails : has no documentation (yet)
2744 SharedLinkChangeExpiryDetails *SharedLinkChangeExpiryDetails `json:"shared_link_change_expiry_details,omitempty"`
2745 // SharedLinkChangeVisibilityDetails : has no documentation (yet)
2746 SharedLinkChangeVisibilityDetails *SharedLinkChangeVisibilityDetails `json:"shared_link_change_visibility_details,omitempty"`
2747 // SharedLinkCopyDetails : has no documentation (yet)
2748 SharedLinkCopyDetails *SharedLinkCopyDetails `json:"shared_link_copy_details,omitempty"`
2749 // SharedLinkCreateDetails : has no documentation (yet)
2750 SharedLinkCreateDetails *SharedLinkCreateDetails `json:"shared_link_create_details,omitempty"`
2751 // SharedLinkDisableDetails : has no documentation (yet)
2752 SharedLinkDisableDetails *SharedLinkDisableDetails `json:"shared_link_disable_details,omitempty"`
2753 // SharedLinkDownloadDetails : has no documentation (yet)
2754 SharedLinkDownloadDetails *SharedLinkDownloadDetails `json:"shared_link_download_details,omitempty"`
2755 // SharedLinkRemoveExpiryDetails : has no documentation (yet)
2756 SharedLinkRemoveExpiryDetails *SharedLinkRemoveExpiryDetails `json:"shared_link_remove_expiry_details,omitempty"`
2757 // SharedLinkShareDetails : has no documentation (yet)
2758 SharedLinkShareDetails *SharedLinkShareDetails `json:"shared_link_share_details,omitempty"`
2759 // SharedLinkViewDetails : has no documentation (yet)
2760 SharedLinkViewDetails *SharedLinkViewDetails `json:"shared_link_view_details,omitempty"`
2761 // SharedNoteOpenedDetails : has no documentation (yet)
2762 SharedNoteOpenedDetails *SharedNoteOpenedDetails `json:"shared_note_opened_details,omitempty"`
2763 // ShmodelGroupShareDetails : has no documentation (yet)
2764 ShmodelGroupShareDetails *ShmodelGroupShareDetails `json:"shmodel_group_share_details,omitempty"`
2765 // ShowcaseAccessGrantedDetails : has no documentation (yet)
2766 ShowcaseAccessGrantedDetails *ShowcaseAccessGrantedDetails `json:"showcase_access_granted_details,omitempty"`
2767 // ShowcaseAddMemberDetails : has no documentation (yet)
2768 ShowcaseAddMemberDetails *ShowcaseAddMemberDetails `json:"showcase_add_member_details,omitempty"`
2769 // ShowcaseArchivedDetails : has no documentation (yet)
2770 ShowcaseArchivedDetails *ShowcaseArchivedDetails `json:"showcase_archived_details,omitempty"`
2771 // ShowcaseCreatedDetails : has no documentation (yet)
2772 ShowcaseCreatedDetails *ShowcaseCreatedDetails `json:"showcase_created_details,omitempty"`
2773 // ShowcaseDeleteCommentDetails : has no documentation (yet)
2774 ShowcaseDeleteCommentDetails *ShowcaseDeleteCommentDetails `json:"showcase_delete_comment_details,omitempty"`
2775 // ShowcaseEditedDetails : has no documentation (yet)
2776 ShowcaseEditedDetails *ShowcaseEditedDetails `json:"showcase_edited_details,omitempty"`
2777 // ShowcaseEditCommentDetails : has no documentation (yet)
2778 ShowcaseEditCommentDetails *ShowcaseEditCommentDetails `json:"showcase_edit_comment_details,omitempty"`
2779 // ShowcaseFileAddedDetails : has no documentation (yet)
2780 ShowcaseFileAddedDetails *ShowcaseFileAddedDetails `json:"showcase_file_added_details,omitempty"`
2781 // ShowcaseFileDownloadDetails : has no documentation (yet)
2782 ShowcaseFileDownloadDetails *ShowcaseFileDownloadDetails `json:"showcase_file_download_details,omitempty"`
2783 // ShowcaseFileRemovedDetails : has no documentation (yet)
2784 ShowcaseFileRemovedDetails *ShowcaseFileRemovedDetails `json:"showcase_file_removed_details,omitempty"`
2785 // ShowcaseFileViewDetails : has no documentation (yet)
2786 ShowcaseFileViewDetails *ShowcaseFileViewDetails `json:"showcase_file_view_details,omitempty"`
2787 // ShowcasePermanentlyDeletedDetails : has no documentation (yet)
2788 ShowcasePermanentlyDeletedDetails *ShowcasePermanentlyDeletedDetails `json:"showcase_permanently_deleted_details,omitempty"`
2789 // ShowcasePostCommentDetails : has no documentation (yet)
2790 ShowcasePostCommentDetails *ShowcasePostCommentDetails `json:"showcase_post_comment_details,omitempty"`
2791 // ShowcaseRemoveMemberDetails : has no documentation (yet)
2792 ShowcaseRemoveMemberDetails *ShowcaseRemoveMemberDetails `json:"showcase_remove_member_details,omitempty"`
2793 // ShowcaseRenamedDetails : has no documentation (yet)
2794 ShowcaseRenamedDetails *ShowcaseRenamedDetails `json:"showcase_renamed_details,omitempty"`
2795 // ShowcaseRequestAccessDetails : has no documentation (yet)
2796 ShowcaseRequestAccessDetails *ShowcaseRequestAccessDetails `json:"showcase_request_access_details,omitempty"`
2797 // ShowcaseResolveCommentDetails : has no documentation (yet)
2798 ShowcaseResolveCommentDetails *ShowcaseResolveCommentDetails `json:"showcase_resolve_comment_details,omitempty"`
2799 // ShowcaseRestoredDetails : has no documentation (yet)
2800 ShowcaseRestoredDetails *ShowcaseRestoredDetails `json:"showcase_restored_details,omitempty"`
2801 // ShowcaseTrashedDetails : has no documentation (yet)
2802 ShowcaseTrashedDetails *ShowcaseTrashedDetails `json:"showcase_trashed_details,omitempty"`
2803 // ShowcaseTrashedDeprecatedDetails : has no documentation (yet)
2804 ShowcaseTrashedDeprecatedDetails *ShowcaseTrashedDeprecatedDetails `json:"showcase_trashed_deprecated_details,omitempty"`
2805 // ShowcaseUnresolveCommentDetails : has no documentation (yet)
2806 ShowcaseUnresolveCommentDetails *ShowcaseUnresolveCommentDetails `json:"showcase_unresolve_comment_details,omitempty"`
2807 // ShowcaseUntrashedDetails : has no documentation (yet)
2808 ShowcaseUntrashedDetails *ShowcaseUntrashedDetails `json:"showcase_untrashed_details,omitempty"`
2809 // ShowcaseUntrashedDeprecatedDetails : has no documentation (yet)
2810 ShowcaseUntrashedDeprecatedDetails *ShowcaseUntrashedDeprecatedDetails `json:"showcase_untrashed_deprecated_details,omitempty"`
2811 // ShowcaseViewDetails : has no documentation (yet)
2812 ShowcaseViewDetails *ShowcaseViewDetails `json:"showcase_view_details,omitempty"`
2813 // SsoAddCertDetails : has no documentation (yet)
2814 SsoAddCertDetails *SsoAddCertDetails `json:"sso_add_cert_details,omitempty"`
2815 // SsoAddLoginUrlDetails : has no documentation (yet)
2816 SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"`
2817 // SsoAddLogoutUrlDetails : has no documentation (yet)
2818 SsoAddLogoutUrlDetails *SsoAddLogoutUrlDetails `json:"sso_add_logout_url_details,omitempty"`
2819 // SsoChangeCertDetails : has no documentation (yet)
2820 SsoChangeCertDetails *SsoChangeCertDetails `json:"sso_change_cert_details,omitempty"`
2821 // SsoChangeLoginUrlDetails : has no documentation (yet)
2822 SsoChangeLoginUrlDetails *SsoChangeLoginUrlDetails `json:"sso_change_login_url_details,omitempty"`
2823 // SsoChangeLogoutUrlDetails : has no documentation (yet)
2824 SsoChangeLogoutUrlDetails *SsoChangeLogoutUrlDetails `json:"sso_change_logout_url_details,omitempty"`
2825 // SsoChangeSamlIdentityModeDetails : has no documentation (yet)
2826 SsoChangeSamlIdentityModeDetails *SsoChangeSamlIdentityModeDetails `json:"sso_change_saml_identity_mode_details,omitempty"`
2827 // SsoRemoveCertDetails : has no documentation (yet)
2828 SsoRemoveCertDetails *SsoRemoveCertDetails `json:"sso_remove_cert_details,omitempty"`
2829 // SsoRemoveLoginUrlDetails : has no documentation (yet)
2830 SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"`
2831 // SsoRemoveLogoutUrlDetails : has no documentation (yet)
2832 SsoRemoveLogoutUrlDetails *SsoRemoveLogoutUrlDetails `json:"sso_remove_logout_url_details,omitempty"`
2833 // TeamFolderChangeStatusDetails : has no documentation (yet)
2834 TeamFolderChangeStatusDetails *TeamFolderChangeStatusDetails `json:"team_folder_change_status_details,omitempty"`
2835 // TeamFolderCreateDetails : has no documentation (yet)
2836 TeamFolderCreateDetails *TeamFolderCreateDetails `json:"team_folder_create_details,omitempty"`
2837 // TeamFolderDowngradeDetails : has no documentation (yet)
2838 TeamFolderDowngradeDetails *TeamFolderDowngradeDetails `json:"team_folder_downgrade_details,omitempty"`
2839 // TeamFolderPermanentlyDeleteDetails : has no documentation (yet)
2840 TeamFolderPermanentlyDeleteDetails *TeamFolderPermanentlyDeleteDetails `json:"team_folder_permanently_delete_details,omitempty"`
2841 // TeamFolderRenameDetails : has no documentation (yet)
2842 TeamFolderRenameDetails *TeamFolderRenameDetails `json:"team_folder_rename_details,omitempty"`
2843 // TeamSelectiveSyncSettingsChangedDetails : has no documentation (yet)
2844 TeamSelectiveSyncSettingsChangedDetails *TeamSelectiveSyncSettingsChangedDetails `json:"team_selective_sync_settings_changed_details,omitempty"`
2845 // AccountCaptureChangePolicyDetails : has no documentation (yet)
2846 AccountCaptureChangePolicyDetails *AccountCaptureChangePolicyDetails `json:"account_capture_change_policy_details,omitempty"`
2847 // AllowDownloadDisabledDetails : has no documentation (yet)
2848 AllowDownloadDisabledDetails *AllowDownloadDisabledDetails `json:"allow_download_disabled_details,omitempty"`
2849 // AllowDownloadEnabledDetails : has no documentation (yet)
2850 AllowDownloadEnabledDetails *AllowDownloadEnabledDetails `json:"allow_download_enabled_details,omitempty"`
2851 // CameraUploadsPolicyChangedDetails : has no documentation (yet)
2852 CameraUploadsPolicyChangedDetails *CameraUploadsPolicyChangedDetails `json:"camera_uploads_policy_changed_details,omitempty"`
2853 // DataPlacementRestrictionChangePolicyDetails : has no documentation (yet)
2854 DataPlacementRestrictionChangePolicyDetails *DataPlacementRestrictionChangePolicyDetails `json:"data_placement_restriction_change_policy_details,omitempty"`
2855 // DataPlacementRestrictionSatisfyPolicyDetails : has no documentation (yet)
2856 DataPlacementRestrictionSatisfyPolicyDetails *DataPlacementRestrictionSatisfyPolicyDetails `json:"data_placement_restriction_satisfy_policy_details,omitempty"`
2857 // DeviceApprovalsChangeDesktopPolicyDetails : has no documentation (yet)
2858 DeviceApprovalsChangeDesktopPolicyDetails *DeviceApprovalsChangeDesktopPolicyDetails `json:"device_approvals_change_desktop_policy_details,omitempty"`
2859 // DeviceApprovalsChangeMobilePolicyDetails : has no documentation (yet)
2860 DeviceApprovalsChangeMobilePolicyDetails *DeviceApprovalsChangeMobilePolicyDetails `json:"device_approvals_change_mobile_policy_details,omitempty"`
2861 // DeviceApprovalsChangeOverageActionDetails : has no documentation (yet)
2862 DeviceApprovalsChangeOverageActionDetails *DeviceApprovalsChangeOverageActionDetails `json:"device_approvals_change_overage_action_details,omitempty"`
2863 // DeviceApprovalsChangeUnlinkActionDetails : has no documentation (yet)
2864 DeviceApprovalsChangeUnlinkActionDetails *DeviceApprovalsChangeUnlinkActionDetails `json:"device_approvals_change_unlink_action_details,omitempty"`
2865 // DirectoryRestrictionsAddMembersDetails : has no documentation (yet)
2866 DirectoryRestrictionsAddMembersDetails *DirectoryRestrictionsAddMembersDetails `json:"directory_restrictions_add_members_details,omitempty"`
2867 // DirectoryRestrictionsRemoveMembersDetails : has no documentation (yet)
2868 DirectoryRestrictionsRemoveMembersDetails *DirectoryRestrictionsRemoveMembersDetails `json:"directory_restrictions_remove_members_details,omitempty"`
2869 // EmmAddExceptionDetails : has no documentation (yet)
2870 EmmAddExceptionDetails *EmmAddExceptionDetails `json:"emm_add_exception_details,omitempty"`
2871 // EmmChangePolicyDetails : has no documentation (yet)
2872 EmmChangePolicyDetails *EmmChangePolicyDetails `json:"emm_change_policy_details,omitempty"`
2873 // EmmRemoveExceptionDetails : has no documentation (yet)
2874 EmmRemoveExceptionDetails *EmmRemoveExceptionDetails `json:"emm_remove_exception_details,omitempty"`
2875 // ExtendedVersionHistoryChangePolicyDetails : has no documentation (yet)
2876 ExtendedVersionHistoryChangePolicyDetails *ExtendedVersionHistoryChangePolicyDetails `json:"extended_version_history_change_policy_details,omitempty"`
2877 // FileCommentsChangePolicyDetails : has no documentation (yet)
2878 FileCommentsChangePolicyDetails *FileCommentsChangePolicyDetails `json:"file_comments_change_policy_details,omitempty"`
2879 // FileRequestsChangePolicyDetails : has no documentation (yet)
2880 FileRequestsChangePolicyDetails *FileRequestsChangePolicyDetails `json:"file_requests_change_policy_details,omitempty"`
2881 // FileRequestsEmailsEnabledDetails : has no documentation (yet)
2882 FileRequestsEmailsEnabledDetails *FileRequestsEmailsEnabledDetails `json:"file_requests_emails_enabled_details,omitempty"`
2883 // FileRequestsEmailsRestrictedToTeamOnlyDetails : has no documentation
2884 // (yet)
2885 FileRequestsEmailsRestrictedToTeamOnlyDetails *FileRequestsEmailsRestrictedToTeamOnlyDetails `json:"file_requests_emails_restricted_to_team_only_details,omitempty"`
2886 // GoogleSsoChangePolicyDetails : has no documentation (yet)
2887 GoogleSsoChangePolicyDetails *GoogleSsoChangePolicyDetails `json:"google_sso_change_policy_details,omitempty"`
2888 // GroupUserManagementChangePolicyDetails : has no documentation (yet)
2889 GroupUserManagementChangePolicyDetails *GroupUserManagementChangePolicyDetails `json:"group_user_management_change_policy_details,omitempty"`
2890 // MemberRequestsChangePolicyDetails : has no documentation (yet)
2891 MemberRequestsChangePolicyDetails *MemberRequestsChangePolicyDetails `json:"member_requests_change_policy_details,omitempty"`
2892 // MemberSpaceLimitsAddExceptionDetails : has no documentation (yet)
2893 MemberSpaceLimitsAddExceptionDetails *MemberSpaceLimitsAddExceptionDetails `json:"member_space_limits_add_exception_details,omitempty"`
2894 // MemberSpaceLimitsChangeCapsTypePolicyDetails : has no documentation (yet)
2895 MemberSpaceLimitsChangeCapsTypePolicyDetails *MemberSpaceLimitsChangeCapsTypePolicyDetails `json:"member_space_limits_change_caps_type_policy_details,omitempty"`
2896 // MemberSpaceLimitsChangePolicyDetails : has no documentation (yet)
2897 MemberSpaceLimitsChangePolicyDetails *MemberSpaceLimitsChangePolicyDetails `json:"member_space_limits_change_policy_details,omitempty"`
2898 // MemberSpaceLimitsRemoveExceptionDetails : has no documentation (yet)
2899 MemberSpaceLimitsRemoveExceptionDetails *MemberSpaceLimitsRemoveExceptionDetails `json:"member_space_limits_remove_exception_details,omitempty"`
2900 // MemberSuggestionsChangePolicyDetails : has no documentation (yet)
2901 MemberSuggestionsChangePolicyDetails *MemberSuggestionsChangePolicyDetails `json:"member_suggestions_change_policy_details,omitempty"`
2902 // MicrosoftOfficeAddinChangePolicyDetails : has no documentation (yet)
2903 MicrosoftOfficeAddinChangePolicyDetails *MicrosoftOfficeAddinChangePolicyDetails `json:"microsoft_office_addin_change_policy_details,omitempty"`
2904 // NetworkControlChangePolicyDetails : has no documentation (yet)
2905 NetworkControlChangePolicyDetails *NetworkControlChangePolicyDetails `json:"network_control_change_policy_details,omitempty"`
2906 // PaperChangeDeploymentPolicyDetails : has no documentation (yet)
2907 PaperChangeDeploymentPolicyDetails *PaperChangeDeploymentPolicyDetails `json:"paper_change_deployment_policy_details,omitempty"`
2908 // PaperChangeMemberLinkPolicyDetails : has no documentation (yet)
2909 PaperChangeMemberLinkPolicyDetails *PaperChangeMemberLinkPolicyDetails `json:"paper_change_member_link_policy_details,omitempty"`
2910 // PaperChangeMemberPolicyDetails : has no documentation (yet)
2911 PaperChangeMemberPolicyDetails *PaperChangeMemberPolicyDetails `json:"paper_change_member_policy_details,omitempty"`
2912 // PaperChangePolicyDetails : has no documentation (yet)
2913 PaperChangePolicyDetails *PaperChangePolicyDetails `json:"paper_change_policy_details,omitempty"`
2914 // PaperEnabledUsersGroupAdditionDetails : has no documentation (yet)
2915 PaperEnabledUsersGroupAdditionDetails *PaperEnabledUsersGroupAdditionDetails `json:"paper_enabled_users_group_addition_details,omitempty"`
2916 // PaperEnabledUsersGroupRemovalDetails : has no documentation (yet)
2917 PaperEnabledUsersGroupRemovalDetails *PaperEnabledUsersGroupRemovalDetails `json:"paper_enabled_users_group_removal_details,omitempty"`
2918 // PermanentDeleteChangePolicyDetails : has no documentation (yet)
2919 PermanentDeleteChangePolicyDetails *PermanentDeleteChangePolicyDetails `json:"permanent_delete_change_policy_details,omitempty"`
2920 // SharingChangeFolderJoinPolicyDetails : has no documentation (yet)
2921 SharingChangeFolderJoinPolicyDetails *SharingChangeFolderJoinPolicyDetails `json:"sharing_change_folder_join_policy_details,omitempty"`
2922 // SharingChangeLinkPolicyDetails : has no documentation (yet)
2923 SharingChangeLinkPolicyDetails *SharingChangeLinkPolicyDetails `json:"sharing_change_link_policy_details,omitempty"`
2924 // SharingChangeMemberPolicyDetails : has no documentation (yet)
2925 SharingChangeMemberPolicyDetails *SharingChangeMemberPolicyDetails `json:"sharing_change_member_policy_details,omitempty"`
2926 // ShowcaseChangeDownloadPolicyDetails : has no documentation (yet)
2927 ShowcaseChangeDownloadPolicyDetails *ShowcaseChangeDownloadPolicyDetails `json:"showcase_change_download_policy_details,omitempty"`
2928 // ShowcaseChangeEnabledPolicyDetails : has no documentation (yet)
2929 ShowcaseChangeEnabledPolicyDetails *ShowcaseChangeEnabledPolicyDetails `json:"showcase_change_enabled_policy_details,omitempty"`
2930 // ShowcaseChangeExternalSharingPolicyDetails : has no documentation (yet)
2931 ShowcaseChangeExternalSharingPolicyDetails *ShowcaseChangeExternalSharingPolicyDetails `json:"showcase_change_external_sharing_policy_details,omitempty"`
2932 // SmartSyncChangePolicyDetails : has no documentation (yet)
2933 SmartSyncChangePolicyDetails *SmartSyncChangePolicyDetails `json:"smart_sync_change_policy_details,omitempty"`
2934 // SmartSyncNotOptOutDetails : has no documentation (yet)
2935 SmartSyncNotOptOutDetails *SmartSyncNotOptOutDetails `json:"smart_sync_not_opt_out_details,omitempty"`
2936 // SmartSyncOptOutDetails : has no documentation (yet)
2937 SmartSyncOptOutDetails *SmartSyncOptOutDetails `json:"smart_sync_opt_out_details,omitempty"`
2938 // SsoChangePolicyDetails : has no documentation (yet)
2939 SsoChangePolicyDetails *SsoChangePolicyDetails `json:"sso_change_policy_details,omitempty"`
2940 // TeamSelectiveSyncPolicyChangedDetails : has no documentation (yet)
2941 TeamSelectiveSyncPolicyChangedDetails *TeamSelectiveSyncPolicyChangedDetails `json:"team_selective_sync_policy_changed_details,omitempty"`
2942 // TfaChangePolicyDetails : has no documentation (yet)
2943 TfaChangePolicyDetails *TfaChangePolicyDetails `json:"tfa_change_policy_details,omitempty"`
2944 // TwoAccountChangePolicyDetails : has no documentation (yet)
2945 TwoAccountChangePolicyDetails *TwoAccountChangePolicyDetails `json:"two_account_change_policy_details,omitempty"`
2946 // ViewerInfoPolicyChangedDetails : has no documentation (yet)
2947 ViewerInfoPolicyChangedDetails *ViewerInfoPolicyChangedDetails `json:"viewer_info_policy_changed_details,omitempty"`
2948 // WebSessionsChangeFixedLengthPolicyDetails : has no documentation (yet)
2949 WebSessionsChangeFixedLengthPolicyDetails *WebSessionsChangeFixedLengthPolicyDetails `json:"web_sessions_change_fixed_length_policy_details,omitempty"`
2950 // WebSessionsChangeIdleLengthPolicyDetails : has no documentation (yet)
2951 WebSessionsChangeIdleLengthPolicyDetails *WebSessionsChangeIdleLengthPolicyDetails `json:"web_sessions_change_idle_length_policy_details,omitempty"`
2952 // TeamMergeFromDetails : has no documentation (yet)
2953 TeamMergeFromDetails *TeamMergeFromDetails `json:"team_merge_from_details,omitempty"`
2954 // TeamMergeToDetails : has no documentation (yet)
2955 TeamMergeToDetails *TeamMergeToDetails `json:"team_merge_to_details,omitempty"`
2956 // TeamProfileAddLogoDetails : has no documentation (yet)
2957 TeamProfileAddLogoDetails *TeamProfileAddLogoDetails `json:"team_profile_add_logo_details,omitempty"`
2958 // TeamProfileChangeDefaultLanguageDetails : has no documentation (yet)
2959 TeamProfileChangeDefaultLanguageDetails *TeamProfileChangeDefaultLanguageDetails `json:"team_profile_change_default_language_details,omitempty"`
2960 // TeamProfileChangeLogoDetails : has no documentation (yet)
2961 TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"`
2962 // TeamProfileChangeNameDetails : has no documentation (yet)
2963 TeamProfileChangeNameDetails *TeamProfileChangeNameDetails `json:"team_profile_change_name_details,omitempty"`
2964 // TeamProfileRemoveLogoDetails : has no documentation (yet)
2965 TeamProfileRemoveLogoDetails *TeamProfileRemoveLogoDetails `json:"team_profile_remove_logo_details,omitempty"`
2966 // TfaAddBackupPhoneDetails : has no documentation (yet)
2967 TfaAddBackupPhoneDetails *TfaAddBackupPhoneDetails `json:"tfa_add_backup_phone_details,omitempty"`
2968 // TfaAddSecurityKeyDetails : has no documentation (yet)
2969 TfaAddSecurityKeyDetails *TfaAddSecurityKeyDetails `json:"tfa_add_security_key_details,omitempty"`
2970 // TfaChangeBackupPhoneDetails : has no documentation (yet)
2971 TfaChangeBackupPhoneDetails *TfaChangeBackupPhoneDetails `json:"tfa_change_backup_phone_details,omitempty"`
2972 // TfaChangeStatusDetails : has no documentation (yet)
2973 TfaChangeStatusDetails *TfaChangeStatusDetails `json:"tfa_change_status_details,omitempty"`
2974 // TfaRemoveBackupPhoneDetails : has no documentation (yet)
2975 TfaRemoveBackupPhoneDetails *TfaRemoveBackupPhoneDetails `json:"tfa_remove_backup_phone_details,omitempty"`
2976 // TfaRemoveSecurityKeyDetails : has no documentation (yet)
2977 TfaRemoveSecurityKeyDetails *TfaRemoveSecurityKeyDetails `json:"tfa_remove_security_key_details,omitempty"`
2978 // TfaResetDetails : has no documentation (yet)
2979 TfaResetDetails *TfaResetDetails `json:"tfa_reset_details,omitempty"`
2980 // MissingDetails : Hints that this event was returned with missing details
2981 // due to an internal error.
2982 MissingDetails *MissingDetails `json:"missing_details,omitempty"`
2983 }
2984
2985 // Valid tag values for EventDetails
2986 const (
2987 EventDetailsAppLinkTeamDetails = "app_link_team_details"
2988 EventDetailsAppLinkUserDetails = "app_link_user_details"
2989 EventDetailsAppUnlinkTeamDetails = "app_unlink_team_details"
2990 EventDetailsAppUnlinkUserDetails = "app_unlink_user_details"
2991 EventDetailsFileAddCommentDetails = "file_add_comment_details"
2992 EventDetailsFileChangeCommentSubscriptionDetails = "file_change_comment_subscription_details"
2993 EventDetailsFileDeleteCommentDetails = "file_delete_comment_details"
2994 EventDetailsFileEditCommentDetails = "file_edit_comment_details"
2995 EventDetailsFileLikeCommentDetails = "file_like_comment_details"
2996 EventDetailsFileResolveCommentDetails = "file_resolve_comment_details"
2997 EventDetailsFileUnlikeCommentDetails = "file_unlike_comment_details"
2998 EventDetailsFileUnresolveCommentDetails = "file_unresolve_comment_details"
2999 EventDetailsDeviceChangeIpDesktopDetails = "device_change_ip_desktop_details"
3000 EventDetailsDeviceChangeIpMobileDetails = "device_change_ip_mobile_details"
3001 EventDetailsDeviceChangeIpWebDetails = "device_change_ip_web_details"
3002 EventDetailsDeviceDeleteOnUnlinkFailDetails = "device_delete_on_unlink_fail_details"
3003 EventDetailsDeviceDeleteOnUnlinkSuccessDetails = "device_delete_on_unlink_success_details"
3004 EventDetailsDeviceLinkFailDetails = "device_link_fail_details"
3005 EventDetailsDeviceLinkSuccessDetails = "device_link_success_details"
3006 EventDetailsDeviceManagementDisabledDetails = "device_management_disabled_details"
3007 EventDetailsDeviceManagementEnabledDetails = "device_management_enabled_details"
3008 EventDetailsDeviceUnlinkDetails = "device_unlink_details"
3009 EventDetailsEmmRefreshAuthTokenDetails = "emm_refresh_auth_token_details"
3010 EventDetailsAccountCaptureChangeAvailabilityDetails = "account_capture_change_availability_details"
3011 EventDetailsAccountCaptureMigrateAccountDetails = "account_capture_migrate_account_details"
3012 EventDetailsAccountCaptureNotificationEmailsSentDetails = "account_capture_notification_emails_sent_details"
3013 EventDetailsAccountCaptureRelinquishAccountDetails = "account_capture_relinquish_account_details"
3014 EventDetailsDisabledDomainInvitesDetails = "disabled_domain_invites_details"
3015 EventDetailsDomainInvitesApproveRequestToJoinTeamDetails = "domain_invites_approve_request_to_join_team_details"
3016 EventDetailsDomainInvitesDeclineRequestToJoinTeamDetails = "domain_invites_decline_request_to_join_team_details"
3017 EventDetailsDomainInvitesEmailExistingUsersDetails = "domain_invites_email_existing_users_details"
3018 EventDetailsDomainInvitesRequestToJoinTeamDetails = "domain_invites_request_to_join_team_details"
3019 EventDetailsDomainInvitesSetInviteNewUserPrefToNoDetails = "domain_invites_set_invite_new_user_pref_to_no_details"
3020 EventDetailsDomainInvitesSetInviteNewUserPrefToYesDetails = "domain_invites_set_invite_new_user_pref_to_yes_details"
3021 EventDetailsDomainVerificationAddDomainFailDetails = "domain_verification_add_domain_fail_details"
3022 EventDetailsDomainVerificationAddDomainSuccessDetails = "domain_verification_add_domain_success_details"
3023 EventDetailsDomainVerificationRemoveDomainDetails = "domain_verification_remove_domain_details"
3024 EventDetailsEnabledDomainInvitesDetails = "enabled_domain_invites_details"
3025 EventDetailsCreateFolderDetails = "create_folder_details"
3026 EventDetailsFileAddDetails = "file_add_details"
3027 EventDetailsFileCopyDetails = "file_copy_details"
3028 EventDetailsFileDeleteDetails = "file_delete_details"
3029 EventDetailsFileDownloadDetails = "file_download_details"
3030 EventDetailsFileEditDetails = "file_edit_details"
3031 EventDetailsFileGetCopyReferenceDetails = "file_get_copy_reference_details"
3032 EventDetailsFileMoveDetails = "file_move_details"
3033 EventDetailsFilePermanentlyDeleteDetails = "file_permanently_delete_details"
3034 EventDetailsFilePreviewDetails = "file_preview_details"
3035 EventDetailsFileRenameDetails = "file_rename_details"
3036 EventDetailsFileRestoreDetails = "file_restore_details"
3037 EventDetailsFileRevertDetails = "file_revert_details"
3038 EventDetailsFileRollbackChangesDetails = "file_rollback_changes_details"
3039 EventDetailsFileSaveCopyReferenceDetails = "file_save_copy_reference_details"
3040 EventDetailsFileRequestChangeDetails = "file_request_change_details"
3041 EventDetailsFileRequestCloseDetails = "file_request_close_details"
3042 EventDetailsFileRequestCreateDetails = "file_request_create_details"
3043 EventDetailsFileRequestReceiveFileDetails = "file_request_receive_file_details"
3044 EventDetailsGroupAddExternalIdDetails = "group_add_external_id_details"
3045 EventDetailsGroupAddMemberDetails = "group_add_member_details"
3046 EventDetailsGroupChangeExternalIdDetails = "group_change_external_id_details"
3047 EventDetailsGroupChangeManagementTypeDetails = "group_change_management_type_details"
3048 EventDetailsGroupChangeMemberRoleDetails = "group_change_member_role_details"
3049 EventDetailsGroupCreateDetails = "group_create_details"
3050 EventDetailsGroupDeleteDetails = "group_delete_details"
3051 EventDetailsGroupDescriptionUpdatedDetails = "group_description_updated_details"
3052 EventDetailsGroupJoinPolicyUpdatedDetails = "group_join_policy_updated_details"
3053 EventDetailsGroupMovedDetails = "group_moved_details"
3054 EventDetailsGroupRemoveExternalIdDetails = "group_remove_external_id_details"
3055 EventDetailsGroupRemoveMemberDetails = "group_remove_member_details"
3056 EventDetailsGroupRenameDetails = "group_rename_details"
3057 EventDetailsEmmErrorDetails = "emm_error_details"
3058 EventDetailsLoginFailDetails = "login_fail_details"
3059 EventDetailsLoginSuccessDetails = "login_success_details"
3060 EventDetailsLogoutDetails = "logout_details"
3061 EventDetailsResellerSupportSessionEndDetails = "reseller_support_session_end_details"
3062 EventDetailsResellerSupportSessionStartDetails = "reseller_support_session_start_details"
3063 EventDetailsSignInAsSessionEndDetails = "sign_in_as_session_end_details"
3064 EventDetailsSignInAsSessionStartDetails = "sign_in_as_session_start_details"
3065 EventDetailsSsoErrorDetails = "sso_error_details"
3066 EventDetailsMemberAddNameDetails = "member_add_name_details"
3067 EventDetailsMemberChangeAdminRoleDetails = "member_change_admin_role_details"
3068 EventDetailsMemberChangeEmailDetails = "member_change_email_details"
3069 EventDetailsMemberChangeMembershipTypeDetails = "member_change_membership_type_details"
3070 EventDetailsMemberChangeNameDetails = "member_change_name_details"
3071 EventDetailsMemberChangeStatusDetails = "member_change_status_details"
3072 EventDetailsMemberDeleteManualContactsDetails = "member_delete_manual_contacts_details"
3073 EventDetailsMemberPermanentlyDeleteAccountContentsDetails = "member_permanently_delete_account_contents_details"
3074 EventDetailsMemberSpaceLimitsAddCustomQuotaDetails = "member_space_limits_add_custom_quota_details"
3075 EventDetailsMemberSpaceLimitsChangeCustomQuotaDetails = "member_space_limits_change_custom_quota_details"
3076 EventDetailsMemberSpaceLimitsChangeStatusDetails = "member_space_limits_change_status_details"
3077 EventDetailsMemberSpaceLimitsRemoveCustomQuotaDetails = "member_space_limits_remove_custom_quota_details"
3078 EventDetailsMemberSuggestDetails = "member_suggest_details"
3079 EventDetailsMemberTransferAccountContentsDetails = "member_transfer_account_contents_details"
3080 EventDetailsSecondaryMailsPolicyChangedDetails = "secondary_mails_policy_changed_details"
3081 EventDetailsPaperContentAddMemberDetails = "paper_content_add_member_details"
3082 EventDetailsPaperContentAddToFolderDetails = "paper_content_add_to_folder_details"
3083 EventDetailsPaperContentArchiveDetails = "paper_content_archive_details"
3084 EventDetailsPaperContentCreateDetails = "paper_content_create_details"
3085 EventDetailsPaperContentPermanentlyDeleteDetails = "paper_content_permanently_delete_details"
3086 EventDetailsPaperContentRemoveFromFolderDetails = "paper_content_remove_from_folder_details"
3087 EventDetailsPaperContentRemoveMemberDetails = "paper_content_remove_member_details"
3088 EventDetailsPaperContentRenameDetails = "paper_content_rename_details"
3089 EventDetailsPaperContentRestoreDetails = "paper_content_restore_details"
3090 EventDetailsPaperDocAddCommentDetails = "paper_doc_add_comment_details"
3091 EventDetailsPaperDocChangeMemberRoleDetails = "paper_doc_change_member_role_details"
3092 EventDetailsPaperDocChangeSharingPolicyDetails = "paper_doc_change_sharing_policy_details"
3093 EventDetailsPaperDocChangeSubscriptionDetails = "paper_doc_change_subscription_details"
3094 EventDetailsPaperDocDeletedDetails = "paper_doc_deleted_details"
3095 EventDetailsPaperDocDeleteCommentDetails = "paper_doc_delete_comment_details"
3096 EventDetailsPaperDocDownloadDetails = "paper_doc_download_details"
3097 EventDetailsPaperDocEditDetails = "paper_doc_edit_details"
3098 EventDetailsPaperDocEditCommentDetails = "paper_doc_edit_comment_details"
3099 EventDetailsPaperDocFollowedDetails = "paper_doc_followed_details"
3100 EventDetailsPaperDocMentionDetails = "paper_doc_mention_details"
3101 EventDetailsPaperDocOwnershipChangedDetails = "paper_doc_ownership_changed_details"
3102 EventDetailsPaperDocRequestAccessDetails = "paper_doc_request_access_details"
3103 EventDetailsPaperDocResolveCommentDetails = "paper_doc_resolve_comment_details"
3104 EventDetailsPaperDocRevertDetails = "paper_doc_revert_details"
3105 EventDetailsPaperDocSlackShareDetails = "paper_doc_slack_share_details"
3106 EventDetailsPaperDocTeamInviteDetails = "paper_doc_team_invite_details"
3107 EventDetailsPaperDocTrashedDetails = "paper_doc_trashed_details"
3108 EventDetailsPaperDocUnresolveCommentDetails = "paper_doc_unresolve_comment_details"
3109 EventDetailsPaperDocUntrashedDetails = "paper_doc_untrashed_details"
3110 EventDetailsPaperDocViewDetails = "paper_doc_view_details"
3111 EventDetailsPaperExternalViewAllowDetails = "paper_external_view_allow_details"
3112 EventDetailsPaperExternalViewDefaultTeamDetails = "paper_external_view_default_team_details"
3113 EventDetailsPaperExternalViewForbidDetails = "paper_external_view_forbid_details"
3114 EventDetailsPaperFolderChangeSubscriptionDetails = "paper_folder_change_subscription_details"
3115 EventDetailsPaperFolderDeletedDetails = "paper_folder_deleted_details"
3116 EventDetailsPaperFolderFollowedDetails = "paper_folder_followed_details"
3117 EventDetailsPaperFolderTeamInviteDetails = "paper_folder_team_invite_details"
3118 EventDetailsPasswordChangeDetails = "password_change_details"
3119 EventDetailsPasswordResetDetails = "password_reset_details"
3120 EventDetailsPasswordResetAllDetails = "password_reset_all_details"
3121 EventDetailsEmmCreateExceptionsReportDetails = "emm_create_exceptions_report_details"
3122 EventDetailsEmmCreateUsageReportDetails = "emm_create_usage_report_details"
3123 EventDetailsExportMembersReportDetails = "export_members_report_details"
3124 EventDetailsPaperAdminExportStartDetails = "paper_admin_export_start_details"
3125 EventDetailsSmartSyncCreateAdminPrivilegeReportDetails = "smart_sync_create_admin_privilege_report_details"
3126 EventDetailsTeamActivityCreateReportDetails = "team_activity_create_report_details"
3127 EventDetailsCollectionShareDetails = "collection_share_details"
3128 EventDetailsNoteAclInviteOnlyDetails = "note_acl_invite_only_details"
3129 EventDetailsNoteAclLinkDetails = "note_acl_link_details"
3130 EventDetailsNoteAclTeamLinkDetails = "note_acl_team_link_details"
3131 EventDetailsNoteSharedDetails = "note_shared_details"
3132 EventDetailsNoteShareReceiveDetails = "note_share_receive_details"
3133 EventDetailsOpenNoteSharedDetails = "open_note_shared_details"
3134 EventDetailsSfAddGroupDetails = "sf_add_group_details"
3135 EventDetailsSfAllowNonMembersToViewSharedLinksDetails = "sf_allow_non_members_to_view_shared_links_details"
3136 EventDetailsSfExternalInviteWarnDetails = "sf_external_invite_warn_details"
3137 EventDetailsSfFbInviteDetails = "sf_fb_invite_details"
3138 EventDetailsSfFbInviteChangeRoleDetails = "sf_fb_invite_change_role_details"
3139 EventDetailsSfFbUninviteDetails = "sf_fb_uninvite_details"
3140 EventDetailsSfInviteGroupDetails = "sf_invite_group_details"
3141 EventDetailsSfTeamGrantAccessDetails = "sf_team_grant_access_details"
3142 EventDetailsSfTeamInviteDetails = "sf_team_invite_details"
3143 EventDetailsSfTeamInviteChangeRoleDetails = "sf_team_invite_change_role_details"
3144 EventDetailsSfTeamJoinDetails = "sf_team_join_details"
3145 EventDetailsSfTeamJoinFromOobLinkDetails = "sf_team_join_from_oob_link_details"
3146 EventDetailsSfTeamUninviteDetails = "sf_team_uninvite_details"
3147 EventDetailsSharedContentAddInviteesDetails = "shared_content_add_invitees_details"
3148 EventDetailsSharedContentAddLinkExpiryDetails = "shared_content_add_link_expiry_details"
3149 EventDetailsSharedContentAddLinkPasswordDetails = "shared_content_add_link_password_details"
3150 EventDetailsSharedContentAddMemberDetails = "shared_content_add_member_details"
3151 EventDetailsSharedContentChangeDownloadsPolicyDetails = "shared_content_change_downloads_policy_details"
3152 EventDetailsSharedContentChangeInviteeRoleDetails = "shared_content_change_invitee_role_details"
3153 EventDetailsSharedContentChangeLinkAudienceDetails = "shared_content_change_link_audience_details"
3154 EventDetailsSharedContentChangeLinkExpiryDetails = "shared_content_change_link_expiry_details"
3155 EventDetailsSharedContentChangeLinkPasswordDetails = "shared_content_change_link_password_details"
3156 EventDetailsSharedContentChangeMemberRoleDetails = "shared_content_change_member_role_details"
3157 EventDetailsSharedContentChangeViewerInfoPolicyDetails = "shared_content_change_viewer_info_policy_details"
3158 EventDetailsSharedContentClaimInvitationDetails = "shared_content_claim_invitation_details"
3159 EventDetailsSharedContentCopyDetails = "shared_content_copy_details"
3160 EventDetailsSharedContentDownloadDetails = "shared_content_download_details"
3161 EventDetailsSharedContentRelinquishMembershipDetails = "shared_content_relinquish_membership_details"
3162 EventDetailsSharedContentRemoveInviteesDetails = "shared_content_remove_invitees_details"
3163 EventDetailsSharedContentRemoveLinkExpiryDetails = "shared_content_remove_link_expiry_details"
3164 EventDetailsSharedContentRemoveLinkPasswordDetails = "shared_content_remove_link_password_details"
3165 EventDetailsSharedContentRemoveMemberDetails = "shared_content_remove_member_details"
3166 EventDetailsSharedContentRequestAccessDetails = "shared_content_request_access_details"
3167 EventDetailsSharedContentUnshareDetails = "shared_content_unshare_details"
3168 EventDetailsSharedContentViewDetails = "shared_content_view_details"
3169 EventDetailsSharedFolderChangeLinkPolicyDetails = "shared_folder_change_link_policy_details"
3170 EventDetailsSharedFolderChangeMembersInheritancePolicyDetails = "shared_folder_change_members_inheritance_policy_details"
3171 EventDetailsSharedFolderChangeMembersManagementPolicyDetails = "shared_folder_change_members_management_policy_details"
3172 EventDetailsSharedFolderChangeMembersPolicyDetails = "shared_folder_change_members_policy_details"
3173 EventDetailsSharedFolderCreateDetails = "shared_folder_create_details"
3174 EventDetailsSharedFolderDeclineInvitationDetails = "shared_folder_decline_invitation_details"
3175 EventDetailsSharedFolderMountDetails = "shared_folder_mount_details"
3176 EventDetailsSharedFolderNestDetails = "shared_folder_nest_details"
3177 EventDetailsSharedFolderTransferOwnershipDetails = "shared_folder_transfer_ownership_details"
3178 EventDetailsSharedFolderUnmountDetails = "shared_folder_unmount_details"
3179 EventDetailsSharedLinkAddExpiryDetails = "shared_link_add_expiry_details"
3180 EventDetailsSharedLinkChangeExpiryDetails = "shared_link_change_expiry_details"
3181 EventDetailsSharedLinkChangeVisibilityDetails = "shared_link_change_visibility_details"
3182 EventDetailsSharedLinkCopyDetails = "shared_link_copy_details"
3183 EventDetailsSharedLinkCreateDetails = "shared_link_create_details"
3184 EventDetailsSharedLinkDisableDetails = "shared_link_disable_details"
3185 EventDetailsSharedLinkDownloadDetails = "shared_link_download_details"
3186 EventDetailsSharedLinkRemoveExpiryDetails = "shared_link_remove_expiry_details"
3187 EventDetailsSharedLinkShareDetails = "shared_link_share_details"
3188 EventDetailsSharedLinkViewDetails = "shared_link_view_details"
3189 EventDetailsSharedNoteOpenedDetails = "shared_note_opened_details"
3190 EventDetailsShmodelGroupShareDetails = "shmodel_group_share_details"
3191 EventDetailsShowcaseAccessGrantedDetails = "showcase_access_granted_details"
3192 EventDetailsShowcaseAddMemberDetails = "showcase_add_member_details"
3193 EventDetailsShowcaseArchivedDetails = "showcase_archived_details"
3194 EventDetailsShowcaseCreatedDetails = "showcase_created_details"
3195 EventDetailsShowcaseDeleteCommentDetails = "showcase_delete_comment_details"
3196 EventDetailsShowcaseEditedDetails = "showcase_edited_details"
3197 EventDetailsShowcaseEditCommentDetails = "showcase_edit_comment_details"
3198 EventDetailsShowcaseFileAddedDetails = "showcase_file_added_details"
3199 EventDetailsShowcaseFileDownloadDetails = "showcase_file_download_details"
3200 EventDetailsShowcaseFileRemovedDetails = "showcase_file_removed_details"
3201 EventDetailsShowcaseFileViewDetails = "showcase_file_view_details"
3202 EventDetailsShowcasePermanentlyDeletedDetails = "showcase_permanently_deleted_details"
3203 EventDetailsShowcasePostCommentDetails = "showcase_post_comment_details"
3204 EventDetailsShowcaseRemoveMemberDetails = "showcase_remove_member_details"
3205 EventDetailsShowcaseRenamedDetails = "showcase_renamed_details"
3206 EventDetailsShowcaseRequestAccessDetails = "showcase_request_access_details"
3207 EventDetailsShowcaseResolveCommentDetails = "showcase_resolve_comment_details"
3208 EventDetailsShowcaseRestoredDetails = "showcase_restored_details"
3209 EventDetailsShowcaseTrashedDetails = "showcase_trashed_details"
3210 EventDetailsShowcaseTrashedDeprecatedDetails = "showcase_trashed_deprecated_details"
3211 EventDetailsShowcaseUnresolveCommentDetails = "showcase_unresolve_comment_details"
3212 EventDetailsShowcaseUntrashedDetails = "showcase_untrashed_details"
3213 EventDetailsShowcaseUntrashedDeprecatedDetails = "showcase_untrashed_deprecated_details"
3214 EventDetailsShowcaseViewDetails = "showcase_view_details"
3215 EventDetailsSsoAddCertDetails = "sso_add_cert_details"
3216 EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details"
3217 EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details"
3218 EventDetailsSsoChangeCertDetails = "sso_change_cert_details"
3219 EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details"
3220 EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details"
3221 EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details"
3222 EventDetailsSsoRemoveCertDetails = "sso_remove_cert_details"
3223 EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details"
3224 EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details"
3225 EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details"
3226 EventDetailsTeamFolderCreateDetails = "team_folder_create_details"
3227 EventDetailsTeamFolderDowngradeDetails = "team_folder_downgrade_details"
3228 EventDetailsTeamFolderPermanentlyDeleteDetails = "team_folder_permanently_delete_details"
3229 EventDetailsTeamFolderRenameDetails = "team_folder_rename_details"
3230 EventDetailsTeamSelectiveSyncSettingsChangedDetails = "team_selective_sync_settings_changed_details"
3231 EventDetailsAccountCaptureChangePolicyDetails = "account_capture_change_policy_details"
3232 EventDetailsAllowDownloadDisabledDetails = "allow_download_disabled_details"
3233 EventDetailsAllowDownloadEnabledDetails = "allow_download_enabled_details"
3234 EventDetailsCameraUploadsPolicyChangedDetails = "camera_uploads_policy_changed_details"
3235 EventDetailsDataPlacementRestrictionChangePolicyDetails = "data_placement_restriction_change_policy_details"
3236 EventDetailsDataPlacementRestrictionSatisfyPolicyDetails = "data_placement_restriction_satisfy_policy_details"
3237 EventDetailsDeviceApprovalsChangeDesktopPolicyDetails = "device_approvals_change_desktop_policy_details"
3238 EventDetailsDeviceApprovalsChangeMobilePolicyDetails = "device_approvals_change_mobile_policy_details"
3239 EventDetailsDeviceApprovalsChangeOverageActionDetails = "device_approvals_change_overage_action_details"
3240 EventDetailsDeviceApprovalsChangeUnlinkActionDetails = "device_approvals_change_unlink_action_details"
3241 EventDetailsDirectoryRestrictionsAddMembersDetails = "directory_restrictions_add_members_details"
3242 EventDetailsDirectoryRestrictionsRemoveMembersDetails = "directory_restrictions_remove_members_details"
3243 EventDetailsEmmAddExceptionDetails = "emm_add_exception_details"
3244 EventDetailsEmmChangePolicyDetails = "emm_change_policy_details"
3245 EventDetailsEmmRemoveExceptionDetails = "emm_remove_exception_details"
3246 EventDetailsExtendedVersionHistoryChangePolicyDetails = "extended_version_history_change_policy_details"
3247 EventDetailsFileCommentsChangePolicyDetails = "file_comments_change_policy_details"
3248 EventDetailsFileRequestsChangePolicyDetails = "file_requests_change_policy_details"
3249 EventDetailsFileRequestsEmailsEnabledDetails = "file_requests_emails_enabled_details"
3250 EventDetailsFileRequestsEmailsRestrictedToTeamOnlyDetails = "file_requests_emails_restricted_to_team_only_details"
3251 EventDetailsGoogleSsoChangePolicyDetails = "google_sso_change_policy_details"
3252 EventDetailsGroupUserManagementChangePolicyDetails = "group_user_management_change_policy_details"
3253 EventDetailsMemberRequestsChangePolicyDetails = "member_requests_change_policy_details"
3254 EventDetailsMemberSpaceLimitsAddExceptionDetails = "member_space_limits_add_exception_details"
3255 EventDetailsMemberSpaceLimitsChangeCapsTypePolicyDetails = "member_space_limits_change_caps_type_policy_details"
3256 EventDetailsMemberSpaceLimitsChangePolicyDetails = "member_space_limits_change_policy_details"
3257 EventDetailsMemberSpaceLimitsRemoveExceptionDetails = "member_space_limits_remove_exception_details"
3258 EventDetailsMemberSuggestionsChangePolicyDetails = "member_suggestions_change_policy_details"
3259 EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details"
3260 EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details"
3261 EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details"
3262 EventDetailsPaperChangeMemberLinkPolicyDetails = "paper_change_member_link_policy_details"
3263 EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details"
3264 EventDetailsPaperChangePolicyDetails = "paper_change_policy_details"
3265 EventDetailsPaperEnabledUsersGroupAdditionDetails = "paper_enabled_users_group_addition_details"
3266 EventDetailsPaperEnabledUsersGroupRemovalDetails = "paper_enabled_users_group_removal_details"
3267 EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details"
3268 EventDetailsSharingChangeFolderJoinPolicyDetails = "sharing_change_folder_join_policy_details"
3269 EventDetailsSharingChangeLinkPolicyDetails = "sharing_change_link_policy_details"
3270 EventDetailsSharingChangeMemberPolicyDetails = "sharing_change_member_policy_details"
3271 EventDetailsShowcaseChangeDownloadPolicyDetails = "showcase_change_download_policy_details"
3272 EventDetailsShowcaseChangeEnabledPolicyDetails = "showcase_change_enabled_policy_details"
3273 EventDetailsShowcaseChangeExternalSharingPolicyDetails = "showcase_change_external_sharing_policy_details"
3274 EventDetailsSmartSyncChangePolicyDetails = "smart_sync_change_policy_details"
3275 EventDetailsSmartSyncNotOptOutDetails = "smart_sync_not_opt_out_details"
3276 EventDetailsSmartSyncOptOutDetails = "smart_sync_opt_out_details"
3277 EventDetailsSsoChangePolicyDetails = "sso_change_policy_details"
3278 EventDetailsTeamSelectiveSyncPolicyChangedDetails = "team_selective_sync_policy_changed_details"
3279 EventDetailsTfaChangePolicyDetails = "tfa_change_policy_details"
3280 EventDetailsTwoAccountChangePolicyDetails = "two_account_change_policy_details"
3281 EventDetailsViewerInfoPolicyChangedDetails = "viewer_info_policy_changed_details"
3282 EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details"
3283 EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details"
3284 EventDetailsTeamMergeFromDetails = "team_merge_from_details"
3285 EventDetailsTeamMergeToDetails = "team_merge_to_details"
3286 EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details"
3287 EventDetailsTeamProfileChangeDefaultLanguageDetails = "team_profile_change_default_language_details"
3288 EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details"
3289 EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details"
3290 EventDetailsTeamProfileRemoveLogoDetails = "team_profile_remove_logo_details"
3291 EventDetailsTfaAddBackupPhoneDetails = "tfa_add_backup_phone_details"
3292 EventDetailsTfaAddSecurityKeyDetails = "tfa_add_security_key_details"
3293 EventDetailsTfaChangeBackupPhoneDetails = "tfa_change_backup_phone_details"
3294 EventDetailsTfaChangeStatusDetails = "tfa_change_status_details"
3295 EventDetailsTfaRemoveBackupPhoneDetails = "tfa_remove_backup_phone_details"
3296 EventDetailsTfaRemoveSecurityKeyDetails = "tfa_remove_security_key_details"
3297 EventDetailsTfaResetDetails = "tfa_reset_details"
3298 EventDetailsMissingDetails = "missing_details"
3299 EventDetailsOther = "other"
3300 )
3301
3302 // UnmarshalJSON deserializes into a EventDetails instance
3303 func (u *EventDetails) UnmarshalJSON(body []byte) error {
3304 type wrap struct {
3305 dropbox.Tagged
3306 // AppLinkTeamDetails : has no documentation (yet)
3307 AppLinkTeamDetails json.RawMessage `json:"app_link_team_details,omitempty"`
3308 // AppLinkUserDetails : has no documentation (yet)
3309 AppLinkUserDetails json.RawMessage `json:"app_link_user_details,omitempty"`
3310 // AppUnlinkTeamDetails : has no documentation (yet)
3311 AppUnlinkTeamDetails json.RawMessage `json:"app_unlink_team_details,omitempty"`
3312 // AppUnlinkUserDetails : has no documentation (yet)
3313 AppUnlinkUserDetails json.RawMessage `json:"app_unlink_user_details,omitempty"`
3314 // FileAddCommentDetails : has no documentation (yet)
3315 FileAddCommentDetails json.RawMessage `json:"file_add_comment_details,omitempty"`
3316 // FileChangeCommentSubscriptionDetails : has no documentation (yet)
3317 FileChangeCommentSubscriptionDetails json.RawMessage `json:"file_change_comment_subscription_details,omitempty"`
3318 // FileDeleteCommentDetails : has no documentation (yet)
3319 FileDeleteCommentDetails json.RawMessage `json:"file_delete_comment_details,omitempty"`
3320 // FileEditCommentDetails : has no documentation (yet)
3321 FileEditCommentDetails json.RawMessage `json:"file_edit_comment_details,omitempty"`
3322 // FileLikeCommentDetails : has no documentation (yet)
3323 FileLikeCommentDetails json.RawMessage `json:"file_like_comment_details,omitempty"`
3324 // FileResolveCommentDetails : has no documentation (yet)
3325 FileResolveCommentDetails json.RawMessage `json:"file_resolve_comment_details,omitempty"`
3326 // FileUnlikeCommentDetails : has no documentation (yet)
3327 FileUnlikeCommentDetails json.RawMessage `json:"file_unlike_comment_details,omitempty"`
3328 // FileUnresolveCommentDetails : has no documentation (yet)
3329 FileUnresolveCommentDetails json.RawMessage `json:"file_unresolve_comment_details,omitempty"`
3330 // DeviceChangeIpDesktopDetails : has no documentation (yet)
3331 DeviceChangeIpDesktopDetails json.RawMessage `json:"device_change_ip_desktop_details,omitempty"`
3332 // DeviceChangeIpMobileDetails : has no documentation (yet)
3333 DeviceChangeIpMobileDetails json.RawMessage `json:"device_change_ip_mobile_details,omitempty"`
3334 // DeviceChangeIpWebDetails : has no documentation (yet)
3335 DeviceChangeIpWebDetails json.RawMessage `json:"device_change_ip_web_details,omitempty"`
3336 // DeviceDeleteOnUnlinkFailDetails : has no documentation (yet)
3337 DeviceDeleteOnUnlinkFailDetails json.RawMessage `json:"device_delete_on_unlink_fail_details,omitempty"`
3338 // DeviceDeleteOnUnlinkSuccessDetails : has no documentation (yet)
3339 DeviceDeleteOnUnlinkSuccessDetails json.RawMessage `json:"device_delete_on_unlink_success_details,omitempty"`
3340 // DeviceLinkFailDetails : has no documentation (yet)
3341 DeviceLinkFailDetails json.RawMessage `json:"device_link_fail_details,omitempty"`
3342 // DeviceLinkSuccessDetails : has no documentation (yet)
3343 DeviceLinkSuccessDetails json.RawMessage `json:"device_link_success_details,omitempty"`
3344 // DeviceManagementDisabledDetails : has no documentation (yet)
3345 DeviceManagementDisabledDetails json.RawMessage `json:"device_management_disabled_details,omitempty"`
3346 // DeviceManagementEnabledDetails : has no documentation (yet)
3347 DeviceManagementEnabledDetails json.RawMessage `json:"device_management_enabled_details,omitempty"`
3348 // DeviceUnlinkDetails : has no documentation (yet)
3349 DeviceUnlinkDetails json.RawMessage `json:"device_unlink_details,omitempty"`
3350 // EmmRefreshAuthTokenDetails : has no documentation (yet)
3351 EmmRefreshAuthTokenDetails json.RawMessage `json:"emm_refresh_auth_token_details,omitempty"`
3352 // AccountCaptureChangeAvailabilityDetails : has no documentation (yet)
3353 AccountCaptureChangeAvailabilityDetails json.RawMessage `json:"account_capture_change_availability_details,omitempty"`
3354 // AccountCaptureMigrateAccountDetails : has no documentation (yet)
3355 AccountCaptureMigrateAccountDetails json.RawMessage `json:"account_capture_migrate_account_details,omitempty"`
3356 // AccountCaptureNotificationEmailsSentDetails : has no documentation
3357 // (yet)
3358 AccountCaptureNotificationEmailsSentDetails json.RawMessage `json:"account_capture_notification_emails_sent_details,omitempty"`
3359 // AccountCaptureRelinquishAccountDetails : has no documentation (yet)
3360 AccountCaptureRelinquishAccountDetails json.RawMessage `json:"account_capture_relinquish_account_details,omitempty"`
3361 // DisabledDomainInvitesDetails : has no documentation (yet)
3362 DisabledDomainInvitesDetails json.RawMessage `json:"disabled_domain_invites_details,omitempty"`
3363 // DomainInvitesApproveRequestToJoinTeamDetails : has no documentation
3364 // (yet)
3365 DomainInvitesApproveRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_approve_request_to_join_team_details,omitempty"`
3366 // DomainInvitesDeclineRequestToJoinTeamDetails : has no documentation
3367 // (yet)
3368 DomainInvitesDeclineRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_decline_request_to_join_team_details,omitempty"`
3369 // DomainInvitesEmailExistingUsersDetails : has no documentation (yet)
3370 DomainInvitesEmailExistingUsersDetails json.RawMessage `json:"domain_invites_email_existing_users_details,omitempty"`
3371 // DomainInvitesRequestToJoinTeamDetails : has no documentation (yet)
3372 DomainInvitesRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_request_to_join_team_details,omitempty"`
3373 // DomainInvitesSetInviteNewUserPrefToNoDetails : has no documentation
3374 // (yet)
3375 DomainInvitesSetInviteNewUserPrefToNoDetails json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_no_details,omitempty"`
3376 // DomainInvitesSetInviteNewUserPrefToYesDetails : has no documentation
3377 // (yet)
3378 DomainInvitesSetInviteNewUserPrefToYesDetails json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_yes_details,omitempty"`
3379 // DomainVerificationAddDomainFailDetails : has no documentation (yet)
3380 DomainVerificationAddDomainFailDetails json.RawMessage `json:"domain_verification_add_domain_fail_details,omitempty"`
3381 // DomainVerificationAddDomainSuccessDetails : has no documentation
3382 // (yet)
3383 DomainVerificationAddDomainSuccessDetails json.RawMessage `json:"domain_verification_add_domain_success_details,omitempty"`
3384 // DomainVerificationRemoveDomainDetails : has no documentation (yet)
3385 DomainVerificationRemoveDomainDetails json.RawMessage `json:"domain_verification_remove_domain_details,omitempty"`
3386 // EnabledDomainInvitesDetails : has no documentation (yet)
3387 EnabledDomainInvitesDetails json.RawMessage `json:"enabled_domain_invites_details,omitempty"`
3388 // CreateFolderDetails : has no documentation (yet)
3389 CreateFolderDetails json.RawMessage `json:"create_folder_details,omitempty"`
3390 // FileAddDetails : has no documentation (yet)
3391 FileAddDetails json.RawMessage `json:"file_add_details,omitempty"`
3392 // FileCopyDetails : has no documentation (yet)
3393 FileCopyDetails json.RawMessage `json:"file_copy_details,omitempty"`
3394 // FileDeleteDetails : has no documentation (yet)
3395 FileDeleteDetails json.RawMessage `json:"file_delete_details,omitempty"`
3396 // FileDownloadDetails : has no documentation (yet)
3397 FileDownloadDetails json.RawMessage `json:"file_download_details,omitempty"`
3398 // FileEditDetails : has no documentation (yet)
3399 FileEditDetails json.RawMessage `json:"file_edit_details,omitempty"`
3400 // FileGetCopyReferenceDetails : has no documentation (yet)
3401 FileGetCopyReferenceDetails json.RawMessage `json:"file_get_copy_reference_details,omitempty"`
3402 // FileMoveDetails : has no documentation (yet)
3403 FileMoveDetails json.RawMessage `json:"file_move_details,omitempty"`
3404 // FilePermanentlyDeleteDetails : has no documentation (yet)
3405 FilePermanentlyDeleteDetails json.RawMessage `json:"file_permanently_delete_details,omitempty"`
3406 // FilePreviewDetails : has no documentation (yet)
3407 FilePreviewDetails json.RawMessage `json:"file_preview_details,omitempty"`
3408 // FileRenameDetails : has no documentation (yet)
3409 FileRenameDetails json.RawMessage `json:"file_rename_details,omitempty"`
3410 // FileRestoreDetails : has no documentation (yet)
3411 FileRestoreDetails json.RawMessage `json:"file_restore_details,omitempty"`
3412 // FileRevertDetails : has no documentation (yet)
3413 FileRevertDetails json.RawMessage `json:"file_revert_details,omitempty"`
3414 // FileRollbackChangesDetails : has no documentation (yet)
3415 FileRollbackChangesDetails json.RawMessage `json:"file_rollback_changes_details,omitempty"`
3416 // FileSaveCopyReferenceDetails : has no documentation (yet)
3417 FileSaveCopyReferenceDetails json.RawMessage `json:"file_save_copy_reference_details,omitempty"`
3418 // FileRequestChangeDetails : has no documentation (yet)
3419 FileRequestChangeDetails json.RawMessage `json:"file_request_change_details,omitempty"`
3420 // FileRequestCloseDetails : has no documentation (yet)
3421 FileRequestCloseDetails json.RawMessage `json:"file_request_close_details,omitempty"`
3422 // FileRequestCreateDetails : has no documentation (yet)
3423 FileRequestCreateDetails json.RawMessage `json:"file_request_create_details,omitempty"`
3424 // FileRequestReceiveFileDetails : has no documentation (yet)
3425 FileRequestReceiveFileDetails json.RawMessage `json:"file_request_receive_file_details,omitempty"`
3426 // GroupAddExternalIdDetails : has no documentation (yet)
3427 GroupAddExternalIdDetails json.RawMessage `json:"group_add_external_id_details,omitempty"`
3428 // GroupAddMemberDetails : has no documentation (yet)
3429 GroupAddMemberDetails json.RawMessage `json:"group_add_member_details,omitempty"`
3430 // GroupChangeExternalIdDetails : has no documentation (yet)
3431 GroupChangeExternalIdDetails json.RawMessage `json:"group_change_external_id_details,omitempty"`
3432 // GroupChangeManagementTypeDetails : has no documentation (yet)
3433 GroupChangeManagementTypeDetails json.RawMessage `json:"group_change_management_type_details,omitempty"`
3434 // GroupChangeMemberRoleDetails : has no documentation (yet)
3435 GroupChangeMemberRoleDetails json.RawMessage `json:"group_change_member_role_details,omitempty"`
3436 // GroupCreateDetails : has no documentation (yet)
3437 GroupCreateDetails json.RawMessage `json:"group_create_details,omitempty"`
3438 // GroupDeleteDetails : has no documentation (yet)
3439 GroupDeleteDetails json.RawMessage `json:"group_delete_details,omitempty"`
3440 // GroupDescriptionUpdatedDetails : has no documentation (yet)
3441 GroupDescriptionUpdatedDetails json.RawMessage `json:"group_description_updated_details,omitempty"`
3442 // GroupJoinPolicyUpdatedDetails : has no documentation (yet)
3443 GroupJoinPolicyUpdatedDetails json.RawMessage `json:"group_join_policy_updated_details,omitempty"`
3444 // GroupMovedDetails : has no documentation (yet)
3445 GroupMovedDetails json.RawMessage `json:"group_moved_details,omitempty"`
3446 // GroupRemoveExternalIdDetails : has no documentation (yet)
3447 GroupRemoveExternalIdDetails json.RawMessage `json:"group_remove_external_id_details,omitempty"`
3448 // GroupRemoveMemberDetails : has no documentation (yet)
3449 GroupRemoveMemberDetails json.RawMessage `json:"group_remove_member_details,omitempty"`
3450 // GroupRenameDetails : has no documentation (yet)
3451 GroupRenameDetails json.RawMessage `json:"group_rename_details,omitempty"`
3452 // EmmErrorDetails : has no documentation (yet)
3453 EmmErrorDetails json.RawMessage `json:"emm_error_details,omitempty"`
3454 // LoginFailDetails : has no documentation (yet)
3455 LoginFailDetails json.RawMessage `json:"login_fail_details,omitempty"`
3456 // LoginSuccessDetails : has no documentation (yet)
3457 LoginSuccessDetails json.RawMessage `json:"login_success_details,omitempty"`
3458 // LogoutDetails : has no documentation (yet)
3459 LogoutDetails json.RawMessage `json:"logout_details,omitempty"`
3460 // ResellerSupportSessionEndDetails : has no documentation (yet)
3461 ResellerSupportSessionEndDetails json.RawMessage `json:"reseller_support_session_end_details,omitempty"`
3462 // ResellerSupportSessionStartDetails : has no documentation (yet)
3463 ResellerSupportSessionStartDetails json.RawMessage `json:"reseller_support_session_start_details,omitempty"`
3464 // SignInAsSessionEndDetails : has no documentation (yet)
3465 SignInAsSessionEndDetails json.RawMessage `json:"sign_in_as_session_end_details,omitempty"`
3466 // SignInAsSessionStartDetails : has no documentation (yet)
3467 SignInAsSessionStartDetails json.RawMessage `json:"sign_in_as_session_start_details,omitempty"`
3468 // SsoErrorDetails : has no documentation (yet)
3469 SsoErrorDetails json.RawMessage `json:"sso_error_details,omitempty"`
3470 // MemberAddNameDetails : has no documentation (yet)
3471 MemberAddNameDetails json.RawMessage `json:"member_add_name_details,omitempty"`
3472 // MemberChangeAdminRoleDetails : has no documentation (yet)
3473 MemberChangeAdminRoleDetails json.RawMessage `json:"member_change_admin_role_details,omitempty"`
3474 // MemberChangeEmailDetails : has no documentation (yet)
3475 MemberChangeEmailDetails json.RawMessage `json:"member_change_email_details,omitempty"`
3476 // MemberChangeMembershipTypeDetails : has no documentation (yet)
3477 MemberChangeMembershipTypeDetails json.RawMessage `json:"member_change_membership_type_details,omitempty"`
3478 // MemberChangeNameDetails : has no documentation (yet)
3479 MemberChangeNameDetails json.RawMessage `json:"member_change_name_details,omitempty"`
3480 // MemberChangeStatusDetails : has no documentation (yet)
3481 MemberChangeStatusDetails json.RawMessage `json:"member_change_status_details,omitempty"`
3482 // MemberDeleteManualContactsDetails : has no documentation (yet)
3483 MemberDeleteManualContactsDetails json.RawMessage `json:"member_delete_manual_contacts_details,omitempty"`
3484 // MemberPermanentlyDeleteAccountContentsDetails : has no documentation
3485 // (yet)
3486 MemberPermanentlyDeleteAccountContentsDetails json.RawMessage `json:"member_permanently_delete_account_contents_details,omitempty"`
3487 // MemberSpaceLimitsAddCustomQuotaDetails : has no documentation (yet)
3488 MemberSpaceLimitsAddCustomQuotaDetails json.RawMessage `json:"member_space_limits_add_custom_quota_details,omitempty"`
3489 // MemberSpaceLimitsChangeCustomQuotaDetails : has no documentation
3490 // (yet)
3491 MemberSpaceLimitsChangeCustomQuotaDetails json.RawMessage `json:"member_space_limits_change_custom_quota_details,omitempty"`
3492 // MemberSpaceLimitsChangeStatusDetails : has no documentation (yet)
3493 MemberSpaceLimitsChangeStatusDetails json.RawMessage `json:"member_space_limits_change_status_details,omitempty"`
3494 // MemberSpaceLimitsRemoveCustomQuotaDetails : has no documentation
3495 // (yet)
3496 MemberSpaceLimitsRemoveCustomQuotaDetails json.RawMessage `json:"member_space_limits_remove_custom_quota_details,omitempty"`
3497 // MemberSuggestDetails : has no documentation (yet)
3498 MemberSuggestDetails json.RawMessage `json:"member_suggest_details,omitempty"`
3499 // MemberTransferAccountContentsDetails : has no documentation (yet)
3500 MemberTransferAccountContentsDetails json.RawMessage `json:"member_transfer_account_contents_details,omitempty"`
3501 // SecondaryMailsPolicyChangedDetails : has no documentation (yet)
3502 SecondaryMailsPolicyChangedDetails json.RawMessage `json:"secondary_mails_policy_changed_details,omitempty"`
3503 // PaperContentAddMemberDetails : has no documentation (yet)
3504 PaperContentAddMemberDetails json.RawMessage `json:"paper_content_add_member_details,omitempty"`
3505 // PaperContentAddToFolderDetails : has no documentation (yet)
3506 PaperContentAddToFolderDetails json.RawMessage `json:"paper_content_add_to_folder_details,omitempty"`
3507 // PaperContentArchiveDetails : has no documentation (yet)
3508 PaperContentArchiveDetails json.RawMessage `json:"paper_content_archive_details,omitempty"`
3509 // PaperContentCreateDetails : has no documentation (yet)
3510 PaperContentCreateDetails json.RawMessage `json:"paper_content_create_details,omitempty"`
3511 // PaperContentPermanentlyDeleteDetails : has no documentation (yet)
3512 PaperContentPermanentlyDeleteDetails json.RawMessage `json:"paper_content_permanently_delete_details,omitempty"`
3513 // PaperContentRemoveFromFolderDetails : has no documentation (yet)
3514 PaperContentRemoveFromFolderDetails json.RawMessage `json:"paper_content_remove_from_folder_details,omitempty"`
3515 // PaperContentRemoveMemberDetails : has no documentation (yet)
3516 PaperContentRemoveMemberDetails json.RawMessage `json:"paper_content_remove_member_details,omitempty"`
3517 // PaperContentRenameDetails : has no documentation (yet)
3518 PaperContentRenameDetails json.RawMessage `json:"paper_content_rename_details,omitempty"`
3519 // PaperContentRestoreDetails : has no documentation (yet)
3520 PaperContentRestoreDetails json.RawMessage `json:"paper_content_restore_details,omitempty"`
3521 // PaperDocAddCommentDetails : has no documentation (yet)
3522 PaperDocAddCommentDetails json.RawMessage `json:"paper_doc_add_comment_details,omitempty"`
3523 // PaperDocChangeMemberRoleDetails : has no documentation (yet)
3524 PaperDocChangeMemberRoleDetails json.RawMessage `json:"paper_doc_change_member_role_details,omitempty"`
3525 // PaperDocChangeSharingPolicyDetails : has no documentation (yet)
3526 PaperDocChangeSharingPolicyDetails json.RawMessage `json:"paper_doc_change_sharing_policy_details,omitempty"`
3527 // PaperDocChangeSubscriptionDetails : has no documentation (yet)
3528 PaperDocChangeSubscriptionDetails json.RawMessage `json:"paper_doc_change_subscription_details,omitempty"`
3529 // PaperDocDeletedDetails : has no documentation (yet)
3530 PaperDocDeletedDetails json.RawMessage `json:"paper_doc_deleted_details,omitempty"`
3531 // PaperDocDeleteCommentDetails : has no documentation (yet)
3532 PaperDocDeleteCommentDetails json.RawMessage `json:"paper_doc_delete_comment_details,omitempty"`
3533 // PaperDocDownloadDetails : has no documentation (yet)
3534 PaperDocDownloadDetails json.RawMessage `json:"paper_doc_download_details,omitempty"`
3535 // PaperDocEditDetails : has no documentation (yet)
3536 PaperDocEditDetails json.RawMessage `json:"paper_doc_edit_details,omitempty"`
3537 // PaperDocEditCommentDetails : has no documentation (yet)
3538 PaperDocEditCommentDetails json.RawMessage `json:"paper_doc_edit_comment_details,omitempty"`
3539 // PaperDocFollowedDetails : has no documentation (yet)
3540 PaperDocFollowedDetails json.RawMessage `json:"paper_doc_followed_details,omitempty"`
3541 // PaperDocMentionDetails : has no documentation (yet)
3542 PaperDocMentionDetails json.RawMessage `json:"paper_doc_mention_details,omitempty"`
3543 // PaperDocOwnershipChangedDetails : has no documentation (yet)
3544 PaperDocOwnershipChangedDetails json.RawMessage `json:"paper_doc_ownership_changed_details,omitempty"`
3545 // PaperDocRequestAccessDetails : has no documentation (yet)
3546 PaperDocRequestAccessDetails json.RawMessage `json:"paper_doc_request_access_details,omitempty"`
3547 // PaperDocResolveCommentDetails : has no documentation (yet)
3548 PaperDocResolveCommentDetails json.RawMessage `json:"paper_doc_resolve_comment_details,omitempty"`
3549 // PaperDocRevertDetails : has no documentation (yet)
3550 PaperDocRevertDetails json.RawMessage `json:"paper_doc_revert_details,omitempty"`
3551 // PaperDocSlackShareDetails : has no documentation (yet)
3552 PaperDocSlackShareDetails json.RawMessage `json:"paper_doc_slack_share_details,omitempty"`
3553 // PaperDocTeamInviteDetails : has no documentation (yet)
3554 PaperDocTeamInviteDetails json.RawMessage `json:"paper_doc_team_invite_details,omitempty"`
3555 // PaperDocTrashedDetails : has no documentation (yet)
3556 PaperDocTrashedDetails json.RawMessage `json:"paper_doc_trashed_details,omitempty"`
3557 // PaperDocUnresolveCommentDetails : has no documentation (yet)
3558 PaperDocUnresolveCommentDetails json.RawMessage `json:"paper_doc_unresolve_comment_details,omitempty"`
3559 // PaperDocUntrashedDetails : has no documentation (yet)
3560 PaperDocUntrashedDetails json.RawMessage `json:"paper_doc_untrashed_details,omitempty"`
3561 // PaperDocViewDetails : has no documentation (yet)
3562 PaperDocViewDetails json.RawMessage `json:"paper_doc_view_details,omitempty"`
3563 // PaperExternalViewAllowDetails : has no documentation (yet)
3564 PaperExternalViewAllowDetails json.RawMessage `json:"paper_external_view_allow_details,omitempty"`
3565 // PaperExternalViewDefaultTeamDetails : has no documentation (yet)
3566 PaperExternalViewDefaultTeamDetails json.RawMessage `json:"paper_external_view_default_team_details,omitempty"`
3567 // PaperExternalViewForbidDetails : has no documentation (yet)
3568 PaperExternalViewForbidDetails json.RawMessage `json:"paper_external_view_forbid_details,omitempty"`
3569 // PaperFolderChangeSubscriptionDetails : has no documentation (yet)
3570 PaperFolderChangeSubscriptionDetails json.RawMessage `json:"paper_folder_change_subscription_details,omitempty"`
3571 // PaperFolderDeletedDetails : has no documentation (yet)
3572 PaperFolderDeletedDetails json.RawMessage `json:"paper_folder_deleted_details,omitempty"`
3573 // PaperFolderFollowedDetails : has no documentation (yet)
3574 PaperFolderFollowedDetails json.RawMessage `json:"paper_folder_followed_details,omitempty"`
3575 // PaperFolderTeamInviteDetails : has no documentation (yet)
3576 PaperFolderTeamInviteDetails json.RawMessage `json:"paper_folder_team_invite_details,omitempty"`
3577 // PasswordChangeDetails : has no documentation (yet)
3578 PasswordChangeDetails json.RawMessage `json:"password_change_details,omitempty"`
3579 // PasswordResetDetails : has no documentation (yet)
3580 PasswordResetDetails json.RawMessage `json:"password_reset_details,omitempty"`
3581 // PasswordResetAllDetails : has no documentation (yet)
3582 PasswordResetAllDetails json.RawMessage `json:"password_reset_all_details,omitempty"`
3583 // EmmCreateExceptionsReportDetails : has no documentation (yet)
3584 EmmCreateExceptionsReportDetails json.RawMessage `json:"emm_create_exceptions_report_details,omitempty"`
3585 // EmmCreateUsageReportDetails : has no documentation (yet)
3586 EmmCreateUsageReportDetails json.RawMessage `json:"emm_create_usage_report_details,omitempty"`
3587 // ExportMembersReportDetails : has no documentation (yet)
3588 ExportMembersReportDetails json.RawMessage `json:"export_members_report_details,omitempty"`
3589 // PaperAdminExportStartDetails : has no documentation (yet)
3590 PaperAdminExportStartDetails json.RawMessage `json:"paper_admin_export_start_details,omitempty"`
3591 // SmartSyncCreateAdminPrivilegeReportDetails : has no documentation
3592 // (yet)
3593 SmartSyncCreateAdminPrivilegeReportDetails json.RawMessage `json:"smart_sync_create_admin_privilege_report_details,omitempty"`
3594 // TeamActivityCreateReportDetails : has no documentation (yet)
3595 TeamActivityCreateReportDetails json.RawMessage `json:"team_activity_create_report_details,omitempty"`
3596 // CollectionShareDetails : has no documentation (yet)
3597 CollectionShareDetails json.RawMessage `json:"collection_share_details,omitempty"`
3598 // NoteAclInviteOnlyDetails : has no documentation (yet)
3599 NoteAclInviteOnlyDetails json.RawMessage `json:"note_acl_invite_only_details,omitempty"`
3600 // NoteAclLinkDetails : has no documentation (yet)
3601 NoteAclLinkDetails json.RawMessage `json:"note_acl_link_details,omitempty"`
3602 // NoteAclTeamLinkDetails : has no documentation (yet)
3603 NoteAclTeamLinkDetails json.RawMessage `json:"note_acl_team_link_details,omitempty"`
3604 // NoteSharedDetails : has no documentation (yet)
3605 NoteSharedDetails json.RawMessage `json:"note_shared_details,omitempty"`
3606 // NoteShareReceiveDetails : has no documentation (yet)
3607 NoteShareReceiveDetails json.RawMessage `json:"note_share_receive_details,omitempty"`
3608 // OpenNoteSharedDetails : has no documentation (yet)
3609 OpenNoteSharedDetails json.RawMessage `json:"open_note_shared_details,omitempty"`
3610 // SfAddGroupDetails : has no documentation (yet)
3611 SfAddGroupDetails json.RawMessage `json:"sf_add_group_details,omitempty"`
3612 // SfAllowNonMembersToViewSharedLinksDetails : has no documentation
3613 // (yet)
3614 SfAllowNonMembersToViewSharedLinksDetails json.RawMessage `json:"sf_allow_non_members_to_view_shared_links_details,omitempty"`
3615 // SfExternalInviteWarnDetails : has no documentation (yet)
3616 SfExternalInviteWarnDetails json.RawMessage `json:"sf_external_invite_warn_details,omitempty"`
3617 // SfFbInviteDetails : has no documentation (yet)
3618 SfFbInviteDetails json.RawMessage `json:"sf_fb_invite_details,omitempty"`
3619 // SfFbInviteChangeRoleDetails : has no documentation (yet)
3620 SfFbInviteChangeRoleDetails json.RawMessage `json:"sf_fb_invite_change_role_details,omitempty"`
3621 // SfFbUninviteDetails : has no documentation (yet)
3622 SfFbUninviteDetails json.RawMessage `json:"sf_fb_uninvite_details,omitempty"`
3623 // SfInviteGroupDetails : has no documentation (yet)
3624 SfInviteGroupDetails json.RawMessage `json:"sf_invite_group_details,omitempty"`
3625 // SfTeamGrantAccessDetails : has no documentation (yet)
3626 SfTeamGrantAccessDetails json.RawMessage `json:"sf_team_grant_access_details,omitempty"`
3627 // SfTeamInviteDetails : has no documentation (yet)
3628 SfTeamInviteDetails json.RawMessage `json:"sf_team_invite_details,omitempty"`
3629 // SfTeamInviteChangeRoleDetails : has no documentation (yet)
3630 SfTeamInviteChangeRoleDetails json.RawMessage `json:"sf_team_invite_change_role_details,omitempty"`
3631 // SfTeamJoinDetails : has no documentation (yet)
3632 SfTeamJoinDetails json.RawMessage `json:"sf_team_join_details,omitempty"`
3633 // SfTeamJoinFromOobLinkDetails : has no documentation (yet)
3634 SfTeamJoinFromOobLinkDetails json.RawMessage `json:"sf_team_join_from_oob_link_details,omitempty"`
3635 // SfTeamUninviteDetails : has no documentation (yet)
3636 SfTeamUninviteDetails json.RawMessage `json:"sf_team_uninvite_details,omitempty"`
3637 // SharedContentAddInviteesDetails : has no documentation (yet)
3638 SharedContentAddInviteesDetails json.RawMessage `json:"shared_content_add_invitees_details,omitempty"`
3639 // SharedContentAddLinkExpiryDetails : has no documentation (yet)
3640 SharedContentAddLinkExpiryDetails json.RawMessage `json:"shared_content_add_link_expiry_details,omitempty"`
3641 // SharedContentAddLinkPasswordDetails : has no documentation (yet)
3642 SharedContentAddLinkPasswordDetails json.RawMessage `json:"shared_content_add_link_password_details,omitempty"`
3643 // SharedContentAddMemberDetails : has no documentation (yet)
3644 SharedContentAddMemberDetails json.RawMessage `json:"shared_content_add_member_details,omitempty"`
3645 // SharedContentChangeDownloadsPolicyDetails : has no documentation
3646 // (yet)
3647 SharedContentChangeDownloadsPolicyDetails json.RawMessage `json:"shared_content_change_downloads_policy_details,omitempty"`
3648 // SharedContentChangeInviteeRoleDetails : has no documentation (yet)
3649 SharedContentChangeInviteeRoleDetails json.RawMessage `json:"shared_content_change_invitee_role_details,omitempty"`
3650 // SharedContentChangeLinkAudienceDetails : has no documentation (yet)
3651 SharedContentChangeLinkAudienceDetails json.RawMessage `json:"shared_content_change_link_audience_details,omitempty"`
3652 // SharedContentChangeLinkExpiryDetails : has no documentation (yet)
3653 SharedContentChangeLinkExpiryDetails json.RawMessage `json:"shared_content_change_link_expiry_details,omitempty"`
3654 // SharedContentChangeLinkPasswordDetails : has no documentation (yet)
3655 SharedContentChangeLinkPasswordDetails json.RawMessage `json:"shared_content_change_link_password_details,omitempty"`
3656 // SharedContentChangeMemberRoleDetails : has no documentation (yet)
3657 SharedContentChangeMemberRoleDetails json.RawMessage `json:"shared_content_change_member_role_details,omitempty"`
3658 // SharedContentChangeViewerInfoPolicyDetails : has no documentation
3659 // (yet)
3660 SharedContentChangeViewerInfoPolicyDetails json.RawMessage `json:"shared_content_change_viewer_info_policy_details,omitempty"`
3661 // SharedContentClaimInvitationDetails : has no documentation (yet)
3662 SharedContentClaimInvitationDetails json.RawMessage `json:"shared_content_claim_invitation_details,omitempty"`
3663 // SharedContentCopyDetails : has no documentation (yet)
3664 SharedContentCopyDetails json.RawMessage `json:"shared_content_copy_details,omitempty"`
3665 // SharedContentDownloadDetails : has no documentation (yet)
3666 SharedContentDownloadDetails json.RawMessage `json:"shared_content_download_details,omitempty"`
3667 // SharedContentRelinquishMembershipDetails : has no documentation (yet)
3668 SharedContentRelinquishMembershipDetails json.RawMessage `json:"shared_content_relinquish_membership_details,omitempty"`
3669 // SharedContentRemoveInviteesDetails : has no documentation (yet)
3670 SharedContentRemoveInviteesDetails json.RawMessage `json:"shared_content_remove_invitees_details,omitempty"`
3671 // SharedContentRemoveLinkExpiryDetails : has no documentation (yet)
3672 SharedContentRemoveLinkExpiryDetails json.RawMessage `json:"shared_content_remove_link_expiry_details,omitempty"`
3673 // SharedContentRemoveLinkPasswordDetails : has no documentation (yet)
3674 SharedContentRemoveLinkPasswordDetails json.RawMessage `json:"shared_content_remove_link_password_details,omitempty"`
3675 // SharedContentRemoveMemberDetails : has no documentation (yet)
3676 SharedContentRemoveMemberDetails json.RawMessage `json:"shared_content_remove_member_details,omitempty"`
3677 // SharedContentRequestAccessDetails : has no documentation (yet)
3678 SharedContentRequestAccessDetails json.RawMessage `json:"shared_content_request_access_details,omitempty"`
3679 // SharedContentUnshareDetails : has no documentation (yet)
3680 SharedContentUnshareDetails json.RawMessage `json:"shared_content_unshare_details,omitempty"`
3681 // SharedContentViewDetails : has no documentation (yet)
3682 SharedContentViewDetails json.RawMessage `json:"shared_content_view_details,omitempty"`
3683 // SharedFolderChangeLinkPolicyDetails : has no documentation (yet)
3684 SharedFolderChangeLinkPolicyDetails json.RawMessage `json:"shared_folder_change_link_policy_details,omitempty"`
3685 // SharedFolderChangeMembersInheritancePolicyDetails : has no
3686 // documentation (yet)
3687 SharedFolderChangeMembersInheritancePolicyDetails json.RawMessage `json:"shared_folder_change_members_inheritance_policy_details,omitempty"`
3688 // SharedFolderChangeMembersManagementPolicyDetails : has no
3689 // documentation (yet)
3690 SharedFolderChangeMembersManagementPolicyDetails json.RawMessage `json:"shared_folder_change_members_management_policy_details,omitempty"`
3691 // SharedFolderChangeMembersPolicyDetails : has no documentation (yet)
3692 SharedFolderChangeMembersPolicyDetails json.RawMessage `json:"shared_folder_change_members_policy_details,omitempty"`
3693 // SharedFolderCreateDetails : has no documentation (yet)
3694 SharedFolderCreateDetails json.RawMessage `json:"shared_folder_create_details,omitempty"`
3695 // SharedFolderDeclineInvitationDetails : has no documentation (yet)
3696 SharedFolderDeclineInvitationDetails json.RawMessage `json:"shared_folder_decline_invitation_details,omitempty"`
3697 // SharedFolderMountDetails : has no documentation (yet)
3698 SharedFolderMountDetails json.RawMessage `json:"shared_folder_mount_details,omitempty"`
3699 // SharedFolderNestDetails : has no documentation (yet)
3700 SharedFolderNestDetails json.RawMessage `json:"shared_folder_nest_details,omitempty"`
3701 // SharedFolderTransferOwnershipDetails : has no documentation (yet)
3702 SharedFolderTransferOwnershipDetails json.RawMessage `json:"shared_folder_transfer_ownership_details,omitempty"`
3703 // SharedFolderUnmountDetails : has no documentation (yet)
3704 SharedFolderUnmountDetails json.RawMessage `json:"shared_folder_unmount_details,omitempty"`
3705 // SharedLinkAddExpiryDetails : has no documentation (yet)
3706 SharedLinkAddExpiryDetails json.RawMessage `json:"shared_link_add_expiry_details,omitempty"`
3707 // SharedLinkChangeExpiryDetails : has no documentation (yet)
3708 SharedLinkChangeExpiryDetails json.RawMessage `json:"shared_link_change_expiry_details,omitempty"`
3709 // SharedLinkChangeVisibilityDetails : has no documentation (yet)
3710 SharedLinkChangeVisibilityDetails json.RawMessage `json:"shared_link_change_visibility_details,omitempty"`
3711 // SharedLinkCopyDetails : has no documentation (yet)
3712 SharedLinkCopyDetails json.RawMessage `json:"shared_link_copy_details,omitempty"`
3713 // SharedLinkCreateDetails : has no documentation (yet)
3714 SharedLinkCreateDetails json.RawMessage `json:"shared_link_create_details,omitempty"`
3715 // SharedLinkDisableDetails : has no documentation (yet)
3716 SharedLinkDisableDetails json.RawMessage `json:"shared_link_disable_details,omitempty"`
3717 // SharedLinkDownloadDetails : has no documentation (yet)
3718 SharedLinkDownloadDetails json.RawMessage `json:"shared_link_download_details,omitempty"`
3719 // SharedLinkRemoveExpiryDetails : has no documentation (yet)
3720 SharedLinkRemoveExpiryDetails json.RawMessage `json:"shared_link_remove_expiry_details,omitempty"`
3721 // SharedLinkShareDetails : has no documentation (yet)
3722 SharedLinkShareDetails json.RawMessage `json:"shared_link_share_details,omitempty"`
3723 // SharedLinkViewDetails : has no documentation (yet)
3724 SharedLinkViewDetails json.RawMessage `json:"shared_link_view_details,omitempty"`
3725 // SharedNoteOpenedDetails : has no documentation (yet)
3726 SharedNoteOpenedDetails json.RawMessage `json:"shared_note_opened_details,omitempty"`
3727 // ShmodelGroupShareDetails : has no documentation (yet)
3728 ShmodelGroupShareDetails json.RawMessage `json:"shmodel_group_share_details,omitempty"`
3729 // ShowcaseAccessGrantedDetails : has no documentation (yet)
3730 ShowcaseAccessGrantedDetails json.RawMessage `json:"showcase_access_granted_details,omitempty"`
3731 // ShowcaseAddMemberDetails : has no documentation (yet)
3732 ShowcaseAddMemberDetails json.RawMessage `json:"showcase_add_member_details,omitempty"`
3733 // ShowcaseArchivedDetails : has no documentation (yet)
3734 ShowcaseArchivedDetails json.RawMessage `json:"showcase_archived_details,omitempty"`
3735 // ShowcaseCreatedDetails : has no documentation (yet)
3736 ShowcaseCreatedDetails json.RawMessage `json:"showcase_created_details,omitempty"`
3737 // ShowcaseDeleteCommentDetails : has no documentation (yet)
3738 ShowcaseDeleteCommentDetails json.RawMessage `json:"showcase_delete_comment_details,omitempty"`
3739 // ShowcaseEditedDetails : has no documentation (yet)
3740 ShowcaseEditedDetails json.RawMessage `json:"showcase_edited_details,omitempty"`
3741 // ShowcaseEditCommentDetails : has no documentation (yet)
3742 ShowcaseEditCommentDetails json.RawMessage `json:"showcase_edit_comment_details,omitempty"`
3743 // ShowcaseFileAddedDetails : has no documentation (yet)
3744 ShowcaseFileAddedDetails json.RawMessage `json:"showcase_file_added_details,omitempty"`
3745 // ShowcaseFileDownloadDetails : has no documentation (yet)
3746 ShowcaseFileDownloadDetails json.RawMessage `json:"showcase_file_download_details,omitempty"`
3747 // ShowcaseFileRemovedDetails : has no documentation (yet)
3748 ShowcaseFileRemovedDetails json.RawMessage `json:"showcase_file_removed_details,omitempty"`
3749 // ShowcaseFileViewDetails : has no documentation (yet)
3750 ShowcaseFileViewDetails json.RawMessage `json:"showcase_file_view_details,omitempty"`
3751 // ShowcasePermanentlyDeletedDetails : has no documentation (yet)
3752 ShowcasePermanentlyDeletedDetails json.RawMessage `json:"showcase_permanently_deleted_details,omitempty"`
3753 // ShowcasePostCommentDetails : has no documentation (yet)
3754 ShowcasePostCommentDetails json.RawMessage `json:"showcase_post_comment_details,omitempty"`
3755 // ShowcaseRemoveMemberDetails : has no documentation (yet)
3756 ShowcaseRemoveMemberDetails json.RawMessage `json:"showcase_remove_member_details,omitempty"`
3757 // ShowcaseRenamedDetails : has no documentation (yet)
3758 ShowcaseRenamedDetails json.RawMessage `json:"showcase_renamed_details,omitempty"`
3759 // ShowcaseRequestAccessDetails : has no documentation (yet)
3760 ShowcaseRequestAccessDetails json.RawMessage `json:"showcase_request_access_details,omitempty"`
3761 // ShowcaseResolveCommentDetails : has no documentation (yet)
3762 ShowcaseResolveCommentDetails json.RawMessage `json:"showcase_resolve_comment_details,omitempty"`
3763 // ShowcaseRestoredDetails : has no documentation (yet)
3764 ShowcaseRestoredDetails json.RawMessage `json:"showcase_restored_details,omitempty"`
3765 // ShowcaseTrashedDetails : has no documentation (yet)
3766 ShowcaseTrashedDetails json.RawMessage `json:"showcase_trashed_details,omitempty"`
3767 // ShowcaseTrashedDeprecatedDetails : has no documentation (yet)
3768 ShowcaseTrashedDeprecatedDetails json.RawMessage `json:"showcase_trashed_deprecated_details,omitempty"`
3769 // ShowcaseUnresolveCommentDetails : has no documentation (yet)
3770 ShowcaseUnresolveCommentDetails json.RawMessage `json:"showcase_unresolve_comment_details,omitempty"`
3771 // ShowcaseUntrashedDetails : has no documentation (yet)
3772 ShowcaseUntrashedDetails json.RawMessage `json:"showcase_untrashed_details,omitempty"`
3773 // ShowcaseUntrashedDeprecatedDetails : has no documentation (yet)
3774 ShowcaseUntrashedDeprecatedDetails json.RawMessage `json:"showcase_untrashed_deprecated_details,omitempty"`
3775 // ShowcaseViewDetails : has no documentation (yet)
3776 ShowcaseViewDetails json.RawMessage `json:"showcase_view_details,omitempty"`
3777 // SsoAddCertDetails : has no documentation (yet)
3778 SsoAddCertDetails json.RawMessage `json:"sso_add_cert_details,omitempty"`
3779 // SsoAddLoginUrlDetails : has no documentation (yet)
3780 SsoAddLoginUrlDetails json.RawMessage `json:"sso_add_login_url_details,omitempty"`
3781 // SsoAddLogoutUrlDetails : has no documentation (yet)
3782 SsoAddLogoutUrlDetails json.RawMessage `json:"sso_add_logout_url_details,omitempty"`
3783 // SsoChangeCertDetails : has no documentation (yet)
3784 SsoChangeCertDetails json.RawMessage `json:"sso_change_cert_details,omitempty"`
3785 // SsoChangeLoginUrlDetails : has no documentation (yet)
3786 SsoChangeLoginUrlDetails json.RawMessage `json:"sso_change_login_url_details,omitempty"`
3787 // SsoChangeLogoutUrlDetails : has no documentation (yet)
3788 SsoChangeLogoutUrlDetails json.RawMessage `json:"sso_change_logout_url_details,omitempty"`
3789 // SsoChangeSamlIdentityModeDetails : has no documentation (yet)
3790 SsoChangeSamlIdentityModeDetails json.RawMessage `json:"sso_change_saml_identity_mode_details,omitempty"`
3791 // SsoRemoveCertDetails : has no documentation (yet)
3792 SsoRemoveCertDetails json.RawMessage `json:"sso_remove_cert_details,omitempty"`
3793 // SsoRemoveLoginUrlDetails : has no documentation (yet)
3794 SsoRemoveLoginUrlDetails json.RawMessage `json:"sso_remove_login_url_details,omitempty"`
3795 // SsoRemoveLogoutUrlDetails : has no documentation (yet)
3796 SsoRemoveLogoutUrlDetails json.RawMessage `json:"sso_remove_logout_url_details,omitempty"`
3797 // TeamFolderChangeStatusDetails : has no documentation (yet)
3798 TeamFolderChangeStatusDetails json.RawMessage `json:"team_folder_change_status_details,omitempty"`
3799 // TeamFolderCreateDetails : has no documentation (yet)
3800 TeamFolderCreateDetails json.RawMessage `json:"team_folder_create_details,omitempty"`
3801 // TeamFolderDowngradeDetails : has no documentation (yet)
3802 TeamFolderDowngradeDetails json.RawMessage `json:"team_folder_downgrade_details,omitempty"`
3803 // TeamFolderPermanentlyDeleteDetails : has no documentation (yet)
3804 TeamFolderPermanentlyDeleteDetails json.RawMessage `json:"team_folder_permanently_delete_details,omitempty"`
3805 // TeamFolderRenameDetails : has no documentation (yet)
3806 TeamFolderRenameDetails json.RawMessage `json:"team_folder_rename_details,omitempty"`
3807 // TeamSelectiveSyncSettingsChangedDetails : has no documentation (yet)
3808 TeamSelectiveSyncSettingsChangedDetails json.RawMessage `json:"team_selective_sync_settings_changed_details,omitempty"`
3809 // AccountCaptureChangePolicyDetails : has no documentation (yet)
3810 AccountCaptureChangePolicyDetails json.RawMessage `json:"account_capture_change_policy_details,omitempty"`
3811 // AllowDownloadDisabledDetails : has no documentation (yet)
3812 AllowDownloadDisabledDetails json.RawMessage `json:"allow_download_disabled_details,omitempty"`
3813 // AllowDownloadEnabledDetails : has no documentation (yet)
3814 AllowDownloadEnabledDetails json.RawMessage `json:"allow_download_enabled_details,omitempty"`
3815 // CameraUploadsPolicyChangedDetails : has no documentation (yet)
3816 CameraUploadsPolicyChangedDetails json.RawMessage `json:"camera_uploads_policy_changed_details,omitempty"`
3817 // DataPlacementRestrictionChangePolicyDetails : has no documentation
3818 // (yet)
3819 DataPlacementRestrictionChangePolicyDetails json.RawMessage `json:"data_placement_restriction_change_policy_details,omitempty"`
3820 // DataPlacementRestrictionSatisfyPolicyDetails : has no documentation
3821 // (yet)
3822 DataPlacementRestrictionSatisfyPolicyDetails json.RawMessage `json:"data_placement_restriction_satisfy_policy_details,omitempty"`
3823 // DeviceApprovalsChangeDesktopPolicyDetails : has no documentation
3824 // (yet)
3825 DeviceApprovalsChangeDesktopPolicyDetails json.RawMessage `json:"device_approvals_change_desktop_policy_details,omitempty"`
3826 // DeviceApprovalsChangeMobilePolicyDetails : has no documentation (yet)
3827 DeviceApprovalsChangeMobilePolicyDetails json.RawMessage `json:"device_approvals_change_mobile_policy_details,omitempty"`
3828 // DeviceApprovalsChangeOverageActionDetails : has no documentation
3829 // (yet)
3830 DeviceApprovalsChangeOverageActionDetails json.RawMessage `json:"device_approvals_change_overage_action_details,omitempty"`
3831 // DeviceApprovalsChangeUnlinkActionDetails : has no documentation (yet)
3832 DeviceApprovalsChangeUnlinkActionDetails json.RawMessage `json:"device_approvals_change_unlink_action_details,omitempty"`
3833 // DirectoryRestrictionsAddMembersDetails : has no documentation (yet)
3834 DirectoryRestrictionsAddMembersDetails json.RawMessage `json:"directory_restrictions_add_members_details,omitempty"`
3835 // DirectoryRestrictionsRemoveMembersDetails : has no documentation
3836 // (yet)
3837 DirectoryRestrictionsRemoveMembersDetails json.RawMessage `json:"directory_restrictions_remove_members_details,omitempty"`
3838 // EmmAddExceptionDetails : has no documentation (yet)
3839 EmmAddExceptionDetails json.RawMessage `json:"emm_add_exception_details,omitempty"`
3840 // EmmChangePolicyDetails : has no documentation (yet)
3841 EmmChangePolicyDetails json.RawMessage `json:"emm_change_policy_details,omitempty"`
3842 // EmmRemoveExceptionDetails : has no documentation (yet)
3843 EmmRemoveExceptionDetails json.RawMessage `json:"emm_remove_exception_details,omitempty"`
3844 // ExtendedVersionHistoryChangePolicyDetails : has no documentation
3845 // (yet)
3846 ExtendedVersionHistoryChangePolicyDetails json.RawMessage `json:"extended_version_history_change_policy_details,omitempty"`
3847 // FileCommentsChangePolicyDetails : has no documentation (yet)
3848 FileCommentsChangePolicyDetails json.RawMessage `json:"file_comments_change_policy_details,omitempty"`
3849 // FileRequestsChangePolicyDetails : has no documentation (yet)
3850 FileRequestsChangePolicyDetails json.RawMessage `json:"file_requests_change_policy_details,omitempty"`
3851 // FileRequestsEmailsEnabledDetails : has no documentation (yet)
3852 FileRequestsEmailsEnabledDetails json.RawMessage `json:"file_requests_emails_enabled_details,omitempty"`
3853 // FileRequestsEmailsRestrictedToTeamOnlyDetails : has no documentation
3854 // (yet)
3855 FileRequestsEmailsRestrictedToTeamOnlyDetails json.RawMessage `json:"file_requests_emails_restricted_to_team_only_details,omitempty"`
3856 // GoogleSsoChangePolicyDetails : has no documentation (yet)
3857 GoogleSsoChangePolicyDetails json.RawMessage `json:"google_sso_change_policy_details,omitempty"`
3858 // GroupUserManagementChangePolicyDetails : has no documentation (yet)
3859 GroupUserManagementChangePolicyDetails json.RawMessage `json:"group_user_management_change_policy_details,omitempty"`
3860 // MemberRequestsChangePolicyDetails : has no documentation (yet)
3861 MemberRequestsChangePolicyDetails json.RawMessage `json:"member_requests_change_policy_details,omitempty"`
3862 // MemberSpaceLimitsAddExceptionDetails : has no documentation (yet)
3863 MemberSpaceLimitsAddExceptionDetails json.RawMessage `json:"member_space_limits_add_exception_details,omitempty"`
3864 // MemberSpaceLimitsChangeCapsTypePolicyDetails : has no documentation
3865 // (yet)
3866 MemberSpaceLimitsChangeCapsTypePolicyDetails json.RawMessage `json:"member_space_limits_change_caps_type_policy_details,omitempty"`
3867 // MemberSpaceLimitsChangePolicyDetails : has no documentation (yet)
3868 MemberSpaceLimitsChangePolicyDetails json.RawMessage `json:"member_space_limits_change_policy_details,omitempty"`
3869 // MemberSpaceLimitsRemoveExceptionDetails : has no documentation (yet)
3870 MemberSpaceLimitsRemoveExceptionDetails json.RawMessage `json:"member_space_limits_remove_exception_details,omitempty"`
3871 // MemberSuggestionsChangePolicyDetails : has no documentation (yet)
3872 MemberSuggestionsChangePolicyDetails json.RawMessage `json:"member_suggestions_change_policy_details,omitempty"`
3873 // MicrosoftOfficeAddinChangePolicyDetails : has no documentation (yet)
3874 MicrosoftOfficeAddinChangePolicyDetails json.RawMessage `json:"microsoft_office_addin_change_policy_details,omitempty"`
3875 // NetworkControlChangePolicyDetails : has no documentation (yet)
3876 NetworkControlChangePolicyDetails json.RawMessage `json:"network_control_change_policy_details,omitempty"`
3877 // PaperChangeDeploymentPolicyDetails : has no documentation (yet)
3878 PaperChangeDeploymentPolicyDetails json.RawMessage `json:"paper_change_deployment_policy_details,omitempty"`
3879 // PaperChangeMemberLinkPolicyDetails : has no documentation (yet)
3880 PaperChangeMemberLinkPolicyDetails json.RawMessage `json:"paper_change_member_link_policy_details,omitempty"`
3881 // PaperChangeMemberPolicyDetails : has no documentation (yet)
3882 PaperChangeMemberPolicyDetails json.RawMessage `json:"paper_change_member_policy_details,omitempty"`
3883 // PaperChangePolicyDetails : has no documentation (yet)
3884 PaperChangePolicyDetails json.RawMessage `json:"paper_change_policy_details,omitempty"`
3885 // PaperEnabledUsersGroupAdditionDetails : has no documentation (yet)
3886 PaperEnabledUsersGroupAdditionDetails json.RawMessage `json:"paper_enabled_users_group_addition_details,omitempty"`
3887 // PaperEnabledUsersGroupRemovalDetails : has no documentation (yet)
3888 PaperEnabledUsersGroupRemovalDetails json.RawMessage `json:"paper_enabled_users_group_removal_details,omitempty"`
3889 // PermanentDeleteChangePolicyDetails : has no documentation (yet)
3890 PermanentDeleteChangePolicyDetails json.RawMessage `json:"permanent_delete_change_policy_details,omitempty"`
3891 // SharingChangeFolderJoinPolicyDetails : has no documentation (yet)
3892 SharingChangeFolderJoinPolicyDetails json.RawMessage `json:"sharing_change_folder_join_policy_details,omitempty"`
3893 // SharingChangeLinkPolicyDetails : has no documentation (yet)
3894 SharingChangeLinkPolicyDetails json.RawMessage `json:"sharing_change_link_policy_details,omitempty"`
3895 // SharingChangeMemberPolicyDetails : has no documentation (yet)
3896 SharingChangeMemberPolicyDetails json.RawMessage `json:"sharing_change_member_policy_details,omitempty"`
3897 // ShowcaseChangeDownloadPolicyDetails : has no documentation (yet)
3898 ShowcaseChangeDownloadPolicyDetails json.RawMessage `json:"showcase_change_download_policy_details,omitempty"`
3899 // ShowcaseChangeEnabledPolicyDetails : has no documentation (yet)
3900 ShowcaseChangeEnabledPolicyDetails json.RawMessage `json:"showcase_change_enabled_policy_details,omitempty"`
3901 // ShowcaseChangeExternalSharingPolicyDetails : has no documentation
3902 // (yet)
3903 ShowcaseChangeExternalSharingPolicyDetails json.RawMessage `json:"showcase_change_external_sharing_policy_details,omitempty"`
3904 // SmartSyncChangePolicyDetails : has no documentation (yet)
3905 SmartSyncChangePolicyDetails json.RawMessage `json:"smart_sync_change_policy_details,omitempty"`
3906 // SmartSyncNotOptOutDetails : has no documentation (yet)
3907 SmartSyncNotOptOutDetails json.RawMessage `json:"smart_sync_not_opt_out_details,omitempty"`
3908 // SmartSyncOptOutDetails : has no documentation (yet)
3909 SmartSyncOptOutDetails json.RawMessage `json:"smart_sync_opt_out_details,omitempty"`
3910 // SsoChangePolicyDetails : has no documentation (yet)
3911 SsoChangePolicyDetails json.RawMessage `json:"sso_change_policy_details,omitempty"`
3912 // TeamSelectiveSyncPolicyChangedDetails : has no documentation (yet)
3913 TeamSelectiveSyncPolicyChangedDetails json.RawMessage `json:"team_selective_sync_policy_changed_details,omitempty"`
3914 // TfaChangePolicyDetails : has no documentation (yet)
3915 TfaChangePolicyDetails json.RawMessage `json:"tfa_change_policy_details,omitempty"`
3916 // TwoAccountChangePolicyDetails : has no documentation (yet)
3917 TwoAccountChangePolicyDetails json.RawMessage `json:"two_account_change_policy_details,omitempty"`
3918 // ViewerInfoPolicyChangedDetails : has no documentation (yet)
3919 ViewerInfoPolicyChangedDetails json.RawMessage `json:"viewer_info_policy_changed_details,omitempty"`
3920 // WebSessionsChangeFixedLengthPolicyDetails : has no documentation
3921 // (yet)
3922 WebSessionsChangeFixedLengthPolicyDetails json.RawMessage `json:"web_sessions_change_fixed_length_policy_details,omitempty"`
3923 // WebSessionsChangeIdleLengthPolicyDetails : has no documentation (yet)
3924 WebSessionsChangeIdleLengthPolicyDetails json.RawMessage `json:"web_sessions_change_idle_length_policy_details,omitempty"`
3925 // TeamMergeFromDetails : has no documentation (yet)
3926 TeamMergeFromDetails json.RawMessage `json:"team_merge_from_details,omitempty"`
3927 // TeamMergeToDetails : has no documentation (yet)
3928 TeamMergeToDetails json.RawMessage `json:"team_merge_to_details,omitempty"`
3929 // TeamProfileAddLogoDetails : has no documentation (yet)
3930 TeamProfileAddLogoDetails json.RawMessage `json:"team_profile_add_logo_details,omitempty"`
3931 // TeamProfileChangeDefaultLanguageDetails : has no documentation (yet)
3932 TeamProfileChangeDefaultLanguageDetails json.RawMessage `json:"team_profile_change_default_language_details,omitempty"`
3933 // TeamProfileChangeLogoDetails : has no documentation (yet)
3934 TeamProfileChangeLogoDetails json.RawMessage `json:"team_profile_change_logo_details,omitempty"`
3935 // TeamProfileChangeNameDetails : has no documentation (yet)
3936 TeamProfileChangeNameDetails json.RawMessage `json:"team_profile_change_name_details,omitempty"`
3937 // TeamProfileRemoveLogoDetails : has no documentation (yet)
3938 TeamProfileRemoveLogoDetails json.RawMessage `json:"team_profile_remove_logo_details,omitempty"`
3939 // TfaAddBackupPhoneDetails : has no documentation (yet)
3940 TfaAddBackupPhoneDetails json.RawMessage `json:"tfa_add_backup_phone_details,omitempty"`
3941 // TfaAddSecurityKeyDetails : has no documentation (yet)
3942 TfaAddSecurityKeyDetails json.RawMessage `json:"tfa_add_security_key_details,omitempty"`
3943 // TfaChangeBackupPhoneDetails : has no documentation (yet)
3944 TfaChangeBackupPhoneDetails json.RawMessage `json:"tfa_change_backup_phone_details,omitempty"`
3945 // TfaChangeStatusDetails : has no documentation (yet)
3946 TfaChangeStatusDetails json.RawMessage `json:"tfa_change_status_details,omitempty"`
3947 // TfaRemoveBackupPhoneDetails : has no documentation (yet)
3948 TfaRemoveBackupPhoneDetails json.RawMessage `json:"tfa_remove_backup_phone_details,omitempty"`
3949 // TfaRemoveSecurityKeyDetails : has no documentation (yet)
3950 TfaRemoveSecurityKeyDetails json.RawMessage `json:"tfa_remove_security_key_details,omitempty"`
3951 // TfaResetDetails : has no documentation (yet)
3952 TfaResetDetails json.RawMessage `json:"tfa_reset_details,omitempty"`
3953 // MissingDetails : Hints that this event was returned with missing
3954 // details due to an internal error.
3955 MissingDetails json.RawMessage `json:"missing_details,omitempty"`
3956 }
3957 var w wrap
3958 var err error
3959 if err = json.Unmarshal(body, &w); err != nil {
3960 return err
3961 }
3962 u.Tag = w.Tag
3963 switch u.Tag {
3964 case "app_link_team_details":
3965 err = json.Unmarshal(body, &u.AppLinkTeamDetails)
3966
3967 if err != nil {
3968 return err
3969 }
3970 case "app_link_user_details":
3971 err = json.Unmarshal(body, &u.AppLinkUserDetails)
3972
3973 if err != nil {
3974 return err
3975 }
3976 case "app_unlink_team_details":
3977 err = json.Unmarshal(body, &u.AppUnlinkTeamDetails)
3978
3979 if err != nil {
3980 return err
3981 }
3982 case "app_unlink_user_details":
3983 err = json.Unmarshal(body, &u.AppUnlinkUserDetails)
3984
3985 if err != nil {
3986 return err
3987 }
3988 case "file_add_comment_details":
3989 err = json.Unmarshal(body, &u.FileAddCommentDetails)
3990
3991 if err != nil {
3992 return err
3993 }
3994 case "file_change_comment_subscription_details":
3995 err = json.Unmarshal(body, &u.FileChangeCommentSubscriptionDetails)
3996
3997 if err != nil {
3998 return err
3999 }
4000 case "file_delete_comment_details":
4001 err = json.Unmarshal(body, &u.FileDeleteCommentDetails)
4002
4003 if err != nil {
4004 return err
4005 }
4006 case "file_edit_comment_details":
4007 err = json.Unmarshal(body, &u.FileEditCommentDetails)
4008
4009 if err != nil {
4010 return err
4011 }
4012 case "file_like_comment_details":
4013 err = json.Unmarshal(body, &u.FileLikeCommentDetails)
4014
4015 if err != nil {
4016 return err
4017 }
4018 case "file_resolve_comment_details":
4019 err = json.Unmarshal(body, &u.FileResolveCommentDetails)
4020
4021 if err != nil {
4022 return err
4023 }
4024 case "file_unlike_comment_details":
4025 err = json.Unmarshal(body, &u.FileUnlikeCommentDetails)
4026
4027 if err != nil {
4028 return err
4029 }
4030 case "file_unresolve_comment_details":
4031 err = json.Unmarshal(body, &u.FileUnresolveCommentDetails)
4032
4033 if err != nil {
4034 return err
4035 }
4036 case "device_change_ip_desktop_details":
4037 err = json.Unmarshal(body, &u.DeviceChangeIpDesktopDetails)
4038
4039 if err != nil {
4040 return err
4041 }
4042 case "device_change_ip_mobile_details":
4043 err = json.Unmarshal(body, &u.DeviceChangeIpMobileDetails)
4044
4045 if err != nil {
4046 return err
4047 }
4048 case "device_change_ip_web_details":
4049 err = json.Unmarshal(body, &u.DeviceChangeIpWebDetails)
4050
4051 if err != nil {
4052 return err
4053 }
4054 case "device_delete_on_unlink_fail_details":
4055 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFailDetails)
4056
4057 if err != nil {
4058 return err
4059 }
4060 case "device_delete_on_unlink_success_details":
4061 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccessDetails)
4062
4063 if err != nil {
4064 return err
4065 }
4066 case "device_link_fail_details":
4067 err = json.Unmarshal(body, &u.DeviceLinkFailDetails)
4068
4069 if err != nil {
4070 return err
4071 }
4072 case "device_link_success_details":
4073 err = json.Unmarshal(body, &u.DeviceLinkSuccessDetails)
4074
4075 if err != nil {
4076 return err
4077 }
4078 case "device_management_disabled_details":
4079 err = json.Unmarshal(body, &u.DeviceManagementDisabledDetails)
4080
4081 if err != nil {
4082 return err
4083 }
4084 case "device_management_enabled_details":
4085 err = json.Unmarshal(body, &u.DeviceManagementEnabledDetails)
4086
4087 if err != nil {
4088 return err
4089 }
4090 case "device_unlink_details":
4091 err = json.Unmarshal(body, &u.DeviceUnlinkDetails)
4092
4093 if err != nil {
4094 return err
4095 }
4096 case "emm_refresh_auth_token_details":
4097 err = json.Unmarshal(body, &u.EmmRefreshAuthTokenDetails)
4098
4099 if err != nil {
4100 return err
4101 }
4102 case "account_capture_change_availability_details":
4103 err = json.Unmarshal(body, &u.AccountCaptureChangeAvailabilityDetails)
4104
4105 if err != nil {
4106 return err
4107 }
4108 case "account_capture_migrate_account_details":
4109 err = json.Unmarshal(body, &u.AccountCaptureMigrateAccountDetails)
4110
4111 if err != nil {
4112 return err
4113 }
4114 case "account_capture_notification_emails_sent_details":
4115 err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSentDetails)
4116
4117 if err != nil {
4118 return err
4119 }
4120 case "account_capture_relinquish_account_details":
4121 err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccountDetails)
4122
4123 if err != nil {
4124 return err
4125 }
4126 case "disabled_domain_invites_details":
4127 err = json.Unmarshal(body, &u.DisabledDomainInvitesDetails)
4128
4129 if err != nil {
4130 return err
4131 }
4132 case "domain_invites_approve_request_to_join_team_details":
4133 err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeamDetails)
4134
4135 if err != nil {
4136 return err
4137 }
4138 case "domain_invites_decline_request_to_join_team_details":
4139 err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeamDetails)
4140
4141 if err != nil {
4142 return err
4143 }
4144 case "domain_invites_email_existing_users_details":
4145 err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsersDetails)
4146
4147 if err != nil {
4148 return err
4149 }
4150 case "domain_invites_request_to_join_team_details":
4151 err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeamDetails)
4152
4153 if err != nil {
4154 return err
4155 }
4156 case "domain_invites_set_invite_new_user_pref_to_no_details":
4157 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNoDetails)
4158
4159 if err != nil {
4160 return err
4161 }
4162 case "domain_invites_set_invite_new_user_pref_to_yes_details":
4163 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYesDetails)
4164
4165 if err != nil {
4166 return err
4167 }
4168 case "domain_verification_add_domain_fail_details":
4169 err = json.Unmarshal(body, &u.DomainVerificationAddDomainFailDetails)
4170
4171 if err != nil {
4172 return err
4173 }
4174 case "domain_verification_add_domain_success_details":
4175 err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccessDetails)
4176
4177 if err != nil {
4178 return err
4179 }
4180 case "domain_verification_remove_domain_details":
4181 err = json.Unmarshal(body, &u.DomainVerificationRemoveDomainDetails)
4182
4183 if err != nil {
4184 return err
4185 }
4186 case "enabled_domain_invites_details":
4187 err = json.Unmarshal(body, &u.EnabledDomainInvitesDetails)
4188
4189 if err != nil {
4190 return err
4191 }
4192 case "create_folder_details":
4193 err = json.Unmarshal(body, &u.CreateFolderDetails)
4194
4195 if err != nil {
4196 return err
4197 }
4198 case "file_add_details":
4199 err = json.Unmarshal(body, &u.FileAddDetails)
4200
4201 if err != nil {
4202 return err
4203 }
4204 case "file_copy_details":
4205 err = json.Unmarshal(body, &u.FileCopyDetails)
4206
4207 if err != nil {
4208 return err
4209 }
4210 case "file_delete_details":
4211 err = json.Unmarshal(body, &u.FileDeleteDetails)
4212
4213 if err != nil {
4214 return err
4215 }
4216 case "file_download_details":
4217 err = json.Unmarshal(body, &u.FileDownloadDetails)
4218
4219 if err != nil {
4220 return err
4221 }
4222 case "file_edit_details":
4223 err = json.Unmarshal(body, &u.FileEditDetails)
4224
4225 if err != nil {
4226 return err
4227 }
4228 case "file_get_copy_reference_details":
4229 err = json.Unmarshal(body, &u.FileGetCopyReferenceDetails)
4230
4231 if err != nil {
4232 return err
4233 }
4234 case "file_move_details":
4235 err = json.Unmarshal(body, &u.FileMoveDetails)
4236
4237 if err != nil {
4238 return err
4239 }
4240 case "file_permanently_delete_details":
4241 err = json.Unmarshal(body, &u.FilePermanentlyDeleteDetails)
4242
4243 if err != nil {
4244 return err
4245 }
4246 case "file_preview_details":
4247 err = json.Unmarshal(body, &u.FilePreviewDetails)
4248
4249 if err != nil {
4250 return err
4251 }
4252 case "file_rename_details":
4253 err = json.Unmarshal(body, &u.FileRenameDetails)
4254
4255 if err != nil {
4256 return err
4257 }
4258 case "file_restore_details":
4259 err = json.Unmarshal(body, &u.FileRestoreDetails)
4260
4261 if err != nil {
4262 return err
4263 }
4264 case "file_revert_details":
4265 err = json.Unmarshal(body, &u.FileRevertDetails)
4266
4267 if err != nil {
4268 return err
4269 }
4270 case "file_rollback_changes_details":
4271 err = json.Unmarshal(body, &u.FileRollbackChangesDetails)
4272
4273 if err != nil {
4274 return err
4275 }
4276 case "file_save_copy_reference_details":
4277 err = json.Unmarshal(body, &u.FileSaveCopyReferenceDetails)
4278
4279 if err != nil {
4280 return err
4281 }
4282 case "file_request_change_details":
4283 err = json.Unmarshal(body, &u.FileRequestChangeDetails)
4284
4285 if err != nil {
4286 return err
4287 }
4288 case "file_request_close_details":
4289 err = json.Unmarshal(body, &u.FileRequestCloseDetails)
4290
4291 if err != nil {
4292 return err
4293 }
4294 case "file_request_create_details":
4295 err = json.Unmarshal(body, &u.FileRequestCreateDetails)
4296
4297 if err != nil {
4298 return err
4299 }
4300 case "file_request_receive_file_details":
4301 err = json.Unmarshal(body, &u.FileRequestReceiveFileDetails)
4302
4303 if err != nil {
4304 return err
4305 }
4306 case "group_add_external_id_details":
4307 err = json.Unmarshal(body, &u.GroupAddExternalIdDetails)
4308
4309 if err != nil {
4310 return err
4311 }
4312 case "group_add_member_details":
4313 err = json.Unmarshal(body, &u.GroupAddMemberDetails)
4314
4315 if err != nil {
4316 return err
4317 }
4318 case "group_change_external_id_details":
4319 err = json.Unmarshal(body, &u.GroupChangeExternalIdDetails)
4320
4321 if err != nil {
4322 return err
4323 }
4324 case "group_change_management_type_details":
4325 err = json.Unmarshal(body, &u.GroupChangeManagementTypeDetails)
4326
4327 if err != nil {
4328 return err
4329 }
4330 case "group_change_member_role_details":
4331 err = json.Unmarshal(body, &u.GroupChangeMemberRoleDetails)
4332
4333 if err != nil {
4334 return err
4335 }
4336 case "group_create_details":
4337 err = json.Unmarshal(body, &u.GroupCreateDetails)
4338
4339 if err != nil {
4340 return err
4341 }
4342 case "group_delete_details":
4343 err = json.Unmarshal(body, &u.GroupDeleteDetails)
4344
4345 if err != nil {
4346 return err
4347 }
4348 case "group_description_updated_details":
4349 err = json.Unmarshal(body, &u.GroupDescriptionUpdatedDetails)
4350
4351 if err != nil {
4352 return err
4353 }
4354 case "group_join_policy_updated_details":
4355 err = json.Unmarshal(body, &u.GroupJoinPolicyUpdatedDetails)
4356
4357 if err != nil {
4358 return err
4359 }
4360 case "group_moved_details":
4361 err = json.Unmarshal(body, &u.GroupMovedDetails)
4362
4363 if err != nil {
4364 return err
4365 }
4366 case "group_remove_external_id_details":
4367 err = json.Unmarshal(body, &u.GroupRemoveExternalIdDetails)
4368
4369 if err != nil {
4370 return err
4371 }
4372 case "group_remove_member_details":
4373 err = json.Unmarshal(body, &u.GroupRemoveMemberDetails)
4374
4375 if err != nil {
4376 return err
4377 }
4378 case "group_rename_details":
4379 err = json.Unmarshal(body, &u.GroupRenameDetails)
4380
4381 if err != nil {
4382 return err
4383 }
4384 case "emm_error_details":
4385 err = json.Unmarshal(body, &u.EmmErrorDetails)
4386
4387 if err != nil {
4388 return err
4389 }
4390 case "login_fail_details":
4391 err = json.Unmarshal(body, &u.LoginFailDetails)
4392
4393 if err != nil {
4394 return err
4395 }
4396 case "login_success_details":
4397 err = json.Unmarshal(body, &u.LoginSuccessDetails)
4398
4399 if err != nil {
4400 return err
4401 }
4402 case "logout_details":
4403 err = json.Unmarshal(body, &u.LogoutDetails)
4404
4405 if err != nil {
4406 return err
4407 }
4408 case "reseller_support_session_end_details":
4409 err = json.Unmarshal(body, &u.ResellerSupportSessionEndDetails)
4410
4411 if err != nil {
4412 return err
4413 }
4414 case "reseller_support_session_start_details":
4415 err = json.Unmarshal(body, &u.ResellerSupportSessionStartDetails)
4416
4417 if err != nil {
4418 return err
4419 }
4420 case "sign_in_as_session_end_details":
4421 err = json.Unmarshal(body, &u.SignInAsSessionEndDetails)
4422
4423 if err != nil {
4424 return err
4425 }
4426 case "sign_in_as_session_start_details":
4427 err = json.Unmarshal(body, &u.SignInAsSessionStartDetails)
4428
4429 if err != nil {
4430 return err
4431 }
4432 case "sso_error_details":
4433 err = json.Unmarshal(body, &u.SsoErrorDetails)
4434
4435 if err != nil {
4436 return err
4437 }
4438 case "member_add_name_details":
4439 err = json.Unmarshal(body, &u.MemberAddNameDetails)
4440
4441 if err != nil {
4442 return err
4443 }
4444 case "member_change_admin_role_details":
4445 err = json.Unmarshal(body, &u.MemberChangeAdminRoleDetails)
4446
4447 if err != nil {
4448 return err
4449 }
4450 case "member_change_email_details":
4451 err = json.Unmarshal(body, &u.MemberChangeEmailDetails)
4452
4453 if err != nil {
4454 return err
4455 }
4456 case "member_change_membership_type_details":
4457 err = json.Unmarshal(body, &u.MemberChangeMembershipTypeDetails)
4458
4459 if err != nil {
4460 return err
4461 }
4462 case "member_change_name_details":
4463 err = json.Unmarshal(body, &u.MemberChangeNameDetails)
4464
4465 if err != nil {
4466 return err
4467 }
4468 case "member_change_status_details":
4469 err = json.Unmarshal(body, &u.MemberChangeStatusDetails)
4470
4471 if err != nil {
4472 return err
4473 }
4474 case "member_delete_manual_contacts_details":
4475 err = json.Unmarshal(body, &u.MemberDeleteManualContactsDetails)
4476
4477 if err != nil {
4478 return err
4479 }
4480 case "member_permanently_delete_account_contents_details":
4481 err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContentsDetails)
4482
4483 if err != nil {
4484 return err
4485 }
4486 case "member_space_limits_add_custom_quota_details":
4487 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuotaDetails)
4488
4489 if err != nil {
4490 return err
4491 }
4492 case "member_space_limits_change_custom_quota_details":
4493 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuotaDetails)
4494
4495 if err != nil {
4496 return err
4497 }
4498 case "member_space_limits_change_status_details":
4499 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatusDetails)
4500
4501 if err != nil {
4502 return err
4503 }
4504 case "member_space_limits_remove_custom_quota_details":
4505 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuotaDetails)
4506
4507 if err != nil {
4508 return err
4509 }
4510 case "member_suggest_details":
4511 err = json.Unmarshal(body, &u.MemberSuggestDetails)
4512
4513 if err != nil {
4514 return err
4515 }
4516 case "member_transfer_account_contents_details":
4517 err = json.Unmarshal(body, &u.MemberTransferAccountContentsDetails)
4518
4519 if err != nil {
4520 return err
4521 }
4522 case "secondary_mails_policy_changed_details":
4523 err = json.Unmarshal(body, &u.SecondaryMailsPolicyChangedDetails)
4524
4525 if err != nil {
4526 return err
4527 }
4528 case "paper_content_add_member_details":
4529 err = json.Unmarshal(body, &u.PaperContentAddMemberDetails)
4530
4531 if err != nil {
4532 return err
4533 }
4534 case "paper_content_add_to_folder_details":
4535 err = json.Unmarshal(body, &u.PaperContentAddToFolderDetails)
4536
4537 if err != nil {
4538 return err
4539 }
4540 case "paper_content_archive_details":
4541 err = json.Unmarshal(body, &u.PaperContentArchiveDetails)
4542
4543 if err != nil {
4544 return err
4545 }
4546 case "paper_content_create_details":
4547 err = json.Unmarshal(body, &u.PaperContentCreateDetails)
4548
4549 if err != nil {
4550 return err
4551 }
4552 case "paper_content_permanently_delete_details":
4553 err = json.Unmarshal(body, &u.PaperContentPermanentlyDeleteDetails)
4554
4555 if err != nil {
4556 return err
4557 }
4558 case "paper_content_remove_from_folder_details":
4559 err = json.Unmarshal(body, &u.PaperContentRemoveFromFolderDetails)
4560
4561 if err != nil {
4562 return err
4563 }
4564 case "paper_content_remove_member_details":
4565 err = json.Unmarshal(body, &u.PaperContentRemoveMemberDetails)
4566
4567 if err != nil {
4568 return err
4569 }
4570 case "paper_content_rename_details":
4571 err = json.Unmarshal(body, &u.PaperContentRenameDetails)
4572
4573 if err != nil {
4574 return err
4575 }
4576 case "paper_content_restore_details":
4577 err = json.Unmarshal(body, &u.PaperContentRestoreDetails)
4578
4579 if err != nil {
4580 return err
4581 }
4582 case "paper_doc_add_comment_details":
4583 err = json.Unmarshal(body, &u.PaperDocAddCommentDetails)
4584
4585 if err != nil {
4586 return err
4587 }
4588 case "paper_doc_change_member_role_details":
4589 err = json.Unmarshal(body, &u.PaperDocChangeMemberRoleDetails)
4590
4591 if err != nil {
4592 return err
4593 }
4594 case "paper_doc_change_sharing_policy_details":
4595 err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicyDetails)
4596
4597 if err != nil {
4598 return err
4599 }
4600 case "paper_doc_change_subscription_details":
4601 err = json.Unmarshal(body, &u.PaperDocChangeSubscriptionDetails)
4602
4603 if err != nil {
4604 return err
4605 }
4606 case "paper_doc_deleted_details":
4607 err = json.Unmarshal(body, &u.PaperDocDeletedDetails)
4608
4609 if err != nil {
4610 return err
4611 }
4612 case "paper_doc_delete_comment_details":
4613 err = json.Unmarshal(body, &u.PaperDocDeleteCommentDetails)
4614
4615 if err != nil {
4616 return err
4617 }
4618 case "paper_doc_download_details":
4619 err = json.Unmarshal(body, &u.PaperDocDownloadDetails)
4620
4621 if err != nil {
4622 return err
4623 }
4624 case "paper_doc_edit_details":
4625 err = json.Unmarshal(body, &u.PaperDocEditDetails)
4626
4627 if err != nil {
4628 return err
4629 }
4630 case "paper_doc_edit_comment_details":
4631 err = json.Unmarshal(body, &u.PaperDocEditCommentDetails)
4632
4633 if err != nil {
4634 return err
4635 }
4636 case "paper_doc_followed_details":
4637 err = json.Unmarshal(body, &u.PaperDocFollowedDetails)
4638
4639 if err != nil {
4640 return err
4641 }
4642 case "paper_doc_mention_details":
4643 err = json.Unmarshal(body, &u.PaperDocMentionDetails)
4644
4645 if err != nil {
4646 return err
4647 }
4648 case "paper_doc_ownership_changed_details":
4649 err = json.Unmarshal(body, &u.PaperDocOwnershipChangedDetails)
4650
4651 if err != nil {
4652 return err
4653 }
4654 case "paper_doc_request_access_details":
4655 err = json.Unmarshal(body, &u.PaperDocRequestAccessDetails)
4656
4657 if err != nil {
4658 return err
4659 }
4660 case "paper_doc_resolve_comment_details":
4661 err = json.Unmarshal(body, &u.PaperDocResolveCommentDetails)
4662
4663 if err != nil {
4664 return err
4665 }
4666 case "paper_doc_revert_details":
4667 err = json.Unmarshal(body, &u.PaperDocRevertDetails)
4668
4669 if err != nil {
4670 return err
4671 }
4672 case "paper_doc_slack_share_details":
4673 err = json.Unmarshal(body, &u.PaperDocSlackShareDetails)
4674
4675 if err != nil {
4676 return err
4677 }
4678 case "paper_doc_team_invite_details":
4679 err = json.Unmarshal(body, &u.PaperDocTeamInviteDetails)
4680
4681 if err != nil {
4682 return err
4683 }
4684 case "paper_doc_trashed_details":
4685 err = json.Unmarshal(body, &u.PaperDocTrashedDetails)
4686
4687 if err != nil {
4688 return err
4689 }
4690 case "paper_doc_unresolve_comment_details":
4691 err = json.Unmarshal(body, &u.PaperDocUnresolveCommentDetails)
4692
4693 if err != nil {
4694 return err
4695 }
4696 case "paper_doc_untrashed_details":
4697 err = json.Unmarshal(body, &u.PaperDocUntrashedDetails)
4698
4699 if err != nil {
4700 return err
4701 }
4702 case "paper_doc_view_details":
4703 err = json.Unmarshal(body, &u.PaperDocViewDetails)
4704
4705 if err != nil {
4706 return err
4707 }
4708 case "paper_external_view_allow_details":
4709 err = json.Unmarshal(body, &u.PaperExternalViewAllowDetails)
4710
4711 if err != nil {
4712 return err
4713 }
4714 case "paper_external_view_default_team_details":
4715 err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeamDetails)
4716
4717 if err != nil {
4718 return err
4719 }
4720 case "paper_external_view_forbid_details":
4721 err = json.Unmarshal(body, &u.PaperExternalViewForbidDetails)
4722
4723 if err != nil {
4724 return err
4725 }
4726 case "paper_folder_change_subscription_details":
4727 err = json.Unmarshal(body, &u.PaperFolderChangeSubscriptionDetails)
4728
4729 if err != nil {
4730 return err
4731 }
4732 case "paper_folder_deleted_details":
4733 err = json.Unmarshal(body, &u.PaperFolderDeletedDetails)
4734
4735 if err != nil {
4736 return err
4737 }
4738 case "paper_folder_followed_details":
4739 err = json.Unmarshal(body, &u.PaperFolderFollowedDetails)
4740
4741 if err != nil {
4742 return err
4743 }
4744 case "paper_folder_team_invite_details":
4745 err = json.Unmarshal(body, &u.PaperFolderTeamInviteDetails)
4746
4747 if err != nil {
4748 return err
4749 }
4750 case "password_change_details":
4751 err = json.Unmarshal(body, &u.PasswordChangeDetails)
4752
4753 if err != nil {
4754 return err
4755 }
4756 case "password_reset_details":
4757 err = json.Unmarshal(body, &u.PasswordResetDetails)
4758
4759 if err != nil {
4760 return err
4761 }
4762 case "password_reset_all_details":
4763 err = json.Unmarshal(body, &u.PasswordResetAllDetails)
4764
4765 if err != nil {
4766 return err
4767 }
4768 case "emm_create_exceptions_report_details":
4769 err = json.Unmarshal(body, &u.EmmCreateExceptionsReportDetails)
4770
4771 if err != nil {
4772 return err
4773 }
4774 case "emm_create_usage_report_details":
4775 err = json.Unmarshal(body, &u.EmmCreateUsageReportDetails)
4776
4777 if err != nil {
4778 return err
4779 }
4780 case "export_members_report_details":
4781 err = json.Unmarshal(body, &u.ExportMembersReportDetails)
4782
4783 if err != nil {
4784 return err
4785 }
4786 case "paper_admin_export_start_details":
4787 err = json.Unmarshal(body, &u.PaperAdminExportStartDetails)
4788
4789 if err != nil {
4790 return err
4791 }
4792 case "smart_sync_create_admin_privilege_report_details":
4793 err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReportDetails)
4794
4795 if err != nil {
4796 return err
4797 }
4798 case "team_activity_create_report_details":
4799 err = json.Unmarshal(body, &u.TeamActivityCreateReportDetails)
4800
4801 if err != nil {
4802 return err
4803 }
4804 case "collection_share_details":
4805 err = json.Unmarshal(body, &u.CollectionShareDetails)
4806
4807 if err != nil {
4808 return err
4809 }
4810 case "note_acl_invite_only_details":
4811 err = json.Unmarshal(body, &u.NoteAclInviteOnlyDetails)
4812
4813 if err != nil {
4814 return err
4815 }
4816 case "note_acl_link_details":
4817 err = json.Unmarshal(body, &u.NoteAclLinkDetails)
4818
4819 if err != nil {
4820 return err
4821 }
4822 case "note_acl_team_link_details":
4823 err = json.Unmarshal(body, &u.NoteAclTeamLinkDetails)
4824
4825 if err != nil {
4826 return err
4827 }
4828 case "note_shared_details":
4829 err = json.Unmarshal(body, &u.NoteSharedDetails)
4830
4831 if err != nil {
4832 return err
4833 }
4834 case "note_share_receive_details":
4835 err = json.Unmarshal(body, &u.NoteShareReceiveDetails)
4836
4837 if err != nil {
4838 return err
4839 }
4840 case "open_note_shared_details":
4841 err = json.Unmarshal(body, &u.OpenNoteSharedDetails)
4842
4843 if err != nil {
4844 return err
4845 }
4846 case "sf_add_group_details":
4847 err = json.Unmarshal(body, &u.SfAddGroupDetails)
4848
4849 if err != nil {
4850 return err
4851 }
4852 case "sf_allow_non_members_to_view_shared_links_details":
4853 err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinksDetails)
4854
4855 if err != nil {
4856 return err
4857 }
4858 case "sf_external_invite_warn_details":
4859 err = json.Unmarshal(body, &u.SfExternalInviteWarnDetails)
4860
4861 if err != nil {
4862 return err
4863 }
4864 case "sf_fb_invite_details":
4865 err = json.Unmarshal(body, &u.SfFbInviteDetails)
4866
4867 if err != nil {
4868 return err
4869 }
4870 case "sf_fb_invite_change_role_details":
4871 err = json.Unmarshal(body, &u.SfFbInviteChangeRoleDetails)
4872
4873 if err != nil {
4874 return err
4875 }
4876 case "sf_fb_uninvite_details":
4877 err = json.Unmarshal(body, &u.SfFbUninviteDetails)
4878
4879 if err != nil {
4880 return err
4881 }
4882 case "sf_invite_group_details":
4883 err = json.Unmarshal(body, &u.SfInviteGroupDetails)
4884
4885 if err != nil {
4886 return err
4887 }
4888 case "sf_team_grant_access_details":
4889 err = json.Unmarshal(body, &u.SfTeamGrantAccessDetails)
4890
4891 if err != nil {
4892 return err
4893 }
4894 case "sf_team_invite_details":
4895 err = json.Unmarshal(body, &u.SfTeamInviteDetails)
4896
4897 if err != nil {
4898 return err
4899 }
4900 case "sf_team_invite_change_role_details":
4901 err = json.Unmarshal(body, &u.SfTeamInviteChangeRoleDetails)
4902
4903 if err != nil {
4904 return err
4905 }
4906 case "sf_team_join_details":
4907 err = json.Unmarshal(body, &u.SfTeamJoinDetails)
4908
4909 if err != nil {
4910 return err
4911 }
4912 case "sf_team_join_from_oob_link_details":
4913 err = json.Unmarshal(body, &u.SfTeamJoinFromOobLinkDetails)
4914
4915 if err != nil {
4916 return err
4917 }
4918 case "sf_team_uninvite_details":
4919 err = json.Unmarshal(body, &u.SfTeamUninviteDetails)
4920
4921 if err != nil {
4922 return err
4923 }
4924 case "shared_content_add_invitees_details":
4925 err = json.Unmarshal(body, &u.SharedContentAddInviteesDetails)
4926
4927 if err != nil {
4928 return err
4929 }
4930 case "shared_content_add_link_expiry_details":
4931 err = json.Unmarshal(body, &u.SharedContentAddLinkExpiryDetails)
4932
4933 if err != nil {
4934 return err
4935 }
4936 case "shared_content_add_link_password_details":
4937 err = json.Unmarshal(body, &u.SharedContentAddLinkPasswordDetails)
4938
4939 if err != nil {
4940 return err
4941 }
4942 case "shared_content_add_member_details":
4943 err = json.Unmarshal(body, &u.SharedContentAddMemberDetails)
4944
4945 if err != nil {
4946 return err
4947 }
4948 case "shared_content_change_downloads_policy_details":
4949 err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicyDetails)
4950
4951 if err != nil {
4952 return err
4953 }
4954 case "shared_content_change_invitee_role_details":
4955 err = json.Unmarshal(body, &u.SharedContentChangeInviteeRoleDetails)
4956
4957 if err != nil {
4958 return err
4959 }
4960 case "shared_content_change_link_audience_details":
4961 err = json.Unmarshal(body, &u.SharedContentChangeLinkAudienceDetails)
4962
4963 if err != nil {
4964 return err
4965 }
4966 case "shared_content_change_link_expiry_details":
4967 err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiryDetails)
4968
4969 if err != nil {
4970 return err
4971 }
4972 case "shared_content_change_link_password_details":
4973 err = json.Unmarshal(body, &u.SharedContentChangeLinkPasswordDetails)
4974
4975 if err != nil {
4976 return err
4977 }
4978 case "shared_content_change_member_role_details":
4979 err = json.Unmarshal(body, &u.SharedContentChangeMemberRoleDetails)
4980
4981 if err != nil {
4982 return err
4983 }
4984 case "shared_content_change_viewer_info_policy_details":
4985 err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicyDetails)
4986
4987 if err != nil {
4988 return err
4989 }
4990 case "shared_content_claim_invitation_details":
4991 err = json.Unmarshal(body, &u.SharedContentClaimInvitationDetails)
4992
4993 if err != nil {
4994 return err
4995 }
4996 case "shared_content_copy_details":
4997 err = json.Unmarshal(body, &u.SharedContentCopyDetails)
4998
4999 if err != nil {
5000 return err
5001 }
5002 case "shared_content_download_details":
5003 err = json.Unmarshal(body, &u.SharedContentDownloadDetails)
5004
5005 if err != nil {
5006 return err
5007 }
5008 case "shared_content_relinquish_membership_details":
5009 err = json.Unmarshal(body, &u.SharedContentRelinquishMembershipDetails)
5010
5011 if err != nil {
5012 return err
5013 }
5014 case "shared_content_remove_invitees_details":
5015 err = json.Unmarshal(body, &u.SharedContentRemoveInviteesDetails)
5016
5017 if err != nil {
5018 return err
5019 }
5020 case "shared_content_remove_link_expiry_details":
5021 err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiryDetails)
5022
5023 if err != nil {
5024 return err
5025 }
5026 case "shared_content_remove_link_password_details":
5027 err = json.Unmarshal(body, &u.SharedContentRemoveLinkPasswordDetails)
5028
5029 if err != nil {
5030 return err
5031 }
5032 case "shared_content_remove_member_details":
5033 err = json.Unmarshal(body, &u.SharedContentRemoveMemberDetails)
5034
5035 if err != nil {
5036 return err
5037 }
5038 case "shared_content_request_access_details":
5039 err = json.Unmarshal(body, &u.SharedContentRequestAccessDetails)
5040
5041 if err != nil {
5042 return err
5043 }
5044 case "shared_content_unshare_details":
5045 err = json.Unmarshal(body, &u.SharedContentUnshareDetails)
5046
5047 if err != nil {
5048 return err
5049 }
5050 case "shared_content_view_details":
5051 err = json.Unmarshal(body, &u.SharedContentViewDetails)
5052
5053 if err != nil {
5054 return err
5055 }
5056 case "shared_folder_change_link_policy_details":
5057 err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicyDetails)
5058
5059 if err != nil {
5060 return err
5061 }
5062 case "shared_folder_change_members_inheritance_policy_details":
5063 err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicyDetails)
5064
5065 if err != nil {
5066 return err
5067 }
5068 case "shared_folder_change_members_management_policy_details":
5069 err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicyDetails)
5070
5071 if err != nil {
5072 return err
5073 }
5074 case "shared_folder_change_members_policy_details":
5075 err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicyDetails)
5076
5077 if err != nil {
5078 return err
5079 }
5080 case "shared_folder_create_details":
5081 err = json.Unmarshal(body, &u.SharedFolderCreateDetails)
5082
5083 if err != nil {
5084 return err
5085 }
5086 case "shared_folder_decline_invitation_details":
5087 err = json.Unmarshal(body, &u.SharedFolderDeclineInvitationDetails)
5088
5089 if err != nil {
5090 return err
5091 }
5092 case "shared_folder_mount_details":
5093 err = json.Unmarshal(body, &u.SharedFolderMountDetails)
5094
5095 if err != nil {
5096 return err
5097 }
5098 case "shared_folder_nest_details":
5099 err = json.Unmarshal(body, &u.SharedFolderNestDetails)
5100
5101 if err != nil {
5102 return err
5103 }
5104 case "shared_folder_transfer_ownership_details":
5105 err = json.Unmarshal(body, &u.SharedFolderTransferOwnershipDetails)
5106
5107 if err != nil {
5108 return err
5109 }
5110 case "shared_folder_unmount_details":
5111 err = json.Unmarshal(body, &u.SharedFolderUnmountDetails)
5112
5113 if err != nil {
5114 return err
5115 }
5116 case "shared_link_add_expiry_details":
5117 err = json.Unmarshal(body, &u.SharedLinkAddExpiryDetails)
5118
5119 if err != nil {
5120 return err
5121 }
5122 case "shared_link_change_expiry_details":
5123 err = json.Unmarshal(body, &u.SharedLinkChangeExpiryDetails)
5124
5125 if err != nil {
5126 return err
5127 }
5128 case "shared_link_change_visibility_details":
5129 err = json.Unmarshal(body, &u.SharedLinkChangeVisibilityDetails)
5130
5131 if err != nil {
5132 return err
5133 }
5134 case "shared_link_copy_details":
5135 err = json.Unmarshal(body, &u.SharedLinkCopyDetails)
5136
5137 if err != nil {
5138 return err
5139 }
5140 case "shared_link_create_details":
5141 err = json.Unmarshal(body, &u.SharedLinkCreateDetails)
5142
5143 if err != nil {
5144 return err
5145 }
5146 case "shared_link_disable_details":
5147 err = json.Unmarshal(body, &u.SharedLinkDisableDetails)
5148
5149 if err != nil {
5150 return err
5151 }
5152 case "shared_link_download_details":
5153 err = json.Unmarshal(body, &u.SharedLinkDownloadDetails)
5154
5155 if err != nil {
5156 return err
5157 }
5158 case "shared_link_remove_expiry_details":
5159 err = json.Unmarshal(body, &u.SharedLinkRemoveExpiryDetails)
5160
5161 if err != nil {
5162 return err
5163 }
5164 case "shared_link_share_details":
5165 err = json.Unmarshal(body, &u.SharedLinkShareDetails)
5166
5167 if err != nil {
5168 return err
5169 }
5170 case "shared_link_view_details":
5171 err = json.Unmarshal(body, &u.SharedLinkViewDetails)
5172
5173 if err != nil {
5174 return err
5175 }
5176 case "shared_note_opened_details":
5177 err = json.Unmarshal(body, &u.SharedNoteOpenedDetails)
5178
5179 if err != nil {
5180 return err
5181 }
5182 case "shmodel_group_share_details":
5183 err = json.Unmarshal(body, &u.ShmodelGroupShareDetails)
5184
5185 if err != nil {
5186 return err
5187 }
5188 case "showcase_access_granted_details":
5189 err = json.Unmarshal(body, &u.ShowcaseAccessGrantedDetails)
5190
5191 if err != nil {
5192 return err
5193 }
5194 case "showcase_add_member_details":
5195 err = json.Unmarshal(body, &u.ShowcaseAddMemberDetails)
5196
5197 if err != nil {
5198 return err
5199 }
5200 case "showcase_archived_details":
5201 err = json.Unmarshal(body, &u.ShowcaseArchivedDetails)
5202
5203 if err != nil {
5204 return err
5205 }
5206 case "showcase_created_details":
5207 err = json.Unmarshal(body, &u.ShowcaseCreatedDetails)
5208
5209 if err != nil {
5210 return err
5211 }
5212 case "showcase_delete_comment_details":
5213 err = json.Unmarshal(body, &u.ShowcaseDeleteCommentDetails)
5214
5215 if err != nil {
5216 return err
5217 }
5218 case "showcase_edited_details":
5219 err = json.Unmarshal(body, &u.ShowcaseEditedDetails)
5220
5221 if err != nil {
5222 return err
5223 }
5224 case "showcase_edit_comment_details":
5225 err = json.Unmarshal(body, &u.ShowcaseEditCommentDetails)
5226
5227 if err != nil {
5228 return err
5229 }
5230 case "showcase_file_added_details":
5231 err = json.Unmarshal(body, &u.ShowcaseFileAddedDetails)
5232
5233 if err != nil {
5234 return err
5235 }
5236 case "showcase_file_download_details":
5237 err = json.Unmarshal(body, &u.ShowcaseFileDownloadDetails)
5238
5239 if err != nil {
5240 return err
5241 }
5242 case "showcase_file_removed_details":
5243 err = json.Unmarshal(body, &u.ShowcaseFileRemovedDetails)
5244
5245 if err != nil {
5246 return err
5247 }
5248 case "showcase_file_view_details":
5249 err = json.Unmarshal(body, &u.ShowcaseFileViewDetails)
5250
5251 if err != nil {
5252 return err
5253 }
5254 case "showcase_permanently_deleted_details":
5255 err = json.Unmarshal(body, &u.ShowcasePermanentlyDeletedDetails)
5256
5257 if err != nil {
5258 return err
5259 }
5260 case "showcase_post_comment_details":
5261 err = json.Unmarshal(body, &u.ShowcasePostCommentDetails)
5262
5263 if err != nil {
5264 return err
5265 }
5266 case "showcase_remove_member_details":
5267 err = json.Unmarshal(body, &u.ShowcaseRemoveMemberDetails)
5268
5269 if err != nil {
5270 return err
5271 }
5272 case "showcase_renamed_details":
5273 err = json.Unmarshal(body, &u.ShowcaseRenamedDetails)
5274
5275 if err != nil {
5276 return err
5277 }
5278 case "showcase_request_access_details":
5279 err = json.Unmarshal(body, &u.ShowcaseRequestAccessDetails)
5280
5281 if err != nil {
5282 return err
5283 }
5284 case "showcase_resolve_comment_details":
5285 err = json.Unmarshal(body, &u.ShowcaseResolveCommentDetails)
5286
5287 if err != nil {
5288 return err
5289 }
5290 case "showcase_restored_details":
5291 err = json.Unmarshal(body, &u.ShowcaseRestoredDetails)
5292
5293 if err != nil {
5294 return err
5295 }
5296 case "showcase_trashed_details":
5297 err = json.Unmarshal(body, &u.ShowcaseTrashedDetails)
5298
5299 if err != nil {
5300 return err
5301 }
5302 case "showcase_trashed_deprecated_details":
5303 err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecatedDetails)
5304
5305 if err != nil {
5306 return err
5307 }
5308 case "showcase_unresolve_comment_details":
5309 err = json.Unmarshal(body, &u.ShowcaseUnresolveCommentDetails)
5310
5311 if err != nil {
5312 return err
5313 }
5314 case "showcase_untrashed_details":
5315 err = json.Unmarshal(body, &u.ShowcaseUntrashedDetails)
5316
5317 if err != nil {
5318 return err
5319 }
5320 case "showcase_untrashed_deprecated_details":
5321 err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecatedDetails)
5322
5323 if err != nil {
5324 return err
5325 }
5326 case "showcase_view_details":
5327 err = json.Unmarshal(body, &u.ShowcaseViewDetails)
5328
5329 if err != nil {
5330 return err
5331 }
5332 case "sso_add_cert_details":
5333 err = json.Unmarshal(body, &u.SsoAddCertDetails)
5334
5335 if err != nil {
5336 return err
5337 }
5338 case "sso_add_login_url_details":
5339 err = json.Unmarshal(body, &u.SsoAddLoginUrlDetails)
5340
5341 if err != nil {
5342 return err
5343 }
5344 case "sso_add_logout_url_details":
5345 err = json.Unmarshal(body, &u.SsoAddLogoutUrlDetails)
5346
5347 if err != nil {
5348 return err
5349 }
5350 case "sso_change_cert_details":
5351 err = json.Unmarshal(body, &u.SsoChangeCertDetails)
5352
5353 if err != nil {
5354 return err
5355 }
5356 case "sso_change_login_url_details":
5357 err = json.Unmarshal(body, &u.SsoChangeLoginUrlDetails)
5358
5359 if err != nil {
5360 return err
5361 }
5362 case "sso_change_logout_url_details":
5363 err = json.Unmarshal(body, &u.SsoChangeLogoutUrlDetails)
5364
5365 if err != nil {
5366 return err
5367 }
5368 case "sso_change_saml_identity_mode_details":
5369 err = json.Unmarshal(body, &u.SsoChangeSamlIdentityModeDetails)
5370
5371 if err != nil {
5372 return err
5373 }
5374 case "sso_remove_cert_details":
5375 err = json.Unmarshal(body, &u.SsoRemoveCertDetails)
5376
5377 if err != nil {
5378 return err
5379 }
5380 case "sso_remove_login_url_details":
5381 err = json.Unmarshal(body, &u.SsoRemoveLoginUrlDetails)
5382
5383 if err != nil {
5384 return err
5385 }
5386 case "sso_remove_logout_url_details":
5387 err = json.Unmarshal(body, &u.SsoRemoveLogoutUrlDetails)
5388
5389 if err != nil {
5390 return err
5391 }
5392 case "team_folder_change_status_details":
5393 err = json.Unmarshal(body, &u.TeamFolderChangeStatusDetails)
5394
5395 if err != nil {
5396 return err
5397 }
5398 case "team_folder_create_details":
5399 err = json.Unmarshal(body, &u.TeamFolderCreateDetails)
5400
5401 if err != nil {
5402 return err
5403 }
5404 case "team_folder_downgrade_details":
5405 err = json.Unmarshal(body, &u.TeamFolderDowngradeDetails)
5406
5407 if err != nil {
5408 return err
5409 }
5410 case "team_folder_permanently_delete_details":
5411 err = json.Unmarshal(body, &u.TeamFolderPermanentlyDeleteDetails)
5412
5413 if err != nil {
5414 return err
5415 }
5416 case "team_folder_rename_details":
5417 err = json.Unmarshal(body, &u.TeamFolderRenameDetails)
5418
5419 if err != nil {
5420 return err
5421 }
5422 case "team_selective_sync_settings_changed_details":
5423 err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChangedDetails)
5424
5425 if err != nil {
5426 return err
5427 }
5428 case "account_capture_change_policy_details":
5429 err = json.Unmarshal(body, &u.AccountCaptureChangePolicyDetails)
5430
5431 if err != nil {
5432 return err
5433 }
5434 case "allow_download_disabled_details":
5435 err = json.Unmarshal(body, &u.AllowDownloadDisabledDetails)
5436
5437 if err != nil {
5438 return err
5439 }
5440 case "allow_download_enabled_details":
5441 err = json.Unmarshal(body, &u.AllowDownloadEnabledDetails)
5442
5443 if err != nil {
5444 return err
5445 }
5446 case "camera_uploads_policy_changed_details":
5447 err = json.Unmarshal(body, &u.CameraUploadsPolicyChangedDetails)
5448
5449 if err != nil {
5450 return err
5451 }
5452 case "data_placement_restriction_change_policy_details":
5453 err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicyDetails)
5454
5455 if err != nil {
5456 return err
5457 }
5458 case "data_placement_restriction_satisfy_policy_details":
5459 err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicyDetails)
5460
5461 if err != nil {
5462 return err
5463 }
5464 case "device_approvals_change_desktop_policy_details":
5465 err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicyDetails)
5466
5467 if err != nil {
5468 return err
5469 }
5470 case "device_approvals_change_mobile_policy_details":
5471 err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicyDetails)
5472
5473 if err != nil {
5474 return err
5475 }
5476 case "device_approvals_change_overage_action_details":
5477 err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageActionDetails)
5478
5479 if err != nil {
5480 return err
5481 }
5482 case "device_approvals_change_unlink_action_details":
5483 err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkActionDetails)
5484
5485 if err != nil {
5486 return err
5487 }
5488 case "directory_restrictions_add_members_details":
5489 err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembersDetails)
5490
5491 if err != nil {
5492 return err
5493 }
5494 case "directory_restrictions_remove_members_details":
5495 err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembersDetails)
5496
5497 if err != nil {
5498 return err
5499 }
5500 case "emm_add_exception_details":
5501 err = json.Unmarshal(body, &u.EmmAddExceptionDetails)
5502
5503 if err != nil {
5504 return err
5505 }
5506 case "emm_change_policy_details":
5507 err = json.Unmarshal(body, &u.EmmChangePolicyDetails)
5508
5509 if err != nil {
5510 return err
5511 }
5512 case "emm_remove_exception_details":
5513 err = json.Unmarshal(body, &u.EmmRemoveExceptionDetails)
5514
5515 if err != nil {
5516 return err
5517 }
5518 case "extended_version_history_change_policy_details":
5519 err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicyDetails)
5520
5521 if err != nil {
5522 return err
5523 }
5524 case "file_comments_change_policy_details":
5525 err = json.Unmarshal(body, &u.FileCommentsChangePolicyDetails)
5526
5527 if err != nil {
5528 return err
5529 }
5530 case "file_requests_change_policy_details":
5531 err = json.Unmarshal(body, &u.FileRequestsChangePolicyDetails)
5532
5533 if err != nil {
5534 return err
5535 }
5536 case "file_requests_emails_enabled_details":
5537 err = json.Unmarshal(body, &u.FileRequestsEmailsEnabledDetails)
5538
5539 if err != nil {
5540 return err
5541 }
5542 case "file_requests_emails_restricted_to_team_only_details":
5543 err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnlyDetails)
5544
5545 if err != nil {
5546 return err
5547 }
5548 case "google_sso_change_policy_details":
5549 err = json.Unmarshal(body, &u.GoogleSsoChangePolicyDetails)
5550
5551 if err != nil {
5552 return err
5553 }
5554 case "group_user_management_change_policy_details":
5555 err = json.Unmarshal(body, &u.GroupUserManagementChangePolicyDetails)
5556
5557 if err != nil {
5558 return err
5559 }
5560 case "member_requests_change_policy_details":
5561 err = json.Unmarshal(body, &u.MemberRequestsChangePolicyDetails)
5562
5563 if err != nil {
5564 return err
5565 }
5566 case "member_space_limits_add_exception_details":
5567 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddExceptionDetails)
5568
5569 if err != nil {
5570 return err
5571 }
5572 case "member_space_limits_change_caps_type_policy_details":
5573 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicyDetails)
5574
5575 if err != nil {
5576 return err
5577 }
5578 case "member_space_limits_change_policy_details":
5579 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicyDetails)
5580
5581 if err != nil {
5582 return err
5583 }
5584 case "member_space_limits_remove_exception_details":
5585 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveExceptionDetails)
5586
5587 if err != nil {
5588 return err
5589 }
5590 case "member_suggestions_change_policy_details":
5591 err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicyDetails)
5592
5593 if err != nil {
5594 return err
5595 }
5596 case "microsoft_office_addin_change_policy_details":
5597 err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicyDetails)
5598
5599 if err != nil {
5600 return err
5601 }
5602 case "network_control_change_policy_details":
5603 err = json.Unmarshal(body, &u.NetworkControlChangePolicyDetails)
5604
5605 if err != nil {
5606 return err
5607 }
5608 case "paper_change_deployment_policy_details":
5609 err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicyDetails)
5610
5611 if err != nil {
5612 return err
5613 }
5614 case "paper_change_member_link_policy_details":
5615 err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicyDetails)
5616
5617 if err != nil {
5618 return err
5619 }
5620 case "paper_change_member_policy_details":
5621 err = json.Unmarshal(body, &u.PaperChangeMemberPolicyDetails)
5622
5623 if err != nil {
5624 return err
5625 }
5626 case "paper_change_policy_details":
5627 err = json.Unmarshal(body, &u.PaperChangePolicyDetails)
5628
5629 if err != nil {
5630 return err
5631 }
5632 case "paper_enabled_users_group_addition_details":
5633 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAdditionDetails)
5634
5635 if err != nil {
5636 return err
5637 }
5638 case "paper_enabled_users_group_removal_details":
5639 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemovalDetails)
5640
5641 if err != nil {
5642 return err
5643 }
5644 case "permanent_delete_change_policy_details":
5645 err = json.Unmarshal(body, &u.PermanentDeleteChangePolicyDetails)
5646
5647 if err != nil {
5648 return err
5649 }
5650 case "sharing_change_folder_join_policy_details":
5651 err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicyDetails)
5652
5653 if err != nil {
5654 return err
5655 }
5656 case "sharing_change_link_policy_details":
5657 err = json.Unmarshal(body, &u.SharingChangeLinkPolicyDetails)
5658
5659 if err != nil {
5660 return err
5661 }
5662 case "sharing_change_member_policy_details":
5663 err = json.Unmarshal(body, &u.SharingChangeMemberPolicyDetails)
5664
5665 if err != nil {
5666 return err
5667 }
5668 case "showcase_change_download_policy_details":
5669 err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicyDetails)
5670
5671 if err != nil {
5672 return err
5673 }
5674 case "showcase_change_enabled_policy_details":
5675 err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicyDetails)
5676
5677 if err != nil {
5678 return err
5679 }
5680 case "showcase_change_external_sharing_policy_details":
5681 err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicyDetails)
5682
5683 if err != nil {
5684 return err
5685 }
5686 case "smart_sync_change_policy_details":
5687 err = json.Unmarshal(body, &u.SmartSyncChangePolicyDetails)
5688
5689 if err != nil {
5690 return err
5691 }
5692 case "smart_sync_not_opt_out_details":
5693 err = json.Unmarshal(body, &u.SmartSyncNotOptOutDetails)
5694
5695 if err != nil {
5696 return err
5697 }
5698 case "smart_sync_opt_out_details":
5699 err = json.Unmarshal(body, &u.SmartSyncOptOutDetails)
5700
5701 if err != nil {
5702 return err
5703 }
5704 case "sso_change_policy_details":
5705 err = json.Unmarshal(body, &u.SsoChangePolicyDetails)
5706
5707 if err != nil {
5708 return err
5709 }
5710 case "team_selective_sync_policy_changed_details":
5711 err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChangedDetails)
5712
5713 if err != nil {
5714 return err
5715 }
5716 case "tfa_change_policy_details":
5717 err = json.Unmarshal(body, &u.TfaChangePolicyDetails)
5718
5719 if err != nil {
5720 return err
5721 }
5722 case "two_account_change_policy_details":
5723 err = json.Unmarshal(body, &u.TwoAccountChangePolicyDetails)
5724
5725 if err != nil {
5726 return err
5727 }
5728 case "viewer_info_policy_changed_details":
5729 err = json.Unmarshal(body, &u.ViewerInfoPolicyChangedDetails)
5730
5731 if err != nil {
5732 return err
5733 }
5734 case "web_sessions_change_fixed_length_policy_details":
5735 err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicyDetails)
5736
5737 if err != nil {
5738 return err
5739 }
5740 case "web_sessions_change_idle_length_policy_details":
5741 err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicyDetails)
5742
5743 if err != nil {
5744 return err
5745 }
5746 case "team_merge_from_details":
5747 err = json.Unmarshal(body, &u.TeamMergeFromDetails)
5748
5749 if err != nil {
5750 return err
5751 }
5752 case "team_merge_to_details":
5753 err = json.Unmarshal(body, &u.TeamMergeToDetails)
5754
5755 if err != nil {
5756 return err
5757 }
5758 case "team_profile_add_logo_details":
5759 err = json.Unmarshal(body, &u.TeamProfileAddLogoDetails)
5760
5761 if err != nil {
5762 return err
5763 }
5764 case "team_profile_change_default_language_details":
5765 err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguageDetails)
5766
5767 if err != nil {
5768 return err
5769 }
5770 case "team_profile_change_logo_details":
5771 err = json.Unmarshal(body, &u.TeamProfileChangeLogoDetails)
5772
5773 if err != nil {
5774 return err
5775 }
5776 case "team_profile_change_name_details":
5777 err = json.Unmarshal(body, &u.TeamProfileChangeNameDetails)
5778
5779 if err != nil {
5780 return err
5781 }
5782 case "team_profile_remove_logo_details":
5783 err = json.Unmarshal(body, &u.TeamProfileRemoveLogoDetails)
5784
5785 if err != nil {
5786 return err
5787 }
5788 case "tfa_add_backup_phone_details":
5789 err = json.Unmarshal(body, &u.TfaAddBackupPhoneDetails)
5790
5791 if err != nil {
5792 return err
5793 }
5794 case "tfa_add_security_key_details":
5795 err = json.Unmarshal(body, &u.TfaAddSecurityKeyDetails)
5796
5797 if err != nil {
5798 return err
5799 }
5800 case "tfa_change_backup_phone_details":
5801 err = json.Unmarshal(body, &u.TfaChangeBackupPhoneDetails)
5802
5803 if err != nil {
5804 return err
5805 }
5806 case "tfa_change_status_details":
5807 err = json.Unmarshal(body, &u.TfaChangeStatusDetails)
5808
5809 if err != nil {
5810 return err
5811 }
5812 case "tfa_remove_backup_phone_details":
5813 err = json.Unmarshal(body, &u.TfaRemoveBackupPhoneDetails)
5814
5815 if err != nil {
5816 return err
5817 }
5818 case "tfa_remove_security_key_details":
5819 err = json.Unmarshal(body, &u.TfaRemoveSecurityKeyDetails)
5820
5821 if err != nil {
5822 return err
5823 }
5824 case "tfa_reset_details":
5825 err = json.Unmarshal(body, &u.TfaResetDetails)
5826
5827 if err != nil {
5828 return err
5829 }
5830 case "missing_details":
5831 err = json.Unmarshal(body, &u.MissingDetails)
5832
5833 if err != nil {
5834 return err
5835 }
5836 }
5837 return nil
5838 }
5839
5840 // EventType : The type of the event.
5841 type EventType struct {
5842 dropbox.Tagged
5843 // AppLinkTeam : (apps) Linked app for team
5844 AppLinkTeam *AppLinkTeamType `json:"app_link_team,omitempty"`
5845 // AppLinkUser : (apps) Linked app for member
5846 AppLinkUser *AppLinkUserType `json:"app_link_user,omitempty"`
5847 // AppUnlinkTeam : (apps) Unlinked app for team
5848 AppUnlinkTeam *AppUnlinkTeamType `json:"app_unlink_team,omitempty"`
5849 // AppUnlinkUser : (apps) Unlinked app for member
5850 AppUnlinkUser *AppUnlinkUserType `json:"app_unlink_user,omitempty"`
5851 // FileAddComment : (comments) Added file comment
5852 FileAddComment *FileAddCommentType `json:"file_add_comment,omitempty"`
5853 // FileChangeCommentSubscription : (comments) Subscribed to or unsubscribed
5854 // from comment notifications for file
5855 FileChangeCommentSubscription *FileChangeCommentSubscriptionType `json:"file_change_comment_subscription,omitempty"`
5856 // FileDeleteComment : (comments) Deleted file comment
5857 FileDeleteComment *FileDeleteCommentType `json:"file_delete_comment,omitempty"`
5858 // FileEditComment : (comments) Edited file comment
5859 FileEditComment *FileEditCommentType `json:"file_edit_comment,omitempty"`
5860 // FileLikeComment : (comments) Liked file comment (deprecated, no longer
5861 // logged)
5862 FileLikeComment *FileLikeCommentType `json:"file_like_comment,omitempty"`
5863 // FileResolveComment : (comments) Resolved file comment
5864 FileResolveComment *FileResolveCommentType `json:"file_resolve_comment,omitempty"`
5865 // FileUnlikeComment : (comments) Unliked file comment (deprecated, no
5866 // longer logged)
5867 FileUnlikeComment *FileUnlikeCommentType `json:"file_unlike_comment,omitempty"`
5868 // FileUnresolveComment : (comments) Unresolved file comment
5869 FileUnresolveComment *FileUnresolveCommentType `json:"file_unresolve_comment,omitempty"`
5870 // DeviceChangeIpDesktop : (devices) Changed IP address associated with
5871 // active desktop session
5872 DeviceChangeIpDesktop *DeviceChangeIpDesktopType `json:"device_change_ip_desktop,omitempty"`
5873 // DeviceChangeIpMobile : (devices) Changed IP address associated with
5874 // active mobile session
5875 DeviceChangeIpMobile *DeviceChangeIpMobileType `json:"device_change_ip_mobile,omitempty"`
5876 // DeviceChangeIpWeb : (devices) Changed IP address associated with active
5877 // web session
5878 DeviceChangeIpWeb *DeviceChangeIpWebType `json:"device_change_ip_web,omitempty"`
5879 // DeviceDeleteOnUnlinkFail : (devices) Failed to delete all files from
5880 // unlinked device
5881 DeviceDeleteOnUnlinkFail *DeviceDeleteOnUnlinkFailType `json:"device_delete_on_unlink_fail,omitempty"`
5882 // DeviceDeleteOnUnlinkSuccess : (devices) Deleted all files from unlinked
5883 // device
5884 DeviceDeleteOnUnlinkSuccess *DeviceDeleteOnUnlinkSuccessType `json:"device_delete_on_unlink_success,omitempty"`
5885 // DeviceLinkFail : (devices) Failed to link device
5886 DeviceLinkFail *DeviceLinkFailType `json:"device_link_fail,omitempty"`
5887 // DeviceLinkSuccess : (devices) Linked device
5888 DeviceLinkSuccess *DeviceLinkSuccessType `json:"device_link_success,omitempty"`
5889 // DeviceManagementDisabled : (devices) Disabled device management
5890 // (deprecated, no longer logged)
5891 DeviceManagementDisabled *DeviceManagementDisabledType `json:"device_management_disabled,omitempty"`
5892 // DeviceManagementEnabled : (devices) Enabled device management
5893 // (deprecated, no longer logged)
5894 DeviceManagementEnabled *DeviceManagementEnabledType `json:"device_management_enabled,omitempty"`
5895 // DeviceUnlink : (devices) Disconnected device
5896 DeviceUnlink *DeviceUnlinkType `json:"device_unlink,omitempty"`
5897 // EmmRefreshAuthToken : (devices) Refreshed auth token used for setting up
5898 // enterprise mobility management
5899 EmmRefreshAuthToken *EmmRefreshAuthTokenType `json:"emm_refresh_auth_token,omitempty"`
5900 // AccountCaptureChangeAvailability : (domains) Granted/revoked option to
5901 // enable account capture on team domains
5902 AccountCaptureChangeAvailability *AccountCaptureChangeAvailabilityType `json:"account_capture_change_availability,omitempty"`
5903 // AccountCaptureMigrateAccount : (domains) Account-captured user migrated
5904 // account to team
5905 AccountCaptureMigrateAccount *AccountCaptureMigrateAccountType `json:"account_capture_migrate_account,omitempty"`
5906 // AccountCaptureNotificationEmailsSent : (domains) Sent proactive account
5907 // capture email to all unmanaged members
5908 AccountCaptureNotificationEmailsSent *AccountCaptureNotificationEmailsSentType `json:"account_capture_notification_emails_sent,omitempty"`
5909 // AccountCaptureRelinquishAccount : (domains) Account-captured user changed
5910 // account email to personal email
5911 AccountCaptureRelinquishAccount *AccountCaptureRelinquishAccountType `json:"account_capture_relinquish_account,omitempty"`
5912 // DisabledDomainInvites : (domains) Disabled domain invites (deprecated, no
5913 // longer logged)
5914 DisabledDomainInvites *DisabledDomainInvitesType `json:"disabled_domain_invites,omitempty"`
5915 // DomainInvitesApproveRequestToJoinTeam : (domains) Approved user's request
5916 // to join team
5917 DomainInvitesApproveRequestToJoinTeam *DomainInvitesApproveRequestToJoinTeamType `json:"domain_invites_approve_request_to_join_team,omitempty"`
5918 // DomainInvitesDeclineRequestToJoinTeam : (domains) Declined user's request
5919 // to join team
5920 DomainInvitesDeclineRequestToJoinTeam *DomainInvitesDeclineRequestToJoinTeamType `json:"domain_invites_decline_request_to_join_team,omitempty"`
5921 // DomainInvitesEmailExistingUsers : (domains) Sent domain invites to
5922 // existing domain accounts (deprecated, no longer logged)
5923 DomainInvitesEmailExistingUsers *DomainInvitesEmailExistingUsersType `json:"domain_invites_email_existing_users,omitempty"`
5924 // DomainInvitesRequestToJoinTeam : (domains) Requested to join team
5925 DomainInvitesRequestToJoinTeam *DomainInvitesRequestToJoinTeamType `json:"domain_invites_request_to_join_team,omitempty"`
5926 // DomainInvitesSetInviteNewUserPrefToNo : (domains) Disabled "Automatically
5927 // invite new users" (deprecated, no longer logged)
5928 DomainInvitesSetInviteNewUserPrefToNo *DomainInvitesSetInviteNewUserPrefToNoType `json:"domain_invites_set_invite_new_user_pref_to_no,omitempty"`
5929 // DomainInvitesSetInviteNewUserPrefToYes : (domains) Enabled "Automatically
5930 // invite new users" (deprecated, no longer logged)
5931 DomainInvitesSetInviteNewUserPrefToYes *DomainInvitesSetInviteNewUserPrefToYesType `json:"domain_invites_set_invite_new_user_pref_to_yes,omitempty"`
5932 // DomainVerificationAddDomainFail : (domains) Failed to verify team domain
5933 DomainVerificationAddDomainFail *DomainVerificationAddDomainFailType `json:"domain_verification_add_domain_fail,omitempty"`
5934 // DomainVerificationAddDomainSuccess : (domains) Verified team domain
5935 DomainVerificationAddDomainSuccess *DomainVerificationAddDomainSuccessType `json:"domain_verification_add_domain_success,omitempty"`
5936 // DomainVerificationRemoveDomain : (domains) Removed domain from list of
5937 // verified team domains
5938 DomainVerificationRemoveDomain *DomainVerificationRemoveDomainType `json:"domain_verification_remove_domain,omitempty"`
5939 // EnabledDomainInvites : (domains) Enabled domain invites (deprecated, no
5940 // longer logged)
5941 EnabledDomainInvites *EnabledDomainInvitesType `json:"enabled_domain_invites,omitempty"`
5942 // CreateFolder : (file_operations) Created folders (deprecated, no longer
5943 // logged)
5944 CreateFolder *CreateFolderType `json:"create_folder,omitempty"`
5945 // FileAdd : (file_operations) Added files and/or folders
5946 FileAdd *FileAddType `json:"file_add,omitempty"`
5947 // FileCopy : (file_operations) Copied files and/or folders
5948 FileCopy *FileCopyType `json:"file_copy,omitempty"`
5949 // FileDelete : (file_operations) Deleted files and/or folders
5950 FileDelete *FileDeleteType `json:"file_delete,omitempty"`
5951 // FileDownload : (file_operations) Downloaded files and/or folders
5952 FileDownload *FileDownloadType `json:"file_download,omitempty"`
5953 // FileEdit : (file_operations) Edited files
5954 FileEdit *FileEditType `json:"file_edit,omitempty"`
5955 // FileGetCopyReference : (file_operations) Created copy reference to
5956 // file/folder
5957 FileGetCopyReference *FileGetCopyReferenceType `json:"file_get_copy_reference,omitempty"`
5958 // FileMove : (file_operations) Moved files and/or folders
5959 FileMove *FileMoveType `json:"file_move,omitempty"`
5960 // FilePermanentlyDelete : (file_operations) Permanently deleted files
5961 // and/or folders
5962 FilePermanentlyDelete *FilePermanentlyDeleteType `json:"file_permanently_delete,omitempty"`
5963 // FilePreview : (file_operations) Previewed files and/or folders
5964 FilePreview *FilePreviewType `json:"file_preview,omitempty"`
5965 // FileRename : (file_operations) Renamed files and/or folders
5966 FileRename *FileRenameType `json:"file_rename,omitempty"`
5967 // FileRestore : (file_operations) Restored deleted files and/or folders
5968 FileRestore *FileRestoreType `json:"file_restore,omitempty"`
5969 // FileRevert : (file_operations) Reverted files to previous version
5970 FileRevert *FileRevertType `json:"file_revert,omitempty"`
5971 // FileRollbackChanges : (file_operations) Rolled back file actions
5972 FileRollbackChanges *FileRollbackChangesType `json:"file_rollback_changes,omitempty"`
5973 // FileSaveCopyReference : (file_operations) Saved file/folder using copy
5974 // reference
5975 FileSaveCopyReference *FileSaveCopyReferenceType `json:"file_save_copy_reference,omitempty"`
5976 // FileRequestChange : (file_requests) Changed file request
5977 FileRequestChange *FileRequestChangeType `json:"file_request_change,omitempty"`
5978 // FileRequestClose : (file_requests) Closed file request
5979 FileRequestClose *FileRequestCloseType `json:"file_request_close,omitempty"`
5980 // FileRequestCreate : (file_requests) Created file request
5981 FileRequestCreate *FileRequestCreateType `json:"file_request_create,omitempty"`
5982 // FileRequestReceiveFile : (file_requests) Received files for file request
5983 FileRequestReceiveFile *FileRequestReceiveFileType `json:"file_request_receive_file,omitempty"`
5984 // GroupAddExternalId : (groups) Added external ID for group
5985 GroupAddExternalId *GroupAddExternalIdType `json:"group_add_external_id,omitempty"`
5986 // GroupAddMember : (groups) Added team members to group
5987 GroupAddMember *GroupAddMemberType `json:"group_add_member,omitempty"`
5988 // GroupChangeExternalId : (groups) Changed external ID for group
5989 GroupChangeExternalId *GroupChangeExternalIdType `json:"group_change_external_id,omitempty"`
5990 // GroupChangeManagementType : (groups) Changed group management type
5991 GroupChangeManagementType *GroupChangeManagementTypeType `json:"group_change_management_type,omitempty"`
5992 // GroupChangeMemberRole : (groups) Changed manager permissions of group
5993 // member
5994 GroupChangeMemberRole *GroupChangeMemberRoleType `json:"group_change_member_role,omitempty"`
5995 // GroupCreate : (groups) Created group
5996 GroupCreate *GroupCreateType `json:"group_create,omitempty"`
5997 // GroupDelete : (groups) Deleted group
5998 GroupDelete *GroupDeleteType `json:"group_delete,omitempty"`
5999 // GroupDescriptionUpdated : (groups) Updated group (deprecated, no longer
6000 // logged)
6001 GroupDescriptionUpdated *GroupDescriptionUpdatedType `json:"group_description_updated,omitempty"`
6002 // GroupJoinPolicyUpdated : (groups) Updated group join policy (deprecated,
6003 // no longer logged)
6004 GroupJoinPolicyUpdated *GroupJoinPolicyUpdatedType `json:"group_join_policy_updated,omitempty"`
6005 // GroupMoved : (groups) Moved group (deprecated, no longer logged)
6006 GroupMoved *GroupMovedType `json:"group_moved,omitempty"`
6007 // GroupRemoveExternalId : (groups) Removed external ID for group
6008 GroupRemoveExternalId *GroupRemoveExternalIdType `json:"group_remove_external_id,omitempty"`
6009 // GroupRemoveMember : (groups) Removed team members from group
6010 GroupRemoveMember *GroupRemoveMemberType `json:"group_remove_member,omitempty"`
6011 // GroupRename : (groups) Renamed group
6012 GroupRename *GroupRenameType `json:"group_rename,omitempty"`
6013 // EmmError : (logins) Failed to sign in via EMM (deprecated, replaced by
6014 // 'Failed to sign in')
6015 EmmError *EmmErrorType `json:"emm_error,omitempty"`
6016 // LoginFail : (logins) Failed to sign in
6017 LoginFail *LoginFailType `json:"login_fail,omitempty"`
6018 // LoginSuccess : (logins) Signed in
6019 LoginSuccess *LoginSuccessType `json:"login_success,omitempty"`
6020 // Logout : (logins) Signed out
6021 Logout *LogoutType `json:"logout,omitempty"`
6022 // ResellerSupportSessionEnd : (logins) Ended reseller support session
6023 ResellerSupportSessionEnd *ResellerSupportSessionEndType `json:"reseller_support_session_end,omitempty"`
6024 // ResellerSupportSessionStart : (logins) Started reseller support session
6025 ResellerSupportSessionStart *ResellerSupportSessionStartType `json:"reseller_support_session_start,omitempty"`
6026 // SignInAsSessionEnd : (logins) Ended admin sign-in-as session
6027 SignInAsSessionEnd *SignInAsSessionEndType `json:"sign_in_as_session_end,omitempty"`
6028 // SignInAsSessionStart : (logins) Started admin sign-in-as session
6029 SignInAsSessionStart *SignInAsSessionStartType `json:"sign_in_as_session_start,omitempty"`
6030 // SsoError : (logins) Failed to sign in via SSO (deprecated, replaced by
6031 // 'Failed to sign in')
6032 SsoError *SsoErrorType `json:"sso_error,omitempty"`
6033 // MemberAddName : (members) Added team member name
6034 MemberAddName *MemberAddNameType `json:"member_add_name,omitempty"`
6035 // MemberChangeAdminRole : (members) Changed team member admin role
6036 MemberChangeAdminRole *MemberChangeAdminRoleType `json:"member_change_admin_role,omitempty"`
6037 // MemberChangeEmail : (members) Changed team member email
6038 MemberChangeEmail *MemberChangeEmailType `json:"member_change_email,omitempty"`
6039 // MemberChangeMembershipType : (members) Changed membership type
6040 // (limited/full) of member (deprecated, no longer logged)
6041 MemberChangeMembershipType *MemberChangeMembershipTypeType `json:"member_change_membership_type,omitempty"`
6042 // MemberChangeName : (members) Changed team member name
6043 MemberChangeName *MemberChangeNameType `json:"member_change_name,omitempty"`
6044 // MemberChangeStatus : (members) Changed member status (invited, joined,
6045 // suspended, etc.)
6046 MemberChangeStatus *MemberChangeStatusType `json:"member_change_status,omitempty"`
6047 // MemberDeleteManualContacts : (members) Cleared manually added contacts
6048 MemberDeleteManualContacts *MemberDeleteManualContactsType `json:"member_delete_manual_contacts,omitempty"`
6049 // MemberPermanentlyDeleteAccountContents : (members) Permanently deleted
6050 // contents of deleted team member account
6051 MemberPermanentlyDeleteAccountContents *MemberPermanentlyDeleteAccountContentsType `json:"member_permanently_delete_account_contents,omitempty"`
6052 // MemberSpaceLimitsAddCustomQuota : (members) Set custom member space limit
6053 MemberSpaceLimitsAddCustomQuota *MemberSpaceLimitsAddCustomQuotaType `json:"member_space_limits_add_custom_quota,omitempty"`
6054 // MemberSpaceLimitsChangeCustomQuota : (members) Changed custom member
6055 // space limit
6056 MemberSpaceLimitsChangeCustomQuota *MemberSpaceLimitsChangeCustomQuotaType `json:"member_space_limits_change_custom_quota,omitempty"`
6057 // MemberSpaceLimitsChangeStatus : (members) Changed space limit status
6058 MemberSpaceLimitsChangeStatus *MemberSpaceLimitsChangeStatusType `json:"member_space_limits_change_status,omitempty"`
6059 // MemberSpaceLimitsRemoveCustomQuota : (members) Removed custom member
6060 // space limit
6061 MemberSpaceLimitsRemoveCustomQuota *MemberSpaceLimitsRemoveCustomQuotaType `json:"member_space_limits_remove_custom_quota,omitempty"`
6062 // MemberSuggest : (members) Suggested person to add to team
6063 MemberSuggest *MemberSuggestType `json:"member_suggest,omitempty"`
6064 // MemberTransferAccountContents : (members) Transferred contents of deleted
6065 // member account to another member
6066 MemberTransferAccountContents *MemberTransferAccountContentsType `json:"member_transfer_account_contents,omitempty"`
6067 // SecondaryMailsPolicyChanged : (members) Secondary mails policy changed
6068 SecondaryMailsPolicyChanged *SecondaryMailsPolicyChangedType `json:"secondary_mails_policy_changed,omitempty"`
6069 // PaperContentAddMember : (paper) Added team member to Paper doc/folder
6070 PaperContentAddMember *PaperContentAddMemberType `json:"paper_content_add_member,omitempty"`
6071 // PaperContentAddToFolder : (paper) Added Paper doc/folder to folder
6072 PaperContentAddToFolder *PaperContentAddToFolderType `json:"paper_content_add_to_folder,omitempty"`
6073 // PaperContentArchive : (paper) Archived Paper doc/folder
6074 PaperContentArchive *PaperContentArchiveType `json:"paper_content_archive,omitempty"`
6075 // PaperContentCreate : (paper) Created Paper doc/folder
6076 PaperContentCreate *PaperContentCreateType `json:"paper_content_create,omitempty"`
6077 // PaperContentPermanentlyDelete : (paper) Permanently deleted Paper
6078 // doc/folder
6079 PaperContentPermanentlyDelete *PaperContentPermanentlyDeleteType `json:"paper_content_permanently_delete,omitempty"`
6080 // PaperContentRemoveFromFolder : (paper) Removed Paper doc/folder from
6081 // folder
6082 PaperContentRemoveFromFolder *PaperContentRemoveFromFolderType `json:"paper_content_remove_from_folder,omitempty"`
6083 // PaperContentRemoveMember : (paper) Removed team member from Paper
6084 // doc/folder
6085 PaperContentRemoveMember *PaperContentRemoveMemberType `json:"paper_content_remove_member,omitempty"`
6086 // PaperContentRename : (paper) Renamed Paper doc/folder
6087 PaperContentRename *PaperContentRenameType `json:"paper_content_rename,omitempty"`
6088 // PaperContentRestore : (paper) Restored archived Paper doc/folder
6089 PaperContentRestore *PaperContentRestoreType `json:"paper_content_restore,omitempty"`
6090 // PaperDocAddComment : (paper) Added Paper doc comment
6091 PaperDocAddComment *PaperDocAddCommentType `json:"paper_doc_add_comment,omitempty"`
6092 // PaperDocChangeMemberRole : (paper) Changed team member permissions for
6093 // Paper doc
6094 PaperDocChangeMemberRole *PaperDocChangeMemberRoleType `json:"paper_doc_change_member_role,omitempty"`
6095 // PaperDocChangeSharingPolicy : (paper) Changed sharing setting for Paper
6096 // doc
6097 PaperDocChangeSharingPolicy *PaperDocChangeSharingPolicyType `json:"paper_doc_change_sharing_policy,omitempty"`
6098 // PaperDocChangeSubscription : (paper) Followed/unfollowed Paper doc
6099 PaperDocChangeSubscription *PaperDocChangeSubscriptionType `json:"paper_doc_change_subscription,omitempty"`
6100 // PaperDocDeleted : (paper) Archived Paper doc (deprecated, no longer
6101 // logged)
6102 PaperDocDeleted *PaperDocDeletedType `json:"paper_doc_deleted,omitempty"`
6103 // PaperDocDeleteComment : (paper) Deleted Paper doc comment
6104 PaperDocDeleteComment *PaperDocDeleteCommentType `json:"paper_doc_delete_comment,omitempty"`
6105 // PaperDocDownload : (paper) Downloaded Paper doc in specific format
6106 PaperDocDownload *PaperDocDownloadType `json:"paper_doc_download,omitempty"`
6107 // PaperDocEdit : (paper) Edited Paper doc
6108 PaperDocEdit *PaperDocEditType `json:"paper_doc_edit,omitempty"`
6109 // PaperDocEditComment : (paper) Edited Paper doc comment
6110 PaperDocEditComment *PaperDocEditCommentType `json:"paper_doc_edit_comment,omitempty"`
6111 // PaperDocFollowed : (paper) Followed Paper doc (deprecated, replaced by
6112 // 'Followed/unfollowed Paper doc')
6113 PaperDocFollowed *PaperDocFollowedType `json:"paper_doc_followed,omitempty"`
6114 // PaperDocMention : (paper) Mentioned team member in Paper doc
6115 PaperDocMention *PaperDocMentionType `json:"paper_doc_mention,omitempty"`
6116 // PaperDocOwnershipChanged : (paper) Transferred ownership of Paper doc
6117 PaperDocOwnershipChanged *PaperDocOwnershipChangedType `json:"paper_doc_ownership_changed,omitempty"`
6118 // PaperDocRequestAccess : (paper) Requested access to Paper doc
6119 PaperDocRequestAccess *PaperDocRequestAccessType `json:"paper_doc_request_access,omitempty"`
6120 // PaperDocResolveComment : (paper) Resolved Paper doc comment
6121 PaperDocResolveComment *PaperDocResolveCommentType `json:"paper_doc_resolve_comment,omitempty"`
6122 // PaperDocRevert : (paper) Restored Paper doc to previous version
6123 PaperDocRevert *PaperDocRevertType `json:"paper_doc_revert,omitempty"`
6124 // PaperDocSlackShare : (paper) Shared Paper doc via Slack
6125 PaperDocSlackShare *PaperDocSlackShareType `json:"paper_doc_slack_share,omitempty"`
6126 // PaperDocTeamInvite : (paper) Shared Paper doc with team member
6127 // (deprecated, no longer logged)
6128 PaperDocTeamInvite *PaperDocTeamInviteType `json:"paper_doc_team_invite,omitempty"`
6129 // PaperDocTrashed : (paper) Deleted Paper doc
6130 PaperDocTrashed *PaperDocTrashedType `json:"paper_doc_trashed,omitempty"`
6131 // PaperDocUnresolveComment : (paper) Unresolved Paper doc comment
6132 PaperDocUnresolveComment *PaperDocUnresolveCommentType `json:"paper_doc_unresolve_comment,omitempty"`
6133 // PaperDocUntrashed : (paper) Restored Paper doc
6134 PaperDocUntrashed *PaperDocUntrashedType `json:"paper_doc_untrashed,omitempty"`
6135 // PaperDocView : (paper) Viewed Paper doc
6136 PaperDocView *PaperDocViewType `json:"paper_doc_view,omitempty"`
6137 // PaperExternalViewAllow : (paper) Changed Paper external sharing setting
6138 // to anyone (deprecated, no longer logged)
6139 PaperExternalViewAllow *PaperExternalViewAllowType `json:"paper_external_view_allow,omitempty"`
6140 // PaperExternalViewDefaultTeam : (paper) Changed Paper external sharing
6141 // setting to default team (deprecated, no longer logged)
6142 PaperExternalViewDefaultTeam *PaperExternalViewDefaultTeamType `json:"paper_external_view_default_team,omitempty"`
6143 // PaperExternalViewForbid : (paper) Changed Paper external sharing setting
6144 // to team-only (deprecated, no longer logged)
6145 PaperExternalViewForbid *PaperExternalViewForbidType `json:"paper_external_view_forbid,omitempty"`
6146 // PaperFolderChangeSubscription : (paper) Followed/unfollowed Paper folder
6147 PaperFolderChangeSubscription *PaperFolderChangeSubscriptionType `json:"paper_folder_change_subscription,omitempty"`
6148 // PaperFolderDeleted : (paper) Archived Paper folder (deprecated, no longer
6149 // logged)
6150 PaperFolderDeleted *PaperFolderDeletedType `json:"paper_folder_deleted,omitempty"`
6151 // PaperFolderFollowed : (paper) Followed Paper folder (deprecated, replaced
6152 // by 'Followed/unfollowed Paper folder')
6153 PaperFolderFollowed *PaperFolderFollowedType `json:"paper_folder_followed,omitempty"`
6154 // PaperFolderTeamInvite : (paper) Shared Paper folder with member
6155 // (deprecated, no longer logged)
6156 PaperFolderTeamInvite *PaperFolderTeamInviteType `json:"paper_folder_team_invite,omitempty"`
6157 // PasswordChange : (passwords) Changed password
6158 PasswordChange *PasswordChangeType `json:"password_change,omitempty"`
6159 // PasswordReset : (passwords) Reset password
6160 PasswordReset *PasswordResetType `json:"password_reset,omitempty"`
6161 // PasswordResetAll : (passwords) Reset all team member passwords
6162 PasswordResetAll *PasswordResetAllType `json:"password_reset_all,omitempty"`
6163 // EmmCreateExceptionsReport : (reports) Created EMM-excluded users report
6164 EmmCreateExceptionsReport *EmmCreateExceptionsReportType `json:"emm_create_exceptions_report,omitempty"`
6165 // EmmCreateUsageReport : (reports) Created EMM mobile app usage report
6166 EmmCreateUsageReport *EmmCreateUsageReportType `json:"emm_create_usage_report,omitempty"`
6167 // ExportMembersReport : (reports) Created member data report
6168 ExportMembersReport *ExportMembersReportType `json:"export_members_report,omitempty"`
6169 // PaperAdminExportStart : (reports) Exported all team Paper docs
6170 PaperAdminExportStart *PaperAdminExportStartType `json:"paper_admin_export_start,omitempty"`
6171 // SmartSyncCreateAdminPrivilegeReport : (reports) Created Smart Sync
6172 // non-admin devices report
6173 SmartSyncCreateAdminPrivilegeReport *SmartSyncCreateAdminPrivilegeReportType `json:"smart_sync_create_admin_privilege_report,omitempty"`
6174 // TeamActivityCreateReport : (reports) Created team activity report
6175 TeamActivityCreateReport *TeamActivityCreateReportType `json:"team_activity_create_report,omitempty"`
6176 // CollectionShare : (sharing) Shared album
6177 CollectionShare *CollectionShareType `json:"collection_share,omitempty"`
6178 // NoteAclInviteOnly : (sharing) Changed Paper doc to invite-only
6179 // (deprecated, no longer logged)
6180 NoteAclInviteOnly *NoteAclInviteOnlyType `json:"note_acl_invite_only,omitempty"`
6181 // NoteAclLink : (sharing) Changed Paper doc to link-accessible (deprecated,
6182 // no longer logged)
6183 NoteAclLink *NoteAclLinkType `json:"note_acl_link,omitempty"`
6184 // NoteAclTeamLink : (sharing) Changed Paper doc to link-accessible for team
6185 // (deprecated, no longer logged)
6186 NoteAclTeamLink *NoteAclTeamLinkType `json:"note_acl_team_link,omitempty"`
6187 // NoteShared : (sharing) Shared Paper doc (deprecated, no longer logged)
6188 NoteShared *NoteSharedType `json:"note_shared,omitempty"`
6189 // NoteShareReceive : (sharing) Shared received Paper doc (deprecated, no
6190 // longer logged)
6191 NoteShareReceive *NoteShareReceiveType `json:"note_share_receive,omitempty"`
6192 // OpenNoteShared : (sharing) Opened shared Paper doc (deprecated, no longer
6193 // logged)
6194 OpenNoteShared *OpenNoteSharedType `json:"open_note_shared,omitempty"`
6195 // SfAddGroup : (sharing) Added team to shared folder (deprecated, no longer
6196 // logged)
6197 SfAddGroup *SfAddGroupType `json:"sf_add_group,omitempty"`
6198 // SfAllowNonMembersToViewSharedLinks : (sharing) Allowed non-collaborators
6199 // to view links to files in shared folder (deprecated, no longer logged)
6200 SfAllowNonMembersToViewSharedLinks *SfAllowNonMembersToViewSharedLinksType `json:"sf_allow_non_members_to_view_shared_links,omitempty"`
6201 // SfExternalInviteWarn : (sharing) Set team members to see warning before
6202 // sharing folders outside team (deprecated, no longer logged)
6203 SfExternalInviteWarn *SfExternalInviteWarnType `json:"sf_external_invite_warn,omitempty"`
6204 // SfFbInvite : (sharing) Invited Facebook users to shared folder
6205 // (deprecated, no longer logged)
6206 SfFbInvite *SfFbInviteType `json:"sf_fb_invite,omitempty"`
6207 // SfFbInviteChangeRole : (sharing) Changed Facebook user's role in shared
6208 // folder (deprecated, no longer logged)
6209 SfFbInviteChangeRole *SfFbInviteChangeRoleType `json:"sf_fb_invite_change_role,omitempty"`
6210 // SfFbUninvite : (sharing) Uninvited Facebook user from shared folder
6211 // (deprecated, no longer logged)
6212 SfFbUninvite *SfFbUninviteType `json:"sf_fb_uninvite,omitempty"`
6213 // SfInviteGroup : (sharing) Invited group to shared folder (deprecated, no
6214 // longer logged)
6215 SfInviteGroup *SfInviteGroupType `json:"sf_invite_group,omitempty"`
6216 // SfTeamGrantAccess : (sharing) Granted access to shared folder
6217 // (deprecated, no longer logged)
6218 SfTeamGrantAccess *SfTeamGrantAccessType `json:"sf_team_grant_access,omitempty"`
6219 // SfTeamInvite : (sharing) Invited team members to shared folder
6220 // (deprecated, replaced by 'Invited user to Dropbox and added them to
6221 // shared file/folder')
6222 SfTeamInvite *SfTeamInviteType `json:"sf_team_invite,omitempty"`
6223 // SfTeamInviteChangeRole : (sharing) Changed team member's role in shared
6224 // folder (deprecated, no longer logged)
6225 SfTeamInviteChangeRole *SfTeamInviteChangeRoleType `json:"sf_team_invite_change_role,omitempty"`
6226 // SfTeamJoin : (sharing) Joined team member's shared folder (deprecated, no
6227 // longer logged)
6228 SfTeamJoin *SfTeamJoinType `json:"sf_team_join,omitempty"`
6229 // SfTeamJoinFromOobLink : (sharing) Joined team member's shared folder from
6230 // link (deprecated, no longer logged)
6231 SfTeamJoinFromOobLink *SfTeamJoinFromOobLinkType `json:"sf_team_join_from_oob_link,omitempty"`
6232 // SfTeamUninvite : (sharing) Unshared folder with team member (deprecated,
6233 // replaced by 'Removed invitee from shared file/folder before invite was
6234 // accepted')
6235 SfTeamUninvite *SfTeamUninviteType `json:"sf_team_uninvite,omitempty"`
6236 // SharedContentAddInvitees : (sharing) Invited user to Dropbox and added
6237 // them to shared file/folder
6238 SharedContentAddInvitees *SharedContentAddInviteesType `json:"shared_content_add_invitees,omitempty"`
6239 // SharedContentAddLinkExpiry : (sharing) Added expiration date to link for
6240 // shared file/folder
6241 SharedContentAddLinkExpiry *SharedContentAddLinkExpiryType `json:"shared_content_add_link_expiry,omitempty"`
6242 // SharedContentAddLinkPassword : (sharing) Added password to link for
6243 // shared file/folder
6244 SharedContentAddLinkPassword *SharedContentAddLinkPasswordType `json:"shared_content_add_link_password,omitempty"`
6245 // SharedContentAddMember : (sharing) Added users and/or groups to shared
6246 // file/folder
6247 SharedContentAddMember *SharedContentAddMemberType `json:"shared_content_add_member,omitempty"`
6248 // SharedContentChangeDownloadsPolicy : (sharing) Changed whether members
6249 // can download shared file/folder
6250 SharedContentChangeDownloadsPolicy *SharedContentChangeDownloadsPolicyType `json:"shared_content_change_downloads_policy,omitempty"`
6251 // SharedContentChangeInviteeRole : (sharing) Changed access type of invitee
6252 // to shared file/folder before invite was accepted
6253 SharedContentChangeInviteeRole *SharedContentChangeInviteeRoleType `json:"shared_content_change_invitee_role,omitempty"`
6254 // SharedContentChangeLinkAudience : (sharing) Changed link audience of
6255 // shared file/folder
6256 SharedContentChangeLinkAudience *SharedContentChangeLinkAudienceType `json:"shared_content_change_link_audience,omitempty"`
6257 // SharedContentChangeLinkExpiry : (sharing) Changed link expiration of
6258 // shared file/folder
6259 SharedContentChangeLinkExpiry *SharedContentChangeLinkExpiryType `json:"shared_content_change_link_expiry,omitempty"`
6260 // SharedContentChangeLinkPassword : (sharing) Changed link password of
6261 // shared file/folder
6262 SharedContentChangeLinkPassword *SharedContentChangeLinkPasswordType `json:"shared_content_change_link_password,omitempty"`
6263 // SharedContentChangeMemberRole : (sharing) Changed access type of shared
6264 // file/folder member
6265 SharedContentChangeMemberRole *SharedContentChangeMemberRoleType `json:"shared_content_change_member_role,omitempty"`
6266 // SharedContentChangeViewerInfoPolicy : (sharing) Changed whether members
6267 // can see who viewed shared file/folder
6268 SharedContentChangeViewerInfoPolicy *SharedContentChangeViewerInfoPolicyType `json:"shared_content_change_viewer_info_policy,omitempty"`
6269 // SharedContentClaimInvitation : (sharing) Acquired membership of shared
6270 // file/folder by accepting invite
6271 SharedContentClaimInvitation *SharedContentClaimInvitationType `json:"shared_content_claim_invitation,omitempty"`
6272 // SharedContentCopy : (sharing) Copied shared file/folder to own Dropbox
6273 SharedContentCopy *SharedContentCopyType `json:"shared_content_copy,omitempty"`
6274 // SharedContentDownload : (sharing) Downloaded shared file/folder
6275 SharedContentDownload *SharedContentDownloadType `json:"shared_content_download,omitempty"`
6276 // SharedContentRelinquishMembership : (sharing) Left shared file/folder
6277 SharedContentRelinquishMembership *SharedContentRelinquishMembershipType `json:"shared_content_relinquish_membership,omitempty"`
6278 // SharedContentRemoveInvitees : (sharing) Removed invitee from shared
6279 // file/folder before invite was accepted
6280 SharedContentRemoveInvitees *SharedContentRemoveInviteesType `json:"shared_content_remove_invitees,omitempty"`
6281 // SharedContentRemoveLinkExpiry : (sharing) Removed link expiration date of
6282 // shared file/folder
6283 SharedContentRemoveLinkExpiry *SharedContentRemoveLinkExpiryType `json:"shared_content_remove_link_expiry,omitempty"`
6284 // SharedContentRemoveLinkPassword : (sharing) Removed link password of
6285 // shared file/folder
6286 SharedContentRemoveLinkPassword *SharedContentRemoveLinkPasswordType `json:"shared_content_remove_link_password,omitempty"`
6287 // SharedContentRemoveMember : (sharing) Removed user/group from shared
6288 // file/folder
6289 SharedContentRemoveMember *SharedContentRemoveMemberType `json:"shared_content_remove_member,omitempty"`
6290 // SharedContentRequestAccess : (sharing) Requested access to shared
6291 // file/folder
6292 SharedContentRequestAccess *SharedContentRequestAccessType `json:"shared_content_request_access,omitempty"`
6293 // SharedContentUnshare : (sharing) Unshared file/folder by clearing
6294 // membership and turning off link
6295 SharedContentUnshare *SharedContentUnshareType `json:"shared_content_unshare,omitempty"`
6296 // SharedContentView : (sharing) Previewed shared file/folder
6297 SharedContentView *SharedContentViewType `json:"shared_content_view,omitempty"`
6298 // SharedFolderChangeLinkPolicy : (sharing) Changed who can access shared
6299 // folder via link
6300 SharedFolderChangeLinkPolicy *SharedFolderChangeLinkPolicyType `json:"shared_folder_change_link_policy,omitempty"`
6301 // SharedFolderChangeMembersInheritancePolicy : (sharing) Changed whether
6302 // shared folder inherits members from parent folder
6303 SharedFolderChangeMembersInheritancePolicy *SharedFolderChangeMembersInheritancePolicyType `json:"shared_folder_change_members_inheritance_policy,omitempty"`
6304 // SharedFolderChangeMembersManagementPolicy : (sharing) Changed who can
6305 // add/remove members of shared folder
6306 SharedFolderChangeMembersManagementPolicy *SharedFolderChangeMembersManagementPolicyType `json:"shared_folder_change_members_management_policy,omitempty"`
6307 // SharedFolderChangeMembersPolicy : (sharing) Changed who can become member
6308 // of shared folder
6309 SharedFolderChangeMembersPolicy *SharedFolderChangeMembersPolicyType `json:"shared_folder_change_members_policy,omitempty"`
6310 // SharedFolderCreate : (sharing) Created shared folder
6311 SharedFolderCreate *SharedFolderCreateType `json:"shared_folder_create,omitempty"`
6312 // SharedFolderDeclineInvitation : (sharing) Declined team member's invite
6313 // to shared folder
6314 SharedFolderDeclineInvitation *SharedFolderDeclineInvitationType `json:"shared_folder_decline_invitation,omitempty"`
6315 // SharedFolderMount : (sharing) Added shared folder to own Dropbox
6316 SharedFolderMount *SharedFolderMountType `json:"shared_folder_mount,omitempty"`
6317 // SharedFolderNest : (sharing) Changed parent of shared folder
6318 SharedFolderNest *SharedFolderNestType `json:"shared_folder_nest,omitempty"`
6319 // SharedFolderTransferOwnership : (sharing) Transferred ownership of shared
6320 // folder to another member
6321 SharedFolderTransferOwnership *SharedFolderTransferOwnershipType `json:"shared_folder_transfer_ownership,omitempty"`
6322 // SharedFolderUnmount : (sharing) Deleted shared folder from Dropbox
6323 SharedFolderUnmount *SharedFolderUnmountType `json:"shared_folder_unmount,omitempty"`
6324 // SharedLinkAddExpiry : (sharing) Added shared link expiration date
6325 SharedLinkAddExpiry *SharedLinkAddExpiryType `json:"shared_link_add_expiry,omitempty"`
6326 // SharedLinkChangeExpiry : (sharing) Changed shared link expiration date
6327 SharedLinkChangeExpiry *SharedLinkChangeExpiryType `json:"shared_link_change_expiry,omitempty"`
6328 // SharedLinkChangeVisibility : (sharing) Changed visibility of shared link
6329 SharedLinkChangeVisibility *SharedLinkChangeVisibilityType `json:"shared_link_change_visibility,omitempty"`
6330 // SharedLinkCopy : (sharing) Added file/folder to Dropbox from shared link
6331 SharedLinkCopy *SharedLinkCopyType `json:"shared_link_copy,omitempty"`
6332 // SharedLinkCreate : (sharing) Created shared link
6333 SharedLinkCreate *SharedLinkCreateType `json:"shared_link_create,omitempty"`
6334 // SharedLinkDisable : (sharing) Removed shared link
6335 SharedLinkDisable *SharedLinkDisableType `json:"shared_link_disable,omitempty"`
6336 // SharedLinkDownload : (sharing) Downloaded file/folder from shared link
6337 SharedLinkDownload *SharedLinkDownloadType `json:"shared_link_download,omitempty"`
6338 // SharedLinkRemoveExpiry : (sharing) Removed shared link expiration date
6339 SharedLinkRemoveExpiry *SharedLinkRemoveExpiryType `json:"shared_link_remove_expiry,omitempty"`
6340 // SharedLinkShare : (sharing) Added members as audience of shared link
6341 SharedLinkShare *SharedLinkShareType `json:"shared_link_share,omitempty"`
6342 // SharedLinkView : (sharing) Opened shared link
6343 SharedLinkView *SharedLinkViewType `json:"shared_link_view,omitempty"`
6344 // SharedNoteOpened : (sharing) Opened shared Paper doc (deprecated, no
6345 // longer logged)
6346 SharedNoteOpened *SharedNoteOpenedType `json:"shared_note_opened,omitempty"`
6347 // ShmodelGroupShare : (sharing) Shared link with group (deprecated, no
6348 // longer logged)
6349 ShmodelGroupShare *ShmodelGroupShareType `json:"shmodel_group_share,omitempty"`
6350 // ShowcaseAccessGranted : (showcase) Granted access to showcase
6351 ShowcaseAccessGranted *ShowcaseAccessGrantedType `json:"showcase_access_granted,omitempty"`
6352 // ShowcaseAddMember : (showcase) Added member to showcase
6353 ShowcaseAddMember *ShowcaseAddMemberType `json:"showcase_add_member,omitempty"`
6354 // ShowcaseArchived : (showcase) Archived showcase
6355 ShowcaseArchived *ShowcaseArchivedType `json:"showcase_archived,omitempty"`
6356 // ShowcaseCreated : (showcase) Created showcase
6357 ShowcaseCreated *ShowcaseCreatedType `json:"showcase_created,omitempty"`
6358 // ShowcaseDeleteComment : (showcase) Deleted showcase comment
6359 ShowcaseDeleteComment *ShowcaseDeleteCommentType `json:"showcase_delete_comment,omitempty"`
6360 // ShowcaseEdited : (showcase) Edited showcase
6361 ShowcaseEdited *ShowcaseEditedType `json:"showcase_edited,omitempty"`
6362 // ShowcaseEditComment : (showcase) Edited showcase comment
6363 ShowcaseEditComment *ShowcaseEditCommentType `json:"showcase_edit_comment,omitempty"`
6364 // ShowcaseFileAdded : (showcase) Added file to showcase
6365 ShowcaseFileAdded *ShowcaseFileAddedType `json:"showcase_file_added,omitempty"`
6366 // ShowcaseFileDownload : (showcase) Downloaded file from showcase
6367 ShowcaseFileDownload *ShowcaseFileDownloadType `json:"showcase_file_download,omitempty"`
6368 // ShowcaseFileRemoved : (showcase) Removed file from showcase
6369 ShowcaseFileRemoved *ShowcaseFileRemovedType `json:"showcase_file_removed,omitempty"`
6370 // ShowcaseFileView : (showcase) Viewed file in showcase
6371 ShowcaseFileView *ShowcaseFileViewType `json:"showcase_file_view,omitempty"`
6372 // ShowcasePermanentlyDeleted : (showcase) Permanently deleted showcase
6373 ShowcasePermanentlyDeleted *ShowcasePermanentlyDeletedType `json:"showcase_permanently_deleted,omitempty"`
6374 // ShowcasePostComment : (showcase) Added showcase comment
6375 ShowcasePostComment *ShowcasePostCommentType `json:"showcase_post_comment,omitempty"`
6376 // ShowcaseRemoveMember : (showcase) Removed member from showcase
6377 ShowcaseRemoveMember *ShowcaseRemoveMemberType `json:"showcase_remove_member,omitempty"`
6378 // ShowcaseRenamed : (showcase) Renamed showcase
6379 ShowcaseRenamed *ShowcaseRenamedType `json:"showcase_renamed,omitempty"`
6380 // ShowcaseRequestAccess : (showcase) Requested access to showcase
6381 ShowcaseRequestAccess *ShowcaseRequestAccessType `json:"showcase_request_access,omitempty"`
6382 // ShowcaseResolveComment : (showcase) Resolved showcase comment
6383 ShowcaseResolveComment *ShowcaseResolveCommentType `json:"showcase_resolve_comment,omitempty"`
6384 // ShowcaseRestored : (showcase) Unarchived showcase
6385 ShowcaseRestored *ShowcaseRestoredType `json:"showcase_restored,omitempty"`
6386 // ShowcaseTrashed : (showcase) Deleted showcase
6387 ShowcaseTrashed *ShowcaseTrashedType `json:"showcase_trashed,omitempty"`
6388 // ShowcaseTrashedDeprecated : (showcase) Deleted showcase (old version)
6389 // (deprecated, replaced by 'Deleted showcase')
6390 ShowcaseTrashedDeprecated *ShowcaseTrashedDeprecatedType `json:"showcase_trashed_deprecated,omitempty"`
6391 // ShowcaseUnresolveComment : (showcase) Unresolved showcase comment
6392 ShowcaseUnresolveComment *ShowcaseUnresolveCommentType `json:"showcase_unresolve_comment,omitempty"`
6393 // ShowcaseUntrashed : (showcase) Restored showcase
6394 ShowcaseUntrashed *ShowcaseUntrashedType `json:"showcase_untrashed,omitempty"`
6395 // ShowcaseUntrashedDeprecated : (showcase) Restored showcase (old version)
6396 // (deprecated, replaced by 'Restored showcase')
6397 ShowcaseUntrashedDeprecated *ShowcaseUntrashedDeprecatedType `json:"showcase_untrashed_deprecated,omitempty"`
6398 // ShowcaseView : (showcase) Viewed showcase
6399 ShowcaseView *ShowcaseViewType `json:"showcase_view,omitempty"`
6400 // SsoAddCert : (sso) Added X.509 certificate for SSO
6401 SsoAddCert *SsoAddCertType `json:"sso_add_cert,omitempty"`
6402 // SsoAddLoginUrl : (sso) Added sign-in URL for SSO
6403 SsoAddLoginUrl *SsoAddLoginUrlType `json:"sso_add_login_url,omitempty"`
6404 // SsoAddLogoutUrl : (sso) Added sign-out URL for SSO
6405 SsoAddLogoutUrl *SsoAddLogoutUrlType `json:"sso_add_logout_url,omitempty"`
6406 // SsoChangeCert : (sso) Changed X.509 certificate for SSO
6407 SsoChangeCert *SsoChangeCertType `json:"sso_change_cert,omitempty"`
6408 // SsoChangeLoginUrl : (sso) Changed sign-in URL for SSO
6409 SsoChangeLoginUrl *SsoChangeLoginUrlType `json:"sso_change_login_url,omitempty"`
6410 // SsoChangeLogoutUrl : (sso) Changed sign-out URL for SSO
6411 SsoChangeLogoutUrl *SsoChangeLogoutUrlType `json:"sso_change_logout_url,omitempty"`
6412 // SsoChangeSamlIdentityMode : (sso) Changed SAML identity mode for SSO
6413 SsoChangeSamlIdentityMode *SsoChangeSamlIdentityModeType `json:"sso_change_saml_identity_mode,omitempty"`
6414 // SsoRemoveCert : (sso) Removed X.509 certificate for SSO
6415 SsoRemoveCert *SsoRemoveCertType `json:"sso_remove_cert,omitempty"`
6416 // SsoRemoveLoginUrl : (sso) Removed sign-in URL for SSO
6417 SsoRemoveLoginUrl *SsoRemoveLoginUrlType `json:"sso_remove_login_url,omitempty"`
6418 // SsoRemoveLogoutUrl : (sso) Removed sign-out URL for SSO
6419 SsoRemoveLogoutUrl *SsoRemoveLogoutUrlType `json:"sso_remove_logout_url,omitempty"`
6420 // TeamFolderChangeStatus : (team_folders) Changed archival status of team
6421 // folder
6422 TeamFolderChangeStatus *TeamFolderChangeStatusType `json:"team_folder_change_status,omitempty"`
6423 // TeamFolderCreate : (team_folders) Created team folder in active status
6424 TeamFolderCreate *TeamFolderCreateType `json:"team_folder_create,omitempty"`
6425 // TeamFolderDowngrade : (team_folders) Downgraded team folder to regular
6426 // shared folder
6427 TeamFolderDowngrade *TeamFolderDowngradeType `json:"team_folder_downgrade,omitempty"`
6428 // TeamFolderPermanentlyDelete : (team_folders) Permanently deleted archived
6429 // team folder
6430 TeamFolderPermanentlyDelete *TeamFolderPermanentlyDeleteType `json:"team_folder_permanently_delete,omitempty"`
6431 // TeamFolderRename : (team_folders) Renamed active/archived team folder
6432 TeamFolderRename *TeamFolderRenameType `json:"team_folder_rename,omitempty"`
6433 // TeamSelectiveSyncSettingsChanged : (team_folders) Changed sync default
6434 TeamSelectiveSyncSettingsChanged *TeamSelectiveSyncSettingsChangedType `json:"team_selective_sync_settings_changed,omitempty"`
6435 // AccountCaptureChangePolicy : (team_policies) Changed account capture
6436 // setting on team domain
6437 AccountCaptureChangePolicy *AccountCaptureChangePolicyType `json:"account_capture_change_policy,omitempty"`
6438 // AllowDownloadDisabled : (team_policies) Disabled downloads (deprecated,
6439 // no longer logged)
6440 AllowDownloadDisabled *AllowDownloadDisabledType `json:"allow_download_disabled,omitempty"`
6441 // AllowDownloadEnabled : (team_policies) Enabled downloads (deprecated, no
6442 // longer logged)
6443 AllowDownloadEnabled *AllowDownloadEnabledType `json:"allow_download_enabled,omitempty"`
6444 // CameraUploadsPolicyChanged : (team_policies) Changed camera uploads
6445 // setting for team
6446 CameraUploadsPolicyChanged *CameraUploadsPolicyChangedType `json:"camera_uploads_policy_changed,omitempty"`
6447 // DataPlacementRestrictionChangePolicy : (team_policies) Set restrictions
6448 // on data center locations where team data resides
6449 DataPlacementRestrictionChangePolicy *DataPlacementRestrictionChangePolicyType `json:"data_placement_restriction_change_policy,omitempty"`
6450 // DataPlacementRestrictionSatisfyPolicy : (team_policies) Completed
6451 // restrictions on data center locations where team data resides
6452 DataPlacementRestrictionSatisfyPolicy *DataPlacementRestrictionSatisfyPolicyType `json:"data_placement_restriction_satisfy_policy,omitempty"`
6453 // DeviceApprovalsChangeDesktopPolicy : (team_policies) Set/removed limit on
6454 // number of computers member can link to team Dropbox account
6455 DeviceApprovalsChangeDesktopPolicy *DeviceApprovalsChangeDesktopPolicyType `json:"device_approvals_change_desktop_policy,omitempty"`
6456 // DeviceApprovalsChangeMobilePolicy : (team_policies) Set/removed limit on
6457 // number of mobile devices member can link to team Dropbox account
6458 DeviceApprovalsChangeMobilePolicy *DeviceApprovalsChangeMobilePolicyType `json:"device_approvals_change_mobile_policy,omitempty"`
6459 // DeviceApprovalsChangeOverageAction : (team_policies) Changed device
6460 // approvals setting when member is over limit
6461 DeviceApprovalsChangeOverageAction *DeviceApprovalsChangeOverageActionType `json:"device_approvals_change_overage_action,omitempty"`
6462 // DeviceApprovalsChangeUnlinkAction : (team_policies) Changed device
6463 // approvals setting when member unlinks approved device
6464 DeviceApprovalsChangeUnlinkAction *DeviceApprovalsChangeUnlinkActionType `json:"device_approvals_change_unlink_action,omitempty"`
6465 // DirectoryRestrictionsAddMembers : (team_policies) Added members to
6466 // directory restrictions list
6467 DirectoryRestrictionsAddMembers *DirectoryRestrictionsAddMembersType `json:"directory_restrictions_add_members,omitempty"`
6468 // DirectoryRestrictionsRemoveMembers : (team_policies) Removed members from
6469 // directory restrictions list
6470 DirectoryRestrictionsRemoveMembers *DirectoryRestrictionsRemoveMembersType `json:"directory_restrictions_remove_members,omitempty"`
6471 // EmmAddException : (team_policies) Added members to EMM exception list
6472 EmmAddException *EmmAddExceptionType `json:"emm_add_exception,omitempty"`
6473 // EmmChangePolicy : (team_policies) Enabled/disabled enterprise mobility
6474 // management for members
6475 EmmChangePolicy *EmmChangePolicyType `json:"emm_change_policy,omitempty"`
6476 // EmmRemoveException : (team_policies) Removed members from EMM exception
6477 // list
6478 EmmRemoveException *EmmRemoveExceptionType `json:"emm_remove_exception,omitempty"`
6479 // ExtendedVersionHistoryChangePolicy : (team_policies) Accepted/opted out
6480 // of extended version history
6481 ExtendedVersionHistoryChangePolicy *ExtendedVersionHistoryChangePolicyType `json:"extended_version_history_change_policy,omitempty"`
6482 // FileCommentsChangePolicy : (team_policies) Enabled/disabled commenting on
6483 // team files
6484 FileCommentsChangePolicy *FileCommentsChangePolicyType `json:"file_comments_change_policy,omitempty"`
6485 // FileRequestsChangePolicy : (team_policies) Enabled/disabled file requests
6486 FileRequestsChangePolicy *FileRequestsChangePolicyType `json:"file_requests_change_policy,omitempty"`
6487 // FileRequestsEmailsEnabled : (team_policies) Enabled file request emails
6488 // for everyone (deprecated, no longer logged)
6489 FileRequestsEmailsEnabled *FileRequestsEmailsEnabledType `json:"file_requests_emails_enabled,omitempty"`
6490 // FileRequestsEmailsRestrictedToTeamOnly : (team_policies) Enabled file
6491 // request emails for team (deprecated, no longer logged)
6492 FileRequestsEmailsRestrictedToTeamOnly *FileRequestsEmailsRestrictedToTeamOnlyType `json:"file_requests_emails_restricted_to_team_only,omitempty"`
6493 // GoogleSsoChangePolicy : (team_policies) Enabled/disabled Google single
6494 // sign-on for team
6495 GoogleSsoChangePolicy *GoogleSsoChangePolicyType `json:"google_sso_change_policy,omitempty"`
6496 // GroupUserManagementChangePolicy : (team_policies) Changed who can create
6497 // groups
6498 GroupUserManagementChangePolicy *GroupUserManagementChangePolicyType `json:"group_user_management_change_policy,omitempty"`
6499 // MemberRequestsChangePolicy : (team_policies) Changed whether users can
6500 // find team when not invited
6501 MemberRequestsChangePolicy *MemberRequestsChangePolicyType `json:"member_requests_change_policy,omitempty"`
6502 // MemberSpaceLimitsAddException : (team_policies) Added members to member
6503 // space limit exception list
6504 MemberSpaceLimitsAddException *MemberSpaceLimitsAddExceptionType `json:"member_space_limits_add_exception,omitempty"`
6505 // MemberSpaceLimitsChangeCapsTypePolicy : (team_policies) Changed member
6506 // space limit type for team
6507 MemberSpaceLimitsChangeCapsTypePolicy *MemberSpaceLimitsChangeCapsTypePolicyType `json:"member_space_limits_change_caps_type_policy,omitempty"`
6508 // MemberSpaceLimitsChangePolicy : (team_policies) Changed team default
6509 // member space limit
6510 MemberSpaceLimitsChangePolicy *MemberSpaceLimitsChangePolicyType `json:"member_space_limits_change_policy,omitempty"`
6511 // MemberSpaceLimitsRemoveException : (team_policies) Removed members from
6512 // member space limit exception list
6513 MemberSpaceLimitsRemoveException *MemberSpaceLimitsRemoveExceptionType `json:"member_space_limits_remove_exception,omitempty"`
6514 // MemberSuggestionsChangePolicy : (team_policies) Enabled/disabled option
6515 // for team members to suggest people to add to team
6516 MemberSuggestionsChangePolicy *MemberSuggestionsChangePolicyType `json:"member_suggestions_change_policy,omitempty"`
6517 // MicrosoftOfficeAddinChangePolicy : (team_policies) Enabled/disabled
6518 // Microsoft Office add-in
6519 MicrosoftOfficeAddinChangePolicy *MicrosoftOfficeAddinChangePolicyType `json:"microsoft_office_addin_change_policy,omitempty"`
6520 // NetworkControlChangePolicy : (team_policies) Enabled/disabled network
6521 // control
6522 NetworkControlChangePolicy *NetworkControlChangePolicyType `json:"network_control_change_policy,omitempty"`
6523 // PaperChangeDeploymentPolicy : (team_policies) Changed whether Dropbox
6524 // Paper, when enabled, is deployed to all members or to specific members
6525 PaperChangeDeploymentPolicy *PaperChangeDeploymentPolicyType `json:"paper_change_deployment_policy,omitempty"`
6526 // PaperChangeMemberLinkPolicy : (team_policies) Changed whether non-members
6527 // can view Paper docs with link (deprecated, no longer logged)
6528 PaperChangeMemberLinkPolicy *PaperChangeMemberLinkPolicyType `json:"paper_change_member_link_policy,omitempty"`
6529 // PaperChangeMemberPolicy : (team_policies) Changed whether members can
6530 // share Paper docs outside team, and if docs are accessible only by team
6531 // members or anyone by default
6532 PaperChangeMemberPolicy *PaperChangeMemberPolicyType `json:"paper_change_member_policy,omitempty"`
6533 // PaperChangePolicy : (team_policies) Enabled/disabled Dropbox Paper for
6534 // team
6535 PaperChangePolicy *PaperChangePolicyType `json:"paper_change_policy,omitempty"`
6536 // PaperEnabledUsersGroupAddition : (team_policies) Added users to
6537 // Paper-enabled users list
6538 PaperEnabledUsersGroupAddition *PaperEnabledUsersGroupAdditionType `json:"paper_enabled_users_group_addition,omitempty"`
6539 // PaperEnabledUsersGroupRemoval : (team_policies) Removed users from
6540 // Paper-enabled users list
6541 PaperEnabledUsersGroupRemoval *PaperEnabledUsersGroupRemovalType `json:"paper_enabled_users_group_removal,omitempty"`
6542 // PermanentDeleteChangePolicy : (team_policies) Enabled/disabled ability of
6543 // team members to permanently delete content
6544 PermanentDeleteChangePolicy *PermanentDeleteChangePolicyType `json:"permanent_delete_change_policy,omitempty"`
6545 // SharingChangeFolderJoinPolicy : (team_policies) Changed whether team
6546 // members can join shared folders owned outside team
6547 SharingChangeFolderJoinPolicy *SharingChangeFolderJoinPolicyType `json:"sharing_change_folder_join_policy,omitempty"`
6548 // SharingChangeLinkPolicy : (team_policies) Changed whether members can
6549 // share links outside team, and if links are accessible only by team
6550 // members or anyone by default
6551 SharingChangeLinkPolicy *SharingChangeLinkPolicyType `json:"sharing_change_link_policy,omitempty"`
6552 // SharingChangeMemberPolicy : (team_policies) Changed whether members can
6553 // share files/folders outside team
6554 SharingChangeMemberPolicy *SharingChangeMemberPolicyType `json:"sharing_change_member_policy,omitempty"`
6555 // ShowcaseChangeDownloadPolicy : (team_policies) Enabled/disabled
6556 // downloading files from Dropbox Showcase for team
6557 ShowcaseChangeDownloadPolicy *ShowcaseChangeDownloadPolicyType `json:"showcase_change_download_policy,omitempty"`
6558 // ShowcaseChangeEnabledPolicy : (team_policies) Enabled/disabled Dropbox
6559 // Showcase for team
6560 ShowcaseChangeEnabledPolicy *ShowcaseChangeEnabledPolicyType `json:"showcase_change_enabled_policy,omitempty"`
6561 // ShowcaseChangeExternalSharingPolicy : (team_policies) Enabled/disabled
6562 // sharing Dropbox Showcase externally for team
6563 ShowcaseChangeExternalSharingPolicy *ShowcaseChangeExternalSharingPolicyType `json:"showcase_change_external_sharing_policy,omitempty"`
6564 // SmartSyncChangePolicy : (team_policies) Changed default Smart Sync
6565 // setting for team members
6566 SmartSyncChangePolicy *SmartSyncChangePolicyType `json:"smart_sync_change_policy,omitempty"`
6567 // SmartSyncNotOptOut : (team_policies) Opted team into Smart Sync
6568 SmartSyncNotOptOut *SmartSyncNotOptOutType `json:"smart_sync_not_opt_out,omitempty"`
6569 // SmartSyncOptOut : (team_policies) Opted team out of Smart Sync
6570 SmartSyncOptOut *SmartSyncOptOutType `json:"smart_sync_opt_out,omitempty"`
6571 // SsoChangePolicy : (team_policies) Changed single sign-on setting for team
6572 SsoChangePolicy *SsoChangePolicyType `json:"sso_change_policy,omitempty"`
6573 // TeamSelectiveSyncPolicyChanged : (team_policies) Enabled/disabled Team
6574 // Selective Sync for team
6575 TeamSelectiveSyncPolicyChanged *TeamSelectiveSyncPolicyChangedType `json:"team_selective_sync_policy_changed,omitempty"`
6576 // TfaChangePolicy : (team_policies) Changed two-step verification setting
6577 // for team
6578 TfaChangePolicy *TfaChangePolicyType `json:"tfa_change_policy,omitempty"`
6579 // TwoAccountChangePolicy : (team_policies) Enabled/disabled option for
6580 // members to link personal Dropbox account and team account to same
6581 // computer
6582 TwoAccountChangePolicy *TwoAccountChangePolicyType `json:"two_account_change_policy,omitempty"`
6583 // ViewerInfoPolicyChanged : (team_policies) Changed team policy for viewer
6584 // info
6585 ViewerInfoPolicyChanged *ViewerInfoPolicyChangedType `json:"viewer_info_policy_changed,omitempty"`
6586 // WebSessionsChangeFixedLengthPolicy : (team_policies) Changed how long
6587 // members can stay signed in to Dropbox.com
6588 WebSessionsChangeFixedLengthPolicy *WebSessionsChangeFixedLengthPolicyType `json:"web_sessions_change_fixed_length_policy,omitempty"`
6589 // WebSessionsChangeIdleLengthPolicy : (team_policies) Changed how long team
6590 // members can be idle while signed in to Dropbox.com
6591 WebSessionsChangeIdleLengthPolicy *WebSessionsChangeIdleLengthPolicyType `json:"web_sessions_change_idle_length_policy,omitempty"`
6592 // TeamMergeFrom : (team_profile) Merged another team into this team
6593 TeamMergeFrom *TeamMergeFromType `json:"team_merge_from,omitempty"`
6594 // TeamMergeTo : (team_profile) Merged this team into another team
6595 TeamMergeTo *TeamMergeToType `json:"team_merge_to,omitempty"`
6596 // TeamProfileAddLogo : (team_profile) Added team logo to display on shared
6597 // link headers
6598 TeamProfileAddLogo *TeamProfileAddLogoType `json:"team_profile_add_logo,omitempty"`
6599 // TeamProfileChangeDefaultLanguage : (team_profile) Changed default
6600 // language for team
6601 TeamProfileChangeDefaultLanguage *TeamProfileChangeDefaultLanguageType `json:"team_profile_change_default_language,omitempty"`
6602 // TeamProfileChangeLogo : (team_profile) Changed team logo displayed on
6603 // shared link headers
6604 TeamProfileChangeLogo *TeamProfileChangeLogoType `json:"team_profile_change_logo,omitempty"`
6605 // TeamProfileChangeName : (team_profile) Changed team name
6606 TeamProfileChangeName *TeamProfileChangeNameType `json:"team_profile_change_name,omitempty"`
6607 // TeamProfileRemoveLogo : (team_profile) Removed team logo displayed on
6608 // shared link headers
6609 TeamProfileRemoveLogo *TeamProfileRemoveLogoType `json:"team_profile_remove_logo,omitempty"`
6610 // TfaAddBackupPhone : (tfa) Added backup phone for two-step verification
6611 TfaAddBackupPhone *TfaAddBackupPhoneType `json:"tfa_add_backup_phone,omitempty"`
6612 // TfaAddSecurityKey : (tfa) Added security key for two-step verification
6613 TfaAddSecurityKey *TfaAddSecurityKeyType `json:"tfa_add_security_key,omitempty"`
6614 // TfaChangeBackupPhone : (tfa) Changed backup phone for two-step
6615 // verification
6616 TfaChangeBackupPhone *TfaChangeBackupPhoneType `json:"tfa_change_backup_phone,omitempty"`
6617 // TfaChangeStatus : (tfa) Enabled/disabled/changed two-step verification
6618 // setting
6619 TfaChangeStatus *TfaChangeStatusType `json:"tfa_change_status,omitempty"`
6620 // TfaRemoveBackupPhone : (tfa) Removed backup phone for two-step
6621 // verification
6622 TfaRemoveBackupPhone *TfaRemoveBackupPhoneType `json:"tfa_remove_backup_phone,omitempty"`
6623 // TfaRemoveSecurityKey : (tfa) Removed security key for two-step
6624 // verification
6625 TfaRemoveSecurityKey *TfaRemoveSecurityKeyType `json:"tfa_remove_security_key,omitempty"`
6626 // TfaReset : (tfa) Reset two-step verification for team member
6627 TfaReset *TfaResetType `json:"tfa_reset,omitempty"`
6628 }
6629
6630 // Valid tag values for EventType
6631 const (
6632 EventTypeAppLinkTeam = "app_link_team"
6633 EventTypeAppLinkUser = "app_link_user"
6634 EventTypeAppUnlinkTeam = "app_unlink_team"
6635 EventTypeAppUnlinkUser = "app_unlink_user"
6636 EventTypeFileAddComment = "file_add_comment"
6637 EventTypeFileChangeCommentSubscription = "file_change_comment_subscription"
6638 EventTypeFileDeleteComment = "file_delete_comment"
6639 EventTypeFileEditComment = "file_edit_comment"
6640 EventTypeFileLikeComment = "file_like_comment"
6641 EventTypeFileResolveComment = "file_resolve_comment"
6642 EventTypeFileUnlikeComment = "file_unlike_comment"
6643 EventTypeFileUnresolveComment = "file_unresolve_comment"
6644 EventTypeDeviceChangeIpDesktop = "device_change_ip_desktop"
6645 EventTypeDeviceChangeIpMobile = "device_change_ip_mobile"
6646 EventTypeDeviceChangeIpWeb = "device_change_ip_web"
6647 EventTypeDeviceDeleteOnUnlinkFail = "device_delete_on_unlink_fail"
6648 EventTypeDeviceDeleteOnUnlinkSuccess = "device_delete_on_unlink_success"
6649 EventTypeDeviceLinkFail = "device_link_fail"
6650 EventTypeDeviceLinkSuccess = "device_link_success"
6651 EventTypeDeviceManagementDisabled = "device_management_disabled"
6652 EventTypeDeviceManagementEnabled = "device_management_enabled"
6653 EventTypeDeviceUnlink = "device_unlink"
6654 EventTypeEmmRefreshAuthToken = "emm_refresh_auth_token"
6655 EventTypeAccountCaptureChangeAvailability = "account_capture_change_availability"
6656 EventTypeAccountCaptureMigrateAccount = "account_capture_migrate_account"
6657 EventTypeAccountCaptureNotificationEmailsSent = "account_capture_notification_emails_sent"
6658 EventTypeAccountCaptureRelinquishAccount = "account_capture_relinquish_account"
6659 EventTypeDisabledDomainInvites = "disabled_domain_invites"
6660 EventTypeDomainInvitesApproveRequestToJoinTeam = "domain_invites_approve_request_to_join_team"
6661 EventTypeDomainInvitesDeclineRequestToJoinTeam = "domain_invites_decline_request_to_join_team"
6662 EventTypeDomainInvitesEmailExistingUsers = "domain_invites_email_existing_users"
6663 EventTypeDomainInvitesRequestToJoinTeam = "domain_invites_request_to_join_team"
6664 EventTypeDomainInvitesSetInviteNewUserPrefToNo = "domain_invites_set_invite_new_user_pref_to_no"
6665 EventTypeDomainInvitesSetInviteNewUserPrefToYes = "domain_invites_set_invite_new_user_pref_to_yes"
6666 EventTypeDomainVerificationAddDomainFail = "domain_verification_add_domain_fail"
6667 EventTypeDomainVerificationAddDomainSuccess = "domain_verification_add_domain_success"
6668 EventTypeDomainVerificationRemoveDomain = "domain_verification_remove_domain"
6669 EventTypeEnabledDomainInvites = "enabled_domain_invites"
6670 EventTypeCreateFolder = "create_folder"
6671 EventTypeFileAdd = "file_add"
6672 EventTypeFileCopy = "file_copy"
6673 EventTypeFileDelete = "file_delete"
6674 EventTypeFileDownload = "file_download"
6675 EventTypeFileEdit = "file_edit"
6676 EventTypeFileGetCopyReference = "file_get_copy_reference"
6677 EventTypeFileMove = "file_move"
6678 EventTypeFilePermanentlyDelete = "file_permanently_delete"
6679 EventTypeFilePreview = "file_preview"
6680 EventTypeFileRename = "file_rename"
6681 EventTypeFileRestore = "file_restore"
6682 EventTypeFileRevert = "file_revert"
6683 EventTypeFileRollbackChanges = "file_rollback_changes"
6684 EventTypeFileSaveCopyReference = "file_save_copy_reference"
6685 EventTypeFileRequestChange = "file_request_change"
6686 EventTypeFileRequestClose = "file_request_close"
6687 EventTypeFileRequestCreate = "file_request_create"
6688 EventTypeFileRequestReceiveFile = "file_request_receive_file"
6689 EventTypeGroupAddExternalId = "group_add_external_id"
6690 EventTypeGroupAddMember = "group_add_member"
6691 EventTypeGroupChangeExternalId = "group_change_external_id"
6692 EventTypeGroupChangeManagementType = "group_change_management_type"
6693 EventTypeGroupChangeMemberRole = "group_change_member_role"
6694 EventTypeGroupCreate = "group_create"
6695 EventTypeGroupDelete = "group_delete"
6696 EventTypeGroupDescriptionUpdated = "group_description_updated"
6697 EventTypeGroupJoinPolicyUpdated = "group_join_policy_updated"
6698 EventTypeGroupMoved = "group_moved"
6699 EventTypeGroupRemoveExternalId = "group_remove_external_id"
6700 EventTypeGroupRemoveMember = "group_remove_member"
6701 EventTypeGroupRename = "group_rename"
6702 EventTypeEmmError = "emm_error"
6703 EventTypeLoginFail = "login_fail"
6704 EventTypeLoginSuccess = "login_success"
6705 EventTypeLogout = "logout"
6706 EventTypeResellerSupportSessionEnd = "reseller_support_session_end"
6707 EventTypeResellerSupportSessionStart = "reseller_support_session_start"
6708 EventTypeSignInAsSessionEnd = "sign_in_as_session_end"
6709 EventTypeSignInAsSessionStart = "sign_in_as_session_start"
6710 EventTypeSsoError = "sso_error"
6711 EventTypeMemberAddName = "member_add_name"
6712 EventTypeMemberChangeAdminRole = "member_change_admin_role"
6713 EventTypeMemberChangeEmail = "member_change_email"
6714 EventTypeMemberChangeMembershipType = "member_change_membership_type"
6715 EventTypeMemberChangeName = "member_change_name"
6716 EventTypeMemberChangeStatus = "member_change_status"
6717 EventTypeMemberDeleteManualContacts = "member_delete_manual_contacts"
6718 EventTypeMemberPermanentlyDeleteAccountContents = "member_permanently_delete_account_contents"
6719 EventTypeMemberSpaceLimitsAddCustomQuota = "member_space_limits_add_custom_quota"
6720 EventTypeMemberSpaceLimitsChangeCustomQuota = "member_space_limits_change_custom_quota"
6721 EventTypeMemberSpaceLimitsChangeStatus = "member_space_limits_change_status"
6722 EventTypeMemberSpaceLimitsRemoveCustomQuota = "member_space_limits_remove_custom_quota"
6723 EventTypeMemberSuggest = "member_suggest"
6724 EventTypeMemberTransferAccountContents = "member_transfer_account_contents"
6725 EventTypeSecondaryMailsPolicyChanged = "secondary_mails_policy_changed"
6726 EventTypePaperContentAddMember = "paper_content_add_member"
6727 EventTypePaperContentAddToFolder = "paper_content_add_to_folder"
6728 EventTypePaperContentArchive = "paper_content_archive"
6729 EventTypePaperContentCreate = "paper_content_create"
6730 EventTypePaperContentPermanentlyDelete = "paper_content_permanently_delete"
6731 EventTypePaperContentRemoveFromFolder = "paper_content_remove_from_folder"
6732 EventTypePaperContentRemoveMember = "paper_content_remove_member"
6733 EventTypePaperContentRename = "paper_content_rename"
6734 EventTypePaperContentRestore = "paper_content_restore"
6735 EventTypePaperDocAddComment = "paper_doc_add_comment"
6736 EventTypePaperDocChangeMemberRole = "paper_doc_change_member_role"
6737 EventTypePaperDocChangeSharingPolicy = "paper_doc_change_sharing_policy"
6738 EventTypePaperDocChangeSubscription = "paper_doc_change_subscription"
6739 EventTypePaperDocDeleted = "paper_doc_deleted"
6740 EventTypePaperDocDeleteComment = "paper_doc_delete_comment"
6741 EventTypePaperDocDownload = "paper_doc_download"
6742 EventTypePaperDocEdit = "paper_doc_edit"
6743 EventTypePaperDocEditComment = "paper_doc_edit_comment"
6744 EventTypePaperDocFollowed = "paper_doc_followed"
6745 EventTypePaperDocMention = "paper_doc_mention"
6746 EventTypePaperDocOwnershipChanged = "paper_doc_ownership_changed"
6747 EventTypePaperDocRequestAccess = "paper_doc_request_access"
6748 EventTypePaperDocResolveComment = "paper_doc_resolve_comment"
6749 EventTypePaperDocRevert = "paper_doc_revert"
6750 EventTypePaperDocSlackShare = "paper_doc_slack_share"
6751 EventTypePaperDocTeamInvite = "paper_doc_team_invite"
6752 EventTypePaperDocTrashed = "paper_doc_trashed"
6753 EventTypePaperDocUnresolveComment = "paper_doc_unresolve_comment"
6754 EventTypePaperDocUntrashed = "paper_doc_untrashed"
6755 EventTypePaperDocView = "paper_doc_view"
6756 EventTypePaperExternalViewAllow = "paper_external_view_allow"
6757 EventTypePaperExternalViewDefaultTeam = "paper_external_view_default_team"
6758 EventTypePaperExternalViewForbid = "paper_external_view_forbid"
6759 EventTypePaperFolderChangeSubscription = "paper_folder_change_subscription"
6760 EventTypePaperFolderDeleted = "paper_folder_deleted"
6761 EventTypePaperFolderFollowed = "paper_folder_followed"
6762 EventTypePaperFolderTeamInvite = "paper_folder_team_invite"
6763 EventTypePasswordChange = "password_change"
6764 EventTypePasswordReset = "password_reset"
6765 EventTypePasswordResetAll = "password_reset_all"
6766 EventTypeEmmCreateExceptionsReport = "emm_create_exceptions_report"
6767 EventTypeEmmCreateUsageReport = "emm_create_usage_report"
6768 EventTypeExportMembersReport = "export_members_report"
6769 EventTypePaperAdminExportStart = "paper_admin_export_start"
6770 EventTypeSmartSyncCreateAdminPrivilegeReport = "smart_sync_create_admin_privilege_report"
6771 EventTypeTeamActivityCreateReport = "team_activity_create_report"
6772 EventTypeCollectionShare = "collection_share"
6773 EventTypeNoteAclInviteOnly = "note_acl_invite_only"
6774 EventTypeNoteAclLink = "note_acl_link"
6775 EventTypeNoteAclTeamLink = "note_acl_team_link"
6776 EventTypeNoteShared = "note_shared"
6777 EventTypeNoteShareReceive = "note_share_receive"
6778 EventTypeOpenNoteShared = "open_note_shared"
6779 EventTypeSfAddGroup = "sf_add_group"
6780 EventTypeSfAllowNonMembersToViewSharedLinks = "sf_allow_non_members_to_view_shared_links"
6781 EventTypeSfExternalInviteWarn = "sf_external_invite_warn"
6782 EventTypeSfFbInvite = "sf_fb_invite"
6783 EventTypeSfFbInviteChangeRole = "sf_fb_invite_change_role"
6784 EventTypeSfFbUninvite = "sf_fb_uninvite"
6785 EventTypeSfInviteGroup = "sf_invite_group"
6786 EventTypeSfTeamGrantAccess = "sf_team_grant_access"
6787 EventTypeSfTeamInvite = "sf_team_invite"
6788 EventTypeSfTeamInviteChangeRole = "sf_team_invite_change_role"
6789 EventTypeSfTeamJoin = "sf_team_join"
6790 EventTypeSfTeamJoinFromOobLink = "sf_team_join_from_oob_link"
6791 EventTypeSfTeamUninvite = "sf_team_uninvite"
6792 EventTypeSharedContentAddInvitees = "shared_content_add_invitees"
6793 EventTypeSharedContentAddLinkExpiry = "shared_content_add_link_expiry"
6794 EventTypeSharedContentAddLinkPassword = "shared_content_add_link_password"
6795 EventTypeSharedContentAddMember = "shared_content_add_member"
6796 EventTypeSharedContentChangeDownloadsPolicy = "shared_content_change_downloads_policy"
6797 EventTypeSharedContentChangeInviteeRole = "shared_content_change_invitee_role"
6798 EventTypeSharedContentChangeLinkAudience = "shared_content_change_link_audience"
6799 EventTypeSharedContentChangeLinkExpiry = "shared_content_change_link_expiry"
6800 EventTypeSharedContentChangeLinkPassword = "shared_content_change_link_password"
6801 EventTypeSharedContentChangeMemberRole = "shared_content_change_member_role"
6802 EventTypeSharedContentChangeViewerInfoPolicy = "shared_content_change_viewer_info_policy"
6803 EventTypeSharedContentClaimInvitation = "shared_content_claim_invitation"
6804 EventTypeSharedContentCopy = "shared_content_copy"
6805 EventTypeSharedContentDownload = "shared_content_download"
6806 EventTypeSharedContentRelinquishMembership = "shared_content_relinquish_membership"
6807 EventTypeSharedContentRemoveInvitees = "shared_content_remove_invitees"
6808 EventTypeSharedContentRemoveLinkExpiry = "shared_content_remove_link_expiry"
6809 EventTypeSharedContentRemoveLinkPassword = "shared_content_remove_link_password"
6810 EventTypeSharedContentRemoveMember = "shared_content_remove_member"
6811 EventTypeSharedContentRequestAccess = "shared_content_request_access"
6812 EventTypeSharedContentUnshare = "shared_content_unshare"
6813 EventTypeSharedContentView = "shared_content_view"
6814 EventTypeSharedFolderChangeLinkPolicy = "shared_folder_change_link_policy"
6815 EventTypeSharedFolderChangeMembersInheritancePolicy = "shared_folder_change_members_inheritance_policy"
6816 EventTypeSharedFolderChangeMembersManagementPolicy = "shared_folder_change_members_management_policy"
6817 EventTypeSharedFolderChangeMembersPolicy = "shared_folder_change_members_policy"
6818 EventTypeSharedFolderCreate = "shared_folder_create"
6819 EventTypeSharedFolderDeclineInvitation = "shared_folder_decline_invitation"
6820 EventTypeSharedFolderMount = "shared_folder_mount"
6821 EventTypeSharedFolderNest = "shared_folder_nest"
6822 EventTypeSharedFolderTransferOwnership = "shared_folder_transfer_ownership"
6823 EventTypeSharedFolderUnmount = "shared_folder_unmount"
6824 EventTypeSharedLinkAddExpiry = "shared_link_add_expiry"
6825 EventTypeSharedLinkChangeExpiry = "shared_link_change_expiry"
6826 EventTypeSharedLinkChangeVisibility = "shared_link_change_visibility"
6827 EventTypeSharedLinkCopy = "shared_link_copy"
6828 EventTypeSharedLinkCreate = "shared_link_create"
6829 EventTypeSharedLinkDisable = "shared_link_disable"
6830 EventTypeSharedLinkDownload = "shared_link_download"
6831 EventTypeSharedLinkRemoveExpiry = "shared_link_remove_expiry"
6832 EventTypeSharedLinkShare = "shared_link_share"
6833 EventTypeSharedLinkView = "shared_link_view"
6834 EventTypeSharedNoteOpened = "shared_note_opened"
6835 EventTypeShmodelGroupShare = "shmodel_group_share"
6836 EventTypeShowcaseAccessGranted = "showcase_access_granted"
6837 EventTypeShowcaseAddMember = "showcase_add_member"
6838 EventTypeShowcaseArchived = "showcase_archived"
6839 EventTypeShowcaseCreated = "showcase_created"
6840 EventTypeShowcaseDeleteComment = "showcase_delete_comment"
6841 EventTypeShowcaseEdited = "showcase_edited"
6842 EventTypeShowcaseEditComment = "showcase_edit_comment"
6843 EventTypeShowcaseFileAdded = "showcase_file_added"
6844 EventTypeShowcaseFileDownload = "showcase_file_download"
6845 EventTypeShowcaseFileRemoved = "showcase_file_removed"
6846 EventTypeShowcaseFileView = "showcase_file_view"
6847 EventTypeShowcasePermanentlyDeleted = "showcase_permanently_deleted"
6848 EventTypeShowcasePostComment = "showcase_post_comment"
6849 EventTypeShowcaseRemoveMember = "showcase_remove_member"
6850 EventTypeShowcaseRenamed = "showcase_renamed"
6851 EventTypeShowcaseRequestAccess = "showcase_request_access"
6852 EventTypeShowcaseResolveComment = "showcase_resolve_comment"
6853 EventTypeShowcaseRestored = "showcase_restored"
6854 EventTypeShowcaseTrashed = "showcase_trashed"
6855 EventTypeShowcaseTrashedDeprecated = "showcase_trashed_deprecated"
6856 EventTypeShowcaseUnresolveComment = "showcase_unresolve_comment"
6857 EventTypeShowcaseUntrashed = "showcase_untrashed"
6858 EventTypeShowcaseUntrashedDeprecated = "showcase_untrashed_deprecated"
6859 EventTypeShowcaseView = "showcase_view"
6860 EventTypeSsoAddCert = "sso_add_cert"
6861 EventTypeSsoAddLoginUrl = "sso_add_login_url"
6862 EventTypeSsoAddLogoutUrl = "sso_add_logout_url"
6863 EventTypeSsoChangeCert = "sso_change_cert"
6864 EventTypeSsoChangeLoginUrl = "sso_change_login_url"
6865 EventTypeSsoChangeLogoutUrl = "sso_change_logout_url"
6866 EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
6867 EventTypeSsoRemoveCert = "sso_remove_cert"
6868 EventTypeSsoRemoveLoginUrl = "sso_remove_login_url"
6869 EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url"
6870 EventTypeTeamFolderChangeStatus = "team_folder_change_status"
6871 EventTypeTeamFolderCreate = "team_folder_create"
6872 EventTypeTeamFolderDowngrade = "team_folder_downgrade"
6873 EventTypeTeamFolderPermanentlyDelete = "team_folder_permanently_delete"
6874 EventTypeTeamFolderRename = "team_folder_rename"
6875 EventTypeTeamSelectiveSyncSettingsChanged = "team_selective_sync_settings_changed"
6876 EventTypeAccountCaptureChangePolicy = "account_capture_change_policy"
6877 EventTypeAllowDownloadDisabled = "allow_download_disabled"
6878 EventTypeAllowDownloadEnabled = "allow_download_enabled"
6879 EventTypeCameraUploadsPolicyChanged = "camera_uploads_policy_changed"
6880 EventTypeDataPlacementRestrictionChangePolicy = "data_placement_restriction_change_policy"
6881 EventTypeDataPlacementRestrictionSatisfyPolicy = "data_placement_restriction_satisfy_policy"
6882 EventTypeDeviceApprovalsChangeDesktopPolicy = "device_approvals_change_desktop_policy"
6883 EventTypeDeviceApprovalsChangeMobilePolicy = "device_approvals_change_mobile_policy"
6884 EventTypeDeviceApprovalsChangeOverageAction = "device_approvals_change_overage_action"
6885 EventTypeDeviceApprovalsChangeUnlinkAction = "device_approvals_change_unlink_action"
6886 EventTypeDirectoryRestrictionsAddMembers = "directory_restrictions_add_members"
6887 EventTypeDirectoryRestrictionsRemoveMembers = "directory_restrictions_remove_members"
6888 EventTypeEmmAddException = "emm_add_exception"
6889 EventTypeEmmChangePolicy = "emm_change_policy"
6890 EventTypeEmmRemoveException = "emm_remove_exception"
6891 EventTypeExtendedVersionHistoryChangePolicy = "extended_version_history_change_policy"
6892 EventTypeFileCommentsChangePolicy = "file_comments_change_policy"
6893 EventTypeFileRequestsChangePolicy = "file_requests_change_policy"
6894 EventTypeFileRequestsEmailsEnabled = "file_requests_emails_enabled"
6895 EventTypeFileRequestsEmailsRestrictedToTeamOnly = "file_requests_emails_restricted_to_team_only"
6896 EventTypeGoogleSsoChangePolicy = "google_sso_change_policy"
6897 EventTypeGroupUserManagementChangePolicy = "group_user_management_change_policy"
6898 EventTypeMemberRequestsChangePolicy = "member_requests_change_policy"
6899 EventTypeMemberSpaceLimitsAddException = "member_space_limits_add_exception"
6900 EventTypeMemberSpaceLimitsChangeCapsTypePolicy = "member_space_limits_change_caps_type_policy"
6901 EventTypeMemberSpaceLimitsChangePolicy = "member_space_limits_change_policy"
6902 EventTypeMemberSpaceLimitsRemoveException = "member_space_limits_remove_exception"
6903 EventTypeMemberSuggestionsChangePolicy = "member_suggestions_change_policy"
6904 EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
6905 EventTypeNetworkControlChangePolicy = "network_control_change_policy"
6906 EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy"
6907 EventTypePaperChangeMemberLinkPolicy = "paper_change_member_link_policy"
6908 EventTypePaperChangeMemberPolicy = "paper_change_member_policy"
6909 EventTypePaperChangePolicy = "paper_change_policy"
6910 EventTypePaperEnabledUsersGroupAddition = "paper_enabled_users_group_addition"
6911 EventTypePaperEnabledUsersGroupRemoval = "paper_enabled_users_group_removal"
6912 EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy"
6913 EventTypeSharingChangeFolderJoinPolicy = "sharing_change_folder_join_policy"
6914 EventTypeSharingChangeLinkPolicy = "sharing_change_link_policy"
6915 EventTypeSharingChangeMemberPolicy = "sharing_change_member_policy"
6916 EventTypeShowcaseChangeDownloadPolicy = "showcase_change_download_policy"
6917 EventTypeShowcaseChangeEnabledPolicy = "showcase_change_enabled_policy"
6918 EventTypeShowcaseChangeExternalSharingPolicy = "showcase_change_external_sharing_policy"
6919 EventTypeSmartSyncChangePolicy = "smart_sync_change_policy"
6920 EventTypeSmartSyncNotOptOut = "smart_sync_not_opt_out"
6921 EventTypeSmartSyncOptOut = "smart_sync_opt_out"
6922 EventTypeSsoChangePolicy = "sso_change_policy"
6923 EventTypeTeamSelectiveSyncPolicyChanged = "team_selective_sync_policy_changed"
6924 EventTypeTfaChangePolicy = "tfa_change_policy"
6925 EventTypeTwoAccountChangePolicy = "two_account_change_policy"
6926 EventTypeViewerInfoPolicyChanged = "viewer_info_policy_changed"
6927 EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
6928 EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
6929 EventTypeTeamMergeFrom = "team_merge_from"
6930 EventTypeTeamMergeTo = "team_merge_to"
6931 EventTypeTeamProfileAddLogo = "team_profile_add_logo"
6932 EventTypeTeamProfileChangeDefaultLanguage = "team_profile_change_default_language"
6933 EventTypeTeamProfileChangeLogo = "team_profile_change_logo"
6934 EventTypeTeamProfileChangeName = "team_profile_change_name"
6935 EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo"
6936 EventTypeTfaAddBackupPhone = "tfa_add_backup_phone"
6937 EventTypeTfaAddSecurityKey = "tfa_add_security_key"
6938 EventTypeTfaChangeBackupPhone = "tfa_change_backup_phone"
6939 EventTypeTfaChangeStatus = "tfa_change_status"
6940 EventTypeTfaRemoveBackupPhone = "tfa_remove_backup_phone"
6941 EventTypeTfaRemoveSecurityKey = "tfa_remove_security_key"
6942 EventTypeTfaReset = "tfa_reset"
6943 EventTypeOther = "other"
6944 )
6945
6946 // UnmarshalJSON deserializes into a EventType instance
6947 func (u *EventType) UnmarshalJSON(body []byte) error {
6948 type wrap struct {
6949 dropbox.Tagged
6950 // AppLinkTeam : (apps) Linked app for team
6951 AppLinkTeam json.RawMessage `json:"app_link_team,omitempty"`
6952 // AppLinkUser : (apps) Linked app for member
6953 AppLinkUser json.RawMessage `json:"app_link_user,omitempty"`
6954 // AppUnlinkTeam : (apps) Unlinked app for team
6955 AppUnlinkTeam json.RawMessage `json:"app_unlink_team,omitempty"`
6956 // AppUnlinkUser : (apps) Unlinked app for member
6957 AppUnlinkUser json.RawMessage `json:"app_unlink_user,omitempty"`
6958 // FileAddComment : (comments) Added file comment
6959 FileAddComment json.RawMessage `json:"file_add_comment,omitempty"`
6960 // FileChangeCommentSubscription : (comments) Subscribed to or
6961 // unsubscribed from comment notifications for file
6962 FileChangeCommentSubscription json.RawMessage `json:"file_change_comment_subscription,omitempty"`
6963 // FileDeleteComment : (comments) Deleted file comment
6964 FileDeleteComment json.RawMessage `json:"file_delete_comment,omitempty"`
6965 // FileEditComment : (comments) Edited file comment
6966 FileEditComment json.RawMessage `json:"file_edit_comment,omitempty"`
6967 // FileLikeComment : (comments) Liked file comment (deprecated, no
6968 // longer logged)
6969 FileLikeComment json.RawMessage `json:"file_like_comment,omitempty"`
6970 // FileResolveComment : (comments) Resolved file comment
6971 FileResolveComment json.RawMessage `json:"file_resolve_comment,omitempty"`
6972 // FileUnlikeComment : (comments) Unliked file comment (deprecated, no
6973 // longer logged)
6974 FileUnlikeComment json.RawMessage `json:"file_unlike_comment,omitempty"`
6975 // FileUnresolveComment : (comments) Unresolved file comment
6976 FileUnresolveComment json.RawMessage `json:"file_unresolve_comment,omitempty"`
6977 // DeviceChangeIpDesktop : (devices) Changed IP address associated with
6978 // active desktop session
6979 DeviceChangeIpDesktop json.RawMessage `json:"device_change_ip_desktop,omitempty"`
6980 // DeviceChangeIpMobile : (devices) Changed IP address associated with
6981 // active mobile session
6982 DeviceChangeIpMobile json.RawMessage `json:"device_change_ip_mobile,omitempty"`
6983 // DeviceChangeIpWeb : (devices) Changed IP address associated with
6984 // active web session
6985 DeviceChangeIpWeb json.RawMessage `json:"device_change_ip_web,omitempty"`
6986 // DeviceDeleteOnUnlinkFail : (devices) Failed to delete all files from
6987 // unlinked device
6988 DeviceDeleteOnUnlinkFail json.RawMessage `json:"device_delete_on_unlink_fail,omitempty"`
6989 // DeviceDeleteOnUnlinkSuccess : (devices) Deleted all files from
6990 // unlinked device
6991 DeviceDeleteOnUnlinkSuccess json.RawMessage `json:"device_delete_on_unlink_success,omitempty"`
6992 // DeviceLinkFail : (devices) Failed to link device
6993 DeviceLinkFail json.RawMessage `json:"device_link_fail,omitempty"`
6994 // DeviceLinkSuccess : (devices) Linked device
6995 DeviceLinkSuccess json.RawMessage `json:"device_link_success,omitempty"`
6996 // DeviceManagementDisabled : (devices) Disabled device management
6997 // (deprecated, no longer logged)
6998 DeviceManagementDisabled json.RawMessage `json:"device_management_disabled,omitempty"`
6999 // DeviceManagementEnabled : (devices) Enabled device management
7000 // (deprecated, no longer logged)
7001 DeviceManagementEnabled json.RawMessage `json:"device_management_enabled,omitempty"`
7002 // DeviceUnlink : (devices) Disconnected device
7003 DeviceUnlink json.RawMessage `json:"device_unlink,omitempty"`
7004 // EmmRefreshAuthToken : (devices) Refreshed auth token used for setting
7005 // up enterprise mobility management
7006 EmmRefreshAuthToken json.RawMessage `json:"emm_refresh_auth_token,omitempty"`
7007 // AccountCaptureChangeAvailability : (domains) Granted/revoked option
7008 // to enable account capture on team domains
7009 AccountCaptureChangeAvailability json.RawMessage `json:"account_capture_change_availability,omitempty"`
7010 // AccountCaptureMigrateAccount : (domains) Account-captured user
7011 // migrated account to team
7012 AccountCaptureMigrateAccount json.RawMessage `json:"account_capture_migrate_account,omitempty"`
7013 // AccountCaptureNotificationEmailsSent : (domains) Sent proactive
7014 // account capture email to all unmanaged members
7015 AccountCaptureNotificationEmailsSent json.RawMessage `json:"account_capture_notification_emails_sent,omitempty"`
7016 // AccountCaptureRelinquishAccount : (domains) Account-captured user
7017 // changed account email to personal email
7018 AccountCaptureRelinquishAccount json.RawMessage `json:"account_capture_relinquish_account,omitempty"`
7019 // DisabledDomainInvites : (domains) Disabled domain invites
7020 // (deprecated, no longer logged)
7021 DisabledDomainInvites json.RawMessage `json:"disabled_domain_invites,omitempty"`
7022 // DomainInvitesApproveRequestToJoinTeam : (domains) Approved user's
7023 // request to join team
7024 DomainInvitesApproveRequestToJoinTeam json.RawMessage `json:"domain_invites_approve_request_to_join_team,omitempty"`
7025 // DomainInvitesDeclineRequestToJoinTeam : (domains) Declined user's
7026 // request to join team
7027 DomainInvitesDeclineRequestToJoinTeam json.RawMessage `json:"domain_invites_decline_request_to_join_team,omitempty"`
7028 // DomainInvitesEmailExistingUsers : (domains) Sent domain invites to
7029 // existing domain accounts (deprecated, no longer logged)
7030 DomainInvitesEmailExistingUsers json.RawMessage `json:"domain_invites_email_existing_users,omitempty"`
7031 // DomainInvitesRequestToJoinTeam : (domains) Requested to join team
7032 DomainInvitesRequestToJoinTeam json.RawMessage `json:"domain_invites_request_to_join_team,omitempty"`
7033 // DomainInvitesSetInviteNewUserPrefToNo : (domains) Disabled
7034 // "Automatically invite new users" (deprecated, no longer logged)
7035 DomainInvitesSetInviteNewUserPrefToNo json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_no,omitempty"`
7036 // DomainInvitesSetInviteNewUserPrefToYes : (domains) Enabled
7037 // "Automatically invite new users" (deprecated, no longer logged)
7038 DomainInvitesSetInviteNewUserPrefToYes json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_yes,omitempty"`
7039 // DomainVerificationAddDomainFail : (domains) Failed to verify team
7040 // domain
7041 DomainVerificationAddDomainFail json.RawMessage `json:"domain_verification_add_domain_fail,omitempty"`
7042 // DomainVerificationAddDomainSuccess : (domains) Verified team domain
7043 DomainVerificationAddDomainSuccess json.RawMessage `json:"domain_verification_add_domain_success,omitempty"`
7044 // DomainVerificationRemoveDomain : (domains) Removed domain from list
7045 // of verified team domains
7046 DomainVerificationRemoveDomain json.RawMessage `json:"domain_verification_remove_domain,omitempty"`
7047 // EnabledDomainInvites : (domains) Enabled domain invites (deprecated,
7048 // no longer logged)
7049 EnabledDomainInvites json.RawMessage `json:"enabled_domain_invites,omitempty"`
7050 // CreateFolder : (file_operations) Created folders (deprecated, no
7051 // longer logged)
7052 CreateFolder json.RawMessage `json:"create_folder,omitempty"`
7053 // FileAdd : (file_operations) Added files and/or folders
7054 FileAdd json.RawMessage `json:"file_add,omitempty"`
7055 // FileCopy : (file_operations) Copied files and/or folders
7056 FileCopy json.RawMessage `json:"file_copy,omitempty"`
7057 // FileDelete : (file_operations) Deleted files and/or folders
7058 FileDelete json.RawMessage `json:"file_delete,omitempty"`
7059 // FileDownload : (file_operations) Downloaded files and/or folders
7060 FileDownload json.RawMessage `json:"file_download,omitempty"`
7061 // FileEdit : (file_operations) Edited files
7062 FileEdit json.RawMessage `json:"file_edit,omitempty"`
7063 // FileGetCopyReference : (file_operations) Created copy reference to
7064 // file/folder
7065 FileGetCopyReference json.RawMessage `json:"file_get_copy_reference,omitempty"`
7066 // FileMove : (file_operations) Moved files and/or folders
7067 FileMove json.RawMessage `json:"file_move,omitempty"`
7068 // FilePermanentlyDelete : (file_operations) Permanently deleted files
7069 // and/or folders
7070 FilePermanentlyDelete json.RawMessage `json:"file_permanently_delete,omitempty"`
7071 // FilePreview : (file_operations) Previewed files and/or folders
7072 FilePreview json.RawMessage `json:"file_preview,omitempty"`
7073 // FileRename : (file_operations) Renamed files and/or folders
7074 FileRename json.RawMessage `json:"file_rename,omitempty"`
7075 // FileRestore : (file_operations) Restored deleted files and/or folders
7076 FileRestore json.RawMessage `json:"file_restore,omitempty"`
7077 // FileRevert : (file_operations) Reverted files to previous version
7078 FileRevert json.RawMessage `json:"file_revert,omitempty"`
7079 // FileRollbackChanges : (file_operations) Rolled back file actions
7080 FileRollbackChanges json.RawMessage `json:"file_rollback_changes,omitempty"`
7081 // FileSaveCopyReference : (file_operations) Saved file/folder using
7082 // copy reference
7083 FileSaveCopyReference json.RawMessage `json:"file_save_copy_reference,omitempty"`
7084 // FileRequestChange : (file_requests) Changed file request
7085 FileRequestChange json.RawMessage `json:"file_request_change,omitempty"`
7086 // FileRequestClose : (file_requests) Closed file request
7087 FileRequestClose json.RawMessage `json:"file_request_close,omitempty"`
7088 // FileRequestCreate : (file_requests) Created file request
7089 FileRequestCreate json.RawMessage `json:"file_request_create,omitempty"`
7090 // FileRequestReceiveFile : (file_requests) Received files for file
7091 // request
7092 FileRequestReceiveFile json.RawMessage `json:"file_request_receive_file,omitempty"`
7093 // GroupAddExternalId : (groups) Added external ID for group
7094 GroupAddExternalId json.RawMessage `json:"group_add_external_id,omitempty"`
7095 // GroupAddMember : (groups) Added team members to group
7096 GroupAddMember json.RawMessage `json:"group_add_member,omitempty"`
7097 // GroupChangeExternalId : (groups) Changed external ID for group
7098 GroupChangeExternalId json.RawMessage `json:"group_change_external_id,omitempty"`
7099 // GroupChangeManagementType : (groups) Changed group management type
7100 GroupChangeManagementType json.RawMessage `json:"group_change_management_type,omitempty"`
7101 // GroupChangeMemberRole : (groups) Changed manager permissions of group
7102 // member
7103 GroupChangeMemberRole json.RawMessage `json:"group_change_member_role,omitempty"`
7104 // GroupCreate : (groups) Created group
7105 GroupCreate json.RawMessage `json:"group_create,omitempty"`
7106 // GroupDelete : (groups) Deleted group
7107 GroupDelete json.RawMessage `json:"group_delete,omitempty"`
7108 // GroupDescriptionUpdated : (groups) Updated group (deprecated, no
7109 // longer logged)
7110 GroupDescriptionUpdated json.RawMessage `json:"group_description_updated,omitempty"`
7111 // GroupJoinPolicyUpdated : (groups) Updated group join policy
7112 // (deprecated, no longer logged)
7113 GroupJoinPolicyUpdated json.RawMessage `json:"group_join_policy_updated,omitempty"`
7114 // GroupMoved : (groups) Moved group (deprecated, no longer logged)
7115 GroupMoved json.RawMessage `json:"group_moved,omitempty"`
7116 // GroupRemoveExternalId : (groups) Removed external ID for group
7117 GroupRemoveExternalId json.RawMessage `json:"group_remove_external_id,omitempty"`
7118 // GroupRemoveMember : (groups) Removed team members from group
7119 GroupRemoveMember json.RawMessage `json:"group_remove_member,omitempty"`
7120 // GroupRename : (groups) Renamed group
7121 GroupRename json.RawMessage `json:"group_rename,omitempty"`
7122 // EmmError : (logins) Failed to sign in via EMM (deprecated, replaced
7123 // by 'Failed to sign in')
7124 EmmError json.RawMessage `json:"emm_error,omitempty"`
7125 // LoginFail : (logins) Failed to sign in
7126 LoginFail json.RawMessage `json:"login_fail,omitempty"`
7127 // LoginSuccess : (logins) Signed in
7128 LoginSuccess json.RawMessage `json:"login_success,omitempty"`
7129 // Logout : (logins) Signed out
7130 Logout json.RawMessage `json:"logout,omitempty"`
7131 // ResellerSupportSessionEnd : (logins) Ended reseller support session
7132 ResellerSupportSessionEnd json.RawMessage `json:"reseller_support_session_end,omitempty"`
7133 // ResellerSupportSessionStart : (logins) Started reseller support
7134 // session
7135 ResellerSupportSessionStart json.RawMessage `json:"reseller_support_session_start,omitempty"`
7136 // SignInAsSessionEnd : (logins) Ended admin sign-in-as session
7137 SignInAsSessionEnd json.RawMessage `json:"sign_in_as_session_end,omitempty"`
7138 // SignInAsSessionStart : (logins) Started admin sign-in-as session
7139 SignInAsSessionStart json.RawMessage `json:"sign_in_as_session_start,omitempty"`
7140 // SsoError : (logins) Failed to sign in via SSO (deprecated, replaced
7141 // by 'Failed to sign in')
7142 SsoError json.RawMessage `json:"sso_error,omitempty"`
7143 // MemberAddName : (members) Added team member name
7144 MemberAddName json.RawMessage `json:"member_add_name,omitempty"`
7145 // MemberChangeAdminRole : (members) Changed team member admin role
7146 MemberChangeAdminRole json.RawMessage `json:"member_change_admin_role,omitempty"`
7147 // MemberChangeEmail : (members) Changed team member email
7148 MemberChangeEmail json.RawMessage `json:"member_change_email,omitempty"`
7149 // MemberChangeMembershipType : (members) Changed membership type
7150 // (limited/full) of member (deprecated, no longer logged)
7151 MemberChangeMembershipType json.RawMessage `json:"member_change_membership_type,omitempty"`
7152 // MemberChangeName : (members) Changed team member name
7153 MemberChangeName json.RawMessage `json:"member_change_name,omitempty"`
7154 // MemberChangeStatus : (members) Changed member status (invited,
7155 // joined, suspended, etc.)
7156 MemberChangeStatus json.RawMessage `json:"member_change_status,omitempty"`
7157 // MemberDeleteManualContacts : (members) Cleared manually added
7158 // contacts
7159 MemberDeleteManualContacts json.RawMessage `json:"member_delete_manual_contacts,omitempty"`
7160 // MemberPermanentlyDeleteAccountContents : (members) Permanently
7161 // deleted contents of deleted team member account
7162 MemberPermanentlyDeleteAccountContents json.RawMessage `json:"member_permanently_delete_account_contents,omitempty"`
7163 // MemberSpaceLimitsAddCustomQuota : (members) Set custom member space
7164 // limit
7165 MemberSpaceLimitsAddCustomQuota json.RawMessage `json:"member_space_limits_add_custom_quota,omitempty"`
7166 // MemberSpaceLimitsChangeCustomQuota : (members) Changed custom member
7167 // space limit
7168 MemberSpaceLimitsChangeCustomQuota json.RawMessage `json:"member_space_limits_change_custom_quota,omitempty"`
7169 // MemberSpaceLimitsChangeStatus : (members) Changed space limit status
7170 MemberSpaceLimitsChangeStatus json.RawMessage `json:"member_space_limits_change_status,omitempty"`
7171 // MemberSpaceLimitsRemoveCustomQuota : (members) Removed custom member
7172 // space limit
7173 MemberSpaceLimitsRemoveCustomQuota json.RawMessage `json:"member_space_limits_remove_custom_quota,omitempty"`
7174 // MemberSuggest : (members) Suggested person to add to team
7175 MemberSuggest json.RawMessage `json:"member_suggest,omitempty"`
7176 // MemberTransferAccountContents : (members) Transferred contents of
7177 // deleted member account to another member
7178 MemberTransferAccountContents json.RawMessage `json:"member_transfer_account_contents,omitempty"`
7179 // SecondaryMailsPolicyChanged : (members) Secondary mails policy
7180 // changed
7181 SecondaryMailsPolicyChanged json.RawMessage `json:"secondary_mails_policy_changed,omitempty"`
7182 // PaperContentAddMember : (paper) Added team member to Paper doc/folder
7183 PaperContentAddMember json.RawMessage `json:"paper_content_add_member,omitempty"`
7184 // PaperContentAddToFolder : (paper) Added Paper doc/folder to folder
7185 PaperContentAddToFolder json.RawMessage `json:"paper_content_add_to_folder,omitempty"`
7186 // PaperContentArchive : (paper) Archived Paper doc/folder
7187 PaperContentArchive json.RawMessage `json:"paper_content_archive,omitempty"`
7188 // PaperContentCreate : (paper) Created Paper doc/folder
7189 PaperContentCreate json.RawMessage `json:"paper_content_create,omitempty"`
7190 // PaperContentPermanentlyDelete : (paper) Permanently deleted Paper
7191 // doc/folder
7192 PaperContentPermanentlyDelete json.RawMessage `json:"paper_content_permanently_delete,omitempty"`
7193 // PaperContentRemoveFromFolder : (paper) Removed Paper doc/folder from
7194 // folder
7195 PaperContentRemoveFromFolder json.RawMessage `json:"paper_content_remove_from_folder,omitempty"`
7196 // PaperContentRemoveMember : (paper) Removed team member from Paper
7197 // doc/folder
7198 PaperContentRemoveMember json.RawMessage `json:"paper_content_remove_member,omitempty"`
7199 // PaperContentRename : (paper) Renamed Paper doc/folder
7200 PaperContentRename json.RawMessage `json:"paper_content_rename,omitempty"`
7201 // PaperContentRestore : (paper) Restored archived Paper doc/folder
7202 PaperContentRestore json.RawMessage `json:"paper_content_restore,omitempty"`
7203 // PaperDocAddComment : (paper) Added Paper doc comment
7204 PaperDocAddComment json.RawMessage `json:"paper_doc_add_comment,omitempty"`
7205 // PaperDocChangeMemberRole : (paper) Changed team member permissions
7206 // for Paper doc
7207 PaperDocChangeMemberRole json.RawMessage `json:"paper_doc_change_member_role,omitempty"`
7208 // PaperDocChangeSharingPolicy : (paper) Changed sharing setting for
7209 // Paper doc
7210 PaperDocChangeSharingPolicy json.RawMessage `json:"paper_doc_change_sharing_policy,omitempty"`
7211 // PaperDocChangeSubscription : (paper) Followed/unfollowed Paper doc
7212 PaperDocChangeSubscription json.RawMessage `json:"paper_doc_change_subscription,omitempty"`
7213 // PaperDocDeleted : (paper) Archived Paper doc (deprecated, no longer
7214 // logged)
7215 PaperDocDeleted json.RawMessage `json:"paper_doc_deleted,omitempty"`
7216 // PaperDocDeleteComment : (paper) Deleted Paper doc comment
7217 PaperDocDeleteComment json.RawMessage `json:"paper_doc_delete_comment,omitempty"`
7218 // PaperDocDownload : (paper) Downloaded Paper doc in specific format
7219 PaperDocDownload json.RawMessage `json:"paper_doc_download,omitempty"`
7220 // PaperDocEdit : (paper) Edited Paper doc
7221 PaperDocEdit json.RawMessage `json:"paper_doc_edit,omitempty"`
7222 // PaperDocEditComment : (paper) Edited Paper doc comment
7223 PaperDocEditComment json.RawMessage `json:"paper_doc_edit_comment,omitempty"`
7224 // PaperDocFollowed : (paper) Followed Paper doc (deprecated, replaced
7225 // by 'Followed/unfollowed Paper doc')
7226 PaperDocFollowed json.RawMessage `json:"paper_doc_followed,omitempty"`
7227 // PaperDocMention : (paper) Mentioned team member in Paper doc
7228 PaperDocMention json.RawMessage `json:"paper_doc_mention,omitempty"`
7229 // PaperDocOwnershipChanged : (paper) Transferred ownership of Paper doc
7230 PaperDocOwnershipChanged json.RawMessage `json:"paper_doc_ownership_changed,omitempty"`
7231 // PaperDocRequestAccess : (paper) Requested access to Paper doc
7232 PaperDocRequestAccess json.RawMessage `json:"paper_doc_request_access,omitempty"`
7233 // PaperDocResolveComment : (paper) Resolved Paper doc comment
7234 PaperDocResolveComment json.RawMessage `json:"paper_doc_resolve_comment,omitempty"`
7235 // PaperDocRevert : (paper) Restored Paper doc to previous version
7236 PaperDocRevert json.RawMessage `json:"paper_doc_revert,omitempty"`
7237 // PaperDocSlackShare : (paper) Shared Paper doc via Slack
7238 PaperDocSlackShare json.RawMessage `json:"paper_doc_slack_share,omitempty"`
7239 // PaperDocTeamInvite : (paper) Shared Paper doc with team member
7240 // (deprecated, no longer logged)
7241 PaperDocTeamInvite json.RawMessage `json:"paper_doc_team_invite,omitempty"`
7242 // PaperDocTrashed : (paper) Deleted Paper doc
7243 PaperDocTrashed json.RawMessage `json:"paper_doc_trashed,omitempty"`
7244 // PaperDocUnresolveComment : (paper) Unresolved Paper doc comment
7245 PaperDocUnresolveComment json.RawMessage `json:"paper_doc_unresolve_comment,omitempty"`
7246 // PaperDocUntrashed : (paper) Restored Paper doc
7247 PaperDocUntrashed json.RawMessage `json:"paper_doc_untrashed,omitempty"`
7248 // PaperDocView : (paper) Viewed Paper doc
7249 PaperDocView json.RawMessage `json:"paper_doc_view,omitempty"`
7250 // PaperExternalViewAllow : (paper) Changed Paper external sharing
7251 // setting to anyone (deprecated, no longer logged)
7252 PaperExternalViewAllow json.RawMessage `json:"paper_external_view_allow,omitempty"`
7253 // PaperExternalViewDefaultTeam : (paper) Changed Paper external sharing
7254 // setting to default team (deprecated, no longer logged)
7255 PaperExternalViewDefaultTeam json.RawMessage `json:"paper_external_view_default_team,omitempty"`
7256 // PaperExternalViewForbid : (paper) Changed Paper external sharing
7257 // setting to team-only (deprecated, no longer logged)
7258 PaperExternalViewForbid json.RawMessage `json:"paper_external_view_forbid,omitempty"`
7259 // PaperFolderChangeSubscription : (paper) Followed/unfollowed Paper
7260 // folder
7261 PaperFolderChangeSubscription json.RawMessage `json:"paper_folder_change_subscription,omitempty"`
7262 // PaperFolderDeleted : (paper) Archived Paper folder (deprecated, no
7263 // longer logged)
7264 PaperFolderDeleted json.RawMessage `json:"paper_folder_deleted,omitempty"`
7265 // PaperFolderFollowed : (paper) Followed Paper folder (deprecated,
7266 // replaced by 'Followed/unfollowed Paper folder')
7267 PaperFolderFollowed json.RawMessage `json:"paper_folder_followed,omitempty"`
7268 // PaperFolderTeamInvite : (paper) Shared Paper folder with member
7269 // (deprecated, no longer logged)
7270 PaperFolderTeamInvite json.RawMessage `json:"paper_folder_team_invite,omitempty"`
7271 // PasswordChange : (passwords) Changed password
7272 PasswordChange json.RawMessage `json:"password_change,omitempty"`
7273 // PasswordReset : (passwords) Reset password
7274 PasswordReset json.RawMessage `json:"password_reset,omitempty"`
7275 // PasswordResetAll : (passwords) Reset all team member passwords
7276 PasswordResetAll json.RawMessage `json:"password_reset_all,omitempty"`
7277 // EmmCreateExceptionsReport : (reports) Created EMM-excluded users
7278 // report
7279 EmmCreateExceptionsReport json.RawMessage `json:"emm_create_exceptions_report,omitempty"`
7280 // EmmCreateUsageReport : (reports) Created EMM mobile app usage report
7281 EmmCreateUsageReport json.RawMessage `json:"emm_create_usage_report,omitempty"`
7282 // ExportMembersReport : (reports) Created member data report
7283 ExportMembersReport json.RawMessage `json:"export_members_report,omitempty"`
7284 // PaperAdminExportStart : (reports) Exported all team Paper docs
7285 PaperAdminExportStart json.RawMessage `json:"paper_admin_export_start,omitempty"`
7286 // SmartSyncCreateAdminPrivilegeReport : (reports) Created Smart Sync
7287 // non-admin devices report
7288 SmartSyncCreateAdminPrivilegeReport json.RawMessage `json:"smart_sync_create_admin_privilege_report,omitempty"`
7289 // TeamActivityCreateReport : (reports) Created team activity report
7290 TeamActivityCreateReport json.RawMessage `json:"team_activity_create_report,omitempty"`
7291 // CollectionShare : (sharing) Shared album
7292 CollectionShare json.RawMessage `json:"collection_share,omitempty"`
7293 // NoteAclInviteOnly : (sharing) Changed Paper doc to invite-only
7294 // (deprecated, no longer logged)
7295 NoteAclInviteOnly json.RawMessage `json:"note_acl_invite_only,omitempty"`
7296 // NoteAclLink : (sharing) Changed Paper doc to link-accessible
7297 // (deprecated, no longer logged)
7298 NoteAclLink json.RawMessage `json:"note_acl_link,omitempty"`
7299 // NoteAclTeamLink : (sharing) Changed Paper doc to link-accessible for
7300 // team (deprecated, no longer logged)
7301 NoteAclTeamLink json.RawMessage `json:"note_acl_team_link,omitempty"`
7302 // NoteShared : (sharing) Shared Paper doc (deprecated, no longer
7303 // logged)
7304 NoteShared json.RawMessage `json:"note_shared,omitempty"`
7305 // NoteShareReceive : (sharing) Shared received Paper doc (deprecated,
7306 // no longer logged)
7307 NoteShareReceive json.RawMessage `json:"note_share_receive,omitempty"`
7308 // OpenNoteShared : (sharing) Opened shared Paper doc (deprecated, no
7309 // longer logged)
7310 OpenNoteShared json.RawMessage `json:"open_note_shared,omitempty"`
7311 // SfAddGroup : (sharing) Added team to shared folder (deprecated, no
7312 // longer logged)
7313 SfAddGroup json.RawMessage `json:"sf_add_group,omitempty"`
7314 // SfAllowNonMembersToViewSharedLinks : (sharing) Allowed
7315 // non-collaborators to view links to files in shared folder
7316 // (deprecated, no longer logged)
7317 SfAllowNonMembersToViewSharedLinks json.RawMessage `json:"sf_allow_non_members_to_view_shared_links,omitempty"`
7318 // SfExternalInviteWarn : (sharing) Set team members to see warning
7319 // before sharing folders outside team (deprecated, no longer logged)
7320 SfExternalInviteWarn json.RawMessage `json:"sf_external_invite_warn,omitempty"`
7321 // SfFbInvite : (sharing) Invited Facebook users to shared folder
7322 // (deprecated, no longer logged)
7323 SfFbInvite json.RawMessage `json:"sf_fb_invite,omitempty"`
7324 // SfFbInviteChangeRole : (sharing) Changed Facebook user's role in
7325 // shared folder (deprecated, no longer logged)
7326 SfFbInviteChangeRole json.RawMessage `json:"sf_fb_invite_change_role,omitempty"`
7327 // SfFbUninvite : (sharing) Uninvited Facebook user from shared folder
7328 // (deprecated, no longer logged)
7329 SfFbUninvite json.RawMessage `json:"sf_fb_uninvite,omitempty"`
7330 // SfInviteGroup : (sharing) Invited group to shared folder (deprecated,
7331 // no longer logged)
7332 SfInviteGroup json.RawMessage `json:"sf_invite_group,omitempty"`
7333 // SfTeamGrantAccess : (sharing) Granted access to shared folder
7334 // (deprecated, no longer logged)
7335 SfTeamGrantAccess json.RawMessage `json:"sf_team_grant_access,omitempty"`
7336 // SfTeamInvite : (sharing) Invited team members to shared folder
7337 // (deprecated, replaced by 'Invited user to Dropbox and added them to
7338 // shared file/folder')
7339 SfTeamInvite json.RawMessage `json:"sf_team_invite,omitempty"`
7340 // SfTeamInviteChangeRole : (sharing) Changed team member's role in
7341 // shared folder (deprecated, no longer logged)
7342 SfTeamInviteChangeRole json.RawMessage `json:"sf_team_invite_change_role,omitempty"`
7343 // SfTeamJoin : (sharing) Joined team member's shared folder
7344 // (deprecated, no longer logged)
7345 SfTeamJoin json.RawMessage `json:"sf_team_join,omitempty"`
7346 // SfTeamJoinFromOobLink : (sharing) Joined team member's shared folder
7347 // from link (deprecated, no longer logged)
7348 SfTeamJoinFromOobLink json.RawMessage `json:"sf_team_join_from_oob_link,omitempty"`
7349 // SfTeamUninvite : (sharing) Unshared folder with team member
7350 // (deprecated, replaced by 'Removed invitee from shared file/folder
7351 // before invite was accepted')
7352 SfTeamUninvite json.RawMessage `json:"sf_team_uninvite,omitempty"`
7353 // SharedContentAddInvitees : (sharing) Invited user to Dropbox and
7354 // added them to shared file/folder
7355 SharedContentAddInvitees json.RawMessage `json:"shared_content_add_invitees,omitempty"`
7356 // SharedContentAddLinkExpiry : (sharing) Added expiration date to link
7357 // for shared file/folder
7358 SharedContentAddLinkExpiry json.RawMessage `json:"shared_content_add_link_expiry,omitempty"`
7359 // SharedContentAddLinkPassword : (sharing) Added password to link for
7360 // shared file/folder
7361 SharedContentAddLinkPassword json.RawMessage `json:"shared_content_add_link_password,omitempty"`
7362 // SharedContentAddMember : (sharing) Added users and/or groups to
7363 // shared file/folder
7364 SharedContentAddMember json.RawMessage `json:"shared_content_add_member,omitempty"`
7365 // SharedContentChangeDownloadsPolicy : (sharing) Changed whether
7366 // members can download shared file/folder
7367 SharedContentChangeDownloadsPolicy json.RawMessage `json:"shared_content_change_downloads_policy,omitempty"`
7368 // SharedContentChangeInviteeRole : (sharing) Changed access type of
7369 // invitee to shared file/folder before invite was accepted
7370 SharedContentChangeInviteeRole json.RawMessage `json:"shared_content_change_invitee_role,omitempty"`
7371 // SharedContentChangeLinkAudience : (sharing) Changed link audience of
7372 // shared file/folder
7373 SharedContentChangeLinkAudience json.RawMessage `json:"shared_content_change_link_audience,omitempty"`
7374 // SharedContentChangeLinkExpiry : (sharing) Changed link expiration of
7375 // shared file/folder
7376 SharedContentChangeLinkExpiry json.RawMessage `json:"shared_content_change_link_expiry,omitempty"`
7377 // SharedContentChangeLinkPassword : (sharing) Changed link password of
7378 // shared file/folder
7379 SharedContentChangeLinkPassword json.RawMessage `json:"shared_content_change_link_password,omitempty"`
7380 // SharedContentChangeMemberRole : (sharing) Changed access type of
7381 // shared file/folder member
7382 SharedContentChangeMemberRole json.RawMessage `json:"shared_content_change_member_role,omitempty"`
7383 // SharedContentChangeViewerInfoPolicy : (sharing) Changed whether
7384 // members can see who viewed shared file/folder
7385 SharedContentChangeViewerInfoPolicy json.RawMessage `json:"shared_content_change_viewer_info_policy,omitempty"`
7386 // SharedContentClaimInvitation : (sharing) Acquired membership of
7387 // shared file/folder by accepting invite
7388 SharedContentClaimInvitation json.RawMessage `json:"shared_content_claim_invitation,omitempty"`
7389 // SharedContentCopy : (sharing) Copied shared file/folder to own
7390 // Dropbox
7391 SharedContentCopy json.RawMessage `json:"shared_content_copy,omitempty"`
7392 // SharedContentDownload : (sharing) Downloaded shared file/folder
7393 SharedContentDownload json.RawMessage `json:"shared_content_download,omitempty"`
7394 // SharedContentRelinquishMembership : (sharing) Left shared file/folder
7395 SharedContentRelinquishMembership json.RawMessage `json:"shared_content_relinquish_membership,omitempty"`
7396 // SharedContentRemoveInvitees : (sharing) Removed invitee from shared
7397 // file/folder before invite was accepted
7398 SharedContentRemoveInvitees json.RawMessage `json:"shared_content_remove_invitees,omitempty"`
7399 // SharedContentRemoveLinkExpiry : (sharing) Removed link expiration
7400 // date of shared file/folder
7401 SharedContentRemoveLinkExpiry json.RawMessage `json:"shared_content_remove_link_expiry,omitempty"`
7402 // SharedContentRemoveLinkPassword : (sharing) Removed link password of
7403 // shared file/folder
7404 SharedContentRemoveLinkPassword json.RawMessage `json:"shared_content_remove_link_password,omitempty"`
7405 // SharedContentRemoveMember : (sharing) Removed user/group from shared
7406 // file/folder
7407 SharedContentRemoveMember json.RawMessage `json:"shared_content_remove_member,omitempty"`
7408 // SharedContentRequestAccess : (sharing) Requested access to shared
7409 // file/folder
7410 SharedContentRequestAccess json.RawMessage `json:"shared_content_request_access,omitempty"`
7411 // SharedContentUnshare : (sharing) Unshared file/folder by clearing
7412 // membership and turning off link
7413 SharedContentUnshare json.RawMessage `json:"shared_content_unshare,omitempty"`
7414 // SharedContentView : (sharing) Previewed shared file/folder
7415 SharedContentView json.RawMessage `json:"shared_content_view,omitempty"`
7416 // SharedFolderChangeLinkPolicy : (sharing) Changed who can access
7417 // shared folder via link
7418 SharedFolderChangeLinkPolicy json.RawMessage `json:"shared_folder_change_link_policy,omitempty"`
7419 // SharedFolderChangeMembersInheritancePolicy : (sharing) Changed
7420 // whether shared folder inherits members from parent folder
7421 SharedFolderChangeMembersInheritancePolicy json.RawMessage `json:"shared_folder_change_members_inheritance_policy,omitempty"`
7422 // SharedFolderChangeMembersManagementPolicy : (sharing) Changed who can
7423 // add/remove members of shared folder
7424 SharedFolderChangeMembersManagementPolicy json.RawMessage `json:"shared_folder_change_members_management_policy,omitempty"`
7425 // SharedFolderChangeMembersPolicy : (sharing) Changed who can become
7426 // member of shared folder
7427 SharedFolderChangeMembersPolicy json.RawMessage `json:"shared_folder_change_members_policy,omitempty"`
7428 // SharedFolderCreate : (sharing) Created shared folder
7429 SharedFolderCreate json.RawMessage `json:"shared_folder_create,omitempty"`
7430 // SharedFolderDeclineInvitation : (sharing) Declined team member's
7431 // invite to shared folder
7432 SharedFolderDeclineInvitation json.RawMessage `json:"shared_folder_decline_invitation,omitempty"`
7433 // SharedFolderMount : (sharing) Added shared folder to own Dropbox
7434 SharedFolderMount json.RawMessage `json:"shared_folder_mount,omitempty"`
7435 // SharedFolderNest : (sharing) Changed parent of shared folder
7436 SharedFolderNest json.RawMessage `json:"shared_folder_nest,omitempty"`
7437 // SharedFolderTransferOwnership : (sharing) Transferred ownership of
7438 // shared folder to another member
7439 SharedFolderTransferOwnership json.RawMessage `json:"shared_folder_transfer_ownership,omitempty"`
7440 // SharedFolderUnmount : (sharing) Deleted shared folder from Dropbox
7441 SharedFolderUnmount json.RawMessage `json:"shared_folder_unmount,omitempty"`
7442 // SharedLinkAddExpiry : (sharing) Added shared link expiration date
7443 SharedLinkAddExpiry json.RawMessage `json:"shared_link_add_expiry,omitempty"`
7444 // SharedLinkChangeExpiry : (sharing) Changed shared link expiration
7445 // date
7446 SharedLinkChangeExpiry json.RawMessage `json:"shared_link_change_expiry,omitempty"`
7447 // SharedLinkChangeVisibility : (sharing) Changed visibility of shared
7448 // link
7449 SharedLinkChangeVisibility json.RawMessage `json:"shared_link_change_visibility,omitempty"`
7450 // SharedLinkCopy : (sharing) Added file/folder to Dropbox from shared
7451 // link
7452 SharedLinkCopy json.RawMessage `json:"shared_link_copy,omitempty"`
7453 // SharedLinkCreate : (sharing) Created shared link
7454 SharedLinkCreate json.RawMessage `json:"shared_link_create,omitempty"`
7455 // SharedLinkDisable : (sharing) Removed shared link
7456 SharedLinkDisable json.RawMessage `json:"shared_link_disable,omitempty"`
7457 // SharedLinkDownload : (sharing) Downloaded file/folder from shared
7458 // link
7459 SharedLinkDownload json.RawMessage `json:"shared_link_download,omitempty"`
7460 // SharedLinkRemoveExpiry : (sharing) Removed shared link expiration
7461 // date
7462 SharedLinkRemoveExpiry json.RawMessage `json:"shared_link_remove_expiry,omitempty"`
7463 // SharedLinkShare : (sharing) Added members as audience of shared link
7464 SharedLinkShare json.RawMessage `json:"shared_link_share,omitempty"`
7465 // SharedLinkView : (sharing) Opened shared link
7466 SharedLinkView json.RawMessage `json:"shared_link_view,omitempty"`
7467 // SharedNoteOpened : (sharing) Opened shared Paper doc (deprecated, no
7468 // longer logged)
7469 SharedNoteOpened json.RawMessage `json:"shared_note_opened,omitempty"`
7470 // ShmodelGroupShare : (sharing) Shared link with group (deprecated, no
7471 // longer logged)
7472 ShmodelGroupShare json.RawMessage `json:"shmodel_group_share,omitempty"`
7473 // ShowcaseAccessGranted : (showcase) Granted access to showcase
7474 ShowcaseAccessGranted json.RawMessage `json:"showcase_access_granted,omitempty"`
7475 // ShowcaseAddMember : (showcase) Added member to showcase
7476 ShowcaseAddMember json.RawMessage `json:"showcase_add_member,omitempty"`
7477 // ShowcaseArchived : (showcase) Archived showcase
7478 ShowcaseArchived json.RawMessage `json:"showcase_archived,omitempty"`
7479 // ShowcaseCreated : (showcase) Created showcase
7480 ShowcaseCreated json.RawMessage `json:"showcase_created,omitempty"`
7481 // ShowcaseDeleteComment : (showcase) Deleted showcase comment
7482 ShowcaseDeleteComment json.RawMessage `json:"showcase_delete_comment,omitempty"`
7483 // ShowcaseEdited : (showcase) Edited showcase
7484 ShowcaseEdited json.RawMessage `json:"showcase_edited,omitempty"`
7485 // ShowcaseEditComment : (showcase) Edited showcase comment
7486 ShowcaseEditComment json.RawMessage `json:"showcase_edit_comment,omitempty"`
7487 // ShowcaseFileAdded : (showcase) Added file to showcase
7488 ShowcaseFileAdded json.RawMessage `json:"showcase_file_added,omitempty"`
7489 // ShowcaseFileDownload : (showcase) Downloaded file from showcase
7490 ShowcaseFileDownload json.RawMessage `json:"showcase_file_download,omitempty"`
7491 // ShowcaseFileRemoved : (showcase) Removed file from showcase
7492 ShowcaseFileRemoved json.RawMessage `json:"showcase_file_removed,omitempty"`
7493 // ShowcaseFileView : (showcase) Viewed file in showcase
7494 ShowcaseFileView json.RawMessage `json:"showcase_file_view,omitempty"`
7495 // ShowcasePermanentlyDeleted : (showcase) Permanently deleted showcase
7496 ShowcasePermanentlyDeleted json.RawMessage `json:"showcase_permanently_deleted,omitempty"`
7497 // ShowcasePostComment : (showcase) Added showcase comment
7498 ShowcasePostComment json.RawMessage `json:"showcase_post_comment,omitempty"`
7499 // ShowcaseRemoveMember : (showcase) Removed member from showcase
7500 ShowcaseRemoveMember json.RawMessage `json:"showcase_remove_member,omitempty"`
7501 // ShowcaseRenamed : (showcase) Renamed showcase
7502 ShowcaseRenamed json.RawMessage `json:"showcase_renamed,omitempty"`
7503 // ShowcaseRequestAccess : (showcase) Requested access to showcase
7504 ShowcaseRequestAccess json.RawMessage `json:"showcase_request_access,omitempty"`
7505 // ShowcaseResolveComment : (showcase) Resolved showcase comment
7506 ShowcaseResolveComment json.RawMessage `json:"showcase_resolve_comment,omitempty"`
7507 // ShowcaseRestored : (showcase) Unarchived showcase
7508 ShowcaseRestored json.RawMessage `json:"showcase_restored,omitempty"`
7509 // ShowcaseTrashed : (showcase) Deleted showcase
7510 ShowcaseTrashed json.RawMessage `json:"showcase_trashed,omitempty"`
7511 // ShowcaseTrashedDeprecated : (showcase) Deleted showcase (old version)
7512 // (deprecated, replaced by 'Deleted showcase')
7513 ShowcaseTrashedDeprecated json.RawMessage `json:"showcase_trashed_deprecated,omitempty"`
7514 // ShowcaseUnresolveComment : (showcase) Unresolved showcase comment
7515 ShowcaseUnresolveComment json.RawMessage `json:"showcase_unresolve_comment,omitempty"`
7516 // ShowcaseUntrashed : (showcase) Restored showcase
7517 ShowcaseUntrashed json.RawMessage `json:"showcase_untrashed,omitempty"`
7518 // ShowcaseUntrashedDeprecated : (showcase) Restored showcase (old
7519 // version) (deprecated, replaced by 'Restored showcase')
7520 ShowcaseUntrashedDeprecated json.RawMessage `json:"showcase_untrashed_deprecated,omitempty"`
7521 // ShowcaseView : (showcase) Viewed showcase
7522 ShowcaseView json.RawMessage `json:"showcase_view,omitempty"`
7523 // SsoAddCert : (sso) Added X.509 certificate for SSO
7524 SsoAddCert json.RawMessage `json:"sso_add_cert,omitempty"`
7525 // SsoAddLoginUrl : (sso) Added sign-in URL for SSO
7526 SsoAddLoginUrl json.RawMessage `json:"sso_add_login_url,omitempty"`
7527 // SsoAddLogoutUrl : (sso) Added sign-out URL for SSO
7528 SsoAddLogoutUrl json.RawMessage `json:"sso_add_logout_url,omitempty"`
7529 // SsoChangeCert : (sso) Changed X.509 certificate for SSO
7530 SsoChangeCert json.RawMessage `json:"sso_change_cert,omitempty"`
7531 // SsoChangeLoginUrl : (sso) Changed sign-in URL for SSO
7532 SsoChangeLoginUrl json.RawMessage `json:"sso_change_login_url,omitempty"`
7533 // SsoChangeLogoutUrl : (sso) Changed sign-out URL for SSO
7534 SsoChangeLogoutUrl json.RawMessage `json:"sso_change_logout_url,omitempty"`
7535 // SsoChangeSamlIdentityMode : (sso) Changed SAML identity mode for SSO
7536 SsoChangeSamlIdentityMode json.RawMessage `json:"sso_change_saml_identity_mode,omitempty"`
7537 // SsoRemoveCert : (sso) Removed X.509 certificate for SSO
7538 SsoRemoveCert json.RawMessage `json:"sso_remove_cert,omitempty"`
7539 // SsoRemoveLoginUrl : (sso) Removed sign-in URL for SSO
7540 SsoRemoveLoginUrl json.RawMessage `json:"sso_remove_login_url,omitempty"`
7541 // SsoRemoveLogoutUrl : (sso) Removed sign-out URL for SSO
7542 SsoRemoveLogoutUrl json.RawMessage `json:"sso_remove_logout_url,omitempty"`
7543 // TeamFolderChangeStatus : (team_folders) Changed archival status of
7544 // team folder
7545 TeamFolderChangeStatus json.RawMessage `json:"team_folder_change_status,omitempty"`
7546 // TeamFolderCreate : (team_folders) Created team folder in active
7547 // status
7548 TeamFolderCreate json.RawMessage `json:"team_folder_create,omitempty"`
7549 // TeamFolderDowngrade : (team_folders) Downgraded team folder to
7550 // regular shared folder
7551 TeamFolderDowngrade json.RawMessage `json:"team_folder_downgrade,omitempty"`
7552 // TeamFolderPermanentlyDelete : (team_folders) Permanently deleted
7553 // archived team folder
7554 TeamFolderPermanentlyDelete json.RawMessage `json:"team_folder_permanently_delete,omitempty"`
7555 // TeamFolderRename : (team_folders) Renamed active/archived team folder
7556 TeamFolderRename json.RawMessage `json:"team_folder_rename,omitempty"`
7557 // TeamSelectiveSyncSettingsChanged : (team_folders) Changed sync
7558 // default
7559 TeamSelectiveSyncSettingsChanged json.RawMessage `json:"team_selective_sync_settings_changed,omitempty"`
7560 // AccountCaptureChangePolicy : (team_policies) Changed account capture
7561 // setting on team domain
7562 AccountCaptureChangePolicy json.RawMessage `json:"account_capture_change_policy,omitempty"`
7563 // AllowDownloadDisabled : (team_policies) Disabled downloads
7564 // (deprecated, no longer logged)
7565 AllowDownloadDisabled json.RawMessage `json:"allow_download_disabled,omitempty"`
7566 // AllowDownloadEnabled : (team_policies) Enabled downloads (deprecated,
7567 // no longer logged)
7568 AllowDownloadEnabled json.RawMessage `json:"allow_download_enabled,omitempty"`
7569 // CameraUploadsPolicyChanged : (team_policies) Changed camera uploads
7570 // setting for team
7571 CameraUploadsPolicyChanged json.RawMessage `json:"camera_uploads_policy_changed,omitempty"`
7572 // DataPlacementRestrictionChangePolicy : (team_policies) Set
7573 // restrictions on data center locations where team data resides
7574 DataPlacementRestrictionChangePolicy json.RawMessage `json:"data_placement_restriction_change_policy,omitempty"`
7575 // DataPlacementRestrictionSatisfyPolicy : (team_policies) Completed
7576 // restrictions on data center locations where team data resides
7577 DataPlacementRestrictionSatisfyPolicy json.RawMessage `json:"data_placement_restriction_satisfy_policy,omitempty"`
7578 // DeviceApprovalsChangeDesktopPolicy : (team_policies) Set/removed
7579 // limit on number of computers member can link to team Dropbox account
7580 DeviceApprovalsChangeDesktopPolicy json.RawMessage `json:"device_approvals_change_desktop_policy,omitempty"`
7581 // DeviceApprovalsChangeMobilePolicy : (team_policies) Set/removed limit
7582 // on number of mobile devices member can link to team Dropbox account
7583 DeviceApprovalsChangeMobilePolicy json.RawMessage `json:"device_approvals_change_mobile_policy,omitempty"`
7584 // DeviceApprovalsChangeOverageAction : (team_policies) Changed device
7585 // approvals setting when member is over limit
7586 DeviceApprovalsChangeOverageAction json.RawMessage `json:"device_approvals_change_overage_action,omitempty"`
7587 // DeviceApprovalsChangeUnlinkAction : (team_policies) Changed device
7588 // approvals setting when member unlinks approved device
7589 DeviceApprovalsChangeUnlinkAction json.RawMessage `json:"device_approvals_change_unlink_action,omitempty"`
7590 // DirectoryRestrictionsAddMembers : (team_policies) Added members to
7591 // directory restrictions list
7592 DirectoryRestrictionsAddMembers json.RawMessage `json:"directory_restrictions_add_members,omitempty"`
7593 // DirectoryRestrictionsRemoveMembers : (team_policies) Removed members
7594 // from directory restrictions list
7595 DirectoryRestrictionsRemoveMembers json.RawMessage `json:"directory_restrictions_remove_members,omitempty"`
7596 // EmmAddException : (team_policies) Added members to EMM exception list
7597 EmmAddException json.RawMessage `json:"emm_add_exception,omitempty"`
7598 // EmmChangePolicy : (team_policies) Enabled/disabled enterprise
7599 // mobility management for members
7600 EmmChangePolicy json.RawMessage `json:"emm_change_policy,omitempty"`
7601 // EmmRemoveException : (team_policies) Removed members from EMM
7602 // exception list
7603 EmmRemoveException json.RawMessage `json:"emm_remove_exception,omitempty"`
7604 // ExtendedVersionHistoryChangePolicy : (team_policies) Accepted/opted
7605 // out of extended version history
7606 ExtendedVersionHistoryChangePolicy json.RawMessage `json:"extended_version_history_change_policy,omitempty"`
7607 // FileCommentsChangePolicy : (team_policies) Enabled/disabled
7608 // commenting on team files
7609 FileCommentsChangePolicy json.RawMessage `json:"file_comments_change_policy,omitempty"`
7610 // FileRequestsChangePolicy : (team_policies) Enabled/disabled file
7611 // requests
7612 FileRequestsChangePolicy json.RawMessage `json:"file_requests_change_policy,omitempty"`
7613 // FileRequestsEmailsEnabled : (team_policies) Enabled file request
7614 // emails for everyone (deprecated, no longer logged)
7615 FileRequestsEmailsEnabled json.RawMessage `json:"file_requests_emails_enabled,omitempty"`
7616 // FileRequestsEmailsRestrictedToTeamOnly : (team_policies) Enabled file
7617 // request emails for team (deprecated, no longer logged)
7618 FileRequestsEmailsRestrictedToTeamOnly json.RawMessage `json:"file_requests_emails_restricted_to_team_only,omitempty"`
7619 // GoogleSsoChangePolicy : (team_policies) Enabled/disabled Google
7620 // single sign-on for team
7621 GoogleSsoChangePolicy json.RawMessage `json:"google_sso_change_policy,omitempty"`
7622 // GroupUserManagementChangePolicy : (team_policies) Changed who can
7623 // create groups
7624 GroupUserManagementChangePolicy json.RawMessage `json:"group_user_management_change_policy,omitempty"`
7625 // MemberRequestsChangePolicy : (team_policies) Changed whether users
7626 // can find team when not invited
7627 MemberRequestsChangePolicy json.RawMessage `json:"member_requests_change_policy,omitempty"`
7628 // MemberSpaceLimitsAddException : (team_policies) Added members to
7629 // member space limit exception list
7630 MemberSpaceLimitsAddException json.RawMessage `json:"member_space_limits_add_exception,omitempty"`
7631 // MemberSpaceLimitsChangeCapsTypePolicy : (team_policies) Changed
7632 // member space limit type for team
7633 MemberSpaceLimitsChangeCapsTypePolicy json.RawMessage `json:"member_space_limits_change_caps_type_policy,omitempty"`
7634 // MemberSpaceLimitsChangePolicy : (team_policies) Changed team default
7635 // member space limit
7636 MemberSpaceLimitsChangePolicy json.RawMessage `json:"member_space_limits_change_policy,omitempty"`
7637 // MemberSpaceLimitsRemoveException : (team_policies) Removed members
7638 // from member space limit exception list
7639 MemberSpaceLimitsRemoveException json.RawMessage `json:"member_space_limits_remove_exception,omitempty"`
7640 // MemberSuggestionsChangePolicy : (team_policies) Enabled/disabled
7641 // option for team members to suggest people to add to team
7642 MemberSuggestionsChangePolicy json.RawMessage `json:"member_suggestions_change_policy,omitempty"`
7643 // MicrosoftOfficeAddinChangePolicy : (team_policies) Enabled/disabled
7644 // Microsoft Office add-in
7645 MicrosoftOfficeAddinChangePolicy json.RawMessage `json:"microsoft_office_addin_change_policy,omitempty"`
7646 // NetworkControlChangePolicy : (team_policies) Enabled/disabled network
7647 // control
7648 NetworkControlChangePolicy json.RawMessage `json:"network_control_change_policy,omitempty"`
7649 // PaperChangeDeploymentPolicy : (team_policies) Changed whether Dropbox
7650 // Paper, when enabled, is deployed to all members or to specific
7651 // members
7652 PaperChangeDeploymentPolicy json.RawMessage `json:"paper_change_deployment_policy,omitempty"`
7653 // PaperChangeMemberLinkPolicy : (team_policies) Changed whether
7654 // non-members can view Paper docs with link (deprecated, no longer
7655 // logged)
7656 PaperChangeMemberLinkPolicy json.RawMessage `json:"paper_change_member_link_policy,omitempty"`
7657 // PaperChangeMemberPolicy : (team_policies) Changed whether members can
7658 // share Paper docs outside team, and if docs are accessible only by
7659 // team members or anyone by default
7660 PaperChangeMemberPolicy json.RawMessage `json:"paper_change_member_policy,omitempty"`
7661 // PaperChangePolicy : (team_policies) Enabled/disabled Dropbox Paper
7662 // for team
7663 PaperChangePolicy json.RawMessage `json:"paper_change_policy,omitempty"`
7664 // PaperEnabledUsersGroupAddition : (team_policies) Added users to
7665 // Paper-enabled users list
7666 PaperEnabledUsersGroupAddition json.RawMessage `json:"paper_enabled_users_group_addition,omitempty"`
7667 // PaperEnabledUsersGroupRemoval : (team_policies) Removed users from
7668 // Paper-enabled users list
7669 PaperEnabledUsersGroupRemoval json.RawMessage `json:"paper_enabled_users_group_removal,omitempty"`
7670 // PermanentDeleteChangePolicy : (team_policies) Enabled/disabled
7671 // ability of team members to permanently delete content
7672 PermanentDeleteChangePolicy json.RawMessage `json:"permanent_delete_change_policy,omitempty"`
7673 // SharingChangeFolderJoinPolicy : (team_policies) Changed whether team
7674 // members can join shared folders owned outside team
7675 SharingChangeFolderJoinPolicy json.RawMessage `json:"sharing_change_folder_join_policy,omitempty"`
7676 // SharingChangeLinkPolicy : (team_policies) Changed whether members can
7677 // share links outside team, and if links are accessible only by team
7678 // members or anyone by default
7679 SharingChangeLinkPolicy json.RawMessage `json:"sharing_change_link_policy,omitempty"`
7680 // SharingChangeMemberPolicy : (team_policies) Changed whether members
7681 // can share files/folders outside team
7682 SharingChangeMemberPolicy json.RawMessage `json:"sharing_change_member_policy,omitempty"`
7683 // ShowcaseChangeDownloadPolicy : (team_policies) Enabled/disabled
7684 // downloading files from Dropbox Showcase for team
7685 ShowcaseChangeDownloadPolicy json.RawMessage `json:"showcase_change_download_policy,omitempty"`
7686 // ShowcaseChangeEnabledPolicy : (team_policies) Enabled/disabled
7687 // Dropbox Showcase for team
7688 ShowcaseChangeEnabledPolicy json.RawMessage `json:"showcase_change_enabled_policy,omitempty"`
7689 // ShowcaseChangeExternalSharingPolicy : (team_policies)
7690 // Enabled/disabled sharing Dropbox Showcase externally for team
7691 ShowcaseChangeExternalSharingPolicy json.RawMessage `json:"showcase_change_external_sharing_policy,omitempty"`
7692 // SmartSyncChangePolicy : (team_policies) Changed default Smart Sync
7693 // setting for team members
7694 SmartSyncChangePolicy json.RawMessage `json:"smart_sync_change_policy,omitempty"`
7695 // SmartSyncNotOptOut : (team_policies) Opted team into Smart Sync
7696 SmartSyncNotOptOut json.RawMessage `json:"smart_sync_not_opt_out,omitempty"`
7697 // SmartSyncOptOut : (team_policies) Opted team out of Smart Sync
7698 SmartSyncOptOut json.RawMessage `json:"smart_sync_opt_out,omitempty"`
7699 // SsoChangePolicy : (team_policies) Changed single sign-on setting for
7700 // team
7701 SsoChangePolicy json.RawMessage `json:"sso_change_policy,omitempty"`
7702 // TeamSelectiveSyncPolicyChanged : (team_policies) Enabled/disabled
7703 // Team Selective Sync for team
7704 TeamSelectiveSyncPolicyChanged json.RawMessage `json:"team_selective_sync_policy_changed,omitempty"`
7705 // TfaChangePolicy : (team_policies) Changed two-step verification
7706 // setting for team
7707 TfaChangePolicy json.RawMessage `json:"tfa_change_policy,omitempty"`
7708 // TwoAccountChangePolicy : (team_policies) Enabled/disabled option for
7709 // members to link personal Dropbox account and team account to same
7710 // computer
7711 TwoAccountChangePolicy json.RawMessage `json:"two_account_change_policy,omitempty"`
7712 // ViewerInfoPolicyChanged : (team_policies) Changed team policy for
7713 // viewer info
7714 ViewerInfoPolicyChanged json.RawMessage `json:"viewer_info_policy_changed,omitempty"`
7715 // WebSessionsChangeFixedLengthPolicy : (team_policies) Changed how long
7716 // members can stay signed in to Dropbox.com
7717 WebSessionsChangeFixedLengthPolicy json.RawMessage `json:"web_sessions_change_fixed_length_policy,omitempty"`
7718 // WebSessionsChangeIdleLengthPolicy : (team_policies) Changed how long
7719 // team members can be idle while signed in to Dropbox.com
7720 WebSessionsChangeIdleLengthPolicy json.RawMessage `json:"web_sessions_change_idle_length_policy,omitempty"`
7721 // TeamMergeFrom : (team_profile) Merged another team into this team
7722 TeamMergeFrom json.RawMessage `json:"team_merge_from,omitempty"`
7723 // TeamMergeTo : (team_profile) Merged this team into another team
7724 TeamMergeTo json.RawMessage `json:"team_merge_to,omitempty"`
7725 // TeamProfileAddLogo : (team_profile) Added team logo to display on
7726 // shared link headers
7727 TeamProfileAddLogo json.RawMessage `json:"team_profile_add_logo,omitempty"`
7728 // TeamProfileChangeDefaultLanguage : (team_profile) Changed default
7729 // language for team
7730 TeamProfileChangeDefaultLanguage json.RawMessage `json:"team_profile_change_default_language,omitempty"`
7731 // TeamProfileChangeLogo : (team_profile) Changed team logo displayed on
7732 // shared link headers
7733 TeamProfileChangeLogo json.RawMessage `json:"team_profile_change_logo,omitempty"`
7734 // TeamProfileChangeName : (team_profile) Changed team name
7735 TeamProfileChangeName json.RawMessage `json:"team_profile_change_name,omitempty"`
7736 // TeamProfileRemoveLogo : (team_profile) Removed team logo displayed on
7737 // shared link headers
7738 TeamProfileRemoveLogo json.RawMessage `json:"team_profile_remove_logo,omitempty"`
7739 // TfaAddBackupPhone : (tfa) Added backup phone for two-step
7740 // verification
7741 TfaAddBackupPhone json.RawMessage `json:"tfa_add_backup_phone,omitempty"`
7742 // TfaAddSecurityKey : (tfa) Added security key for two-step
7743 // verification
7744 TfaAddSecurityKey json.RawMessage `json:"tfa_add_security_key,omitempty"`
7745 // TfaChangeBackupPhone : (tfa) Changed backup phone for two-step
7746 // verification
7747 TfaChangeBackupPhone json.RawMessage `json:"tfa_change_backup_phone,omitempty"`
7748 // TfaChangeStatus : (tfa) Enabled/disabled/changed two-step
7749 // verification setting
7750 TfaChangeStatus json.RawMessage `json:"tfa_change_status,omitempty"`
7751 // TfaRemoveBackupPhone : (tfa) Removed backup phone for two-step
7752 // verification
7753 TfaRemoveBackupPhone json.RawMessage `json:"tfa_remove_backup_phone,omitempty"`
7754 // TfaRemoveSecurityKey : (tfa) Removed security key for two-step
7755 // verification
7756 TfaRemoveSecurityKey json.RawMessage `json:"tfa_remove_security_key,omitempty"`
7757 // TfaReset : (tfa) Reset two-step verification for team member
7758 TfaReset json.RawMessage `json:"tfa_reset,omitempty"`
7759 }
7760 var w wrap
7761 var err error
7762 if err = json.Unmarshal(body, &w); err != nil {
7763 return err
7764 }
7765 u.Tag = w.Tag
7766 switch u.Tag {
7767 case "app_link_team":
7768 err = json.Unmarshal(body, &u.AppLinkTeam)
7769
7770 if err != nil {
7771 return err
7772 }
7773 case "app_link_user":
7774 err = json.Unmarshal(body, &u.AppLinkUser)
7775
7776 if err != nil {
7777 return err
7778 }
7779 case "app_unlink_team":
7780 err = json.Unmarshal(body, &u.AppUnlinkTeam)
7781
7782 if err != nil {
7783 return err
7784 }
7785 case "app_unlink_user":
7786 err = json.Unmarshal(body, &u.AppUnlinkUser)
7787
7788 if err != nil {
7789 return err
7790 }
7791 case "file_add_comment":
7792 err = json.Unmarshal(body, &u.FileAddComment)
7793
7794 if err != nil {
7795 return err
7796 }
7797 case "file_change_comment_subscription":
7798 err = json.Unmarshal(body, &u.FileChangeCommentSubscription)
7799
7800 if err != nil {
7801 return err
7802 }
7803 case "file_delete_comment":
7804 err = json.Unmarshal(body, &u.FileDeleteComment)
7805
7806 if err != nil {
7807 return err
7808 }
7809 case "file_edit_comment":
7810 err = json.Unmarshal(body, &u.FileEditComment)
7811
7812 if err != nil {
7813 return err
7814 }
7815 case "file_like_comment":
7816 err = json.Unmarshal(body, &u.FileLikeComment)
7817
7818 if err != nil {
7819 return err
7820 }
7821 case "file_resolve_comment":
7822 err = json.Unmarshal(body, &u.FileResolveComment)
7823
7824 if err != nil {
7825 return err
7826 }
7827 case "file_unlike_comment":
7828 err = json.Unmarshal(body, &u.FileUnlikeComment)
7829
7830 if err != nil {
7831 return err
7832 }
7833 case "file_unresolve_comment":
7834 err = json.Unmarshal(body, &u.FileUnresolveComment)
7835
7836 if err != nil {
7837 return err
7838 }
7839 case "device_change_ip_desktop":
7840 err = json.Unmarshal(body, &u.DeviceChangeIpDesktop)
7841
7842 if err != nil {
7843 return err
7844 }
7845 case "device_change_ip_mobile":
7846 err = json.Unmarshal(body, &u.DeviceChangeIpMobile)
7847
7848 if err != nil {
7849 return err
7850 }
7851 case "device_change_ip_web":
7852 err = json.Unmarshal(body, &u.DeviceChangeIpWeb)
7853
7854 if err != nil {
7855 return err
7856 }
7857 case "device_delete_on_unlink_fail":
7858 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFail)
7859
7860 if err != nil {
7861 return err
7862 }
7863 case "device_delete_on_unlink_success":
7864 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccess)
7865
7866 if err != nil {
7867 return err
7868 }
7869 case "device_link_fail":
7870 err = json.Unmarshal(body, &u.DeviceLinkFail)
7871
7872 if err != nil {
7873 return err
7874 }
7875 case "device_link_success":
7876 err = json.Unmarshal(body, &u.DeviceLinkSuccess)
7877
7878 if err != nil {
7879 return err
7880 }
7881 case "device_management_disabled":
7882 err = json.Unmarshal(body, &u.DeviceManagementDisabled)
7883
7884 if err != nil {
7885 return err
7886 }
7887 case "device_management_enabled":
7888 err = json.Unmarshal(body, &u.DeviceManagementEnabled)
7889
7890 if err != nil {
7891 return err
7892 }
7893 case "device_unlink":
7894 err = json.Unmarshal(body, &u.DeviceUnlink)
7895
7896 if err != nil {
7897 return err
7898 }
7899 case "emm_refresh_auth_token":
7900 err = json.Unmarshal(body, &u.EmmRefreshAuthToken)
7901
7902 if err != nil {
7903 return err
7904 }
7905 case "account_capture_change_availability":
7906 err = json.Unmarshal(body, &u.AccountCaptureChangeAvailability)
7907
7908 if err != nil {
7909 return err
7910 }
7911 case "account_capture_migrate_account":
7912 err = json.Unmarshal(body, &u.AccountCaptureMigrateAccount)
7913
7914 if err != nil {
7915 return err
7916 }
7917 case "account_capture_notification_emails_sent":
7918 err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSent)
7919
7920 if err != nil {
7921 return err
7922 }
7923 case "account_capture_relinquish_account":
7924 err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccount)
7925
7926 if err != nil {
7927 return err
7928 }
7929 case "disabled_domain_invites":
7930 err = json.Unmarshal(body, &u.DisabledDomainInvites)
7931
7932 if err != nil {
7933 return err
7934 }
7935 case "domain_invites_approve_request_to_join_team":
7936 err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeam)
7937
7938 if err != nil {
7939 return err
7940 }
7941 case "domain_invites_decline_request_to_join_team":
7942 err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeam)
7943
7944 if err != nil {
7945 return err
7946 }
7947 case "domain_invites_email_existing_users":
7948 err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsers)
7949
7950 if err != nil {
7951 return err
7952 }
7953 case "domain_invites_request_to_join_team":
7954 err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeam)
7955
7956 if err != nil {
7957 return err
7958 }
7959 case "domain_invites_set_invite_new_user_pref_to_no":
7960 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNo)
7961
7962 if err != nil {
7963 return err
7964 }
7965 case "domain_invites_set_invite_new_user_pref_to_yes":
7966 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYes)
7967
7968 if err != nil {
7969 return err
7970 }
7971 case "domain_verification_add_domain_fail":
7972 err = json.Unmarshal(body, &u.DomainVerificationAddDomainFail)
7973
7974 if err != nil {
7975 return err
7976 }
7977 case "domain_verification_add_domain_success":
7978 err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccess)
7979
7980 if err != nil {
7981 return err
7982 }
7983 case "domain_verification_remove_domain":
7984 err = json.Unmarshal(body, &u.DomainVerificationRemoveDomain)
7985
7986 if err != nil {
7987 return err
7988 }
7989 case "enabled_domain_invites":
7990 err = json.Unmarshal(body, &u.EnabledDomainInvites)
7991
7992 if err != nil {
7993 return err
7994 }
7995 case "create_folder":
7996 err = json.Unmarshal(body, &u.CreateFolder)
7997
7998 if err != nil {
7999 return err
8000 }
8001 case "file_add":
8002 err = json.Unmarshal(body, &u.FileAdd)
8003
8004 if err != nil {
8005 return err
8006 }
8007 case "file_copy":
8008 err = json.Unmarshal(body, &u.FileCopy)
8009
8010 if err != nil {
8011 return err
8012 }
8013 case "file_delete":
8014 err = json.Unmarshal(body, &u.FileDelete)
8015
8016 if err != nil {
8017 return err
8018 }
8019 case "file_download":
8020 err = json.Unmarshal(body, &u.FileDownload)
8021
8022 if err != nil {
8023 return err
8024 }
8025 case "file_edit":
8026 err = json.Unmarshal(body, &u.FileEdit)
8027
8028 if err != nil {
8029 return err
8030 }
8031 case "file_get_copy_reference":
8032 err = json.Unmarshal(body, &u.FileGetCopyReference)
8033
8034 if err != nil {
8035 return err
8036 }
8037 case "file_move":
8038 err = json.Unmarshal(body, &u.FileMove)
8039
8040 if err != nil {
8041 return err
8042 }
8043 case "file_permanently_delete":
8044 err = json.Unmarshal(body, &u.FilePermanentlyDelete)
8045
8046 if err != nil {
8047 return err
8048 }
8049 case "file_preview":
8050 err = json.Unmarshal(body, &u.FilePreview)
8051
8052 if err != nil {
8053 return err
8054 }
8055 case "file_rename":
8056 err = json.Unmarshal(body, &u.FileRename)
8057
8058 if err != nil {
8059 return err
8060 }
8061 case "file_restore":
8062 err = json.Unmarshal(body, &u.FileRestore)
8063
8064 if err != nil {
8065 return err
8066 }
8067 case "file_revert":
8068 err = json.Unmarshal(body, &u.FileRevert)
8069
8070 if err != nil {
8071 return err
8072 }
8073 case "file_rollback_changes":
8074 err = json.Unmarshal(body, &u.FileRollbackChanges)
8075
8076 if err != nil {
8077 return err
8078 }
8079 case "file_save_copy_reference":
8080 err = json.Unmarshal(body, &u.FileSaveCopyReference)
8081
8082 if err != nil {
8083 return err
8084 }
8085 case "file_request_change":
8086 err = json.Unmarshal(body, &u.FileRequestChange)
8087
8088 if err != nil {
8089 return err
8090 }
8091 case "file_request_close":
8092 err = json.Unmarshal(body, &u.FileRequestClose)
8093
8094 if err != nil {
8095 return err
8096 }
8097 case "file_request_create":
8098 err = json.Unmarshal(body, &u.FileRequestCreate)
8099
8100 if err != nil {
8101 return err
8102 }
8103 case "file_request_receive_file":
8104 err = json.Unmarshal(body, &u.FileRequestReceiveFile)
8105
8106 if err != nil {
8107 return err
8108 }
8109 case "group_add_external_id":
8110 err = json.Unmarshal(body, &u.GroupAddExternalId)
8111
8112 if err != nil {
8113 return err
8114 }
8115 case "group_add_member":
8116 err = json.Unmarshal(body, &u.GroupAddMember)
8117
8118 if err != nil {
8119 return err
8120 }
8121 case "group_change_external_id":
8122 err = json.Unmarshal(body, &u.GroupChangeExternalId)
8123
8124 if err != nil {
8125 return err
8126 }
8127 case "group_change_management_type":
8128 err = json.Unmarshal(body, &u.GroupChangeManagementType)
8129
8130 if err != nil {
8131 return err
8132 }
8133 case "group_change_member_role":
8134 err = json.Unmarshal(body, &u.GroupChangeMemberRole)
8135
8136 if err != nil {
8137 return err
8138 }
8139 case "group_create":
8140 err = json.Unmarshal(body, &u.GroupCreate)
8141
8142 if err != nil {
8143 return err
8144 }
8145 case "group_delete":
8146 err = json.Unmarshal(body, &u.GroupDelete)
8147
8148 if err != nil {
8149 return err
8150 }
8151 case "group_description_updated":
8152 err = json.Unmarshal(body, &u.GroupDescriptionUpdated)
8153
8154 if err != nil {
8155 return err
8156 }
8157 case "group_join_policy_updated":
8158 err = json.Unmarshal(body, &u.GroupJoinPolicyUpdated)
8159
8160 if err != nil {
8161 return err
8162 }
8163 case "group_moved":
8164 err = json.Unmarshal(body, &u.GroupMoved)
8165
8166 if err != nil {
8167 return err
8168 }
8169 case "group_remove_external_id":
8170 err = json.Unmarshal(body, &u.GroupRemoveExternalId)
8171
8172 if err != nil {
8173 return err
8174 }
8175 case "group_remove_member":
8176 err = json.Unmarshal(body, &u.GroupRemoveMember)
8177
8178 if err != nil {
8179 return err
8180 }
8181 case "group_rename":
8182 err = json.Unmarshal(body, &u.GroupRename)
8183
8184 if err != nil {
8185 return err
8186 }
8187 case "emm_error":
8188 err = json.Unmarshal(body, &u.EmmError)
8189
8190 if err != nil {
8191 return err
8192 }
8193 case "login_fail":
8194 err = json.Unmarshal(body, &u.LoginFail)
8195
8196 if err != nil {
8197 return err
8198 }
8199 case "login_success":
8200 err = json.Unmarshal(body, &u.LoginSuccess)
8201
8202 if err != nil {
8203 return err
8204 }
8205 case "logout":
8206 err = json.Unmarshal(body, &u.Logout)
8207
8208 if err != nil {
8209 return err
8210 }
8211 case "reseller_support_session_end":
8212 err = json.Unmarshal(body, &u.ResellerSupportSessionEnd)
8213
8214 if err != nil {
8215 return err
8216 }
8217 case "reseller_support_session_start":
8218 err = json.Unmarshal(body, &u.ResellerSupportSessionStart)
8219
8220 if err != nil {
8221 return err
8222 }
8223 case "sign_in_as_session_end":
8224 err = json.Unmarshal(body, &u.SignInAsSessionEnd)
8225
8226 if err != nil {
8227 return err
8228 }
8229 case "sign_in_as_session_start":
8230 err = json.Unmarshal(body, &u.SignInAsSessionStart)
8231
8232 if err != nil {
8233 return err
8234 }
8235 case "sso_error":
8236 err = json.Unmarshal(body, &u.SsoError)
8237
8238 if err != nil {
8239 return err
8240 }
8241 case "member_add_name":
8242 err = json.Unmarshal(body, &u.MemberAddName)
8243
8244 if err != nil {
8245 return err
8246 }
8247 case "member_change_admin_role":
8248 err = json.Unmarshal(body, &u.MemberChangeAdminRole)
8249
8250 if err != nil {
8251 return err
8252 }
8253 case "member_change_email":
8254 err = json.Unmarshal(body, &u.MemberChangeEmail)
8255
8256 if err != nil {
8257 return err
8258 }
8259 case "member_change_membership_type":
8260 err = json.Unmarshal(body, &u.MemberChangeMembershipType)
8261
8262 if err != nil {
8263 return err
8264 }
8265 case "member_change_name":
8266 err = json.Unmarshal(body, &u.MemberChangeName)
8267
8268 if err != nil {
8269 return err
8270 }
8271 case "member_change_status":
8272 err = json.Unmarshal(body, &u.MemberChangeStatus)
8273
8274 if err != nil {
8275 return err
8276 }
8277 case "member_delete_manual_contacts":
8278 err = json.Unmarshal(body, &u.MemberDeleteManualContacts)
8279
8280 if err != nil {
8281 return err
8282 }
8283 case "member_permanently_delete_account_contents":
8284 err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContents)
8285
8286 if err != nil {
8287 return err
8288 }
8289 case "member_space_limits_add_custom_quota":
8290 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuota)
8291
8292 if err != nil {
8293 return err
8294 }
8295 case "member_space_limits_change_custom_quota":
8296 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuota)
8297
8298 if err != nil {
8299 return err
8300 }
8301 case "member_space_limits_change_status":
8302 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatus)
8303
8304 if err != nil {
8305 return err
8306 }
8307 case "member_space_limits_remove_custom_quota":
8308 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuota)
8309
8310 if err != nil {
8311 return err
8312 }
8313 case "member_suggest":
8314 err = json.Unmarshal(body, &u.MemberSuggest)
8315
8316 if err != nil {
8317 return err
8318 }
8319 case "member_transfer_account_contents":
8320 err = json.Unmarshal(body, &u.MemberTransferAccountContents)
8321
8322 if err != nil {
8323 return err
8324 }
8325 case "secondary_mails_policy_changed":
8326 err = json.Unmarshal(body, &u.SecondaryMailsPolicyChanged)
8327
8328 if err != nil {
8329 return err
8330 }
8331 case "paper_content_add_member":
8332 err = json.Unmarshal(body, &u.PaperContentAddMember)
8333
8334 if err != nil {
8335 return err
8336 }
8337 case "paper_content_add_to_folder":
8338 err = json.Unmarshal(body, &u.PaperContentAddToFolder)
8339
8340 if err != nil {
8341 return err
8342 }
8343 case "paper_content_archive":
8344 err = json.Unmarshal(body, &u.PaperContentArchive)
8345
8346 if err != nil {
8347 return err
8348 }
8349 case "paper_content_create":
8350 err = json.Unmarshal(body, &u.PaperContentCreate)
8351
8352 if err != nil {
8353 return err
8354 }
8355 case "paper_content_permanently_delete":
8356 err = json.Unmarshal(body, &u.PaperContentPermanentlyDelete)
8357
8358 if err != nil {
8359 return err
8360 }
8361 case "paper_content_remove_from_folder":
8362 err = json.Unmarshal(body, &u.PaperContentRemoveFromFolder)
8363
8364 if err != nil {
8365 return err
8366 }
8367 case "paper_content_remove_member":
8368 err = json.Unmarshal(body, &u.PaperContentRemoveMember)
8369
8370 if err != nil {
8371 return err
8372 }
8373 case "paper_content_rename":
8374 err = json.Unmarshal(body, &u.PaperContentRename)
8375
8376 if err != nil {
8377 return err
8378 }
8379 case "paper_content_restore":
8380 err = json.Unmarshal(body, &u.PaperContentRestore)
8381
8382 if err != nil {
8383 return err
8384 }
8385 case "paper_doc_add_comment":
8386 err = json.Unmarshal(body, &u.PaperDocAddComment)
8387
8388 if err != nil {
8389 return err
8390 }
8391 case "paper_doc_change_member_role":
8392 err = json.Unmarshal(body, &u.PaperDocChangeMemberRole)
8393
8394 if err != nil {
8395 return err
8396 }
8397 case "paper_doc_change_sharing_policy":
8398 err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicy)
8399
8400 if err != nil {
8401 return err
8402 }
8403 case "paper_doc_change_subscription":
8404 err = json.Unmarshal(body, &u.PaperDocChangeSubscription)
8405
8406 if err != nil {
8407 return err
8408 }
8409 case "paper_doc_deleted":
8410 err = json.Unmarshal(body, &u.PaperDocDeleted)
8411
8412 if err != nil {
8413 return err
8414 }
8415 case "paper_doc_delete_comment":
8416 err = json.Unmarshal(body, &u.PaperDocDeleteComment)
8417
8418 if err != nil {
8419 return err
8420 }
8421 case "paper_doc_download":
8422 err = json.Unmarshal(body, &u.PaperDocDownload)
8423
8424 if err != nil {
8425 return err
8426 }
8427 case "paper_doc_edit":
8428 err = json.Unmarshal(body, &u.PaperDocEdit)
8429
8430 if err != nil {
8431 return err
8432 }
8433 case "paper_doc_edit_comment":
8434 err = json.Unmarshal(body, &u.PaperDocEditComment)
8435
8436 if err != nil {
8437 return err
8438 }
8439 case "paper_doc_followed":
8440 err = json.Unmarshal(body, &u.PaperDocFollowed)
8441
8442 if err != nil {
8443 return err
8444 }
8445 case "paper_doc_mention":
8446 err = json.Unmarshal(body, &u.PaperDocMention)
8447
8448 if err != nil {
8449 return err
8450 }
8451 case "paper_doc_ownership_changed":
8452 err = json.Unmarshal(body, &u.PaperDocOwnershipChanged)
8453
8454 if err != nil {
8455 return err
8456 }
8457 case "paper_doc_request_access":
8458 err = json.Unmarshal(body, &u.PaperDocRequestAccess)
8459
8460 if err != nil {
8461 return err
8462 }
8463 case "paper_doc_resolve_comment":
8464 err = json.Unmarshal(body, &u.PaperDocResolveComment)
8465
8466 if err != nil {
8467 return err
8468 }
8469 case "paper_doc_revert":
8470 err = json.Unmarshal(body, &u.PaperDocRevert)
8471
8472 if err != nil {
8473 return err
8474 }
8475 case "paper_doc_slack_share":
8476 err = json.Unmarshal(body, &u.PaperDocSlackShare)
8477
8478 if err != nil {
8479 return err
8480 }
8481 case "paper_doc_team_invite":
8482 err = json.Unmarshal(body, &u.PaperDocTeamInvite)
8483
8484 if err != nil {
8485 return err
8486 }
8487 case "paper_doc_trashed":
8488 err = json.Unmarshal(body, &u.PaperDocTrashed)
8489
8490 if err != nil {
8491 return err
8492 }
8493 case "paper_doc_unresolve_comment":
8494 err = json.Unmarshal(body, &u.PaperDocUnresolveComment)
8495
8496 if err != nil {
8497 return err
8498 }
8499 case "paper_doc_untrashed":
8500 err = json.Unmarshal(body, &u.PaperDocUntrashed)
8501
8502 if err != nil {
8503 return err
8504 }
8505 case "paper_doc_view":
8506 err = json.Unmarshal(body, &u.PaperDocView)
8507
8508 if err != nil {
8509 return err
8510 }
8511 case "paper_external_view_allow":
8512 err = json.Unmarshal(body, &u.PaperExternalViewAllow)
8513
8514 if err != nil {
8515 return err
8516 }
8517 case "paper_external_view_default_team":
8518 err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeam)
8519
8520 if err != nil {
8521 return err
8522 }
8523 case "paper_external_view_forbid":
8524 err = json.Unmarshal(body, &u.PaperExternalViewForbid)
8525
8526 if err != nil {
8527 return err
8528 }
8529 case "paper_folder_change_subscription":
8530 err = json.Unmarshal(body, &u.PaperFolderChangeSubscription)
8531
8532 if err != nil {
8533 return err
8534 }
8535 case "paper_folder_deleted":
8536 err = json.Unmarshal(body, &u.PaperFolderDeleted)
8537
8538 if err != nil {
8539 return err
8540 }
8541 case "paper_folder_followed":
8542 err = json.Unmarshal(body, &u.PaperFolderFollowed)
8543
8544 if err != nil {
8545 return err
8546 }
8547 case "paper_folder_team_invite":
8548 err = json.Unmarshal(body, &u.PaperFolderTeamInvite)
8549
8550 if err != nil {
8551 return err
8552 }
8553 case "password_change":
8554 err = json.Unmarshal(body, &u.PasswordChange)
8555
8556 if err != nil {
8557 return err
8558 }
8559 case "password_reset":
8560 err = json.Unmarshal(body, &u.PasswordReset)
8561
8562 if err != nil {
8563 return err
8564 }
8565 case "password_reset_all":
8566 err = json.Unmarshal(body, &u.PasswordResetAll)
8567
8568 if err != nil {
8569 return err
8570 }
8571 case "emm_create_exceptions_report":
8572 err = json.Unmarshal(body, &u.EmmCreateExceptionsReport)
8573
8574 if err != nil {
8575 return err
8576 }
8577 case "emm_create_usage_report":
8578 err = json.Unmarshal(body, &u.EmmCreateUsageReport)
8579
8580 if err != nil {
8581 return err
8582 }
8583 case "export_members_report":
8584 err = json.Unmarshal(body, &u.ExportMembersReport)
8585
8586 if err != nil {
8587 return err
8588 }
8589 case "paper_admin_export_start":
8590 err = json.Unmarshal(body, &u.PaperAdminExportStart)
8591
8592 if err != nil {
8593 return err
8594 }
8595 case "smart_sync_create_admin_privilege_report":
8596 err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReport)
8597
8598 if err != nil {
8599 return err
8600 }
8601 case "team_activity_create_report":
8602 err = json.Unmarshal(body, &u.TeamActivityCreateReport)
8603
8604 if err != nil {
8605 return err
8606 }
8607 case "collection_share":
8608 err = json.Unmarshal(body, &u.CollectionShare)
8609
8610 if err != nil {
8611 return err
8612 }
8613 case "note_acl_invite_only":
8614 err = json.Unmarshal(body, &u.NoteAclInviteOnly)
8615
8616 if err != nil {
8617 return err
8618 }
8619 case "note_acl_link":
8620 err = json.Unmarshal(body, &u.NoteAclLink)
8621
8622 if err != nil {
8623 return err
8624 }
8625 case "note_acl_team_link":
8626 err = json.Unmarshal(body, &u.NoteAclTeamLink)
8627
8628 if err != nil {
8629 return err
8630 }
8631 case "note_shared":
8632 err = json.Unmarshal(body, &u.NoteShared)
8633
8634 if err != nil {
8635 return err
8636 }
8637 case "note_share_receive":
8638 err = json.Unmarshal(body, &u.NoteShareReceive)
8639
8640 if err != nil {
8641 return err
8642 }
8643 case "open_note_shared":
8644 err = json.Unmarshal(body, &u.OpenNoteShared)
8645
8646 if err != nil {
8647 return err
8648 }
8649 case "sf_add_group":
8650 err = json.Unmarshal(body, &u.SfAddGroup)
8651
8652 if err != nil {
8653 return err
8654 }
8655 case "sf_allow_non_members_to_view_shared_links":
8656 err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinks)
8657
8658 if err != nil {
8659 return err
8660 }
8661 case "sf_external_invite_warn":
8662 err = json.Unmarshal(body, &u.SfExternalInviteWarn)
8663
8664 if err != nil {
8665 return err
8666 }
8667 case "sf_fb_invite":
8668 err = json.Unmarshal(body, &u.SfFbInvite)
8669
8670 if err != nil {
8671 return err
8672 }
8673 case "sf_fb_invite_change_role":
8674 err = json.Unmarshal(body, &u.SfFbInviteChangeRole)
8675
8676 if err != nil {
8677 return err
8678 }
8679 case "sf_fb_uninvite":
8680 err = json.Unmarshal(body, &u.SfFbUninvite)
8681
8682 if err != nil {
8683 return err
8684 }
8685 case "sf_invite_group":
8686 err = json.Unmarshal(body, &u.SfInviteGroup)
8687
8688 if err != nil {
8689 return err
8690 }
8691 case "sf_team_grant_access":
8692 err = json.Unmarshal(body, &u.SfTeamGrantAccess)
8693
8694 if err != nil {
8695 return err
8696 }
8697 case "sf_team_invite":
8698 err = json.Unmarshal(body, &u.SfTeamInvite)
8699
8700 if err != nil {
8701 return err
8702 }
8703 case "sf_team_invite_change_role":
8704 err = json.Unmarshal(body, &u.SfTeamInviteChangeRole)
8705
8706 if err != nil {
8707 return err
8708 }
8709 case "sf_team_join":
8710 err = json.Unmarshal(body, &u.SfTeamJoin)
8711
8712 if err != nil {
8713 return err
8714 }
8715 case "sf_team_join_from_oob_link":
8716 err = json.Unmarshal(body, &u.SfTeamJoinFromOobLink)
8717
8718 if err != nil {
8719 return err
8720 }
8721 case "sf_team_uninvite":
8722 err = json.Unmarshal(body, &u.SfTeamUninvite)
8723
8724 if err != nil {
8725 return err
8726 }
8727 case "shared_content_add_invitees":
8728 err = json.Unmarshal(body, &u.SharedContentAddInvitees)
8729
8730 if err != nil {
8731 return err
8732 }
8733 case "shared_content_add_link_expiry":
8734 err = json.Unmarshal(body, &u.SharedContentAddLinkExpiry)
8735
8736 if err != nil {
8737 return err
8738 }
8739 case "shared_content_add_link_password":
8740 err = json.Unmarshal(body, &u.SharedContentAddLinkPassword)
8741
8742 if err != nil {
8743 return err
8744 }
8745 case "shared_content_add_member":
8746 err = json.Unmarshal(body, &u.SharedContentAddMember)
8747
8748 if err != nil {
8749 return err
8750 }
8751 case "shared_content_change_downloads_policy":
8752 err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicy)
8753
8754 if err != nil {
8755 return err
8756 }
8757 case "shared_content_change_invitee_role":
8758 err = json.Unmarshal(body, &u.SharedContentChangeInviteeRole)
8759
8760 if err != nil {
8761 return err
8762 }
8763 case "shared_content_change_link_audience":
8764 err = json.Unmarshal(body, &u.SharedContentChangeLinkAudience)
8765
8766 if err != nil {
8767 return err
8768 }
8769 case "shared_content_change_link_expiry":
8770 err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiry)
8771
8772 if err != nil {
8773 return err
8774 }
8775 case "shared_content_change_link_password":
8776 err = json.Unmarshal(body, &u.SharedContentChangeLinkPassword)
8777
8778 if err != nil {
8779 return err
8780 }
8781 case "shared_content_change_member_role":
8782 err = json.Unmarshal(body, &u.SharedContentChangeMemberRole)
8783
8784 if err != nil {
8785 return err
8786 }
8787 case "shared_content_change_viewer_info_policy":
8788 err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicy)
8789
8790 if err != nil {
8791 return err
8792 }
8793 case "shared_content_claim_invitation":
8794 err = json.Unmarshal(body, &u.SharedContentClaimInvitation)
8795
8796 if err != nil {
8797 return err
8798 }
8799 case "shared_content_copy":
8800 err = json.Unmarshal(body, &u.SharedContentCopy)
8801
8802 if err != nil {
8803 return err
8804 }
8805 case "shared_content_download":
8806 err = json.Unmarshal(body, &u.SharedContentDownload)
8807
8808 if err != nil {
8809 return err
8810 }
8811 case "shared_content_relinquish_membership":
8812 err = json.Unmarshal(body, &u.SharedContentRelinquishMembership)
8813
8814 if err != nil {
8815 return err
8816 }
8817 case "shared_content_remove_invitees":
8818 err = json.Unmarshal(body, &u.SharedContentRemoveInvitees)
8819
8820 if err != nil {
8821 return err
8822 }
8823 case "shared_content_remove_link_expiry":
8824 err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiry)
8825
8826 if err != nil {
8827 return err
8828 }
8829 case "shared_content_remove_link_password":
8830 err = json.Unmarshal(body, &u.SharedContentRemoveLinkPassword)
8831
8832 if err != nil {
8833 return err
8834 }
8835 case "shared_content_remove_member":
8836 err = json.Unmarshal(body, &u.SharedContentRemoveMember)
8837
8838 if err != nil {
8839 return err
8840 }
8841 case "shared_content_request_access":
8842 err = json.Unmarshal(body, &u.SharedContentRequestAccess)
8843
8844 if err != nil {
8845 return err
8846 }
8847 case "shared_content_unshare":
8848 err = json.Unmarshal(body, &u.SharedContentUnshare)
8849
8850 if err != nil {
8851 return err
8852 }
8853 case "shared_content_view":
8854 err = json.Unmarshal(body, &u.SharedContentView)
8855
8856 if err != nil {
8857 return err
8858 }
8859 case "shared_folder_change_link_policy":
8860 err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicy)
8861
8862 if err != nil {
8863 return err
8864 }
8865 case "shared_folder_change_members_inheritance_policy":
8866 err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicy)
8867
8868 if err != nil {
8869 return err
8870 }
8871 case "shared_folder_change_members_management_policy":
8872 err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicy)
8873
8874 if err != nil {
8875 return err
8876 }
8877 case "shared_folder_change_members_policy":
8878 err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicy)
8879
8880 if err != nil {
8881 return err
8882 }
8883 case "shared_folder_create":
8884 err = json.Unmarshal(body, &u.SharedFolderCreate)
8885
8886 if err != nil {
8887 return err
8888 }
8889 case "shared_folder_decline_invitation":
8890 err = json.Unmarshal(body, &u.SharedFolderDeclineInvitation)
8891
8892 if err != nil {
8893 return err
8894 }
8895 case "shared_folder_mount":
8896 err = json.Unmarshal(body, &u.SharedFolderMount)
8897
8898 if err != nil {
8899 return err
8900 }
8901 case "shared_folder_nest":
8902 err = json.Unmarshal(body, &u.SharedFolderNest)
8903
8904 if err != nil {
8905 return err
8906 }
8907 case "shared_folder_transfer_ownership":
8908 err = json.Unmarshal(body, &u.SharedFolderTransferOwnership)
8909
8910 if err != nil {
8911 return err
8912 }
8913 case "shared_folder_unmount":
8914 err = json.Unmarshal(body, &u.SharedFolderUnmount)
8915
8916 if err != nil {
8917 return err
8918 }
8919 case "shared_link_add_expiry":
8920 err = json.Unmarshal(body, &u.SharedLinkAddExpiry)
8921
8922 if err != nil {
8923 return err
8924 }
8925 case "shared_link_change_expiry":
8926 err = json.Unmarshal(body, &u.SharedLinkChangeExpiry)
8927
8928 if err != nil {
8929 return err
8930 }
8931 case "shared_link_change_visibility":
8932 err = json.Unmarshal(body, &u.SharedLinkChangeVisibility)
8933
8934 if err != nil {
8935 return err
8936 }
8937 case "shared_link_copy":
8938 err = json.Unmarshal(body, &u.SharedLinkCopy)
8939
8940 if err != nil {
8941 return err
8942 }
8943 case "shared_link_create":
8944 err = json.Unmarshal(body, &u.SharedLinkCreate)
8945
8946 if err != nil {
8947 return err
8948 }
8949 case "shared_link_disable":
8950 err = json.Unmarshal(body, &u.SharedLinkDisable)
8951
8952 if err != nil {
8953 return err
8954 }
8955 case "shared_link_download":
8956 err = json.Unmarshal(body, &u.SharedLinkDownload)
8957
8958 if err != nil {
8959 return err
8960 }
8961 case "shared_link_remove_expiry":
8962 err = json.Unmarshal(body, &u.SharedLinkRemoveExpiry)
8963
8964 if err != nil {
8965 return err
8966 }
8967 case "shared_link_share":
8968 err = json.Unmarshal(body, &u.SharedLinkShare)
8969
8970 if err != nil {
8971 return err
8972 }
8973 case "shared_link_view":
8974 err = json.Unmarshal(body, &u.SharedLinkView)
8975
8976 if err != nil {
8977 return err
8978 }
8979 case "shared_note_opened":
8980 err = json.Unmarshal(body, &u.SharedNoteOpened)
8981
8982 if err != nil {
8983 return err
8984 }
8985 case "shmodel_group_share":
8986 err = json.Unmarshal(body, &u.ShmodelGroupShare)
8987
8988 if err != nil {
8989 return err
8990 }
8991 case "showcase_access_granted":
8992 err = json.Unmarshal(body, &u.ShowcaseAccessGranted)
8993
8994 if err != nil {
8995 return err
8996 }
8997 case "showcase_add_member":
8998 err = json.Unmarshal(body, &u.ShowcaseAddMember)
8999
9000 if err != nil {
9001 return err
9002 }
9003 case "showcase_archived":
9004 err = json.Unmarshal(body, &u.ShowcaseArchived)
9005
9006 if err != nil {
9007 return err
9008 }
9009 case "showcase_created":
9010 err = json.Unmarshal(body, &u.ShowcaseCreated)
9011
9012 if err != nil {
9013 return err
9014 }
9015 case "showcase_delete_comment":
9016 err = json.Unmarshal(body, &u.ShowcaseDeleteComment)
9017
9018 if err != nil {
9019 return err
9020 }
9021 case "showcase_edited":
9022 err = json.Unmarshal(body, &u.ShowcaseEdited)
9023
9024 if err != nil {
9025 return err
9026 }
9027 case "showcase_edit_comment":
9028 err = json.Unmarshal(body, &u.ShowcaseEditComment)
9029
9030 if err != nil {
9031 return err
9032 }
9033 case "showcase_file_added":
9034 err = json.Unmarshal(body, &u.ShowcaseFileAdded)
9035
9036 if err != nil {
9037 return err
9038 }
9039 case "showcase_file_download":
9040 err = json.Unmarshal(body, &u.ShowcaseFileDownload)
9041
9042 if err != nil {
9043 return err
9044 }
9045 case "showcase_file_removed":
9046 err = json.Unmarshal(body, &u.ShowcaseFileRemoved)
9047
9048 if err != nil {
9049 return err
9050 }
9051 case "showcase_file_view":
9052 err = json.Unmarshal(body, &u.ShowcaseFileView)
9053
9054 if err != nil {
9055 return err
9056 }
9057 case "showcase_permanently_deleted":
9058 err = json.Unmarshal(body, &u.ShowcasePermanentlyDeleted)
9059
9060 if err != nil {
9061 return err
9062 }
9063 case "showcase_post_comment":
9064 err = json.Unmarshal(body, &u.ShowcasePostComment)
9065
9066 if err != nil {
9067 return err
9068 }
9069 case "showcase_remove_member":
9070 err = json.Unmarshal(body, &u.ShowcaseRemoveMember)
9071
9072 if err != nil {
9073 return err
9074 }
9075 case "showcase_renamed":
9076 err = json.Unmarshal(body, &u.ShowcaseRenamed)
9077
9078 if err != nil {
9079 return err
9080 }
9081 case "showcase_request_access":
9082 err = json.Unmarshal(body, &u.ShowcaseRequestAccess)
9083
9084 if err != nil {
9085 return err
9086 }
9087 case "showcase_resolve_comment":
9088 err = json.Unmarshal(body, &u.ShowcaseResolveComment)
9089
9090 if err != nil {
9091 return err
9092 }
9093 case "showcase_restored":
9094 err = json.Unmarshal(body, &u.ShowcaseRestored)
9095
9096 if err != nil {
9097 return err
9098 }
9099 case "showcase_trashed":
9100 err = json.Unmarshal(body, &u.ShowcaseTrashed)
9101
9102 if err != nil {
9103 return err
9104 }
9105 case "showcase_trashed_deprecated":
9106 err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecated)
9107
9108 if err != nil {
9109 return err
9110 }
9111 case "showcase_unresolve_comment":
9112 err = json.Unmarshal(body, &u.ShowcaseUnresolveComment)
9113
9114 if err != nil {
9115 return err
9116 }
9117 case "showcase_untrashed":
9118 err = json.Unmarshal(body, &u.ShowcaseUntrashed)
9119
9120 if err != nil {
9121 return err
9122 }
9123 case "showcase_untrashed_deprecated":
9124 err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecated)
9125
9126 if err != nil {
9127 return err
9128 }
9129 case "showcase_view":
9130 err = json.Unmarshal(body, &u.ShowcaseView)
9131
9132 if err != nil {
9133 return err
9134 }
9135 case "sso_add_cert":
9136 err = json.Unmarshal(body, &u.SsoAddCert)
9137
9138 if err != nil {
9139 return err
9140 }
9141 case "sso_add_login_url":
9142 err = json.Unmarshal(body, &u.SsoAddLoginUrl)
9143
9144 if err != nil {
9145 return err
9146 }
9147 case "sso_add_logout_url":
9148 err = json.Unmarshal(body, &u.SsoAddLogoutUrl)
9149
9150 if err != nil {
9151 return err
9152 }
9153 case "sso_change_cert":
9154 err = json.Unmarshal(body, &u.SsoChangeCert)
9155
9156 if err != nil {
9157 return err
9158 }
9159 case "sso_change_login_url":
9160 err = json.Unmarshal(body, &u.SsoChangeLoginUrl)
9161
9162 if err != nil {
9163 return err
9164 }
9165 case "sso_change_logout_url":
9166 err = json.Unmarshal(body, &u.SsoChangeLogoutUrl)
9167
9168 if err != nil {
9169 return err
9170 }
9171 case "sso_change_saml_identity_mode":
9172 err = json.Unmarshal(body, &u.SsoChangeSamlIdentityMode)
9173
9174 if err != nil {
9175 return err
9176 }
9177 case "sso_remove_cert":
9178 err = json.Unmarshal(body, &u.SsoRemoveCert)
9179
9180 if err != nil {
9181 return err
9182 }
9183 case "sso_remove_login_url":
9184 err = json.Unmarshal(body, &u.SsoRemoveLoginUrl)
9185
9186 if err != nil {
9187 return err
9188 }
9189 case "sso_remove_logout_url":
9190 err = json.Unmarshal(body, &u.SsoRemoveLogoutUrl)
9191
9192 if err != nil {
9193 return err
9194 }
9195 case "team_folder_change_status":
9196 err = json.Unmarshal(body, &u.TeamFolderChangeStatus)
9197
9198 if err != nil {
9199 return err
9200 }
9201 case "team_folder_create":
9202 err = json.Unmarshal(body, &u.TeamFolderCreate)
9203
9204 if err != nil {
9205 return err
9206 }
9207 case "team_folder_downgrade":
9208 err = json.Unmarshal(body, &u.TeamFolderDowngrade)
9209
9210 if err != nil {
9211 return err
9212 }
9213 case "team_folder_permanently_delete":
9214 err = json.Unmarshal(body, &u.TeamFolderPermanentlyDelete)
9215
9216 if err != nil {
9217 return err
9218 }
9219 case "team_folder_rename":
9220 err = json.Unmarshal(body, &u.TeamFolderRename)
9221
9222 if err != nil {
9223 return err
9224 }
9225 case "team_selective_sync_settings_changed":
9226 err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChanged)
9227
9228 if err != nil {
9229 return err
9230 }
9231 case "account_capture_change_policy":
9232 err = json.Unmarshal(body, &u.AccountCaptureChangePolicy)
9233
9234 if err != nil {
9235 return err
9236 }
9237 case "allow_download_disabled":
9238 err = json.Unmarshal(body, &u.AllowDownloadDisabled)
9239
9240 if err != nil {
9241 return err
9242 }
9243 case "allow_download_enabled":
9244 err = json.Unmarshal(body, &u.AllowDownloadEnabled)
9245
9246 if err != nil {
9247 return err
9248 }
9249 case "camera_uploads_policy_changed":
9250 err = json.Unmarshal(body, &u.CameraUploadsPolicyChanged)
9251
9252 if err != nil {
9253 return err
9254 }
9255 case "data_placement_restriction_change_policy":
9256 err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicy)
9257
9258 if err != nil {
9259 return err
9260 }
9261 case "data_placement_restriction_satisfy_policy":
9262 err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicy)
9263
9264 if err != nil {
9265 return err
9266 }
9267 case "device_approvals_change_desktop_policy":
9268 err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicy)
9269
9270 if err != nil {
9271 return err
9272 }
9273 case "device_approvals_change_mobile_policy":
9274 err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicy)
9275
9276 if err != nil {
9277 return err
9278 }
9279 case "device_approvals_change_overage_action":
9280 err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageAction)
9281
9282 if err != nil {
9283 return err
9284 }
9285 case "device_approvals_change_unlink_action":
9286 err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkAction)
9287
9288 if err != nil {
9289 return err
9290 }
9291 case "directory_restrictions_add_members":
9292 err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembers)
9293
9294 if err != nil {
9295 return err
9296 }
9297 case "directory_restrictions_remove_members":
9298 err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembers)
9299
9300 if err != nil {
9301 return err
9302 }
9303 case "emm_add_exception":
9304 err = json.Unmarshal(body, &u.EmmAddException)
9305
9306 if err != nil {
9307 return err
9308 }
9309 case "emm_change_policy":
9310 err = json.Unmarshal(body, &u.EmmChangePolicy)
9311
9312 if err != nil {
9313 return err
9314 }
9315 case "emm_remove_exception":
9316 err = json.Unmarshal(body, &u.EmmRemoveException)
9317
9318 if err != nil {
9319 return err
9320 }
9321 case "extended_version_history_change_policy":
9322 err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicy)
9323
9324 if err != nil {
9325 return err
9326 }
9327 case "file_comments_change_policy":
9328 err = json.Unmarshal(body, &u.FileCommentsChangePolicy)
9329
9330 if err != nil {
9331 return err
9332 }
9333 case "file_requests_change_policy":
9334 err = json.Unmarshal(body, &u.FileRequestsChangePolicy)
9335
9336 if err != nil {
9337 return err
9338 }
9339 case "file_requests_emails_enabled":
9340 err = json.Unmarshal(body, &u.FileRequestsEmailsEnabled)
9341
9342 if err != nil {
9343 return err
9344 }
9345 case "file_requests_emails_restricted_to_team_only":
9346 err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnly)
9347
9348 if err != nil {
9349 return err
9350 }
9351 case "google_sso_change_policy":
9352 err = json.Unmarshal(body, &u.GoogleSsoChangePolicy)
9353
9354 if err != nil {
9355 return err
9356 }
9357 case "group_user_management_change_policy":
9358 err = json.Unmarshal(body, &u.GroupUserManagementChangePolicy)
9359
9360 if err != nil {
9361 return err
9362 }
9363 case "member_requests_change_policy":
9364 err = json.Unmarshal(body, &u.MemberRequestsChangePolicy)
9365
9366 if err != nil {
9367 return err
9368 }
9369 case "member_space_limits_add_exception":
9370 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddException)
9371
9372 if err != nil {
9373 return err
9374 }
9375 case "member_space_limits_change_caps_type_policy":
9376 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicy)
9377
9378 if err != nil {
9379 return err
9380 }
9381 case "member_space_limits_change_policy":
9382 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicy)
9383
9384 if err != nil {
9385 return err
9386 }
9387 case "member_space_limits_remove_exception":
9388 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveException)
9389
9390 if err != nil {
9391 return err
9392 }
9393 case "member_suggestions_change_policy":
9394 err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicy)
9395
9396 if err != nil {
9397 return err
9398 }
9399 case "microsoft_office_addin_change_policy":
9400 err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicy)
9401
9402 if err != nil {
9403 return err
9404 }
9405 case "network_control_change_policy":
9406 err = json.Unmarshal(body, &u.NetworkControlChangePolicy)
9407
9408 if err != nil {
9409 return err
9410 }
9411 case "paper_change_deployment_policy":
9412 err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicy)
9413
9414 if err != nil {
9415 return err
9416 }
9417 case "paper_change_member_link_policy":
9418 err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicy)
9419
9420 if err != nil {
9421 return err
9422 }
9423 case "paper_change_member_policy":
9424 err = json.Unmarshal(body, &u.PaperChangeMemberPolicy)
9425
9426 if err != nil {
9427 return err
9428 }
9429 case "paper_change_policy":
9430 err = json.Unmarshal(body, &u.PaperChangePolicy)
9431
9432 if err != nil {
9433 return err
9434 }
9435 case "paper_enabled_users_group_addition":
9436 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAddition)
9437
9438 if err != nil {
9439 return err
9440 }
9441 case "paper_enabled_users_group_removal":
9442 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemoval)
9443
9444 if err != nil {
9445 return err
9446 }
9447 case "permanent_delete_change_policy":
9448 err = json.Unmarshal(body, &u.PermanentDeleteChangePolicy)
9449
9450 if err != nil {
9451 return err
9452 }
9453 case "sharing_change_folder_join_policy":
9454 err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicy)
9455
9456 if err != nil {
9457 return err
9458 }
9459 case "sharing_change_link_policy":
9460 err = json.Unmarshal(body, &u.SharingChangeLinkPolicy)
9461
9462 if err != nil {
9463 return err
9464 }
9465 case "sharing_change_member_policy":
9466 err = json.Unmarshal(body, &u.SharingChangeMemberPolicy)
9467
9468 if err != nil {
9469 return err
9470 }
9471 case "showcase_change_download_policy":
9472 err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicy)
9473
9474 if err != nil {
9475 return err
9476 }
9477 case "showcase_change_enabled_policy":
9478 err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicy)
9479
9480 if err != nil {
9481 return err
9482 }
9483 case "showcase_change_external_sharing_policy":
9484 err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicy)
9485
9486 if err != nil {
9487 return err
9488 }
9489 case "smart_sync_change_policy":
9490 err = json.Unmarshal(body, &u.SmartSyncChangePolicy)
9491
9492 if err != nil {
9493 return err
9494 }
9495 case "smart_sync_not_opt_out":
9496 err = json.Unmarshal(body, &u.SmartSyncNotOptOut)
9497
9498 if err != nil {
9499 return err
9500 }
9501 case "smart_sync_opt_out":
9502 err = json.Unmarshal(body, &u.SmartSyncOptOut)
9503
9504 if err != nil {
9505 return err
9506 }
9507 case "sso_change_policy":
9508 err = json.Unmarshal(body, &u.SsoChangePolicy)
9509
9510 if err != nil {
9511 return err
9512 }
9513 case "team_selective_sync_policy_changed":
9514 err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChanged)
9515
9516 if err != nil {
9517 return err
9518 }
9519 case "tfa_change_policy":
9520 err = json.Unmarshal(body, &u.TfaChangePolicy)
9521
9522 if err != nil {
9523 return err
9524 }
9525 case "two_account_change_policy":
9526 err = json.Unmarshal(body, &u.TwoAccountChangePolicy)
9527
9528 if err != nil {
9529 return err
9530 }
9531 case "viewer_info_policy_changed":
9532 err = json.Unmarshal(body, &u.ViewerInfoPolicyChanged)
9533
9534 if err != nil {
9535 return err
9536 }
9537 case "web_sessions_change_fixed_length_policy":
9538 err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicy)
9539
9540 if err != nil {
9541 return err
9542 }
9543 case "web_sessions_change_idle_length_policy":
9544 err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicy)
9545
9546 if err != nil {
9547 return err
9548 }
9549 case "team_merge_from":
9550 err = json.Unmarshal(body, &u.TeamMergeFrom)
9551
9552 if err != nil {
9553 return err
9554 }
9555 case "team_merge_to":
9556 err = json.Unmarshal(body, &u.TeamMergeTo)
9557
9558 if err != nil {
9559 return err
9560 }
9561 case "team_profile_add_logo":
9562 err = json.Unmarshal(body, &u.TeamProfileAddLogo)
9563
9564 if err != nil {
9565 return err
9566 }
9567 case "team_profile_change_default_language":
9568 err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguage)
9569
9570 if err != nil {
9571 return err
9572 }
9573 case "team_profile_change_logo":
9574 err = json.Unmarshal(body, &u.TeamProfileChangeLogo)
9575
9576 if err != nil {
9577 return err
9578 }
9579 case "team_profile_change_name":
9580 err = json.Unmarshal(body, &u.TeamProfileChangeName)
9581
9582 if err != nil {
9583 return err
9584 }
9585 case "team_profile_remove_logo":
9586 err = json.Unmarshal(body, &u.TeamProfileRemoveLogo)
9587
9588 if err != nil {
9589 return err
9590 }
9591 case "tfa_add_backup_phone":
9592 err = json.Unmarshal(body, &u.TfaAddBackupPhone)
9593
9594 if err != nil {
9595 return err
9596 }
9597 case "tfa_add_security_key":
9598 err = json.Unmarshal(body, &u.TfaAddSecurityKey)
9599
9600 if err != nil {
9601 return err
9602 }
9603 case "tfa_change_backup_phone":
9604 err = json.Unmarshal(body, &u.TfaChangeBackupPhone)
9605
9606 if err != nil {
9607 return err
9608 }
9609 case "tfa_change_status":
9610 err = json.Unmarshal(body, &u.TfaChangeStatus)
9611
9612 if err != nil {
9613 return err
9614 }
9615 case "tfa_remove_backup_phone":
9616 err = json.Unmarshal(body, &u.TfaRemoveBackupPhone)
9617
9618 if err != nil {
9619 return err
9620 }
9621 case "tfa_remove_security_key":
9622 err = json.Unmarshal(body, &u.TfaRemoveSecurityKey)
9623
9624 if err != nil {
9625 return err
9626 }
9627 case "tfa_reset":
9628 err = json.Unmarshal(body, &u.TfaReset)
9629
9630 if err != nil {
9631 return err
9632 }
9633 }
9634 return nil
9635 }
9636
9637 // ExportMembersReportDetails : Created member data report.
9638 type ExportMembersReportDetails struct {
9639 }
9640
9641 // NewExportMembersReportDetails returns a new ExportMembersReportDetails instance
9642 func NewExportMembersReportDetails() *ExportMembersReportDetails {
9643 s := new(ExportMembersReportDetails)
9644 return s
9645 }
9646
9647 // ExportMembersReportType : has no documentation (yet)
9648 type ExportMembersReportType struct {
9649 // Description : has no documentation (yet)
9650 Description string `json:"description"`
9651 }
9652
9653 // NewExportMembersReportType returns a new ExportMembersReportType instance
9654 func NewExportMembersReportType(Description string) *ExportMembersReportType {
9655 s := new(ExportMembersReportType)
9656 s.Description = Description
9657 return s
9658 }
9659
9660 // ExtendedVersionHistoryChangePolicyDetails : Accepted/opted out of extended
9661 // version history.
9662 type ExtendedVersionHistoryChangePolicyDetails struct {
9663 // NewValue : New extended version history policy.
9664 NewValue *ExtendedVersionHistoryPolicy `json:"new_value"`
9665 // PreviousValue : Previous extended version history policy. Might be
9666 // missing due to historical data gap.
9667 PreviousValue *ExtendedVersionHistoryPolicy `json:"previous_value,omitempty"`
9668 }
9669
9670 // NewExtendedVersionHistoryChangePolicyDetails returns a new ExtendedVersionHistoryChangePolicyDetails instance
9671 func NewExtendedVersionHistoryChangePolicyDetails(NewValue *ExtendedVersionHistoryPolicy) *ExtendedVersionHistoryChangePolicyDetails {
9672 s := new(ExtendedVersionHistoryChangePolicyDetails)
9673 s.NewValue = NewValue
9674 return s
9675 }
9676
9677 // ExtendedVersionHistoryChangePolicyType : has no documentation (yet)
9678 type ExtendedVersionHistoryChangePolicyType struct {
9679 // Description : has no documentation (yet)
9680 Description string `json:"description"`
9681 }
9682
9683 // NewExtendedVersionHistoryChangePolicyType returns a new ExtendedVersionHistoryChangePolicyType instance
9684 func NewExtendedVersionHistoryChangePolicyType(Description string) *ExtendedVersionHistoryChangePolicyType {
9685 s := new(ExtendedVersionHistoryChangePolicyType)
9686 s.Description = Description
9687 return s
9688 }
9689
9690 // ExtendedVersionHistoryPolicy : has no documentation (yet)
9691 type ExtendedVersionHistoryPolicy struct {
9692 dropbox.Tagged
9693 }
9694
9695 // Valid tag values for ExtendedVersionHistoryPolicy
9696 const (
9697 ExtendedVersionHistoryPolicyExplicitlyLimited = "explicitly_limited"
9698 ExtendedVersionHistoryPolicyExplicitlyUnlimited = "explicitly_unlimited"
9699 ExtendedVersionHistoryPolicyImplicitlyLimited = "implicitly_limited"
9700 ExtendedVersionHistoryPolicyImplicitlyUnlimited = "implicitly_unlimited"
9701 ExtendedVersionHistoryPolicyOther = "other"
9702 )
9703
9704 // ExternalUserLogInfo : A user without a Dropbox account.
9705 type ExternalUserLogInfo struct {
9706 // UserIdentifier : An external user identifier.
9707 UserIdentifier string `json:"user_identifier"`
9708 // IdentifierType : Identifier type.
9709 IdentifierType *IdentifierType `json:"identifier_type"`
9710 }
9711
9712 // NewExternalUserLogInfo returns a new ExternalUserLogInfo instance
9713 func NewExternalUserLogInfo(UserIdentifier string, IdentifierType *IdentifierType) *ExternalUserLogInfo {
9714 s := new(ExternalUserLogInfo)
9715 s.UserIdentifier = UserIdentifier
9716 s.IdentifierType = IdentifierType
9717 return s
9718 }
9719
9720 // FailureDetailsLogInfo : Provides details about a failure
9721 type FailureDetailsLogInfo struct {
9722 // UserFriendlyMessage : A user friendly explanation of the error. Might be
9723 // missing due to historical data gap.
9724 UserFriendlyMessage string `json:"user_friendly_message,omitempty"`
9725 // TechnicalErrorMessage : A technical explanation of the error. This is
9726 // relevant for some errors.
9727 TechnicalErrorMessage string `json:"technical_error_message,omitempty"`
9728 }
9729
9730 // NewFailureDetailsLogInfo returns a new FailureDetailsLogInfo instance
9731 func NewFailureDetailsLogInfo() *FailureDetailsLogInfo {
9732 s := new(FailureDetailsLogInfo)
9733 return s
9734 }
9735
9736 // FileAddCommentDetails : Added file comment.
9737 type FileAddCommentDetails struct {
9738 // CommentText : Comment text. Might be missing due to historical data gap.
9739 CommentText string `json:"comment_text,omitempty"`
9740 }
9741
9742 // NewFileAddCommentDetails returns a new FileAddCommentDetails instance
9743 func NewFileAddCommentDetails() *FileAddCommentDetails {
9744 s := new(FileAddCommentDetails)
9745 return s
9746 }
9747
9748 // FileAddCommentType : has no documentation (yet)
9749 type FileAddCommentType struct {
9750 // Description : has no documentation (yet)
9751 Description string `json:"description"`
9752 }
9753
9754 // NewFileAddCommentType returns a new FileAddCommentType instance
9755 func NewFileAddCommentType(Description string) *FileAddCommentType {
9756 s := new(FileAddCommentType)
9757 s.Description = Description
9758 return s
9759 }
9760
9761 // FileAddDetails : Added files and/or folders.
9762 type FileAddDetails struct {
9763 }
9764
9765 // NewFileAddDetails returns a new FileAddDetails instance
9766 func NewFileAddDetails() *FileAddDetails {
9767 s := new(FileAddDetails)
9768 return s
9769 }
9770
9771 // FileAddType : has no documentation (yet)
9772 type FileAddType struct {
9773 // Description : has no documentation (yet)
9774 Description string `json:"description"`
9775 }
9776
9777 // NewFileAddType returns a new FileAddType instance
9778 func NewFileAddType(Description string) *FileAddType {
9779 s := new(FileAddType)
9780 s.Description = Description
9781 return s
9782 }
9783
9784 // FileChangeCommentSubscriptionDetails : Subscribed to or unsubscribed from
9785 // comment notifications for file.
9786 type FileChangeCommentSubscriptionDetails struct {
9787 // NewValue : New file comment subscription.
9788 NewValue *FileCommentNotificationPolicy `json:"new_value"`
9789 // PreviousValue : Previous file comment subscription. Might be missing due
9790 // to historical data gap.
9791 PreviousValue *FileCommentNotificationPolicy `json:"previous_value,omitempty"`
9792 }
9793
9794 // NewFileChangeCommentSubscriptionDetails returns a new FileChangeCommentSubscriptionDetails instance
9795 func NewFileChangeCommentSubscriptionDetails(NewValue *FileCommentNotificationPolicy) *FileChangeCommentSubscriptionDetails {
9796 s := new(FileChangeCommentSubscriptionDetails)
9797 s.NewValue = NewValue
9798 return s
9799 }
9800
9801 // FileChangeCommentSubscriptionType : has no documentation (yet)
9802 type FileChangeCommentSubscriptionType struct {
9803 // Description : has no documentation (yet)
9804 Description string `json:"description"`
9805 }
9806
9807 // NewFileChangeCommentSubscriptionType returns a new FileChangeCommentSubscriptionType instance
9808 func NewFileChangeCommentSubscriptionType(Description string) *FileChangeCommentSubscriptionType {
9809 s := new(FileChangeCommentSubscriptionType)
9810 s.Description = Description
9811 return s
9812 }
9813
9814 // FileCommentNotificationPolicy : Enable or disable file comments notifications
9815 type FileCommentNotificationPolicy struct {
9816 dropbox.Tagged
9817 }
9818
9819 // Valid tag values for FileCommentNotificationPolicy
9820 const (
9821 FileCommentNotificationPolicyDisabled = "disabled"
9822 FileCommentNotificationPolicyEnabled = "enabled"
9823 FileCommentNotificationPolicyOther = "other"
9824 )
9825
9826 // FileCommentsChangePolicyDetails : Enabled/disabled commenting on team files.
9827 type FileCommentsChangePolicyDetails struct {
9828 // NewValue : New commenting on team files policy.
9829 NewValue *FileCommentsPolicy `json:"new_value"`
9830 // PreviousValue : Previous commenting on team files policy. Might be
9831 // missing due to historical data gap.
9832 PreviousValue *FileCommentsPolicy `json:"previous_value,omitempty"`
9833 }
9834
9835 // NewFileCommentsChangePolicyDetails returns a new FileCommentsChangePolicyDetails instance
9836 func NewFileCommentsChangePolicyDetails(NewValue *FileCommentsPolicy) *FileCommentsChangePolicyDetails {
9837 s := new(FileCommentsChangePolicyDetails)
9838 s.NewValue = NewValue
9839 return s
9840 }
9841
9842 // FileCommentsChangePolicyType : has no documentation (yet)
9843 type FileCommentsChangePolicyType struct {
9844 // Description : has no documentation (yet)
9845 Description string `json:"description"`
9846 }
9847
9848 // NewFileCommentsChangePolicyType returns a new FileCommentsChangePolicyType instance
9849 func NewFileCommentsChangePolicyType(Description string) *FileCommentsChangePolicyType {
9850 s := new(FileCommentsChangePolicyType)
9851 s.Description = Description
9852 return s
9853 }
9854
9855 // FileCommentsPolicy : File comments policy
9856 type FileCommentsPolicy struct {
9857 dropbox.Tagged
9858 }
9859
9860 // Valid tag values for FileCommentsPolicy
9861 const (
9862 FileCommentsPolicyDisabled = "disabled"
9863 FileCommentsPolicyEnabled = "enabled"
9864 FileCommentsPolicyOther = "other"
9865 )
9866
9867 // FileCopyDetails : Copied files and/or folders.
9868 type FileCopyDetails struct {
9869 // RelocateActionDetails : Relocate action details.
9870 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
9871 }
9872
9873 // NewFileCopyDetails returns a new FileCopyDetails instance
9874 func NewFileCopyDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileCopyDetails {
9875 s := new(FileCopyDetails)
9876 s.RelocateActionDetails = RelocateActionDetails
9877 return s
9878 }
9879
9880 // FileCopyType : has no documentation (yet)
9881 type FileCopyType struct {
9882 // Description : has no documentation (yet)
9883 Description string `json:"description"`
9884 }
9885
9886 // NewFileCopyType returns a new FileCopyType instance
9887 func NewFileCopyType(Description string) *FileCopyType {
9888 s := new(FileCopyType)
9889 s.Description = Description
9890 return s
9891 }
9892
9893 // FileDeleteCommentDetails : Deleted file comment.
9894 type FileDeleteCommentDetails struct {
9895 // CommentText : Comment text. Might be missing due to historical data gap.
9896 CommentText string `json:"comment_text,omitempty"`
9897 }
9898
9899 // NewFileDeleteCommentDetails returns a new FileDeleteCommentDetails instance
9900 func NewFileDeleteCommentDetails() *FileDeleteCommentDetails {
9901 s := new(FileDeleteCommentDetails)
9902 return s
9903 }
9904
9905 // FileDeleteCommentType : has no documentation (yet)
9906 type FileDeleteCommentType struct {
9907 // Description : has no documentation (yet)
9908 Description string `json:"description"`
9909 }
9910
9911 // NewFileDeleteCommentType returns a new FileDeleteCommentType instance
9912 func NewFileDeleteCommentType(Description string) *FileDeleteCommentType {
9913 s := new(FileDeleteCommentType)
9914 s.Description = Description
9915 return s
9916 }
9917
9918 // FileDeleteDetails : Deleted files and/or folders.
9919 type FileDeleteDetails struct {
9920 }
9921
9922 // NewFileDeleteDetails returns a new FileDeleteDetails instance
9923 func NewFileDeleteDetails() *FileDeleteDetails {
9924 s := new(FileDeleteDetails)
9925 return s
9926 }
9927
9928 // FileDeleteType : has no documentation (yet)
9929 type FileDeleteType struct {
9930 // Description : has no documentation (yet)
9931 Description string `json:"description"`
9932 }
9933
9934 // NewFileDeleteType returns a new FileDeleteType instance
9935 func NewFileDeleteType(Description string) *FileDeleteType {
9936 s := new(FileDeleteType)
9937 s.Description = Description
9938 return s
9939 }
9940
9941 // FileDownloadDetails : Downloaded files and/or folders.
9942 type FileDownloadDetails struct {
9943 }
9944
9945 // NewFileDownloadDetails returns a new FileDownloadDetails instance
9946 func NewFileDownloadDetails() *FileDownloadDetails {
9947 s := new(FileDownloadDetails)
9948 return s
9949 }
9950
9951 // FileDownloadType : has no documentation (yet)
9952 type FileDownloadType struct {
9953 // Description : has no documentation (yet)
9954 Description string `json:"description"`
9955 }
9956
9957 // NewFileDownloadType returns a new FileDownloadType instance
9958 func NewFileDownloadType(Description string) *FileDownloadType {
9959 s := new(FileDownloadType)
9960 s.Description = Description
9961 return s
9962 }
9963
9964 // FileEditCommentDetails : Edited file comment.
9965 type FileEditCommentDetails struct {
9966 // CommentText : Comment text. Might be missing due to historical data gap.
9967 CommentText string `json:"comment_text,omitempty"`
9968 // PreviousCommentText : Previous comment text.
9969 PreviousCommentText string `json:"previous_comment_text"`
9970 }
9971
9972 // NewFileEditCommentDetails returns a new FileEditCommentDetails instance
9973 func NewFileEditCommentDetails(PreviousCommentText string) *FileEditCommentDetails {
9974 s := new(FileEditCommentDetails)
9975 s.PreviousCommentText = PreviousCommentText
9976 return s
9977 }
9978
9979 // FileEditCommentType : has no documentation (yet)
9980 type FileEditCommentType struct {
9981 // Description : has no documentation (yet)
9982 Description string `json:"description"`
9983 }
9984
9985 // NewFileEditCommentType returns a new FileEditCommentType instance
9986 func NewFileEditCommentType(Description string) *FileEditCommentType {
9987 s := new(FileEditCommentType)
9988 s.Description = Description
9989 return s
9990 }
9991
9992 // FileEditDetails : Edited files.
9993 type FileEditDetails struct {
9994 }
9995
9996 // NewFileEditDetails returns a new FileEditDetails instance
9997 func NewFileEditDetails() *FileEditDetails {
9998 s := new(FileEditDetails)
9999 return s
10000 }
10001
10002 // FileEditType : has no documentation (yet)
10003 type FileEditType struct {
10004 // Description : has no documentation (yet)
10005 Description string `json:"description"`
10006 }
10007
10008 // NewFileEditType returns a new FileEditType instance
10009 func NewFileEditType(Description string) *FileEditType {
10010 s := new(FileEditType)
10011 s.Description = Description
10012 return s
10013 }
10014
10015 // FileGetCopyReferenceDetails : Created copy reference to file/folder.
10016 type FileGetCopyReferenceDetails struct {
10017 }
10018
10019 // NewFileGetCopyReferenceDetails returns a new FileGetCopyReferenceDetails instance
10020 func NewFileGetCopyReferenceDetails() *FileGetCopyReferenceDetails {
10021 s := new(FileGetCopyReferenceDetails)
10022 return s
10023 }
10024
10025 // FileGetCopyReferenceType : has no documentation (yet)
10026 type FileGetCopyReferenceType struct {
10027 // Description : has no documentation (yet)
10028 Description string `json:"description"`
10029 }
10030
10031 // NewFileGetCopyReferenceType returns a new FileGetCopyReferenceType instance
10032 func NewFileGetCopyReferenceType(Description string) *FileGetCopyReferenceType {
10033 s := new(FileGetCopyReferenceType)
10034 s.Description = Description
10035 return s
10036 }
10037
10038 // FileLikeCommentDetails : Liked file comment.
10039 type FileLikeCommentDetails struct {
10040 // CommentText : Comment text. Might be missing due to historical data gap.
10041 CommentText string `json:"comment_text,omitempty"`
10042 }
10043
10044 // NewFileLikeCommentDetails returns a new FileLikeCommentDetails instance
10045 func NewFileLikeCommentDetails() *FileLikeCommentDetails {
10046 s := new(FileLikeCommentDetails)
10047 return s
10048 }
10049
10050 // FileLikeCommentType : has no documentation (yet)
10051 type FileLikeCommentType struct {
10052 // Description : has no documentation (yet)
10053 Description string `json:"description"`
10054 }
10055
10056 // NewFileLikeCommentType returns a new FileLikeCommentType instance
10057 func NewFileLikeCommentType(Description string) *FileLikeCommentType {
10058 s := new(FileLikeCommentType)
10059 s.Description = Description
10060 return s
10061 }
10062
10063 // FileOrFolderLogInfo : Generic information relevant both for files and folders
10064 type FileOrFolderLogInfo struct {
10065 // Path : Path relative to event context.
10066 Path *PathLogInfo `json:"path"`
10067 // DisplayName : Display name. Might be missing due to historical data gap.
10068 DisplayName string `json:"display_name,omitempty"`
10069 // FileId : Unique ID. Might be missing due to historical data gap.
10070 FileId string `json:"file_id,omitempty"`
10071 }
10072
10073 // NewFileOrFolderLogInfo returns a new FileOrFolderLogInfo instance
10074 func NewFileOrFolderLogInfo(Path *PathLogInfo) *FileOrFolderLogInfo {
10075 s := new(FileOrFolderLogInfo)
10076 s.Path = Path
10077 return s
10078 }
10079
10080 // FileLogInfo : File's logged information.
10081 type FileLogInfo struct {
10082 FileOrFolderLogInfo
10083 }
10084
10085 // NewFileLogInfo returns a new FileLogInfo instance
10086 func NewFileLogInfo(Path *PathLogInfo) *FileLogInfo {
10087 s := new(FileLogInfo)
10088 s.Path = Path
10089 return s
10090 }
10091
10092 // FileMoveDetails : Moved files and/or folders.
10093 type FileMoveDetails struct {
10094 // RelocateActionDetails : Relocate action details.
10095 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
10096 }
10097
10098 // NewFileMoveDetails returns a new FileMoveDetails instance
10099 func NewFileMoveDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileMoveDetails {
10100 s := new(FileMoveDetails)
10101 s.RelocateActionDetails = RelocateActionDetails
10102 return s
10103 }
10104
10105 // FileMoveType : has no documentation (yet)
10106 type FileMoveType struct {
10107 // Description : has no documentation (yet)
10108 Description string `json:"description"`
10109 }
10110
10111 // NewFileMoveType returns a new FileMoveType instance
10112 func NewFileMoveType(Description string) *FileMoveType {
10113 s := new(FileMoveType)
10114 s.Description = Description
10115 return s
10116 }
10117
10118 // FilePermanentlyDeleteDetails : Permanently deleted files and/or folders.
10119 type FilePermanentlyDeleteDetails struct {
10120 }
10121
10122 // NewFilePermanentlyDeleteDetails returns a new FilePermanentlyDeleteDetails instance
10123 func NewFilePermanentlyDeleteDetails() *FilePermanentlyDeleteDetails {
10124 s := new(FilePermanentlyDeleteDetails)
10125 return s
10126 }
10127
10128 // FilePermanentlyDeleteType : has no documentation (yet)
10129 type FilePermanentlyDeleteType struct {
10130 // Description : has no documentation (yet)
10131 Description string `json:"description"`
10132 }
10133
10134 // NewFilePermanentlyDeleteType returns a new FilePermanentlyDeleteType instance
10135 func NewFilePermanentlyDeleteType(Description string) *FilePermanentlyDeleteType {
10136 s := new(FilePermanentlyDeleteType)
10137 s.Description = Description
10138 return s
10139 }
10140
10141 // FilePreviewDetails : Previewed files and/or folders.
10142 type FilePreviewDetails struct {
10143 }
10144
10145 // NewFilePreviewDetails returns a new FilePreviewDetails instance
10146 func NewFilePreviewDetails() *FilePreviewDetails {
10147 s := new(FilePreviewDetails)
10148 return s
10149 }
10150
10151 // FilePreviewType : has no documentation (yet)
10152 type FilePreviewType struct {
10153 // Description : has no documentation (yet)
10154 Description string `json:"description"`
10155 }
10156
10157 // NewFilePreviewType returns a new FilePreviewType instance
10158 func NewFilePreviewType(Description string) *FilePreviewType {
10159 s := new(FilePreviewType)
10160 s.Description = Description
10161 return s
10162 }
10163
10164 // FileRenameDetails : Renamed files and/or folders.
10165 type FileRenameDetails struct {
10166 // RelocateActionDetails : Relocate action details.
10167 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
10168 }
10169
10170 // NewFileRenameDetails returns a new FileRenameDetails instance
10171 func NewFileRenameDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileRenameDetails {
10172 s := new(FileRenameDetails)
10173 s.RelocateActionDetails = RelocateActionDetails
10174 return s
10175 }
10176
10177 // FileRenameType : has no documentation (yet)
10178 type FileRenameType struct {
10179 // Description : has no documentation (yet)
10180 Description string `json:"description"`
10181 }
10182
10183 // NewFileRenameType returns a new FileRenameType instance
10184 func NewFileRenameType(Description string) *FileRenameType {
10185 s := new(FileRenameType)
10186 s.Description = Description
10187 return s
10188 }
10189
10190 // FileRequestChangeDetails : Changed file request.
10191 type FileRequestChangeDetails struct {
10192 // FileRequestId : File request id. Might be missing due to historical data
10193 // gap.
10194 FileRequestId string `json:"file_request_id,omitempty"`
10195 // PreviousDetails : Previous file request details. Might be missing due to
10196 // historical data gap.
10197 PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
10198 // NewDetails : New file request details.
10199 NewDetails *FileRequestDetails `json:"new_details"`
10200 }
10201
10202 // NewFileRequestChangeDetails returns a new FileRequestChangeDetails instance
10203 func NewFileRequestChangeDetails(NewDetails *FileRequestDetails) *FileRequestChangeDetails {
10204 s := new(FileRequestChangeDetails)
10205 s.NewDetails = NewDetails
10206 return s
10207 }
10208
10209 // FileRequestChangeType : has no documentation (yet)
10210 type FileRequestChangeType struct {
10211 // Description : has no documentation (yet)
10212 Description string `json:"description"`
10213 }
10214
10215 // NewFileRequestChangeType returns a new FileRequestChangeType instance
10216 func NewFileRequestChangeType(Description string) *FileRequestChangeType {
10217 s := new(FileRequestChangeType)
10218 s.Description = Description
10219 return s
10220 }
10221
10222 // FileRequestCloseDetails : Closed file request.
10223 type FileRequestCloseDetails struct {
10224 // FileRequestId : File request id. Might be missing due to historical data
10225 // gap.
10226 FileRequestId string `json:"file_request_id,omitempty"`
10227 // PreviousDetails : Previous file request details. Might be missing due to
10228 // historical data gap.
10229 PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
10230 }
10231
10232 // NewFileRequestCloseDetails returns a new FileRequestCloseDetails instance
10233 func NewFileRequestCloseDetails() *FileRequestCloseDetails {
10234 s := new(FileRequestCloseDetails)
10235 return s
10236 }
10237
10238 // FileRequestCloseType : has no documentation (yet)
10239 type FileRequestCloseType struct {
10240 // Description : has no documentation (yet)
10241 Description string `json:"description"`
10242 }
10243
10244 // NewFileRequestCloseType returns a new FileRequestCloseType instance
10245 func NewFileRequestCloseType(Description string) *FileRequestCloseType {
10246 s := new(FileRequestCloseType)
10247 s.Description = Description
10248 return s
10249 }
10250
10251 // FileRequestCreateDetails : Created file request.
10252 type FileRequestCreateDetails struct {
10253 // FileRequestId : File request id. Might be missing due to historical data
10254 // gap.
10255 FileRequestId string `json:"file_request_id,omitempty"`
10256 // RequestDetails : File request details. Might be missing due to historical
10257 // data gap.
10258 RequestDetails *FileRequestDetails `json:"request_details,omitempty"`
10259 }
10260
10261 // NewFileRequestCreateDetails returns a new FileRequestCreateDetails instance
10262 func NewFileRequestCreateDetails() *FileRequestCreateDetails {
10263 s := new(FileRequestCreateDetails)
10264 return s
10265 }
10266
10267 // FileRequestCreateType : has no documentation (yet)
10268 type FileRequestCreateType struct {
10269 // Description : has no documentation (yet)
10270 Description string `json:"description"`
10271 }
10272
10273 // NewFileRequestCreateType returns a new FileRequestCreateType instance
10274 func NewFileRequestCreateType(Description string) *FileRequestCreateType {
10275 s := new(FileRequestCreateType)
10276 s.Description = Description
10277 return s
10278 }
10279
10280 // FileRequestDeadline : File request deadline
10281 type FileRequestDeadline struct {
10282 // Deadline : The deadline for this file request. Might be missing due to
10283 // historical data gap.
10284 Deadline time.Time `json:"deadline,omitempty"`
10285 // AllowLateUploads : If set, allow uploads after the deadline has passed.
10286 // Might be missing due to historical data gap.
10287 AllowLateUploads string `json:"allow_late_uploads,omitempty"`
10288 }
10289
10290 // NewFileRequestDeadline returns a new FileRequestDeadline instance
10291 func NewFileRequestDeadline() *FileRequestDeadline {
10292 s := new(FileRequestDeadline)
10293 return s
10294 }
10295
10296 // FileRequestDetails : File request details
10297 type FileRequestDetails struct {
10298 // AssetIndex : Asset position in the Assets list.
10299 AssetIndex uint64 `json:"asset_index"`
10300 // Deadline : File request deadline. Might be missing due to historical data
10301 // gap.
10302 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
10303 }
10304
10305 // NewFileRequestDetails returns a new FileRequestDetails instance
10306 func NewFileRequestDetails(AssetIndex uint64) *FileRequestDetails {
10307 s := new(FileRequestDetails)
10308 s.AssetIndex = AssetIndex
10309 return s
10310 }
10311
10312 // FileRequestReceiveFileDetails : Received files for file request.
10313 type FileRequestReceiveFileDetails struct {
10314 // FileRequestId : File request id. Might be missing due to historical data
10315 // gap.
10316 FileRequestId string `json:"file_request_id,omitempty"`
10317 // FileRequestDetails : File request details. Might be missing due to
10318 // historical data gap.
10319 FileRequestDetails *FileRequestDetails `json:"file_request_details,omitempty"`
10320 // SubmittedFileNames : Submitted file names.
10321 SubmittedFileNames []string `json:"submitted_file_names"`
10322 // SubmitterName : The name as provided by the submitter. Might be missing
10323 // due to historical data gap.
10324 SubmitterName string `json:"submitter_name,omitempty"`
10325 // SubmitterEmail : The email as provided by the submitter. Might be missing
10326 // due to historical data gap.
10327 SubmitterEmail string `json:"submitter_email,omitempty"`
10328 }
10329
10330 // NewFileRequestReceiveFileDetails returns a new FileRequestReceiveFileDetails instance
10331 func NewFileRequestReceiveFileDetails(SubmittedFileNames []string) *FileRequestReceiveFileDetails {
10332 s := new(FileRequestReceiveFileDetails)
10333 s.SubmittedFileNames = SubmittedFileNames
10334 return s
10335 }
10336
10337 // FileRequestReceiveFileType : has no documentation (yet)
10338 type FileRequestReceiveFileType struct {
10339 // Description : has no documentation (yet)
10340 Description string `json:"description"`
10341 }
10342
10343 // NewFileRequestReceiveFileType returns a new FileRequestReceiveFileType instance
10344 func NewFileRequestReceiveFileType(Description string) *FileRequestReceiveFileType {
10345 s := new(FileRequestReceiveFileType)
10346 s.Description = Description
10347 return s
10348 }
10349
10350 // FileRequestsChangePolicyDetails : Enabled/disabled file requests.
10351 type FileRequestsChangePolicyDetails struct {
10352 // NewValue : New file requests policy.
10353 NewValue *FileRequestsPolicy `json:"new_value"`
10354 // PreviousValue : Previous file requests policy. Might be missing due to
10355 // historical data gap.
10356 PreviousValue *FileRequestsPolicy `json:"previous_value,omitempty"`
10357 }
10358
10359 // NewFileRequestsChangePolicyDetails returns a new FileRequestsChangePolicyDetails instance
10360 func NewFileRequestsChangePolicyDetails(NewValue *FileRequestsPolicy) *FileRequestsChangePolicyDetails {
10361 s := new(FileRequestsChangePolicyDetails)
10362 s.NewValue = NewValue
10363 return s
10364 }
10365
10366 // FileRequestsChangePolicyType : has no documentation (yet)
10367 type FileRequestsChangePolicyType struct {
10368 // Description : has no documentation (yet)
10369 Description string `json:"description"`
10370 }
10371
10372 // NewFileRequestsChangePolicyType returns a new FileRequestsChangePolicyType instance
10373 func NewFileRequestsChangePolicyType(Description string) *FileRequestsChangePolicyType {
10374 s := new(FileRequestsChangePolicyType)
10375 s.Description = Description
10376 return s
10377 }
10378
10379 // FileRequestsEmailsEnabledDetails : Enabled file request emails for everyone.
10380 type FileRequestsEmailsEnabledDetails struct {
10381 }
10382
10383 // NewFileRequestsEmailsEnabledDetails returns a new FileRequestsEmailsEnabledDetails instance
10384 func NewFileRequestsEmailsEnabledDetails() *FileRequestsEmailsEnabledDetails {
10385 s := new(FileRequestsEmailsEnabledDetails)
10386 return s
10387 }
10388
10389 // FileRequestsEmailsEnabledType : has no documentation (yet)
10390 type FileRequestsEmailsEnabledType struct {
10391 // Description : has no documentation (yet)
10392 Description string `json:"description"`
10393 }
10394
10395 // NewFileRequestsEmailsEnabledType returns a new FileRequestsEmailsEnabledType instance
10396 func NewFileRequestsEmailsEnabledType(Description string) *FileRequestsEmailsEnabledType {
10397 s := new(FileRequestsEmailsEnabledType)
10398 s.Description = Description
10399 return s
10400 }
10401
10402 // FileRequestsEmailsRestrictedToTeamOnlyDetails : Enabled file request emails
10403 // for team.
10404 type FileRequestsEmailsRestrictedToTeamOnlyDetails struct {
10405 }
10406
10407 // NewFileRequestsEmailsRestrictedToTeamOnlyDetails returns a new FileRequestsEmailsRestrictedToTeamOnlyDetails instance
10408 func NewFileRequestsEmailsRestrictedToTeamOnlyDetails() *FileRequestsEmailsRestrictedToTeamOnlyDetails {
10409 s := new(FileRequestsEmailsRestrictedToTeamOnlyDetails)
10410 return s
10411 }
10412
10413 // FileRequestsEmailsRestrictedToTeamOnlyType : has no documentation (yet)
10414 type FileRequestsEmailsRestrictedToTeamOnlyType struct {
10415 // Description : has no documentation (yet)
10416 Description string `json:"description"`
10417 }
10418
10419 // NewFileRequestsEmailsRestrictedToTeamOnlyType returns a new FileRequestsEmailsRestrictedToTeamOnlyType instance
10420 func NewFileRequestsEmailsRestrictedToTeamOnlyType(Description string) *FileRequestsEmailsRestrictedToTeamOnlyType {
10421 s := new(FileRequestsEmailsRestrictedToTeamOnlyType)
10422 s.Description = Description
10423 return s
10424 }
10425
10426 // FileRequestsPolicy : File requests policy
10427 type FileRequestsPolicy struct {
10428 dropbox.Tagged
10429 }
10430
10431 // Valid tag values for FileRequestsPolicy
10432 const (
10433 FileRequestsPolicyDisabled = "disabled"
10434 FileRequestsPolicyEnabled = "enabled"
10435 FileRequestsPolicyOther = "other"
10436 )
10437
10438 // FileResolveCommentDetails : Resolved file comment.
10439 type FileResolveCommentDetails struct {
10440 // CommentText : Comment text. Might be missing due to historical data gap.
10441 CommentText string `json:"comment_text,omitempty"`
10442 }
10443
10444 // NewFileResolveCommentDetails returns a new FileResolveCommentDetails instance
10445 func NewFileResolveCommentDetails() *FileResolveCommentDetails {
10446 s := new(FileResolveCommentDetails)
10447 return s
10448 }
10449
10450 // FileResolveCommentType : has no documentation (yet)
10451 type FileResolveCommentType struct {
10452 // Description : has no documentation (yet)
10453 Description string `json:"description"`
10454 }
10455
10456 // NewFileResolveCommentType returns a new FileResolveCommentType instance
10457 func NewFileResolveCommentType(Description string) *FileResolveCommentType {
10458 s := new(FileResolveCommentType)
10459 s.Description = Description
10460 return s
10461 }
10462
10463 // FileRestoreDetails : Restored deleted files and/or folders.
10464 type FileRestoreDetails struct {
10465 }
10466
10467 // NewFileRestoreDetails returns a new FileRestoreDetails instance
10468 func NewFileRestoreDetails() *FileRestoreDetails {
10469 s := new(FileRestoreDetails)
10470 return s
10471 }
10472
10473 // FileRestoreType : has no documentation (yet)
10474 type FileRestoreType struct {
10475 // Description : has no documentation (yet)
10476 Description string `json:"description"`
10477 }
10478
10479 // NewFileRestoreType returns a new FileRestoreType instance
10480 func NewFileRestoreType(Description string) *FileRestoreType {
10481 s := new(FileRestoreType)
10482 s.Description = Description
10483 return s
10484 }
10485
10486 // FileRevertDetails : Reverted files to previous version.
10487 type FileRevertDetails struct {
10488 }
10489
10490 // NewFileRevertDetails returns a new FileRevertDetails instance
10491 func NewFileRevertDetails() *FileRevertDetails {
10492 s := new(FileRevertDetails)
10493 return s
10494 }
10495
10496 // FileRevertType : has no documentation (yet)
10497 type FileRevertType struct {
10498 // Description : has no documentation (yet)
10499 Description string `json:"description"`
10500 }
10501
10502 // NewFileRevertType returns a new FileRevertType instance
10503 func NewFileRevertType(Description string) *FileRevertType {
10504 s := new(FileRevertType)
10505 s.Description = Description
10506 return s
10507 }
10508
10509 // FileRollbackChangesDetails : Rolled back file actions.
10510 type FileRollbackChangesDetails struct {
10511 }
10512
10513 // NewFileRollbackChangesDetails returns a new FileRollbackChangesDetails instance
10514 func NewFileRollbackChangesDetails() *FileRollbackChangesDetails {
10515 s := new(FileRollbackChangesDetails)
10516 return s
10517 }
10518
10519 // FileRollbackChangesType : has no documentation (yet)
10520 type FileRollbackChangesType struct {
10521 // Description : has no documentation (yet)
10522 Description string `json:"description"`
10523 }
10524
10525 // NewFileRollbackChangesType returns a new FileRollbackChangesType instance
10526 func NewFileRollbackChangesType(Description string) *FileRollbackChangesType {
10527 s := new(FileRollbackChangesType)
10528 s.Description = Description
10529 return s
10530 }
10531
10532 // FileSaveCopyReferenceDetails : Saved file/folder using copy reference.
10533 type FileSaveCopyReferenceDetails struct {
10534 // RelocateActionDetails : Relocate action details.
10535 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
10536 }
10537
10538 // NewFileSaveCopyReferenceDetails returns a new FileSaveCopyReferenceDetails instance
10539 func NewFileSaveCopyReferenceDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileSaveCopyReferenceDetails {
10540 s := new(FileSaveCopyReferenceDetails)
10541 s.RelocateActionDetails = RelocateActionDetails
10542 return s
10543 }
10544
10545 // FileSaveCopyReferenceType : has no documentation (yet)
10546 type FileSaveCopyReferenceType struct {
10547 // Description : has no documentation (yet)
10548 Description string `json:"description"`
10549 }
10550
10551 // NewFileSaveCopyReferenceType returns a new FileSaveCopyReferenceType instance
10552 func NewFileSaveCopyReferenceType(Description string) *FileSaveCopyReferenceType {
10553 s := new(FileSaveCopyReferenceType)
10554 s.Description = Description
10555 return s
10556 }
10557
10558 // FileUnlikeCommentDetails : Unliked file comment.
10559 type FileUnlikeCommentDetails struct {
10560 // CommentText : Comment text. Might be missing due to historical data gap.
10561 CommentText string `json:"comment_text,omitempty"`
10562 }
10563
10564 // NewFileUnlikeCommentDetails returns a new FileUnlikeCommentDetails instance
10565 func NewFileUnlikeCommentDetails() *FileUnlikeCommentDetails {
10566 s := new(FileUnlikeCommentDetails)
10567 return s
10568 }
10569
10570 // FileUnlikeCommentType : has no documentation (yet)
10571 type FileUnlikeCommentType struct {
10572 // Description : has no documentation (yet)
10573 Description string `json:"description"`
10574 }
10575
10576 // NewFileUnlikeCommentType returns a new FileUnlikeCommentType instance
10577 func NewFileUnlikeCommentType(Description string) *FileUnlikeCommentType {
10578 s := new(FileUnlikeCommentType)
10579 s.Description = Description
10580 return s
10581 }
10582
10583 // FileUnresolveCommentDetails : Unresolved file comment.
10584 type FileUnresolveCommentDetails struct {
10585 // CommentText : Comment text. Might be missing due to historical data gap.
10586 CommentText string `json:"comment_text,omitempty"`
10587 }
10588
10589 // NewFileUnresolveCommentDetails returns a new FileUnresolveCommentDetails instance
10590 func NewFileUnresolveCommentDetails() *FileUnresolveCommentDetails {
10591 s := new(FileUnresolveCommentDetails)
10592 return s
10593 }
10594
10595 // FileUnresolveCommentType : has no documentation (yet)
10596 type FileUnresolveCommentType struct {
10597 // Description : has no documentation (yet)
10598 Description string `json:"description"`
10599 }
10600
10601 // NewFileUnresolveCommentType returns a new FileUnresolveCommentType instance
10602 func NewFileUnresolveCommentType(Description string) *FileUnresolveCommentType {
10603 s := new(FileUnresolveCommentType)
10604 s.Description = Description
10605 return s
10606 }
10607
10608 // FolderLogInfo : Folder's logged information.
10609 type FolderLogInfo struct {
10610 FileOrFolderLogInfo
10611 }
10612
10613 // NewFolderLogInfo returns a new FolderLogInfo instance
10614 func NewFolderLogInfo(Path *PathLogInfo) *FolderLogInfo {
10615 s := new(FolderLogInfo)
10616 s.Path = Path
10617 return s
10618 }
10619
10620 // GeoLocationLogInfo : Geographic location details.
10621 type GeoLocationLogInfo struct {
10622 // City : City name.
10623 City string `json:"city,omitempty"`
10624 // Region : Region name.
10625 Region string `json:"region,omitempty"`
10626 // Country : Country code.
10627 Country string `json:"country,omitempty"`
10628 // IpAddress : IP address.
10629 IpAddress string `json:"ip_address"`
10630 }
10631
10632 // NewGeoLocationLogInfo returns a new GeoLocationLogInfo instance
10633 func NewGeoLocationLogInfo(IpAddress string) *GeoLocationLogInfo {
10634 s := new(GeoLocationLogInfo)
10635 s.IpAddress = IpAddress
10636 return s
10637 }
10638
10639 // GetTeamEventsArg : has no documentation (yet)
10640 type GetTeamEventsArg struct {
10641 // Limit : The maximal number of results to return per call. Note that some
10642 // calls may not return `limit` number of events, and may even return no
10643 // events, even with `has_more` set to true. In this case, callers should
10644 // fetch again using `getEventsContinue`.
10645 Limit uint32 `json:"limit"`
10646 // AccountId : Filter the events by account ID. Return ony events with this
10647 // account_id as either Actor, Context, or Participants.
10648 AccountId string `json:"account_id,omitempty"`
10649 // Time : Filter by time range.
10650 Time *team_common.TimeRange `json:"time,omitempty"`
10651 // Category : Filter the returned events to a single category.
10652 Category *EventCategory `json:"category,omitempty"`
10653 }
10654
10655 // NewGetTeamEventsArg returns a new GetTeamEventsArg instance
10656 func NewGetTeamEventsArg() *GetTeamEventsArg {
10657 s := new(GetTeamEventsArg)
10658 s.Limit = 1000
10659 return s
10660 }
10661
10662 // GetTeamEventsContinueArg : has no documentation (yet)
10663 type GetTeamEventsContinueArg struct {
10664 // Cursor : Indicates from what point to get the next set of events.
10665 Cursor string `json:"cursor"`
10666 }
10667
10668 // NewGetTeamEventsContinueArg returns a new GetTeamEventsContinueArg instance
10669 func NewGetTeamEventsContinueArg(Cursor string) *GetTeamEventsContinueArg {
10670 s := new(GetTeamEventsContinueArg)
10671 s.Cursor = Cursor
10672 return s
10673 }
10674
10675 // GetTeamEventsContinueError : Errors that can be raised when calling
10676 // `getEventsContinue`.
10677 type GetTeamEventsContinueError struct {
10678 dropbox.Tagged
10679 // Reset : Cursors are intended to be used quickly. Individual cursor values
10680 // are normally valid for days, but in rare cases may be reset sooner.
10681 // Cursor reset errors should be handled by fetching a new cursor from
10682 // `getEvents`. The associated value is the approximate timestamp of the
10683 // most recent event returned by the cursor. This should be used as a
10684 // resumption point when calling `getEvents` to obtain a new cursor.
10685 Reset time.Time `json:"reset,omitempty"`
10686 }
10687
10688 // Valid tag values for GetTeamEventsContinueError
10689 const (
10690 GetTeamEventsContinueErrorBadCursor = "bad_cursor"
10691 GetTeamEventsContinueErrorReset = "reset"
10692 GetTeamEventsContinueErrorOther = "other"
10693 )
10694
10695 // UnmarshalJSON deserializes into a GetTeamEventsContinueError instance
10696 func (u *GetTeamEventsContinueError) UnmarshalJSON(body []byte) error {
10697 type wrap struct {
10698 dropbox.Tagged
10699 }
10700 var w wrap
10701 var err error
10702 if err = json.Unmarshal(body, &w); err != nil {
10703 return err
10704 }
10705 u.Tag = w.Tag
10706 switch u.Tag {
10707 case "reset":
10708 err = json.Unmarshal(body, &u.Reset)
10709
10710 if err != nil {
10711 return err
10712 }
10713 }
10714 return nil
10715 }
10716
10717 // GetTeamEventsError : Errors that can be raised when calling `getEvents`.
10718 type GetTeamEventsError struct {
10719 dropbox.Tagged
10720 }
10721
10722 // Valid tag values for GetTeamEventsError
10723 const (
10724 GetTeamEventsErrorAccountIdNotFound = "account_id_not_found"
10725 GetTeamEventsErrorInvalidTimeRange = "invalid_time_range"
10726 GetTeamEventsErrorOther = "other"
10727 )
10728
10729 // GetTeamEventsResult : has no documentation (yet)
10730 type GetTeamEventsResult struct {
10731 // Events : List of events. Note that events are not guaranteed to be sorted
10732 // by their timestamp value.
10733 Events []*TeamEvent `json:"events"`
10734 // Cursor : Pass the cursor into `getEventsContinue` to obtain additional
10735 // events. The value of `cursor` may change for each response from
10736 // `getEventsContinue`, regardless of the value of `has_more`; older cursor
10737 // strings may expire. Thus, callers should ensure that they update their
10738 // cursor based on the latest value of `cursor` after each call, and poll
10739 // regularly if they wish to poll for new events. Callers should handle
10740 // reset exceptions for expired cursors.
10741 Cursor string `json:"cursor"`
10742 // HasMore : Is true if there may be additional events that have not been
10743 // returned yet. An additional call to `getEventsContinue` can retrieve
10744 // them. Note that `has_more` may be true, even if `events` is empty.
10745 HasMore bool `json:"has_more"`
10746 }
10747
10748 // NewGetTeamEventsResult returns a new GetTeamEventsResult instance
10749 func NewGetTeamEventsResult(Events []*TeamEvent, Cursor string, HasMore bool) *GetTeamEventsResult {
10750 s := new(GetTeamEventsResult)
10751 s.Events = Events
10752 s.Cursor = Cursor
10753 s.HasMore = HasMore
10754 return s
10755 }
10756
10757 // GoogleSsoChangePolicyDetails : Enabled/disabled Google single sign-on for
10758 // team.
10759 type GoogleSsoChangePolicyDetails struct {
10760 // NewValue : New Google single sign-on policy.
10761 NewValue *GoogleSsoPolicy `json:"new_value"`
10762 // PreviousValue : Previous Google single sign-on policy. Might be missing
10763 // due to historical data gap.
10764 PreviousValue *GoogleSsoPolicy `json:"previous_value,omitempty"`
10765 }
10766
10767 // NewGoogleSsoChangePolicyDetails returns a new GoogleSsoChangePolicyDetails instance
10768 func NewGoogleSsoChangePolicyDetails(NewValue *GoogleSsoPolicy) *GoogleSsoChangePolicyDetails {
10769 s := new(GoogleSsoChangePolicyDetails)
10770 s.NewValue = NewValue
10771 return s
10772 }
10773
10774 // GoogleSsoChangePolicyType : has no documentation (yet)
10775 type GoogleSsoChangePolicyType struct {
10776 // Description : has no documentation (yet)
10777 Description string `json:"description"`
10778 }
10779
10780 // NewGoogleSsoChangePolicyType returns a new GoogleSsoChangePolicyType instance
10781 func NewGoogleSsoChangePolicyType(Description string) *GoogleSsoChangePolicyType {
10782 s := new(GoogleSsoChangePolicyType)
10783 s.Description = Description
10784 return s
10785 }
10786
10787 // GoogleSsoPolicy : Google SSO policy
10788 type GoogleSsoPolicy struct {
10789 dropbox.Tagged
10790 }
10791
10792 // Valid tag values for GoogleSsoPolicy
10793 const (
10794 GoogleSsoPolicyDisabled = "disabled"
10795 GoogleSsoPolicyEnabled = "enabled"
10796 GoogleSsoPolicyOther = "other"
10797 )
10798
10799 // GroupAddExternalIdDetails : Added external ID for group.
10800 type GroupAddExternalIdDetails struct {
10801 // NewValue : Current external id.
10802 NewValue string `json:"new_value"`
10803 }
10804
10805 // NewGroupAddExternalIdDetails returns a new GroupAddExternalIdDetails instance
10806 func NewGroupAddExternalIdDetails(NewValue string) *GroupAddExternalIdDetails {
10807 s := new(GroupAddExternalIdDetails)
10808 s.NewValue = NewValue
10809 return s
10810 }
10811
10812 // GroupAddExternalIdType : has no documentation (yet)
10813 type GroupAddExternalIdType struct {
10814 // Description : has no documentation (yet)
10815 Description string `json:"description"`
10816 }
10817
10818 // NewGroupAddExternalIdType returns a new GroupAddExternalIdType instance
10819 func NewGroupAddExternalIdType(Description string) *GroupAddExternalIdType {
10820 s := new(GroupAddExternalIdType)
10821 s.Description = Description
10822 return s
10823 }
10824
10825 // GroupAddMemberDetails : Added team members to group.
10826 type GroupAddMemberDetails struct {
10827 // IsGroupOwner : Is group owner.
10828 IsGroupOwner bool `json:"is_group_owner"`
10829 }
10830
10831 // NewGroupAddMemberDetails returns a new GroupAddMemberDetails instance
10832 func NewGroupAddMemberDetails(IsGroupOwner bool) *GroupAddMemberDetails {
10833 s := new(GroupAddMemberDetails)
10834 s.IsGroupOwner = IsGroupOwner
10835 return s
10836 }
10837
10838 // GroupAddMemberType : has no documentation (yet)
10839 type GroupAddMemberType struct {
10840 // Description : has no documentation (yet)
10841 Description string `json:"description"`
10842 }
10843
10844 // NewGroupAddMemberType returns a new GroupAddMemberType instance
10845 func NewGroupAddMemberType(Description string) *GroupAddMemberType {
10846 s := new(GroupAddMemberType)
10847 s.Description = Description
10848 return s
10849 }
10850
10851 // GroupChangeExternalIdDetails : Changed external ID for group.
10852 type GroupChangeExternalIdDetails struct {
10853 // NewValue : Current external id.
10854 NewValue string `json:"new_value"`
10855 // PreviousValue : Old external id.
10856 PreviousValue string `json:"previous_value"`
10857 }
10858
10859 // NewGroupChangeExternalIdDetails returns a new GroupChangeExternalIdDetails instance
10860 func NewGroupChangeExternalIdDetails(NewValue string, PreviousValue string) *GroupChangeExternalIdDetails {
10861 s := new(GroupChangeExternalIdDetails)
10862 s.NewValue = NewValue
10863 s.PreviousValue = PreviousValue
10864 return s
10865 }
10866
10867 // GroupChangeExternalIdType : has no documentation (yet)
10868 type GroupChangeExternalIdType struct {
10869 // Description : has no documentation (yet)
10870 Description string `json:"description"`
10871 }
10872
10873 // NewGroupChangeExternalIdType returns a new GroupChangeExternalIdType instance
10874 func NewGroupChangeExternalIdType(Description string) *GroupChangeExternalIdType {
10875 s := new(GroupChangeExternalIdType)
10876 s.Description = Description
10877 return s
10878 }
10879
10880 // GroupChangeManagementTypeDetails : Changed group management type.
10881 type GroupChangeManagementTypeDetails struct {
10882 // NewValue : New group management type.
10883 NewValue *team_common.GroupManagementType `json:"new_value"`
10884 // PreviousValue : Previous group management type. Might be missing due to
10885 // historical data gap.
10886 PreviousValue *team_common.GroupManagementType `json:"previous_value,omitempty"`
10887 }
10888
10889 // NewGroupChangeManagementTypeDetails returns a new GroupChangeManagementTypeDetails instance
10890 func NewGroupChangeManagementTypeDetails(NewValue *team_common.GroupManagementType) *GroupChangeManagementTypeDetails {
10891 s := new(GroupChangeManagementTypeDetails)
10892 s.NewValue = NewValue
10893 return s
10894 }
10895
10896 // GroupChangeManagementTypeType : has no documentation (yet)
10897 type GroupChangeManagementTypeType struct {
10898 // Description : has no documentation (yet)
10899 Description string `json:"description"`
10900 }
10901
10902 // NewGroupChangeManagementTypeType returns a new GroupChangeManagementTypeType instance
10903 func NewGroupChangeManagementTypeType(Description string) *GroupChangeManagementTypeType {
10904 s := new(GroupChangeManagementTypeType)
10905 s.Description = Description
10906 return s
10907 }
10908
10909 // GroupChangeMemberRoleDetails : Changed manager permissions of group member.
10910 type GroupChangeMemberRoleDetails struct {
10911 // IsGroupOwner : Is group owner.
10912 IsGroupOwner bool `json:"is_group_owner"`
10913 }
10914
10915 // NewGroupChangeMemberRoleDetails returns a new GroupChangeMemberRoleDetails instance
10916 func NewGroupChangeMemberRoleDetails(IsGroupOwner bool) *GroupChangeMemberRoleDetails {
10917 s := new(GroupChangeMemberRoleDetails)
10918 s.IsGroupOwner = IsGroupOwner
10919 return s
10920 }
10921
10922 // GroupChangeMemberRoleType : has no documentation (yet)
10923 type GroupChangeMemberRoleType struct {
10924 // Description : has no documentation (yet)
10925 Description string `json:"description"`
10926 }
10927
10928 // NewGroupChangeMemberRoleType returns a new GroupChangeMemberRoleType instance
10929 func NewGroupChangeMemberRoleType(Description string) *GroupChangeMemberRoleType {
10930 s := new(GroupChangeMemberRoleType)
10931 s.Description = Description
10932 return s
10933 }
10934
10935 // GroupCreateDetails : Created group.
10936 type GroupCreateDetails struct {
10937 // IsCompanyManaged : Is company managed group. Might be missing due to
10938 // historical data gap.
10939 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
10940 // JoinPolicy : Group join policy.
10941 JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"`
10942 }
10943
10944 // NewGroupCreateDetails returns a new GroupCreateDetails instance
10945 func NewGroupCreateDetails() *GroupCreateDetails {
10946 s := new(GroupCreateDetails)
10947 return s
10948 }
10949
10950 // GroupCreateType : has no documentation (yet)
10951 type GroupCreateType struct {
10952 // Description : has no documentation (yet)
10953 Description string `json:"description"`
10954 }
10955
10956 // NewGroupCreateType returns a new GroupCreateType instance
10957 func NewGroupCreateType(Description string) *GroupCreateType {
10958 s := new(GroupCreateType)
10959 s.Description = Description
10960 return s
10961 }
10962
10963 // GroupDeleteDetails : Deleted group.
10964 type GroupDeleteDetails struct {
10965 // IsCompanyManaged : Is company managed group. Might be missing due to
10966 // historical data gap.
10967 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
10968 }
10969
10970 // NewGroupDeleteDetails returns a new GroupDeleteDetails instance
10971 func NewGroupDeleteDetails() *GroupDeleteDetails {
10972 s := new(GroupDeleteDetails)
10973 return s
10974 }
10975
10976 // GroupDeleteType : has no documentation (yet)
10977 type GroupDeleteType struct {
10978 // Description : has no documentation (yet)
10979 Description string `json:"description"`
10980 }
10981
10982 // NewGroupDeleteType returns a new GroupDeleteType instance
10983 func NewGroupDeleteType(Description string) *GroupDeleteType {
10984 s := new(GroupDeleteType)
10985 s.Description = Description
10986 return s
10987 }
10988
10989 // GroupDescriptionUpdatedDetails : Updated group.
10990 type GroupDescriptionUpdatedDetails struct {
10991 }
10992
10993 // NewGroupDescriptionUpdatedDetails returns a new GroupDescriptionUpdatedDetails instance
10994 func NewGroupDescriptionUpdatedDetails() *GroupDescriptionUpdatedDetails {
10995 s := new(GroupDescriptionUpdatedDetails)
10996 return s
10997 }
10998
10999 // GroupDescriptionUpdatedType : has no documentation (yet)
11000 type GroupDescriptionUpdatedType struct {
11001 // Description : has no documentation (yet)
11002 Description string `json:"description"`
11003 }
11004
11005 // NewGroupDescriptionUpdatedType returns a new GroupDescriptionUpdatedType instance
11006 func NewGroupDescriptionUpdatedType(Description string) *GroupDescriptionUpdatedType {
11007 s := new(GroupDescriptionUpdatedType)
11008 s.Description = Description
11009 return s
11010 }
11011
11012 // GroupJoinPolicy : has no documentation (yet)
11013 type GroupJoinPolicy struct {
11014 dropbox.Tagged
11015 }
11016
11017 // Valid tag values for GroupJoinPolicy
11018 const (
11019 GroupJoinPolicyOpen = "open"
11020 GroupJoinPolicyRequestToJoin = "request_to_join"
11021 GroupJoinPolicyOther = "other"
11022 )
11023
11024 // GroupJoinPolicyUpdatedDetails : Updated group join policy.
11025 type GroupJoinPolicyUpdatedDetails struct {
11026 // IsCompanyManaged : Is company managed group. Might be missing due to
11027 // historical data gap.
11028 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
11029 // JoinPolicy : Group join policy.
11030 JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"`
11031 }
11032
11033 // NewGroupJoinPolicyUpdatedDetails returns a new GroupJoinPolicyUpdatedDetails instance
11034 func NewGroupJoinPolicyUpdatedDetails() *GroupJoinPolicyUpdatedDetails {
11035 s := new(GroupJoinPolicyUpdatedDetails)
11036 return s
11037 }
11038
11039 // GroupJoinPolicyUpdatedType : has no documentation (yet)
11040 type GroupJoinPolicyUpdatedType struct {
11041 // Description : has no documentation (yet)
11042 Description string `json:"description"`
11043 }
11044
11045 // NewGroupJoinPolicyUpdatedType returns a new GroupJoinPolicyUpdatedType instance
11046 func NewGroupJoinPolicyUpdatedType(Description string) *GroupJoinPolicyUpdatedType {
11047 s := new(GroupJoinPolicyUpdatedType)
11048 s.Description = Description
11049 return s
11050 }
11051
11052 // GroupLogInfo : Group's logged information.
11053 type GroupLogInfo struct {
11054 // GroupId : The unique id of this group. Might be missing due to historical
11055 // data gap.
11056 GroupId string `json:"group_id,omitempty"`
11057 // DisplayName : The name of this group.
11058 DisplayName string `json:"display_name"`
11059 // ExternalId : External group ID. Might be missing due to historical data
11060 // gap.
11061 ExternalId string `json:"external_id,omitempty"`
11062 }
11063
11064 // NewGroupLogInfo returns a new GroupLogInfo instance
11065 func NewGroupLogInfo(DisplayName string) *GroupLogInfo {
11066 s := new(GroupLogInfo)
11067 s.DisplayName = DisplayName
11068 return s
11069 }
11070
11071 // GroupMovedDetails : Moved group.
11072 type GroupMovedDetails struct {
11073 }
11074
11075 // NewGroupMovedDetails returns a new GroupMovedDetails instance
11076 func NewGroupMovedDetails() *GroupMovedDetails {
11077 s := new(GroupMovedDetails)
11078 return s
11079 }
11080
11081 // GroupMovedType : has no documentation (yet)
11082 type GroupMovedType struct {
11083 // Description : has no documentation (yet)
11084 Description string `json:"description"`
11085 }
11086
11087 // NewGroupMovedType returns a new GroupMovedType instance
11088 func NewGroupMovedType(Description string) *GroupMovedType {
11089 s := new(GroupMovedType)
11090 s.Description = Description
11091 return s
11092 }
11093
11094 // GroupRemoveExternalIdDetails : Removed external ID for group.
11095 type GroupRemoveExternalIdDetails struct {
11096 // PreviousValue : Old external id.
11097 PreviousValue string `json:"previous_value"`
11098 }
11099
11100 // NewGroupRemoveExternalIdDetails returns a new GroupRemoveExternalIdDetails instance
11101 func NewGroupRemoveExternalIdDetails(PreviousValue string) *GroupRemoveExternalIdDetails {
11102 s := new(GroupRemoveExternalIdDetails)
11103 s.PreviousValue = PreviousValue
11104 return s
11105 }
11106
11107 // GroupRemoveExternalIdType : has no documentation (yet)
11108 type GroupRemoveExternalIdType struct {
11109 // Description : has no documentation (yet)
11110 Description string `json:"description"`
11111 }
11112
11113 // NewGroupRemoveExternalIdType returns a new GroupRemoveExternalIdType instance
11114 func NewGroupRemoveExternalIdType(Description string) *GroupRemoveExternalIdType {
11115 s := new(GroupRemoveExternalIdType)
11116 s.Description = Description
11117 return s
11118 }
11119
11120 // GroupRemoveMemberDetails : Removed team members from group.
11121 type GroupRemoveMemberDetails struct {
11122 }
11123
11124 // NewGroupRemoveMemberDetails returns a new GroupRemoveMemberDetails instance
11125 func NewGroupRemoveMemberDetails() *GroupRemoveMemberDetails {
11126 s := new(GroupRemoveMemberDetails)
11127 return s
11128 }
11129
11130 // GroupRemoveMemberType : has no documentation (yet)
11131 type GroupRemoveMemberType struct {
11132 // Description : has no documentation (yet)
11133 Description string `json:"description"`
11134 }
11135
11136 // NewGroupRemoveMemberType returns a new GroupRemoveMemberType instance
11137 func NewGroupRemoveMemberType(Description string) *GroupRemoveMemberType {
11138 s := new(GroupRemoveMemberType)
11139 s.Description = Description
11140 return s
11141 }
11142
11143 // GroupRenameDetails : Renamed group.
11144 type GroupRenameDetails struct {
11145 // PreviousValue : Previous display name.
11146 PreviousValue string `json:"previous_value"`
11147 // NewValue : New display name.
11148 NewValue string `json:"new_value"`
11149 }
11150
11151 // NewGroupRenameDetails returns a new GroupRenameDetails instance
11152 func NewGroupRenameDetails(PreviousValue string, NewValue string) *GroupRenameDetails {
11153 s := new(GroupRenameDetails)
11154 s.PreviousValue = PreviousValue
11155 s.NewValue = NewValue
11156 return s
11157 }
11158
11159 // GroupRenameType : has no documentation (yet)
11160 type GroupRenameType struct {
11161 // Description : has no documentation (yet)
11162 Description string `json:"description"`
11163 }
11164
11165 // NewGroupRenameType returns a new GroupRenameType instance
11166 func NewGroupRenameType(Description string) *GroupRenameType {
11167 s := new(GroupRenameType)
11168 s.Description = Description
11169 return s
11170 }
11171
11172 // GroupUserManagementChangePolicyDetails : Changed who can create groups.
11173 type GroupUserManagementChangePolicyDetails struct {
11174 // NewValue : New group users management policy.
11175 NewValue *team_policies.GroupCreation `json:"new_value"`
11176 // PreviousValue : Previous group users management policy. Might be missing
11177 // due to historical data gap.
11178 PreviousValue *team_policies.GroupCreation `json:"previous_value,omitempty"`
11179 }
11180
11181 // NewGroupUserManagementChangePolicyDetails returns a new GroupUserManagementChangePolicyDetails instance
11182 func NewGroupUserManagementChangePolicyDetails(NewValue *team_policies.GroupCreation) *GroupUserManagementChangePolicyDetails {
11183 s := new(GroupUserManagementChangePolicyDetails)
11184 s.NewValue = NewValue
11185 return s
11186 }
11187
11188 // GroupUserManagementChangePolicyType : has no documentation (yet)
11189 type GroupUserManagementChangePolicyType struct {
11190 // Description : has no documentation (yet)
11191 Description string `json:"description"`
11192 }
11193
11194 // NewGroupUserManagementChangePolicyType returns a new GroupUserManagementChangePolicyType instance
11195 func NewGroupUserManagementChangePolicyType(Description string) *GroupUserManagementChangePolicyType {
11196 s := new(GroupUserManagementChangePolicyType)
11197 s.Description = Description
11198 return s
11199 }
11200
11201 // IdentifierType : has no documentation (yet)
11202 type IdentifierType struct {
11203 dropbox.Tagged
11204 }
11205
11206 // Valid tag values for IdentifierType
11207 const (
11208 IdentifierTypeEmail = "email"
11209 IdentifierTypeFacebookProfileName = "facebook_profile_name"
11210 IdentifierTypeOther = "other"
11211 )
11212
11213 // JoinTeamDetails : Additional information relevant when a new member joins the
11214 // team.
11215 type JoinTeamDetails struct {
11216 // LinkedApps : Linked applications.
11217 LinkedApps []*UserLinkedAppLogInfo `json:"linked_apps"`
11218 // LinkedDevices : Linked devices.
11219 LinkedDevices []*LinkedDeviceLogInfo `json:"linked_devices"`
11220 // LinkedSharedFolders : Linked shared folders.
11221 LinkedSharedFolders []*FolderLogInfo `json:"linked_shared_folders"`
11222 }
11223
11224 // NewJoinTeamDetails returns a new JoinTeamDetails instance
11225 func NewJoinTeamDetails(LinkedApps []*UserLinkedAppLogInfo, LinkedDevices []*LinkedDeviceLogInfo, LinkedSharedFolders []*FolderLogInfo) *JoinTeamDetails {
11226 s := new(JoinTeamDetails)
11227 s.LinkedApps = LinkedApps
11228 s.LinkedDevices = LinkedDevices
11229 s.LinkedSharedFolders = LinkedSharedFolders
11230 return s
11231 }
11232
11233 // LegacyDeviceSessionLogInfo : Information on sessions, in legacy format
11234 type LegacyDeviceSessionLogInfo struct {
11235 DeviceSessionLogInfo
11236 // SessionInfo : Session unique id. Might be missing due to historical data
11237 // gap.
11238 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
11239 // DisplayName : The device name. Might be missing due to historical data
11240 // gap.
11241 DisplayName string `json:"display_name,omitempty"`
11242 // IsEmmManaged : Is device managed by emm. Might be missing due to
11243 // historical data gap.
11244 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
11245 // Platform : Information on the hosting platform. Might be missing due to
11246 // historical data gap.
11247 Platform string `json:"platform,omitempty"`
11248 // MacAddress : The mac address of the last activity from this session.
11249 // Might be missing due to historical data gap.
11250 MacAddress string `json:"mac_address,omitempty"`
11251 // OsVersion : The hosting OS version. Might be missing due to historical
11252 // data gap.
11253 OsVersion string `json:"os_version,omitempty"`
11254 // DeviceType : Information on the hosting device type. Might be missing due
11255 // to historical data gap.
11256 DeviceType string `json:"device_type,omitempty"`
11257 // ClientVersion : The Dropbox client version. Might be missing due to
11258 // historical data gap.
11259 ClientVersion string `json:"client_version,omitempty"`
11260 // LegacyUniqId : Alternative unique device session id, instead of session
11261 // id field. Might be missing due to historical data gap.
11262 LegacyUniqId string `json:"legacy_uniq_id,omitempty"`
11263 }
11264
11265 // NewLegacyDeviceSessionLogInfo returns a new LegacyDeviceSessionLogInfo instance
11266 func NewLegacyDeviceSessionLogInfo() *LegacyDeviceSessionLogInfo {
11267 s := new(LegacyDeviceSessionLogInfo)
11268 return s
11269 }
11270
11271 // LinkedDeviceLogInfo : The device sessions that user is linked to.
11272 type LinkedDeviceLogInfo struct {
11273 dropbox.Tagged
11274 // MobileDeviceSession : mobile device session's details.
11275 MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"`
11276 // DesktopDeviceSession : desktop device session's details.
11277 DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"`
11278 // WebDeviceSession : web device session's details.
11279 WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"`
11280 // LegacyDeviceSession : legacy device session's details.
11281 LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"`
11282 }
11283
11284 // Valid tag values for LinkedDeviceLogInfo
11285 const (
11286 LinkedDeviceLogInfoMobileDeviceSession = "mobile_device_session"
11287 LinkedDeviceLogInfoDesktopDeviceSession = "desktop_device_session"
11288 LinkedDeviceLogInfoWebDeviceSession = "web_device_session"
11289 LinkedDeviceLogInfoLegacyDeviceSession = "legacy_device_session"
11290 LinkedDeviceLogInfoOther = "other"
11291 )
11292
11293 // UnmarshalJSON deserializes into a LinkedDeviceLogInfo instance
11294 func (u *LinkedDeviceLogInfo) UnmarshalJSON(body []byte) error {
11295 type wrap struct {
11296 dropbox.Tagged
11297 // MobileDeviceSession : mobile device session's details.
11298 MobileDeviceSession json.RawMessage `json:"mobile_device_session,omitempty"`
11299 // DesktopDeviceSession : desktop device session's details.
11300 DesktopDeviceSession json.RawMessage `json:"desktop_device_session,omitempty"`
11301 // WebDeviceSession : web device session's details.
11302 WebDeviceSession json.RawMessage `json:"web_device_session,omitempty"`
11303 // LegacyDeviceSession : legacy device session's details.
11304 LegacyDeviceSession json.RawMessage `json:"legacy_device_session,omitempty"`
11305 }
11306 var w wrap
11307 var err error
11308 if err = json.Unmarshal(body, &w); err != nil {
11309 return err
11310 }
11311 u.Tag = w.Tag
11312 switch u.Tag {
11313 case "mobile_device_session":
11314 err = json.Unmarshal(body, &u.MobileDeviceSession)
11315
11316 if err != nil {
11317 return err
11318 }
11319 case "desktop_device_session":
11320 err = json.Unmarshal(body, &u.DesktopDeviceSession)
11321
11322 if err != nil {
11323 return err
11324 }
11325 case "web_device_session":
11326 err = json.Unmarshal(body, &u.WebDeviceSession)
11327
11328 if err != nil {
11329 return err
11330 }
11331 case "legacy_device_session":
11332 err = json.Unmarshal(body, &u.LegacyDeviceSession)
11333
11334 if err != nil {
11335 return err
11336 }
11337 }
11338 return nil
11339 }
11340
11341 // LoginFailDetails : Failed to sign in.
11342 type LoginFailDetails struct {
11343 // IsEmmManaged : Tells if the login device is EMM managed. Might be missing
11344 // due to historical data gap.
11345 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
11346 // LoginMethod : Login method.
11347 LoginMethod *LoginMethod `json:"login_method"`
11348 // ErrorDetails : Error details.
11349 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
11350 }
11351
11352 // NewLoginFailDetails returns a new LoginFailDetails instance
11353 func NewLoginFailDetails(LoginMethod *LoginMethod, ErrorDetails *FailureDetailsLogInfo) *LoginFailDetails {
11354 s := new(LoginFailDetails)
11355 s.LoginMethod = LoginMethod
11356 s.ErrorDetails = ErrorDetails
11357 return s
11358 }
11359
11360 // LoginFailType : has no documentation (yet)
11361 type LoginFailType struct {
11362 // Description : has no documentation (yet)
11363 Description string `json:"description"`
11364 }
11365
11366 // NewLoginFailType returns a new LoginFailType instance
11367 func NewLoginFailType(Description string) *LoginFailType {
11368 s := new(LoginFailType)
11369 s.Description = Description
11370 return s
11371 }
11372
11373 // LoginMethod : has no documentation (yet)
11374 type LoginMethod struct {
11375 dropbox.Tagged
11376 }
11377
11378 // Valid tag values for LoginMethod
11379 const (
11380 LoginMethodPassword = "password"
11381 LoginMethodTwoFactorAuthentication = "two_factor_authentication"
11382 LoginMethodSaml = "saml"
11383 LoginMethodOther = "other"
11384 )
11385
11386 // LoginSuccessDetails : Signed in.
11387 type LoginSuccessDetails struct {
11388 // IsEmmManaged : Tells if the login device is EMM managed. Might be missing
11389 // due to historical data gap.
11390 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
11391 // LoginMethod : Login method.
11392 LoginMethod *LoginMethod `json:"login_method"`
11393 }
11394
11395 // NewLoginSuccessDetails returns a new LoginSuccessDetails instance
11396 func NewLoginSuccessDetails(LoginMethod *LoginMethod) *LoginSuccessDetails {
11397 s := new(LoginSuccessDetails)
11398 s.LoginMethod = LoginMethod
11399 return s
11400 }
11401
11402 // LoginSuccessType : has no documentation (yet)
11403 type LoginSuccessType struct {
11404 // Description : has no documentation (yet)
11405 Description string `json:"description"`
11406 }
11407
11408 // NewLoginSuccessType returns a new LoginSuccessType instance
11409 func NewLoginSuccessType(Description string) *LoginSuccessType {
11410 s := new(LoginSuccessType)
11411 s.Description = Description
11412 return s
11413 }
11414
11415 // LogoutDetails : Signed out.
11416 type LogoutDetails struct {
11417 }
11418
11419 // NewLogoutDetails returns a new LogoutDetails instance
11420 func NewLogoutDetails() *LogoutDetails {
11421 s := new(LogoutDetails)
11422 return s
11423 }
11424
11425 // LogoutType : has no documentation (yet)
11426 type LogoutType struct {
11427 // Description : has no documentation (yet)
11428 Description string `json:"description"`
11429 }
11430
11431 // NewLogoutType returns a new LogoutType instance
11432 func NewLogoutType(Description string) *LogoutType {
11433 s := new(LogoutType)
11434 s.Description = Description
11435 return s
11436 }
11437
11438 // MemberAddNameDetails : Added team member name.
11439 type MemberAddNameDetails struct {
11440 // NewValue : New user's name.
11441 NewValue *UserNameLogInfo `json:"new_value"`
11442 }
11443
11444 // NewMemberAddNameDetails returns a new MemberAddNameDetails instance
11445 func NewMemberAddNameDetails(NewValue *UserNameLogInfo) *MemberAddNameDetails {
11446 s := new(MemberAddNameDetails)
11447 s.NewValue = NewValue
11448 return s
11449 }
11450
11451 // MemberAddNameType : has no documentation (yet)
11452 type MemberAddNameType struct {
11453 // Description : has no documentation (yet)
11454 Description string `json:"description"`
11455 }
11456
11457 // NewMemberAddNameType returns a new MemberAddNameType instance
11458 func NewMemberAddNameType(Description string) *MemberAddNameType {
11459 s := new(MemberAddNameType)
11460 s.Description = Description
11461 return s
11462 }
11463
11464 // MemberChangeAdminRoleDetails : Changed team member admin role.
11465 type MemberChangeAdminRoleDetails struct {
11466 // NewValue : New admin role. This field is relevant when the admin role is
11467 // changed or whenthe user role changes from no admin rights to with admin
11468 // rights.
11469 NewValue *AdminRole `json:"new_value,omitempty"`
11470 // PreviousValue : Previous admin role. This field is relevant when the
11471 // admin role is changed or when the admin role is removed.
11472 PreviousValue *AdminRole `json:"previous_value,omitempty"`
11473 }
11474
11475 // NewMemberChangeAdminRoleDetails returns a new MemberChangeAdminRoleDetails instance
11476 func NewMemberChangeAdminRoleDetails() *MemberChangeAdminRoleDetails {
11477 s := new(MemberChangeAdminRoleDetails)
11478 return s
11479 }
11480
11481 // MemberChangeAdminRoleType : has no documentation (yet)
11482 type MemberChangeAdminRoleType struct {
11483 // Description : has no documentation (yet)
11484 Description string `json:"description"`
11485 }
11486
11487 // NewMemberChangeAdminRoleType returns a new MemberChangeAdminRoleType instance
11488 func NewMemberChangeAdminRoleType(Description string) *MemberChangeAdminRoleType {
11489 s := new(MemberChangeAdminRoleType)
11490 s.Description = Description
11491 return s
11492 }
11493
11494 // MemberChangeEmailDetails : Changed team member email.
11495 type MemberChangeEmailDetails struct {
11496 // NewValue : New email.
11497 NewValue string `json:"new_value"`
11498 // PreviousValue : Previous email. Might be missing due to historical data
11499 // gap.
11500 PreviousValue string `json:"previous_value,omitempty"`
11501 }
11502
11503 // NewMemberChangeEmailDetails returns a new MemberChangeEmailDetails instance
11504 func NewMemberChangeEmailDetails(NewValue string) *MemberChangeEmailDetails {
11505 s := new(MemberChangeEmailDetails)
11506 s.NewValue = NewValue
11507 return s
11508 }
11509
11510 // MemberChangeEmailType : has no documentation (yet)
11511 type MemberChangeEmailType struct {
11512 // Description : has no documentation (yet)
11513 Description string `json:"description"`
11514 }
11515
11516 // NewMemberChangeEmailType returns a new MemberChangeEmailType instance
11517 func NewMemberChangeEmailType(Description string) *MemberChangeEmailType {
11518 s := new(MemberChangeEmailType)
11519 s.Description = Description
11520 return s
11521 }
11522
11523 // MemberChangeMembershipTypeDetails : Changed membership type (limited/full) of
11524 // member.
11525 type MemberChangeMembershipTypeDetails struct {
11526 // PrevValue : Previous membership type.
11527 PrevValue *TeamMembershipType `json:"prev_value"`
11528 // NewValue : New membership type.
11529 NewValue *TeamMembershipType `json:"new_value"`
11530 }
11531
11532 // NewMemberChangeMembershipTypeDetails returns a new MemberChangeMembershipTypeDetails instance
11533 func NewMemberChangeMembershipTypeDetails(PrevValue *TeamMembershipType, NewValue *TeamMembershipType) *MemberChangeMembershipTypeDetails {
11534 s := new(MemberChangeMembershipTypeDetails)
11535 s.PrevValue = PrevValue
11536 s.NewValue = NewValue
11537 return s
11538 }
11539
11540 // MemberChangeMembershipTypeType : has no documentation (yet)
11541 type MemberChangeMembershipTypeType struct {
11542 // Description : has no documentation (yet)
11543 Description string `json:"description"`
11544 }
11545
11546 // NewMemberChangeMembershipTypeType returns a new MemberChangeMembershipTypeType instance
11547 func NewMemberChangeMembershipTypeType(Description string) *MemberChangeMembershipTypeType {
11548 s := new(MemberChangeMembershipTypeType)
11549 s.Description = Description
11550 return s
11551 }
11552
11553 // MemberChangeNameDetails : Changed team member name.
11554 type MemberChangeNameDetails struct {
11555 // NewValue : New user's name.
11556 NewValue *UserNameLogInfo `json:"new_value"`
11557 // PreviousValue : Previous user's name. Might be missing due to historical
11558 // data gap.
11559 PreviousValue *UserNameLogInfo `json:"previous_value,omitempty"`
11560 }
11561
11562 // NewMemberChangeNameDetails returns a new MemberChangeNameDetails instance
11563 func NewMemberChangeNameDetails(NewValue *UserNameLogInfo) *MemberChangeNameDetails {
11564 s := new(MemberChangeNameDetails)
11565 s.NewValue = NewValue
11566 return s
11567 }
11568
11569 // MemberChangeNameType : has no documentation (yet)
11570 type MemberChangeNameType struct {
11571 // Description : has no documentation (yet)
11572 Description string `json:"description"`
11573 }
11574
11575 // NewMemberChangeNameType returns a new MemberChangeNameType instance
11576 func NewMemberChangeNameType(Description string) *MemberChangeNameType {
11577 s := new(MemberChangeNameType)
11578 s.Description = Description
11579 return s
11580 }
11581
11582 // MemberChangeStatusDetails : Changed member status (invited, joined,
11583 // suspended, etc.).
11584 type MemberChangeStatusDetails struct {
11585 // PreviousValue : Previous member status. Might be missing due to
11586 // historical data gap.
11587 PreviousValue *MemberStatus `json:"previous_value,omitempty"`
11588 // NewValue : New member status.
11589 NewValue *MemberStatus `json:"new_value"`
11590 // Action : Additional information indicating the action taken that caused
11591 // status change.
11592 Action *ActionDetails `json:"action,omitempty"`
11593 }
11594
11595 // NewMemberChangeStatusDetails returns a new MemberChangeStatusDetails instance
11596 func NewMemberChangeStatusDetails(NewValue *MemberStatus) *MemberChangeStatusDetails {
11597 s := new(MemberChangeStatusDetails)
11598 s.NewValue = NewValue
11599 return s
11600 }
11601
11602 // MemberChangeStatusType : has no documentation (yet)
11603 type MemberChangeStatusType struct {
11604 // Description : has no documentation (yet)
11605 Description string `json:"description"`
11606 }
11607
11608 // NewMemberChangeStatusType returns a new MemberChangeStatusType instance
11609 func NewMemberChangeStatusType(Description string) *MemberChangeStatusType {
11610 s := new(MemberChangeStatusType)
11611 s.Description = Description
11612 return s
11613 }
11614
11615 // MemberDeleteManualContactsDetails : Cleared manually added contacts.
11616 type MemberDeleteManualContactsDetails struct {
11617 }
11618
11619 // NewMemberDeleteManualContactsDetails returns a new MemberDeleteManualContactsDetails instance
11620 func NewMemberDeleteManualContactsDetails() *MemberDeleteManualContactsDetails {
11621 s := new(MemberDeleteManualContactsDetails)
11622 return s
11623 }
11624
11625 // MemberDeleteManualContactsType : has no documentation (yet)
11626 type MemberDeleteManualContactsType struct {
11627 // Description : has no documentation (yet)
11628 Description string `json:"description"`
11629 }
11630
11631 // NewMemberDeleteManualContactsType returns a new MemberDeleteManualContactsType instance
11632 func NewMemberDeleteManualContactsType(Description string) *MemberDeleteManualContactsType {
11633 s := new(MemberDeleteManualContactsType)
11634 s.Description = Description
11635 return s
11636 }
11637
11638 // MemberPermanentlyDeleteAccountContentsDetails : Permanently deleted contents
11639 // of deleted team member account.
11640 type MemberPermanentlyDeleteAccountContentsDetails struct {
11641 }
11642
11643 // NewMemberPermanentlyDeleteAccountContentsDetails returns a new MemberPermanentlyDeleteAccountContentsDetails instance
11644 func NewMemberPermanentlyDeleteAccountContentsDetails() *MemberPermanentlyDeleteAccountContentsDetails {
11645 s := new(MemberPermanentlyDeleteAccountContentsDetails)
11646 return s
11647 }
11648
11649 // MemberPermanentlyDeleteAccountContentsType : has no documentation (yet)
11650 type MemberPermanentlyDeleteAccountContentsType struct {
11651 // Description : has no documentation (yet)
11652 Description string `json:"description"`
11653 }
11654
11655 // NewMemberPermanentlyDeleteAccountContentsType returns a new MemberPermanentlyDeleteAccountContentsType instance
11656 func NewMemberPermanentlyDeleteAccountContentsType(Description string) *MemberPermanentlyDeleteAccountContentsType {
11657 s := new(MemberPermanentlyDeleteAccountContentsType)
11658 s.Description = Description
11659 return s
11660 }
11661
11662 // MemberRemoveActionType : has no documentation (yet)
11663 type MemberRemoveActionType struct {
11664 dropbox.Tagged
11665 }
11666
11667 // Valid tag values for MemberRemoveActionType
11668 const (
11669 MemberRemoveActionTypeDelete = "delete"
11670 MemberRemoveActionTypeOffboard = "offboard"
11671 MemberRemoveActionTypeLeave = "leave"
11672 MemberRemoveActionTypeOther = "other"
11673 )
11674
11675 // MemberRequestsChangePolicyDetails : Changed whether users can find team when
11676 // not invited.
11677 type MemberRequestsChangePolicyDetails struct {
11678 // NewValue : New member change requests policy.
11679 NewValue *MemberRequestsPolicy `json:"new_value"`
11680 // PreviousValue : Previous member change requests policy. Might be missing
11681 // due to historical data gap.
11682 PreviousValue *MemberRequestsPolicy `json:"previous_value,omitempty"`
11683 }
11684
11685 // NewMemberRequestsChangePolicyDetails returns a new MemberRequestsChangePolicyDetails instance
11686 func NewMemberRequestsChangePolicyDetails(NewValue *MemberRequestsPolicy) *MemberRequestsChangePolicyDetails {
11687 s := new(MemberRequestsChangePolicyDetails)
11688 s.NewValue = NewValue
11689 return s
11690 }
11691
11692 // MemberRequestsChangePolicyType : has no documentation (yet)
11693 type MemberRequestsChangePolicyType struct {
11694 // Description : has no documentation (yet)
11695 Description string `json:"description"`
11696 }
11697
11698 // NewMemberRequestsChangePolicyType returns a new MemberRequestsChangePolicyType instance
11699 func NewMemberRequestsChangePolicyType(Description string) *MemberRequestsChangePolicyType {
11700 s := new(MemberRequestsChangePolicyType)
11701 s.Description = Description
11702 return s
11703 }
11704
11705 // MemberRequestsPolicy : has no documentation (yet)
11706 type MemberRequestsPolicy struct {
11707 dropbox.Tagged
11708 }
11709
11710 // Valid tag values for MemberRequestsPolicy
11711 const (
11712 MemberRequestsPolicyAutoAccept = "auto_accept"
11713 MemberRequestsPolicyDisabled = "disabled"
11714 MemberRequestsPolicyRequireApproval = "require_approval"
11715 MemberRequestsPolicyOther = "other"
11716 )
11717
11718 // MemberSpaceLimitsAddCustomQuotaDetails : Set custom member space limit.
11719 type MemberSpaceLimitsAddCustomQuotaDetails struct {
11720 // NewValue : New custom quota value in bytes.
11721 NewValue uint64 `json:"new_value"`
11722 }
11723
11724 // NewMemberSpaceLimitsAddCustomQuotaDetails returns a new MemberSpaceLimitsAddCustomQuotaDetails instance
11725 func NewMemberSpaceLimitsAddCustomQuotaDetails(NewValue uint64) *MemberSpaceLimitsAddCustomQuotaDetails {
11726 s := new(MemberSpaceLimitsAddCustomQuotaDetails)
11727 s.NewValue = NewValue
11728 return s
11729 }
11730
11731 // MemberSpaceLimitsAddCustomQuotaType : has no documentation (yet)
11732 type MemberSpaceLimitsAddCustomQuotaType struct {
11733 // Description : has no documentation (yet)
11734 Description string `json:"description"`
11735 }
11736
11737 // NewMemberSpaceLimitsAddCustomQuotaType returns a new MemberSpaceLimitsAddCustomQuotaType instance
11738 func NewMemberSpaceLimitsAddCustomQuotaType(Description string) *MemberSpaceLimitsAddCustomQuotaType {
11739 s := new(MemberSpaceLimitsAddCustomQuotaType)
11740 s.Description = Description
11741 return s
11742 }
11743
11744 // MemberSpaceLimitsAddExceptionDetails : Added members to member space limit
11745 // exception list.
11746 type MemberSpaceLimitsAddExceptionDetails struct {
11747 }
11748
11749 // NewMemberSpaceLimitsAddExceptionDetails returns a new MemberSpaceLimitsAddExceptionDetails instance
11750 func NewMemberSpaceLimitsAddExceptionDetails() *MemberSpaceLimitsAddExceptionDetails {
11751 s := new(MemberSpaceLimitsAddExceptionDetails)
11752 return s
11753 }
11754
11755 // MemberSpaceLimitsAddExceptionType : has no documentation (yet)
11756 type MemberSpaceLimitsAddExceptionType struct {
11757 // Description : has no documentation (yet)
11758 Description string `json:"description"`
11759 }
11760
11761 // NewMemberSpaceLimitsAddExceptionType returns a new MemberSpaceLimitsAddExceptionType instance
11762 func NewMemberSpaceLimitsAddExceptionType(Description string) *MemberSpaceLimitsAddExceptionType {
11763 s := new(MemberSpaceLimitsAddExceptionType)
11764 s.Description = Description
11765 return s
11766 }
11767
11768 // MemberSpaceLimitsChangeCapsTypePolicyDetails : Changed member space limit
11769 // type for team.
11770 type MemberSpaceLimitsChangeCapsTypePolicyDetails struct {
11771 // PreviousValue : Previous space limit type.
11772 PreviousValue *SpaceCapsType `json:"previous_value"`
11773 // NewValue : New space limit type.
11774 NewValue *SpaceCapsType `json:"new_value"`
11775 }
11776
11777 // NewMemberSpaceLimitsChangeCapsTypePolicyDetails returns a new MemberSpaceLimitsChangeCapsTypePolicyDetails instance
11778 func NewMemberSpaceLimitsChangeCapsTypePolicyDetails(PreviousValue *SpaceCapsType, NewValue *SpaceCapsType) *MemberSpaceLimitsChangeCapsTypePolicyDetails {
11779 s := new(MemberSpaceLimitsChangeCapsTypePolicyDetails)
11780 s.PreviousValue = PreviousValue
11781 s.NewValue = NewValue
11782 return s
11783 }
11784
11785 // MemberSpaceLimitsChangeCapsTypePolicyType : has no documentation (yet)
11786 type MemberSpaceLimitsChangeCapsTypePolicyType struct {
11787 // Description : has no documentation (yet)
11788 Description string `json:"description"`
11789 }
11790
11791 // NewMemberSpaceLimitsChangeCapsTypePolicyType returns a new MemberSpaceLimitsChangeCapsTypePolicyType instance
11792 func NewMemberSpaceLimitsChangeCapsTypePolicyType(Description string) *MemberSpaceLimitsChangeCapsTypePolicyType {
11793 s := new(MemberSpaceLimitsChangeCapsTypePolicyType)
11794 s.Description = Description
11795 return s
11796 }
11797
11798 // MemberSpaceLimitsChangeCustomQuotaDetails : Changed custom member space
11799 // limit.
11800 type MemberSpaceLimitsChangeCustomQuotaDetails struct {
11801 // PreviousValue : Previous custom quota value in bytes.
11802 PreviousValue uint64 `json:"previous_value"`
11803 // NewValue : New custom quota value in bytes.
11804 NewValue uint64 `json:"new_value"`
11805 }
11806
11807 // NewMemberSpaceLimitsChangeCustomQuotaDetails returns a new MemberSpaceLimitsChangeCustomQuotaDetails instance
11808 func NewMemberSpaceLimitsChangeCustomQuotaDetails(PreviousValue uint64, NewValue uint64) *MemberSpaceLimitsChangeCustomQuotaDetails {
11809 s := new(MemberSpaceLimitsChangeCustomQuotaDetails)
11810 s.PreviousValue = PreviousValue
11811 s.NewValue = NewValue
11812 return s
11813 }
11814
11815 // MemberSpaceLimitsChangeCustomQuotaType : has no documentation (yet)
11816 type MemberSpaceLimitsChangeCustomQuotaType struct {
11817 // Description : has no documentation (yet)
11818 Description string `json:"description"`
11819 }
11820
11821 // NewMemberSpaceLimitsChangeCustomQuotaType returns a new MemberSpaceLimitsChangeCustomQuotaType instance
11822 func NewMemberSpaceLimitsChangeCustomQuotaType(Description string) *MemberSpaceLimitsChangeCustomQuotaType {
11823 s := new(MemberSpaceLimitsChangeCustomQuotaType)
11824 s.Description = Description
11825 return s
11826 }
11827
11828 // MemberSpaceLimitsChangePolicyDetails : Changed team default member space
11829 // limit.
11830 type MemberSpaceLimitsChangePolicyDetails struct {
11831 // PreviousValue : Previous team default limit value in bytes. Might be
11832 // missing due to historical data gap.
11833 PreviousValue uint64 `json:"previous_value,omitempty"`
11834 // NewValue : New team default limit value in bytes. Might be missing due to
11835 // historical data gap.
11836 NewValue uint64 `json:"new_value,omitempty"`
11837 }
11838
11839 // NewMemberSpaceLimitsChangePolicyDetails returns a new MemberSpaceLimitsChangePolicyDetails instance
11840 func NewMemberSpaceLimitsChangePolicyDetails() *MemberSpaceLimitsChangePolicyDetails {
11841 s := new(MemberSpaceLimitsChangePolicyDetails)
11842 return s
11843 }
11844
11845 // MemberSpaceLimitsChangePolicyType : has no documentation (yet)
11846 type MemberSpaceLimitsChangePolicyType struct {
11847 // Description : has no documentation (yet)
11848 Description string `json:"description"`
11849 }
11850
11851 // NewMemberSpaceLimitsChangePolicyType returns a new MemberSpaceLimitsChangePolicyType instance
11852 func NewMemberSpaceLimitsChangePolicyType(Description string) *MemberSpaceLimitsChangePolicyType {
11853 s := new(MemberSpaceLimitsChangePolicyType)
11854 s.Description = Description
11855 return s
11856 }
11857
11858 // MemberSpaceLimitsChangeStatusDetails : Changed space limit status.
11859 type MemberSpaceLimitsChangeStatusDetails struct {
11860 // PreviousValue : Previous storage quota status.
11861 PreviousValue *SpaceLimitsStatus `json:"previous_value"`
11862 // NewValue : New storage quota status.
11863 NewValue *SpaceLimitsStatus `json:"new_value"`
11864 }
11865
11866 // NewMemberSpaceLimitsChangeStatusDetails returns a new MemberSpaceLimitsChangeStatusDetails instance
11867 func NewMemberSpaceLimitsChangeStatusDetails(PreviousValue *SpaceLimitsStatus, NewValue *SpaceLimitsStatus) *MemberSpaceLimitsChangeStatusDetails {
11868 s := new(MemberSpaceLimitsChangeStatusDetails)
11869 s.PreviousValue = PreviousValue
11870 s.NewValue = NewValue
11871 return s
11872 }
11873
11874 // MemberSpaceLimitsChangeStatusType : has no documentation (yet)
11875 type MemberSpaceLimitsChangeStatusType struct {
11876 // Description : has no documentation (yet)
11877 Description string `json:"description"`
11878 }
11879
11880 // NewMemberSpaceLimitsChangeStatusType returns a new MemberSpaceLimitsChangeStatusType instance
11881 func NewMemberSpaceLimitsChangeStatusType(Description string) *MemberSpaceLimitsChangeStatusType {
11882 s := new(MemberSpaceLimitsChangeStatusType)
11883 s.Description = Description
11884 return s
11885 }
11886
11887 // MemberSpaceLimitsRemoveCustomQuotaDetails : Removed custom member space
11888 // limit.
11889 type MemberSpaceLimitsRemoveCustomQuotaDetails struct {
11890 }
11891
11892 // NewMemberSpaceLimitsRemoveCustomQuotaDetails returns a new MemberSpaceLimitsRemoveCustomQuotaDetails instance
11893 func NewMemberSpaceLimitsRemoveCustomQuotaDetails() *MemberSpaceLimitsRemoveCustomQuotaDetails {
11894 s := new(MemberSpaceLimitsRemoveCustomQuotaDetails)
11895 return s
11896 }
11897
11898 // MemberSpaceLimitsRemoveCustomQuotaType : has no documentation (yet)
11899 type MemberSpaceLimitsRemoveCustomQuotaType struct {
11900 // Description : has no documentation (yet)
11901 Description string `json:"description"`
11902 }
11903
11904 // NewMemberSpaceLimitsRemoveCustomQuotaType returns a new MemberSpaceLimitsRemoveCustomQuotaType instance
11905 func NewMemberSpaceLimitsRemoveCustomQuotaType(Description string) *MemberSpaceLimitsRemoveCustomQuotaType {
11906 s := new(MemberSpaceLimitsRemoveCustomQuotaType)
11907 s.Description = Description
11908 return s
11909 }
11910
11911 // MemberSpaceLimitsRemoveExceptionDetails : Removed members from member space
11912 // limit exception list.
11913 type MemberSpaceLimitsRemoveExceptionDetails struct {
11914 }
11915
11916 // NewMemberSpaceLimitsRemoveExceptionDetails returns a new MemberSpaceLimitsRemoveExceptionDetails instance
11917 func NewMemberSpaceLimitsRemoveExceptionDetails() *MemberSpaceLimitsRemoveExceptionDetails {
11918 s := new(MemberSpaceLimitsRemoveExceptionDetails)
11919 return s
11920 }
11921
11922 // MemberSpaceLimitsRemoveExceptionType : has no documentation (yet)
11923 type MemberSpaceLimitsRemoveExceptionType struct {
11924 // Description : has no documentation (yet)
11925 Description string `json:"description"`
11926 }
11927
11928 // NewMemberSpaceLimitsRemoveExceptionType returns a new MemberSpaceLimitsRemoveExceptionType instance
11929 func NewMemberSpaceLimitsRemoveExceptionType(Description string) *MemberSpaceLimitsRemoveExceptionType {
11930 s := new(MemberSpaceLimitsRemoveExceptionType)
11931 s.Description = Description
11932 return s
11933 }
11934
11935 // MemberStatus : has no documentation (yet)
11936 type MemberStatus struct {
11937 dropbox.Tagged
11938 }
11939
11940 // Valid tag values for MemberStatus
11941 const (
11942 MemberStatusNotJoined = "not_joined"
11943 MemberStatusInvited = "invited"
11944 MemberStatusActive = "active"
11945 MemberStatusSuspended = "suspended"
11946 MemberStatusRemoved = "removed"
11947 MemberStatusOther = "other"
11948 )
11949
11950 // MemberSuggestDetails : Suggested person to add to team.
11951 type MemberSuggestDetails struct {
11952 // SuggestedMembers : suggested users emails.
11953 SuggestedMembers []string `json:"suggested_members"`
11954 }
11955
11956 // NewMemberSuggestDetails returns a new MemberSuggestDetails instance
11957 func NewMemberSuggestDetails(SuggestedMembers []string) *MemberSuggestDetails {
11958 s := new(MemberSuggestDetails)
11959 s.SuggestedMembers = SuggestedMembers
11960 return s
11961 }
11962
11963 // MemberSuggestType : has no documentation (yet)
11964 type MemberSuggestType struct {
11965 // Description : has no documentation (yet)
11966 Description string `json:"description"`
11967 }
11968
11969 // NewMemberSuggestType returns a new MemberSuggestType instance
11970 func NewMemberSuggestType(Description string) *MemberSuggestType {
11971 s := new(MemberSuggestType)
11972 s.Description = Description
11973 return s
11974 }
11975
11976 // MemberSuggestionsChangePolicyDetails : Enabled/disabled option for team
11977 // members to suggest people to add to team.
11978 type MemberSuggestionsChangePolicyDetails struct {
11979 // NewValue : New team member suggestions policy.
11980 NewValue *MemberSuggestionsPolicy `json:"new_value"`
11981 // PreviousValue : Previous team member suggestions policy. Might be missing
11982 // due to historical data gap.
11983 PreviousValue *MemberSuggestionsPolicy `json:"previous_value,omitempty"`
11984 }
11985
11986 // NewMemberSuggestionsChangePolicyDetails returns a new MemberSuggestionsChangePolicyDetails instance
11987 func NewMemberSuggestionsChangePolicyDetails(NewValue *MemberSuggestionsPolicy) *MemberSuggestionsChangePolicyDetails {
11988 s := new(MemberSuggestionsChangePolicyDetails)
11989 s.NewValue = NewValue
11990 return s
11991 }
11992
11993 // MemberSuggestionsChangePolicyType : has no documentation (yet)
11994 type MemberSuggestionsChangePolicyType struct {
11995 // Description : has no documentation (yet)
11996 Description string `json:"description"`
11997 }
11998
11999 // NewMemberSuggestionsChangePolicyType returns a new MemberSuggestionsChangePolicyType instance
12000 func NewMemberSuggestionsChangePolicyType(Description string) *MemberSuggestionsChangePolicyType {
12001 s := new(MemberSuggestionsChangePolicyType)
12002 s.Description = Description
12003 return s
12004 }
12005
12006 // MemberSuggestionsPolicy : Member suggestions policy
12007 type MemberSuggestionsPolicy struct {
12008 dropbox.Tagged
12009 }
12010
12011 // Valid tag values for MemberSuggestionsPolicy
12012 const (
12013 MemberSuggestionsPolicyDisabled = "disabled"
12014 MemberSuggestionsPolicyEnabled = "enabled"
12015 MemberSuggestionsPolicyOther = "other"
12016 )
12017
12018 // MemberTransferAccountContentsDetails : Transferred contents of deleted member
12019 // account to another member.
12020 type MemberTransferAccountContentsDetails struct {
12021 }
12022
12023 // NewMemberTransferAccountContentsDetails returns a new MemberTransferAccountContentsDetails instance
12024 func NewMemberTransferAccountContentsDetails() *MemberTransferAccountContentsDetails {
12025 s := new(MemberTransferAccountContentsDetails)
12026 return s
12027 }
12028
12029 // MemberTransferAccountContentsType : has no documentation (yet)
12030 type MemberTransferAccountContentsType struct {
12031 // Description : has no documentation (yet)
12032 Description string `json:"description"`
12033 }
12034
12035 // NewMemberTransferAccountContentsType returns a new MemberTransferAccountContentsType instance
12036 func NewMemberTransferAccountContentsType(Description string) *MemberTransferAccountContentsType {
12037 s := new(MemberTransferAccountContentsType)
12038 s.Description = Description
12039 return s
12040 }
12041
12042 // MicrosoftOfficeAddinChangePolicyDetails : Enabled/disabled Microsoft Office
12043 // add-in.
12044 type MicrosoftOfficeAddinChangePolicyDetails struct {
12045 // NewValue : New Microsoft Office addin policy.
12046 NewValue *MicrosoftOfficeAddinPolicy `json:"new_value"`
12047 // PreviousValue : Previous Microsoft Office addin policy. Might be missing
12048 // due to historical data gap.
12049 PreviousValue *MicrosoftOfficeAddinPolicy `json:"previous_value,omitempty"`
12050 }
12051
12052 // NewMicrosoftOfficeAddinChangePolicyDetails returns a new MicrosoftOfficeAddinChangePolicyDetails instance
12053 func NewMicrosoftOfficeAddinChangePolicyDetails(NewValue *MicrosoftOfficeAddinPolicy) *MicrosoftOfficeAddinChangePolicyDetails {
12054 s := new(MicrosoftOfficeAddinChangePolicyDetails)
12055 s.NewValue = NewValue
12056 return s
12057 }
12058
12059 // MicrosoftOfficeAddinChangePolicyType : has no documentation (yet)
12060 type MicrosoftOfficeAddinChangePolicyType struct {
12061 // Description : has no documentation (yet)
12062 Description string `json:"description"`
12063 }
12064
12065 // NewMicrosoftOfficeAddinChangePolicyType returns a new MicrosoftOfficeAddinChangePolicyType instance
12066 func NewMicrosoftOfficeAddinChangePolicyType(Description string) *MicrosoftOfficeAddinChangePolicyType {
12067 s := new(MicrosoftOfficeAddinChangePolicyType)
12068 s.Description = Description
12069 return s
12070 }
12071
12072 // MicrosoftOfficeAddinPolicy : Microsoft Office addin policy
12073 type MicrosoftOfficeAddinPolicy struct {
12074 dropbox.Tagged
12075 }
12076
12077 // Valid tag values for MicrosoftOfficeAddinPolicy
12078 const (
12079 MicrosoftOfficeAddinPolicyDisabled = "disabled"
12080 MicrosoftOfficeAddinPolicyEnabled = "enabled"
12081 MicrosoftOfficeAddinPolicyOther = "other"
12082 )
12083
12084 // MissingDetails : An indication that an error occurred while retrieving the
12085 // event. Some attributes of the event may be omitted as a result.
12086 type MissingDetails struct {
12087 // SourceEventFields : All the data that could be retrieved and converted
12088 // from the source event.
12089 SourceEventFields string `json:"source_event_fields,omitempty"`
12090 }
12091
12092 // NewMissingDetails returns a new MissingDetails instance
12093 func NewMissingDetails() *MissingDetails {
12094 s := new(MissingDetails)
12095 return s
12096 }
12097
12098 // MobileDeviceSessionLogInfo : Information about linked Dropbox mobile client
12099 // sessions
12100 type MobileDeviceSessionLogInfo struct {
12101 DeviceSessionLogInfo
12102 // SessionInfo : Mobile session unique id. Might be missing due to
12103 // historical data gap.
12104 SessionInfo *MobileSessionLogInfo `json:"session_info,omitempty"`
12105 // DeviceName : The device name.
12106 DeviceName string `json:"device_name"`
12107 // ClientType : The mobile application type.
12108 ClientType *team.MobileClientPlatform `json:"client_type"`
12109 // ClientVersion : The Dropbox client version.
12110 ClientVersion string `json:"client_version,omitempty"`
12111 // OsVersion : The hosting OS version.
12112 OsVersion string `json:"os_version,omitempty"`
12113 // LastCarrier : last carrier used by the device.
12114 LastCarrier string `json:"last_carrier,omitempty"`
12115 }
12116
12117 // NewMobileDeviceSessionLogInfo returns a new MobileDeviceSessionLogInfo instance
12118 func NewMobileDeviceSessionLogInfo(DeviceName string, ClientType *team.MobileClientPlatform) *MobileDeviceSessionLogInfo {
12119 s := new(MobileDeviceSessionLogInfo)
12120 s.DeviceName = DeviceName
12121 s.ClientType = ClientType
12122 return s
12123 }
12124
12125 // MobileSessionLogInfo : Mobile session.
12126 type MobileSessionLogInfo struct {
12127 SessionLogInfo
12128 }
12129
12130 // NewMobileSessionLogInfo returns a new MobileSessionLogInfo instance
12131 func NewMobileSessionLogInfo() *MobileSessionLogInfo {
12132 s := new(MobileSessionLogInfo)
12133 return s
12134 }
12135
12136 // NamespaceRelativePathLogInfo : Namespace relative path details.
12137 type NamespaceRelativePathLogInfo struct {
12138 // NsId : Namespace ID. Might be missing due to historical data gap.
12139 NsId string `json:"ns_id,omitempty"`
12140 // RelativePath : A path relative to the specified namespace ID. Might be
12141 // missing due to historical data gap.
12142 RelativePath string `json:"relative_path,omitempty"`
12143 }
12144
12145 // NewNamespaceRelativePathLogInfo returns a new NamespaceRelativePathLogInfo instance
12146 func NewNamespaceRelativePathLogInfo() *NamespaceRelativePathLogInfo {
12147 s := new(NamespaceRelativePathLogInfo)
12148 return s
12149 }
12150
12151 // NetworkControlChangePolicyDetails : Enabled/disabled network control.
12152 type NetworkControlChangePolicyDetails struct {
12153 // NewValue : New network control policy.
12154 NewValue *NetworkControlPolicy `json:"new_value"`
12155 // PreviousValue : Previous network control policy. Might be missing due to
12156 // historical data gap.
12157 PreviousValue *NetworkControlPolicy `json:"previous_value,omitempty"`
12158 }
12159
12160 // NewNetworkControlChangePolicyDetails returns a new NetworkControlChangePolicyDetails instance
12161 func NewNetworkControlChangePolicyDetails(NewValue *NetworkControlPolicy) *NetworkControlChangePolicyDetails {
12162 s := new(NetworkControlChangePolicyDetails)
12163 s.NewValue = NewValue
12164 return s
12165 }
12166
12167 // NetworkControlChangePolicyType : has no documentation (yet)
12168 type NetworkControlChangePolicyType struct {
12169 // Description : has no documentation (yet)
12170 Description string `json:"description"`
12171 }
12172
12173 // NewNetworkControlChangePolicyType returns a new NetworkControlChangePolicyType instance
12174 func NewNetworkControlChangePolicyType(Description string) *NetworkControlChangePolicyType {
12175 s := new(NetworkControlChangePolicyType)
12176 s.Description = Description
12177 return s
12178 }
12179
12180 // NetworkControlPolicy : Network control policy
12181 type NetworkControlPolicy struct {
12182 dropbox.Tagged
12183 }
12184
12185 // Valid tag values for NetworkControlPolicy
12186 const (
12187 NetworkControlPolicyDisabled = "disabled"
12188 NetworkControlPolicyEnabled = "enabled"
12189 NetworkControlPolicyOther = "other"
12190 )
12191
12192 // UserLogInfo : User's logged information.
12193 type UserLogInfo struct {
12194 // AccountId : User unique ID. Might be missing due to historical data gap.
12195 AccountId string `json:"account_id,omitempty"`
12196 // DisplayName : User display name. Might be missing due to historical data
12197 // gap.
12198 DisplayName string `json:"display_name,omitempty"`
12199 // Email : User email address. Might be missing due to historical data gap.
12200 Email string `json:"email,omitempty"`
12201 }
12202
12203 // NewUserLogInfo returns a new UserLogInfo instance
12204 func NewUserLogInfo() *UserLogInfo {
12205 s := new(UserLogInfo)
12206 return s
12207 }
12208
12209 // IsUserLogInfo is the interface type for UserLogInfo and its subtypes
12210 type IsUserLogInfo interface {
12211 IsUserLogInfo()
12212 }
12213
12214 // IsUserLogInfo implements the IsUserLogInfo interface
12215 func (u *UserLogInfo) IsUserLogInfo() {}
12216
12217 type userLogInfoUnion struct {
12218 dropbox.Tagged
12219 // TeamMember : has no documentation (yet)
12220 TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"`
12221 // TrustedNonTeamMember : has no documentation (yet)
12222 TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"`
12223 // NonTeamMember : has no documentation (yet)
12224 NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"`
12225 }
12226
12227 // Valid tag values for UserLogInfo
12228 const (
12229 UserLogInfoTeamMember = "team_member"
12230 UserLogInfoTrustedNonTeamMember = "trusted_non_team_member"
12231 UserLogInfoNonTeamMember = "non_team_member"
12232 )
12233
12234 // UnmarshalJSON deserializes into a userLogInfoUnion instance
12235 func (u *userLogInfoUnion) UnmarshalJSON(body []byte) error {
12236 type wrap struct {
12237 dropbox.Tagged
12238 // TeamMember : has no documentation (yet)
12239 TeamMember json.RawMessage `json:"team_member,omitempty"`
12240 // TrustedNonTeamMember : has no documentation (yet)
12241 TrustedNonTeamMember json.RawMessage `json:"trusted_non_team_member,omitempty"`
12242 // NonTeamMember : has no documentation (yet)
12243 NonTeamMember json.RawMessage `json:"non_team_member,omitempty"`
12244 }
12245 var w wrap
12246 var err error
12247 if err = json.Unmarshal(body, &w); err != nil {
12248 return err
12249 }
12250 u.Tag = w.Tag
12251 switch u.Tag {
12252 case "team_member":
12253 err = json.Unmarshal(body, &u.TeamMember)
12254
12255 if err != nil {
12256 return err
12257 }
12258 case "trusted_non_team_member":
12259 err = json.Unmarshal(body, &u.TrustedNonTeamMember)
12260
12261 if err != nil {
12262 return err
12263 }
12264 case "non_team_member":
12265 err = json.Unmarshal(body, &u.NonTeamMember)
12266
12267 if err != nil {
12268 return err
12269 }
12270 }
12271 return nil
12272 }
12273
12274 // IsUserLogInfoFromJSON converts JSON to a concrete IsUserLogInfo instance
12275 func IsUserLogInfoFromJSON(data []byte) (IsUserLogInfo, error) {
12276 var t userLogInfoUnion
12277 if err := json.Unmarshal(data, &t); err != nil {
12278 return nil, err
12279 }
12280 switch t.Tag {
12281 case "team_member":
12282 return t.TeamMember, nil
12283
12284 case "trusted_non_team_member":
12285 return t.TrustedNonTeamMember, nil
12286
12287 case "non_team_member":
12288 return t.NonTeamMember, nil
12289
12290 }
12291 return nil, nil
12292 }
12293
12294 // NonTeamMemberLogInfo : Non team member's logged information.
12295 type NonTeamMemberLogInfo struct {
12296 UserLogInfo
12297 }
12298
12299 // NewNonTeamMemberLogInfo returns a new NonTeamMemberLogInfo instance
12300 func NewNonTeamMemberLogInfo() *NonTeamMemberLogInfo {
12301 s := new(NonTeamMemberLogInfo)
12302 return s
12303 }
12304
12305 // NoteAclInviteOnlyDetails : Changed Paper doc to invite-only.
12306 type NoteAclInviteOnlyDetails struct {
12307 }
12308
12309 // NewNoteAclInviteOnlyDetails returns a new NoteAclInviteOnlyDetails instance
12310 func NewNoteAclInviteOnlyDetails() *NoteAclInviteOnlyDetails {
12311 s := new(NoteAclInviteOnlyDetails)
12312 return s
12313 }
12314
12315 // NoteAclInviteOnlyType : has no documentation (yet)
12316 type NoteAclInviteOnlyType struct {
12317 // Description : has no documentation (yet)
12318 Description string `json:"description"`
12319 }
12320
12321 // NewNoteAclInviteOnlyType returns a new NoteAclInviteOnlyType instance
12322 func NewNoteAclInviteOnlyType(Description string) *NoteAclInviteOnlyType {
12323 s := new(NoteAclInviteOnlyType)
12324 s.Description = Description
12325 return s
12326 }
12327
12328 // NoteAclLinkDetails : Changed Paper doc to link-accessible.
12329 type NoteAclLinkDetails struct {
12330 }
12331
12332 // NewNoteAclLinkDetails returns a new NoteAclLinkDetails instance
12333 func NewNoteAclLinkDetails() *NoteAclLinkDetails {
12334 s := new(NoteAclLinkDetails)
12335 return s
12336 }
12337
12338 // NoteAclLinkType : has no documentation (yet)
12339 type NoteAclLinkType struct {
12340 // Description : has no documentation (yet)
12341 Description string `json:"description"`
12342 }
12343
12344 // NewNoteAclLinkType returns a new NoteAclLinkType instance
12345 func NewNoteAclLinkType(Description string) *NoteAclLinkType {
12346 s := new(NoteAclLinkType)
12347 s.Description = Description
12348 return s
12349 }
12350
12351 // NoteAclTeamLinkDetails : Changed Paper doc to link-accessible for team.
12352 type NoteAclTeamLinkDetails struct {
12353 }
12354
12355 // NewNoteAclTeamLinkDetails returns a new NoteAclTeamLinkDetails instance
12356 func NewNoteAclTeamLinkDetails() *NoteAclTeamLinkDetails {
12357 s := new(NoteAclTeamLinkDetails)
12358 return s
12359 }
12360
12361 // NoteAclTeamLinkType : has no documentation (yet)
12362 type NoteAclTeamLinkType struct {
12363 // Description : has no documentation (yet)
12364 Description string `json:"description"`
12365 }
12366
12367 // NewNoteAclTeamLinkType returns a new NoteAclTeamLinkType instance
12368 func NewNoteAclTeamLinkType(Description string) *NoteAclTeamLinkType {
12369 s := new(NoteAclTeamLinkType)
12370 s.Description = Description
12371 return s
12372 }
12373
12374 // NoteShareReceiveDetails : Shared received Paper doc.
12375 type NoteShareReceiveDetails struct {
12376 }
12377
12378 // NewNoteShareReceiveDetails returns a new NoteShareReceiveDetails instance
12379 func NewNoteShareReceiveDetails() *NoteShareReceiveDetails {
12380 s := new(NoteShareReceiveDetails)
12381 return s
12382 }
12383
12384 // NoteShareReceiveType : has no documentation (yet)
12385 type NoteShareReceiveType struct {
12386 // Description : has no documentation (yet)
12387 Description string `json:"description"`
12388 }
12389
12390 // NewNoteShareReceiveType returns a new NoteShareReceiveType instance
12391 func NewNoteShareReceiveType(Description string) *NoteShareReceiveType {
12392 s := new(NoteShareReceiveType)
12393 s.Description = Description
12394 return s
12395 }
12396
12397 // NoteSharedDetails : Shared Paper doc.
12398 type NoteSharedDetails struct {
12399 }
12400
12401 // NewNoteSharedDetails returns a new NoteSharedDetails instance
12402 func NewNoteSharedDetails() *NoteSharedDetails {
12403 s := new(NoteSharedDetails)
12404 return s
12405 }
12406
12407 // NoteSharedType : has no documentation (yet)
12408 type NoteSharedType struct {
12409 // Description : has no documentation (yet)
12410 Description string `json:"description"`
12411 }
12412
12413 // NewNoteSharedType returns a new NoteSharedType instance
12414 func NewNoteSharedType(Description string) *NoteSharedType {
12415 s := new(NoteSharedType)
12416 s.Description = Description
12417 return s
12418 }
12419
12420 // OpenNoteSharedDetails : Opened shared Paper doc.
12421 type OpenNoteSharedDetails struct {
12422 }
12423
12424 // NewOpenNoteSharedDetails returns a new OpenNoteSharedDetails instance
12425 func NewOpenNoteSharedDetails() *OpenNoteSharedDetails {
12426 s := new(OpenNoteSharedDetails)
12427 return s
12428 }
12429
12430 // OpenNoteSharedType : has no documentation (yet)
12431 type OpenNoteSharedType struct {
12432 // Description : has no documentation (yet)
12433 Description string `json:"description"`
12434 }
12435
12436 // NewOpenNoteSharedType returns a new OpenNoteSharedType instance
12437 func NewOpenNoteSharedType(Description string) *OpenNoteSharedType {
12438 s := new(OpenNoteSharedType)
12439 s.Description = Description
12440 return s
12441 }
12442
12443 // OriginLogInfo : The origin from which the actor performed the action.
12444 type OriginLogInfo struct {
12445 // GeoLocation : Geographic location details.
12446 GeoLocation *GeoLocationLogInfo `json:"geo_location,omitempty"`
12447 // AccessMethod : The method that was used to perform the action.
12448 AccessMethod *AccessMethodLogInfo `json:"access_method"`
12449 }
12450
12451 // NewOriginLogInfo returns a new OriginLogInfo instance
12452 func NewOriginLogInfo(AccessMethod *AccessMethodLogInfo) *OriginLogInfo {
12453 s := new(OriginLogInfo)
12454 s.AccessMethod = AccessMethod
12455 return s
12456 }
12457
12458 // PaperAccessType : has no documentation (yet)
12459 type PaperAccessType struct {
12460 dropbox.Tagged
12461 }
12462
12463 // Valid tag values for PaperAccessType
12464 const (
12465 PaperAccessTypeViewer = "viewer"
12466 PaperAccessTypeCommenter = "commenter"
12467 PaperAccessTypeEditor = "editor"
12468 PaperAccessTypeOther = "other"
12469 )
12470
12471 // PaperAdminExportStartDetails : Exported all team Paper docs.
12472 type PaperAdminExportStartDetails struct {
12473 }
12474
12475 // NewPaperAdminExportStartDetails returns a new PaperAdminExportStartDetails instance
12476 func NewPaperAdminExportStartDetails() *PaperAdminExportStartDetails {
12477 s := new(PaperAdminExportStartDetails)
12478 return s
12479 }
12480
12481 // PaperAdminExportStartType : has no documentation (yet)
12482 type PaperAdminExportStartType struct {
12483 // Description : has no documentation (yet)
12484 Description string `json:"description"`
12485 }
12486
12487 // NewPaperAdminExportStartType returns a new PaperAdminExportStartType instance
12488 func NewPaperAdminExportStartType(Description string) *PaperAdminExportStartType {
12489 s := new(PaperAdminExportStartType)
12490 s.Description = Description
12491 return s
12492 }
12493
12494 // PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when
12495 // enabled, is deployed to all members or to specific members.
12496 type PaperChangeDeploymentPolicyDetails struct {
12497 // NewValue : New Dropbox Paper deployment policy.
12498 NewValue *team_policies.PaperDeploymentPolicy `json:"new_value"`
12499 // PreviousValue : Previous Dropbox Paper deployment policy. Might be
12500 // missing due to historical data gap.
12501 PreviousValue *team_policies.PaperDeploymentPolicy `json:"previous_value,omitempty"`
12502 }
12503
12504 // NewPaperChangeDeploymentPolicyDetails returns a new PaperChangeDeploymentPolicyDetails instance
12505 func NewPaperChangeDeploymentPolicyDetails(NewValue *team_policies.PaperDeploymentPolicy) *PaperChangeDeploymentPolicyDetails {
12506 s := new(PaperChangeDeploymentPolicyDetails)
12507 s.NewValue = NewValue
12508 return s
12509 }
12510
12511 // PaperChangeDeploymentPolicyType : has no documentation (yet)
12512 type PaperChangeDeploymentPolicyType struct {
12513 // Description : has no documentation (yet)
12514 Description string `json:"description"`
12515 }
12516
12517 // NewPaperChangeDeploymentPolicyType returns a new PaperChangeDeploymentPolicyType instance
12518 func NewPaperChangeDeploymentPolicyType(Description string) *PaperChangeDeploymentPolicyType {
12519 s := new(PaperChangeDeploymentPolicyType)
12520 s.Description = Description
12521 return s
12522 }
12523
12524 // PaperChangeMemberLinkPolicyDetails : Changed whether non-members can view
12525 // Paper docs with link.
12526 type PaperChangeMemberLinkPolicyDetails struct {
12527 // NewValue : New paper external link accessibility policy.
12528 NewValue *PaperMemberPolicy `json:"new_value"`
12529 }
12530
12531 // NewPaperChangeMemberLinkPolicyDetails returns a new PaperChangeMemberLinkPolicyDetails instance
12532 func NewPaperChangeMemberLinkPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberLinkPolicyDetails {
12533 s := new(PaperChangeMemberLinkPolicyDetails)
12534 s.NewValue = NewValue
12535 return s
12536 }
12537
12538 // PaperChangeMemberLinkPolicyType : has no documentation (yet)
12539 type PaperChangeMemberLinkPolicyType struct {
12540 // Description : has no documentation (yet)
12541 Description string `json:"description"`
12542 }
12543
12544 // NewPaperChangeMemberLinkPolicyType returns a new PaperChangeMemberLinkPolicyType instance
12545 func NewPaperChangeMemberLinkPolicyType(Description string) *PaperChangeMemberLinkPolicyType {
12546 s := new(PaperChangeMemberLinkPolicyType)
12547 s.Description = Description
12548 return s
12549 }
12550
12551 // PaperChangeMemberPolicyDetails : Changed whether members can share Paper docs
12552 // outside team, and if docs are accessible only by team members or anyone by
12553 // default.
12554 type PaperChangeMemberPolicyDetails struct {
12555 // NewValue : New paper external accessibility policy.
12556 NewValue *PaperMemberPolicy `json:"new_value"`
12557 // PreviousValue : Previous paper external accessibility policy. Might be
12558 // missing due to historical data gap.
12559 PreviousValue *PaperMemberPolicy `json:"previous_value,omitempty"`
12560 }
12561
12562 // NewPaperChangeMemberPolicyDetails returns a new PaperChangeMemberPolicyDetails instance
12563 func NewPaperChangeMemberPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberPolicyDetails {
12564 s := new(PaperChangeMemberPolicyDetails)
12565 s.NewValue = NewValue
12566 return s
12567 }
12568
12569 // PaperChangeMemberPolicyType : has no documentation (yet)
12570 type PaperChangeMemberPolicyType struct {
12571 // Description : has no documentation (yet)
12572 Description string `json:"description"`
12573 }
12574
12575 // NewPaperChangeMemberPolicyType returns a new PaperChangeMemberPolicyType instance
12576 func NewPaperChangeMemberPolicyType(Description string) *PaperChangeMemberPolicyType {
12577 s := new(PaperChangeMemberPolicyType)
12578 s.Description = Description
12579 return s
12580 }
12581
12582 // PaperChangePolicyDetails : Enabled/disabled Dropbox Paper for team.
12583 type PaperChangePolicyDetails struct {
12584 // NewValue : New Dropbox Paper policy.
12585 NewValue *team_policies.PaperEnabledPolicy `json:"new_value"`
12586 // PreviousValue : Previous Dropbox Paper policy. Might be missing due to
12587 // historical data gap.
12588 PreviousValue *team_policies.PaperEnabledPolicy `json:"previous_value,omitempty"`
12589 }
12590
12591 // NewPaperChangePolicyDetails returns a new PaperChangePolicyDetails instance
12592 func NewPaperChangePolicyDetails(NewValue *team_policies.PaperEnabledPolicy) *PaperChangePolicyDetails {
12593 s := new(PaperChangePolicyDetails)
12594 s.NewValue = NewValue
12595 return s
12596 }
12597
12598 // PaperChangePolicyType : has no documentation (yet)
12599 type PaperChangePolicyType struct {
12600 // Description : has no documentation (yet)
12601 Description string `json:"description"`
12602 }
12603
12604 // NewPaperChangePolicyType returns a new PaperChangePolicyType instance
12605 func NewPaperChangePolicyType(Description string) *PaperChangePolicyType {
12606 s := new(PaperChangePolicyType)
12607 s.Description = Description
12608 return s
12609 }
12610
12611 // PaperContentAddMemberDetails : Added team member to Paper doc/folder.
12612 type PaperContentAddMemberDetails struct {
12613 // EventUuid : Event unique identifier.
12614 EventUuid string `json:"event_uuid"`
12615 }
12616
12617 // NewPaperContentAddMemberDetails returns a new PaperContentAddMemberDetails instance
12618 func NewPaperContentAddMemberDetails(EventUuid string) *PaperContentAddMemberDetails {
12619 s := new(PaperContentAddMemberDetails)
12620 s.EventUuid = EventUuid
12621 return s
12622 }
12623
12624 // PaperContentAddMemberType : has no documentation (yet)
12625 type PaperContentAddMemberType struct {
12626 // Description : has no documentation (yet)
12627 Description string `json:"description"`
12628 }
12629
12630 // NewPaperContentAddMemberType returns a new PaperContentAddMemberType instance
12631 func NewPaperContentAddMemberType(Description string) *PaperContentAddMemberType {
12632 s := new(PaperContentAddMemberType)
12633 s.Description = Description
12634 return s
12635 }
12636
12637 // PaperContentAddToFolderDetails : Added Paper doc/folder to folder.
12638 type PaperContentAddToFolderDetails struct {
12639 // EventUuid : Event unique identifier.
12640 EventUuid string `json:"event_uuid"`
12641 // TargetAssetIndex : Target asset position in the Assets list.
12642 TargetAssetIndex uint64 `json:"target_asset_index"`
12643 // ParentAssetIndex : Parent asset position in the Assets list.
12644 ParentAssetIndex uint64 `json:"parent_asset_index"`
12645 }
12646
12647 // NewPaperContentAddToFolderDetails returns a new PaperContentAddToFolderDetails instance
12648 func NewPaperContentAddToFolderDetails(EventUuid string, TargetAssetIndex uint64, ParentAssetIndex uint64) *PaperContentAddToFolderDetails {
12649 s := new(PaperContentAddToFolderDetails)
12650 s.EventUuid = EventUuid
12651 s.TargetAssetIndex = TargetAssetIndex
12652 s.ParentAssetIndex = ParentAssetIndex
12653 return s
12654 }
12655
12656 // PaperContentAddToFolderType : has no documentation (yet)
12657 type PaperContentAddToFolderType struct {
12658 // Description : has no documentation (yet)
12659 Description string `json:"description"`
12660 }
12661
12662 // NewPaperContentAddToFolderType returns a new PaperContentAddToFolderType instance
12663 func NewPaperContentAddToFolderType(Description string) *PaperContentAddToFolderType {
12664 s := new(PaperContentAddToFolderType)
12665 s.Description = Description
12666 return s
12667 }
12668
12669 // PaperContentArchiveDetails : Archived Paper doc/folder.
12670 type PaperContentArchiveDetails struct {
12671 // EventUuid : Event unique identifier.
12672 EventUuid string `json:"event_uuid"`
12673 }
12674
12675 // NewPaperContentArchiveDetails returns a new PaperContentArchiveDetails instance
12676 func NewPaperContentArchiveDetails(EventUuid string) *PaperContentArchiveDetails {
12677 s := new(PaperContentArchiveDetails)
12678 s.EventUuid = EventUuid
12679 return s
12680 }
12681
12682 // PaperContentArchiveType : has no documentation (yet)
12683 type PaperContentArchiveType struct {
12684 // Description : has no documentation (yet)
12685 Description string `json:"description"`
12686 }
12687
12688 // NewPaperContentArchiveType returns a new PaperContentArchiveType instance
12689 func NewPaperContentArchiveType(Description string) *PaperContentArchiveType {
12690 s := new(PaperContentArchiveType)
12691 s.Description = Description
12692 return s
12693 }
12694
12695 // PaperContentCreateDetails : Created Paper doc/folder.
12696 type PaperContentCreateDetails struct {
12697 // EventUuid : Event unique identifier.
12698 EventUuid string `json:"event_uuid"`
12699 }
12700
12701 // NewPaperContentCreateDetails returns a new PaperContentCreateDetails instance
12702 func NewPaperContentCreateDetails(EventUuid string) *PaperContentCreateDetails {
12703 s := new(PaperContentCreateDetails)
12704 s.EventUuid = EventUuid
12705 return s
12706 }
12707
12708 // PaperContentCreateType : has no documentation (yet)
12709 type PaperContentCreateType struct {
12710 // Description : has no documentation (yet)
12711 Description string `json:"description"`
12712 }
12713
12714 // NewPaperContentCreateType returns a new PaperContentCreateType instance
12715 func NewPaperContentCreateType(Description string) *PaperContentCreateType {
12716 s := new(PaperContentCreateType)
12717 s.Description = Description
12718 return s
12719 }
12720
12721 // PaperContentPermanentlyDeleteDetails : Permanently deleted Paper doc/folder.
12722 type PaperContentPermanentlyDeleteDetails struct {
12723 // EventUuid : Event unique identifier.
12724 EventUuid string `json:"event_uuid"`
12725 }
12726
12727 // NewPaperContentPermanentlyDeleteDetails returns a new PaperContentPermanentlyDeleteDetails instance
12728 func NewPaperContentPermanentlyDeleteDetails(EventUuid string) *PaperContentPermanentlyDeleteDetails {
12729 s := new(PaperContentPermanentlyDeleteDetails)
12730 s.EventUuid = EventUuid
12731 return s
12732 }
12733
12734 // PaperContentPermanentlyDeleteType : has no documentation (yet)
12735 type PaperContentPermanentlyDeleteType struct {
12736 // Description : has no documentation (yet)
12737 Description string `json:"description"`
12738 }
12739
12740 // NewPaperContentPermanentlyDeleteType returns a new PaperContentPermanentlyDeleteType instance
12741 func NewPaperContentPermanentlyDeleteType(Description string) *PaperContentPermanentlyDeleteType {
12742 s := new(PaperContentPermanentlyDeleteType)
12743 s.Description = Description
12744 return s
12745 }
12746
12747 // PaperContentRemoveFromFolderDetails : Removed Paper doc/folder from folder.
12748 type PaperContentRemoveFromFolderDetails struct {
12749 // EventUuid : Event unique identifier.
12750 EventUuid string `json:"event_uuid"`
12751 // TargetAssetIndex : Target asset position in the Assets list.
12752 TargetAssetIndex uint64 `json:"target_asset_index"`
12753 // ParentAssetIndex : Parent asset position in the Assets list.
12754 ParentAssetIndex uint64 `json:"parent_asset_index"`
12755 }
12756
12757 // NewPaperContentRemoveFromFolderDetails returns a new PaperContentRemoveFromFolderDetails instance
12758 func NewPaperContentRemoveFromFolderDetails(EventUuid string, TargetAssetIndex uint64, ParentAssetIndex uint64) *PaperContentRemoveFromFolderDetails {
12759 s := new(PaperContentRemoveFromFolderDetails)
12760 s.EventUuid = EventUuid
12761 s.TargetAssetIndex = TargetAssetIndex
12762 s.ParentAssetIndex = ParentAssetIndex
12763 return s
12764 }
12765
12766 // PaperContentRemoveFromFolderType : has no documentation (yet)
12767 type PaperContentRemoveFromFolderType struct {
12768 // Description : has no documentation (yet)
12769 Description string `json:"description"`
12770 }
12771
12772 // NewPaperContentRemoveFromFolderType returns a new PaperContentRemoveFromFolderType instance
12773 func NewPaperContentRemoveFromFolderType(Description string) *PaperContentRemoveFromFolderType {
12774 s := new(PaperContentRemoveFromFolderType)
12775 s.Description = Description
12776 return s
12777 }
12778
12779 // PaperContentRemoveMemberDetails : Removed team member from Paper doc/folder.
12780 type PaperContentRemoveMemberDetails struct {
12781 // EventUuid : Event unique identifier.
12782 EventUuid string `json:"event_uuid"`
12783 }
12784
12785 // NewPaperContentRemoveMemberDetails returns a new PaperContentRemoveMemberDetails instance
12786 func NewPaperContentRemoveMemberDetails(EventUuid string) *PaperContentRemoveMemberDetails {
12787 s := new(PaperContentRemoveMemberDetails)
12788 s.EventUuid = EventUuid
12789 return s
12790 }
12791
12792 // PaperContentRemoveMemberType : has no documentation (yet)
12793 type PaperContentRemoveMemberType struct {
12794 // Description : has no documentation (yet)
12795 Description string `json:"description"`
12796 }
12797
12798 // NewPaperContentRemoveMemberType returns a new PaperContentRemoveMemberType instance
12799 func NewPaperContentRemoveMemberType(Description string) *PaperContentRemoveMemberType {
12800 s := new(PaperContentRemoveMemberType)
12801 s.Description = Description
12802 return s
12803 }
12804
12805 // PaperContentRenameDetails : Renamed Paper doc/folder.
12806 type PaperContentRenameDetails struct {
12807 // EventUuid : Event unique identifier.
12808 EventUuid string `json:"event_uuid"`
12809 }
12810
12811 // NewPaperContentRenameDetails returns a new PaperContentRenameDetails instance
12812 func NewPaperContentRenameDetails(EventUuid string) *PaperContentRenameDetails {
12813 s := new(PaperContentRenameDetails)
12814 s.EventUuid = EventUuid
12815 return s
12816 }
12817
12818 // PaperContentRenameType : has no documentation (yet)
12819 type PaperContentRenameType struct {
12820 // Description : has no documentation (yet)
12821 Description string `json:"description"`
12822 }
12823
12824 // NewPaperContentRenameType returns a new PaperContentRenameType instance
12825 func NewPaperContentRenameType(Description string) *PaperContentRenameType {
12826 s := new(PaperContentRenameType)
12827 s.Description = Description
12828 return s
12829 }
12830
12831 // PaperContentRestoreDetails : Restored archived Paper doc/folder.
12832 type PaperContentRestoreDetails struct {
12833 // EventUuid : Event unique identifier.
12834 EventUuid string `json:"event_uuid"`
12835 }
12836
12837 // NewPaperContentRestoreDetails returns a new PaperContentRestoreDetails instance
12838 func NewPaperContentRestoreDetails(EventUuid string) *PaperContentRestoreDetails {
12839 s := new(PaperContentRestoreDetails)
12840 s.EventUuid = EventUuid
12841 return s
12842 }
12843
12844 // PaperContentRestoreType : has no documentation (yet)
12845 type PaperContentRestoreType struct {
12846 // Description : has no documentation (yet)
12847 Description string `json:"description"`
12848 }
12849
12850 // NewPaperContentRestoreType returns a new PaperContentRestoreType instance
12851 func NewPaperContentRestoreType(Description string) *PaperContentRestoreType {
12852 s := new(PaperContentRestoreType)
12853 s.Description = Description
12854 return s
12855 }
12856
12857 // PaperDocAddCommentDetails : Added Paper doc comment.
12858 type PaperDocAddCommentDetails struct {
12859 // EventUuid : Event unique identifier.
12860 EventUuid string `json:"event_uuid"`
12861 // CommentText : Comment text. Might be missing due to historical data gap.
12862 CommentText string `json:"comment_text,omitempty"`
12863 }
12864
12865 // NewPaperDocAddCommentDetails returns a new PaperDocAddCommentDetails instance
12866 func NewPaperDocAddCommentDetails(EventUuid string) *PaperDocAddCommentDetails {
12867 s := new(PaperDocAddCommentDetails)
12868 s.EventUuid = EventUuid
12869 return s
12870 }
12871
12872 // PaperDocAddCommentType : has no documentation (yet)
12873 type PaperDocAddCommentType struct {
12874 // Description : has no documentation (yet)
12875 Description string `json:"description"`
12876 }
12877
12878 // NewPaperDocAddCommentType returns a new PaperDocAddCommentType instance
12879 func NewPaperDocAddCommentType(Description string) *PaperDocAddCommentType {
12880 s := new(PaperDocAddCommentType)
12881 s.Description = Description
12882 return s
12883 }
12884
12885 // PaperDocChangeMemberRoleDetails : Changed team member permissions for Paper
12886 // doc.
12887 type PaperDocChangeMemberRoleDetails struct {
12888 // EventUuid : Event unique identifier.
12889 EventUuid string `json:"event_uuid"`
12890 // AccessType : Paper doc access type.
12891 AccessType *PaperAccessType `json:"access_type"`
12892 }
12893
12894 // NewPaperDocChangeMemberRoleDetails returns a new PaperDocChangeMemberRoleDetails instance
12895 func NewPaperDocChangeMemberRoleDetails(EventUuid string, AccessType *PaperAccessType) *PaperDocChangeMemberRoleDetails {
12896 s := new(PaperDocChangeMemberRoleDetails)
12897 s.EventUuid = EventUuid
12898 s.AccessType = AccessType
12899 return s
12900 }
12901
12902 // PaperDocChangeMemberRoleType : has no documentation (yet)
12903 type PaperDocChangeMemberRoleType struct {
12904 // Description : has no documentation (yet)
12905 Description string `json:"description"`
12906 }
12907
12908 // NewPaperDocChangeMemberRoleType returns a new PaperDocChangeMemberRoleType instance
12909 func NewPaperDocChangeMemberRoleType(Description string) *PaperDocChangeMemberRoleType {
12910 s := new(PaperDocChangeMemberRoleType)
12911 s.Description = Description
12912 return s
12913 }
12914
12915 // PaperDocChangeSharingPolicyDetails : Changed sharing setting for Paper doc.
12916 type PaperDocChangeSharingPolicyDetails struct {
12917 // EventUuid : Event unique identifier.
12918 EventUuid string `json:"event_uuid"`
12919 // PublicSharingPolicy : Sharing policy with external users. Might be
12920 // missing due to historical data gap.
12921 PublicSharingPolicy string `json:"public_sharing_policy,omitempty"`
12922 // TeamSharingPolicy : Sharing policy with team. Might be missing due to
12923 // historical data gap.
12924 TeamSharingPolicy string `json:"team_sharing_policy,omitempty"`
12925 }
12926
12927 // NewPaperDocChangeSharingPolicyDetails returns a new PaperDocChangeSharingPolicyDetails instance
12928 func NewPaperDocChangeSharingPolicyDetails(EventUuid string) *PaperDocChangeSharingPolicyDetails {
12929 s := new(PaperDocChangeSharingPolicyDetails)
12930 s.EventUuid = EventUuid
12931 return s
12932 }
12933
12934 // PaperDocChangeSharingPolicyType : has no documentation (yet)
12935 type PaperDocChangeSharingPolicyType struct {
12936 // Description : has no documentation (yet)
12937 Description string `json:"description"`
12938 }
12939
12940 // NewPaperDocChangeSharingPolicyType returns a new PaperDocChangeSharingPolicyType instance
12941 func NewPaperDocChangeSharingPolicyType(Description string) *PaperDocChangeSharingPolicyType {
12942 s := new(PaperDocChangeSharingPolicyType)
12943 s.Description = Description
12944 return s
12945 }
12946
12947 // PaperDocChangeSubscriptionDetails : Followed/unfollowed Paper doc.
12948 type PaperDocChangeSubscriptionDetails struct {
12949 // EventUuid : Event unique identifier.
12950 EventUuid string `json:"event_uuid"`
12951 // NewSubscriptionLevel : New doc subscription level.
12952 NewSubscriptionLevel string `json:"new_subscription_level"`
12953 // PreviousSubscriptionLevel : Previous doc subscription level. Might be
12954 // missing due to historical data gap.
12955 PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"`
12956 }
12957
12958 // NewPaperDocChangeSubscriptionDetails returns a new PaperDocChangeSubscriptionDetails instance
12959 func NewPaperDocChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperDocChangeSubscriptionDetails {
12960 s := new(PaperDocChangeSubscriptionDetails)
12961 s.EventUuid = EventUuid
12962 s.NewSubscriptionLevel = NewSubscriptionLevel
12963 return s
12964 }
12965
12966 // PaperDocChangeSubscriptionType : has no documentation (yet)
12967 type PaperDocChangeSubscriptionType struct {
12968 // Description : has no documentation (yet)
12969 Description string `json:"description"`
12970 }
12971
12972 // NewPaperDocChangeSubscriptionType returns a new PaperDocChangeSubscriptionType instance
12973 func NewPaperDocChangeSubscriptionType(Description string) *PaperDocChangeSubscriptionType {
12974 s := new(PaperDocChangeSubscriptionType)
12975 s.Description = Description
12976 return s
12977 }
12978
12979 // PaperDocDeleteCommentDetails : Deleted Paper doc comment.
12980 type PaperDocDeleteCommentDetails struct {
12981 // EventUuid : Event unique identifier.
12982 EventUuid string `json:"event_uuid"`
12983 // CommentText : Comment text. Might be missing due to historical data gap.
12984 CommentText string `json:"comment_text,omitempty"`
12985 }
12986
12987 // NewPaperDocDeleteCommentDetails returns a new PaperDocDeleteCommentDetails instance
12988 func NewPaperDocDeleteCommentDetails(EventUuid string) *PaperDocDeleteCommentDetails {
12989 s := new(PaperDocDeleteCommentDetails)
12990 s.EventUuid = EventUuid
12991 return s
12992 }
12993
12994 // PaperDocDeleteCommentType : has no documentation (yet)
12995 type PaperDocDeleteCommentType struct {
12996 // Description : has no documentation (yet)
12997 Description string `json:"description"`
12998 }
12999
13000 // NewPaperDocDeleteCommentType returns a new PaperDocDeleteCommentType instance
13001 func NewPaperDocDeleteCommentType(Description string) *PaperDocDeleteCommentType {
13002 s := new(PaperDocDeleteCommentType)
13003 s.Description = Description
13004 return s
13005 }
13006
13007 // PaperDocDeletedDetails : Archived Paper doc.
13008 type PaperDocDeletedDetails struct {
13009 // EventUuid : Event unique identifier.
13010 EventUuid string `json:"event_uuid"`
13011 }
13012
13013 // NewPaperDocDeletedDetails returns a new PaperDocDeletedDetails instance
13014 func NewPaperDocDeletedDetails(EventUuid string) *PaperDocDeletedDetails {
13015 s := new(PaperDocDeletedDetails)
13016 s.EventUuid = EventUuid
13017 return s
13018 }
13019
13020 // PaperDocDeletedType : has no documentation (yet)
13021 type PaperDocDeletedType struct {
13022 // Description : has no documentation (yet)
13023 Description string `json:"description"`
13024 }
13025
13026 // NewPaperDocDeletedType returns a new PaperDocDeletedType instance
13027 func NewPaperDocDeletedType(Description string) *PaperDocDeletedType {
13028 s := new(PaperDocDeletedType)
13029 s.Description = Description
13030 return s
13031 }
13032
13033 // PaperDocDownloadDetails : Downloaded Paper doc in specific format.
13034 type PaperDocDownloadDetails struct {
13035 // EventUuid : Event unique identifier.
13036 EventUuid string `json:"event_uuid"`
13037 // ExportFileFormat : Export file format.
13038 ExportFileFormat *PaperDownloadFormat `json:"export_file_format"`
13039 }
13040
13041 // NewPaperDocDownloadDetails returns a new PaperDocDownloadDetails instance
13042 func NewPaperDocDownloadDetails(EventUuid string, ExportFileFormat *PaperDownloadFormat) *PaperDocDownloadDetails {
13043 s := new(PaperDocDownloadDetails)
13044 s.EventUuid = EventUuid
13045 s.ExportFileFormat = ExportFileFormat
13046 return s
13047 }
13048
13049 // PaperDocDownloadType : has no documentation (yet)
13050 type PaperDocDownloadType struct {
13051 // Description : has no documentation (yet)
13052 Description string `json:"description"`
13053 }
13054
13055 // NewPaperDocDownloadType returns a new PaperDocDownloadType instance
13056 func NewPaperDocDownloadType(Description string) *PaperDocDownloadType {
13057 s := new(PaperDocDownloadType)
13058 s.Description = Description
13059 return s
13060 }
13061
13062 // PaperDocEditCommentDetails : Edited Paper doc comment.
13063 type PaperDocEditCommentDetails struct {
13064 // EventUuid : Event unique identifier.
13065 EventUuid string `json:"event_uuid"`
13066 // CommentText : Comment text. Might be missing due to historical data gap.
13067 CommentText string `json:"comment_text,omitempty"`
13068 }
13069
13070 // NewPaperDocEditCommentDetails returns a new PaperDocEditCommentDetails instance
13071 func NewPaperDocEditCommentDetails(EventUuid string) *PaperDocEditCommentDetails {
13072 s := new(PaperDocEditCommentDetails)
13073 s.EventUuid = EventUuid
13074 return s
13075 }
13076
13077 // PaperDocEditCommentType : has no documentation (yet)
13078 type PaperDocEditCommentType struct {
13079 // Description : has no documentation (yet)
13080 Description string `json:"description"`
13081 }
13082
13083 // NewPaperDocEditCommentType returns a new PaperDocEditCommentType instance
13084 func NewPaperDocEditCommentType(Description string) *PaperDocEditCommentType {
13085 s := new(PaperDocEditCommentType)
13086 s.Description = Description
13087 return s
13088 }
13089
13090 // PaperDocEditDetails : Edited Paper doc.
13091 type PaperDocEditDetails struct {
13092 // EventUuid : Event unique identifier.
13093 EventUuid string `json:"event_uuid"`
13094 }
13095
13096 // NewPaperDocEditDetails returns a new PaperDocEditDetails instance
13097 func NewPaperDocEditDetails(EventUuid string) *PaperDocEditDetails {
13098 s := new(PaperDocEditDetails)
13099 s.EventUuid = EventUuid
13100 return s
13101 }
13102
13103 // PaperDocEditType : has no documentation (yet)
13104 type PaperDocEditType struct {
13105 // Description : has no documentation (yet)
13106 Description string `json:"description"`
13107 }
13108
13109 // NewPaperDocEditType returns a new PaperDocEditType instance
13110 func NewPaperDocEditType(Description string) *PaperDocEditType {
13111 s := new(PaperDocEditType)
13112 s.Description = Description
13113 return s
13114 }
13115
13116 // PaperDocFollowedDetails : Followed Paper doc.
13117 type PaperDocFollowedDetails struct {
13118 // EventUuid : Event unique identifier.
13119 EventUuid string `json:"event_uuid"`
13120 }
13121
13122 // NewPaperDocFollowedDetails returns a new PaperDocFollowedDetails instance
13123 func NewPaperDocFollowedDetails(EventUuid string) *PaperDocFollowedDetails {
13124 s := new(PaperDocFollowedDetails)
13125 s.EventUuid = EventUuid
13126 return s
13127 }
13128
13129 // PaperDocFollowedType : has no documentation (yet)
13130 type PaperDocFollowedType struct {
13131 // Description : has no documentation (yet)
13132 Description string `json:"description"`
13133 }
13134
13135 // NewPaperDocFollowedType returns a new PaperDocFollowedType instance
13136 func NewPaperDocFollowedType(Description string) *PaperDocFollowedType {
13137 s := new(PaperDocFollowedType)
13138 s.Description = Description
13139 return s
13140 }
13141
13142 // PaperDocMentionDetails : Mentioned team member in Paper doc.
13143 type PaperDocMentionDetails struct {
13144 // EventUuid : Event unique identifier.
13145 EventUuid string `json:"event_uuid"`
13146 }
13147
13148 // NewPaperDocMentionDetails returns a new PaperDocMentionDetails instance
13149 func NewPaperDocMentionDetails(EventUuid string) *PaperDocMentionDetails {
13150 s := new(PaperDocMentionDetails)
13151 s.EventUuid = EventUuid
13152 return s
13153 }
13154
13155 // PaperDocMentionType : has no documentation (yet)
13156 type PaperDocMentionType struct {
13157 // Description : has no documentation (yet)
13158 Description string `json:"description"`
13159 }
13160
13161 // NewPaperDocMentionType returns a new PaperDocMentionType instance
13162 func NewPaperDocMentionType(Description string) *PaperDocMentionType {
13163 s := new(PaperDocMentionType)
13164 s.Description = Description
13165 return s
13166 }
13167
13168 // PaperDocOwnershipChangedDetails : Transferred ownership of Paper doc.
13169 type PaperDocOwnershipChangedDetails struct {
13170 // EventUuid : Event unique identifier.
13171 EventUuid string `json:"event_uuid"`
13172 // OldOwnerUserId : Previous owner.
13173 OldOwnerUserId string `json:"old_owner_user_id,omitempty"`
13174 // NewOwnerUserId : New owner.
13175 NewOwnerUserId string `json:"new_owner_user_id"`
13176 }
13177
13178 // NewPaperDocOwnershipChangedDetails returns a new PaperDocOwnershipChangedDetails instance
13179 func NewPaperDocOwnershipChangedDetails(EventUuid string, NewOwnerUserId string) *PaperDocOwnershipChangedDetails {
13180 s := new(PaperDocOwnershipChangedDetails)
13181 s.EventUuid = EventUuid
13182 s.NewOwnerUserId = NewOwnerUserId
13183 return s
13184 }
13185
13186 // PaperDocOwnershipChangedType : has no documentation (yet)
13187 type PaperDocOwnershipChangedType struct {
13188 // Description : has no documentation (yet)
13189 Description string `json:"description"`
13190 }
13191
13192 // NewPaperDocOwnershipChangedType returns a new PaperDocOwnershipChangedType instance
13193 func NewPaperDocOwnershipChangedType(Description string) *PaperDocOwnershipChangedType {
13194 s := new(PaperDocOwnershipChangedType)
13195 s.Description = Description
13196 return s
13197 }
13198
13199 // PaperDocRequestAccessDetails : Requested access to Paper doc.
13200 type PaperDocRequestAccessDetails struct {
13201 // EventUuid : Event unique identifier.
13202 EventUuid string `json:"event_uuid"`
13203 }
13204
13205 // NewPaperDocRequestAccessDetails returns a new PaperDocRequestAccessDetails instance
13206 func NewPaperDocRequestAccessDetails(EventUuid string) *PaperDocRequestAccessDetails {
13207 s := new(PaperDocRequestAccessDetails)
13208 s.EventUuid = EventUuid
13209 return s
13210 }
13211
13212 // PaperDocRequestAccessType : has no documentation (yet)
13213 type PaperDocRequestAccessType struct {
13214 // Description : has no documentation (yet)
13215 Description string `json:"description"`
13216 }
13217
13218 // NewPaperDocRequestAccessType returns a new PaperDocRequestAccessType instance
13219 func NewPaperDocRequestAccessType(Description string) *PaperDocRequestAccessType {
13220 s := new(PaperDocRequestAccessType)
13221 s.Description = Description
13222 return s
13223 }
13224
13225 // PaperDocResolveCommentDetails : Resolved Paper doc comment.
13226 type PaperDocResolveCommentDetails struct {
13227 // EventUuid : Event unique identifier.
13228 EventUuid string `json:"event_uuid"`
13229 // CommentText : Comment text. Might be missing due to historical data gap.
13230 CommentText string `json:"comment_text,omitempty"`
13231 }
13232
13233 // NewPaperDocResolveCommentDetails returns a new PaperDocResolveCommentDetails instance
13234 func NewPaperDocResolveCommentDetails(EventUuid string) *PaperDocResolveCommentDetails {
13235 s := new(PaperDocResolveCommentDetails)
13236 s.EventUuid = EventUuid
13237 return s
13238 }
13239
13240 // PaperDocResolveCommentType : has no documentation (yet)
13241 type PaperDocResolveCommentType struct {
13242 // Description : has no documentation (yet)
13243 Description string `json:"description"`
13244 }
13245
13246 // NewPaperDocResolveCommentType returns a new PaperDocResolveCommentType instance
13247 func NewPaperDocResolveCommentType(Description string) *PaperDocResolveCommentType {
13248 s := new(PaperDocResolveCommentType)
13249 s.Description = Description
13250 return s
13251 }
13252
13253 // PaperDocRevertDetails : Restored Paper doc to previous version.
13254 type PaperDocRevertDetails struct {
13255 // EventUuid : Event unique identifier.
13256 EventUuid string `json:"event_uuid"`
13257 }
13258
13259 // NewPaperDocRevertDetails returns a new PaperDocRevertDetails instance
13260 func NewPaperDocRevertDetails(EventUuid string) *PaperDocRevertDetails {
13261 s := new(PaperDocRevertDetails)
13262 s.EventUuid = EventUuid
13263 return s
13264 }
13265
13266 // PaperDocRevertType : has no documentation (yet)
13267 type PaperDocRevertType struct {
13268 // Description : has no documentation (yet)
13269 Description string `json:"description"`
13270 }
13271
13272 // NewPaperDocRevertType returns a new PaperDocRevertType instance
13273 func NewPaperDocRevertType(Description string) *PaperDocRevertType {
13274 s := new(PaperDocRevertType)
13275 s.Description = Description
13276 return s
13277 }
13278
13279 // PaperDocSlackShareDetails : Shared Paper doc via Slack.
13280 type PaperDocSlackShareDetails struct {
13281 // EventUuid : Event unique identifier.
13282 EventUuid string `json:"event_uuid"`
13283 }
13284
13285 // NewPaperDocSlackShareDetails returns a new PaperDocSlackShareDetails instance
13286 func NewPaperDocSlackShareDetails(EventUuid string) *PaperDocSlackShareDetails {
13287 s := new(PaperDocSlackShareDetails)
13288 s.EventUuid = EventUuid
13289 return s
13290 }
13291
13292 // PaperDocSlackShareType : has no documentation (yet)
13293 type PaperDocSlackShareType struct {
13294 // Description : has no documentation (yet)
13295 Description string `json:"description"`
13296 }
13297
13298 // NewPaperDocSlackShareType returns a new PaperDocSlackShareType instance
13299 func NewPaperDocSlackShareType(Description string) *PaperDocSlackShareType {
13300 s := new(PaperDocSlackShareType)
13301 s.Description = Description
13302 return s
13303 }
13304
13305 // PaperDocTeamInviteDetails : Shared Paper doc with team member.
13306 type PaperDocTeamInviteDetails struct {
13307 // EventUuid : Event unique identifier.
13308 EventUuid string `json:"event_uuid"`
13309 }
13310
13311 // NewPaperDocTeamInviteDetails returns a new PaperDocTeamInviteDetails instance
13312 func NewPaperDocTeamInviteDetails(EventUuid string) *PaperDocTeamInviteDetails {
13313 s := new(PaperDocTeamInviteDetails)
13314 s.EventUuid = EventUuid
13315 return s
13316 }
13317
13318 // PaperDocTeamInviteType : has no documentation (yet)
13319 type PaperDocTeamInviteType struct {
13320 // Description : has no documentation (yet)
13321 Description string `json:"description"`
13322 }
13323
13324 // NewPaperDocTeamInviteType returns a new PaperDocTeamInviteType instance
13325 func NewPaperDocTeamInviteType(Description string) *PaperDocTeamInviteType {
13326 s := new(PaperDocTeamInviteType)
13327 s.Description = Description
13328 return s
13329 }
13330
13331 // PaperDocTrashedDetails : Deleted Paper doc.
13332 type PaperDocTrashedDetails struct {
13333 // EventUuid : Event unique identifier.
13334 EventUuid string `json:"event_uuid"`
13335 }
13336
13337 // NewPaperDocTrashedDetails returns a new PaperDocTrashedDetails instance
13338 func NewPaperDocTrashedDetails(EventUuid string) *PaperDocTrashedDetails {
13339 s := new(PaperDocTrashedDetails)
13340 s.EventUuid = EventUuid
13341 return s
13342 }
13343
13344 // PaperDocTrashedType : has no documentation (yet)
13345 type PaperDocTrashedType struct {
13346 // Description : has no documentation (yet)
13347 Description string `json:"description"`
13348 }
13349
13350 // NewPaperDocTrashedType returns a new PaperDocTrashedType instance
13351 func NewPaperDocTrashedType(Description string) *PaperDocTrashedType {
13352 s := new(PaperDocTrashedType)
13353 s.Description = Description
13354 return s
13355 }
13356
13357 // PaperDocUnresolveCommentDetails : Unresolved Paper doc comment.
13358 type PaperDocUnresolveCommentDetails struct {
13359 // EventUuid : Event unique identifier.
13360 EventUuid string `json:"event_uuid"`
13361 // CommentText : Comment text. Might be missing due to historical data gap.
13362 CommentText string `json:"comment_text,omitempty"`
13363 }
13364
13365 // NewPaperDocUnresolveCommentDetails returns a new PaperDocUnresolveCommentDetails instance
13366 func NewPaperDocUnresolveCommentDetails(EventUuid string) *PaperDocUnresolveCommentDetails {
13367 s := new(PaperDocUnresolveCommentDetails)
13368 s.EventUuid = EventUuid
13369 return s
13370 }
13371
13372 // PaperDocUnresolveCommentType : has no documentation (yet)
13373 type PaperDocUnresolveCommentType struct {
13374 // Description : has no documentation (yet)
13375 Description string `json:"description"`
13376 }
13377
13378 // NewPaperDocUnresolveCommentType returns a new PaperDocUnresolveCommentType instance
13379 func NewPaperDocUnresolveCommentType(Description string) *PaperDocUnresolveCommentType {
13380 s := new(PaperDocUnresolveCommentType)
13381 s.Description = Description
13382 return s
13383 }
13384
13385 // PaperDocUntrashedDetails : Restored Paper doc.
13386 type PaperDocUntrashedDetails struct {
13387 // EventUuid : Event unique identifier.
13388 EventUuid string `json:"event_uuid"`
13389 }
13390
13391 // NewPaperDocUntrashedDetails returns a new PaperDocUntrashedDetails instance
13392 func NewPaperDocUntrashedDetails(EventUuid string) *PaperDocUntrashedDetails {
13393 s := new(PaperDocUntrashedDetails)
13394 s.EventUuid = EventUuid
13395 return s
13396 }
13397
13398 // PaperDocUntrashedType : has no documentation (yet)
13399 type PaperDocUntrashedType struct {
13400 // Description : has no documentation (yet)
13401 Description string `json:"description"`
13402 }
13403
13404 // NewPaperDocUntrashedType returns a new PaperDocUntrashedType instance
13405 func NewPaperDocUntrashedType(Description string) *PaperDocUntrashedType {
13406 s := new(PaperDocUntrashedType)
13407 s.Description = Description
13408 return s
13409 }
13410
13411 // PaperDocViewDetails : Viewed Paper doc.
13412 type PaperDocViewDetails struct {
13413 // EventUuid : Event unique identifier.
13414 EventUuid string `json:"event_uuid"`
13415 }
13416
13417 // NewPaperDocViewDetails returns a new PaperDocViewDetails instance
13418 func NewPaperDocViewDetails(EventUuid string) *PaperDocViewDetails {
13419 s := new(PaperDocViewDetails)
13420 s.EventUuid = EventUuid
13421 return s
13422 }
13423
13424 // PaperDocViewType : has no documentation (yet)
13425 type PaperDocViewType struct {
13426 // Description : has no documentation (yet)
13427 Description string `json:"description"`
13428 }
13429
13430 // NewPaperDocViewType returns a new PaperDocViewType instance
13431 func NewPaperDocViewType(Description string) *PaperDocViewType {
13432 s := new(PaperDocViewType)
13433 s.Description = Description
13434 return s
13435 }
13436
13437 // PaperDocumentLogInfo : Paper document's logged information.
13438 type PaperDocumentLogInfo struct {
13439 // DocId : Papers document Id.
13440 DocId string `json:"doc_id"`
13441 // DocTitle : Paper document title.
13442 DocTitle string `json:"doc_title"`
13443 }
13444
13445 // NewPaperDocumentLogInfo returns a new PaperDocumentLogInfo instance
13446 func NewPaperDocumentLogInfo(DocId string, DocTitle string) *PaperDocumentLogInfo {
13447 s := new(PaperDocumentLogInfo)
13448 s.DocId = DocId
13449 s.DocTitle = DocTitle
13450 return s
13451 }
13452
13453 // PaperDownloadFormat : has no documentation (yet)
13454 type PaperDownloadFormat struct {
13455 dropbox.Tagged
13456 }
13457
13458 // Valid tag values for PaperDownloadFormat
13459 const (
13460 PaperDownloadFormatDocx = "docx"
13461 PaperDownloadFormatHtml = "html"
13462 PaperDownloadFormatMarkdown = "markdown"
13463 PaperDownloadFormatPdf = "pdf"
13464 PaperDownloadFormatOther = "other"
13465 )
13466
13467 // PaperEnabledUsersGroupAdditionDetails : Added users to Paper-enabled users
13468 // list.
13469 type PaperEnabledUsersGroupAdditionDetails struct {
13470 }
13471
13472 // NewPaperEnabledUsersGroupAdditionDetails returns a new PaperEnabledUsersGroupAdditionDetails instance
13473 func NewPaperEnabledUsersGroupAdditionDetails() *PaperEnabledUsersGroupAdditionDetails {
13474 s := new(PaperEnabledUsersGroupAdditionDetails)
13475 return s
13476 }
13477
13478 // PaperEnabledUsersGroupAdditionType : has no documentation (yet)
13479 type PaperEnabledUsersGroupAdditionType struct {
13480 // Description : has no documentation (yet)
13481 Description string `json:"description"`
13482 }
13483
13484 // NewPaperEnabledUsersGroupAdditionType returns a new PaperEnabledUsersGroupAdditionType instance
13485 func NewPaperEnabledUsersGroupAdditionType(Description string) *PaperEnabledUsersGroupAdditionType {
13486 s := new(PaperEnabledUsersGroupAdditionType)
13487 s.Description = Description
13488 return s
13489 }
13490
13491 // PaperEnabledUsersGroupRemovalDetails : Removed users from Paper-enabled users
13492 // list.
13493 type PaperEnabledUsersGroupRemovalDetails struct {
13494 }
13495
13496 // NewPaperEnabledUsersGroupRemovalDetails returns a new PaperEnabledUsersGroupRemovalDetails instance
13497 func NewPaperEnabledUsersGroupRemovalDetails() *PaperEnabledUsersGroupRemovalDetails {
13498 s := new(PaperEnabledUsersGroupRemovalDetails)
13499 return s
13500 }
13501
13502 // PaperEnabledUsersGroupRemovalType : has no documentation (yet)
13503 type PaperEnabledUsersGroupRemovalType struct {
13504 // Description : has no documentation (yet)
13505 Description string `json:"description"`
13506 }
13507
13508 // NewPaperEnabledUsersGroupRemovalType returns a new PaperEnabledUsersGroupRemovalType instance
13509 func NewPaperEnabledUsersGroupRemovalType(Description string) *PaperEnabledUsersGroupRemovalType {
13510 s := new(PaperEnabledUsersGroupRemovalType)
13511 s.Description = Description
13512 return s
13513 }
13514
13515 // PaperExternalViewAllowDetails : Changed Paper external sharing setting to
13516 // anyone.
13517 type PaperExternalViewAllowDetails struct {
13518 // EventUuid : Event unique identifier.
13519 EventUuid string `json:"event_uuid"`
13520 }
13521
13522 // NewPaperExternalViewAllowDetails returns a new PaperExternalViewAllowDetails instance
13523 func NewPaperExternalViewAllowDetails(EventUuid string) *PaperExternalViewAllowDetails {
13524 s := new(PaperExternalViewAllowDetails)
13525 s.EventUuid = EventUuid
13526 return s
13527 }
13528
13529 // PaperExternalViewAllowType : has no documentation (yet)
13530 type PaperExternalViewAllowType struct {
13531 // Description : has no documentation (yet)
13532 Description string `json:"description"`
13533 }
13534
13535 // NewPaperExternalViewAllowType returns a new PaperExternalViewAllowType instance
13536 func NewPaperExternalViewAllowType(Description string) *PaperExternalViewAllowType {
13537 s := new(PaperExternalViewAllowType)
13538 s.Description = Description
13539 return s
13540 }
13541
13542 // PaperExternalViewDefaultTeamDetails : Changed Paper external sharing setting
13543 // to default team.
13544 type PaperExternalViewDefaultTeamDetails struct {
13545 // EventUuid : Event unique identifier.
13546 EventUuid string `json:"event_uuid"`
13547 }
13548
13549 // NewPaperExternalViewDefaultTeamDetails returns a new PaperExternalViewDefaultTeamDetails instance
13550 func NewPaperExternalViewDefaultTeamDetails(EventUuid string) *PaperExternalViewDefaultTeamDetails {
13551 s := new(PaperExternalViewDefaultTeamDetails)
13552 s.EventUuid = EventUuid
13553 return s
13554 }
13555
13556 // PaperExternalViewDefaultTeamType : has no documentation (yet)
13557 type PaperExternalViewDefaultTeamType struct {
13558 // Description : has no documentation (yet)
13559 Description string `json:"description"`
13560 }
13561
13562 // NewPaperExternalViewDefaultTeamType returns a new PaperExternalViewDefaultTeamType instance
13563 func NewPaperExternalViewDefaultTeamType(Description string) *PaperExternalViewDefaultTeamType {
13564 s := new(PaperExternalViewDefaultTeamType)
13565 s.Description = Description
13566 return s
13567 }
13568
13569 // PaperExternalViewForbidDetails : Changed Paper external sharing setting to
13570 // team-only.
13571 type PaperExternalViewForbidDetails struct {
13572 // EventUuid : Event unique identifier.
13573 EventUuid string `json:"event_uuid"`
13574 }
13575
13576 // NewPaperExternalViewForbidDetails returns a new PaperExternalViewForbidDetails instance
13577 func NewPaperExternalViewForbidDetails(EventUuid string) *PaperExternalViewForbidDetails {
13578 s := new(PaperExternalViewForbidDetails)
13579 s.EventUuid = EventUuid
13580 return s
13581 }
13582
13583 // PaperExternalViewForbidType : has no documentation (yet)
13584 type PaperExternalViewForbidType struct {
13585 // Description : has no documentation (yet)
13586 Description string `json:"description"`
13587 }
13588
13589 // NewPaperExternalViewForbidType returns a new PaperExternalViewForbidType instance
13590 func NewPaperExternalViewForbidType(Description string) *PaperExternalViewForbidType {
13591 s := new(PaperExternalViewForbidType)
13592 s.Description = Description
13593 return s
13594 }
13595
13596 // PaperFolderChangeSubscriptionDetails : Followed/unfollowed Paper folder.
13597 type PaperFolderChangeSubscriptionDetails struct {
13598 // EventUuid : Event unique identifier.
13599 EventUuid string `json:"event_uuid"`
13600 // NewSubscriptionLevel : New folder subscription level.
13601 NewSubscriptionLevel string `json:"new_subscription_level"`
13602 // PreviousSubscriptionLevel : Previous folder subscription level. Might be
13603 // missing due to historical data gap.
13604 PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"`
13605 }
13606
13607 // NewPaperFolderChangeSubscriptionDetails returns a new PaperFolderChangeSubscriptionDetails instance
13608 func NewPaperFolderChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperFolderChangeSubscriptionDetails {
13609 s := new(PaperFolderChangeSubscriptionDetails)
13610 s.EventUuid = EventUuid
13611 s.NewSubscriptionLevel = NewSubscriptionLevel
13612 return s
13613 }
13614
13615 // PaperFolderChangeSubscriptionType : has no documentation (yet)
13616 type PaperFolderChangeSubscriptionType struct {
13617 // Description : has no documentation (yet)
13618 Description string `json:"description"`
13619 }
13620
13621 // NewPaperFolderChangeSubscriptionType returns a new PaperFolderChangeSubscriptionType instance
13622 func NewPaperFolderChangeSubscriptionType(Description string) *PaperFolderChangeSubscriptionType {
13623 s := new(PaperFolderChangeSubscriptionType)
13624 s.Description = Description
13625 return s
13626 }
13627
13628 // PaperFolderDeletedDetails : Archived Paper folder.
13629 type PaperFolderDeletedDetails struct {
13630 // EventUuid : Event unique identifier.
13631 EventUuid string `json:"event_uuid"`
13632 }
13633
13634 // NewPaperFolderDeletedDetails returns a new PaperFolderDeletedDetails instance
13635 func NewPaperFolderDeletedDetails(EventUuid string) *PaperFolderDeletedDetails {
13636 s := new(PaperFolderDeletedDetails)
13637 s.EventUuid = EventUuid
13638 return s
13639 }
13640
13641 // PaperFolderDeletedType : has no documentation (yet)
13642 type PaperFolderDeletedType struct {
13643 // Description : has no documentation (yet)
13644 Description string `json:"description"`
13645 }
13646
13647 // NewPaperFolderDeletedType returns a new PaperFolderDeletedType instance
13648 func NewPaperFolderDeletedType(Description string) *PaperFolderDeletedType {
13649 s := new(PaperFolderDeletedType)
13650 s.Description = Description
13651 return s
13652 }
13653
13654 // PaperFolderFollowedDetails : Followed Paper folder.
13655 type PaperFolderFollowedDetails struct {
13656 // EventUuid : Event unique identifier.
13657 EventUuid string `json:"event_uuid"`
13658 }
13659
13660 // NewPaperFolderFollowedDetails returns a new PaperFolderFollowedDetails instance
13661 func NewPaperFolderFollowedDetails(EventUuid string) *PaperFolderFollowedDetails {
13662 s := new(PaperFolderFollowedDetails)
13663 s.EventUuid = EventUuid
13664 return s
13665 }
13666
13667 // PaperFolderFollowedType : has no documentation (yet)
13668 type PaperFolderFollowedType struct {
13669 // Description : has no documentation (yet)
13670 Description string `json:"description"`
13671 }
13672
13673 // NewPaperFolderFollowedType returns a new PaperFolderFollowedType instance
13674 func NewPaperFolderFollowedType(Description string) *PaperFolderFollowedType {
13675 s := new(PaperFolderFollowedType)
13676 s.Description = Description
13677 return s
13678 }
13679
13680 // PaperFolderLogInfo : Paper folder's logged information.
13681 type PaperFolderLogInfo struct {
13682 // FolderId : Papers folder Id.
13683 FolderId string `json:"folder_id"`
13684 // FolderName : Paper folder name.
13685 FolderName string `json:"folder_name"`
13686 }
13687
13688 // NewPaperFolderLogInfo returns a new PaperFolderLogInfo instance
13689 func NewPaperFolderLogInfo(FolderId string, FolderName string) *PaperFolderLogInfo {
13690 s := new(PaperFolderLogInfo)
13691 s.FolderId = FolderId
13692 s.FolderName = FolderName
13693 return s
13694 }
13695
13696 // PaperFolderTeamInviteDetails : Shared Paper folder with member.
13697 type PaperFolderTeamInviteDetails struct {
13698 // EventUuid : Event unique identifier.
13699 EventUuid string `json:"event_uuid"`
13700 }
13701
13702 // NewPaperFolderTeamInviteDetails returns a new PaperFolderTeamInviteDetails instance
13703 func NewPaperFolderTeamInviteDetails(EventUuid string) *PaperFolderTeamInviteDetails {
13704 s := new(PaperFolderTeamInviteDetails)
13705 s.EventUuid = EventUuid
13706 return s
13707 }
13708
13709 // PaperFolderTeamInviteType : has no documentation (yet)
13710 type PaperFolderTeamInviteType struct {
13711 // Description : has no documentation (yet)
13712 Description string `json:"description"`
13713 }
13714
13715 // NewPaperFolderTeamInviteType returns a new PaperFolderTeamInviteType instance
13716 func NewPaperFolderTeamInviteType(Description string) *PaperFolderTeamInviteType {
13717 s := new(PaperFolderTeamInviteType)
13718 s.Description = Description
13719 return s
13720 }
13721
13722 // PaperMemberPolicy : Policy for controlling if team members can share Paper
13723 // documents externally.
13724 type PaperMemberPolicy struct {
13725 dropbox.Tagged
13726 }
13727
13728 // Valid tag values for PaperMemberPolicy
13729 const (
13730 PaperMemberPolicyAnyoneWithLink = "anyone_with_link"
13731 PaperMemberPolicyOnlyTeam = "only_team"
13732 PaperMemberPolicyTeamAndExplicitlyShared = "team_and_explicitly_shared"
13733 PaperMemberPolicyOther = "other"
13734 )
13735
13736 // ParticipantLogInfo : A user or group
13737 type ParticipantLogInfo struct {
13738 dropbox.Tagged
13739 // User : A user with a Dropbox account.
13740 User IsUserLogInfo `json:"user,omitempty"`
13741 // Group : Group details.
13742 Group *GroupLogInfo `json:"group,omitempty"`
13743 }
13744
13745 // Valid tag values for ParticipantLogInfo
13746 const (
13747 ParticipantLogInfoUser = "user"
13748 ParticipantLogInfoGroup = "group"
13749 ParticipantLogInfoOther = "other"
13750 )
13751
13752 // UnmarshalJSON deserializes into a ParticipantLogInfo instance
13753 func (u *ParticipantLogInfo) UnmarshalJSON(body []byte) error {
13754 type wrap struct {
13755 dropbox.Tagged
13756 // User : A user with a Dropbox account.
13757 User json.RawMessage `json:"user,omitempty"`
13758 // Group : Group details.
13759 Group json.RawMessage `json:"group,omitempty"`
13760 }
13761 var w wrap
13762 var err error
13763 if err = json.Unmarshal(body, &w); err != nil {
13764 return err
13765 }
13766 u.Tag = w.Tag
13767 switch u.Tag {
13768 case "user":
13769 u.User, err = IsUserLogInfoFromJSON(body)
13770
13771 if err != nil {
13772 return err
13773 }
13774 case "group":
13775 err = json.Unmarshal(body, &u.Group)
13776
13777 if err != nil {
13778 return err
13779 }
13780 }
13781 return nil
13782 }
13783
13784 // PassPolicy : has no documentation (yet)
13785 type PassPolicy struct {
13786 dropbox.Tagged
13787 }
13788
13789 // Valid tag values for PassPolicy
13790 const (
13791 PassPolicyEnabled = "enabled"
13792 PassPolicyAllow = "allow"
13793 PassPolicyDisabled = "disabled"
13794 PassPolicyOther = "other"
13795 )
13796
13797 // PasswordChangeDetails : Changed password.
13798 type PasswordChangeDetails struct {
13799 }
13800
13801 // NewPasswordChangeDetails returns a new PasswordChangeDetails instance
13802 func NewPasswordChangeDetails() *PasswordChangeDetails {
13803 s := new(PasswordChangeDetails)
13804 return s
13805 }
13806
13807 // PasswordChangeType : has no documentation (yet)
13808 type PasswordChangeType struct {
13809 // Description : has no documentation (yet)
13810 Description string `json:"description"`
13811 }
13812
13813 // NewPasswordChangeType returns a new PasswordChangeType instance
13814 func NewPasswordChangeType(Description string) *PasswordChangeType {
13815 s := new(PasswordChangeType)
13816 s.Description = Description
13817 return s
13818 }
13819
13820 // PasswordResetAllDetails : Reset all team member passwords.
13821 type PasswordResetAllDetails struct {
13822 }
13823
13824 // NewPasswordResetAllDetails returns a new PasswordResetAllDetails instance
13825 func NewPasswordResetAllDetails() *PasswordResetAllDetails {
13826 s := new(PasswordResetAllDetails)
13827 return s
13828 }
13829
13830 // PasswordResetAllType : has no documentation (yet)
13831 type PasswordResetAllType struct {
13832 // Description : has no documentation (yet)
13833 Description string `json:"description"`
13834 }
13835
13836 // NewPasswordResetAllType returns a new PasswordResetAllType instance
13837 func NewPasswordResetAllType(Description string) *PasswordResetAllType {
13838 s := new(PasswordResetAllType)
13839 s.Description = Description
13840 return s
13841 }
13842
13843 // PasswordResetDetails : Reset password.
13844 type PasswordResetDetails struct {
13845 }
13846
13847 // NewPasswordResetDetails returns a new PasswordResetDetails instance
13848 func NewPasswordResetDetails() *PasswordResetDetails {
13849 s := new(PasswordResetDetails)
13850 return s
13851 }
13852
13853 // PasswordResetType : has no documentation (yet)
13854 type PasswordResetType struct {
13855 // Description : has no documentation (yet)
13856 Description string `json:"description"`
13857 }
13858
13859 // NewPasswordResetType returns a new PasswordResetType instance
13860 func NewPasswordResetType(Description string) *PasswordResetType {
13861 s := new(PasswordResetType)
13862 s.Description = Description
13863 return s
13864 }
13865
13866 // PathLogInfo : Path's details.
13867 type PathLogInfo struct {
13868 // Contextual : Fully qualified path relative to event's context. Might be
13869 // missing due to historical data gap.
13870 Contextual string `json:"contextual,omitempty"`
13871 // NamespaceRelative : Path relative to the namespace containing the
13872 // content.
13873 NamespaceRelative *NamespaceRelativePathLogInfo `json:"namespace_relative"`
13874 }
13875
13876 // NewPathLogInfo returns a new PathLogInfo instance
13877 func NewPathLogInfo(NamespaceRelative *NamespaceRelativePathLogInfo) *PathLogInfo {
13878 s := new(PathLogInfo)
13879 s.NamespaceRelative = NamespaceRelative
13880 return s
13881 }
13882
13883 // PermanentDeleteChangePolicyDetails : Enabled/disabled ability of team members
13884 // to permanently delete content.
13885 type PermanentDeleteChangePolicyDetails struct {
13886 // NewValue : New permanent delete content policy.
13887 NewValue *ContentPermanentDeletePolicy `json:"new_value"`
13888 // PreviousValue : Previous permanent delete content policy. Might be
13889 // missing due to historical data gap.
13890 PreviousValue *ContentPermanentDeletePolicy `json:"previous_value,omitempty"`
13891 }
13892
13893 // NewPermanentDeleteChangePolicyDetails returns a new PermanentDeleteChangePolicyDetails instance
13894 func NewPermanentDeleteChangePolicyDetails(NewValue *ContentPermanentDeletePolicy) *PermanentDeleteChangePolicyDetails {
13895 s := new(PermanentDeleteChangePolicyDetails)
13896 s.NewValue = NewValue
13897 return s
13898 }
13899
13900 // PermanentDeleteChangePolicyType : has no documentation (yet)
13901 type PermanentDeleteChangePolicyType struct {
13902 // Description : has no documentation (yet)
13903 Description string `json:"description"`
13904 }
13905
13906 // NewPermanentDeleteChangePolicyType returns a new PermanentDeleteChangePolicyType instance
13907 func NewPermanentDeleteChangePolicyType(Description string) *PermanentDeleteChangePolicyType {
13908 s := new(PermanentDeleteChangePolicyType)
13909 s.Description = Description
13910 return s
13911 }
13912
13913 // PlacementRestriction : has no documentation (yet)
13914 type PlacementRestriction struct {
13915 dropbox.Tagged
13916 }
13917
13918 // Valid tag values for PlacementRestriction
13919 const (
13920 PlacementRestrictionEuropeOnly = "europe_only"
13921 PlacementRestrictionNone = "none"
13922 PlacementRestrictionOther = "other"
13923 )
13924
13925 // QuickActionType : Quick action type.
13926 type QuickActionType struct {
13927 dropbox.Tagged
13928 }
13929
13930 // Valid tag values for QuickActionType
13931 const (
13932 QuickActionTypeDeleteSharedLink = "delete_shared_link"
13933 QuickActionTypeOther = "other"
13934 )
13935
13936 // RelocateAssetReferencesLogInfo : Provides the indices of the source asset and
13937 // the destination asset for a relocate action.
13938 type RelocateAssetReferencesLogInfo struct {
13939 // SrcAssetIndex : Source asset position in the Assets list.
13940 SrcAssetIndex uint64 `json:"src_asset_index"`
13941 // DestAssetIndex : Destination asset position in the Assets list.
13942 DestAssetIndex uint64 `json:"dest_asset_index"`
13943 }
13944
13945 // NewRelocateAssetReferencesLogInfo returns a new RelocateAssetReferencesLogInfo instance
13946 func NewRelocateAssetReferencesLogInfo(SrcAssetIndex uint64, DestAssetIndex uint64) *RelocateAssetReferencesLogInfo {
13947 s := new(RelocateAssetReferencesLogInfo)
13948 s.SrcAssetIndex = SrcAssetIndex
13949 s.DestAssetIndex = DestAssetIndex
13950 return s
13951 }
13952
13953 // ResellerLogInfo : Reseller information.
13954 type ResellerLogInfo struct {
13955 // ResellerName : Reseller name.
13956 ResellerName string `json:"reseller_name"`
13957 // ResellerEmail : Reseller email.
13958 ResellerEmail string `json:"reseller_email"`
13959 }
13960
13961 // NewResellerLogInfo returns a new ResellerLogInfo instance
13962 func NewResellerLogInfo(ResellerName string, ResellerEmail string) *ResellerLogInfo {
13963 s := new(ResellerLogInfo)
13964 s.ResellerName = ResellerName
13965 s.ResellerEmail = ResellerEmail
13966 return s
13967 }
13968
13969 // ResellerSupportSessionEndDetails : Ended reseller support session.
13970 type ResellerSupportSessionEndDetails struct {
13971 }
13972
13973 // NewResellerSupportSessionEndDetails returns a new ResellerSupportSessionEndDetails instance
13974 func NewResellerSupportSessionEndDetails() *ResellerSupportSessionEndDetails {
13975 s := new(ResellerSupportSessionEndDetails)
13976 return s
13977 }
13978
13979 // ResellerSupportSessionEndType : has no documentation (yet)
13980 type ResellerSupportSessionEndType struct {
13981 // Description : has no documentation (yet)
13982 Description string `json:"description"`
13983 }
13984
13985 // NewResellerSupportSessionEndType returns a new ResellerSupportSessionEndType instance
13986 func NewResellerSupportSessionEndType(Description string) *ResellerSupportSessionEndType {
13987 s := new(ResellerSupportSessionEndType)
13988 s.Description = Description
13989 return s
13990 }
13991
13992 // ResellerSupportSessionStartDetails : Started reseller support session.
13993 type ResellerSupportSessionStartDetails struct {
13994 }
13995
13996 // NewResellerSupportSessionStartDetails returns a new ResellerSupportSessionStartDetails instance
13997 func NewResellerSupportSessionStartDetails() *ResellerSupportSessionStartDetails {
13998 s := new(ResellerSupportSessionStartDetails)
13999 return s
14000 }
14001
14002 // ResellerSupportSessionStartType : has no documentation (yet)
14003 type ResellerSupportSessionStartType struct {
14004 // Description : has no documentation (yet)
14005 Description string `json:"description"`
14006 }
14007
14008 // NewResellerSupportSessionStartType returns a new ResellerSupportSessionStartType instance
14009 func NewResellerSupportSessionStartType(Description string) *ResellerSupportSessionStartType {
14010 s := new(ResellerSupportSessionStartType)
14011 s.Description = Description
14012 return s
14013 }
14014
14015 // SecondaryMailsPolicy : has no documentation (yet)
14016 type SecondaryMailsPolicy struct {
14017 dropbox.Tagged
14018 }
14019
14020 // Valid tag values for SecondaryMailsPolicy
14021 const (
14022 SecondaryMailsPolicyDisabled = "disabled"
14023 SecondaryMailsPolicyEnabled = "enabled"
14024 SecondaryMailsPolicyOther = "other"
14025 )
14026
14027 // SecondaryMailsPolicyChangedDetails : Secondary mails policy changed.
14028 type SecondaryMailsPolicyChangedDetails struct {
14029 // PreviousValue : Previous secondary mails policy.
14030 PreviousValue *SecondaryMailsPolicy `json:"previous_value"`
14031 // NewValue : New secondary mails policy.
14032 NewValue *SecondaryMailsPolicy `json:"new_value"`
14033 }
14034
14035 // NewSecondaryMailsPolicyChangedDetails returns a new SecondaryMailsPolicyChangedDetails instance
14036 func NewSecondaryMailsPolicyChangedDetails(PreviousValue *SecondaryMailsPolicy, NewValue *SecondaryMailsPolicy) *SecondaryMailsPolicyChangedDetails {
14037 s := new(SecondaryMailsPolicyChangedDetails)
14038 s.PreviousValue = PreviousValue
14039 s.NewValue = NewValue
14040 return s
14041 }
14042
14043 // SecondaryMailsPolicyChangedType : has no documentation (yet)
14044 type SecondaryMailsPolicyChangedType struct {
14045 // Description : has no documentation (yet)
14046 Description string `json:"description"`
14047 }
14048
14049 // NewSecondaryMailsPolicyChangedType returns a new SecondaryMailsPolicyChangedType instance
14050 func NewSecondaryMailsPolicyChangedType(Description string) *SecondaryMailsPolicyChangedType {
14051 s := new(SecondaryMailsPolicyChangedType)
14052 s.Description = Description
14053 return s
14054 }
14055
14056 // SfAddGroupDetails : Added team to shared folder.
14057 type SfAddGroupDetails struct {
14058 // TargetAssetIndex : Target asset position in the Assets list.
14059 TargetAssetIndex uint64 `json:"target_asset_index"`
14060 // OriginalFolderName : Original shared folder name.
14061 OriginalFolderName string `json:"original_folder_name"`
14062 // SharingPermission : Sharing permission. Might be missing due to
14063 // historical data gap.
14064 SharingPermission string `json:"sharing_permission,omitempty"`
14065 // TeamName : Team name.
14066 TeamName string `json:"team_name"`
14067 }
14068
14069 // NewSfAddGroupDetails returns a new SfAddGroupDetails instance
14070 func NewSfAddGroupDetails(TargetAssetIndex uint64, OriginalFolderName string, TeamName string) *SfAddGroupDetails {
14071 s := new(SfAddGroupDetails)
14072 s.TargetAssetIndex = TargetAssetIndex
14073 s.OriginalFolderName = OriginalFolderName
14074 s.TeamName = TeamName
14075 return s
14076 }
14077
14078 // SfAddGroupType : has no documentation (yet)
14079 type SfAddGroupType struct {
14080 // Description : has no documentation (yet)
14081 Description string `json:"description"`
14082 }
14083
14084 // NewSfAddGroupType returns a new SfAddGroupType instance
14085 func NewSfAddGroupType(Description string) *SfAddGroupType {
14086 s := new(SfAddGroupType)
14087 s.Description = Description
14088 return s
14089 }
14090
14091 // SfAllowNonMembersToViewSharedLinksDetails : Allowed non-collaborators to view
14092 // links to files in shared folder.
14093 type SfAllowNonMembersToViewSharedLinksDetails struct {
14094 // TargetAssetIndex : Target asset position in the Assets list.
14095 TargetAssetIndex uint64 `json:"target_asset_index"`
14096 // OriginalFolderName : Original shared folder name.
14097 OriginalFolderName string `json:"original_folder_name"`
14098 // SharedFolderType : Shared folder type. Might be missing due to historical
14099 // data gap.
14100 SharedFolderType string `json:"shared_folder_type,omitempty"`
14101 }
14102
14103 // NewSfAllowNonMembersToViewSharedLinksDetails returns a new SfAllowNonMembersToViewSharedLinksDetails instance
14104 func NewSfAllowNonMembersToViewSharedLinksDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfAllowNonMembersToViewSharedLinksDetails {
14105 s := new(SfAllowNonMembersToViewSharedLinksDetails)
14106 s.TargetAssetIndex = TargetAssetIndex
14107 s.OriginalFolderName = OriginalFolderName
14108 return s
14109 }
14110
14111 // SfAllowNonMembersToViewSharedLinksType : has no documentation (yet)
14112 type SfAllowNonMembersToViewSharedLinksType struct {
14113 // Description : has no documentation (yet)
14114 Description string `json:"description"`
14115 }
14116
14117 // NewSfAllowNonMembersToViewSharedLinksType returns a new SfAllowNonMembersToViewSharedLinksType instance
14118 func NewSfAllowNonMembersToViewSharedLinksType(Description string) *SfAllowNonMembersToViewSharedLinksType {
14119 s := new(SfAllowNonMembersToViewSharedLinksType)
14120 s.Description = Description
14121 return s
14122 }
14123
14124 // SfExternalInviteWarnDetails : Set team members to see warning before sharing
14125 // folders outside team.
14126 type SfExternalInviteWarnDetails struct {
14127 // TargetAssetIndex : Target asset position in the Assets list.
14128 TargetAssetIndex uint64 `json:"target_asset_index"`
14129 // OriginalFolderName : Original shared folder name.
14130 OriginalFolderName string `json:"original_folder_name"`
14131 // NewSharingPermission : New sharing permission. Might be missing due to
14132 // historical data gap.
14133 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
14134 // PreviousSharingPermission : Previous sharing permission. Might be missing
14135 // due to historical data gap.
14136 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
14137 }
14138
14139 // NewSfExternalInviteWarnDetails returns a new SfExternalInviteWarnDetails instance
14140 func NewSfExternalInviteWarnDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfExternalInviteWarnDetails {
14141 s := new(SfExternalInviteWarnDetails)
14142 s.TargetAssetIndex = TargetAssetIndex
14143 s.OriginalFolderName = OriginalFolderName
14144 return s
14145 }
14146
14147 // SfExternalInviteWarnType : has no documentation (yet)
14148 type SfExternalInviteWarnType struct {
14149 // Description : has no documentation (yet)
14150 Description string `json:"description"`
14151 }
14152
14153 // NewSfExternalInviteWarnType returns a new SfExternalInviteWarnType instance
14154 func NewSfExternalInviteWarnType(Description string) *SfExternalInviteWarnType {
14155 s := new(SfExternalInviteWarnType)
14156 s.Description = Description
14157 return s
14158 }
14159
14160 // SfFbInviteChangeRoleDetails : Changed Facebook user's role in shared folder.
14161 type SfFbInviteChangeRoleDetails struct {
14162 // TargetAssetIndex : Target asset position in the Assets list.
14163 TargetAssetIndex uint64 `json:"target_asset_index"`
14164 // OriginalFolderName : Original shared folder name.
14165 OriginalFolderName string `json:"original_folder_name"`
14166 // PreviousSharingPermission : Previous sharing permission. Might be missing
14167 // due to historical data gap.
14168 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
14169 // NewSharingPermission : New sharing permission. Might be missing due to
14170 // historical data gap.
14171 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
14172 }
14173
14174 // NewSfFbInviteChangeRoleDetails returns a new SfFbInviteChangeRoleDetails instance
14175 func NewSfFbInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteChangeRoleDetails {
14176 s := new(SfFbInviteChangeRoleDetails)
14177 s.TargetAssetIndex = TargetAssetIndex
14178 s.OriginalFolderName = OriginalFolderName
14179 return s
14180 }
14181
14182 // SfFbInviteChangeRoleType : has no documentation (yet)
14183 type SfFbInviteChangeRoleType struct {
14184 // Description : has no documentation (yet)
14185 Description string `json:"description"`
14186 }
14187
14188 // NewSfFbInviteChangeRoleType returns a new SfFbInviteChangeRoleType instance
14189 func NewSfFbInviteChangeRoleType(Description string) *SfFbInviteChangeRoleType {
14190 s := new(SfFbInviteChangeRoleType)
14191 s.Description = Description
14192 return s
14193 }
14194
14195 // SfFbInviteDetails : Invited Facebook users to shared folder.
14196 type SfFbInviteDetails struct {
14197 // TargetAssetIndex : Target asset position in the Assets list.
14198 TargetAssetIndex uint64 `json:"target_asset_index"`
14199 // OriginalFolderName : Original shared folder name.
14200 OriginalFolderName string `json:"original_folder_name"`
14201 // SharingPermission : Sharing permission. Might be missing due to
14202 // historical data gap.
14203 SharingPermission string `json:"sharing_permission,omitempty"`
14204 }
14205
14206 // NewSfFbInviteDetails returns a new SfFbInviteDetails instance
14207 func NewSfFbInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteDetails {
14208 s := new(SfFbInviteDetails)
14209 s.TargetAssetIndex = TargetAssetIndex
14210 s.OriginalFolderName = OriginalFolderName
14211 return s
14212 }
14213
14214 // SfFbInviteType : has no documentation (yet)
14215 type SfFbInviteType struct {
14216 // Description : has no documentation (yet)
14217 Description string `json:"description"`
14218 }
14219
14220 // NewSfFbInviteType returns a new SfFbInviteType instance
14221 func NewSfFbInviteType(Description string) *SfFbInviteType {
14222 s := new(SfFbInviteType)
14223 s.Description = Description
14224 return s
14225 }
14226
14227 // SfFbUninviteDetails : Uninvited Facebook user from shared folder.
14228 type SfFbUninviteDetails struct {
14229 // TargetAssetIndex : Target asset position in the Assets list.
14230 TargetAssetIndex uint64 `json:"target_asset_index"`
14231 // OriginalFolderName : Original shared folder name.
14232 OriginalFolderName string `json:"original_folder_name"`
14233 }
14234
14235 // NewSfFbUninviteDetails returns a new SfFbUninviteDetails instance
14236 func NewSfFbUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbUninviteDetails {
14237 s := new(SfFbUninviteDetails)
14238 s.TargetAssetIndex = TargetAssetIndex
14239 s.OriginalFolderName = OriginalFolderName
14240 return s
14241 }
14242
14243 // SfFbUninviteType : has no documentation (yet)
14244 type SfFbUninviteType struct {
14245 // Description : has no documentation (yet)
14246 Description string `json:"description"`
14247 }
14248
14249 // NewSfFbUninviteType returns a new SfFbUninviteType instance
14250 func NewSfFbUninviteType(Description string) *SfFbUninviteType {
14251 s := new(SfFbUninviteType)
14252 s.Description = Description
14253 return s
14254 }
14255
14256 // SfInviteGroupDetails : Invited group to shared folder.
14257 type SfInviteGroupDetails struct {
14258 // TargetAssetIndex : Target asset position in the Assets list.
14259 TargetAssetIndex uint64 `json:"target_asset_index"`
14260 }
14261
14262 // NewSfInviteGroupDetails returns a new SfInviteGroupDetails instance
14263 func NewSfInviteGroupDetails(TargetAssetIndex uint64) *SfInviteGroupDetails {
14264 s := new(SfInviteGroupDetails)
14265 s.TargetAssetIndex = TargetAssetIndex
14266 return s
14267 }
14268
14269 // SfInviteGroupType : has no documentation (yet)
14270 type SfInviteGroupType struct {
14271 // Description : has no documentation (yet)
14272 Description string `json:"description"`
14273 }
14274
14275 // NewSfInviteGroupType returns a new SfInviteGroupType instance
14276 func NewSfInviteGroupType(Description string) *SfInviteGroupType {
14277 s := new(SfInviteGroupType)
14278 s.Description = Description
14279 return s
14280 }
14281
14282 // SfTeamGrantAccessDetails : Granted access to shared folder.
14283 type SfTeamGrantAccessDetails struct {
14284 // TargetAssetIndex : Target asset position in the Assets list.
14285 TargetAssetIndex uint64 `json:"target_asset_index"`
14286 // OriginalFolderName : Original shared folder name.
14287 OriginalFolderName string `json:"original_folder_name"`
14288 }
14289
14290 // NewSfTeamGrantAccessDetails returns a new SfTeamGrantAccessDetails instance
14291 func NewSfTeamGrantAccessDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamGrantAccessDetails {
14292 s := new(SfTeamGrantAccessDetails)
14293 s.TargetAssetIndex = TargetAssetIndex
14294 s.OriginalFolderName = OriginalFolderName
14295 return s
14296 }
14297
14298 // SfTeamGrantAccessType : has no documentation (yet)
14299 type SfTeamGrantAccessType struct {
14300 // Description : has no documentation (yet)
14301 Description string `json:"description"`
14302 }
14303
14304 // NewSfTeamGrantAccessType returns a new SfTeamGrantAccessType instance
14305 func NewSfTeamGrantAccessType(Description string) *SfTeamGrantAccessType {
14306 s := new(SfTeamGrantAccessType)
14307 s.Description = Description
14308 return s
14309 }
14310
14311 // SfTeamInviteChangeRoleDetails : Changed team member's role in shared folder.
14312 type SfTeamInviteChangeRoleDetails struct {
14313 // TargetAssetIndex : Target asset position in the Assets list.
14314 TargetAssetIndex uint64 `json:"target_asset_index"`
14315 // OriginalFolderName : Original shared folder name.
14316 OriginalFolderName string `json:"original_folder_name"`
14317 // NewSharingPermission : New sharing permission. Might be missing due to
14318 // historical data gap.
14319 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
14320 // PreviousSharingPermission : Previous sharing permission. Might be missing
14321 // due to historical data gap.
14322 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
14323 }
14324
14325 // NewSfTeamInviteChangeRoleDetails returns a new SfTeamInviteChangeRoleDetails instance
14326 func NewSfTeamInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteChangeRoleDetails {
14327 s := new(SfTeamInviteChangeRoleDetails)
14328 s.TargetAssetIndex = TargetAssetIndex
14329 s.OriginalFolderName = OriginalFolderName
14330 return s
14331 }
14332
14333 // SfTeamInviteChangeRoleType : has no documentation (yet)
14334 type SfTeamInviteChangeRoleType struct {
14335 // Description : has no documentation (yet)
14336 Description string `json:"description"`
14337 }
14338
14339 // NewSfTeamInviteChangeRoleType returns a new SfTeamInviteChangeRoleType instance
14340 func NewSfTeamInviteChangeRoleType(Description string) *SfTeamInviteChangeRoleType {
14341 s := new(SfTeamInviteChangeRoleType)
14342 s.Description = Description
14343 return s
14344 }
14345
14346 // SfTeamInviteDetails : Invited team members to shared folder.
14347 type SfTeamInviteDetails struct {
14348 // TargetAssetIndex : Target asset position in the Assets list.
14349 TargetAssetIndex uint64 `json:"target_asset_index"`
14350 // OriginalFolderName : Original shared folder name.
14351 OriginalFolderName string `json:"original_folder_name"`
14352 // SharingPermission : Sharing permission. Might be missing due to
14353 // historical data gap.
14354 SharingPermission string `json:"sharing_permission,omitempty"`
14355 }
14356
14357 // NewSfTeamInviteDetails returns a new SfTeamInviteDetails instance
14358 func NewSfTeamInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteDetails {
14359 s := new(SfTeamInviteDetails)
14360 s.TargetAssetIndex = TargetAssetIndex
14361 s.OriginalFolderName = OriginalFolderName
14362 return s
14363 }
14364
14365 // SfTeamInviteType : has no documentation (yet)
14366 type SfTeamInviteType struct {
14367 // Description : has no documentation (yet)
14368 Description string `json:"description"`
14369 }
14370
14371 // NewSfTeamInviteType returns a new SfTeamInviteType instance
14372 func NewSfTeamInviteType(Description string) *SfTeamInviteType {
14373 s := new(SfTeamInviteType)
14374 s.Description = Description
14375 return s
14376 }
14377
14378 // SfTeamJoinDetails : Joined team member's shared folder.
14379 type SfTeamJoinDetails struct {
14380 // TargetAssetIndex : Target asset position in the Assets list.
14381 TargetAssetIndex uint64 `json:"target_asset_index"`
14382 // OriginalFolderName : Original shared folder name.
14383 OriginalFolderName string `json:"original_folder_name"`
14384 }
14385
14386 // NewSfTeamJoinDetails returns a new SfTeamJoinDetails instance
14387 func NewSfTeamJoinDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinDetails {
14388 s := new(SfTeamJoinDetails)
14389 s.TargetAssetIndex = TargetAssetIndex
14390 s.OriginalFolderName = OriginalFolderName
14391 return s
14392 }
14393
14394 // SfTeamJoinFromOobLinkDetails : Joined team member's shared folder from link.
14395 type SfTeamJoinFromOobLinkDetails struct {
14396 // TargetAssetIndex : Target asset position in the Assets list.
14397 TargetAssetIndex uint64 `json:"target_asset_index"`
14398 // OriginalFolderName : Original shared folder name.
14399 OriginalFolderName string `json:"original_folder_name"`
14400 // TokenKey : Shared link token key.
14401 TokenKey string `json:"token_key,omitempty"`
14402 // SharingPermission : Sharing permission. Might be missing due to
14403 // historical data gap.
14404 SharingPermission string `json:"sharing_permission,omitempty"`
14405 }
14406
14407 // NewSfTeamJoinFromOobLinkDetails returns a new SfTeamJoinFromOobLinkDetails instance
14408 func NewSfTeamJoinFromOobLinkDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinFromOobLinkDetails {
14409 s := new(SfTeamJoinFromOobLinkDetails)
14410 s.TargetAssetIndex = TargetAssetIndex
14411 s.OriginalFolderName = OriginalFolderName
14412 return s
14413 }
14414
14415 // SfTeamJoinFromOobLinkType : has no documentation (yet)
14416 type SfTeamJoinFromOobLinkType struct {
14417 // Description : has no documentation (yet)
14418 Description string `json:"description"`
14419 }
14420
14421 // NewSfTeamJoinFromOobLinkType returns a new SfTeamJoinFromOobLinkType instance
14422 func NewSfTeamJoinFromOobLinkType(Description string) *SfTeamJoinFromOobLinkType {
14423 s := new(SfTeamJoinFromOobLinkType)
14424 s.Description = Description
14425 return s
14426 }
14427
14428 // SfTeamJoinType : has no documentation (yet)
14429 type SfTeamJoinType struct {
14430 // Description : has no documentation (yet)
14431 Description string `json:"description"`
14432 }
14433
14434 // NewSfTeamJoinType returns a new SfTeamJoinType instance
14435 func NewSfTeamJoinType(Description string) *SfTeamJoinType {
14436 s := new(SfTeamJoinType)
14437 s.Description = Description
14438 return s
14439 }
14440
14441 // SfTeamUninviteDetails : Unshared folder with team member.
14442 type SfTeamUninviteDetails struct {
14443 // TargetAssetIndex : Target asset position in the Assets list.
14444 TargetAssetIndex uint64 `json:"target_asset_index"`
14445 // OriginalFolderName : Original shared folder name.
14446 OriginalFolderName string `json:"original_folder_name"`
14447 }
14448
14449 // NewSfTeamUninviteDetails returns a new SfTeamUninviteDetails instance
14450 func NewSfTeamUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamUninviteDetails {
14451 s := new(SfTeamUninviteDetails)
14452 s.TargetAssetIndex = TargetAssetIndex
14453 s.OriginalFolderName = OriginalFolderName
14454 return s
14455 }
14456
14457 // SfTeamUninviteType : has no documentation (yet)
14458 type SfTeamUninviteType struct {
14459 // Description : has no documentation (yet)
14460 Description string `json:"description"`
14461 }
14462
14463 // NewSfTeamUninviteType returns a new SfTeamUninviteType instance
14464 func NewSfTeamUninviteType(Description string) *SfTeamUninviteType {
14465 s := new(SfTeamUninviteType)
14466 s.Description = Description
14467 return s
14468 }
14469
14470 // SharedContentAddInviteesDetails : Invited user to Dropbox and added them to
14471 // shared file/folder.
14472 type SharedContentAddInviteesDetails struct {
14473 // SharedContentAccessLevel : Shared content access level.
14474 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
14475 // Invitees : A list of invitees.
14476 Invitees []string `json:"invitees"`
14477 }
14478
14479 // NewSharedContentAddInviteesDetails returns a new SharedContentAddInviteesDetails instance
14480 func NewSharedContentAddInviteesDetails(SharedContentAccessLevel *sharing.AccessLevel, Invitees []string) *SharedContentAddInviteesDetails {
14481 s := new(SharedContentAddInviteesDetails)
14482 s.SharedContentAccessLevel = SharedContentAccessLevel
14483 s.Invitees = Invitees
14484 return s
14485 }
14486
14487 // SharedContentAddInviteesType : has no documentation (yet)
14488 type SharedContentAddInviteesType struct {
14489 // Description : has no documentation (yet)
14490 Description string `json:"description"`
14491 }
14492
14493 // NewSharedContentAddInviteesType returns a new SharedContentAddInviteesType instance
14494 func NewSharedContentAddInviteesType(Description string) *SharedContentAddInviteesType {
14495 s := new(SharedContentAddInviteesType)
14496 s.Description = Description
14497 return s
14498 }
14499
14500 // SharedContentAddLinkExpiryDetails : Added expiration date to link for shared
14501 // file/folder.
14502 type SharedContentAddLinkExpiryDetails struct {
14503 // NewValue : New shared content link expiration date. Might be missing due
14504 // to historical data gap.
14505 NewValue time.Time `json:"new_value,omitempty"`
14506 }
14507
14508 // NewSharedContentAddLinkExpiryDetails returns a new SharedContentAddLinkExpiryDetails instance
14509 func NewSharedContentAddLinkExpiryDetails() *SharedContentAddLinkExpiryDetails {
14510 s := new(SharedContentAddLinkExpiryDetails)
14511 return s
14512 }
14513
14514 // SharedContentAddLinkExpiryType : has no documentation (yet)
14515 type SharedContentAddLinkExpiryType struct {
14516 // Description : has no documentation (yet)
14517 Description string `json:"description"`
14518 }
14519
14520 // NewSharedContentAddLinkExpiryType returns a new SharedContentAddLinkExpiryType instance
14521 func NewSharedContentAddLinkExpiryType(Description string) *SharedContentAddLinkExpiryType {
14522 s := new(SharedContentAddLinkExpiryType)
14523 s.Description = Description
14524 return s
14525 }
14526
14527 // SharedContentAddLinkPasswordDetails : Added password to link for shared
14528 // file/folder.
14529 type SharedContentAddLinkPasswordDetails struct {
14530 }
14531
14532 // NewSharedContentAddLinkPasswordDetails returns a new SharedContentAddLinkPasswordDetails instance
14533 func NewSharedContentAddLinkPasswordDetails() *SharedContentAddLinkPasswordDetails {
14534 s := new(SharedContentAddLinkPasswordDetails)
14535 return s
14536 }
14537
14538 // SharedContentAddLinkPasswordType : has no documentation (yet)
14539 type SharedContentAddLinkPasswordType struct {
14540 // Description : has no documentation (yet)
14541 Description string `json:"description"`
14542 }
14543
14544 // NewSharedContentAddLinkPasswordType returns a new SharedContentAddLinkPasswordType instance
14545 func NewSharedContentAddLinkPasswordType(Description string) *SharedContentAddLinkPasswordType {
14546 s := new(SharedContentAddLinkPasswordType)
14547 s.Description = Description
14548 return s
14549 }
14550
14551 // SharedContentAddMemberDetails : Added users and/or groups to shared
14552 // file/folder.
14553 type SharedContentAddMemberDetails struct {
14554 // SharedContentAccessLevel : Shared content access level.
14555 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
14556 }
14557
14558 // NewSharedContentAddMemberDetails returns a new SharedContentAddMemberDetails instance
14559 func NewSharedContentAddMemberDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedContentAddMemberDetails {
14560 s := new(SharedContentAddMemberDetails)
14561 s.SharedContentAccessLevel = SharedContentAccessLevel
14562 return s
14563 }
14564
14565 // SharedContentAddMemberType : has no documentation (yet)
14566 type SharedContentAddMemberType struct {
14567 // Description : has no documentation (yet)
14568 Description string `json:"description"`
14569 }
14570
14571 // NewSharedContentAddMemberType returns a new SharedContentAddMemberType instance
14572 func NewSharedContentAddMemberType(Description string) *SharedContentAddMemberType {
14573 s := new(SharedContentAddMemberType)
14574 s.Description = Description
14575 return s
14576 }
14577
14578 // SharedContentChangeDownloadsPolicyDetails : Changed whether members can
14579 // download shared file/folder.
14580 type SharedContentChangeDownloadsPolicyDetails struct {
14581 // NewValue : New downloads policy.
14582 NewValue *DownloadPolicyType `json:"new_value"`
14583 // PreviousValue : Previous downloads policy. Might be missing due to
14584 // historical data gap.
14585 PreviousValue *DownloadPolicyType `json:"previous_value,omitempty"`
14586 }
14587
14588 // NewSharedContentChangeDownloadsPolicyDetails returns a new SharedContentChangeDownloadsPolicyDetails instance
14589 func NewSharedContentChangeDownloadsPolicyDetails(NewValue *DownloadPolicyType) *SharedContentChangeDownloadsPolicyDetails {
14590 s := new(SharedContentChangeDownloadsPolicyDetails)
14591 s.NewValue = NewValue
14592 return s
14593 }
14594
14595 // SharedContentChangeDownloadsPolicyType : has no documentation (yet)
14596 type SharedContentChangeDownloadsPolicyType struct {
14597 // Description : has no documentation (yet)
14598 Description string `json:"description"`
14599 }
14600
14601 // NewSharedContentChangeDownloadsPolicyType returns a new SharedContentChangeDownloadsPolicyType instance
14602 func NewSharedContentChangeDownloadsPolicyType(Description string) *SharedContentChangeDownloadsPolicyType {
14603 s := new(SharedContentChangeDownloadsPolicyType)
14604 s.Description = Description
14605 return s
14606 }
14607
14608 // SharedContentChangeInviteeRoleDetails : Changed access type of invitee to
14609 // shared file/folder before invite was accepted.
14610 type SharedContentChangeInviteeRoleDetails struct {
14611 // PreviousAccessLevel : Previous access level. Might be missing due to
14612 // historical data gap.
14613 PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"`
14614 // NewAccessLevel : New access level.
14615 NewAccessLevel *sharing.AccessLevel `json:"new_access_level"`
14616 // Invitee : The invitee whose role was changed.
14617 Invitee string `json:"invitee"`
14618 }
14619
14620 // NewSharedContentChangeInviteeRoleDetails returns a new SharedContentChangeInviteeRoleDetails instance
14621 func NewSharedContentChangeInviteeRoleDetails(NewAccessLevel *sharing.AccessLevel, Invitee string) *SharedContentChangeInviteeRoleDetails {
14622 s := new(SharedContentChangeInviteeRoleDetails)
14623 s.NewAccessLevel = NewAccessLevel
14624 s.Invitee = Invitee
14625 return s
14626 }
14627
14628 // SharedContentChangeInviteeRoleType : has no documentation (yet)
14629 type SharedContentChangeInviteeRoleType struct {
14630 // Description : has no documentation (yet)
14631 Description string `json:"description"`
14632 }
14633
14634 // NewSharedContentChangeInviteeRoleType returns a new SharedContentChangeInviteeRoleType instance
14635 func NewSharedContentChangeInviteeRoleType(Description string) *SharedContentChangeInviteeRoleType {
14636 s := new(SharedContentChangeInviteeRoleType)
14637 s.Description = Description
14638 return s
14639 }
14640
14641 // SharedContentChangeLinkAudienceDetails : Changed link audience of shared
14642 // file/folder.
14643 type SharedContentChangeLinkAudienceDetails struct {
14644 // NewValue : New link audience value.
14645 NewValue *sharing.LinkAudience `json:"new_value"`
14646 // PreviousValue : Previous link audience value.
14647 PreviousValue *sharing.LinkAudience `json:"previous_value,omitempty"`
14648 }
14649
14650 // NewSharedContentChangeLinkAudienceDetails returns a new SharedContentChangeLinkAudienceDetails instance
14651 func NewSharedContentChangeLinkAudienceDetails(NewValue *sharing.LinkAudience) *SharedContentChangeLinkAudienceDetails {
14652 s := new(SharedContentChangeLinkAudienceDetails)
14653 s.NewValue = NewValue
14654 return s
14655 }
14656
14657 // SharedContentChangeLinkAudienceType : has no documentation (yet)
14658 type SharedContentChangeLinkAudienceType struct {
14659 // Description : has no documentation (yet)
14660 Description string `json:"description"`
14661 }
14662
14663 // NewSharedContentChangeLinkAudienceType returns a new SharedContentChangeLinkAudienceType instance
14664 func NewSharedContentChangeLinkAudienceType(Description string) *SharedContentChangeLinkAudienceType {
14665 s := new(SharedContentChangeLinkAudienceType)
14666 s.Description = Description
14667 return s
14668 }
14669
14670 // SharedContentChangeLinkExpiryDetails : Changed link expiration of shared
14671 // file/folder.
14672 type SharedContentChangeLinkExpiryDetails struct {
14673 // NewValue : New shared content link expiration date. Might be missing due
14674 // to historical data gap.
14675 NewValue time.Time `json:"new_value,omitempty"`
14676 // PreviousValue : Previous shared content link expiration date. Might be
14677 // missing due to historical data gap.
14678 PreviousValue time.Time `json:"previous_value,omitempty"`
14679 }
14680
14681 // NewSharedContentChangeLinkExpiryDetails returns a new SharedContentChangeLinkExpiryDetails instance
14682 func NewSharedContentChangeLinkExpiryDetails() *SharedContentChangeLinkExpiryDetails {
14683 s := new(SharedContentChangeLinkExpiryDetails)
14684 return s
14685 }
14686
14687 // SharedContentChangeLinkExpiryType : has no documentation (yet)
14688 type SharedContentChangeLinkExpiryType struct {
14689 // Description : has no documentation (yet)
14690 Description string `json:"description"`
14691 }
14692
14693 // NewSharedContentChangeLinkExpiryType returns a new SharedContentChangeLinkExpiryType instance
14694 func NewSharedContentChangeLinkExpiryType(Description string) *SharedContentChangeLinkExpiryType {
14695 s := new(SharedContentChangeLinkExpiryType)
14696 s.Description = Description
14697 return s
14698 }
14699
14700 // SharedContentChangeLinkPasswordDetails : Changed link password of shared
14701 // file/folder.
14702 type SharedContentChangeLinkPasswordDetails struct {
14703 }
14704
14705 // NewSharedContentChangeLinkPasswordDetails returns a new SharedContentChangeLinkPasswordDetails instance
14706 func NewSharedContentChangeLinkPasswordDetails() *SharedContentChangeLinkPasswordDetails {
14707 s := new(SharedContentChangeLinkPasswordDetails)
14708 return s
14709 }
14710
14711 // SharedContentChangeLinkPasswordType : has no documentation (yet)
14712 type SharedContentChangeLinkPasswordType struct {
14713 // Description : has no documentation (yet)
14714 Description string `json:"description"`
14715 }
14716
14717 // NewSharedContentChangeLinkPasswordType returns a new SharedContentChangeLinkPasswordType instance
14718 func NewSharedContentChangeLinkPasswordType(Description string) *SharedContentChangeLinkPasswordType {
14719 s := new(SharedContentChangeLinkPasswordType)
14720 s.Description = Description
14721 return s
14722 }
14723
14724 // SharedContentChangeMemberRoleDetails : Changed access type of shared
14725 // file/folder member.
14726 type SharedContentChangeMemberRoleDetails struct {
14727 // PreviousAccessLevel : Previous access level. Might be missing due to
14728 // historical data gap.
14729 PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"`
14730 // NewAccessLevel : New access level.
14731 NewAccessLevel *sharing.AccessLevel `json:"new_access_level"`
14732 }
14733
14734 // NewSharedContentChangeMemberRoleDetails returns a new SharedContentChangeMemberRoleDetails instance
14735 func NewSharedContentChangeMemberRoleDetails(NewAccessLevel *sharing.AccessLevel) *SharedContentChangeMemberRoleDetails {
14736 s := new(SharedContentChangeMemberRoleDetails)
14737 s.NewAccessLevel = NewAccessLevel
14738 return s
14739 }
14740
14741 // SharedContentChangeMemberRoleType : has no documentation (yet)
14742 type SharedContentChangeMemberRoleType struct {
14743 // Description : has no documentation (yet)
14744 Description string `json:"description"`
14745 }
14746
14747 // NewSharedContentChangeMemberRoleType returns a new SharedContentChangeMemberRoleType instance
14748 func NewSharedContentChangeMemberRoleType(Description string) *SharedContentChangeMemberRoleType {
14749 s := new(SharedContentChangeMemberRoleType)
14750 s.Description = Description
14751 return s
14752 }
14753
14754 // SharedContentChangeViewerInfoPolicyDetails : Changed whether members can see
14755 // who viewed shared file/folder.
14756 type SharedContentChangeViewerInfoPolicyDetails struct {
14757 // NewValue : New viewer info policy.
14758 NewValue *sharing.ViewerInfoPolicy `json:"new_value"`
14759 // PreviousValue : Previous view info policy. Might be missing due to
14760 // historical data gap.
14761 PreviousValue *sharing.ViewerInfoPolicy `json:"previous_value,omitempty"`
14762 }
14763
14764 // NewSharedContentChangeViewerInfoPolicyDetails returns a new SharedContentChangeViewerInfoPolicyDetails instance
14765 func NewSharedContentChangeViewerInfoPolicyDetails(NewValue *sharing.ViewerInfoPolicy) *SharedContentChangeViewerInfoPolicyDetails {
14766 s := new(SharedContentChangeViewerInfoPolicyDetails)
14767 s.NewValue = NewValue
14768 return s
14769 }
14770
14771 // SharedContentChangeViewerInfoPolicyType : has no documentation (yet)
14772 type SharedContentChangeViewerInfoPolicyType struct {
14773 // Description : has no documentation (yet)
14774 Description string `json:"description"`
14775 }
14776
14777 // NewSharedContentChangeViewerInfoPolicyType returns a new SharedContentChangeViewerInfoPolicyType instance
14778 func NewSharedContentChangeViewerInfoPolicyType(Description string) *SharedContentChangeViewerInfoPolicyType {
14779 s := new(SharedContentChangeViewerInfoPolicyType)
14780 s.Description = Description
14781 return s
14782 }
14783
14784 // SharedContentClaimInvitationDetails : Acquired membership of shared
14785 // file/folder by accepting invite.
14786 type SharedContentClaimInvitationDetails struct {
14787 // SharedContentLink : Shared content link.
14788 SharedContentLink string `json:"shared_content_link,omitempty"`
14789 }
14790
14791 // NewSharedContentClaimInvitationDetails returns a new SharedContentClaimInvitationDetails instance
14792 func NewSharedContentClaimInvitationDetails() *SharedContentClaimInvitationDetails {
14793 s := new(SharedContentClaimInvitationDetails)
14794 return s
14795 }
14796
14797 // SharedContentClaimInvitationType : has no documentation (yet)
14798 type SharedContentClaimInvitationType struct {
14799 // Description : has no documentation (yet)
14800 Description string `json:"description"`
14801 }
14802
14803 // NewSharedContentClaimInvitationType returns a new SharedContentClaimInvitationType instance
14804 func NewSharedContentClaimInvitationType(Description string) *SharedContentClaimInvitationType {
14805 s := new(SharedContentClaimInvitationType)
14806 s.Description = Description
14807 return s
14808 }
14809
14810 // SharedContentCopyDetails : Copied shared file/folder to own Dropbox.
14811 type SharedContentCopyDetails struct {
14812 // SharedContentLink : Shared content link.
14813 SharedContentLink string `json:"shared_content_link"`
14814 // SharedContentOwner : The shared content owner.
14815 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
14816 // SharedContentAccessLevel : Shared content access level.
14817 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
14818 // DestinationPath : The path where the member saved the content.
14819 DestinationPath string `json:"destination_path"`
14820 }
14821
14822 // NewSharedContentCopyDetails returns a new SharedContentCopyDetails instance
14823 func NewSharedContentCopyDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel, DestinationPath string) *SharedContentCopyDetails {
14824 s := new(SharedContentCopyDetails)
14825 s.SharedContentLink = SharedContentLink
14826 s.SharedContentAccessLevel = SharedContentAccessLevel
14827 s.DestinationPath = DestinationPath
14828 return s
14829 }
14830
14831 // SharedContentCopyType : has no documentation (yet)
14832 type SharedContentCopyType struct {
14833 // Description : has no documentation (yet)
14834 Description string `json:"description"`
14835 }
14836
14837 // NewSharedContentCopyType returns a new SharedContentCopyType instance
14838 func NewSharedContentCopyType(Description string) *SharedContentCopyType {
14839 s := new(SharedContentCopyType)
14840 s.Description = Description
14841 return s
14842 }
14843
14844 // SharedContentDownloadDetails : Downloaded shared file/folder.
14845 type SharedContentDownloadDetails struct {
14846 // SharedContentLink : Shared content link.
14847 SharedContentLink string `json:"shared_content_link"`
14848 // SharedContentOwner : The shared content owner.
14849 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
14850 // SharedContentAccessLevel : Shared content access level.
14851 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
14852 }
14853
14854 // NewSharedContentDownloadDetails returns a new SharedContentDownloadDetails instance
14855 func NewSharedContentDownloadDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentDownloadDetails {
14856 s := new(SharedContentDownloadDetails)
14857 s.SharedContentLink = SharedContentLink
14858 s.SharedContentAccessLevel = SharedContentAccessLevel
14859 return s
14860 }
14861
14862 // SharedContentDownloadType : has no documentation (yet)
14863 type SharedContentDownloadType struct {
14864 // Description : has no documentation (yet)
14865 Description string `json:"description"`
14866 }
14867
14868 // NewSharedContentDownloadType returns a new SharedContentDownloadType instance
14869 func NewSharedContentDownloadType(Description string) *SharedContentDownloadType {
14870 s := new(SharedContentDownloadType)
14871 s.Description = Description
14872 return s
14873 }
14874
14875 // SharedContentRelinquishMembershipDetails : Left shared file/folder.
14876 type SharedContentRelinquishMembershipDetails struct {
14877 }
14878
14879 // NewSharedContentRelinquishMembershipDetails returns a new SharedContentRelinquishMembershipDetails instance
14880 func NewSharedContentRelinquishMembershipDetails() *SharedContentRelinquishMembershipDetails {
14881 s := new(SharedContentRelinquishMembershipDetails)
14882 return s
14883 }
14884
14885 // SharedContentRelinquishMembershipType : has no documentation (yet)
14886 type SharedContentRelinquishMembershipType struct {
14887 // Description : has no documentation (yet)
14888 Description string `json:"description"`
14889 }
14890
14891 // NewSharedContentRelinquishMembershipType returns a new SharedContentRelinquishMembershipType instance
14892 func NewSharedContentRelinquishMembershipType(Description string) *SharedContentRelinquishMembershipType {
14893 s := new(SharedContentRelinquishMembershipType)
14894 s.Description = Description
14895 return s
14896 }
14897
14898 // SharedContentRemoveInviteesDetails : Removed invitee from shared file/folder
14899 // before invite was accepted.
14900 type SharedContentRemoveInviteesDetails struct {
14901 // Invitees : A list of invitees.
14902 Invitees []string `json:"invitees"`
14903 }
14904
14905 // NewSharedContentRemoveInviteesDetails returns a new SharedContentRemoveInviteesDetails instance
14906 func NewSharedContentRemoveInviteesDetails(Invitees []string) *SharedContentRemoveInviteesDetails {
14907 s := new(SharedContentRemoveInviteesDetails)
14908 s.Invitees = Invitees
14909 return s
14910 }
14911
14912 // SharedContentRemoveInviteesType : has no documentation (yet)
14913 type SharedContentRemoveInviteesType struct {
14914 // Description : has no documentation (yet)
14915 Description string `json:"description"`
14916 }
14917
14918 // NewSharedContentRemoveInviteesType returns a new SharedContentRemoveInviteesType instance
14919 func NewSharedContentRemoveInviteesType(Description string) *SharedContentRemoveInviteesType {
14920 s := new(SharedContentRemoveInviteesType)
14921 s.Description = Description
14922 return s
14923 }
14924
14925 // SharedContentRemoveLinkExpiryDetails : Removed link expiration date of shared
14926 // file/folder.
14927 type SharedContentRemoveLinkExpiryDetails struct {
14928 // PreviousValue : Previous shared content link expiration date. Might be
14929 // missing due to historical data gap.
14930 PreviousValue time.Time `json:"previous_value,omitempty"`
14931 }
14932
14933 // NewSharedContentRemoveLinkExpiryDetails returns a new SharedContentRemoveLinkExpiryDetails instance
14934 func NewSharedContentRemoveLinkExpiryDetails() *SharedContentRemoveLinkExpiryDetails {
14935 s := new(SharedContentRemoveLinkExpiryDetails)
14936 return s
14937 }
14938
14939 // SharedContentRemoveLinkExpiryType : has no documentation (yet)
14940 type SharedContentRemoveLinkExpiryType struct {
14941 // Description : has no documentation (yet)
14942 Description string `json:"description"`
14943 }
14944
14945 // NewSharedContentRemoveLinkExpiryType returns a new SharedContentRemoveLinkExpiryType instance
14946 func NewSharedContentRemoveLinkExpiryType(Description string) *SharedContentRemoveLinkExpiryType {
14947 s := new(SharedContentRemoveLinkExpiryType)
14948 s.Description = Description
14949 return s
14950 }
14951
14952 // SharedContentRemoveLinkPasswordDetails : Removed link password of shared
14953 // file/folder.
14954 type SharedContentRemoveLinkPasswordDetails struct {
14955 }
14956
14957 // NewSharedContentRemoveLinkPasswordDetails returns a new SharedContentRemoveLinkPasswordDetails instance
14958 func NewSharedContentRemoveLinkPasswordDetails() *SharedContentRemoveLinkPasswordDetails {
14959 s := new(SharedContentRemoveLinkPasswordDetails)
14960 return s
14961 }
14962
14963 // SharedContentRemoveLinkPasswordType : has no documentation (yet)
14964 type SharedContentRemoveLinkPasswordType struct {
14965 // Description : has no documentation (yet)
14966 Description string `json:"description"`
14967 }
14968
14969 // NewSharedContentRemoveLinkPasswordType returns a new SharedContentRemoveLinkPasswordType instance
14970 func NewSharedContentRemoveLinkPasswordType(Description string) *SharedContentRemoveLinkPasswordType {
14971 s := new(SharedContentRemoveLinkPasswordType)
14972 s.Description = Description
14973 return s
14974 }
14975
14976 // SharedContentRemoveMemberDetails : Removed user/group from shared
14977 // file/folder.
14978 type SharedContentRemoveMemberDetails struct {
14979 // SharedContentAccessLevel : Shared content access level.
14980 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level,omitempty"`
14981 }
14982
14983 // NewSharedContentRemoveMemberDetails returns a new SharedContentRemoveMemberDetails instance
14984 func NewSharedContentRemoveMemberDetails() *SharedContentRemoveMemberDetails {
14985 s := new(SharedContentRemoveMemberDetails)
14986 return s
14987 }
14988
14989 // SharedContentRemoveMemberType : has no documentation (yet)
14990 type SharedContentRemoveMemberType struct {
14991 // Description : has no documentation (yet)
14992 Description string `json:"description"`
14993 }
14994
14995 // NewSharedContentRemoveMemberType returns a new SharedContentRemoveMemberType instance
14996 func NewSharedContentRemoveMemberType(Description string) *SharedContentRemoveMemberType {
14997 s := new(SharedContentRemoveMemberType)
14998 s.Description = Description
14999 return s
15000 }
15001
15002 // SharedContentRequestAccessDetails : Requested access to shared file/folder.
15003 type SharedContentRequestAccessDetails struct {
15004 // SharedContentLink : Shared content link.
15005 SharedContentLink string `json:"shared_content_link,omitempty"`
15006 }
15007
15008 // NewSharedContentRequestAccessDetails returns a new SharedContentRequestAccessDetails instance
15009 func NewSharedContentRequestAccessDetails() *SharedContentRequestAccessDetails {
15010 s := new(SharedContentRequestAccessDetails)
15011 return s
15012 }
15013
15014 // SharedContentRequestAccessType : has no documentation (yet)
15015 type SharedContentRequestAccessType struct {
15016 // Description : has no documentation (yet)
15017 Description string `json:"description"`
15018 }
15019
15020 // NewSharedContentRequestAccessType returns a new SharedContentRequestAccessType instance
15021 func NewSharedContentRequestAccessType(Description string) *SharedContentRequestAccessType {
15022 s := new(SharedContentRequestAccessType)
15023 s.Description = Description
15024 return s
15025 }
15026
15027 // SharedContentUnshareDetails : Unshared file/folder by clearing membership and
15028 // turning off link.
15029 type SharedContentUnshareDetails struct {
15030 }
15031
15032 // NewSharedContentUnshareDetails returns a new SharedContentUnshareDetails instance
15033 func NewSharedContentUnshareDetails() *SharedContentUnshareDetails {
15034 s := new(SharedContentUnshareDetails)
15035 return s
15036 }
15037
15038 // SharedContentUnshareType : has no documentation (yet)
15039 type SharedContentUnshareType struct {
15040 // Description : has no documentation (yet)
15041 Description string `json:"description"`
15042 }
15043
15044 // NewSharedContentUnshareType returns a new SharedContentUnshareType instance
15045 func NewSharedContentUnshareType(Description string) *SharedContentUnshareType {
15046 s := new(SharedContentUnshareType)
15047 s.Description = Description
15048 return s
15049 }
15050
15051 // SharedContentViewDetails : Previewed shared file/folder.
15052 type SharedContentViewDetails struct {
15053 // SharedContentLink : Shared content link.
15054 SharedContentLink string `json:"shared_content_link"`
15055 // SharedContentOwner : The shared content owner.
15056 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
15057 // SharedContentAccessLevel : Shared content access level.
15058 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
15059 }
15060
15061 // NewSharedContentViewDetails returns a new SharedContentViewDetails instance
15062 func NewSharedContentViewDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentViewDetails {
15063 s := new(SharedContentViewDetails)
15064 s.SharedContentLink = SharedContentLink
15065 s.SharedContentAccessLevel = SharedContentAccessLevel
15066 return s
15067 }
15068
15069 // SharedContentViewType : has no documentation (yet)
15070 type SharedContentViewType struct {
15071 // Description : has no documentation (yet)
15072 Description string `json:"description"`
15073 }
15074
15075 // NewSharedContentViewType returns a new SharedContentViewType instance
15076 func NewSharedContentViewType(Description string) *SharedContentViewType {
15077 s := new(SharedContentViewType)
15078 s.Description = Description
15079 return s
15080 }
15081
15082 // SharedFolderChangeLinkPolicyDetails : Changed who can access shared folder
15083 // via link.
15084 type SharedFolderChangeLinkPolicyDetails struct {
15085 // NewValue : New shared folder link policy.
15086 NewValue *sharing.SharedLinkPolicy `json:"new_value"`
15087 // PreviousValue : Previous shared folder link policy. Might be missing due
15088 // to historical data gap.
15089 PreviousValue *sharing.SharedLinkPolicy `json:"previous_value,omitempty"`
15090 }
15091
15092 // NewSharedFolderChangeLinkPolicyDetails returns a new SharedFolderChangeLinkPolicyDetails instance
15093 func NewSharedFolderChangeLinkPolicyDetails(NewValue *sharing.SharedLinkPolicy) *SharedFolderChangeLinkPolicyDetails {
15094 s := new(SharedFolderChangeLinkPolicyDetails)
15095 s.NewValue = NewValue
15096 return s
15097 }
15098
15099 // SharedFolderChangeLinkPolicyType : has no documentation (yet)
15100 type SharedFolderChangeLinkPolicyType struct {
15101 // Description : has no documentation (yet)
15102 Description string `json:"description"`
15103 }
15104
15105 // NewSharedFolderChangeLinkPolicyType returns a new SharedFolderChangeLinkPolicyType instance
15106 func NewSharedFolderChangeLinkPolicyType(Description string) *SharedFolderChangeLinkPolicyType {
15107 s := new(SharedFolderChangeLinkPolicyType)
15108 s.Description = Description
15109 return s
15110 }
15111
15112 // SharedFolderChangeMembersInheritancePolicyDetails : Changed whether shared
15113 // folder inherits members from parent folder.
15114 type SharedFolderChangeMembersInheritancePolicyDetails struct {
15115 // NewValue : New member inheritance policy.
15116 NewValue *SharedFolderMembersInheritancePolicy `json:"new_value"`
15117 // PreviousValue : Previous member inheritance policy. Might be missing due
15118 // to historical data gap.
15119 PreviousValue *SharedFolderMembersInheritancePolicy `json:"previous_value,omitempty"`
15120 }
15121
15122 // NewSharedFolderChangeMembersInheritancePolicyDetails returns a new SharedFolderChangeMembersInheritancePolicyDetails instance
15123 func NewSharedFolderChangeMembersInheritancePolicyDetails(NewValue *SharedFolderMembersInheritancePolicy) *SharedFolderChangeMembersInheritancePolicyDetails {
15124 s := new(SharedFolderChangeMembersInheritancePolicyDetails)
15125 s.NewValue = NewValue
15126 return s
15127 }
15128
15129 // SharedFolderChangeMembersInheritancePolicyType : has no documentation (yet)
15130 type SharedFolderChangeMembersInheritancePolicyType struct {
15131 // Description : has no documentation (yet)
15132 Description string `json:"description"`
15133 }
15134
15135 // NewSharedFolderChangeMembersInheritancePolicyType returns a new SharedFolderChangeMembersInheritancePolicyType instance
15136 func NewSharedFolderChangeMembersInheritancePolicyType(Description string) *SharedFolderChangeMembersInheritancePolicyType {
15137 s := new(SharedFolderChangeMembersInheritancePolicyType)
15138 s.Description = Description
15139 return s
15140 }
15141
15142 // SharedFolderChangeMembersManagementPolicyDetails : Changed who can add/remove
15143 // members of shared folder.
15144 type SharedFolderChangeMembersManagementPolicyDetails struct {
15145 // NewValue : New members management policy.
15146 NewValue *sharing.AclUpdatePolicy `json:"new_value"`
15147 // PreviousValue : Previous members management policy. Might be missing due
15148 // to historical data gap.
15149 PreviousValue *sharing.AclUpdatePolicy `json:"previous_value,omitempty"`
15150 }
15151
15152 // NewSharedFolderChangeMembersManagementPolicyDetails returns a new SharedFolderChangeMembersManagementPolicyDetails instance
15153 func NewSharedFolderChangeMembersManagementPolicyDetails(NewValue *sharing.AclUpdatePolicy) *SharedFolderChangeMembersManagementPolicyDetails {
15154 s := new(SharedFolderChangeMembersManagementPolicyDetails)
15155 s.NewValue = NewValue
15156 return s
15157 }
15158
15159 // SharedFolderChangeMembersManagementPolicyType : has no documentation (yet)
15160 type SharedFolderChangeMembersManagementPolicyType struct {
15161 // Description : has no documentation (yet)
15162 Description string `json:"description"`
15163 }
15164
15165 // NewSharedFolderChangeMembersManagementPolicyType returns a new SharedFolderChangeMembersManagementPolicyType instance
15166 func NewSharedFolderChangeMembersManagementPolicyType(Description string) *SharedFolderChangeMembersManagementPolicyType {
15167 s := new(SharedFolderChangeMembersManagementPolicyType)
15168 s.Description = Description
15169 return s
15170 }
15171
15172 // SharedFolderChangeMembersPolicyDetails : Changed who can become member of
15173 // shared folder.
15174 type SharedFolderChangeMembersPolicyDetails struct {
15175 // NewValue : New external invite policy.
15176 NewValue *sharing.MemberPolicy `json:"new_value"`
15177 // PreviousValue : Previous external invite policy. Might be missing due to
15178 // historical data gap.
15179 PreviousValue *sharing.MemberPolicy `json:"previous_value,omitempty"`
15180 }
15181
15182 // NewSharedFolderChangeMembersPolicyDetails returns a new SharedFolderChangeMembersPolicyDetails instance
15183 func NewSharedFolderChangeMembersPolicyDetails(NewValue *sharing.MemberPolicy) *SharedFolderChangeMembersPolicyDetails {
15184 s := new(SharedFolderChangeMembersPolicyDetails)
15185 s.NewValue = NewValue
15186 return s
15187 }
15188
15189 // SharedFolderChangeMembersPolicyType : has no documentation (yet)
15190 type SharedFolderChangeMembersPolicyType struct {
15191 // Description : has no documentation (yet)
15192 Description string `json:"description"`
15193 }
15194
15195 // NewSharedFolderChangeMembersPolicyType returns a new SharedFolderChangeMembersPolicyType instance
15196 func NewSharedFolderChangeMembersPolicyType(Description string) *SharedFolderChangeMembersPolicyType {
15197 s := new(SharedFolderChangeMembersPolicyType)
15198 s.Description = Description
15199 return s
15200 }
15201
15202 // SharedFolderCreateDetails : Created shared folder.
15203 type SharedFolderCreateDetails struct {
15204 // TargetNsId : Target namespace ID. Might be missing due to historical data
15205 // gap.
15206 TargetNsId string `json:"target_ns_id,omitempty"`
15207 }
15208
15209 // NewSharedFolderCreateDetails returns a new SharedFolderCreateDetails instance
15210 func NewSharedFolderCreateDetails() *SharedFolderCreateDetails {
15211 s := new(SharedFolderCreateDetails)
15212 return s
15213 }
15214
15215 // SharedFolderCreateType : has no documentation (yet)
15216 type SharedFolderCreateType struct {
15217 // Description : has no documentation (yet)
15218 Description string `json:"description"`
15219 }
15220
15221 // NewSharedFolderCreateType returns a new SharedFolderCreateType instance
15222 func NewSharedFolderCreateType(Description string) *SharedFolderCreateType {
15223 s := new(SharedFolderCreateType)
15224 s.Description = Description
15225 return s
15226 }
15227
15228 // SharedFolderDeclineInvitationDetails : Declined team member's invite to
15229 // shared folder.
15230 type SharedFolderDeclineInvitationDetails struct {
15231 }
15232
15233 // NewSharedFolderDeclineInvitationDetails returns a new SharedFolderDeclineInvitationDetails instance
15234 func NewSharedFolderDeclineInvitationDetails() *SharedFolderDeclineInvitationDetails {
15235 s := new(SharedFolderDeclineInvitationDetails)
15236 return s
15237 }
15238
15239 // SharedFolderDeclineInvitationType : has no documentation (yet)
15240 type SharedFolderDeclineInvitationType struct {
15241 // Description : has no documentation (yet)
15242 Description string `json:"description"`
15243 }
15244
15245 // NewSharedFolderDeclineInvitationType returns a new SharedFolderDeclineInvitationType instance
15246 func NewSharedFolderDeclineInvitationType(Description string) *SharedFolderDeclineInvitationType {
15247 s := new(SharedFolderDeclineInvitationType)
15248 s.Description = Description
15249 return s
15250 }
15251
15252 // SharedFolderMembersInheritancePolicy : Specifies if a shared folder inherits
15253 // its members from the parent folder.
15254 type SharedFolderMembersInheritancePolicy struct {
15255 dropbox.Tagged
15256 }
15257
15258 // Valid tag values for SharedFolderMembersInheritancePolicy
15259 const (
15260 SharedFolderMembersInheritancePolicyInheritMembers = "inherit_members"
15261 SharedFolderMembersInheritancePolicyDontInheritMembers = "dont_inherit_members"
15262 SharedFolderMembersInheritancePolicyOther = "other"
15263 )
15264
15265 // SharedFolderMountDetails : Added shared folder to own Dropbox.
15266 type SharedFolderMountDetails struct {
15267 }
15268
15269 // NewSharedFolderMountDetails returns a new SharedFolderMountDetails instance
15270 func NewSharedFolderMountDetails() *SharedFolderMountDetails {
15271 s := new(SharedFolderMountDetails)
15272 return s
15273 }
15274
15275 // SharedFolderMountType : has no documentation (yet)
15276 type SharedFolderMountType struct {
15277 // Description : has no documentation (yet)
15278 Description string `json:"description"`
15279 }
15280
15281 // NewSharedFolderMountType returns a new SharedFolderMountType instance
15282 func NewSharedFolderMountType(Description string) *SharedFolderMountType {
15283 s := new(SharedFolderMountType)
15284 s.Description = Description
15285 return s
15286 }
15287
15288 // SharedFolderNestDetails : Changed parent of shared folder.
15289 type SharedFolderNestDetails struct {
15290 // PreviousParentNsId : Previous parent namespace ID. Might be missing due
15291 // to historical data gap.
15292 PreviousParentNsId string `json:"previous_parent_ns_id,omitempty"`
15293 // NewParentNsId : New parent namespace ID. Might be missing due to
15294 // historical data gap.
15295 NewParentNsId string `json:"new_parent_ns_id,omitempty"`
15296 // PreviousNsPath : Previous namespace path. Might be missing due to
15297 // historical data gap.
15298 PreviousNsPath string `json:"previous_ns_path,omitempty"`
15299 // NewNsPath : New namespace path. Might be missing due to historical data
15300 // gap.
15301 NewNsPath string `json:"new_ns_path,omitempty"`
15302 }
15303
15304 // NewSharedFolderNestDetails returns a new SharedFolderNestDetails instance
15305 func NewSharedFolderNestDetails() *SharedFolderNestDetails {
15306 s := new(SharedFolderNestDetails)
15307 return s
15308 }
15309
15310 // SharedFolderNestType : has no documentation (yet)
15311 type SharedFolderNestType struct {
15312 // Description : has no documentation (yet)
15313 Description string `json:"description"`
15314 }
15315
15316 // NewSharedFolderNestType returns a new SharedFolderNestType instance
15317 func NewSharedFolderNestType(Description string) *SharedFolderNestType {
15318 s := new(SharedFolderNestType)
15319 s.Description = Description
15320 return s
15321 }
15322
15323 // SharedFolderTransferOwnershipDetails : Transferred ownership of shared folder
15324 // to another member.
15325 type SharedFolderTransferOwnershipDetails struct {
15326 // PreviousOwnerEmail : The email address of the previous shared folder
15327 // owner.
15328 PreviousOwnerEmail string `json:"previous_owner_email,omitempty"`
15329 // NewOwnerEmail : The email address of the new shared folder owner.
15330 NewOwnerEmail string `json:"new_owner_email"`
15331 }
15332
15333 // NewSharedFolderTransferOwnershipDetails returns a new SharedFolderTransferOwnershipDetails instance
15334 func NewSharedFolderTransferOwnershipDetails(NewOwnerEmail string) *SharedFolderTransferOwnershipDetails {
15335 s := new(SharedFolderTransferOwnershipDetails)
15336 s.NewOwnerEmail = NewOwnerEmail
15337 return s
15338 }
15339
15340 // SharedFolderTransferOwnershipType : has no documentation (yet)
15341 type SharedFolderTransferOwnershipType struct {
15342 // Description : has no documentation (yet)
15343 Description string `json:"description"`
15344 }
15345
15346 // NewSharedFolderTransferOwnershipType returns a new SharedFolderTransferOwnershipType instance
15347 func NewSharedFolderTransferOwnershipType(Description string) *SharedFolderTransferOwnershipType {
15348 s := new(SharedFolderTransferOwnershipType)
15349 s.Description = Description
15350 return s
15351 }
15352
15353 // SharedFolderUnmountDetails : Deleted shared folder from Dropbox.
15354 type SharedFolderUnmountDetails struct {
15355 }
15356
15357 // NewSharedFolderUnmountDetails returns a new SharedFolderUnmountDetails instance
15358 func NewSharedFolderUnmountDetails() *SharedFolderUnmountDetails {
15359 s := new(SharedFolderUnmountDetails)
15360 return s
15361 }
15362
15363 // SharedFolderUnmountType : has no documentation (yet)
15364 type SharedFolderUnmountType struct {
15365 // Description : has no documentation (yet)
15366 Description string `json:"description"`
15367 }
15368
15369 // NewSharedFolderUnmountType returns a new SharedFolderUnmountType instance
15370 func NewSharedFolderUnmountType(Description string) *SharedFolderUnmountType {
15371 s := new(SharedFolderUnmountType)
15372 s.Description = Description
15373 return s
15374 }
15375
15376 // SharedLinkAccessLevel : Shared link access level.
15377 type SharedLinkAccessLevel struct {
15378 dropbox.Tagged
15379 }
15380
15381 // Valid tag values for SharedLinkAccessLevel
15382 const (
15383 SharedLinkAccessLevelNone = "none"
15384 SharedLinkAccessLevelReader = "reader"
15385 SharedLinkAccessLevelWriter = "writer"
15386 SharedLinkAccessLevelOther = "other"
15387 )
15388
15389 // SharedLinkAddExpiryDetails : Added shared link expiration date.
15390 type SharedLinkAddExpiryDetails struct {
15391 // NewValue : New shared link expiration date.
15392 NewValue time.Time `json:"new_value"`
15393 }
15394
15395 // NewSharedLinkAddExpiryDetails returns a new SharedLinkAddExpiryDetails instance
15396 func NewSharedLinkAddExpiryDetails(NewValue time.Time) *SharedLinkAddExpiryDetails {
15397 s := new(SharedLinkAddExpiryDetails)
15398 s.NewValue = NewValue
15399 return s
15400 }
15401
15402 // SharedLinkAddExpiryType : has no documentation (yet)
15403 type SharedLinkAddExpiryType struct {
15404 // Description : has no documentation (yet)
15405 Description string `json:"description"`
15406 }
15407
15408 // NewSharedLinkAddExpiryType returns a new SharedLinkAddExpiryType instance
15409 func NewSharedLinkAddExpiryType(Description string) *SharedLinkAddExpiryType {
15410 s := new(SharedLinkAddExpiryType)
15411 s.Description = Description
15412 return s
15413 }
15414
15415 // SharedLinkChangeExpiryDetails : Changed shared link expiration date.
15416 type SharedLinkChangeExpiryDetails struct {
15417 // NewValue : New shared link expiration date. Might be missing due to
15418 // historical data gap.
15419 NewValue time.Time `json:"new_value,omitempty"`
15420 // PreviousValue : Previous shared link expiration date. Might be missing
15421 // due to historical data gap.
15422 PreviousValue time.Time `json:"previous_value,omitempty"`
15423 }
15424
15425 // NewSharedLinkChangeExpiryDetails returns a new SharedLinkChangeExpiryDetails instance
15426 func NewSharedLinkChangeExpiryDetails() *SharedLinkChangeExpiryDetails {
15427 s := new(SharedLinkChangeExpiryDetails)
15428 return s
15429 }
15430
15431 // SharedLinkChangeExpiryType : has no documentation (yet)
15432 type SharedLinkChangeExpiryType struct {
15433 // Description : has no documentation (yet)
15434 Description string `json:"description"`
15435 }
15436
15437 // NewSharedLinkChangeExpiryType returns a new SharedLinkChangeExpiryType instance
15438 func NewSharedLinkChangeExpiryType(Description string) *SharedLinkChangeExpiryType {
15439 s := new(SharedLinkChangeExpiryType)
15440 s.Description = Description
15441 return s
15442 }
15443
15444 // SharedLinkChangeVisibilityDetails : Changed visibility of shared link.
15445 type SharedLinkChangeVisibilityDetails struct {
15446 // NewValue : New shared link visibility.
15447 NewValue *SharedLinkVisibility `json:"new_value"`
15448 // PreviousValue : Previous shared link visibility. Might be missing due to
15449 // historical data gap.
15450 PreviousValue *SharedLinkVisibility `json:"previous_value,omitempty"`
15451 }
15452
15453 // NewSharedLinkChangeVisibilityDetails returns a new SharedLinkChangeVisibilityDetails instance
15454 func NewSharedLinkChangeVisibilityDetails(NewValue *SharedLinkVisibility) *SharedLinkChangeVisibilityDetails {
15455 s := new(SharedLinkChangeVisibilityDetails)
15456 s.NewValue = NewValue
15457 return s
15458 }
15459
15460 // SharedLinkChangeVisibilityType : has no documentation (yet)
15461 type SharedLinkChangeVisibilityType struct {
15462 // Description : has no documentation (yet)
15463 Description string `json:"description"`
15464 }
15465
15466 // NewSharedLinkChangeVisibilityType returns a new SharedLinkChangeVisibilityType instance
15467 func NewSharedLinkChangeVisibilityType(Description string) *SharedLinkChangeVisibilityType {
15468 s := new(SharedLinkChangeVisibilityType)
15469 s.Description = Description
15470 return s
15471 }
15472
15473 // SharedLinkCopyDetails : Added file/folder to Dropbox from shared link.
15474 type SharedLinkCopyDetails struct {
15475 // SharedLinkOwner : Shared link owner details. Might be missing due to
15476 // historical data gap.
15477 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
15478 }
15479
15480 // NewSharedLinkCopyDetails returns a new SharedLinkCopyDetails instance
15481 func NewSharedLinkCopyDetails() *SharedLinkCopyDetails {
15482 s := new(SharedLinkCopyDetails)
15483 return s
15484 }
15485
15486 // SharedLinkCopyType : has no documentation (yet)
15487 type SharedLinkCopyType struct {
15488 // Description : has no documentation (yet)
15489 Description string `json:"description"`
15490 }
15491
15492 // NewSharedLinkCopyType returns a new SharedLinkCopyType instance
15493 func NewSharedLinkCopyType(Description string) *SharedLinkCopyType {
15494 s := new(SharedLinkCopyType)
15495 s.Description = Description
15496 return s
15497 }
15498
15499 // SharedLinkCreateDetails : Created shared link.
15500 type SharedLinkCreateDetails struct {
15501 // SharedLinkAccessLevel : Defines who can access the shared link. Might be
15502 // missing due to historical data gap.
15503 SharedLinkAccessLevel *SharedLinkAccessLevel `json:"shared_link_access_level,omitempty"`
15504 }
15505
15506 // NewSharedLinkCreateDetails returns a new SharedLinkCreateDetails instance
15507 func NewSharedLinkCreateDetails() *SharedLinkCreateDetails {
15508 s := new(SharedLinkCreateDetails)
15509 return s
15510 }
15511
15512 // SharedLinkCreateType : has no documentation (yet)
15513 type SharedLinkCreateType struct {
15514 // Description : has no documentation (yet)
15515 Description string `json:"description"`
15516 }
15517
15518 // NewSharedLinkCreateType returns a new SharedLinkCreateType instance
15519 func NewSharedLinkCreateType(Description string) *SharedLinkCreateType {
15520 s := new(SharedLinkCreateType)
15521 s.Description = Description
15522 return s
15523 }
15524
15525 // SharedLinkDisableDetails : Removed shared link.
15526 type SharedLinkDisableDetails struct {
15527 // SharedLinkOwner : Shared link owner details. Might be missing due to
15528 // historical data gap.
15529 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
15530 }
15531
15532 // NewSharedLinkDisableDetails returns a new SharedLinkDisableDetails instance
15533 func NewSharedLinkDisableDetails() *SharedLinkDisableDetails {
15534 s := new(SharedLinkDisableDetails)
15535 return s
15536 }
15537
15538 // SharedLinkDisableType : has no documentation (yet)
15539 type SharedLinkDisableType struct {
15540 // Description : has no documentation (yet)
15541 Description string `json:"description"`
15542 }
15543
15544 // NewSharedLinkDisableType returns a new SharedLinkDisableType instance
15545 func NewSharedLinkDisableType(Description string) *SharedLinkDisableType {
15546 s := new(SharedLinkDisableType)
15547 s.Description = Description
15548 return s
15549 }
15550
15551 // SharedLinkDownloadDetails : Downloaded file/folder from shared link.
15552 type SharedLinkDownloadDetails struct {
15553 // SharedLinkOwner : Shared link owner details. Might be missing due to
15554 // historical data gap.
15555 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
15556 }
15557
15558 // NewSharedLinkDownloadDetails returns a new SharedLinkDownloadDetails instance
15559 func NewSharedLinkDownloadDetails() *SharedLinkDownloadDetails {
15560 s := new(SharedLinkDownloadDetails)
15561 return s
15562 }
15563
15564 // SharedLinkDownloadType : has no documentation (yet)
15565 type SharedLinkDownloadType struct {
15566 // Description : has no documentation (yet)
15567 Description string `json:"description"`
15568 }
15569
15570 // NewSharedLinkDownloadType returns a new SharedLinkDownloadType instance
15571 func NewSharedLinkDownloadType(Description string) *SharedLinkDownloadType {
15572 s := new(SharedLinkDownloadType)
15573 s.Description = Description
15574 return s
15575 }
15576
15577 // SharedLinkRemoveExpiryDetails : Removed shared link expiration date.
15578 type SharedLinkRemoveExpiryDetails struct {
15579 // PreviousValue : Previous shared link expiration date. Might be missing
15580 // due to historical data gap.
15581 PreviousValue time.Time `json:"previous_value,omitempty"`
15582 }
15583
15584 // NewSharedLinkRemoveExpiryDetails returns a new SharedLinkRemoveExpiryDetails instance
15585 func NewSharedLinkRemoveExpiryDetails() *SharedLinkRemoveExpiryDetails {
15586 s := new(SharedLinkRemoveExpiryDetails)
15587 return s
15588 }
15589
15590 // SharedLinkRemoveExpiryType : has no documentation (yet)
15591 type SharedLinkRemoveExpiryType struct {
15592 // Description : has no documentation (yet)
15593 Description string `json:"description"`
15594 }
15595
15596 // NewSharedLinkRemoveExpiryType returns a new SharedLinkRemoveExpiryType instance
15597 func NewSharedLinkRemoveExpiryType(Description string) *SharedLinkRemoveExpiryType {
15598 s := new(SharedLinkRemoveExpiryType)
15599 s.Description = Description
15600 return s
15601 }
15602
15603 // SharedLinkShareDetails : Added members as audience of shared link.
15604 type SharedLinkShareDetails struct {
15605 // SharedLinkOwner : Shared link owner details. Might be missing due to
15606 // historical data gap.
15607 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
15608 // ExternalUsers : Users without a Dropbox account that were added as shared
15609 // link audience.
15610 ExternalUsers []*ExternalUserLogInfo `json:"external_users,omitempty"`
15611 }
15612
15613 // NewSharedLinkShareDetails returns a new SharedLinkShareDetails instance
15614 func NewSharedLinkShareDetails() *SharedLinkShareDetails {
15615 s := new(SharedLinkShareDetails)
15616 return s
15617 }
15618
15619 // SharedLinkShareType : has no documentation (yet)
15620 type SharedLinkShareType struct {
15621 // Description : has no documentation (yet)
15622 Description string `json:"description"`
15623 }
15624
15625 // NewSharedLinkShareType returns a new SharedLinkShareType instance
15626 func NewSharedLinkShareType(Description string) *SharedLinkShareType {
15627 s := new(SharedLinkShareType)
15628 s.Description = Description
15629 return s
15630 }
15631
15632 // SharedLinkViewDetails : Opened shared link.
15633 type SharedLinkViewDetails struct {
15634 // SharedLinkOwner : Shared link owner details. Might be missing due to
15635 // historical data gap.
15636 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
15637 }
15638
15639 // NewSharedLinkViewDetails returns a new SharedLinkViewDetails instance
15640 func NewSharedLinkViewDetails() *SharedLinkViewDetails {
15641 s := new(SharedLinkViewDetails)
15642 return s
15643 }
15644
15645 // SharedLinkViewType : has no documentation (yet)
15646 type SharedLinkViewType struct {
15647 // Description : has no documentation (yet)
15648 Description string `json:"description"`
15649 }
15650
15651 // NewSharedLinkViewType returns a new SharedLinkViewType instance
15652 func NewSharedLinkViewType(Description string) *SharedLinkViewType {
15653 s := new(SharedLinkViewType)
15654 s.Description = Description
15655 return s
15656 }
15657
15658 // SharedLinkVisibility : Defines who has access to a shared link.
15659 type SharedLinkVisibility struct {
15660 dropbox.Tagged
15661 }
15662
15663 // Valid tag values for SharedLinkVisibility
15664 const (
15665 SharedLinkVisibilityPassword = "password"
15666 SharedLinkVisibilityPublic = "public"
15667 SharedLinkVisibilityTeamOnly = "team_only"
15668 SharedLinkVisibilityOther = "other"
15669 )
15670
15671 // SharedNoteOpenedDetails : Opened shared Paper doc.
15672 type SharedNoteOpenedDetails struct {
15673 }
15674
15675 // NewSharedNoteOpenedDetails returns a new SharedNoteOpenedDetails instance
15676 func NewSharedNoteOpenedDetails() *SharedNoteOpenedDetails {
15677 s := new(SharedNoteOpenedDetails)
15678 return s
15679 }
15680
15681 // SharedNoteOpenedType : has no documentation (yet)
15682 type SharedNoteOpenedType struct {
15683 // Description : has no documentation (yet)
15684 Description string `json:"description"`
15685 }
15686
15687 // NewSharedNoteOpenedType returns a new SharedNoteOpenedType instance
15688 func NewSharedNoteOpenedType(Description string) *SharedNoteOpenedType {
15689 s := new(SharedNoteOpenedType)
15690 s.Description = Description
15691 return s
15692 }
15693
15694 // SharingChangeFolderJoinPolicyDetails : Changed whether team members can join
15695 // shared folders owned outside team.
15696 type SharingChangeFolderJoinPolicyDetails struct {
15697 // NewValue : New external join policy.
15698 NewValue *SharingFolderJoinPolicy `json:"new_value"`
15699 // PreviousValue : Previous external join policy. Might be missing due to
15700 // historical data gap.
15701 PreviousValue *SharingFolderJoinPolicy `json:"previous_value,omitempty"`
15702 }
15703
15704 // NewSharingChangeFolderJoinPolicyDetails returns a new SharingChangeFolderJoinPolicyDetails instance
15705 func NewSharingChangeFolderJoinPolicyDetails(NewValue *SharingFolderJoinPolicy) *SharingChangeFolderJoinPolicyDetails {
15706 s := new(SharingChangeFolderJoinPolicyDetails)
15707 s.NewValue = NewValue
15708 return s
15709 }
15710
15711 // SharingChangeFolderJoinPolicyType : has no documentation (yet)
15712 type SharingChangeFolderJoinPolicyType struct {
15713 // Description : has no documentation (yet)
15714 Description string `json:"description"`
15715 }
15716
15717 // NewSharingChangeFolderJoinPolicyType returns a new SharingChangeFolderJoinPolicyType instance
15718 func NewSharingChangeFolderJoinPolicyType(Description string) *SharingChangeFolderJoinPolicyType {
15719 s := new(SharingChangeFolderJoinPolicyType)
15720 s.Description = Description
15721 return s
15722 }
15723
15724 // SharingChangeLinkPolicyDetails : Changed whether members can share links
15725 // outside team, and if links are accessible only by team members or anyone by
15726 // default.
15727 type SharingChangeLinkPolicyDetails struct {
15728 // NewValue : New external link accessibility policy.
15729 NewValue *SharingLinkPolicy `json:"new_value"`
15730 // PreviousValue : Previous external link accessibility policy. Might be
15731 // missing due to historical data gap.
15732 PreviousValue *SharingLinkPolicy `json:"previous_value,omitempty"`
15733 }
15734
15735 // NewSharingChangeLinkPolicyDetails returns a new SharingChangeLinkPolicyDetails instance
15736 func NewSharingChangeLinkPolicyDetails(NewValue *SharingLinkPolicy) *SharingChangeLinkPolicyDetails {
15737 s := new(SharingChangeLinkPolicyDetails)
15738 s.NewValue = NewValue
15739 return s
15740 }
15741
15742 // SharingChangeLinkPolicyType : has no documentation (yet)
15743 type SharingChangeLinkPolicyType struct {
15744 // Description : has no documentation (yet)
15745 Description string `json:"description"`
15746 }
15747
15748 // NewSharingChangeLinkPolicyType returns a new SharingChangeLinkPolicyType instance
15749 func NewSharingChangeLinkPolicyType(Description string) *SharingChangeLinkPolicyType {
15750 s := new(SharingChangeLinkPolicyType)
15751 s.Description = Description
15752 return s
15753 }
15754
15755 // SharingChangeMemberPolicyDetails : Changed whether members can share
15756 // files/folders outside team.
15757 type SharingChangeMemberPolicyDetails struct {
15758 // NewValue : New external invite policy.
15759 NewValue *SharingMemberPolicy `json:"new_value"`
15760 // PreviousValue : Previous external invite policy. Might be missing due to
15761 // historical data gap.
15762 PreviousValue *SharingMemberPolicy `json:"previous_value,omitempty"`
15763 }
15764
15765 // NewSharingChangeMemberPolicyDetails returns a new SharingChangeMemberPolicyDetails instance
15766 func NewSharingChangeMemberPolicyDetails(NewValue *SharingMemberPolicy) *SharingChangeMemberPolicyDetails {
15767 s := new(SharingChangeMemberPolicyDetails)
15768 s.NewValue = NewValue
15769 return s
15770 }
15771
15772 // SharingChangeMemberPolicyType : has no documentation (yet)
15773 type SharingChangeMemberPolicyType struct {
15774 // Description : has no documentation (yet)
15775 Description string `json:"description"`
15776 }
15777
15778 // NewSharingChangeMemberPolicyType returns a new SharingChangeMemberPolicyType instance
15779 func NewSharingChangeMemberPolicyType(Description string) *SharingChangeMemberPolicyType {
15780 s := new(SharingChangeMemberPolicyType)
15781 s.Description = Description
15782 return s
15783 }
15784
15785 // SharingFolderJoinPolicy : Policy for controlling if team members can join
15786 // shared folders owned by non team members.
15787 type SharingFolderJoinPolicy struct {
15788 dropbox.Tagged
15789 }
15790
15791 // Valid tag values for SharingFolderJoinPolicy
15792 const (
15793 SharingFolderJoinPolicyFromAnyone = "from_anyone"
15794 SharingFolderJoinPolicyFromTeamOnly = "from_team_only"
15795 SharingFolderJoinPolicyOther = "other"
15796 )
15797
15798 // SharingLinkPolicy : Policy for controlling if team members can share links
15799 // externally
15800 type SharingLinkPolicy struct {
15801 dropbox.Tagged
15802 }
15803
15804 // Valid tag values for SharingLinkPolicy
15805 const (
15806 SharingLinkPolicyDefaultPrivate = "default_private"
15807 SharingLinkPolicyDefaultPublic = "default_public"
15808 SharingLinkPolicyOnlyPrivate = "only_private"
15809 SharingLinkPolicyOther = "other"
15810 )
15811
15812 // SharingMemberPolicy : External sharing policy
15813 type SharingMemberPolicy struct {
15814 dropbox.Tagged
15815 }
15816
15817 // Valid tag values for SharingMemberPolicy
15818 const (
15819 SharingMemberPolicyAllow = "allow"
15820 SharingMemberPolicyForbid = "forbid"
15821 SharingMemberPolicyOther = "other"
15822 )
15823
15824 // ShmodelGroupShareDetails : Shared link with group.
15825 type ShmodelGroupShareDetails struct {
15826 }
15827
15828 // NewShmodelGroupShareDetails returns a new ShmodelGroupShareDetails instance
15829 func NewShmodelGroupShareDetails() *ShmodelGroupShareDetails {
15830 s := new(ShmodelGroupShareDetails)
15831 return s
15832 }
15833
15834 // ShmodelGroupShareType : has no documentation (yet)
15835 type ShmodelGroupShareType struct {
15836 // Description : has no documentation (yet)
15837 Description string `json:"description"`
15838 }
15839
15840 // NewShmodelGroupShareType returns a new ShmodelGroupShareType instance
15841 func NewShmodelGroupShareType(Description string) *ShmodelGroupShareType {
15842 s := new(ShmodelGroupShareType)
15843 s.Description = Description
15844 return s
15845 }
15846
15847 // ShowcaseAccessGrantedDetails : Granted access to showcase.
15848 type ShowcaseAccessGrantedDetails struct {
15849 // EventUuid : Event unique identifier.
15850 EventUuid string `json:"event_uuid"`
15851 }
15852
15853 // NewShowcaseAccessGrantedDetails returns a new ShowcaseAccessGrantedDetails instance
15854 func NewShowcaseAccessGrantedDetails(EventUuid string) *ShowcaseAccessGrantedDetails {
15855 s := new(ShowcaseAccessGrantedDetails)
15856 s.EventUuid = EventUuid
15857 return s
15858 }
15859
15860 // ShowcaseAccessGrantedType : has no documentation (yet)
15861 type ShowcaseAccessGrantedType struct {
15862 // Description : has no documentation (yet)
15863 Description string `json:"description"`
15864 }
15865
15866 // NewShowcaseAccessGrantedType returns a new ShowcaseAccessGrantedType instance
15867 func NewShowcaseAccessGrantedType(Description string) *ShowcaseAccessGrantedType {
15868 s := new(ShowcaseAccessGrantedType)
15869 s.Description = Description
15870 return s
15871 }
15872
15873 // ShowcaseAddMemberDetails : Added member to showcase.
15874 type ShowcaseAddMemberDetails struct {
15875 // EventUuid : Event unique identifier.
15876 EventUuid string `json:"event_uuid"`
15877 }
15878
15879 // NewShowcaseAddMemberDetails returns a new ShowcaseAddMemberDetails instance
15880 func NewShowcaseAddMemberDetails(EventUuid string) *ShowcaseAddMemberDetails {
15881 s := new(ShowcaseAddMemberDetails)
15882 s.EventUuid = EventUuid
15883 return s
15884 }
15885
15886 // ShowcaseAddMemberType : has no documentation (yet)
15887 type ShowcaseAddMemberType struct {
15888 // Description : has no documentation (yet)
15889 Description string `json:"description"`
15890 }
15891
15892 // NewShowcaseAddMemberType returns a new ShowcaseAddMemberType instance
15893 func NewShowcaseAddMemberType(Description string) *ShowcaseAddMemberType {
15894 s := new(ShowcaseAddMemberType)
15895 s.Description = Description
15896 return s
15897 }
15898
15899 // ShowcaseArchivedDetails : Archived showcase.
15900 type ShowcaseArchivedDetails struct {
15901 // EventUuid : Event unique identifier.
15902 EventUuid string `json:"event_uuid"`
15903 }
15904
15905 // NewShowcaseArchivedDetails returns a new ShowcaseArchivedDetails instance
15906 func NewShowcaseArchivedDetails(EventUuid string) *ShowcaseArchivedDetails {
15907 s := new(ShowcaseArchivedDetails)
15908 s.EventUuid = EventUuid
15909 return s
15910 }
15911
15912 // ShowcaseArchivedType : has no documentation (yet)
15913 type ShowcaseArchivedType struct {
15914 // Description : has no documentation (yet)
15915 Description string `json:"description"`
15916 }
15917
15918 // NewShowcaseArchivedType returns a new ShowcaseArchivedType instance
15919 func NewShowcaseArchivedType(Description string) *ShowcaseArchivedType {
15920 s := new(ShowcaseArchivedType)
15921 s.Description = Description
15922 return s
15923 }
15924
15925 // ShowcaseChangeDownloadPolicyDetails : Enabled/disabled downloading files from
15926 // Dropbox Showcase for team.
15927 type ShowcaseChangeDownloadPolicyDetails struct {
15928 // NewValue : New Dropbox Showcase download policy.
15929 NewValue *ShowcaseDownloadPolicy `json:"new_value"`
15930 // PreviousValue : Previous Dropbox Showcase download policy.
15931 PreviousValue *ShowcaseDownloadPolicy `json:"previous_value"`
15932 }
15933
15934 // NewShowcaseChangeDownloadPolicyDetails returns a new ShowcaseChangeDownloadPolicyDetails instance
15935 func NewShowcaseChangeDownloadPolicyDetails(NewValue *ShowcaseDownloadPolicy, PreviousValue *ShowcaseDownloadPolicy) *ShowcaseChangeDownloadPolicyDetails {
15936 s := new(ShowcaseChangeDownloadPolicyDetails)
15937 s.NewValue = NewValue
15938 s.PreviousValue = PreviousValue
15939 return s
15940 }
15941
15942 // ShowcaseChangeDownloadPolicyType : has no documentation (yet)
15943 type ShowcaseChangeDownloadPolicyType struct {
15944 // Description : has no documentation (yet)
15945 Description string `json:"description"`
15946 }
15947
15948 // NewShowcaseChangeDownloadPolicyType returns a new ShowcaseChangeDownloadPolicyType instance
15949 func NewShowcaseChangeDownloadPolicyType(Description string) *ShowcaseChangeDownloadPolicyType {
15950 s := new(ShowcaseChangeDownloadPolicyType)
15951 s.Description = Description
15952 return s
15953 }
15954
15955 // ShowcaseChangeEnabledPolicyDetails : Enabled/disabled Dropbox Showcase for
15956 // team.
15957 type ShowcaseChangeEnabledPolicyDetails struct {
15958 // NewValue : New Dropbox Showcase policy.
15959 NewValue *ShowcaseEnabledPolicy `json:"new_value"`
15960 // PreviousValue : Previous Dropbox Showcase policy.
15961 PreviousValue *ShowcaseEnabledPolicy `json:"previous_value"`
15962 }
15963
15964 // NewShowcaseChangeEnabledPolicyDetails returns a new ShowcaseChangeEnabledPolicyDetails instance
15965 func NewShowcaseChangeEnabledPolicyDetails(NewValue *ShowcaseEnabledPolicy, PreviousValue *ShowcaseEnabledPolicy) *ShowcaseChangeEnabledPolicyDetails {
15966 s := new(ShowcaseChangeEnabledPolicyDetails)
15967 s.NewValue = NewValue
15968 s.PreviousValue = PreviousValue
15969 return s
15970 }
15971
15972 // ShowcaseChangeEnabledPolicyType : has no documentation (yet)
15973 type ShowcaseChangeEnabledPolicyType struct {
15974 // Description : has no documentation (yet)
15975 Description string `json:"description"`
15976 }
15977
15978 // NewShowcaseChangeEnabledPolicyType returns a new ShowcaseChangeEnabledPolicyType instance
15979 func NewShowcaseChangeEnabledPolicyType(Description string) *ShowcaseChangeEnabledPolicyType {
15980 s := new(ShowcaseChangeEnabledPolicyType)
15981 s.Description = Description
15982 return s
15983 }
15984
15985 // ShowcaseChangeExternalSharingPolicyDetails : Enabled/disabled sharing Dropbox
15986 // Showcase externally for team.
15987 type ShowcaseChangeExternalSharingPolicyDetails struct {
15988 // NewValue : New Dropbox Showcase external sharing policy.
15989 NewValue *ShowcaseExternalSharingPolicy `json:"new_value"`
15990 // PreviousValue : Previous Dropbox Showcase external sharing policy.
15991 PreviousValue *ShowcaseExternalSharingPolicy `json:"previous_value"`
15992 }
15993
15994 // NewShowcaseChangeExternalSharingPolicyDetails returns a new ShowcaseChangeExternalSharingPolicyDetails instance
15995 func NewShowcaseChangeExternalSharingPolicyDetails(NewValue *ShowcaseExternalSharingPolicy, PreviousValue *ShowcaseExternalSharingPolicy) *ShowcaseChangeExternalSharingPolicyDetails {
15996 s := new(ShowcaseChangeExternalSharingPolicyDetails)
15997 s.NewValue = NewValue
15998 s.PreviousValue = PreviousValue
15999 return s
16000 }
16001
16002 // ShowcaseChangeExternalSharingPolicyType : has no documentation (yet)
16003 type ShowcaseChangeExternalSharingPolicyType struct {
16004 // Description : has no documentation (yet)
16005 Description string `json:"description"`
16006 }
16007
16008 // NewShowcaseChangeExternalSharingPolicyType returns a new ShowcaseChangeExternalSharingPolicyType instance
16009 func NewShowcaseChangeExternalSharingPolicyType(Description string) *ShowcaseChangeExternalSharingPolicyType {
16010 s := new(ShowcaseChangeExternalSharingPolicyType)
16011 s.Description = Description
16012 return s
16013 }
16014
16015 // ShowcaseCreatedDetails : Created showcase.
16016 type ShowcaseCreatedDetails struct {
16017 // EventUuid : Event unique identifier.
16018 EventUuid string `json:"event_uuid"`
16019 }
16020
16021 // NewShowcaseCreatedDetails returns a new ShowcaseCreatedDetails instance
16022 func NewShowcaseCreatedDetails(EventUuid string) *ShowcaseCreatedDetails {
16023 s := new(ShowcaseCreatedDetails)
16024 s.EventUuid = EventUuid
16025 return s
16026 }
16027
16028 // ShowcaseCreatedType : has no documentation (yet)
16029 type ShowcaseCreatedType struct {
16030 // Description : has no documentation (yet)
16031 Description string `json:"description"`
16032 }
16033
16034 // NewShowcaseCreatedType returns a new ShowcaseCreatedType instance
16035 func NewShowcaseCreatedType(Description string) *ShowcaseCreatedType {
16036 s := new(ShowcaseCreatedType)
16037 s.Description = Description
16038 return s
16039 }
16040
16041 // ShowcaseDeleteCommentDetails : Deleted showcase comment.
16042 type ShowcaseDeleteCommentDetails struct {
16043 // EventUuid : Event unique identifier.
16044 EventUuid string `json:"event_uuid"`
16045 // CommentText : Comment text.
16046 CommentText string `json:"comment_text,omitempty"`
16047 }
16048
16049 // NewShowcaseDeleteCommentDetails returns a new ShowcaseDeleteCommentDetails instance
16050 func NewShowcaseDeleteCommentDetails(EventUuid string) *ShowcaseDeleteCommentDetails {
16051 s := new(ShowcaseDeleteCommentDetails)
16052 s.EventUuid = EventUuid
16053 return s
16054 }
16055
16056 // ShowcaseDeleteCommentType : has no documentation (yet)
16057 type ShowcaseDeleteCommentType struct {
16058 // Description : has no documentation (yet)
16059 Description string `json:"description"`
16060 }
16061
16062 // NewShowcaseDeleteCommentType returns a new ShowcaseDeleteCommentType instance
16063 func NewShowcaseDeleteCommentType(Description string) *ShowcaseDeleteCommentType {
16064 s := new(ShowcaseDeleteCommentType)
16065 s.Description = Description
16066 return s
16067 }
16068
16069 // ShowcaseDocumentLogInfo : Showcase document's logged information.
16070 type ShowcaseDocumentLogInfo struct {
16071 // ShowcaseId : Showcase document Id.
16072 ShowcaseId string `json:"showcase_id"`
16073 // ShowcaseTitle : Showcase document title.
16074 ShowcaseTitle string `json:"showcase_title"`
16075 }
16076
16077 // NewShowcaseDocumentLogInfo returns a new ShowcaseDocumentLogInfo instance
16078 func NewShowcaseDocumentLogInfo(ShowcaseId string, ShowcaseTitle string) *ShowcaseDocumentLogInfo {
16079 s := new(ShowcaseDocumentLogInfo)
16080 s.ShowcaseId = ShowcaseId
16081 s.ShowcaseTitle = ShowcaseTitle
16082 return s
16083 }
16084
16085 // ShowcaseDownloadPolicy : Policy for controlling if files can be downloaded
16086 // from Showcases by team members
16087 type ShowcaseDownloadPolicy struct {
16088 dropbox.Tagged
16089 }
16090
16091 // Valid tag values for ShowcaseDownloadPolicy
16092 const (
16093 ShowcaseDownloadPolicyDisabled = "disabled"
16094 ShowcaseDownloadPolicyEnabled = "enabled"
16095 ShowcaseDownloadPolicyOther = "other"
16096 )
16097
16098 // ShowcaseEditCommentDetails : Edited showcase comment.
16099 type ShowcaseEditCommentDetails struct {
16100 // EventUuid : Event unique identifier.
16101 EventUuid string `json:"event_uuid"`
16102 // CommentText : Comment text.
16103 CommentText string `json:"comment_text,omitempty"`
16104 }
16105
16106 // NewShowcaseEditCommentDetails returns a new ShowcaseEditCommentDetails instance
16107 func NewShowcaseEditCommentDetails(EventUuid string) *ShowcaseEditCommentDetails {
16108 s := new(ShowcaseEditCommentDetails)
16109 s.EventUuid = EventUuid
16110 return s
16111 }
16112
16113 // ShowcaseEditCommentType : has no documentation (yet)
16114 type ShowcaseEditCommentType struct {
16115 // Description : has no documentation (yet)
16116 Description string `json:"description"`
16117 }
16118
16119 // NewShowcaseEditCommentType returns a new ShowcaseEditCommentType instance
16120 func NewShowcaseEditCommentType(Description string) *ShowcaseEditCommentType {
16121 s := new(ShowcaseEditCommentType)
16122 s.Description = Description
16123 return s
16124 }
16125
16126 // ShowcaseEditedDetails : Edited showcase.
16127 type ShowcaseEditedDetails struct {
16128 // EventUuid : Event unique identifier.
16129 EventUuid string `json:"event_uuid"`
16130 }
16131
16132 // NewShowcaseEditedDetails returns a new ShowcaseEditedDetails instance
16133 func NewShowcaseEditedDetails(EventUuid string) *ShowcaseEditedDetails {
16134 s := new(ShowcaseEditedDetails)
16135 s.EventUuid = EventUuid
16136 return s
16137 }
16138
16139 // ShowcaseEditedType : has no documentation (yet)
16140 type ShowcaseEditedType struct {
16141 // Description : has no documentation (yet)
16142 Description string `json:"description"`
16143 }
16144
16145 // NewShowcaseEditedType returns a new ShowcaseEditedType instance
16146 func NewShowcaseEditedType(Description string) *ShowcaseEditedType {
16147 s := new(ShowcaseEditedType)
16148 s.Description = Description
16149 return s
16150 }
16151
16152 // ShowcaseEnabledPolicy : Policy for controlling whether Showcase is enabled.
16153 type ShowcaseEnabledPolicy struct {
16154 dropbox.Tagged
16155 }
16156
16157 // Valid tag values for ShowcaseEnabledPolicy
16158 const (
16159 ShowcaseEnabledPolicyDisabled = "disabled"
16160 ShowcaseEnabledPolicyEnabled = "enabled"
16161 ShowcaseEnabledPolicyOther = "other"
16162 )
16163
16164 // ShowcaseExternalSharingPolicy : Policy for controlling if team members can
16165 // share Showcases externally.
16166 type ShowcaseExternalSharingPolicy struct {
16167 dropbox.Tagged
16168 }
16169
16170 // Valid tag values for ShowcaseExternalSharingPolicy
16171 const (
16172 ShowcaseExternalSharingPolicyDisabled = "disabled"
16173 ShowcaseExternalSharingPolicyEnabled = "enabled"
16174 ShowcaseExternalSharingPolicyOther = "other"
16175 )
16176
16177 // ShowcaseFileAddedDetails : Added file to showcase.
16178 type ShowcaseFileAddedDetails struct {
16179 // EventUuid : Event unique identifier.
16180 EventUuid string `json:"event_uuid"`
16181 }
16182
16183 // NewShowcaseFileAddedDetails returns a new ShowcaseFileAddedDetails instance
16184 func NewShowcaseFileAddedDetails(EventUuid string) *ShowcaseFileAddedDetails {
16185 s := new(ShowcaseFileAddedDetails)
16186 s.EventUuid = EventUuid
16187 return s
16188 }
16189
16190 // ShowcaseFileAddedType : has no documentation (yet)
16191 type ShowcaseFileAddedType struct {
16192 // Description : has no documentation (yet)
16193 Description string `json:"description"`
16194 }
16195
16196 // NewShowcaseFileAddedType returns a new ShowcaseFileAddedType instance
16197 func NewShowcaseFileAddedType(Description string) *ShowcaseFileAddedType {
16198 s := new(ShowcaseFileAddedType)
16199 s.Description = Description
16200 return s
16201 }
16202
16203 // ShowcaseFileDownloadDetails : Downloaded file from showcase.
16204 type ShowcaseFileDownloadDetails struct {
16205 // EventUuid : Event unique identifier.
16206 EventUuid string `json:"event_uuid"`
16207 // DownloadType : Showcase download type.
16208 DownloadType string `json:"download_type"`
16209 }
16210
16211 // NewShowcaseFileDownloadDetails returns a new ShowcaseFileDownloadDetails instance
16212 func NewShowcaseFileDownloadDetails(EventUuid string, DownloadType string) *ShowcaseFileDownloadDetails {
16213 s := new(ShowcaseFileDownloadDetails)
16214 s.EventUuid = EventUuid
16215 s.DownloadType = DownloadType
16216 return s
16217 }
16218
16219 // ShowcaseFileDownloadType : has no documentation (yet)
16220 type ShowcaseFileDownloadType struct {
16221 // Description : has no documentation (yet)
16222 Description string `json:"description"`
16223 }
16224
16225 // NewShowcaseFileDownloadType returns a new ShowcaseFileDownloadType instance
16226 func NewShowcaseFileDownloadType(Description string) *ShowcaseFileDownloadType {
16227 s := new(ShowcaseFileDownloadType)
16228 s.Description = Description
16229 return s
16230 }
16231
16232 // ShowcaseFileRemovedDetails : Removed file from showcase.
16233 type ShowcaseFileRemovedDetails struct {
16234 // EventUuid : Event unique identifier.
16235 EventUuid string `json:"event_uuid"`
16236 }
16237
16238 // NewShowcaseFileRemovedDetails returns a new ShowcaseFileRemovedDetails instance
16239 func NewShowcaseFileRemovedDetails(EventUuid string) *ShowcaseFileRemovedDetails {
16240 s := new(ShowcaseFileRemovedDetails)
16241 s.EventUuid = EventUuid
16242 return s
16243 }
16244
16245 // ShowcaseFileRemovedType : has no documentation (yet)
16246 type ShowcaseFileRemovedType struct {
16247 // Description : has no documentation (yet)
16248 Description string `json:"description"`
16249 }
16250
16251 // NewShowcaseFileRemovedType returns a new ShowcaseFileRemovedType instance
16252 func NewShowcaseFileRemovedType(Description string) *ShowcaseFileRemovedType {
16253 s := new(ShowcaseFileRemovedType)
16254 s.Description = Description
16255 return s
16256 }
16257
16258 // ShowcaseFileViewDetails : Viewed file in showcase.
16259 type ShowcaseFileViewDetails struct {
16260 // EventUuid : Event unique identifier.
16261 EventUuid string `json:"event_uuid"`
16262 }
16263
16264 // NewShowcaseFileViewDetails returns a new ShowcaseFileViewDetails instance
16265 func NewShowcaseFileViewDetails(EventUuid string) *ShowcaseFileViewDetails {
16266 s := new(ShowcaseFileViewDetails)
16267 s.EventUuid = EventUuid
16268 return s
16269 }
16270
16271 // ShowcaseFileViewType : has no documentation (yet)
16272 type ShowcaseFileViewType struct {
16273 // Description : has no documentation (yet)
16274 Description string `json:"description"`
16275 }
16276
16277 // NewShowcaseFileViewType returns a new ShowcaseFileViewType instance
16278 func NewShowcaseFileViewType(Description string) *ShowcaseFileViewType {
16279 s := new(ShowcaseFileViewType)
16280 s.Description = Description
16281 return s
16282 }
16283
16284 // ShowcasePermanentlyDeletedDetails : Permanently deleted showcase.
16285 type ShowcasePermanentlyDeletedDetails struct {
16286 // EventUuid : Event unique identifier.
16287 EventUuid string `json:"event_uuid"`
16288 }
16289
16290 // NewShowcasePermanentlyDeletedDetails returns a new ShowcasePermanentlyDeletedDetails instance
16291 func NewShowcasePermanentlyDeletedDetails(EventUuid string) *ShowcasePermanentlyDeletedDetails {
16292 s := new(ShowcasePermanentlyDeletedDetails)
16293 s.EventUuid = EventUuid
16294 return s
16295 }
16296
16297 // ShowcasePermanentlyDeletedType : has no documentation (yet)
16298 type ShowcasePermanentlyDeletedType struct {
16299 // Description : has no documentation (yet)
16300 Description string `json:"description"`
16301 }
16302
16303 // NewShowcasePermanentlyDeletedType returns a new ShowcasePermanentlyDeletedType instance
16304 func NewShowcasePermanentlyDeletedType(Description string) *ShowcasePermanentlyDeletedType {
16305 s := new(ShowcasePermanentlyDeletedType)
16306 s.Description = Description
16307 return s
16308 }
16309
16310 // ShowcasePostCommentDetails : Added showcase comment.
16311 type ShowcasePostCommentDetails struct {
16312 // EventUuid : Event unique identifier.
16313 EventUuid string `json:"event_uuid"`
16314 // CommentText : Comment text.
16315 CommentText string `json:"comment_text,omitempty"`
16316 }
16317
16318 // NewShowcasePostCommentDetails returns a new ShowcasePostCommentDetails instance
16319 func NewShowcasePostCommentDetails(EventUuid string) *ShowcasePostCommentDetails {
16320 s := new(ShowcasePostCommentDetails)
16321 s.EventUuid = EventUuid
16322 return s
16323 }
16324
16325 // ShowcasePostCommentType : has no documentation (yet)
16326 type ShowcasePostCommentType struct {
16327 // Description : has no documentation (yet)
16328 Description string `json:"description"`
16329 }
16330
16331 // NewShowcasePostCommentType returns a new ShowcasePostCommentType instance
16332 func NewShowcasePostCommentType(Description string) *ShowcasePostCommentType {
16333 s := new(ShowcasePostCommentType)
16334 s.Description = Description
16335 return s
16336 }
16337
16338 // ShowcaseRemoveMemberDetails : Removed member from showcase.
16339 type ShowcaseRemoveMemberDetails struct {
16340 // EventUuid : Event unique identifier.
16341 EventUuid string `json:"event_uuid"`
16342 }
16343
16344 // NewShowcaseRemoveMemberDetails returns a new ShowcaseRemoveMemberDetails instance
16345 func NewShowcaseRemoveMemberDetails(EventUuid string) *ShowcaseRemoveMemberDetails {
16346 s := new(ShowcaseRemoveMemberDetails)
16347 s.EventUuid = EventUuid
16348 return s
16349 }
16350
16351 // ShowcaseRemoveMemberType : has no documentation (yet)
16352 type ShowcaseRemoveMemberType struct {
16353 // Description : has no documentation (yet)
16354 Description string `json:"description"`
16355 }
16356
16357 // NewShowcaseRemoveMemberType returns a new ShowcaseRemoveMemberType instance
16358 func NewShowcaseRemoveMemberType(Description string) *ShowcaseRemoveMemberType {
16359 s := new(ShowcaseRemoveMemberType)
16360 s.Description = Description
16361 return s
16362 }
16363
16364 // ShowcaseRenamedDetails : Renamed showcase.
16365 type ShowcaseRenamedDetails struct {
16366 // EventUuid : Event unique identifier.
16367 EventUuid string `json:"event_uuid"`
16368 }
16369
16370 // NewShowcaseRenamedDetails returns a new ShowcaseRenamedDetails instance
16371 func NewShowcaseRenamedDetails(EventUuid string) *ShowcaseRenamedDetails {
16372 s := new(ShowcaseRenamedDetails)
16373 s.EventUuid = EventUuid
16374 return s
16375 }
16376
16377 // ShowcaseRenamedType : has no documentation (yet)
16378 type ShowcaseRenamedType struct {
16379 // Description : has no documentation (yet)
16380 Description string `json:"description"`
16381 }
16382
16383 // NewShowcaseRenamedType returns a new ShowcaseRenamedType instance
16384 func NewShowcaseRenamedType(Description string) *ShowcaseRenamedType {
16385 s := new(ShowcaseRenamedType)
16386 s.Description = Description
16387 return s
16388 }
16389
16390 // ShowcaseRequestAccessDetails : Requested access to showcase.
16391 type ShowcaseRequestAccessDetails struct {
16392 // EventUuid : Event unique identifier.
16393 EventUuid string `json:"event_uuid"`
16394 }
16395
16396 // NewShowcaseRequestAccessDetails returns a new ShowcaseRequestAccessDetails instance
16397 func NewShowcaseRequestAccessDetails(EventUuid string) *ShowcaseRequestAccessDetails {
16398 s := new(ShowcaseRequestAccessDetails)
16399 s.EventUuid = EventUuid
16400 return s
16401 }
16402
16403 // ShowcaseRequestAccessType : has no documentation (yet)
16404 type ShowcaseRequestAccessType struct {
16405 // Description : has no documentation (yet)
16406 Description string `json:"description"`
16407 }
16408
16409 // NewShowcaseRequestAccessType returns a new ShowcaseRequestAccessType instance
16410 func NewShowcaseRequestAccessType(Description string) *ShowcaseRequestAccessType {
16411 s := new(ShowcaseRequestAccessType)
16412 s.Description = Description
16413 return s
16414 }
16415
16416 // ShowcaseResolveCommentDetails : Resolved showcase comment.
16417 type ShowcaseResolveCommentDetails struct {
16418 // EventUuid : Event unique identifier.
16419 EventUuid string `json:"event_uuid"`
16420 // CommentText : Comment text.
16421 CommentText string `json:"comment_text,omitempty"`
16422 }
16423
16424 // NewShowcaseResolveCommentDetails returns a new ShowcaseResolveCommentDetails instance
16425 func NewShowcaseResolveCommentDetails(EventUuid string) *ShowcaseResolveCommentDetails {
16426 s := new(ShowcaseResolveCommentDetails)
16427 s.EventUuid = EventUuid
16428 return s
16429 }
16430
16431 // ShowcaseResolveCommentType : has no documentation (yet)
16432 type ShowcaseResolveCommentType struct {
16433 // Description : has no documentation (yet)
16434 Description string `json:"description"`
16435 }
16436
16437 // NewShowcaseResolveCommentType returns a new ShowcaseResolveCommentType instance
16438 func NewShowcaseResolveCommentType(Description string) *ShowcaseResolveCommentType {
16439 s := new(ShowcaseResolveCommentType)
16440 s.Description = Description
16441 return s
16442 }
16443
16444 // ShowcaseRestoredDetails : Unarchived showcase.
16445 type ShowcaseRestoredDetails struct {
16446 // EventUuid : Event unique identifier.
16447 EventUuid string `json:"event_uuid"`
16448 }
16449
16450 // NewShowcaseRestoredDetails returns a new ShowcaseRestoredDetails instance
16451 func NewShowcaseRestoredDetails(EventUuid string) *ShowcaseRestoredDetails {
16452 s := new(ShowcaseRestoredDetails)
16453 s.EventUuid = EventUuid
16454 return s
16455 }
16456
16457 // ShowcaseRestoredType : has no documentation (yet)
16458 type ShowcaseRestoredType struct {
16459 // Description : has no documentation (yet)
16460 Description string `json:"description"`
16461 }
16462
16463 // NewShowcaseRestoredType returns a new ShowcaseRestoredType instance
16464 func NewShowcaseRestoredType(Description string) *ShowcaseRestoredType {
16465 s := new(ShowcaseRestoredType)
16466 s.Description = Description
16467 return s
16468 }
16469
16470 // ShowcaseTrashedDeprecatedDetails : Deleted showcase (old version).
16471 type ShowcaseTrashedDeprecatedDetails struct {
16472 // EventUuid : Event unique identifier.
16473 EventUuid string `json:"event_uuid"`
16474 }
16475
16476 // NewShowcaseTrashedDeprecatedDetails returns a new ShowcaseTrashedDeprecatedDetails instance
16477 func NewShowcaseTrashedDeprecatedDetails(EventUuid string) *ShowcaseTrashedDeprecatedDetails {
16478 s := new(ShowcaseTrashedDeprecatedDetails)
16479 s.EventUuid = EventUuid
16480 return s
16481 }
16482
16483 // ShowcaseTrashedDeprecatedType : has no documentation (yet)
16484 type ShowcaseTrashedDeprecatedType struct {
16485 // Description : has no documentation (yet)
16486 Description string `json:"description"`
16487 }
16488
16489 // NewShowcaseTrashedDeprecatedType returns a new ShowcaseTrashedDeprecatedType instance
16490 func NewShowcaseTrashedDeprecatedType(Description string) *ShowcaseTrashedDeprecatedType {
16491 s := new(ShowcaseTrashedDeprecatedType)
16492 s.Description = Description
16493 return s
16494 }
16495
16496 // ShowcaseTrashedDetails : Deleted showcase.
16497 type ShowcaseTrashedDetails struct {
16498 // EventUuid : Event unique identifier.
16499 EventUuid string `json:"event_uuid"`
16500 }
16501
16502 // NewShowcaseTrashedDetails returns a new ShowcaseTrashedDetails instance
16503 func NewShowcaseTrashedDetails(EventUuid string) *ShowcaseTrashedDetails {
16504 s := new(ShowcaseTrashedDetails)
16505 s.EventUuid = EventUuid
16506 return s
16507 }
16508
16509 // ShowcaseTrashedType : has no documentation (yet)
16510 type ShowcaseTrashedType struct {
16511 // Description : has no documentation (yet)
16512 Description string `json:"description"`
16513 }
16514
16515 // NewShowcaseTrashedType returns a new ShowcaseTrashedType instance
16516 func NewShowcaseTrashedType(Description string) *ShowcaseTrashedType {
16517 s := new(ShowcaseTrashedType)
16518 s.Description = Description
16519 return s
16520 }
16521
16522 // ShowcaseUnresolveCommentDetails : Unresolved showcase comment.
16523 type ShowcaseUnresolveCommentDetails struct {
16524 // EventUuid : Event unique identifier.
16525 EventUuid string `json:"event_uuid"`
16526 // CommentText : Comment text.
16527 CommentText string `json:"comment_text,omitempty"`
16528 }
16529
16530 // NewShowcaseUnresolveCommentDetails returns a new ShowcaseUnresolveCommentDetails instance
16531 func NewShowcaseUnresolveCommentDetails(EventUuid string) *ShowcaseUnresolveCommentDetails {
16532 s := new(ShowcaseUnresolveCommentDetails)
16533 s.EventUuid = EventUuid
16534 return s
16535 }
16536
16537 // ShowcaseUnresolveCommentType : has no documentation (yet)
16538 type ShowcaseUnresolveCommentType struct {
16539 // Description : has no documentation (yet)
16540 Description string `json:"description"`
16541 }
16542
16543 // NewShowcaseUnresolveCommentType returns a new ShowcaseUnresolveCommentType instance
16544 func NewShowcaseUnresolveCommentType(Description string) *ShowcaseUnresolveCommentType {
16545 s := new(ShowcaseUnresolveCommentType)
16546 s.Description = Description
16547 return s
16548 }
16549
16550 // ShowcaseUntrashedDeprecatedDetails : Restored showcase (old version).
16551 type ShowcaseUntrashedDeprecatedDetails struct {
16552 // EventUuid : Event unique identifier.
16553 EventUuid string `json:"event_uuid"`
16554 }
16555
16556 // NewShowcaseUntrashedDeprecatedDetails returns a new ShowcaseUntrashedDeprecatedDetails instance
16557 func NewShowcaseUntrashedDeprecatedDetails(EventUuid string) *ShowcaseUntrashedDeprecatedDetails {
16558 s := new(ShowcaseUntrashedDeprecatedDetails)
16559 s.EventUuid = EventUuid
16560 return s
16561 }
16562
16563 // ShowcaseUntrashedDeprecatedType : has no documentation (yet)
16564 type ShowcaseUntrashedDeprecatedType struct {
16565 // Description : has no documentation (yet)
16566 Description string `json:"description"`
16567 }
16568
16569 // NewShowcaseUntrashedDeprecatedType returns a new ShowcaseUntrashedDeprecatedType instance
16570 func NewShowcaseUntrashedDeprecatedType(Description string) *ShowcaseUntrashedDeprecatedType {
16571 s := new(ShowcaseUntrashedDeprecatedType)
16572 s.Description = Description
16573 return s
16574 }
16575
16576 // ShowcaseUntrashedDetails : Restored showcase.
16577 type ShowcaseUntrashedDetails struct {
16578 // EventUuid : Event unique identifier.
16579 EventUuid string `json:"event_uuid"`
16580 }
16581
16582 // NewShowcaseUntrashedDetails returns a new ShowcaseUntrashedDetails instance
16583 func NewShowcaseUntrashedDetails(EventUuid string) *ShowcaseUntrashedDetails {
16584 s := new(ShowcaseUntrashedDetails)
16585 s.EventUuid = EventUuid
16586 return s
16587 }
16588
16589 // ShowcaseUntrashedType : has no documentation (yet)
16590 type ShowcaseUntrashedType struct {
16591 // Description : has no documentation (yet)
16592 Description string `json:"description"`
16593 }
16594
16595 // NewShowcaseUntrashedType returns a new ShowcaseUntrashedType instance
16596 func NewShowcaseUntrashedType(Description string) *ShowcaseUntrashedType {
16597 s := new(ShowcaseUntrashedType)
16598 s.Description = Description
16599 return s
16600 }
16601
16602 // ShowcaseViewDetails : Viewed showcase.
16603 type ShowcaseViewDetails struct {
16604 // EventUuid : Event unique identifier.
16605 EventUuid string `json:"event_uuid"`
16606 }
16607
16608 // NewShowcaseViewDetails returns a new ShowcaseViewDetails instance
16609 func NewShowcaseViewDetails(EventUuid string) *ShowcaseViewDetails {
16610 s := new(ShowcaseViewDetails)
16611 s.EventUuid = EventUuid
16612 return s
16613 }
16614
16615 // ShowcaseViewType : has no documentation (yet)
16616 type ShowcaseViewType struct {
16617 // Description : has no documentation (yet)
16618 Description string `json:"description"`
16619 }
16620
16621 // NewShowcaseViewType returns a new ShowcaseViewType instance
16622 func NewShowcaseViewType(Description string) *ShowcaseViewType {
16623 s := new(ShowcaseViewType)
16624 s.Description = Description
16625 return s
16626 }
16627
16628 // SignInAsSessionEndDetails : Ended admin sign-in-as session.
16629 type SignInAsSessionEndDetails struct {
16630 }
16631
16632 // NewSignInAsSessionEndDetails returns a new SignInAsSessionEndDetails instance
16633 func NewSignInAsSessionEndDetails() *SignInAsSessionEndDetails {
16634 s := new(SignInAsSessionEndDetails)
16635 return s
16636 }
16637
16638 // SignInAsSessionEndType : has no documentation (yet)
16639 type SignInAsSessionEndType struct {
16640 // Description : has no documentation (yet)
16641 Description string `json:"description"`
16642 }
16643
16644 // NewSignInAsSessionEndType returns a new SignInAsSessionEndType instance
16645 func NewSignInAsSessionEndType(Description string) *SignInAsSessionEndType {
16646 s := new(SignInAsSessionEndType)
16647 s.Description = Description
16648 return s
16649 }
16650
16651 // SignInAsSessionStartDetails : Started admin sign-in-as session.
16652 type SignInAsSessionStartDetails struct {
16653 }
16654
16655 // NewSignInAsSessionStartDetails returns a new SignInAsSessionStartDetails instance
16656 func NewSignInAsSessionStartDetails() *SignInAsSessionStartDetails {
16657 s := new(SignInAsSessionStartDetails)
16658 return s
16659 }
16660
16661 // SignInAsSessionStartType : has no documentation (yet)
16662 type SignInAsSessionStartType struct {
16663 // Description : has no documentation (yet)
16664 Description string `json:"description"`
16665 }
16666
16667 // NewSignInAsSessionStartType returns a new SignInAsSessionStartType instance
16668 func NewSignInAsSessionStartType(Description string) *SignInAsSessionStartType {
16669 s := new(SignInAsSessionStartType)
16670 s.Description = Description
16671 return s
16672 }
16673
16674 // SmartSyncChangePolicyDetails : Changed default Smart Sync setting for team
16675 // members.
16676 type SmartSyncChangePolicyDetails struct {
16677 // NewValue : New smart sync policy.
16678 NewValue *team_policies.SmartSyncPolicy `json:"new_value,omitempty"`
16679 // PreviousValue : Previous smart sync policy.
16680 PreviousValue *team_policies.SmartSyncPolicy `json:"previous_value,omitempty"`
16681 }
16682
16683 // NewSmartSyncChangePolicyDetails returns a new SmartSyncChangePolicyDetails instance
16684 func NewSmartSyncChangePolicyDetails() *SmartSyncChangePolicyDetails {
16685 s := new(SmartSyncChangePolicyDetails)
16686 return s
16687 }
16688
16689 // SmartSyncChangePolicyType : has no documentation (yet)
16690 type SmartSyncChangePolicyType struct {
16691 // Description : has no documentation (yet)
16692 Description string `json:"description"`
16693 }
16694
16695 // NewSmartSyncChangePolicyType returns a new SmartSyncChangePolicyType instance
16696 func NewSmartSyncChangePolicyType(Description string) *SmartSyncChangePolicyType {
16697 s := new(SmartSyncChangePolicyType)
16698 s.Description = Description
16699 return s
16700 }
16701
16702 // SmartSyncCreateAdminPrivilegeReportDetails : Created Smart Sync non-admin
16703 // devices report.
16704 type SmartSyncCreateAdminPrivilegeReportDetails struct {
16705 }
16706
16707 // NewSmartSyncCreateAdminPrivilegeReportDetails returns a new SmartSyncCreateAdminPrivilegeReportDetails instance
16708 func NewSmartSyncCreateAdminPrivilegeReportDetails() *SmartSyncCreateAdminPrivilegeReportDetails {
16709 s := new(SmartSyncCreateAdminPrivilegeReportDetails)
16710 return s
16711 }
16712
16713 // SmartSyncCreateAdminPrivilegeReportType : has no documentation (yet)
16714 type SmartSyncCreateAdminPrivilegeReportType struct {
16715 // Description : has no documentation (yet)
16716 Description string `json:"description"`
16717 }
16718
16719 // NewSmartSyncCreateAdminPrivilegeReportType returns a new SmartSyncCreateAdminPrivilegeReportType instance
16720 func NewSmartSyncCreateAdminPrivilegeReportType(Description string) *SmartSyncCreateAdminPrivilegeReportType {
16721 s := new(SmartSyncCreateAdminPrivilegeReportType)
16722 s.Description = Description
16723 return s
16724 }
16725
16726 // SmartSyncNotOptOutDetails : Opted team into Smart Sync.
16727 type SmartSyncNotOptOutDetails struct {
16728 // PreviousValue : Previous Smart Sync opt out policy.
16729 PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"`
16730 // NewValue : New Smart Sync opt out policy.
16731 NewValue *SmartSyncOptOutPolicy `json:"new_value"`
16732 }
16733
16734 // NewSmartSyncNotOptOutDetails returns a new SmartSyncNotOptOutDetails instance
16735 func NewSmartSyncNotOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncNotOptOutDetails {
16736 s := new(SmartSyncNotOptOutDetails)
16737 s.PreviousValue = PreviousValue
16738 s.NewValue = NewValue
16739 return s
16740 }
16741
16742 // SmartSyncNotOptOutType : has no documentation (yet)
16743 type SmartSyncNotOptOutType struct {
16744 // Description : has no documentation (yet)
16745 Description string `json:"description"`
16746 }
16747
16748 // NewSmartSyncNotOptOutType returns a new SmartSyncNotOptOutType instance
16749 func NewSmartSyncNotOptOutType(Description string) *SmartSyncNotOptOutType {
16750 s := new(SmartSyncNotOptOutType)
16751 s.Description = Description
16752 return s
16753 }
16754
16755 // SmartSyncOptOutDetails : Opted team out of Smart Sync.
16756 type SmartSyncOptOutDetails struct {
16757 // PreviousValue : Previous Smart Sync opt out policy.
16758 PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"`
16759 // NewValue : New Smart Sync opt out policy.
16760 NewValue *SmartSyncOptOutPolicy `json:"new_value"`
16761 }
16762
16763 // NewSmartSyncOptOutDetails returns a new SmartSyncOptOutDetails instance
16764 func NewSmartSyncOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncOptOutDetails {
16765 s := new(SmartSyncOptOutDetails)
16766 s.PreviousValue = PreviousValue
16767 s.NewValue = NewValue
16768 return s
16769 }
16770
16771 // SmartSyncOptOutPolicy : has no documentation (yet)
16772 type SmartSyncOptOutPolicy struct {
16773 dropbox.Tagged
16774 }
16775
16776 // Valid tag values for SmartSyncOptOutPolicy
16777 const (
16778 SmartSyncOptOutPolicyDefault = "default"
16779 SmartSyncOptOutPolicyOptedOut = "opted_out"
16780 SmartSyncOptOutPolicyOther = "other"
16781 )
16782
16783 // SmartSyncOptOutType : has no documentation (yet)
16784 type SmartSyncOptOutType struct {
16785 // Description : has no documentation (yet)
16786 Description string `json:"description"`
16787 }
16788
16789 // NewSmartSyncOptOutType returns a new SmartSyncOptOutType instance
16790 func NewSmartSyncOptOutType(Description string) *SmartSyncOptOutType {
16791 s := new(SmartSyncOptOutType)
16792 s.Description = Description
16793 return s
16794 }
16795
16796 // SpaceCapsType : Space limit alert policy
16797 type SpaceCapsType struct {
16798 dropbox.Tagged
16799 }
16800
16801 // Valid tag values for SpaceCapsType
16802 const (
16803 SpaceCapsTypeHard = "hard"
16804 SpaceCapsTypeOff = "off"
16805 SpaceCapsTypeSoft = "soft"
16806 SpaceCapsTypeOther = "other"
16807 )
16808
16809 // SpaceLimitsStatus : has no documentation (yet)
16810 type SpaceLimitsStatus struct {
16811 dropbox.Tagged
16812 }
16813
16814 // Valid tag values for SpaceLimitsStatus
16815 const (
16816 SpaceLimitsStatusWithinQuota = "within_quota"
16817 SpaceLimitsStatusNearQuota = "near_quota"
16818 SpaceLimitsStatusOverQuota = "over_quota"
16819 SpaceLimitsStatusOther = "other"
16820 )
16821
16822 // SsoAddCertDetails : Added X.509 certificate for SSO.
16823 type SsoAddCertDetails struct {
16824 // CertificateDetails : SSO certificate details.
16825 CertificateDetails *Certificate `json:"certificate_details"`
16826 }
16827
16828 // NewSsoAddCertDetails returns a new SsoAddCertDetails instance
16829 func NewSsoAddCertDetails(CertificateDetails *Certificate) *SsoAddCertDetails {
16830 s := new(SsoAddCertDetails)
16831 s.CertificateDetails = CertificateDetails
16832 return s
16833 }
16834
16835 // SsoAddCertType : has no documentation (yet)
16836 type SsoAddCertType struct {
16837 // Description : has no documentation (yet)
16838 Description string `json:"description"`
16839 }
16840
16841 // NewSsoAddCertType returns a new SsoAddCertType instance
16842 func NewSsoAddCertType(Description string) *SsoAddCertType {
16843 s := new(SsoAddCertType)
16844 s.Description = Description
16845 return s
16846 }
16847
16848 // SsoAddLoginUrlDetails : Added sign-in URL for SSO.
16849 type SsoAddLoginUrlDetails struct {
16850 // NewValue : New single sign-on login URL.
16851 NewValue string `json:"new_value"`
16852 }
16853
16854 // NewSsoAddLoginUrlDetails returns a new SsoAddLoginUrlDetails instance
16855 func NewSsoAddLoginUrlDetails(NewValue string) *SsoAddLoginUrlDetails {
16856 s := new(SsoAddLoginUrlDetails)
16857 s.NewValue = NewValue
16858 return s
16859 }
16860
16861 // SsoAddLoginUrlType : has no documentation (yet)
16862 type SsoAddLoginUrlType struct {
16863 // Description : has no documentation (yet)
16864 Description string `json:"description"`
16865 }
16866
16867 // NewSsoAddLoginUrlType returns a new SsoAddLoginUrlType instance
16868 func NewSsoAddLoginUrlType(Description string) *SsoAddLoginUrlType {
16869 s := new(SsoAddLoginUrlType)
16870 s.Description = Description
16871 return s
16872 }
16873
16874 // SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
16875 type SsoAddLogoutUrlDetails struct {
16876 // NewValue : New single sign-on logout URL. Might be missing due to
16877 // historical data gap.
16878 NewValue string `json:"new_value,omitempty"`
16879 }
16880
16881 // NewSsoAddLogoutUrlDetails returns a new SsoAddLogoutUrlDetails instance
16882 func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails {
16883 s := new(SsoAddLogoutUrlDetails)
16884 return s
16885 }
16886
16887 // SsoAddLogoutUrlType : has no documentation (yet)
16888 type SsoAddLogoutUrlType struct {
16889 // Description : has no documentation (yet)
16890 Description string `json:"description"`
16891 }
16892
16893 // NewSsoAddLogoutUrlType returns a new SsoAddLogoutUrlType instance
16894 func NewSsoAddLogoutUrlType(Description string) *SsoAddLogoutUrlType {
16895 s := new(SsoAddLogoutUrlType)
16896 s.Description = Description
16897 return s
16898 }
16899
16900 // SsoChangeCertDetails : Changed X.509 certificate for SSO.
16901 type SsoChangeCertDetails struct {
16902 // PreviousCertificateDetails : Previous SSO certificate details. Might be
16903 // missing due to historical data gap.
16904 PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"`
16905 // NewCertificateDetails : New SSO certificate details.
16906 NewCertificateDetails *Certificate `json:"new_certificate_details"`
16907 }
16908
16909 // NewSsoChangeCertDetails returns a new SsoChangeCertDetails instance
16910 func NewSsoChangeCertDetails(NewCertificateDetails *Certificate) *SsoChangeCertDetails {
16911 s := new(SsoChangeCertDetails)
16912 s.NewCertificateDetails = NewCertificateDetails
16913 return s
16914 }
16915
16916 // SsoChangeCertType : has no documentation (yet)
16917 type SsoChangeCertType struct {
16918 // Description : has no documentation (yet)
16919 Description string `json:"description"`
16920 }
16921
16922 // NewSsoChangeCertType returns a new SsoChangeCertType instance
16923 func NewSsoChangeCertType(Description string) *SsoChangeCertType {
16924 s := new(SsoChangeCertType)
16925 s.Description = Description
16926 return s
16927 }
16928
16929 // SsoChangeLoginUrlDetails : Changed sign-in URL for SSO.
16930 type SsoChangeLoginUrlDetails struct {
16931 // PreviousValue : Previous single sign-on login URL.
16932 PreviousValue string `json:"previous_value"`
16933 // NewValue : New single sign-on login URL.
16934 NewValue string `json:"new_value"`
16935 }
16936
16937 // NewSsoChangeLoginUrlDetails returns a new SsoChangeLoginUrlDetails instance
16938 func NewSsoChangeLoginUrlDetails(PreviousValue string, NewValue string) *SsoChangeLoginUrlDetails {
16939 s := new(SsoChangeLoginUrlDetails)
16940 s.PreviousValue = PreviousValue
16941 s.NewValue = NewValue
16942 return s
16943 }
16944
16945 // SsoChangeLoginUrlType : has no documentation (yet)
16946 type SsoChangeLoginUrlType struct {
16947 // Description : has no documentation (yet)
16948 Description string `json:"description"`
16949 }
16950
16951 // NewSsoChangeLoginUrlType returns a new SsoChangeLoginUrlType instance
16952 func NewSsoChangeLoginUrlType(Description string) *SsoChangeLoginUrlType {
16953 s := new(SsoChangeLoginUrlType)
16954 s.Description = Description
16955 return s
16956 }
16957
16958 // SsoChangeLogoutUrlDetails : Changed sign-out URL for SSO.
16959 type SsoChangeLogoutUrlDetails struct {
16960 // PreviousValue : Previous single sign-on logout URL. Might be missing due
16961 // to historical data gap.
16962 PreviousValue string `json:"previous_value,omitempty"`
16963 // NewValue : New single sign-on logout URL. Might be missing due to
16964 // historical data gap.
16965 NewValue string `json:"new_value,omitempty"`
16966 }
16967
16968 // NewSsoChangeLogoutUrlDetails returns a new SsoChangeLogoutUrlDetails instance
16969 func NewSsoChangeLogoutUrlDetails() *SsoChangeLogoutUrlDetails {
16970 s := new(SsoChangeLogoutUrlDetails)
16971 return s
16972 }
16973
16974 // SsoChangeLogoutUrlType : has no documentation (yet)
16975 type SsoChangeLogoutUrlType struct {
16976 // Description : has no documentation (yet)
16977 Description string `json:"description"`
16978 }
16979
16980 // NewSsoChangeLogoutUrlType returns a new SsoChangeLogoutUrlType instance
16981 func NewSsoChangeLogoutUrlType(Description string) *SsoChangeLogoutUrlType {
16982 s := new(SsoChangeLogoutUrlType)
16983 s.Description = Description
16984 return s
16985 }
16986
16987 // SsoChangePolicyDetails : Changed single sign-on setting for team.
16988 type SsoChangePolicyDetails struct {
16989 // NewValue : New single sign-on policy.
16990 NewValue *team_policies.SsoPolicy `json:"new_value"`
16991 // PreviousValue : Previous single sign-on policy. Might be missing due to
16992 // historical data gap.
16993 PreviousValue *team_policies.SsoPolicy `json:"previous_value,omitempty"`
16994 }
16995
16996 // NewSsoChangePolicyDetails returns a new SsoChangePolicyDetails instance
16997 func NewSsoChangePolicyDetails(NewValue *team_policies.SsoPolicy) *SsoChangePolicyDetails {
16998 s := new(SsoChangePolicyDetails)
16999 s.NewValue = NewValue
17000 return s
17001 }
17002
17003 // SsoChangePolicyType : has no documentation (yet)
17004 type SsoChangePolicyType struct {
17005 // Description : has no documentation (yet)
17006 Description string `json:"description"`
17007 }
17008
17009 // NewSsoChangePolicyType returns a new SsoChangePolicyType instance
17010 func NewSsoChangePolicyType(Description string) *SsoChangePolicyType {
17011 s := new(SsoChangePolicyType)
17012 s.Description = Description
17013 return s
17014 }
17015
17016 // SsoChangeSamlIdentityModeDetails : Changed SAML identity mode for SSO.
17017 type SsoChangeSamlIdentityModeDetails struct {
17018 // PreviousValue : Previous single sign-on identity mode.
17019 PreviousValue int64 `json:"previous_value"`
17020 // NewValue : New single sign-on identity mode.
17021 NewValue int64 `json:"new_value"`
17022 }
17023
17024 // NewSsoChangeSamlIdentityModeDetails returns a new SsoChangeSamlIdentityModeDetails instance
17025 func NewSsoChangeSamlIdentityModeDetails(PreviousValue int64, NewValue int64) *SsoChangeSamlIdentityModeDetails {
17026 s := new(SsoChangeSamlIdentityModeDetails)
17027 s.PreviousValue = PreviousValue
17028 s.NewValue = NewValue
17029 return s
17030 }
17031
17032 // SsoChangeSamlIdentityModeType : has no documentation (yet)
17033 type SsoChangeSamlIdentityModeType struct {
17034 // Description : has no documentation (yet)
17035 Description string `json:"description"`
17036 }
17037
17038 // NewSsoChangeSamlIdentityModeType returns a new SsoChangeSamlIdentityModeType instance
17039 func NewSsoChangeSamlIdentityModeType(Description string) *SsoChangeSamlIdentityModeType {
17040 s := new(SsoChangeSamlIdentityModeType)
17041 s.Description = Description
17042 return s
17043 }
17044
17045 // SsoErrorDetails : Failed to sign in via SSO.
17046 type SsoErrorDetails struct {
17047 // ErrorDetails : Error details.
17048 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
17049 }
17050
17051 // NewSsoErrorDetails returns a new SsoErrorDetails instance
17052 func NewSsoErrorDetails(ErrorDetails *FailureDetailsLogInfo) *SsoErrorDetails {
17053 s := new(SsoErrorDetails)
17054 s.ErrorDetails = ErrorDetails
17055 return s
17056 }
17057
17058 // SsoErrorType : has no documentation (yet)
17059 type SsoErrorType struct {
17060 // Description : has no documentation (yet)
17061 Description string `json:"description"`
17062 }
17063
17064 // NewSsoErrorType returns a new SsoErrorType instance
17065 func NewSsoErrorType(Description string) *SsoErrorType {
17066 s := new(SsoErrorType)
17067 s.Description = Description
17068 return s
17069 }
17070
17071 // SsoRemoveCertDetails : Removed X.509 certificate for SSO.
17072 type SsoRemoveCertDetails struct {
17073 }
17074
17075 // NewSsoRemoveCertDetails returns a new SsoRemoveCertDetails instance
17076 func NewSsoRemoveCertDetails() *SsoRemoveCertDetails {
17077 s := new(SsoRemoveCertDetails)
17078 return s
17079 }
17080
17081 // SsoRemoveCertType : has no documentation (yet)
17082 type SsoRemoveCertType struct {
17083 // Description : has no documentation (yet)
17084 Description string `json:"description"`
17085 }
17086
17087 // NewSsoRemoveCertType returns a new SsoRemoveCertType instance
17088 func NewSsoRemoveCertType(Description string) *SsoRemoveCertType {
17089 s := new(SsoRemoveCertType)
17090 s.Description = Description
17091 return s
17092 }
17093
17094 // SsoRemoveLoginUrlDetails : Removed sign-in URL for SSO.
17095 type SsoRemoveLoginUrlDetails struct {
17096 // PreviousValue : Previous single sign-on login URL.
17097 PreviousValue string `json:"previous_value"`
17098 }
17099
17100 // NewSsoRemoveLoginUrlDetails returns a new SsoRemoveLoginUrlDetails instance
17101 func NewSsoRemoveLoginUrlDetails(PreviousValue string) *SsoRemoveLoginUrlDetails {
17102 s := new(SsoRemoveLoginUrlDetails)
17103 s.PreviousValue = PreviousValue
17104 return s
17105 }
17106
17107 // SsoRemoveLoginUrlType : has no documentation (yet)
17108 type SsoRemoveLoginUrlType struct {
17109 // Description : has no documentation (yet)
17110 Description string `json:"description"`
17111 }
17112
17113 // NewSsoRemoveLoginUrlType returns a new SsoRemoveLoginUrlType instance
17114 func NewSsoRemoveLoginUrlType(Description string) *SsoRemoveLoginUrlType {
17115 s := new(SsoRemoveLoginUrlType)
17116 s.Description = Description
17117 return s
17118 }
17119
17120 // SsoRemoveLogoutUrlDetails : Removed sign-out URL for SSO.
17121 type SsoRemoveLogoutUrlDetails struct {
17122 // PreviousValue : Previous single sign-on logout URL.
17123 PreviousValue string `json:"previous_value"`
17124 }
17125
17126 // NewSsoRemoveLogoutUrlDetails returns a new SsoRemoveLogoutUrlDetails instance
17127 func NewSsoRemoveLogoutUrlDetails(PreviousValue string) *SsoRemoveLogoutUrlDetails {
17128 s := new(SsoRemoveLogoutUrlDetails)
17129 s.PreviousValue = PreviousValue
17130 return s
17131 }
17132
17133 // SsoRemoveLogoutUrlType : has no documentation (yet)
17134 type SsoRemoveLogoutUrlType struct {
17135 // Description : has no documentation (yet)
17136 Description string `json:"description"`
17137 }
17138
17139 // NewSsoRemoveLogoutUrlType returns a new SsoRemoveLogoutUrlType instance
17140 func NewSsoRemoveLogoutUrlType(Description string) *SsoRemoveLogoutUrlType {
17141 s := new(SsoRemoveLogoutUrlType)
17142 s.Description = Description
17143 return s
17144 }
17145
17146 // TeamActivityCreateReportDetails : Created team activity report.
17147 type TeamActivityCreateReportDetails struct {
17148 // StartDate : Report start date.
17149 StartDate time.Time `json:"start_date"`
17150 // EndDate : Report end date.
17151 EndDate time.Time `json:"end_date"`
17152 }
17153
17154 // NewTeamActivityCreateReportDetails returns a new TeamActivityCreateReportDetails instance
17155 func NewTeamActivityCreateReportDetails(StartDate time.Time, EndDate time.Time) *TeamActivityCreateReportDetails {
17156 s := new(TeamActivityCreateReportDetails)
17157 s.StartDate = StartDate
17158 s.EndDate = EndDate
17159 return s
17160 }
17161
17162 // TeamActivityCreateReportType : has no documentation (yet)
17163 type TeamActivityCreateReportType struct {
17164 // Description : has no documentation (yet)
17165 Description string `json:"description"`
17166 }
17167
17168 // NewTeamActivityCreateReportType returns a new TeamActivityCreateReportType instance
17169 func NewTeamActivityCreateReportType(Description string) *TeamActivityCreateReportType {
17170 s := new(TeamActivityCreateReportType)
17171 s.Description = Description
17172 return s
17173 }
17174
17175 // TeamEvent : An audit log event.
17176 type TeamEvent struct {
17177 // Timestamp : The Dropbox timestamp representing when the action was taken.
17178 Timestamp time.Time `json:"timestamp"`
17179 // EventCategory : The category that this type of action belongs to.
17180 EventCategory *EventCategory `json:"event_category"`
17181 // Actor : The entity who actually performed the action. Might be missing
17182 // due to historical data gap.
17183 Actor *ActorLogInfo `json:"actor,omitempty"`
17184 // Origin : The origin from which the actor performed the action including
17185 // information about host, ip address, location, session, etc. If the action
17186 // was performed programmatically via the API the origin represents the API
17187 // client.
17188 Origin *OriginLogInfo `json:"origin,omitempty"`
17189 // InvolveNonTeamMember : True if the action involved a non team member
17190 // either as the actor or as one of the affected users. Might be missing due
17191 // to historical data gap.
17192 InvolveNonTeamMember bool `json:"involve_non_team_member,omitempty"`
17193 // Context : The user or team on whose behalf the actor performed the
17194 // action. Might be missing due to historical data gap.
17195 Context *ContextLogInfo `json:"context,omitempty"`
17196 // Participants : Zero or more users and/or groups that are affected by the
17197 // action. Note that this list doesn't include any actors or users in
17198 // context.
17199 Participants []*ParticipantLogInfo `json:"participants,omitempty"`
17200 // Assets : Zero or more content assets involved in the action. Currently
17201 // these include Dropbox files and folders but in the future we might add
17202 // other asset types such as Paper documents, folders, projects, etc.
17203 Assets []*AssetLogInfo `json:"assets,omitempty"`
17204 // EventType : The particular type of action taken.
17205 EventType *EventType `json:"event_type"`
17206 // Details : The variable event schema applicable to this type of action,
17207 // instantiated with respect to this particular action.
17208 Details *EventDetails `json:"details"`
17209 }
17210
17211 // NewTeamEvent returns a new TeamEvent instance
17212 func NewTeamEvent(Timestamp time.Time, EventCategory *EventCategory, EventType *EventType, Details *EventDetails) *TeamEvent {
17213 s := new(TeamEvent)
17214 s.Timestamp = Timestamp
17215 s.EventCategory = EventCategory
17216 s.EventType = EventType
17217 s.Details = Details
17218 return s
17219 }
17220
17221 // TeamFolderChangeStatusDetails : Changed archival status of team folder.
17222 type TeamFolderChangeStatusDetails struct {
17223 // NewValue : New team folder status.
17224 NewValue *team.TeamFolderStatus `json:"new_value"`
17225 // PreviousValue : Previous team folder status. Might be missing due to
17226 // historical data gap.
17227 PreviousValue *team.TeamFolderStatus `json:"previous_value,omitempty"`
17228 }
17229
17230 // NewTeamFolderChangeStatusDetails returns a new TeamFolderChangeStatusDetails instance
17231 func NewTeamFolderChangeStatusDetails(NewValue *team.TeamFolderStatus) *TeamFolderChangeStatusDetails {
17232 s := new(TeamFolderChangeStatusDetails)
17233 s.NewValue = NewValue
17234 return s
17235 }
17236
17237 // TeamFolderChangeStatusType : has no documentation (yet)
17238 type TeamFolderChangeStatusType struct {
17239 // Description : has no documentation (yet)
17240 Description string `json:"description"`
17241 }
17242
17243 // NewTeamFolderChangeStatusType returns a new TeamFolderChangeStatusType instance
17244 func NewTeamFolderChangeStatusType(Description string) *TeamFolderChangeStatusType {
17245 s := new(TeamFolderChangeStatusType)
17246 s.Description = Description
17247 return s
17248 }
17249
17250 // TeamFolderCreateDetails : Created team folder in active status.
17251 type TeamFolderCreateDetails struct {
17252 }
17253
17254 // NewTeamFolderCreateDetails returns a new TeamFolderCreateDetails instance
17255 func NewTeamFolderCreateDetails() *TeamFolderCreateDetails {
17256 s := new(TeamFolderCreateDetails)
17257 return s
17258 }
17259
17260 // TeamFolderCreateType : has no documentation (yet)
17261 type TeamFolderCreateType struct {
17262 // Description : has no documentation (yet)
17263 Description string `json:"description"`
17264 }
17265
17266 // NewTeamFolderCreateType returns a new TeamFolderCreateType instance
17267 func NewTeamFolderCreateType(Description string) *TeamFolderCreateType {
17268 s := new(TeamFolderCreateType)
17269 s.Description = Description
17270 return s
17271 }
17272
17273 // TeamFolderDowngradeDetails : Downgraded team folder to regular shared folder.
17274 type TeamFolderDowngradeDetails struct {
17275 // TargetAssetIndex : Target asset position in the Assets list.
17276 TargetAssetIndex uint64 `json:"target_asset_index"`
17277 }
17278
17279 // NewTeamFolderDowngradeDetails returns a new TeamFolderDowngradeDetails instance
17280 func NewTeamFolderDowngradeDetails(TargetAssetIndex uint64) *TeamFolderDowngradeDetails {
17281 s := new(TeamFolderDowngradeDetails)
17282 s.TargetAssetIndex = TargetAssetIndex
17283 return s
17284 }
17285
17286 // TeamFolderDowngradeType : has no documentation (yet)
17287 type TeamFolderDowngradeType struct {
17288 // Description : has no documentation (yet)
17289 Description string `json:"description"`
17290 }
17291
17292 // NewTeamFolderDowngradeType returns a new TeamFolderDowngradeType instance
17293 func NewTeamFolderDowngradeType(Description string) *TeamFolderDowngradeType {
17294 s := new(TeamFolderDowngradeType)
17295 s.Description = Description
17296 return s
17297 }
17298
17299 // TeamFolderPermanentlyDeleteDetails : Permanently deleted archived team
17300 // folder.
17301 type TeamFolderPermanentlyDeleteDetails struct {
17302 }
17303
17304 // NewTeamFolderPermanentlyDeleteDetails returns a new TeamFolderPermanentlyDeleteDetails instance
17305 func NewTeamFolderPermanentlyDeleteDetails() *TeamFolderPermanentlyDeleteDetails {
17306 s := new(TeamFolderPermanentlyDeleteDetails)
17307 return s
17308 }
17309
17310 // TeamFolderPermanentlyDeleteType : has no documentation (yet)
17311 type TeamFolderPermanentlyDeleteType struct {
17312 // Description : has no documentation (yet)
17313 Description string `json:"description"`
17314 }
17315
17316 // NewTeamFolderPermanentlyDeleteType returns a new TeamFolderPermanentlyDeleteType instance
17317 func NewTeamFolderPermanentlyDeleteType(Description string) *TeamFolderPermanentlyDeleteType {
17318 s := new(TeamFolderPermanentlyDeleteType)
17319 s.Description = Description
17320 return s
17321 }
17322
17323 // TeamFolderRenameDetails : Renamed active/archived team folder.
17324 type TeamFolderRenameDetails struct {
17325 // PreviousFolderName : Previous folder name.
17326 PreviousFolderName string `json:"previous_folder_name"`
17327 // NewFolderName : New folder name.
17328 NewFolderName string `json:"new_folder_name"`
17329 }
17330
17331 // NewTeamFolderRenameDetails returns a new TeamFolderRenameDetails instance
17332 func NewTeamFolderRenameDetails(PreviousFolderName string, NewFolderName string) *TeamFolderRenameDetails {
17333 s := new(TeamFolderRenameDetails)
17334 s.PreviousFolderName = PreviousFolderName
17335 s.NewFolderName = NewFolderName
17336 return s
17337 }
17338
17339 // TeamFolderRenameType : has no documentation (yet)
17340 type TeamFolderRenameType struct {
17341 // Description : has no documentation (yet)
17342 Description string `json:"description"`
17343 }
17344
17345 // NewTeamFolderRenameType returns a new TeamFolderRenameType instance
17346 func NewTeamFolderRenameType(Description string) *TeamFolderRenameType {
17347 s := new(TeamFolderRenameType)
17348 s.Description = Description
17349 return s
17350 }
17351
17352 // TeamLinkedAppLogInfo : Team linked app
17353 type TeamLinkedAppLogInfo struct {
17354 AppLogInfo
17355 }
17356
17357 // NewTeamLinkedAppLogInfo returns a new TeamLinkedAppLogInfo instance
17358 func NewTeamLinkedAppLogInfo() *TeamLinkedAppLogInfo {
17359 s := new(TeamLinkedAppLogInfo)
17360 return s
17361 }
17362
17363 // TeamMemberLogInfo : Team member's logged information.
17364 type TeamMemberLogInfo struct {
17365 UserLogInfo
17366 // TeamMemberId : Team member ID. Might be missing due to historical data
17367 // gap.
17368 TeamMemberId string `json:"team_member_id,omitempty"`
17369 // MemberExternalId : Team member external ID.
17370 MemberExternalId string `json:"member_external_id,omitempty"`
17371 }
17372
17373 // NewTeamMemberLogInfo returns a new TeamMemberLogInfo instance
17374 func NewTeamMemberLogInfo() *TeamMemberLogInfo {
17375 s := new(TeamMemberLogInfo)
17376 return s
17377 }
17378
17379 // TeamMembershipType : has no documentation (yet)
17380 type TeamMembershipType struct {
17381 dropbox.Tagged
17382 }
17383
17384 // Valid tag values for TeamMembershipType
17385 const (
17386 TeamMembershipTypeFree = "free"
17387 TeamMembershipTypeFull = "full"
17388 TeamMembershipTypeOther = "other"
17389 )
17390
17391 // TeamMergeFromDetails : Merged another team into this team.
17392 type TeamMergeFromDetails struct {
17393 // TeamName : The name of the team that was merged into this team.
17394 TeamName string `json:"team_name"`
17395 }
17396
17397 // NewTeamMergeFromDetails returns a new TeamMergeFromDetails instance
17398 func NewTeamMergeFromDetails(TeamName string) *TeamMergeFromDetails {
17399 s := new(TeamMergeFromDetails)
17400 s.TeamName = TeamName
17401 return s
17402 }
17403
17404 // TeamMergeFromType : has no documentation (yet)
17405 type TeamMergeFromType struct {
17406 // Description : has no documentation (yet)
17407 Description string `json:"description"`
17408 }
17409
17410 // NewTeamMergeFromType returns a new TeamMergeFromType instance
17411 func NewTeamMergeFromType(Description string) *TeamMergeFromType {
17412 s := new(TeamMergeFromType)
17413 s.Description = Description
17414 return s
17415 }
17416
17417 // TeamMergeToDetails : Merged this team into another team.
17418 type TeamMergeToDetails struct {
17419 // TeamName : The name of the team that this team was merged into.
17420 TeamName string `json:"team_name"`
17421 }
17422
17423 // NewTeamMergeToDetails returns a new TeamMergeToDetails instance
17424 func NewTeamMergeToDetails(TeamName string) *TeamMergeToDetails {
17425 s := new(TeamMergeToDetails)
17426 s.TeamName = TeamName
17427 return s
17428 }
17429
17430 // TeamMergeToType : has no documentation (yet)
17431 type TeamMergeToType struct {
17432 // Description : has no documentation (yet)
17433 Description string `json:"description"`
17434 }
17435
17436 // NewTeamMergeToType returns a new TeamMergeToType instance
17437 func NewTeamMergeToType(Description string) *TeamMergeToType {
17438 s := new(TeamMergeToType)
17439 s.Description = Description
17440 return s
17441 }
17442
17443 // TeamName : Team name details
17444 type TeamName struct {
17445 // TeamDisplayName : Team's display name.
17446 TeamDisplayName string `json:"team_display_name"`
17447 // TeamLegalName : Team's legal name.
17448 TeamLegalName string `json:"team_legal_name"`
17449 }
17450
17451 // NewTeamName returns a new TeamName instance
17452 func NewTeamName(TeamDisplayName string, TeamLegalName string) *TeamName {
17453 s := new(TeamName)
17454 s.TeamDisplayName = TeamDisplayName
17455 s.TeamLegalName = TeamLegalName
17456 return s
17457 }
17458
17459 // TeamProfileAddLogoDetails : Added team logo to display on shared link
17460 // headers.
17461 type TeamProfileAddLogoDetails struct {
17462 }
17463
17464 // NewTeamProfileAddLogoDetails returns a new TeamProfileAddLogoDetails instance
17465 func NewTeamProfileAddLogoDetails() *TeamProfileAddLogoDetails {
17466 s := new(TeamProfileAddLogoDetails)
17467 return s
17468 }
17469
17470 // TeamProfileAddLogoType : has no documentation (yet)
17471 type TeamProfileAddLogoType struct {
17472 // Description : has no documentation (yet)
17473 Description string `json:"description"`
17474 }
17475
17476 // NewTeamProfileAddLogoType returns a new TeamProfileAddLogoType instance
17477 func NewTeamProfileAddLogoType(Description string) *TeamProfileAddLogoType {
17478 s := new(TeamProfileAddLogoType)
17479 s.Description = Description
17480 return s
17481 }
17482
17483 // TeamProfileChangeDefaultLanguageDetails : Changed default language for team.
17484 type TeamProfileChangeDefaultLanguageDetails struct {
17485 // NewValue : New team's default language.
17486 NewValue string `json:"new_value"`
17487 // PreviousValue : Previous team's default language.
17488 PreviousValue string `json:"previous_value"`
17489 }
17490
17491 // NewTeamProfileChangeDefaultLanguageDetails returns a new TeamProfileChangeDefaultLanguageDetails instance
17492 func NewTeamProfileChangeDefaultLanguageDetails(NewValue string, PreviousValue string) *TeamProfileChangeDefaultLanguageDetails {
17493 s := new(TeamProfileChangeDefaultLanguageDetails)
17494 s.NewValue = NewValue
17495 s.PreviousValue = PreviousValue
17496 return s
17497 }
17498
17499 // TeamProfileChangeDefaultLanguageType : has no documentation (yet)
17500 type TeamProfileChangeDefaultLanguageType struct {
17501 // Description : has no documentation (yet)
17502 Description string `json:"description"`
17503 }
17504
17505 // NewTeamProfileChangeDefaultLanguageType returns a new TeamProfileChangeDefaultLanguageType instance
17506 func NewTeamProfileChangeDefaultLanguageType(Description string) *TeamProfileChangeDefaultLanguageType {
17507 s := new(TeamProfileChangeDefaultLanguageType)
17508 s.Description = Description
17509 return s
17510 }
17511
17512 // TeamProfileChangeLogoDetails : Changed team logo displayed on shared link
17513 // headers.
17514 type TeamProfileChangeLogoDetails struct {
17515 }
17516
17517 // NewTeamProfileChangeLogoDetails returns a new TeamProfileChangeLogoDetails instance
17518 func NewTeamProfileChangeLogoDetails() *TeamProfileChangeLogoDetails {
17519 s := new(TeamProfileChangeLogoDetails)
17520 return s
17521 }
17522
17523 // TeamProfileChangeLogoType : has no documentation (yet)
17524 type TeamProfileChangeLogoType struct {
17525 // Description : has no documentation (yet)
17526 Description string `json:"description"`
17527 }
17528
17529 // NewTeamProfileChangeLogoType returns a new TeamProfileChangeLogoType instance
17530 func NewTeamProfileChangeLogoType(Description string) *TeamProfileChangeLogoType {
17531 s := new(TeamProfileChangeLogoType)
17532 s.Description = Description
17533 return s
17534 }
17535
17536 // TeamProfileChangeNameDetails : Changed team name.
17537 type TeamProfileChangeNameDetails struct {
17538 // PreviousValue : Previous teams name. Might be missing due to historical
17539 // data gap.
17540 PreviousValue *TeamName `json:"previous_value,omitempty"`
17541 // NewValue : New team name.
17542 NewValue *TeamName `json:"new_value"`
17543 }
17544
17545 // NewTeamProfileChangeNameDetails returns a new TeamProfileChangeNameDetails instance
17546 func NewTeamProfileChangeNameDetails(NewValue *TeamName) *TeamProfileChangeNameDetails {
17547 s := new(TeamProfileChangeNameDetails)
17548 s.NewValue = NewValue
17549 return s
17550 }
17551
17552 // TeamProfileChangeNameType : has no documentation (yet)
17553 type TeamProfileChangeNameType struct {
17554 // Description : has no documentation (yet)
17555 Description string `json:"description"`
17556 }
17557
17558 // NewTeamProfileChangeNameType returns a new TeamProfileChangeNameType instance
17559 func NewTeamProfileChangeNameType(Description string) *TeamProfileChangeNameType {
17560 s := new(TeamProfileChangeNameType)
17561 s.Description = Description
17562 return s
17563 }
17564
17565 // TeamProfileRemoveLogoDetails : Removed team logo displayed on shared link
17566 // headers.
17567 type TeamProfileRemoveLogoDetails struct {
17568 }
17569
17570 // NewTeamProfileRemoveLogoDetails returns a new TeamProfileRemoveLogoDetails instance
17571 func NewTeamProfileRemoveLogoDetails() *TeamProfileRemoveLogoDetails {
17572 s := new(TeamProfileRemoveLogoDetails)
17573 return s
17574 }
17575
17576 // TeamProfileRemoveLogoType : has no documentation (yet)
17577 type TeamProfileRemoveLogoType struct {
17578 // Description : has no documentation (yet)
17579 Description string `json:"description"`
17580 }
17581
17582 // NewTeamProfileRemoveLogoType returns a new TeamProfileRemoveLogoType instance
17583 func NewTeamProfileRemoveLogoType(Description string) *TeamProfileRemoveLogoType {
17584 s := new(TeamProfileRemoveLogoType)
17585 s.Description = Description
17586 return s
17587 }
17588
17589 // TeamSelectiveSyncPolicy : Policy for controlling whether team selective sync
17590 // is enabled for team.
17591 type TeamSelectiveSyncPolicy struct {
17592 dropbox.Tagged
17593 }
17594
17595 // Valid tag values for TeamSelectiveSyncPolicy
17596 const (
17597 TeamSelectiveSyncPolicyDisabled = "disabled"
17598 TeamSelectiveSyncPolicyEnabled = "enabled"
17599 TeamSelectiveSyncPolicyOther = "other"
17600 )
17601
17602 // TeamSelectiveSyncPolicyChangedDetails : Enabled/disabled Team Selective Sync
17603 // for team.
17604 type TeamSelectiveSyncPolicyChangedDetails struct {
17605 // NewValue : New Team Selective Sync policy.
17606 NewValue *TeamSelectiveSyncPolicy `json:"new_value"`
17607 // PreviousValue : Previous Team Selective Sync policy.
17608 PreviousValue *TeamSelectiveSyncPolicy `json:"previous_value"`
17609 }
17610
17611 // NewTeamSelectiveSyncPolicyChangedDetails returns a new TeamSelectiveSyncPolicyChangedDetails instance
17612 func NewTeamSelectiveSyncPolicyChangedDetails(NewValue *TeamSelectiveSyncPolicy, PreviousValue *TeamSelectiveSyncPolicy) *TeamSelectiveSyncPolicyChangedDetails {
17613 s := new(TeamSelectiveSyncPolicyChangedDetails)
17614 s.NewValue = NewValue
17615 s.PreviousValue = PreviousValue
17616 return s
17617 }
17618
17619 // TeamSelectiveSyncPolicyChangedType : has no documentation (yet)
17620 type TeamSelectiveSyncPolicyChangedType struct {
17621 // Description : has no documentation (yet)
17622 Description string `json:"description"`
17623 }
17624
17625 // NewTeamSelectiveSyncPolicyChangedType returns a new TeamSelectiveSyncPolicyChangedType instance
17626 func NewTeamSelectiveSyncPolicyChangedType(Description string) *TeamSelectiveSyncPolicyChangedType {
17627 s := new(TeamSelectiveSyncPolicyChangedType)
17628 s.Description = Description
17629 return s
17630 }
17631
17632 // TeamSelectiveSyncSettingsChangedDetails : Changed sync default.
17633 type TeamSelectiveSyncSettingsChangedDetails struct {
17634 // PreviousValue : Previous value.
17635 PreviousValue *files.SyncSetting `json:"previous_value"`
17636 // NewValue : New value.
17637 NewValue *files.SyncSetting `json:"new_value"`
17638 }
17639
17640 // NewTeamSelectiveSyncSettingsChangedDetails returns a new TeamSelectiveSyncSettingsChangedDetails instance
17641 func NewTeamSelectiveSyncSettingsChangedDetails(PreviousValue *files.SyncSetting, NewValue *files.SyncSetting) *TeamSelectiveSyncSettingsChangedDetails {
17642 s := new(TeamSelectiveSyncSettingsChangedDetails)
17643 s.PreviousValue = PreviousValue
17644 s.NewValue = NewValue
17645 return s
17646 }
17647
17648 // TeamSelectiveSyncSettingsChangedType : has no documentation (yet)
17649 type TeamSelectiveSyncSettingsChangedType struct {
17650 // Description : has no documentation (yet)
17651 Description string `json:"description"`
17652 }
17653
17654 // NewTeamSelectiveSyncSettingsChangedType returns a new TeamSelectiveSyncSettingsChangedType instance
17655 func NewTeamSelectiveSyncSettingsChangedType(Description string) *TeamSelectiveSyncSettingsChangedType {
17656 s := new(TeamSelectiveSyncSettingsChangedType)
17657 s.Description = Description
17658 return s
17659 }
17660
17661 // TfaAddBackupPhoneDetails : Added backup phone for two-step verification.
17662 type TfaAddBackupPhoneDetails struct {
17663 }
17664
17665 // NewTfaAddBackupPhoneDetails returns a new TfaAddBackupPhoneDetails instance
17666 func NewTfaAddBackupPhoneDetails() *TfaAddBackupPhoneDetails {
17667 s := new(TfaAddBackupPhoneDetails)
17668 return s
17669 }
17670
17671 // TfaAddBackupPhoneType : has no documentation (yet)
17672 type TfaAddBackupPhoneType struct {
17673 // Description : has no documentation (yet)
17674 Description string `json:"description"`
17675 }
17676
17677 // NewTfaAddBackupPhoneType returns a new TfaAddBackupPhoneType instance
17678 func NewTfaAddBackupPhoneType(Description string) *TfaAddBackupPhoneType {
17679 s := new(TfaAddBackupPhoneType)
17680 s.Description = Description
17681 return s
17682 }
17683
17684 // TfaAddSecurityKeyDetails : Added security key for two-step verification.
17685 type TfaAddSecurityKeyDetails struct {
17686 }
17687
17688 // NewTfaAddSecurityKeyDetails returns a new TfaAddSecurityKeyDetails instance
17689 func NewTfaAddSecurityKeyDetails() *TfaAddSecurityKeyDetails {
17690 s := new(TfaAddSecurityKeyDetails)
17691 return s
17692 }
17693
17694 // TfaAddSecurityKeyType : has no documentation (yet)
17695 type TfaAddSecurityKeyType struct {
17696 // Description : has no documentation (yet)
17697 Description string `json:"description"`
17698 }
17699
17700 // NewTfaAddSecurityKeyType returns a new TfaAddSecurityKeyType instance
17701 func NewTfaAddSecurityKeyType(Description string) *TfaAddSecurityKeyType {
17702 s := new(TfaAddSecurityKeyType)
17703 s.Description = Description
17704 return s
17705 }
17706
17707 // TfaChangeBackupPhoneDetails : Changed backup phone for two-step verification.
17708 type TfaChangeBackupPhoneDetails struct {
17709 }
17710
17711 // NewTfaChangeBackupPhoneDetails returns a new TfaChangeBackupPhoneDetails instance
17712 func NewTfaChangeBackupPhoneDetails() *TfaChangeBackupPhoneDetails {
17713 s := new(TfaChangeBackupPhoneDetails)
17714 return s
17715 }
17716
17717 // TfaChangeBackupPhoneType : has no documentation (yet)
17718 type TfaChangeBackupPhoneType struct {
17719 // Description : has no documentation (yet)
17720 Description string `json:"description"`
17721 }
17722
17723 // NewTfaChangeBackupPhoneType returns a new TfaChangeBackupPhoneType instance
17724 func NewTfaChangeBackupPhoneType(Description string) *TfaChangeBackupPhoneType {
17725 s := new(TfaChangeBackupPhoneType)
17726 s.Description = Description
17727 return s
17728 }
17729
17730 // TfaChangePolicyDetails : Changed two-step verification setting for team.
17731 type TfaChangePolicyDetails struct {
17732 // NewValue : New change policy.
17733 NewValue *team_policies.TwoStepVerificationPolicy `json:"new_value"`
17734 // PreviousValue : Previous change policy. Might be missing due to
17735 // historical data gap.
17736 PreviousValue *team_policies.TwoStepVerificationPolicy `json:"previous_value,omitempty"`
17737 }
17738
17739 // NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance
17740 func NewTfaChangePolicyDetails(NewValue *team_policies.TwoStepVerificationPolicy) *TfaChangePolicyDetails {
17741 s := new(TfaChangePolicyDetails)
17742 s.NewValue = NewValue
17743 return s
17744 }
17745
17746 // TfaChangePolicyType : has no documentation (yet)
17747 type TfaChangePolicyType struct {
17748 // Description : has no documentation (yet)
17749 Description string `json:"description"`
17750 }
17751
17752 // NewTfaChangePolicyType returns a new TfaChangePolicyType instance
17753 func NewTfaChangePolicyType(Description string) *TfaChangePolicyType {
17754 s := new(TfaChangePolicyType)
17755 s.Description = Description
17756 return s
17757 }
17758
17759 // TfaChangeStatusDetails : Enabled/disabled/changed two-step verification
17760 // setting.
17761 type TfaChangeStatusDetails struct {
17762 // NewValue : The new two factor authentication configuration.
17763 NewValue *TfaConfiguration `json:"new_value"`
17764 // PreviousValue : The previous two factor authentication configuration.
17765 // Might be missing due to historical data gap.
17766 PreviousValue *TfaConfiguration `json:"previous_value,omitempty"`
17767 // UsedRescueCode : Used two factor authentication rescue code. This flag is
17768 // relevant when the two factor authentication configuration is disabled.
17769 UsedRescueCode bool `json:"used_rescue_code,omitempty"`
17770 }
17771
17772 // NewTfaChangeStatusDetails returns a new TfaChangeStatusDetails instance
17773 func NewTfaChangeStatusDetails(NewValue *TfaConfiguration) *TfaChangeStatusDetails {
17774 s := new(TfaChangeStatusDetails)
17775 s.NewValue = NewValue
17776 return s
17777 }
17778
17779 // TfaChangeStatusType : has no documentation (yet)
17780 type TfaChangeStatusType struct {
17781 // Description : has no documentation (yet)
17782 Description string `json:"description"`
17783 }
17784
17785 // NewTfaChangeStatusType returns a new TfaChangeStatusType instance
17786 func NewTfaChangeStatusType(Description string) *TfaChangeStatusType {
17787 s := new(TfaChangeStatusType)
17788 s.Description = Description
17789 return s
17790 }
17791
17792 // TfaConfiguration : Two factor authentication configuration. Note: the enabled
17793 // option is deprecated.
17794 type TfaConfiguration struct {
17795 dropbox.Tagged
17796 }
17797
17798 // Valid tag values for TfaConfiguration
17799 const (
17800 TfaConfigurationDisabled = "disabled"
17801 TfaConfigurationEnabled = "enabled"
17802 TfaConfigurationSms = "sms"
17803 TfaConfigurationAuthenticator = "authenticator"
17804 TfaConfigurationOther = "other"
17805 )
17806
17807 // TfaRemoveBackupPhoneDetails : Removed backup phone for two-step verification.
17808 type TfaRemoveBackupPhoneDetails struct {
17809 }
17810
17811 // NewTfaRemoveBackupPhoneDetails returns a new TfaRemoveBackupPhoneDetails instance
17812 func NewTfaRemoveBackupPhoneDetails() *TfaRemoveBackupPhoneDetails {
17813 s := new(TfaRemoveBackupPhoneDetails)
17814 return s
17815 }
17816
17817 // TfaRemoveBackupPhoneType : has no documentation (yet)
17818 type TfaRemoveBackupPhoneType struct {
17819 // Description : has no documentation (yet)
17820 Description string `json:"description"`
17821 }
17822
17823 // NewTfaRemoveBackupPhoneType returns a new TfaRemoveBackupPhoneType instance
17824 func NewTfaRemoveBackupPhoneType(Description string) *TfaRemoveBackupPhoneType {
17825 s := new(TfaRemoveBackupPhoneType)
17826 s.Description = Description
17827 return s
17828 }
17829
17830 // TfaRemoveSecurityKeyDetails : Removed security key for two-step verification.
17831 type TfaRemoveSecurityKeyDetails struct {
17832 }
17833
17834 // NewTfaRemoveSecurityKeyDetails returns a new TfaRemoveSecurityKeyDetails instance
17835 func NewTfaRemoveSecurityKeyDetails() *TfaRemoveSecurityKeyDetails {
17836 s := new(TfaRemoveSecurityKeyDetails)
17837 return s
17838 }
17839
17840 // TfaRemoveSecurityKeyType : has no documentation (yet)
17841 type TfaRemoveSecurityKeyType struct {
17842 // Description : has no documentation (yet)
17843 Description string `json:"description"`
17844 }
17845
17846 // NewTfaRemoveSecurityKeyType returns a new TfaRemoveSecurityKeyType instance
17847 func NewTfaRemoveSecurityKeyType(Description string) *TfaRemoveSecurityKeyType {
17848 s := new(TfaRemoveSecurityKeyType)
17849 s.Description = Description
17850 return s
17851 }
17852
17853 // TfaResetDetails : Reset two-step verification for team member.
17854 type TfaResetDetails struct {
17855 }
17856
17857 // NewTfaResetDetails returns a new TfaResetDetails instance
17858 func NewTfaResetDetails() *TfaResetDetails {
17859 s := new(TfaResetDetails)
17860 return s
17861 }
17862
17863 // TfaResetType : has no documentation (yet)
17864 type TfaResetType struct {
17865 // Description : has no documentation (yet)
17866 Description string `json:"description"`
17867 }
17868
17869 // NewTfaResetType returns a new TfaResetType instance
17870 func NewTfaResetType(Description string) *TfaResetType {
17871 s := new(TfaResetType)
17872 s.Description = Description
17873 return s
17874 }
17875
17876 // TimeUnit : has no documentation (yet)
17877 type TimeUnit struct {
17878 dropbox.Tagged
17879 }
17880
17881 // Valid tag values for TimeUnit
17882 const (
17883 TimeUnitMilliseconds = "milliseconds"
17884 TimeUnitSeconds = "seconds"
17885 TimeUnitMinutes = "minutes"
17886 TimeUnitHours = "hours"
17887 TimeUnitDays = "days"
17888 TimeUnitWeeks = "weeks"
17889 TimeUnitMonths = "months"
17890 TimeUnitYears = "years"
17891 TimeUnitOther = "other"
17892 )
17893
17894 // TrustedNonTeamMemberLogInfo : User that is not a member of the team but
17895 // considered trusted.
17896 type TrustedNonTeamMemberLogInfo struct {
17897 UserLogInfo
17898 // TrustedNonTeamMemberType : Indicates the type of the trusted non team
17899 // member user.
17900 TrustedNonTeamMemberType *TrustedNonTeamMemberType `json:"trusted_non_team_member_type"`
17901 }
17902
17903 // NewTrustedNonTeamMemberLogInfo returns a new TrustedNonTeamMemberLogInfo instance
17904 func NewTrustedNonTeamMemberLogInfo(TrustedNonTeamMemberType *TrustedNonTeamMemberType) *TrustedNonTeamMemberLogInfo {
17905 s := new(TrustedNonTeamMemberLogInfo)
17906 s.TrustedNonTeamMemberType = TrustedNonTeamMemberType
17907 return s
17908 }
17909
17910 // TrustedNonTeamMemberType : has no documentation (yet)
17911 type TrustedNonTeamMemberType struct {
17912 dropbox.Tagged
17913 }
17914
17915 // Valid tag values for TrustedNonTeamMemberType
17916 const (
17917 TrustedNonTeamMemberTypeMultiInstanceAdmin = "multi_instance_admin"
17918 TrustedNonTeamMemberTypeOther = "other"
17919 )
17920
17921 // TwoAccountChangePolicyDetails : Enabled/disabled option for members to link
17922 // personal Dropbox account and team account to same computer.
17923 type TwoAccountChangePolicyDetails struct {
17924 // NewValue : New two account policy.
17925 NewValue *TwoAccountPolicy `json:"new_value"`
17926 // PreviousValue : Previous two account policy. Might be missing due to
17927 // historical data gap.
17928 PreviousValue *TwoAccountPolicy `json:"previous_value,omitempty"`
17929 }
17930
17931 // NewTwoAccountChangePolicyDetails returns a new TwoAccountChangePolicyDetails instance
17932 func NewTwoAccountChangePolicyDetails(NewValue *TwoAccountPolicy) *TwoAccountChangePolicyDetails {
17933 s := new(TwoAccountChangePolicyDetails)
17934 s.NewValue = NewValue
17935 return s
17936 }
17937
17938 // TwoAccountChangePolicyType : has no documentation (yet)
17939 type TwoAccountChangePolicyType struct {
17940 // Description : has no documentation (yet)
17941 Description string `json:"description"`
17942 }
17943
17944 // NewTwoAccountChangePolicyType returns a new TwoAccountChangePolicyType instance
17945 func NewTwoAccountChangePolicyType(Description string) *TwoAccountChangePolicyType {
17946 s := new(TwoAccountChangePolicyType)
17947 s.Description = Description
17948 return s
17949 }
17950
17951 // TwoAccountPolicy : Policy for pairing personal account to work account
17952 type TwoAccountPolicy struct {
17953 dropbox.Tagged
17954 }
17955
17956 // Valid tag values for TwoAccountPolicy
17957 const (
17958 TwoAccountPolicyDisabled = "disabled"
17959 TwoAccountPolicyEnabled = "enabled"
17960 TwoAccountPolicyOther = "other"
17961 )
17962
17963 // UserLinkedAppLogInfo : User linked app
17964 type UserLinkedAppLogInfo struct {
17965 AppLogInfo
17966 }
17967
17968 // NewUserLinkedAppLogInfo returns a new UserLinkedAppLogInfo instance
17969 func NewUserLinkedAppLogInfo() *UserLinkedAppLogInfo {
17970 s := new(UserLinkedAppLogInfo)
17971 return s
17972 }
17973
17974 // UserNameLogInfo : User's name logged information
17975 type UserNameLogInfo struct {
17976 // GivenName : Given name.
17977 GivenName string `json:"given_name"`
17978 // Surname : Surname.
17979 Surname string `json:"surname"`
17980 // Locale : Locale. Might be missing due to historical data gap.
17981 Locale string `json:"locale,omitempty"`
17982 }
17983
17984 // NewUserNameLogInfo returns a new UserNameLogInfo instance
17985 func NewUserNameLogInfo(GivenName string, Surname string) *UserNameLogInfo {
17986 s := new(UserNameLogInfo)
17987 s.GivenName = GivenName
17988 s.Surname = Surname
17989 return s
17990 }
17991
17992 // UserOrTeamLinkedAppLogInfo : User or team linked app. Used when linked type
17993 // is missing due to historical data gap.
17994 type UserOrTeamLinkedAppLogInfo struct {
17995 AppLogInfo
17996 }
17997
17998 // NewUserOrTeamLinkedAppLogInfo returns a new UserOrTeamLinkedAppLogInfo instance
17999 func NewUserOrTeamLinkedAppLogInfo() *UserOrTeamLinkedAppLogInfo {
18000 s := new(UserOrTeamLinkedAppLogInfo)
18001 return s
18002 }
18003
18004 // ViewerInfoPolicyChangedDetails : Changed team policy for viewer info.
18005 type ViewerInfoPolicyChangedDetails struct {
18006 // PreviousValue : Previous Viewer Info policy.
18007 PreviousValue *PassPolicy `json:"previous_value"`
18008 // NewValue : New Viewer Info policy.
18009 NewValue *PassPolicy `json:"new_value"`
18010 }
18011
18012 // NewViewerInfoPolicyChangedDetails returns a new ViewerInfoPolicyChangedDetails instance
18013 func NewViewerInfoPolicyChangedDetails(PreviousValue *PassPolicy, NewValue *PassPolicy) *ViewerInfoPolicyChangedDetails {
18014 s := new(ViewerInfoPolicyChangedDetails)
18015 s.PreviousValue = PreviousValue
18016 s.NewValue = NewValue
18017 return s
18018 }
18019
18020 // ViewerInfoPolicyChangedType : has no documentation (yet)
18021 type ViewerInfoPolicyChangedType struct {
18022 // Description : has no documentation (yet)
18023 Description string `json:"description"`
18024 }
18025
18026 // NewViewerInfoPolicyChangedType returns a new ViewerInfoPolicyChangedType instance
18027 func NewViewerInfoPolicyChangedType(Description string) *ViewerInfoPolicyChangedType {
18028 s := new(ViewerInfoPolicyChangedType)
18029 s.Description = Description
18030 return s
18031 }
18032
18033 // WebDeviceSessionLogInfo : Information on active web sessions
18034 type WebDeviceSessionLogInfo struct {
18035 DeviceSessionLogInfo
18036 // SessionInfo : Web session unique id. Might be missing due to historical
18037 // data gap.
18038 SessionInfo *WebSessionLogInfo `json:"session_info,omitempty"`
18039 // UserAgent : Information on the hosting device.
18040 UserAgent string `json:"user_agent"`
18041 // Os : Information on the hosting operating system.
18042 Os string `json:"os"`
18043 // Browser : Information on the browser used for this web session.
18044 Browser string `json:"browser"`
18045 }
18046
18047 // NewWebDeviceSessionLogInfo returns a new WebDeviceSessionLogInfo instance
18048 func NewWebDeviceSessionLogInfo(UserAgent string, Os string, Browser string) *WebDeviceSessionLogInfo {
18049 s := new(WebDeviceSessionLogInfo)
18050 s.UserAgent = UserAgent
18051 s.Os = Os
18052 s.Browser = Browser
18053 return s
18054 }
18055
18056 // WebSessionLogInfo : Web session.
18057 type WebSessionLogInfo struct {
18058 SessionLogInfo
18059 }
18060
18061 // NewWebSessionLogInfo returns a new WebSessionLogInfo instance
18062 func NewWebSessionLogInfo() *WebSessionLogInfo {
18063 s := new(WebSessionLogInfo)
18064 return s
18065 }
18066
18067 // WebSessionsChangeFixedLengthPolicyDetails : Changed how long members can stay
18068 // signed in to Dropbox.com.
18069 type WebSessionsChangeFixedLengthPolicyDetails struct {
18070 // NewValue : New session length policy. Might be missing due to historical
18071 // data gap.
18072 NewValue *WebSessionsFixedLengthPolicy `json:"new_value,omitempty"`
18073 // PreviousValue : Previous session length policy. Might be missing due to
18074 // historical data gap.
18075 PreviousValue *WebSessionsFixedLengthPolicy `json:"previous_value,omitempty"`
18076 }
18077
18078 // NewWebSessionsChangeFixedLengthPolicyDetails returns a new WebSessionsChangeFixedLengthPolicyDetails instance
18079 func NewWebSessionsChangeFixedLengthPolicyDetails() *WebSessionsChangeFixedLengthPolicyDetails {
18080 s := new(WebSessionsChangeFixedLengthPolicyDetails)
18081 return s
18082 }
18083
18084 // WebSessionsChangeFixedLengthPolicyType : has no documentation (yet)
18085 type WebSessionsChangeFixedLengthPolicyType struct {
18086 // Description : has no documentation (yet)
18087 Description string `json:"description"`
18088 }
18089
18090 // NewWebSessionsChangeFixedLengthPolicyType returns a new WebSessionsChangeFixedLengthPolicyType instance
18091 func NewWebSessionsChangeFixedLengthPolicyType(Description string) *WebSessionsChangeFixedLengthPolicyType {
18092 s := new(WebSessionsChangeFixedLengthPolicyType)
18093 s.Description = Description
18094 return s
18095 }
18096
18097 // WebSessionsChangeIdleLengthPolicyDetails : Changed how long team members can
18098 // be idle while signed in to Dropbox.com.
18099 type WebSessionsChangeIdleLengthPolicyDetails struct {
18100 // NewValue : New idle length policy. Might be missing due to historical
18101 // data gap.
18102 NewValue *WebSessionsIdleLengthPolicy `json:"new_value,omitempty"`
18103 // PreviousValue : Previous idle length policy. Might be missing due to
18104 // historical data gap.
18105 PreviousValue *WebSessionsIdleLengthPolicy `json:"previous_value,omitempty"`
18106 }
18107
18108 // NewWebSessionsChangeIdleLengthPolicyDetails returns a new WebSessionsChangeIdleLengthPolicyDetails instance
18109 func NewWebSessionsChangeIdleLengthPolicyDetails() *WebSessionsChangeIdleLengthPolicyDetails {
18110 s := new(WebSessionsChangeIdleLengthPolicyDetails)
18111 return s
18112 }
18113
18114 // WebSessionsChangeIdleLengthPolicyType : has no documentation (yet)
18115 type WebSessionsChangeIdleLengthPolicyType struct {
18116 // Description : has no documentation (yet)
18117 Description string `json:"description"`
18118 }
18119
18120 // NewWebSessionsChangeIdleLengthPolicyType returns a new WebSessionsChangeIdleLengthPolicyType instance
18121 func NewWebSessionsChangeIdleLengthPolicyType(Description string) *WebSessionsChangeIdleLengthPolicyType {
18122 s := new(WebSessionsChangeIdleLengthPolicyType)
18123 s.Description = Description
18124 return s
18125 }
18126
18127 // WebSessionsFixedLengthPolicy : Web sessions fixed length policy.
18128 type WebSessionsFixedLengthPolicy struct {
18129 dropbox.Tagged
18130 // Defined : Defined fixed session length.
18131 Defined *DurationLogInfo `json:"defined,omitempty"`
18132 }
18133
18134 // Valid tag values for WebSessionsFixedLengthPolicy
18135 const (
18136 WebSessionsFixedLengthPolicyDefined = "defined"
18137 WebSessionsFixedLengthPolicyUndefined = "undefined"
18138 WebSessionsFixedLengthPolicyOther = "other"
18139 )
18140
18141 // UnmarshalJSON deserializes into a WebSessionsFixedLengthPolicy instance
18142 func (u *WebSessionsFixedLengthPolicy) UnmarshalJSON(body []byte) error {
18143 type wrap struct {
18144 dropbox.Tagged
18145 // Defined : Defined fixed session length.
18146 Defined json.RawMessage `json:"defined,omitempty"`
18147 }
18148 var w wrap
18149 var err error
18150 if err = json.Unmarshal(body, &w); err != nil {
18151 return err
18152 }
18153 u.Tag = w.Tag
18154 switch u.Tag {
18155 case "defined":
18156 err = json.Unmarshal(body, &u.Defined)
18157
18158 if err != nil {
18159 return err
18160 }
18161 }
18162 return nil
18163 }
18164
18165 // WebSessionsIdleLengthPolicy : Web sessions idle length policy.
18166 type WebSessionsIdleLengthPolicy struct {
18167 dropbox.Tagged
18168 // Defined : Defined idle session length.
18169 Defined *DurationLogInfo `json:"defined,omitempty"`
18170 }
18171
18172 // Valid tag values for WebSessionsIdleLengthPolicy
18173 const (
18174 WebSessionsIdleLengthPolicyDefined = "defined"
18175 WebSessionsIdleLengthPolicyUndefined = "undefined"
18176 WebSessionsIdleLengthPolicyOther = "other"
18177 )
18178
18179 // UnmarshalJSON deserializes into a WebSessionsIdleLengthPolicy instance
18180 func (u *WebSessionsIdleLengthPolicy) UnmarshalJSON(body []byte) error {
18181 type wrap struct {
18182 dropbox.Tagged
18183 // Defined : Defined idle session length.
18184 Defined json.RawMessage `json:"defined,omitempty"`
18185 }
18186 var w wrap
18187 var err error
18188 if err = json.Unmarshal(body, &w); err != nil {
18189 return err
18190 }
18191 u.Tag = w.Tag
18192 switch u.Tag {
18193 case "defined":
18194 err = json.Unmarshal(body, &u.Defined)
18195
18196 if err != nil {
18197 return err
18198 }
18199 }
18200 return nil
18201 }
+0
-280
dropbox/team_policies/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_policies : has no documentation (yet)
21 package team_policies
22
23 import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
24
25 // CameraUploadsPolicyState : has no documentation (yet)
26 type CameraUploadsPolicyState struct {
27 dropbox.Tagged
28 }
29
30 // Valid tag values for CameraUploadsPolicyState
31 const (
32 CameraUploadsPolicyStateDisabled = "disabled"
33 CameraUploadsPolicyStateEnabled = "enabled"
34 CameraUploadsPolicyStateOther = "other"
35 )
36
37 // EmmState : has no documentation (yet)
38 type EmmState struct {
39 dropbox.Tagged
40 }
41
42 // Valid tag values for EmmState
43 const (
44 EmmStateDisabled = "disabled"
45 EmmStateOptional = "optional"
46 EmmStateRequired = "required"
47 EmmStateOther = "other"
48 )
49
50 // GroupCreation : has no documentation (yet)
51 type GroupCreation struct {
52 dropbox.Tagged
53 }
54
55 // Valid tag values for GroupCreation
56 const (
57 GroupCreationAdminsAndMembers = "admins_and_members"
58 GroupCreationAdminsOnly = "admins_only"
59 )
60
61 // OfficeAddInPolicy : has no documentation (yet)
62 type OfficeAddInPolicy struct {
63 dropbox.Tagged
64 }
65
66 // Valid tag values for OfficeAddInPolicy
67 const (
68 OfficeAddInPolicyDisabled = "disabled"
69 OfficeAddInPolicyEnabled = "enabled"
70 OfficeAddInPolicyOther = "other"
71 )
72
73 // PaperDeploymentPolicy : has no documentation (yet)
74 type PaperDeploymentPolicy struct {
75 dropbox.Tagged
76 }
77
78 // Valid tag values for PaperDeploymentPolicy
79 const (
80 PaperDeploymentPolicyFull = "full"
81 PaperDeploymentPolicyPartial = "partial"
82 PaperDeploymentPolicyOther = "other"
83 )
84
85 // PaperEnabledPolicy : has no documentation (yet)
86 type PaperEnabledPolicy struct {
87 dropbox.Tagged
88 }
89
90 // Valid tag values for PaperEnabledPolicy
91 const (
92 PaperEnabledPolicyDisabled = "disabled"
93 PaperEnabledPolicyEnabled = "enabled"
94 PaperEnabledPolicyUnspecified = "unspecified"
95 PaperEnabledPolicyOther = "other"
96 )
97
98 // PasswordStrengthPolicy : has no documentation (yet)
99 type PasswordStrengthPolicy struct {
100 dropbox.Tagged
101 }
102
103 // Valid tag values for PasswordStrengthPolicy
104 const (
105 PasswordStrengthPolicyMinimalRequirements = "minimal_requirements"
106 PasswordStrengthPolicyModeratePassword = "moderate_password"
107 PasswordStrengthPolicyStrongPassword = "strong_password"
108 PasswordStrengthPolicyOther = "other"
109 )
110
111 // RolloutMethod : has no documentation (yet)
112 type RolloutMethod struct {
113 dropbox.Tagged
114 }
115
116 // Valid tag values for RolloutMethod
117 const (
118 RolloutMethodUnlinkAll = "unlink_all"
119 RolloutMethodUnlinkMostInactive = "unlink_most_inactive"
120 RolloutMethodAddMemberToExceptions = "add_member_to_exceptions"
121 )
122
123 // SharedFolderJoinPolicy : Policy governing which shared folders a team member
124 // can join.
125 type SharedFolderJoinPolicy struct {
126 dropbox.Tagged
127 }
128
129 // Valid tag values for SharedFolderJoinPolicy
130 const (
131 SharedFolderJoinPolicyFromTeamOnly = "from_team_only"
132 SharedFolderJoinPolicyFromAnyone = "from_anyone"
133 SharedFolderJoinPolicyOther = "other"
134 )
135
136 // SharedFolderMemberPolicy : Policy governing who can be a member of a folder
137 // shared by a team member.
138 type SharedFolderMemberPolicy struct {
139 dropbox.Tagged
140 }
141
142 // Valid tag values for SharedFolderMemberPolicy
143 const (
144 SharedFolderMemberPolicyTeam = "team"
145 SharedFolderMemberPolicyAnyone = "anyone"
146 SharedFolderMemberPolicyOther = "other"
147 )
148
149 // SharedLinkCreatePolicy : Policy governing the visibility of shared links.
150 // This policy can apply to newly created shared links, or all shared links.
151 type SharedLinkCreatePolicy struct {
152 dropbox.Tagged
153 }
154
155 // Valid tag values for SharedLinkCreatePolicy
156 const (
157 SharedLinkCreatePolicyDefaultPublic = "default_public"
158 SharedLinkCreatePolicyDefaultTeamOnly = "default_team_only"
159 SharedLinkCreatePolicyTeamOnly = "team_only"
160 SharedLinkCreatePolicyOther = "other"
161 )
162
163 // ShowcaseDownloadPolicy : has no documentation (yet)
164 type ShowcaseDownloadPolicy struct {
165 dropbox.Tagged
166 }
167
168 // Valid tag values for ShowcaseDownloadPolicy
169 const (
170 ShowcaseDownloadPolicyDisabled = "disabled"
171 ShowcaseDownloadPolicyEnabled = "enabled"
172 ShowcaseDownloadPolicyOther = "other"
173 )
174
175 // ShowcaseEnabledPolicy : has no documentation (yet)
176 type ShowcaseEnabledPolicy struct {
177 dropbox.Tagged
178 }
179
180 // Valid tag values for ShowcaseEnabledPolicy
181 const (
182 ShowcaseEnabledPolicyDisabled = "disabled"
183 ShowcaseEnabledPolicyEnabled = "enabled"
184 ShowcaseEnabledPolicyOther = "other"
185 )
186
187 // ShowcaseExternalSharingPolicy : has no documentation (yet)
188 type ShowcaseExternalSharingPolicy struct {
189 dropbox.Tagged
190 }
191
192 // Valid tag values for ShowcaseExternalSharingPolicy
193 const (
194 ShowcaseExternalSharingPolicyDisabled = "disabled"
195 ShowcaseExternalSharingPolicyEnabled = "enabled"
196 ShowcaseExternalSharingPolicyOther = "other"
197 )
198
199 // SmartSyncPolicy : has no documentation (yet)
200 type SmartSyncPolicy struct {
201 dropbox.Tagged
202 }
203
204 // Valid tag values for SmartSyncPolicy
205 const (
206 SmartSyncPolicyLocal = "local"
207 SmartSyncPolicyOnDemand = "on_demand"
208 SmartSyncPolicyOther = "other"
209 )
210
211 // SsoPolicy : has no documentation (yet)
212 type SsoPolicy struct {
213 dropbox.Tagged
214 }
215
216 // Valid tag values for SsoPolicy
217 const (
218 SsoPolicyDisabled = "disabled"
219 SsoPolicyOptional = "optional"
220 SsoPolicyRequired = "required"
221 SsoPolicyOther = "other"
222 )
223
224 // TeamMemberPolicies : Policies governing team members.
225 type TeamMemberPolicies struct {
226 // Sharing : Policies governing sharing.
227 Sharing *TeamSharingPolicies `json:"sharing"`
228 // EmmState : This describes the Enterprise Mobility Management (EMM) state
229 // for this team. This information can be used to understand if an
230 // organization is integrating with a third-party EMM vendor to further
231 // manage and apply restrictions upon the team's Dropbox usage on mobile
232 // devices. This is a new feature and in the future we'll be adding more new
233 // fields and additional documentation.
234 EmmState *EmmState `json:"emm_state"`
235 // OfficeAddin : The admin policy around the Dropbox Office Add-In for this
236 // team.
237 OfficeAddin *OfficeAddInPolicy `json:"office_addin"`
238 }
239
240 // NewTeamMemberPolicies returns a new TeamMemberPolicies instance
241 func NewTeamMemberPolicies(Sharing *TeamSharingPolicies, EmmState *EmmState, OfficeAddin *OfficeAddInPolicy) *TeamMemberPolicies {
242 s := new(TeamMemberPolicies)
243 s.Sharing = Sharing
244 s.EmmState = EmmState
245 s.OfficeAddin = OfficeAddin
246 return s
247 }
248
249 // TeamSharingPolicies : Policies governing sharing within and outside of the
250 // team.
251 type TeamSharingPolicies struct {
252 // SharedFolderMemberPolicy : Who can join folders shared by team members.
253 SharedFolderMemberPolicy *SharedFolderMemberPolicy `json:"shared_folder_member_policy"`
254 // SharedFolderJoinPolicy : Which shared folders team members can join.
255 SharedFolderJoinPolicy *SharedFolderJoinPolicy `json:"shared_folder_join_policy"`
256 // SharedLinkCreatePolicy : Who can view shared links owned by team members.
257 SharedLinkCreatePolicy *SharedLinkCreatePolicy `json:"shared_link_create_policy"`
258 }
259
260 // NewTeamSharingPolicies returns a new TeamSharingPolicies instance
261 func NewTeamSharingPolicies(SharedFolderMemberPolicy *SharedFolderMemberPolicy, SharedFolderJoinPolicy *SharedFolderJoinPolicy, SharedLinkCreatePolicy *SharedLinkCreatePolicy) *TeamSharingPolicies {
262 s := new(TeamSharingPolicies)
263 s.SharedFolderMemberPolicy = SharedFolderMemberPolicy
264 s.SharedFolderJoinPolicy = SharedFolderJoinPolicy
265 s.SharedLinkCreatePolicy = SharedLinkCreatePolicy
266 return s
267 }
268
269 // TwoStepVerificationPolicy : has no documentation (yet)
270 type TwoStepVerificationPolicy struct {
271 dropbox.Tagged
272 }
273
274 // Valid tag values for TwoStepVerificationPolicy
275 const (
276 TwoStepVerificationPolicyRequireTfaEnable = "require_tfa_enable"
277 TwoStepVerificationPolicyRequireTfaDisable = "require_tfa_disable"
278 TwoStepVerificationPolicyOther = "other"
279 )
+0
-301
dropbox/users/client.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package users
21
22 import (
23 "bytes"
24 "encoding/json"
25 "io/ioutil"
26 "net/http"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // GetAccount : Get information about a user's account.
35 GetAccount(arg *GetAccountArg) (res *BasicAccount, err error)
36 // GetAccountBatch : Get information about multiple user accounts. At most
37 // 300 accounts may be queried per request.
38 GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error)
39 // GetCurrentAccount : Get information about the current user's account.
40 GetCurrentAccount() (res *FullAccount, err error)
41 // GetSpaceUsage : Get the space usage information for the current user's
42 // account.
43 GetSpaceUsage() (res *SpaceUsage, err error)
44 }
45
46 type apiImpl dropbox.Context
47
48 //GetAccountAPIError is an error-wrapper for the get_account route
49 type GetAccountAPIError struct {
50 dropbox.APIError
51 EndpointError *GetAccountError `json:"error"`
52 }
53
54 func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) {
55 cli := dbx.Client
56
57 dbx.Config.LogDebug("arg: %v", arg)
58 b, err := json.Marshal(arg)
59 if err != nil {
60 return
61 }
62
63 headers := map[string]string{
64 "Content-Type": "application/json",
65 }
66 if dbx.Config.AsMemberID != "" {
67 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
68 }
69
70 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_account", headers, bytes.NewReader(b))
71 if err != nil {
72 return
73 }
74 dbx.Config.LogInfo("req: %v", req)
75
76 resp, err := cli.Do(req)
77 if err != nil {
78 return
79 }
80
81 dbx.Config.LogInfo("resp: %v", resp)
82 defer resp.Body.Close()
83 body, err := ioutil.ReadAll(resp.Body)
84 if err != nil {
85 return
86 }
87
88 dbx.Config.LogDebug("body: %s", body)
89 if resp.StatusCode == http.StatusOK {
90 err = json.Unmarshal(body, &res)
91 if err != nil {
92 return
93 }
94
95 return
96 }
97 if resp.StatusCode == http.StatusConflict {
98 var apiError GetAccountAPIError
99 err = json.Unmarshal(body, &apiError)
100 if err != nil {
101 return
102 }
103 err = apiError
104 return
105 }
106 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
107 if err != nil {
108 return
109 }
110 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
111 return
112 }
113
114 //GetAccountBatchAPIError is an error-wrapper for the get_account_batch route
115 type GetAccountBatchAPIError struct {
116 dropbox.APIError
117 EndpointError *GetAccountBatchError `json:"error"`
118 }
119
120 func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) {
121 cli := dbx.Client
122
123 dbx.Config.LogDebug("arg: %v", arg)
124 b, err := json.Marshal(arg)
125 if err != nil {
126 return
127 }
128
129 headers := map[string]string{
130 "Content-Type": "application/json",
131 }
132 if dbx.Config.AsMemberID != "" {
133 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
134 }
135
136 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_account_batch", headers, bytes.NewReader(b))
137 if err != nil {
138 return
139 }
140 dbx.Config.LogInfo("req: %v", req)
141
142 resp, err := cli.Do(req)
143 if err != nil {
144 return
145 }
146
147 dbx.Config.LogInfo("resp: %v", resp)
148 defer resp.Body.Close()
149 body, err := ioutil.ReadAll(resp.Body)
150 if err != nil {
151 return
152 }
153
154 dbx.Config.LogDebug("body: %s", body)
155 if resp.StatusCode == http.StatusOK {
156 err = json.Unmarshal(body, &res)
157 if err != nil {
158 return
159 }
160
161 return
162 }
163 if resp.StatusCode == http.StatusConflict {
164 var apiError GetAccountBatchAPIError
165 err = json.Unmarshal(body, &apiError)
166 if err != nil {
167 return
168 }
169 err = apiError
170 return
171 }
172 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
173 if err != nil {
174 return
175 }
176 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
177 return
178 }
179
180 //GetCurrentAccountAPIError is an error-wrapper for the get_current_account route
181 type GetCurrentAccountAPIError struct {
182 dropbox.APIError
183 EndpointError struct{} `json:"error"`
184 }
185
186 func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) {
187 cli := dbx.Client
188
189 headers := map[string]string{}
190 if dbx.Config.AsMemberID != "" {
191 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
192 }
193
194 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_current_account", headers, nil)
195 if err != nil {
196 return
197 }
198 dbx.Config.LogInfo("req: %v", req)
199
200 resp, err := cli.Do(req)
201 if err != nil {
202 return
203 }
204
205 dbx.Config.LogInfo("resp: %v", resp)
206 defer resp.Body.Close()
207 body, err := ioutil.ReadAll(resp.Body)
208 if err != nil {
209 return
210 }
211
212 dbx.Config.LogDebug("body: %s", body)
213 if resp.StatusCode == http.StatusOK {
214 err = json.Unmarshal(body, &res)
215 if err != nil {
216 return
217 }
218
219 return
220 }
221 if resp.StatusCode == http.StatusConflict {
222 var apiError GetCurrentAccountAPIError
223 err = json.Unmarshal(body, &apiError)
224 if err != nil {
225 return
226 }
227 err = apiError
228 return
229 }
230 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
231 if err != nil {
232 return
233 }
234 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
235 return
236 }
237
238 //GetSpaceUsageAPIError is an error-wrapper for the get_space_usage route
239 type GetSpaceUsageAPIError struct {
240 dropbox.APIError
241 EndpointError struct{} `json:"error"`
242 }
243
244 func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
245 cli := dbx.Client
246
247 headers := map[string]string{}
248 if dbx.Config.AsMemberID != "" {
249 headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID
250 }
251
252 req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_space_usage", headers, nil)
253 if err != nil {
254 return
255 }
256 dbx.Config.LogInfo("req: %v", req)
257
258 resp, err := cli.Do(req)
259 if err != nil {
260 return
261 }
262
263 dbx.Config.LogInfo("resp: %v", resp)
264 defer resp.Body.Close()
265 body, err := ioutil.ReadAll(resp.Body)
266 if err != nil {
267 return
268 }
269
270 dbx.Config.LogDebug("body: %s", body)
271 if resp.StatusCode == http.StatusOK {
272 err = json.Unmarshal(body, &res)
273 if err != nil {
274 return
275 }
276
277 return
278 }
279 if resp.StatusCode == http.StatusConflict {
280 var apiError GetSpaceUsageAPIError
281 err = json.Unmarshal(body, &apiError)
282 if err != nil {
283 return
284 }
285 err = apiError
286 return
287 }
288 err = auth.HandleCommonAuthErrors(dbx.Config, resp, body)
289 if err != nil {
290 return
291 }
292 err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)
293 return
294 }
295
296 // New returns a Client implementation for this namespace
297 func New(c dropbox.Config) Client {
298 ctx := apiImpl(dropbox.NewContext(c))
299 return &ctx
300 }
+0
-443
dropbox/users/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package users : This namespace contains endpoints and data types for user
21 // management.
22 package users
23
24 import (
25 "encoding/json"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common"
32 )
33
34 // Account : The amount of detail revealed about an account depends on the user
35 // being queried and the user making the query.
36 type Account struct {
37 // AccountId : The user's unique Dropbox ID.
38 AccountId string `json:"account_id"`
39 // Name : Details of a user's name.
40 Name *Name `json:"name"`
41 // Email : The user's e-mail address. Do not rely on this without checking
42 // the `email_verified` field. Even then, it's possible that the user has
43 // since lost access to their e-mail.
44 Email string `json:"email"`
45 // EmailVerified : Whether the user has verified their e-mail address.
46 EmailVerified bool `json:"email_verified"`
47 // ProfilePhotoUrl : URL for the photo representing the user, if one is set.
48 ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
49 // Disabled : Whether the user has been disabled.
50 Disabled bool `json:"disabled"`
51 }
52
53 // NewAccount returns a new Account instance
54 func NewAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool) *Account {
55 s := new(Account)
56 s.AccountId = AccountId
57 s.Name = Name
58 s.Email = Email
59 s.EmailVerified = EmailVerified
60 s.Disabled = Disabled
61 return s
62 }
63
64 // BasicAccount : Basic information about any account.
65 type BasicAccount struct {
66 Account
67 // IsTeammate : Whether this user is a teammate of the current user. If this
68 // account is the current user's account, then this will be true.
69 IsTeammate bool `json:"is_teammate"`
70 // TeamMemberId : The user's unique team member id. This field will only be
71 // present if the user is part of a team and `is_teammate` is true.
72 TeamMemberId string `json:"team_member_id,omitempty"`
73 }
74
75 // NewBasicAccount returns a new BasicAccount instance
76 func NewBasicAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, IsTeammate bool) *BasicAccount {
77 s := new(BasicAccount)
78 s.AccountId = AccountId
79 s.Name = Name
80 s.Email = Email
81 s.EmailVerified = EmailVerified
82 s.Disabled = Disabled
83 s.IsTeammate = IsTeammate
84 return s
85 }
86
87 // FullAccount : Detailed information about the current user's account.
88 type FullAccount struct {
89 Account
90 // Country : The user's two-letter country code, if available. Country codes
91 // are based on `ISO 3166-1` <http://en.wikipedia.org/wiki/ISO_3166-1>.
92 Country string `json:"country,omitempty"`
93 // Locale : The language that the user specified. Locale tags will be `IETF
94 // language tags` <http://en.wikipedia.org/wiki/IETF_language_tag>.
95 Locale string `json:"locale"`
96 // ReferralLink : The user's `referral link`
97 // <https://www.dropbox.com/referrals>.
98 ReferralLink string `json:"referral_link"`
99 // Team : If this account is a member of a team, information about that
100 // team.
101 Team *FullTeam `json:"team,omitempty"`
102 // TeamMemberId : This account's unique team member id. This field will only
103 // be present if `team` is present.
104 TeamMemberId string `json:"team_member_id,omitempty"`
105 // IsPaired : Whether the user has a personal and work account. If the
106 // current account is personal, then `team` will always be nil, but
107 // `is_paired` will indicate if a work account is linked.
108 IsPaired bool `json:"is_paired"`
109 // AccountType : What type of account this user has.
110 AccountType *users_common.AccountType `json:"account_type"`
111 // RootInfo : The root info for this account.
112 RootInfo common.IsRootInfo `json:"root_info"`
113 }
114
115 // NewFullAccount returns a new FullAccount instance
116 func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, Locale string, ReferralLink string, IsPaired bool, AccountType *users_common.AccountType, RootInfo common.IsRootInfo) *FullAccount {
117 s := new(FullAccount)
118 s.AccountId = AccountId
119 s.Name = Name
120 s.Email = Email
121 s.EmailVerified = EmailVerified
122 s.Disabled = Disabled
123 s.Locale = Locale
124 s.ReferralLink = ReferralLink
125 s.IsPaired = IsPaired
126 s.AccountType = AccountType
127 s.RootInfo = RootInfo
128 return s
129 }
130
131 // UnmarshalJSON deserializes into a FullAccount instance
132 func (u *FullAccount) UnmarshalJSON(b []byte) error {
133 type wrap struct {
134 // AccountId : The user's unique Dropbox ID.
135 AccountId string `json:"account_id"`
136 // Name : Details of a user's name.
137 Name *Name `json:"name"`
138 // Email : The user's e-mail address. Do not rely on this without
139 // checking the `email_verified` field. Even then, it's possible that
140 // the user has since lost access to their e-mail.
141 Email string `json:"email"`
142 // EmailVerified : Whether the user has verified their e-mail address.
143 EmailVerified bool `json:"email_verified"`
144 // Disabled : Whether the user has been disabled.
145 Disabled bool `json:"disabled"`
146 // Locale : The language that the user specified. Locale tags will be
147 // `IETF language tags`
148 // <http://en.wikipedia.org/wiki/IETF_language_tag>.
149 Locale string `json:"locale"`
150 // ReferralLink : The user's `referral link`
151 // <https://www.dropbox.com/referrals>.
152 ReferralLink string `json:"referral_link"`
153 // IsPaired : Whether the user has a personal and work account. If the
154 // current account is personal, then `team` will always be nil, but
155 // `is_paired` will indicate if a work account is linked.
156 IsPaired bool `json:"is_paired"`
157 // AccountType : What type of account this user has.
158 AccountType *users_common.AccountType `json:"account_type"`
159 // RootInfo : The root info for this account.
160 RootInfo json.RawMessage `json:"root_info"`
161 // ProfilePhotoUrl : URL for the photo representing the user, if one is
162 // set.
163 ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
164 // Country : The user's two-letter country code, if available. Country
165 // codes are based on `ISO 3166-1`
166 // <http://en.wikipedia.org/wiki/ISO_3166-1>.
167 Country string `json:"country,omitempty"`
168 // Team : If this account is a member of a team, information about that
169 // team.
170 Team *FullTeam `json:"team,omitempty"`
171 // TeamMemberId : This account's unique team member id. This field will
172 // only be present if `team` is present.
173 TeamMemberId string `json:"team_member_id,omitempty"`
174 }
175 var w wrap
176 if err := json.Unmarshal(b, &w); err != nil {
177 return err
178 }
179 u.AccountId = w.AccountId
180 u.Name = w.Name
181 u.Email = w.Email
182 u.EmailVerified = w.EmailVerified
183 u.Disabled = w.Disabled
184 u.Locale = w.Locale
185 u.ReferralLink = w.ReferralLink
186 u.IsPaired = w.IsPaired
187 u.AccountType = w.AccountType
188 RootInfo, err := common.IsRootInfoFromJSON(w.RootInfo)
189 if err != nil {
190 return err
191 }
192 u.RootInfo = RootInfo
193 u.ProfilePhotoUrl = w.ProfilePhotoUrl
194 u.Country = w.Country
195 u.Team = w.Team
196 u.TeamMemberId = w.TeamMemberId
197 return nil
198 }
199
200 // Team : Information about a team.
201 type Team struct {
202 // Id : The team's unique ID.
203 Id string `json:"id"`
204 // Name : The name of the team.
205 Name string `json:"name"`
206 }
207
208 // NewTeam returns a new Team instance
209 func NewTeam(Id string, Name string) *Team {
210 s := new(Team)
211 s.Id = Id
212 s.Name = Name
213 return s
214 }
215
216 // FullTeam : Detailed information about a team.
217 type FullTeam struct {
218 Team
219 // SharingPolicies : Team policies governing sharing.
220 SharingPolicies *team_policies.TeamSharingPolicies `json:"sharing_policies"`
221 // OfficeAddinPolicy : Team policy governing the use of the Office Add-In.
222 OfficeAddinPolicy *team_policies.OfficeAddInPolicy `json:"office_addin_policy"`
223 }
224
225 // NewFullTeam returns a new FullTeam instance
226 func NewFullTeam(Id string, Name string, SharingPolicies *team_policies.TeamSharingPolicies, OfficeAddinPolicy *team_policies.OfficeAddInPolicy) *FullTeam {
227 s := new(FullTeam)
228 s.Id = Id
229 s.Name = Name
230 s.SharingPolicies = SharingPolicies
231 s.OfficeAddinPolicy = OfficeAddinPolicy
232 return s
233 }
234
235 // GetAccountArg : has no documentation (yet)
236 type GetAccountArg struct {
237 // AccountId : A user's account identifier.
238 AccountId string `json:"account_id"`
239 }
240
241 // NewGetAccountArg returns a new GetAccountArg instance
242 func NewGetAccountArg(AccountId string) *GetAccountArg {
243 s := new(GetAccountArg)
244 s.AccountId = AccountId
245 return s
246 }
247
248 // GetAccountBatchArg : has no documentation (yet)
249 type GetAccountBatchArg struct {
250 // AccountIds : List of user account identifiers. Should not contain any
251 // duplicate account IDs.
252 AccountIds []string `json:"account_ids"`
253 }
254
255 // NewGetAccountBatchArg returns a new GetAccountBatchArg instance
256 func NewGetAccountBatchArg(AccountIds []string) *GetAccountBatchArg {
257 s := new(GetAccountBatchArg)
258 s.AccountIds = AccountIds
259 return s
260 }
261
262 // GetAccountBatchError : has no documentation (yet)
263 type GetAccountBatchError struct {
264 dropbox.Tagged
265 // NoAccount : The value is an account ID specified in
266 // `GetAccountBatchArg.account_ids` that does not exist.
267 NoAccount string `json:"no_account,omitempty"`
268 }
269
270 // Valid tag values for GetAccountBatchError
271 const (
272 GetAccountBatchErrorNoAccount = "no_account"
273 GetAccountBatchErrorOther = "other"
274 )
275
276 // UnmarshalJSON deserializes into a GetAccountBatchError instance
277 func (u *GetAccountBatchError) UnmarshalJSON(body []byte) error {
278 type wrap struct {
279 dropbox.Tagged
280 }
281 var w wrap
282 var err error
283 if err = json.Unmarshal(body, &w); err != nil {
284 return err
285 }
286 u.Tag = w.Tag
287 switch u.Tag {
288 case "no_account":
289 err = json.Unmarshal(body, &u.NoAccount)
290
291 if err != nil {
292 return err
293 }
294 }
295 return nil
296 }
297
298 // GetAccountError : has no documentation (yet)
299 type GetAccountError struct {
300 dropbox.Tagged
301 }
302
303 // Valid tag values for GetAccountError
304 const (
305 GetAccountErrorNoAccount = "no_account"
306 GetAccountErrorOther = "other"
307 )
308
309 // IndividualSpaceAllocation : has no documentation (yet)
310 type IndividualSpaceAllocation struct {
311 // Allocated : The total space allocated to the user's account (bytes).
312 Allocated uint64 `json:"allocated"`
313 }
314
315 // NewIndividualSpaceAllocation returns a new IndividualSpaceAllocation instance
316 func NewIndividualSpaceAllocation(Allocated uint64) *IndividualSpaceAllocation {
317 s := new(IndividualSpaceAllocation)
318 s.Allocated = Allocated
319 return s
320 }
321
322 // Name : Representations for a person's name to assist with
323 // internationalization.
324 type Name struct {
325 // GivenName : Also known as a first name.
326 GivenName string `json:"given_name"`
327 // Surname : Also known as a last name or family name.
328 Surname string `json:"surname"`
329 // FamiliarName : Locale-dependent name. In the US, a person's familiar name
330 // is their `given_name`, but elsewhere, it could be any combination of a
331 // person's `given_name` and `surname`.
332 FamiliarName string `json:"familiar_name"`
333 // DisplayName : A name that can be used directly to represent the name of a
334 // user's Dropbox account.
335 DisplayName string `json:"display_name"`
336 // AbbreviatedName : An abbreviated form of the person's name. Their
337 // initials in most locales.
338 AbbreviatedName string `json:"abbreviated_name"`
339 }
340
341 // NewName returns a new Name instance
342 func NewName(GivenName string, Surname string, FamiliarName string, DisplayName string, AbbreviatedName string) *Name {
343 s := new(Name)
344 s.GivenName = GivenName
345 s.Surname = Surname
346 s.FamiliarName = FamiliarName
347 s.DisplayName = DisplayName
348 s.AbbreviatedName = AbbreviatedName
349 return s
350 }
351
352 // SpaceAllocation : Space is allocated differently based on the type of
353 // account.
354 type SpaceAllocation struct {
355 dropbox.Tagged
356 // Individual : The user's space allocation applies only to their individual
357 // account.
358 Individual *IndividualSpaceAllocation `json:"individual,omitempty"`
359 // Team : The user shares space with other members of their team.
360 Team *TeamSpaceAllocation `json:"team,omitempty"`
361 }
362
363 // Valid tag values for SpaceAllocation
364 const (
365 SpaceAllocationIndividual = "individual"
366 SpaceAllocationTeam = "team"
367 SpaceAllocationOther = "other"
368 )
369
370 // UnmarshalJSON deserializes into a SpaceAllocation instance
371 func (u *SpaceAllocation) UnmarshalJSON(body []byte) error {
372 type wrap struct {
373 dropbox.Tagged
374 // Individual : The user's space allocation applies only to their
375 // individual account.
376 Individual json.RawMessage `json:"individual,omitempty"`
377 // Team : The user shares space with other members of their team.
378 Team json.RawMessage `json:"team,omitempty"`
379 }
380 var w wrap
381 var err error
382 if err = json.Unmarshal(body, &w); err != nil {
383 return err
384 }
385 u.Tag = w.Tag
386 switch u.Tag {
387 case "individual":
388 err = json.Unmarshal(body, &u.Individual)
389
390 if err != nil {
391 return err
392 }
393 case "team":
394 err = json.Unmarshal(body, &u.Team)
395
396 if err != nil {
397 return err
398 }
399 }
400 return nil
401 }
402
403 // SpaceUsage : Information about a user's space usage and quota.
404 type SpaceUsage struct {
405 // Used : The user's total space usage (bytes).
406 Used uint64 `json:"used"`
407 // Allocation : The user's space allocation.
408 Allocation *SpaceAllocation `json:"allocation"`
409 }
410
411 // NewSpaceUsage returns a new SpaceUsage instance
412 func NewSpaceUsage(Used uint64, Allocation *SpaceAllocation) *SpaceUsage {
413 s := new(SpaceUsage)
414 s.Used = Used
415 s.Allocation = Allocation
416 return s
417 }
418
419 // TeamSpaceAllocation : has no documentation (yet)
420 type TeamSpaceAllocation struct {
421 // Used : The total space currently used by the user's team (bytes).
422 Used uint64 `json:"used"`
423 // Allocated : The total space allocated to the user's team (bytes).
424 Allocated uint64 `json:"allocated"`
425 // UserWithinTeamSpaceAllocated : The total space allocated to the user
426 // within its team allocated space (0 means that no restriction is imposed
427 // on the user's quota within its team).
428 UserWithinTeamSpaceAllocated uint64 `json:"user_within_team_space_allocated"`
429 // UserWithinTeamSpaceLimitType : The type of the space limit imposed on the
430 // team member (off, alert_only, stop_sync).
431 UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType `json:"user_within_team_space_limit_type"`
432 }
433
434 // NewTeamSpaceAllocation returns a new TeamSpaceAllocation instance
435 func NewTeamSpaceAllocation(Used uint64, Allocated uint64, UserWithinTeamSpaceAllocated uint64, UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType) *TeamSpaceAllocation {
436 s := new(TeamSpaceAllocation)
437 s.Used = Used
438 s.Allocated = Allocated
439 s.UserWithinTeamSpaceAllocated = UserWithinTeamSpaceAllocated
440 s.UserWithinTeamSpaceLimitType = UserWithinTeamSpaceLimitType
441 return s
442 }
+0
-37
dropbox/users_common/types.go less more
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package users_common : This namespace contains common data types used within
21 // the users namespace.
22 package users_common
23
24 import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
25
26 // AccountType : What type of account this user has.
27 type AccountType struct {
28 dropbox.Tagged
29 }
30
31 // Valid tag values for AccountType
32 const (
33 AccountTypeBasic = "basic"
34 AccountTypePro = "pro"
35 AccountTypeBusiness = "business"
36 )
00 #! /usr/bin/env bash
11 set -euo pipefail
22
3 if [[ $# -gt 1 ]]; then
4 echo "$0: Not expecting any command-line arguments, got $#." 1>&2
3 if [[ $# -ne 1 ]]; then
4 echo "$0: Not expecting more than one command-line argument, got $#." 1>&2
55 exit 1
66 fi
77
8 version=$(echo $1 | cut -f1 -d'.')
89 loc=$(realpath -e $0)
910 base_dir=$(dirname "$loc")
1011 spec_dir="$base_dir/dropbox-api-spec"
11 gen_dir=$(dirname ${base_dir})/dropbox
12 gen_dir=$(dirname ${base_dir})/v$version/dropbox
1213
1314 stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
1415 stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
1516
1617 # Update SDK and API spec versions
17 sdk_version=${1:-"5.0.0"}
18 sdk_version=${1}
1819 pushd ${spec_dir}
1920 spec_version=$(git rev-parse --short HEAD)
2021 popd
2223 sed -i.bak -e "s/UNKNOWN SDK VERSION/${sdk_version}/" \
2324 -e "s/UNKNOWN SPEC VERSION/${spec_version}/" ${gen_dir}/sdk.go
2425 rm ${gen_dir}/sdk.go.bak
26 pushd ${gen_dir}
2527 goimports -l -w ${gen_dir}
28 popd
6767
6868 def _generate_route(self, namespace, route):
6969 out = self.emit
70
71 route_name = route.name
72 if route.version != 1:
73 route_name += '_v%d' % route.version
74
7075 fn = fmt_var(route.name)
7176 if route.version != 1:
7277 fn += 'V%d' % route.version
78
7379 err = fmt_type(route.error_data_type, namespace)
7480 out('//%sAPIError is an error-wrapper for the %s route' %
75 (fn, route.name))
81 (fn, route_name))
7682 with self.block('type {fn}APIError struct'.format(fn=fn)):
7783 out('dropbox.APIError')
7884 out('EndpointError {err} `json:"error"`'.format(err=err))
8490 if route.deprecated is not None:
8591 out('log.Printf("WARNING: API `%s` is deprecated")' % fn)
8692 if route.deprecated.by is not None:
87 out('log.Printf("Use API `%s` instead")' % fmt_var(route.deprecated.by.name))
93 replacement_fn = fmt_var(route.deprecated.by.name)
94 if route.deprecated.by.version != 1:
95 replacement_fn += "V%d" % route.deprecated.by.version
96 out('log.Printf("Use API `%s` instead")' % replacement_fn)
8897 out()
8998
90 out('cli := dbx.Client')
99 args = {
100 "Host": route.attrs.get('host', 'api'),
101 "Namespace": namespace.name,
102 "Route": route_name,
103 "Auth": route.attrs.get('auth', ''),
104 "Style": route.attrs.get('style', 'rpc'),
105 }
106
107 with self.block('req := dropbox.Request'):
108 for k, v in args.items():
109 out(k + ':"' + v + '",')
110
111 out("Arg: {arg},".format(arg="arg" if not is_void_type(route.arg_data_type) else "nil"))
112 out("ExtraHeaders: {headers},".format(
113 headers="arg.ExtraHeaders" if fmt_var(route.name) == "Download" else "nil"))
91114 out()
92115
93 self._generate_request(namespace, route)
94 self._generate_post()
95 self._generate_response(route)
96 ok_check = 'if resp.StatusCode == http.StatusOK'
97 if fn == "Download":
98 ok_check += ' || resp.StatusCode == http.StatusPartialContent'
99 with self.block(ok_check):
100 self._generate_result(route)
101 self._generate_error_handling(namespace, route)
116 out("var resp []byte")
117 out("var respBody io.ReadCloser")
118 out("resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, {body})".format(
119 body="content" if route.attrs.get('style', '') == 'upload' else "nil"))
120 with self.block("if err != nil"):
121 out("var appErr {fn}APIError".format(fn=fn))
122 out("err = {auth}ParseError(err, &appErr)".format(
123 auth="auth." if namespace.name != "auth" else ""))
124 with self.block("if err == &appErr"):
125 out("err = appErr")
126 out("return")
127 out()
102128
103 out()
129 if is_struct_type(route.result_data_type) and route.result_data_type.has_enumerated_subtypes():
130 out('var tmp %sUnion' % fmt_var(route.result_data_type.name, export=False))
131 with self.block('err = json.Unmarshal(resp, &tmp);'
132 'if err != nil'):
133 out('return')
134 with self.block('switch tmp.Tag'):
135 for t in route.result_data_type.get_enumerated_subtypes():
136 with self.block('case "%s":' % t.name, delim=(None, None)):
137 self.emit('res = tmp.%s' % fmt_var(t.name))
138 elif not is_void_type(route.result_data_type):
139 with self.block('err = json.Unmarshal(resp, &res);'
140 'if err != nil'):
141 out('return')
142 out()
143 else:
144 out("_ = resp")
104145
105 def _generate_request(self, namespace, route):
106 out = self.emit
107 auth = route.attrs.get('auth', '')
108 host = route.attrs.get('host', 'api')
109 style = route.attrs.get('style', 'rpc')
110
111 body = 'nil'
112 if not is_void_type(route.arg_data_type):
113 out('dbx.Config.LogDebug("arg: %v", arg)')
114
115 out('b, err := json.Marshal(arg)')
116 with self.block('if err != nil'):
117 out('return')
118 out()
119 if host != 'content':
120 body = 'bytes.NewReader(b)'
121 if style == 'upload':
122 body = 'content'
123
124 headers = {}
125 if not is_void_type(route.arg_data_type):
126 if host == 'content' or style in ['upload', 'download']:
127 headers["Dropbox-API-Arg"] = "string(b)"
146 if route.attrs.get('style', 'rpc') == "download":
147 out("content = respBody")
128148 else:
129 headers["Content-Type"] = '"application/json"'
130 if style == 'upload':
131 headers["Content-Type"] = '"application/octet-stream"'
132
133 out('headers := map[string]string{')
134 for k, v in sorted(headers.items()):
135 out('\t"{}": {},'.format(k, v))
136 out('}')
137 if fmt_var(route.name) == "Download":
138 out('for k, v := range arg.ExtraHeaders { headers[k] = v }')
139 if auth != 'noauth' and auth != 'team':
140 with self.block('if dbx.Config.AsMemberID != ""'):
141 out('headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID')
142 out()
143
144 fn = route.name
145 if route.version != 1:
146 fn += '_v%d' % route.version
147 authed = 'false' if auth == 'noauth' else 'true'
148 out('req, err := (*dropbox.Context)(dbx).NewRequest("{}", "{}", {}, "{}", "{}", headers, {})'.format(
149 host, style, authed, namespace.name, fn, body))
150 with self.block('if err != nil'):
151 out('return')
152
153 out('dbx.Config.LogInfo("req: %v", req)')
154
155 out()
156
157 def _generate_post(self):
158 out = self.emit
159
160 out('resp, err := cli.Do(req)')
161
162 with self.block('if err != nil'):
149 out("_ = respBody")
163150 out('return')
164151 out()
165
166 out('dbx.Config.LogInfo("resp: %v", resp)')
167
168 def _generate_response(self, route):
169 out = self.emit
170 style = route.attrs.get('style', 'rpc')
171 if style == 'download':
172 out('body := []byte(resp.Header.Get("Dropbox-API-Result"))')
173 out('content = resp.Body')
174 else:
175 out('defer resp.Body.Close()')
176 with self.block('body, err := ioutil.ReadAll(resp.Body);'
177 'if err != nil'):
178 out('return')
179 out()
180
181 out('dbx.Config.LogDebug("body: %s", body)')
182
183 def _generate_error_handling(self, namespace, route):
184 out = self.emit
185 style = route.attrs.get('style', 'rpc')
186 with self.block('if resp.StatusCode == http.StatusConflict'):
187 # If style was download, body was assigned to a header.
188 # Need to re-read the response body to parse the error
189 if style == 'download':
190 out('defer resp.Body.Close()')
191 with self.block('body, err = ioutil.ReadAll(resp.Body);'
192 'if err != nil'):
193 out('return')
194 out('var apiError %sAPIError' % fmt_var(route.name))
195 with self.block('err = json.Unmarshal(body, &apiError);'
196 'if err != nil'):
197 out('return')
198 out('err = apiError')
199 out('return')
200 auth_ns = "" if namespace.name == "auth" else "auth."
201 with self.block('err = %sHandleCommonAuthErrors(dbx.Config, resp, body);'
202 'if err != nil' % auth_ns):
203 out('return')
204 out('err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)')
205 out('return')
206
207 def _generate_result(self, route):
208 out = self.emit
209 if is_struct_type(route.result_data_type) and \
210 route.result_data_type.has_enumerated_subtypes():
211 out('var tmp %sUnion' % fmt_var(route.result_data_type.name, export=False))
212 with self.block('err = json.Unmarshal(body, &tmp);'
213 'if err != nil'):
214 out('return')
215 with self.block('switch tmp.Tag'):
216 for t in route.result_data_type.get_enumerated_subtypes():
217 with self.block('case "%s":' % t.name, delim=(None, None)):
218 self.emit('res = tmp.%s' % fmt_var(t.name))
219 elif not is_void_type(route.result_data_type):
220 with self.block('err = json.Unmarshal(body, &res);'
221 'if err != nil'):
222 out('return')
223 out()
224 out('return')
1111 unwrap_nullable,
1212 is_composite_type,
1313 is_list_type,
14 is_primitive_type,
1514 is_struct_type,
1615 Void,
1716 )
7170 def fmt_type(data_type, namespace=None, use_interface=False, raw=False):
7271 data_type, nullable = unwrap_nullable(data_type)
7372 if is_list_type(data_type):
74 if raw and is_primitive_type(data_type.data_type):
73 if raw and not _needs_base_type(data_type.data_type):
7574 return "json.RawMessage"
7675 return '[]%s' % fmt_type(data_type.data_type, namespace, use_interface, raw)
7776 if raw:
8584 if use_interface and _needs_base_type(data_type):
8685 return _type_table.get(data_type.__class__, type_name)
8786 else:
88 return _type_table.get(data_type.__class__, '*' + type_name)
87 if data_type.__class__ not in _type_table:
88 return '*' + type_name
89 if data_type.__class__ == Timestamp:
90 # For other primitive types, `omitempty` does the job.
91 return ('*' if nullable else '') + _type_table[data_type.__class__]
92 return _type_table[data_type.__class__]
8993
9094
9195 def fmt_var(name, export=True, check_reserved=False):
2020 package dropbox
2121
2222 import (
23 "bytes"
24 "context"
2325 "encoding/json"
26 "errors"
2427 "fmt"
2528 "io"
29 "io/ioutil"
2630 "log"
2731 "net/http"
28
29 "golang.org/x/net/context"
32 "strings"
33
3034 "golang.org/x/oauth2"
3135 )
3236
4347 // Version returns the current SDK version and API Spec version
4448 func Version() (string, string) {
4549 return sdkVersion, specVersion
50 }
51
52 // Tagged is used for tagged unions.
53 type Tagged struct {
54 Tag string `json:".tag"`
55 }
56
57 // APIError is the base type for endpoint-specific errors.
58 type APIError struct {
59 ErrorSummary string `json:"error_summary"`
60 }
61
62 func (e APIError) Error() string {
63 return e.ErrorSummary
64 }
65
66 type SDKInternalError struct {
67 StatusCode int
68 Content string
69 }
70
71 func (e SDKInternalError) Error() string {
72 return fmt.Sprintf("Unexpected error: %v (code: %v)", e.Content, e.StatusCode)
4673 }
4774
4875 // Config contains parameters for configuring the SDK.
5582 Logger *log.Logger
5683 // Used with APIs that support operations as another user
5784 AsMemberID string
85 // Path relative to which action should be taken
86 PathRoot string
5887 // No need to set -- for testing only
5988 Domain string
6089 // No need to set -- for testing only
6190 Client *http.Client
6291 // No need to set -- for testing only
63 HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string
92 HeaderGenerator func(hostType string, namespace string, route string) map[string]string
6493 // No need to set -- for testing only
65 URLGenerator func(hostType string, style string, namespace string, route string) string
94 URLGenerator func(hostType string, namespace string, route string) string
6695 }
6796
6897 // LogLevel defines a type that can set the desired level of logging the SDK will generate.
104133 c.doLog(LogInfo, format, v...)
105134 }
106135
136 // Ergonomic methods to set namespace relative to which action should be taken
137 func (c Config) WithNamespaceID(nsID string) Config {
138 c.PathRoot = fmt.Sprintf(`{".tag": "namespace_id", "namespace_id": "%s"}`, nsID)
139 return c
140 }
141
142 func (c Config) WithRoot(nsID string) Config {
143 c.PathRoot = fmt.Sprintf(`{".tag": "root", "root": "%s"}`, nsID)
144 return c
145 }
146
107147 // Context is the base client context used to implement per-namespace clients.
108148 type Context struct {
109149 Config Config
110150 Client *http.Client
111 HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string
112 URLGenerator func(hostType string, style string, namespace string, route string) string
113 }
114
115 // NewRequest returns an appropriate Request object for the given namespace/route.
116 func (c *Context) NewRequest(
117 hostType string,
118 style string,
119 authed bool,
120 namespace string,
121 route string,
122 headers map[string]string,
123 body io.Reader,
124 ) (*http.Request, error) {
125 url := c.URLGenerator(hostType, style, namespace, route)
126 req, err := http.NewRequest("POST", url, body)
151 NoAuthClient *http.Client
152 HeaderGenerator func(hostType string, namespace string, route string) map[string]string
153 URLGenerator func(hostType string, namespace string, route string) string
154 }
155
156 type Request struct {
157 Host string
158 Namespace string
159 Route string
160 Style string
161 Auth string
162
163 Arg interface{}
164 ExtraHeaders map[string]string
165 }
166
167 func (c *Context) Execute(req Request, body io.Reader) ([]byte, io.ReadCloser, error) {
168 url := c.URLGenerator(req.Host, req.Namespace, req.Route)
169 httpReq, err := http.NewRequest("POST", url, body)
127170 if err != nil {
128 return nil, err
129 }
130 for k, v := range headers {
131 req.Header.Add(k, v)
132 }
133 for k, v := range c.HeaderGenerator(hostType, style, namespace, route) {
134 req.Header.Add(k, v)
135 }
136 if req.Header.Get("Host") != "" {
137 req.Host = req.Header.Get("Host")
138 }
139 if !authed {
140 req.Header.Del("Authorization")
141 }
142 return req, nil
171 return nil, nil, err
172 }
173
174 for k, v := range req.ExtraHeaders {
175 httpReq.Header.Add(k, v)
176 }
177
178 for k, v := range c.HeaderGenerator(req.Host, req.Namespace, req.Route) {
179 httpReq.Header.Add(k, v)
180 }
181
182 if httpReq.Header.Get("Host") != "" {
183 httpReq.Host = httpReq.Header.Get("Host")
184 }
185
186 if req.Auth == "noauth" {
187 httpReq.Header.Del("Authorization")
188 }
189 if req.Auth != "team" && c.Config.AsMemberID != "" {
190 httpReq.Header.Add("Dropbox-API-Select-User", c.Config.AsMemberID)
191 }
192 if c.Config.PathRoot != "" {
193 httpReq.Header.Add("Dropbox-API-Path-Root", c.Config.PathRoot)
194 }
195
196 if req.Arg != nil {
197 serializedArg, err := json.Marshal(req.Arg)
198 if err != nil {
199 return nil, nil, err
200 }
201
202 switch req.Style {
203 case "rpc":
204 if body != nil {
205 return nil, nil, errors.New("RPC style requests can not have body")
206 }
207
208 httpReq.Header.Set("Content-Type", "application/json")
209 httpReq.Body = ioutil.NopCloser(bytes.NewReader(serializedArg))
210 httpReq.ContentLength = int64(len(serializedArg))
211 case "upload", "download":
212 httpReq.Header.Set("Dropbox-API-Arg", string(serializedArg))
213 httpReq.Header.Set("Content-Type", "application/octet-stream")
214 }
215 }
216
217 client := c.Client
218 if req.Auth == "noauth" {
219 client = c.NoAuthClient
220 }
221
222 resp, err := client.Do(httpReq)
223 if err != nil {
224 return nil, nil, err
225 }
226
227 if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent {
228 switch req.Style {
229 case "rpc", "upload":
230 if resp.Body == nil {
231 return nil, nil, errors.New("Expected body in RPC response, got nil")
232 }
233
234 b, err := ioutil.ReadAll(resp.Body)
235 resp.Body.Close()
236 if err != nil {
237 return nil, nil, err
238 }
239
240 return b, nil, nil
241 case "download":
242 b := []byte(resp.Header.Get("Dropbox-API-Result"))
243 return b, resp.Body, nil
244 }
245 }
246
247 b, err := ioutil.ReadAll(resp.Body)
248 resp.Body.Close()
249 if err != nil {
250 return nil, nil, err
251 }
252
253 return nil, nil, SDKInternalError{
254 StatusCode: resp.StatusCode,
255 Content: string(b),
256 }
143257 }
144258
145259 // NewContext returns a new Context with the given Config.
156270 client = conf.Client(context.Background(), tok)
157271 }
158272
273 noAuthClient := c.Client
274 if noAuthClient == nil {
275 noAuthClient = &http.Client{}
276 }
277
159278 headerGenerator := c.HeaderGenerator
160279 if headerGenerator == nil {
161 headerGenerator = func(hostType string, style string, namespace string, route string) map[string]string {
280 headerGenerator = func(hostType string, namespace string, route string) map[string]string {
162281 return map[string]string{}
163282 }
164283 }
170289 hostContent: hostContent + domain,
171290 hostNotify: hostNotify + domain,
172291 }
173 urlGenerator = func(hostType string, style string, namespace string, route string) string {
292 urlGenerator = func(hostType string, namespace string, route string) string {
174293 fqHost := hostMap[hostType]
175294 return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route)
176295 }
177296 }
178297
179 return Context{c, client, headerGenerator, urlGenerator}
298 return Context{c, client, noAuthClient, headerGenerator, urlGenerator}
180299 }
181300
182301 // OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain
192311 return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL}
193312 }
194313
195 // Tagged is used for tagged unions.
196 type Tagged struct {
197 Tag string `json:".tag"`
198 }
199
200 // APIError is the base type for endpoint-specific errors.
201 type APIError struct {
202 ErrorSummary string `json:"error_summary"`
203 }
204
205 func (e APIError) Error() string {
206 return e.ErrorSummary
207 }
208
209 // HandleCommonAPIErrors handles common API errors
210 func HandleCommonAPIErrors(c Config, resp *http.Response, body []byte) error {
211 var apiError APIError
212 if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError {
213 apiError.ErrorSummary = string(body)
214 return apiError
215 }
216 e := json.Unmarshal(body, &apiError)
217 if e != nil {
218 c.LogDebug("%v", e)
219 return e
220 }
221 return apiError
222 }
314 // HTTPHeaderSafeJSON encode the JSON passed in b []byte passed in in
315 // a way that is suitable for HTTP headers.
316 //
317 // See: https://www.dropbox.com/developers/reference/json-encoding
318 func HTTPHeaderSafeJSON(b []byte) string {
319 var s strings.Builder
320 s.Grow(len(b))
321 for _, r := range string(b) {
322 if r >= 0x007f {
323 fmt.Fprintf(&s, "\\u%04x", r)
324 } else {
325 s.WriteRune(r)
326 }
327 }
328 return s.String()
329 }
66 is_list_type,
77 is_nullable_type,
88 is_primitive_type,
9 is_string_type,
910 is_struct_type,
1011 is_union_type,
1112 is_void_type,
141142 default = field.default
142143 if is_boolean_type(field.data_type):
143144 default = str(default).lower()
145 if is_string_type(field.data_type):
146 default = '"{}"'.format(default)
144147 self.emit('s.{0} = {1}'.format(fmt_var(field.name), default))
145148 elif is_union_type(field.data_type):
146 self.emit('s.%s = &%s{Tagged:dropbox.Tagged{"%s"}}' %
149 self.emit('s.%s = &%s{Tagged:dropbox.Tagged{Tag: "%s"}}' %
147150 (fmt_var(field.name),
148151 fmt_type(field.data_type, struct.namespace).lstrip('*'),
149152 field.default.tag_name))
196199 with self.block('type wrap struct'):
197200 self.emit('dropbox.Tagged')
198201 for field in fields:
199 if is_void_type(field.data_type) or \
200 is_primitive_type(field.data_type):
202 if is_void_type(field.data_type) or (
203 is_struct_type(field.data_type) and not _needs_base_type(field.data_type)):
204 # pure structures are flattened in the containing union json blob and thus are loaded from body
201205 continue
206 # sub-unions must be handled as RawMessage, which will be loaded into correct implementation later
202207 self._generate_field(field, union_field=True,
203 namespace=namespace, raw=True)
208 namespace=namespace, raw=_needs_base_type(field.data_type))
204209 self.emit('var w wrap')
205210 self.emit('var err error')
206211 with self.block('if err = json.Unmarshal(body, &w); err != nil'):
212217 continue
213218 field_name = fmt_var(field.name)
214219 with self.block('case "%s":' % field.name, delim=(None, None)):
215 if is_union_type(field.data_type):
216 self.emit('err = json.Unmarshal(w.{0}, &u.{0})'
217 .format(field_name))
218 elif _needs_base_type(field.data_type):
219 self.emit("u.{0}, err = Is{1}FromJSON(body)"
220 if _needs_base_type(field.data_type):
221 self.emit("u.{0}, err = Is{1}FromJSON(w.{0})"
220222 .format(field_name, field.data_type.name))
223 elif is_struct_type(field.data_type):
224 self.emit('err = json.Unmarshal(body, &u.{0})'
225 .format(field_name))
221226 else:
222 self.emit('err = json.Unmarshal(body, &u.{0})'
223 .format(field_name))
227 self.emit('u.{0} = w.{0}'.format(field_name))
224228 with self.block("if err != nil"):
225229 self.emit("return err")
226230 self.emit('return nil')
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package account
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // SetProfilePhoto : Sets a user's profile photo.
33 SetProfilePhoto(arg *SetProfilePhotoArg) (res *SetProfilePhotoResult, err error)
34 }
35
36 type apiImpl dropbox.Context
37
38 //SetProfilePhotoAPIError is an error-wrapper for the set_profile_photo route
39 type SetProfilePhotoAPIError struct {
40 dropbox.APIError
41 EndpointError *SetProfilePhotoError `json:"error"`
42 }
43
44 func (dbx *apiImpl) SetProfilePhoto(arg *SetProfilePhotoArg) (res *SetProfilePhotoResult, err error) {
45 req := dropbox.Request{
46 Host: "api",
47 Namespace: "account",
48 Route: "set_profile_photo",
49 Auth: "user",
50 Style: "rpc",
51 Arg: arg,
52 ExtraHeaders: nil,
53 }
54
55 var resp []byte
56 var respBody io.ReadCloser
57 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
58 if err != nil {
59 var appErr SetProfilePhotoAPIError
60 err = auth.ParseError(err, &appErr)
61 if err == &appErr {
62 err = appErr
63 }
64 return
65 }
66
67 err = json.Unmarshal(resp, &res)
68 if err != nil {
69 return
70 }
71
72 _ = respBody
73 return
74 }
75
76 // New returns a Client implementation for this namespace
77 func New(c dropbox.Config) Client {
78 ctx := apiImpl(dropbox.NewContext(c))
79 return &ctx
80 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package account : has no documentation (yet)
21 package account
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // PhotoSourceArg : has no documentation (yet)
30 type PhotoSourceArg struct {
31 dropbox.Tagged
32 // Base64Data : Image data in base64-encoded bytes.
33 Base64Data string `json:"base64_data,omitempty"`
34 }
35
36 // Valid tag values for PhotoSourceArg
37 const (
38 PhotoSourceArgBase64Data = "base64_data"
39 PhotoSourceArgOther = "other"
40 )
41
42 // UnmarshalJSON deserializes into a PhotoSourceArg instance
43 func (u *PhotoSourceArg) UnmarshalJSON(body []byte) error {
44 type wrap struct {
45 dropbox.Tagged
46 // Base64Data : Image data in base64-encoded bytes.
47 Base64Data string `json:"base64_data,omitempty"`
48 }
49 var w wrap
50 var err error
51 if err = json.Unmarshal(body, &w); err != nil {
52 return err
53 }
54 u.Tag = w.Tag
55 switch u.Tag {
56 case "base64_data":
57 u.Base64Data = w.Base64Data
58
59 if err != nil {
60 return err
61 }
62 }
63 return nil
64 }
65
66 // SetProfilePhotoArg : has no documentation (yet)
67 type SetProfilePhotoArg struct {
68 // Photo : Image to set as the user's new profile photo.
69 Photo *PhotoSourceArg `json:"photo"`
70 }
71
72 // NewSetProfilePhotoArg returns a new SetProfilePhotoArg instance
73 func NewSetProfilePhotoArg(Photo *PhotoSourceArg) *SetProfilePhotoArg {
74 s := new(SetProfilePhotoArg)
75 s.Photo = Photo
76 return s
77 }
78
79 // SetProfilePhotoError : has no documentation (yet)
80 type SetProfilePhotoError struct {
81 dropbox.Tagged
82 }
83
84 // Valid tag values for SetProfilePhotoError
85 const (
86 SetProfilePhotoErrorFileTypeError = "file_type_error"
87 SetProfilePhotoErrorFileSizeError = "file_size_error"
88 SetProfilePhotoErrorDimensionError = "dimension_error"
89 SetProfilePhotoErrorThumbnailError = "thumbnail_error"
90 SetProfilePhotoErrorTransientError = "transient_error"
91 SetProfilePhotoErrorOther = "other"
92 )
93
94 // SetProfilePhotoResult : has no documentation (yet)
95 type SetProfilePhotoResult struct {
96 // ProfilePhotoUrl : URL for the photo representing the user, if one is set.
97 ProfilePhotoUrl string `json:"profile_photo_url"`
98 }
99
100 // NewSetProfilePhotoResult returns a new SetProfilePhotoResult instance
101 func NewSetProfilePhotoResult(ProfilePhotoUrl string) *SetProfilePhotoResult {
102 s := new(SetProfilePhotoResult)
103 s.ProfilePhotoUrl = ProfilePhotoUrl
104 return s
105 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package async : has no documentation (yet)
21 package async
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // LaunchResultBase : Result returned by methods that launch an asynchronous
30 // job. A method who may either launch an asynchronous job, or complete the
31 // request synchronously, can use this union by extending it, and adding a
32 // 'complete' field with the type of the synchronous response. See
33 // `LaunchEmptyResult` for an example.
34 type LaunchResultBase struct {
35 dropbox.Tagged
36 // AsyncJobId : This response indicates that the processing is asynchronous.
37 // The string is an id that can be used to obtain the status of the
38 // asynchronous job.
39 AsyncJobId string `json:"async_job_id,omitempty"`
40 }
41
42 // Valid tag values for LaunchResultBase
43 const (
44 LaunchResultBaseAsyncJobId = "async_job_id"
45 )
46
47 // UnmarshalJSON deserializes into a LaunchResultBase instance
48 func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
49 type wrap struct {
50 dropbox.Tagged
51 // AsyncJobId : This response indicates that the processing is
52 // asynchronous. The string is an id that can be used to obtain the
53 // status of the asynchronous job.
54 AsyncJobId string `json:"async_job_id,omitempty"`
55 }
56 var w wrap
57 var err error
58 if err = json.Unmarshal(body, &w); err != nil {
59 return err
60 }
61 u.Tag = w.Tag
62 switch u.Tag {
63 case "async_job_id":
64 u.AsyncJobId = w.AsyncJobId
65
66 if err != nil {
67 return err
68 }
69 }
70 return nil
71 }
72
73 // LaunchEmptyResult : Result returned by methods that may either launch an
74 // asynchronous job or complete synchronously. Upon synchronous completion of
75 // the job, no additional information is returned.
76 type LaunchEmptyResult struct {
77 dropbox.Tagged
78 // AsyncJobId : This response indicates that the processing is asynchronous.
79 // The string is an id that can be used to obtain the status of the
80 // asynchronous job.
81 AsyncJobId string `json:"async_job_id,omitempty"`
82 }
83
84 // Valid tag values for LaunchEmptyResult
85 const (
86 LaunchEmptyResultAsyncJobId = "async_job_id"
87 LaunchEmptyResultComplete = "complete"
88 )
89
90 // UnmarshalJSON deserializes into a LaunchEmptyResult instance
91 func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error {
92 type wrap struct {
93 dropbox.Tagged
94 // AsyncJobId : This response indicates that the processing is
95 // asynchronous. The string is an id that can be used to obtain the
96 // status of the asynchronous job.
97 AsyncJobId string `json:"async_job_id,omitempty"`
98 }
99 var w wrap
100 var err error
101 if err = json.Unmarshal(body, &w); err != nil {
102 return err
103 }
104 u.Tag = w.Tag
105 switch u.Tag {
106 case "async_job_id":
107 u.AsyncJobId = w.AsyncJobId
108
109 if err != nil {
110 return err
111 }
112 }
113 return nil
114 }
115
116 // PollArg : Arguments for methods that poll the status of an asynchronous job.
117 type PollArg struct {
118 // AsyncJobId : Id of the asynchronous job. This is the value of a response
119 // returned from the method that launched the job.
120 AsyncJobId string `json:"async_job_id"`
121 }
122
123 // NewPollArg returns a new PollArg instance
124 func NewPollArg(AsyncJobId string) *PollArg {
125 s := new(PollArg)
126 s.AsyncJobId = AsyncJobId
127 return s
128 }
129
130 // PollResultBase : Result returned by methods that poll for the status of an
131 // asynchronous job. Unions that extend this union should add a 'complete' field
132 // with a type of the information returned upon job completion. See
133 // `PollEmptyResult` for an example.
134 type PollResultBase struct {
135 dropbox.Tagged
136 }
137
138 // Valid tag values for PollResultBase
139 const (
140 PollResultBaseInProgress = "in_progress"
141 )
142
143 // PollEmptyResult : Result returned by methods that poll for the status of an
144 // asynchronous job. Upon completion of the job, no additional information is
145 // returned.
146 type PollEmptyResult struct {
147 dropbox.Tagged
148 }
149
150 // Valid tag values for PollEmptyResult
151 const (
152 PollEmptyResultInProgress = "in_progress"
153 PollEmptyResultComplete = "complete"
154 )
155
156 // PollError : Error returned by methods for polling the status of asynchronous
157 // job.
158 type PollError struct {
159 dropbox.Tagged
160 }
161
162 // Valid tag values for PollError
163 const (
164 PollErrorInvalidAsyncJobId = "invalid_async_job_id"
165 PollErrorInternalError = "internal_error"
166 PollErrorOther = "other"
167 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package auth
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // Client interface describes all routes in this namespace
30 type Client interface {
31 // TokenFromOauth1 : Creates an OAuth 2.0 access token from the supplied
32 // OAuth 1.0 access token.
33 TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error)
34 // TokenRevoke : Disables the access token used to authenticate the call. If
35 // there is a corresponding refresh token for the access token, this
36 // disables that refresh token, as well as any other access tokens for that
37 // refresh token.
38 TokenRevoke() (err error)
39 }
40
41 type apiImpl dropbox.Context
42
43 //TokenFromOauth1APIError is an error-wrapper for the token/from_oauth1 route
44 type TokenFromOauth1APIError struct {
45 dropbox.APIError
46 EndpointError *TokenFromOAuth1Error `json:"error"`
47 }
48
49 func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) {
50 req := dropbox.Request{
51 Host: "api",
52 Namespace: "auth",
53 Route: "token/from_oauth1",
54 Auth: "app",
55 Style: "rpc",
56 Arg: arg,
57 ExtraHeaders: nil,
58 }
59
60 var resp []byte
61 var respBody io.ReadCloser
62 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
63 if err != nil {
64 var appErr TokenFromOauth1APIError
65 err = ParseError(err, &appErr)
66 if err == &appErr {
67 err = appErr
68 }
69 return
70 }
71
72 err = json.Unmarshal(resp, &res)
73 if err != nil {
74 return
75 }
76
77 _ = respBody
78 return
79 }
80
81 //TokenRevokeAPIError is an error-wrapper for the token/revoke route
82 type TokenRevokeAPIError struct {
83 dropbox.APIError
84 EndpointError struct{} `json:"error"`
85 }
86
87 func (dbx *apiImpl) TokenRevoke() (err error) {
88 req := dropbox.Request{
89 Host: "api",
90 Namespace: "auth",
91 Route: "token/revoke",
92 Auth: "user",
93 Style: "rpc",
94 Arg: nil,
95 ExtraHeaders: nil,
96 }
97
98 var resp []byte
99 var respBody io.ReadCloser
100 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
101 if err != nil {
102 var appErr TokenRevokeAPIError
103 err = ParseError(err, &appErr)
104 if err == &appErr {
105 err = appErr
106 }
107 return
108 }
109
110 _ = resp
111 _ = respBody
112 return
113 }
114
115 // New returns a Client implementation for this namespace
116 func New(c dropbox.Config) Client {
117 ctx := apiImpl(dropbox.NewContext(c))
118 return &ctx
119 }
0 package auth
1
2 import (
3 "encoding/json"
4 "net/http"
5
6 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
7 )
8
9 // AuthAPIError wraps AuthError
10 type AuthAPIError struct {
11 dropbox.APIError
12 AuthError *AuthError `json:"error"`
13 }
14
15 // AccessAPIError wraps AccessError
16 type AccessAPIError struct {
17 dropbox.APIError
18 AccessError *AccessError `json:"error"`
19 }
20
21 // RateLimitAPIError wraps RateLimitError
22 type RateLimitAPIError struct {
23 dropbox.APIError
24 RateLimitError *RateLimitError `json:"error"`
25 }
26
27 // Bad input parameter.
28 type BadRequest struct {
29 dropbox.APIError
30 }
31
32 // An error occurred on the Dropbox servers. Check status.dropbox.com for announcements about
33 // Dropbox service issues.
34 type ServerError struct {
35 dropbox.APIError
36 StatusCode int
37 }
38
39 func ParseError(err error, appError error) error {
40 sdkErr, ok := err.(dropbox.SDKInternalError)
41 if !ok {
42 return err
43 }
44
45 if sdkErr.StatusCode >= 500 && sdkErr.StatusCode <= 599 {
46 return ServerError{
47 APIError: dropbox.APIError{
48 ErrorSummary: sdkErr.Content,
49 },
50 }
51 }
52
53 switch sdkErr.StatusCode {
54 case http.StatusBadRequest:
55 return BadRequest{
56 APIError: dropbox.APIError{
57 ErrorSummary: sdkErr.Content,
58 },
59 }
60 case http.StatusUnauthorized:
61 var apiError AuthAPIError
62 if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
63 return pErr
64 }
65
66 return apiError
67 case http.StatusForbidden:
68 var apiError AccessAPIError
69 if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
70 return pErr
71 }
72
73 return apiError
74 case http.StatusTooManyRequests:
75 var apiError RateLimitAPIError
76 if pErr := json.Unmarshal([]byte(sdkErr.Content), &apiError); pErr != nil {
77 return pErr
78 }
79
80 return apiError
81 case http.StatusConflict:
82 if pErr := json.Unmarshal([]byte(sdkErr.Content), appError); pErr != nil {
83 return pErr
84 }
85
86 return appError
87 }
88
89 return err
90 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package auth : has no documentation (yet)
21 package auth
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // AccessError : Error occurred because the account doesn't have permission to
30 // access the resource.
31 type AccessError struct {
32 dropbox.Tagged
33 // InvalidAccountType : Current account type cannot access the resource.
34 InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"`
35 // PaperAccessDenied : Current account cannot access Paper.
36 PaperAccessDenied *PaperAccessError `json:"paper_access_denied,omitempty"`
37 }
38
39 // Valid tag values for AccessError
40 const (
41 AccessErrorInvalidAccountType = "invalid_account_type"
42 AccessErrorPaperAccessDenied = "paper_access_denied"
43 AccessErrorOther = "other"
44 )
45
46 // UnmarshalJSON deserializes into a AccessError instance
47 func (u *AccessError) UnmarshalJSON(body []byte) error {
48 type wrap struct {
49 dropbox.Tagged
50 // InvalidAccountType : Current account type cannot access the resource.
51 InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"`
52 // PaperAccessDenied : Current account cannot access Paper.
53 PaperAccessDenied *PaperAccessError `json:"paper_access_denied,omitempty"`
54 }
55 var w wrap
56 var err error
57 if err = json.Unmarshal(body, &w); err != nil {
58 return err
59 }
60 u.Tag = w.Tag
61 switch u.Tag {
62 case "invalid_account_type":
63 u.InvalidAccountType = w.InvalidAccountType
64
65 if err != nil {
66 return err
67 }
68 case "paper_access_denied":
69 u.PaperAccessDenied = w.PaperAccessDenied
70
71 if err != nil {
72 return err
73 }
74 }
75 return nil
76 }
77
78 // AuthError : Errors occurred during authentication.
79 type AuthError struct {
80 dropbox.Tagged
81 // MissingScope : The access token does not have the required scope to
82 // access the route.
83 MissingScope *TokenScopeError `json:"missing_scope,omitempty"`
84 }
85
86 // Valid tag values for AuthError
87 const (
88 AuthErrorInvalidAccessToken = "invalid_access_token"
89 AuthErrorInvalidSelectUser = "invalid_select_user"
90 AuthErrorInvalidSelectAdmin = "invalid_select_admin"
91 AuthErrorUserSuspended = "user_suspended"
92 AuthErrorExpiredAccessToken = "expired_access_token"
93 AuthErrorMissingScope = "missing_scope"
94 AuthErrorRouteAccessDenied = "route_access_denied"
95 AuthErrorOther = "other"
96 )
97
98 // UnmarshalJSON deserializes into a AuthError instance
99 func (u *AuthError) UnmarshalJSON(body []byte) error {
100 type wrap struct {
101 dropbox.Tagged
102 }
103 var w wrap
104 var err error
105 if err = json.Unmarshal(body, &w); err != nil {
106 return err
107 }
108 u.Tag = w.Tag
109 switch u.Tag {
110 case "missing_scope":
111 err = json.Unmarshal(body, &u.MissingScope)
112
113 if err != nil {
114 return err
115 }
116 }
117 return nil
118 }
119
120 // InvalidAccountTypeError : has no documentation (yet)
121 type InvalidAccountTypeError struct {
122 dropbox.Tagged
123 }
124
125 // Valid tag values for InvalidAccountTypeError
126 const (
127 InvalidAccountTypeErrorEndpoint = "endpoint"
128 InvalidAccountTypeErrorFeature = "feature"
129 InvalidAccountTypeErrorOther = "other"
130 )
131
132 // PaperAccessError : has no documentation (yet)
133 type PaperAccessError struct {
134 dropbox.Tagged
135 }
136
137 // Valid tag values for PaperAccessError
138 const (
139 PaperAccessErrorPaperDisabled = "paper_disabled"
140 PaperAccessErrorNotPaperUser = "not_paper_user"
141 PaperAccessErrorOther = "other"
142 )
143
144 // RateLimitError : Error occurred because the app is being rate limited.
145 type RateLimitError struct {
146 // Reason : The reason why the app is being rate limited.
147 Reason *RateLimitReason `json:"reason"`
148 // RetryAfter : The number of seconds that the app should wait before making
149 // another request.
150 RetryAfter uint64 `json:"retry_after"`
151 }
152
153 // NewRateLimitError returns a new RateLimitError instance
154 func NewRateLimitError(Reason *RateLimitReason) *RateLimitError {
155 s := new(RateLimitError)
156 s.Reason = Reason
157 s.RetryAfter = 1
158 return s
159 }
160
161 // RateLimitReason : has no documentation (yet)
162 type RateLimitReason struct {
163 dropbox.Tagged
164 }
165
166 // Valid tag values for RateLimitReason
167 const (
168 RateLimitReasonTooManyRequests = "too_many_requests"
169 RateLimitReasonTooManyWriteOperations = "too_many_write_operations"
170 RateLimitReasonOther = "other"
171 )
172
173 // TokenFromOAuth1Arg : has no documentation (yet)
174 type TokenFromOAuth1Arg struct {
175 // Oauth1Token : The supplied OAuth 1.0 access token.
176 Oauth1Token string `json:"oauth1_token"`
177 // Oauth1TokenSecret : The token secret associated with the supplied access
178 // token.
179 Oauth1TokenSecret string `json:"oauth1_token_secret"`
180 }
181
182 // NewTokenFromOAuth1Arg returns a new TokenFromOAuth1Arg instance
183 func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string) *TokenFromOAuth1Arg {
184 s := new(TokenFromOAuth1Arg)
185 s.Oauth1Token = Oauth1Token
186 s.Oauth1TokenSecret = Oauth1TokenSecret
187 return s
188 }
189
190 // TokenFromOAuth1Error : has no documentation (yet)
191 type TokenFromOAuth1Error struct {
192 dropbox.Tagged
193 }
194
195 // Valid tag values for TokenFromOAuth1Error
196 const (
197 TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info"
198 TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch"
199 TokenFromOAuth1ErrorOther = "other"
200 )
201
202 // TokenFromOAuth1Result : has no documentation (yet)
203 type TokenFromOAuth1Result struct {
204 // Oauth2Token : The OAuth 2.0 token generated from the supplied OAuth 1.0
205 // token.
206 Oauth2Token string `json:"oauth2_token"`
207 }
208
209 // NewTokenFromOAuth1Result returns a new TokenFromOAuth1Result instance
210 func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result {
211 s := new(TokenFromOAuth1Result)
212 s.Oauth2Token = Oauth2Token
213 return s
214 }
215
216 // TokenScopeError : has no documentation (yet)
217 type TokenScopeError struct {
218 // RequiredScope : The required scope to access the route.
219 RequiredScope string `json:"required_scope"`
220 }
221
222 // NewTokenScopeError returns a new TokenScopeError instance
223 func NewTokenScopeError(RequiredScope string) *TokenScopeError {
224 s := new(TokenScopeError)
225 s.RequiredScope = RequiredScope
226 return s
227 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package check
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // App : This endpoint performs App Authentication, validating the supplied
33 // app key and secret, and returns the supplied string, to allow you to test
34 // your code and connection to the Dropbox API. It has no other effect. If
35 // you receive an HTTP 200 response with the supplied query, it indicates at
36 // least part of the Dropbox API infrastructure is working and that the app
37 // key and secret valid.
38 App(arg *EchoArg) (res *EchoResult, err error)
39 // User : This endpoint performs User Authentication, validating the
40 // supplied access token, and returns the supplied string, to allow you to
41 // test your code and connection to the Dropbox API. It has no other effect.
42 // If you receive an HTTP 200 response with the supplied query, it indicates
43 // at least part of the Dropbox API infrastructure is working and that the
44 // access token is valid.
45 User(arg *EchoArg) (res *EchoResult, err error)
46 }
47
48 type apiImpl dropbox.Context
49
50 //AppAPIError is an error-wrapper for the app route
51 type AppAPIError struct {
52 dropbox.APIError
53 EndpointError struct{} `json:"error"`
54 }
55
56 func (dbx *apiImpl) App(arg *EchoArg) (res *EchoResult, err error) {
57 req := dropbox.Request{
58 Host: "api",
59 Namespace: "check",
60 Route: "app",
61 Auth: "app",
62 Style: "rpc",
63 Arg: arg,
64 ExtraHeaders: nil,
65 }
66
67 var resp []byte
68 var respBody io.ReadCloser
69 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
70 if err != nil {
71 var appErr AppAPIError
72 err = auth.ParseError(err, &appErr)
73 if err == &appErr {
74 err = appErr
75 }
76 return
77 }
78
79 err = json.Unmarshal(resp, &res)
80 if err != nil {
81 return
82 }
83
84 _ = respBody
85 return
86 }
87
88 //UserAPIError is an error-wrapper for the user route
89 type UserAPIError struct {
90 dropbox.APIError
91 EndpointError struct{} `json:"error"`
92 }
93
94 func (dbx *apiImpl) User(arg *EchoArg) (res *EchoResult, err error) {
95 req := dropbox.Request{
96 Host: "api",
97 Namespace: "check",
98 Route: "user",
99 Auth: "user",
100 Style: "rpc",
101 Arg: arg,
102 ExtraHeaders: nil,
103 }
104
105 var resp []byte
106 var respBody io.ReadCloser
107 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
108 if err != nil {
109 var appErr UserAPIError
110 err = auth.ParseError(err, &appErr)
111 if err == &appErr {
112 err = appErr
113 }
114 return
115 }
116
117 err = json.Unmarshal(resp, &res)
118 if err != nil {
119 return
120 }
121
122 _ = respBody
123 return
124 }
125
126 // New returns a Client implementation for this namespace
127 func New(c dropbox.Config) Client {
128 ctx := apiImpl(dropbox.NewContext(c))
129 return &ctx
130 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package check : has no documentation (yet)
21 package check
22
23 // EchoArg : EchoArg contains the arguments to be sent to the Dropbox servers.
24 type EchoArg struct {
25 // Query : The string that you'd like to be echoed back to you.
26 Query string `json:"query"`
27 }
28
29 // NewEchoArg returns a new EchoArg instance
30 func NewEchoArg() *EchoArg {
31 s := new(EchoArg)
32 s.Query = ""
33 return s
34 }
35
36 // EchoResult : EchoResult contains the result returned from the Dropbox
37 // servers.
38 type EchoResult struct {
39 // Result : If everything worked correctly, this would be the same as query.
40 Result string `json:"result"`
41 }
42
43 // NewEchoResult returns a new EchoResult instance
44 func NewEchoResult() *EchoResult {
45 s := new(EchoResult)
46 s.Result = ""
47 return s
48 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package common : has no documentation (yet)
21 package common
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // PathRoot : has no documentation (yet)
30 type PathRoot struct {
31 dropbox.Tagged
32 // Root : Paths are relative to the authenticating user's root namespace
33 // (This results in `PathRootError.invalid_root` if the user's root
34 // namespace has changed.).
35 Root string `json:"root,omitempty"`
36 // NamespaceId : Paths are relative to given namespace id (This results in
37 // `PathRootError.no_permission` if you don't have access to this
38 // namespace.).
39 NamespaceId string `json:"namespace_id,omitempty"`
40 }
41
42 // Valid tag values for PathRoot
43 const (
44 PathRootHome = "home"
45 PathRootRoot = "root"
46 PathRootNamespaceId = "namespace_id"
47 PathRootOther = "other"
48 )
49
50 // UnmarshalJSON deserializes into a PathRoot instance
51 func (u *PathRoot) UnmarshalJSON(body []byte) error {
52 type wrap struct {
53 dropbox.Tagged
54 // Root : Paths are relative to the authenticating user's root namespace
55 // (This results in `PathRootError.invalid_root` if the user's root
56 // namespace has changed.).
57 Root string `json:"root,omitempty"`
58 // NamespaceId : Paths are relative to given namespace id (This results
59 // in `PathRootError.no_permission` if you don't have access to this
60 // namespace.).
61 NamespaceId string `json:"namespace_id,omitempty"`
62 }
63 var w wrap
64 var err error
65 if err = json.Unmarshal(body, &w); err != nil {
66 return err
67 }
68 u.Tag = w.Tag
69 switch u.Tag {
70 case "root":
71 u.Root = w.Root
72
73 if err != nil {
74 return err
75 }
76 case "namespace_id":
77 u.NamespaceId = w.NamespaceId
78
79 if err != nil {
80 return err
81 }
82 }
83 return nil
84 }
85
86 // PathRootError : has no documentation (yet)
87 type PathRootError struct {
88 dropbox.Tagged
89 // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is
90 // not valid. The value of this error is the user's latest root info.
91 InvalidRoot IsRootInfo `json:"invalid_root,omitempty"`
92 }
93
94 // Valid tag values for PathRootError
95 const (
96 PathRootErrorInvalidRoot = "invalid_root"
97 PathRootErrorNoPermission = "no_permission"
98 PathRootErrorOther = "other"
99 )
100
101 // UnmarshalJSON deserializes into a PathRootError instance
102 func (u *PathRootError) UnmarshalJSON(body []byte) error {
103 type wrap struct {
104 dropbox.Tagged
105 // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header
106 // is not valid. The value of this error is the user's latest root info.
107 InvalidRoot json.RawMessage `json:"invalid_root,omitempty"`
108 }
109 var w wrap
110 var err error
111 if err = json.Unmarshal(body, &w); err != nil {
112 return err
113 }
114 u.Tag = w.Tag
115 switch u.Tag {
116 case "invalid_root":
117 u.InvalidRoot, err = IsRootInfoFromJSON(w.InvalidRoot)
118
119 if err != nil {
120 return err
121 }
122 }
123 return nil
124 }
125
126 // RootInfo : Information about current user's root.
127 type RootInfo struct {
128 // RootNamespaceId : The namespace ID for user's root namespace. It will be
129 // the namespace ID of the shared team root if the user is member of a team
130 // with a separate team root. Otherwise it will be same as
131 // `RootInfo.home_namespace_id`.
132 RootNamespaceId string `json:"root_namespace_id"`
133 // HomeNamespaceId : The namespace ID for user's home namespace.
134 HomeNamespaceId string `json:"home_namespace_id"`
135 }
136
137 // NewRootInfo returns a new RootInfo instance
138 func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootInfo {
139 s := new(RootInfo)
140 s.RootNamespaceId = RootNamespaceId
141 s.HomeNamespaceId = HomeNamespaceId
142 return s
143 }
144
145 // IsRootInfo is the interface type for RootInfo and its subtypes
146 type IsRootInfo interface {
147 IsRootInfo()
148 }
149
150 // IsRootInfo implements the IsRootInfo interface
151 func (u *RootInfo) IsRootInfo() {}
152
153 type rootInfoUnion struct {
154 dropbox.Tagged
155 // Team : has no documentation (yet)
156 Team *TeamRootInfo `json:"team,omitempty"`
157 // User : has no documentation (yet)
158 User *UserRootInfo `json:"user,omitempty"`
159 }
160
161 // Valid tag values for RootInfo
162 const (
163 RootInfoTeam = "team"
164 RootInfoUser = "user"
165 )
166
167 // UnmarshalJSON deserializes into a rootInfoUnion instance
168 func (u *rootInfoUnion) UnmarshalJSON(body []byte) error {
169 type wrap struct {
170 dropbox.Tagged
171 }
172 var w wrap
173 var err error
174 if err = json.Unmarshal(body, &w); err != nil {
175 return err
176 }
177 u.Tag = w.Tag
178 switch u.Tag {
179 case "team":
180 err = json.Unmarshal(body, &u.Team)
181
182 if err != nil {
183 return err
184 }
185 case "user":
186 err = json.Unmarshal(body, &u.User)
187
188 if err != nil {
189 return err
190 }
191 }
192 return nil
193 }
194
195 // IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance
196 func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) {
197 var t rootInfoUnion
198 if err := json.Unmarshal(data, &t); err != nil {
199 return nil, err
200 }
201 switch t.Tag {
202 case "team":
203 return t.Team, nil
204
205 case "user":
206 return t.User, nil
207
208 }
209 return nil, nil
210 }
211
212 // TeamRootInfo : Root info when user is member of a team with a separate root
213 // namespace ID.
214 type TeamRootInfo struct {
215 RootInfo
216 // HomePath : The path for user's home directory under the shared team root.
217 HomePath string `json:"home_path"`
218 }
219
220 // NewTeamRootInfo returns a new TeamRootInfo instance
221 func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo {
222 s := new(TeamRootInfo)
223 s.RootNamespaceId = RootNamespaceId
224 s.HomeNamespaceId = HomeNamespaceId
225 s.HomePath = HomePath
226 return s
227 }
228
229 // UserRootInfo : Root info when user is not member of a team or the user is a
230 // member of a team and the team does not have a separate root namespace.
231 type UserRootInfo struct {
232 RootInfo
233 }
234
235 // NewUserRootInfo returns a new UserRootInfo instance
236 func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo {
237 s := new(UserRootInfo)
238 s.RootNamespaceId = RootNamespaceId
239 s.HomeNamespaceId = HomeNamespaceId
240 return s
241 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package contacts
21
22 import (
23 "io"
24
25 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
27 )
28
29 // Client interface describes all routes in this namespace
30 type Client interface {
31 // DeleteManualContacts : Removes all manually added contacts. You'll still
32 // keep contacts who are on your team or who you imported. New contacts will
33 // be added when you share.
34 DeleteManualContacts() (err error)
35 // DeleteManualContactsBatch : Removes manually added contacts from the
36 // given list.
37 DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error)
38 }
39
40 type apiImpl dropbox.Context
41
42 //DeleteManualContactsAPIError is an error-wrapper for the delete_manual_contacts route
43 type DeleteManualContactsAPIError struct {
44 dropbox.APIError
45 EndpointError struct{} `json:"error"`
46 }
47
48 func (dbx *apiImpl) DeleteManualContacts() (err error) {
49 req := dropbox.Request{
50 Host: "api",
51 Namespace: "contacts",
52 Route: "delete_manual_contacts",
53 Auth: "user",
54 Style: "rpc",
55 Arg: nil,
56 ExtraHeaders: nil,
57 }
58
59 var resp []byte
60 var respBody io.ReadCloser
61 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
62 if err != nil {
63 var appErr DeleteManualContactsAPIError
64 err = auth.ParseError(err, &appErr)
65 if err == &appErr {
66 err = appErr
67 }
68 return
69 }
70
71 _ = resp
72 _ = respBody
73 return
74 }
75
76 //DeleteManualContactsBatchAPIError is an error-wrapper for the delete_manual_contacts_batch route
77 type DeleteManualContactsBatchAPIError struct {
78 dropbox.APIError
79 EndpointError *DeleteManualContactsError `json:"error"`
80 }
81
82 func (dbx *apiImpl) DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error) {
83 req := dropbox.Request{
84 Host: "api",
85 Namespace: "contacts",
86 Route: "delete_manual_contacts_batch",
87 Auth: "user",
88 Style: "rpc",
89 Arg: arg,
90 ExtraHeaders: nil,
91 }
92
93 var resp []byte
94 var respBody io.ReadCloser
95 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
96 if err != nil {
97 var appErr DeleteManualContactsBatchAPIError
98 err = auth.ParseError(err, &appErr)
99 if err == &appErr {
100 err = appErr
101 }
102 return
103 }
104
105 _ = resp
106 _ = respBody
107 return
108 }
109
110 // New returns a Client implementation for this namespace
111 func New(c dropbox.Config) Client {
112 ctx := apiImpl(dropbox.NewContext(c))
113 return &ctx
114 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package contacts : has no documentation (yet)
21 package contacts
22
23 import (
24 "encoding/json"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // DeleteManualContactsArg : has no documentation (yet)
30 type DeleteManualContactsArg struct {
31 // EmailAddresses : List of manually added contacts to be deleted.
32 EmailAddresses []string `json:"email_addresses"`
33 }
34
35 // NewDeleteManualContactsArg returns a new DeleteManualContactsArg instance
36 func NewDeleteManualContactsArg(EmailAddresses []string) *DeleteManualContactsArg {
37 s := new(DeleteManualContactsArg)
38 s.EmailAddresses = EmailAddresses
39 return s
40 }
41
42 // DeleteManualContactsError : has no documentation (yet)
43 type DeleteManualContactsError struct {
44 dropbox.Tagged
45 // ContactsNotFound : Can't delete contacts from this list. Make sure the
46 // list only has manually added contacts. The deletion was cancelled.
47 ContactsNotFound []string `json:"contacts_not_found,omitempty"`
48 }
49
50 // Valid tag values for DeleteManualContactsError
51 const (
52 DeleteManualContactsErrorContactsNotFound = "contacts_not_found"
53 DeleteManualContactsErrorOther = "other"
54 )
55
56 // UnmarshalJSON deserializes into a DeleteManualContactsError instance
57 func (u *DeleteManualContactsError) UnmarshalJSON(body []byte) error {
58 type wrap struct {
59 dropbox.Tagged
60 // ContactsNotFound : Can't delete contacts from this list. Make sure
61 // the list only has manually added contacts. The deletion was
62 // cancelled.
63 ContactsNotFound []string `json:"contacts_not_found,omitempty"`
64 }
65 var w wrap
66 var err error
67 if err = json.Unmarshal(body, &w); err != nil {
68 return err
69 }
70 u.Tag = w.Tag
71 switch u.Tag {
72 case "contacts_not_found":
73 u.ContactsNotFound = w.ContactsNotFound
74
75 if err != nil {
76 return err
77 }
78 }
79 return nil
80 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package file_properties
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // PropertiesAdd : Add property groups to a Dropbox file. See
33 // `templatesAddForUser` or `templatesAddForTeam` to create new templates.
34 PropertiesAdd(arg *AddPropertiesArg) (err error)
35 // PropertiesOverwrite : Overwrite property groups associated with a file.
36 // This endpoint should be used instead of `propertiesUpdate` when property
37 // groups are being updated via a "snapshot" instead of via a "delta". In
38 // other words, this endpoint will delete all omitted fields from a property
39 // group, whereas `propertiesUpdate` will only delete fields that are
40 // explicitly marked for deletion.
41 PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error)
42 // PropertiesRemove : Permanently removes the specified property group from
43 // the file. To remove specific property field key value pairs, see
44 // `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or
45 // `templatesUpdateForTeam`. To remove a template, see
46 // `templatesRemoveForUser` or `templatesRemoveForTeam`.
47 PropertiesRemove(arg *RemovePropertiesArg) (err error)
48 // PropertiesSearch : Search across property templates for particular
49 // property field values.
50 PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error)
51 // PropertiesSearchContinue : Once a cursor has been retrieved from
52 // `propertiesSearch`, use this to paginate through all search results.
53 PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error)
54 // PropertiesUpdate : Add, update or remove properties associated with the
55 // supplied file and templates. This endpoint should be used instead of
56 // `propertiesOverwrite` when property groups are being updated via a
57 // "delta" instead of via a "snapshot" . In other words, this endpoint will
58 // not delete any omitted fields from a property group, whereas
59 // `propertiesOverwrite` will delete any fields that are omitted from a
60 // property group.
61 PropertiesUpdate(arg *UpdatePropertiesArg) (err error)
62 // TemplatesAddForTeam : Add a template associated with a team. See
63 // `propertiesAdd` to add properties to a file or folder. Note: this
64 // endpoint will create team-owned templates.
65 TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error)
66 // TemplatesAddForUser : Add a template associated with a user. See
67 // `propertiesAdd` to add properties to a file. This endpoint can't be
68 // called on a team member or admin's behalf.
69 TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error)
70 // TemplatesGetForTeam : Get the schema for a specified template.
71 TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error)
72 // TemplatesGetForUser : Get the schema for a specified template. This
73 // endpoint can't be called on a team member or admin's behalf.
74 TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error)
75 // TemplatesListForTeam : Get the template identifiers for a team. To get
76 // the schema of each template use `templatesGetForTeam`.
77 TemplatesListForTeam() (res *ListTemplateResult, err error)
78 // TemplatesListForUser : Get the template identifiers for a team. To get
79 // the schema of each template use `templatesGetForUser`. This endpoint
80 // can't be called on a team member or admin's behalf.
81 TemplatesListForUser() (res *ListTemplateResult, err error)
82 // TemplatesRemoveForTeam : Permanently removes the specified template
83 // created from `templatesAddForUser`. All properties associated with the
84 // template will also be removed. This action cannot be undone.
85 TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error)
86 // TemplatesRemoveForUser : Permanently removes the specified template
87 // created from `templatesAddForUser`. All properties associated with the
88 // template will also be removed. This action cannot be undone.
89 TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error)
90 // TemplatesUpdateForTeam : Update a template associated with a team. This
91 // route can update the template name, the template description and add
92 // optional properties to templates.
93 TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
94 // TemplatesUpdateForUser : Update a template associated with a user. This
95 // route can update the template name, the template description and add
96 // optional properties to templates. This endpoint can't be called on a team
97 // member or admin's behalf.
98 TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error)
99 }
100
101 type apiImpl dropbox.Context
102
103 //PropertiesAddAPIError is an error-wrapper for the properties/add route
104 type PropertiesAddAPIError struct {
105 dropbox.APIError
106 EndpointError *AddPropertiesError `json:"error"`
107 }
108
109 func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) {
110 req := dropbox.Request{
111 Host: "api",
112 Namespace: "file_properties",
113 Route: "properties/add",
114 Auth: "user",
115 Style: "rpc",
116 Arg: arg,
117 ExtraHeaders: nil,
118 }
119
120 var resp []byte
121 var respBody io.ReadCloser
122 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
123 if err != nil {
124 var appErr PropertiesAddAPIError
125 err = auth.ParseError(err, &appErr)
126 if err == &appErr {
127 err = appErr
128 }
129 return
130 }
131
132 _ = resp
133 _ = respBody
134 return
135 }
136
137 //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route
138 type PropertiesOverwriteAPIError struct {
139 dropbox.APIError
140 EndpointError *InvalidPropertyGroupError `json:"error"`
141 }
142
143 func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) {
144 req := dropbox.Request{
145 Host: "api",
146 Namespace: "file_properties",
147 Route: "properties/overwrite",
148 Auth: "user",
149 Style: "rpc",
150 Arg: arg,
151 ExtraHeaders: nil,
152 }
153
154 var resp []byte
155 var respBody io.ReadCloser
156 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
157 if err != nil {
158 var appErr PropertiesOverwriteAPIError
159 err = auth.ParseError(err, &appErr)
160 if err == &appErr {
161 err = appErr
162 }
163 return
164 }
165
166 _ = resp
167 _ = respBody
168 return
169 }
170
171 //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route
172 type PropertiesRemoveAPIError struct {
173 dropbox.APIError
174 EndpointError *RemovePropertiesError `json:"error"`
175 }
176
177 func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) {
178 req := dropbox.Request{
179 Host: "api",
180 Namespace: "file_properties",
181 Route: "properties/remove",
182 Auth: "user",
183 Style: "rpc",
184 Arg: arg,
185 ExtraHeaders: nil,
186 }
187
188 var resp []byte
189 var respBody io.ReadCloser
190 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
191 if err != nil {
192 var appErr PropertiesRemoveAPIError
193 err = auth.ParseError(err, &appErr)
194 if err == &appErr {
195 err = appErr
196 }
197 return
198 }
199
200 _ = resp
201 _ = respBody
202 return
203 }
204
205 //PropertiesSearchAPIError is an error-wrapper for the properties/search route
206 type PropertiesSearchAPIError struct {
207 dropbox.APIError
208 EndpointError *PropertiesSearchError `json:"error"`
209 }
210
211 func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) {
212 req := dropbox.Request{
213 Host: "api",
214 Namespace: "file_properties",
215 Route: "properties/search",
216 Auth: "user",
217 Style: "rpc",
218 Arg: arg,
219 ExtraHeaders: nil,
220 }
221
222 var resp []byte
223 var respBody io.ReadCloser
224 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
225 if err != nil {
226 var appErr PropertiesSearchAPIError
227 err = auth.ParseError(err, &appErr)
228 if err == &appErr {
229 err = appErr
230 }
231 return
232 }
233
234 err = json.Unmarshal(resp, &res)
235 if err != nil {
236 return
237 }
238
239 _ = respBody
240 return
241 }
242
243 //PropertiesSearchContinueAPIError is an error-wrapper for the properties/search/continue route
244 type PropertiesSearchContinueAPIError struct {
245 dropbox.APIError
246 EndpointError *PropertiesSearchContinueError `json:"error"`
247 }
248
249 func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) {
250 req := dropbox.Request{
251 Host: "api",
252 Namespace: "file_properties",
253 Route: "properties/search/continue",
254 Auth: "user",
255 Style: "rpc",
256 Arg: arg,
257 ExtraHeaders: nil,
258 }
259
260 var resp []byte
261 var respBody io.ReadCloser
262 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
263 if err != nil {
264 var appErr PropertiesSearchContinueAPIError
265 err = auth.ParseError(err, &appErr)
266 if err == &appErr {
267 err = appErr
268 }
269 return
270 }
271
272 err = json.Unmarshal(resp, &res)
273 if err != nil {
274 return
275 }
276
277 _ = respBody
278 return
279 }
280
281 //PropertiesUpdateAPIError is an error-wrapper for the properties/update route
282 type PropertiesUpdateAPIError struct {
283 dropbox.APIError
284 EndpointError *UpdatePropertiesError `json:"error"`
285 }
286
287 func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) {
288 req := dropbox.Request{
289 Host: "api",
290 Namespace: "file_properties",
291 Route: "properties/update",
292 Auth: "user",
293 Style: "rpc",
294 Arg: arg,
295 ExtraHeaders: nil,
296 }
297
298 var resp []byte
299 var respBody io.ReadCloser
300 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
301 if err != nil {
302 var appErr PropertiesUpdateAPIError
303 err = auth.ParseError(err, &appErr)
304 if err == &appErr {
305 err = appErr
306 }
307 return
308 }
309
310 _ = resp
311 _ = respBody
312 return
313 }
314
315 //TemplatesAddForTeamAPIError is an error-wrapper for the templates/add_for_team route
316 type TemplatesAddForTeamAPIError struct {
317 dropbox.APIError
318 EndpointError *ModifyTemplateError `json:"error"`
319 }
320
321 func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
322 req := dropbox.Request{
323 Host: "api",
324 Namespace: "file_properties",
325 Route: "templates/add_for_team",
326 Auth: "team",
327 Style: "rpc",
328 Arg: arg,
329 ExtraHeaders: nil,
330 }
331
332 var resp []byte
333 var respBody io.ReadCloser
334 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
335 if err != nil {
336 var appErr TemplatesAddForTeamAPIError
337 err = auth.ParseError(err, &appErr)
338 if err == &appErr {
339 err = appErr
340 }
341 return
342 }
343
344 err = json.Unmarshal(resp, &res)
345 if err != nil {
346 return
347 }
348
349 _ = respBody
350 return
351 }
352
353 //TemplatesAddForUserAPIError is an error-wrapper for the templates/add_for_user route
354 type TemplatesAddForUserAPIError struct {
355 dropbox.APIError
356 EndpointError *ModifyTemplateError `json:"error"`
357 }
358
359 func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) {
360 req := dropbox.Request{
361 Host: "api",
362 Namespace: "file_properties",
363 Route: "templates/add_for_user",
364 Auth: "user",
365 Style: "rpc",
366 Arg: arg,
367 ExtraHeaders: nil,
368 }
369
370 var resp []byte
371 var respBody io.ReadCloser
372 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
373 if err != nil {
374 var appErr TemplatesAddForUserAPIError
375 err = auth.ParseError(err, &appErr)
376 if err == &appErr {
377 err = appErr
378 }
379 return
380 }
381
382 err = json.Unmarshal(resp, &res)
383 if err != nil {
384 return
385 }
386
387 _ = respBody
388 return
389 }
390
391 //TemplatesGetForTeamAPIError is an error-wrapper for the templates/get_for_team route
392 type TemplatesGetForTeamAPIError struct {
393 dropbox.APIError
394 EndpointError *TemplateError `json:"error"`
395 }
396
397 func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
398 req := dropbox.Request{
399 Host: "api",
400 Namespace: "file_properties",
401 Route: "templates/get_for_team",
402 Auth: "team",
403 Style: "rpc",
404 Arg: arg,
405 ExtraHeaders: nil,
406 }
407
408 var resp []byte
409 var respBody io.ReadCloser
410 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
411 if err != nil {
412 var appErr TemplatesGetForTeamAPIError
413 err = auth.ParseError(err, &appErr)
414 if err == &appErr {
415 err = appErr
416 }
417 return
418 }
419
420 err = json.Unmarshal(resp, &res)
421 if err != nil {
422 return
423 }
424
425 _ = respBody
426 return
427 }
428
429 //TemplatesGetForUserAPIError is an error-wrapper for the templates/get_for_user route
430 type TemplatesGetForUserAPIError struct {
431 dropbox.APIError
432 EndpointError *TemplateError `json:"error"`
433 }
434
435 func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) {
436 req := dropbox.Request{
437 Host: "api",
438 Namespace: "file_properties",
439 Route: "templates/get_for_user",
440 Auth: "user",
441 Style: "rpc",
442 Arg: arg,
443 ExtraHeaders: nil,
444 }
445
446 var resp []byte
447 var respBody io.ReadCloser
448 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
449 if err != nil {
450 var appErr TemplatesGetForUserAPIError
451 err = auth.ParseError(err, &appErr)
452 if err == &appErr {
453 err = appErr
454 }
455 return
456 }
457
458 err = json.Unmarshal(resp, &res)
459 if err != nil {
460 return
461 }
462
463 _ = respBody
464 return
465 }
466
467 //TemplatesListForTeamAPIError is an error-wrapper for the templates/list_for_team route
468 type TemplatesListForTeamAPIError struct {
469 dropbox.APIError
470 EndpointError *TemplateError `json:"error"`
471 }
472
473 func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error) {
474 req := dropbox.Request{
475 Host: "api",
476 Namespace: "file_properties",
477 Route: "templates/list_for_team",
478 Auth: "team",
479 Style: "rpc",
480 Arg: nil,
481 ExtraHeaders: nil,
482 }
483
484 var resp []byte
485 var respBody io.ReadCloser
486 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
487 if err != nil {
488 var appErr TemplatesListForTeamAPIError
489 err = auth.ParseError(err, &appErr)
490 if err == &appErr {
491 err = appErr
492 }
493 return
494 }
495
496 err = json.Unmarshal(resp, &res)
497 if err != nil {
498 return
499 }
500
501 _ = respBody
502 return
503 }
504
505 //TemplatesListForUserAPIError is an error-wrapper for the templates/list_for_user route
506 type TemplatesListForUserAPIError struct {
507 dropbox.APIError
508 EndpointError *TemplateError `json:"error"`
509 }
510
511 func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error) {
512 req := dropbox.Request{
513 Host: "api",
514 Namespace: "file_properties",
515 Route: "templates/list_for_user",
516 Auth: "user",
517 Style: "rpc",
518 Arg: nil,
519 ExtraHeaders: nil,
520 }
521
522 var resp []byte
523 var respBody io.ReadCloser
524 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
525 if err != nil {
526 var appErr TemplatesListForUserAPIError
527 err = auth.ParseError(err, &appErr)
528 if err == &appErr {
529 err = appErr
530 }
531 return
532 }
533
534 err = json.Unmarshal(resp, &res)
535 if err != nil {
536 return
537 }
538
539 _ = respBody
540 return
541 }
542
543 //TemplatesRemoveForTeamAPIError is an error-wrapper for the templates/remove_for_team route
544 type TemplatesRemoveForTeamAPIError struct {
545 dropbox.APIError
546 EndpointError *TemplateError `json:"error"`
547 }
548
549 func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) {
550 req := dropbox.Request{
551 Host: "api",
552 Namespace: "file_properties",
553 Route: "templates/remove_for_team",
554 Auth: "team",
555 Style: "rpc",
556 Arg: arg,
557 ExtraHeaders: nil,
558 }
559
560 var resp []byte
561 var respBody io.ReadCloser
562 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
563 if err != nil {
564 var appErr TemplatesRemoveForTeamAPIError
565 err = auth.ParseError(err, &appErr)
566 if err == &appErr {
567 err = appErr
568 }
569 return
570 }
571
572 _ = resp
573 _ = respBody
574 return
575 }
576
577 //TemplatesRemoveForUserAPIError is an error-wrapper for the templates/remove_for_user route
578 type TemplatesRemoveForUserAPIError struct {
579 dropbox.APIError
580 EndpointError *TemplateError `json:"error"`
581 }
582
583 func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) {
584 req := dropbox.Request{
585 Host: "api",
586 Namespace: "file_properties",
587 Route: "templates/remove_for_user",
588 Auth: "user",
589 Style: "rpc",
590 Arg: arg,
591 ExtraHeaders: nil,
592 }
593
594 var resp []byte
595 var respBody io.ReadCloser
596 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
597 if err != nil {
598 var appErr TemplatesRemoveForUserAPIError
599 err = auth.ParseError(err, &appErr)
600 if err == &appErr {
601 err = appErr
602 }
603 return
604 }
605
606 _ = resp
607 _ = respBody
608 return
609 }
610
611 //TemplatesUpdateForTeamAPIError is an error-wrapper for the templates/update_for_team route
612 type TemplatesUpdateForTeamAPIError struct {
613 dropbox.APIError
614 EndpointError *ModifyTemplateError `json:"error"`
615 }
616
617 func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
618 req := dropbox.Request{
619 Host: "api",
620 Namespace: "file_properties",
621 Route: "templates/update_for_team",
622 Auth: "team",
623 Style: "rpc",
624 Arg: arg,
625 ExtraHeaders: nil,
626 }
627
628 var resp []byte
629 var respBody io.ReadCloser
630 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
631 if err != nil {
632 var appErr TemplatesUpdateForTeamAPIError
633 err = auth.ParseError(err, &appErr)
634 if err == &appErr {
635 err = appErr
636 }
637 return
638 }
639
640 err = json.Unmarshal(resp, &res)
641 if err != nil {
642 return
643 }
644
645 _ = respBody
646 return
647 }
648
649 //TemplatesUpdateForUserAPIError is an error-wrapper for the templates/update_for_user route
650 type TemplatesUpdateForUserAPIError struct {
651 dropbox.APIError
652 EndpointError *ModifyTemplateError `json:"error"`
653 }
654
655 func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) {
656 req := dropbox.Request{
657 Host: "api",
658 Namespace: "file_properties",
659 Route: "templates/update_for_user",
660 Auth: "user",
661 Style: "rpc",
662 Arg: arg,
663 ExtraHeaders: nil,
664 }
665
666 var resp []byte
667 var respBody io.ReadCloser
668 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
669 if err != nil {
670 var appErr TemplatesUpdateForUserAPIError
671 err = auth.ParseError(err, &appErr)
672 if err == &appErr {
673 err = appErr
674 }
675 return
676 }
677
678 err = json.Unmarshal(resp, &res)
679 if err != nil {
680 return
681 }
682
683 _ = respBody
684 return
685 }
686
687 // New returns a Client implementation for this namespace
688 func New(c dropbox.Config) Client {
689 ctx := apiImpl(dropbox.NewContext(c))
690 return &ctx
691 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package file_properties : This namespace contains helpers for property and
21 // template metadata endpoints. These endpoints enable you to tag arbitrary
22 // key/value data to Dropbox files. The most basic unit in this namespace is
23 // the `PropertyField`. These fields encapsulate the actual key/value data.
24 // Fields are added to a Dropbox file using a `PropertyGroup`. Property groups
25 // contain a reference to a Dropbox file and a `PropertyGroupTemplate`. Property
26 // groups are uniquely identified by the combination of their associated Dropbox
27 // file and template. The `PropertyGroupTemplate` is a way of restricting the
28 // possible key names and value types of the data within a property group. The
29 // possible key names and value types are explicitly enumerated using
30 // `PropertyFieldTemplate` objects. You can think of a property group template
31 // as a class definition for a particular key/value metadata object, and the
32 // property groups themselves as the instantiations of these objects. Templates
33 // are owned either by a user/app pair or team/app pair. Templates and their
34 // associated properties can't be accessed by any app other than the app that
35 // created them, and even then, only when the app is linked with the owner of
36 // the template (either a user or team). User-owned templates are accessed via
37 // the user-auth file_properties/templates/*_for_user endpoints, while
38 // team-owned templates are accessed via the team-auth
39 // file_properties/templates/*_for_team endpoints. Properties associated with
40 // either type of template can be accessed via the user-auth properties/*
41 // endpoints. Finally, properties can be accessed from a number of endpoints
42 // that return metadata, including `files/get_metadata`, and
43 // `files/list_folder`. Properties can also be added during upload, using
44 // `files/upload`.
45 package file_properties
46
47 import (
48 "encoding/json"
49
50 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
51 )
52
53 // AddPropertiesArg : has no documentation (yet)
54 type AddPropertiesArg struct {
55 // Path : A unique identifier for the file or folder.
56 Path string `json:"path"`
57 // PropertyGroups : The property groups which are to be added to a Dropbox
58 // file. No two groups in the input should refer to the same template.
59 PropertyGroups []*PropertyGroup `json:"property_groups"`
60 }
61
62 // NewAddPropertiesArg returns a new AddPropertiesArg instance
63 func NewAddPropertiesArg(Path string, PropertyGroups []*PropertyGroup) *AddPropertiesArg {
64 s := new(AddPropertiesArg)
65 s.Path = Path
66 s.PropertyGroups = PropertyGroups
67 return s
68 }
69
70 // TemplateError : has no documentation (yet)
71 type TemplateError struct {
72 dropbox.Tagged
73 // TemplateNotFound : Template does not exist for the given identifier.
74 TemplateNotFound string `json:"template_not_found,omitempty"`
75 }
76
77 // Valid tag values for TemplateError
78 const (
79 TemplateErrorTemplateNotFound = "template_not_found"
80 TemplateErrorRestrictedContent = "restricted_content"
81 TemplateErrorOther = "other"
82 )
83
84 // UnmarshalJSON deserializes into a TemplateError instance
85 func (u *TemplateError) UnmarshalJSON(body []byte) error {
86 type wrap struct {
87 dropbox.Tagged
88 // TemplateNotFound : Template does not exist for the given identifier.
89 TemplateNotFound string `json:"template_not_found,omitempty"`
90 }
91 var w wrap
92 var err error
93 if err = json.Unmarshal(body, &w); err != nil {
94 return err
95 }
96 u.Tag = w.Tag
97 switch u.Tag {
98 case "template_not_found":
99 u.TemplateNotFound = w.TemplateNotFound
100
101 if err != nil {
102 return err
103 }
104 }
105 return nil
106 }
107
108 // PropertiesError : has no documentation (yet)
109 type PropertiesError struct {
110 dropbox.Tagged
111 // TemplateNotFound : Template does not exist for the given identifier.
112 TemplateNotFound string `json:"template_not_found,omitempty"`
113 // Path : has no documentation (yet)
114 Path *LookupError `json:"path,omitempty"`
115 }
116
117 // Valid tag values for PropertiesError
118 const (
119 PropertiesErrorTemplateNotFound = "template_not_found"
120 PropertiesErrorRestrictedContent = "restricted_content"
121 PropertiesErrorOther = "other"
122 PropertiesErrorPath = "path"
123 PropertiesErrorUnsupportedFolder = "unsupported_folder"
124 )
125
126 // UnmarshalJSON deserializes into a PropertiesError instance
127 func (u *PropertiesError) UnmarshalJSON(body []byte) error {
128 type wrap struct {
129 dropbox.Tagged
130 // TemplateNotFound : Template does not exist for the given identifier.
131 TemplateNotFound string `json:"template_not_found,omitempty"`
132 // Path : has no documentation (yet)
133 Path *LookupError `json:"path,omitempty"`
134 }
135 var w wrap
136 var err error
137 if err = json.Unmarshal(body, &w); err != nil {
138 return err
139 }
140 u.Tag = w.Tag
141 switch u.Tag {
142 case "template_not_found":
143 u.TemplateNotFound = w.TemplateNotFound
144
145 if err != nil {
146 return err
147 }
148 case "path":
149 u.Path = w.Path
150
151 if err != nil {
152 return err
153 }
154 }
155 return nil
156 }
157
158 // InvalidPropertyGroupError : has no documentation (yet)
159 type InvalidPropertyGroupError struct {
160 dropbox.Tagged
161 // TemplateNotFound : Template does not exist for the given identifier.
162 TemplateNotFound string `json:"template_not_found,omitempty"`
163 // Path : has no documentation (yet)
164 Path *LookupError `json:"path,omitempty"`
165 }
166
167 // Valid tag values for InvalidPropertyGroupError
168 const (
169 InvalidPropertyGroupErrorTemplateNotFound = "template_not_found"
170 InvalidPropertyGroupErrorRestrictedContent = "restricted_content"
171 InvalidPropertyGroupErrorOther = "other"
172 InvalidPropertyGroupErrorPath = "path"
173 InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder"
174 InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large"
175 InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template"
176 InvalidPropertyGroupErrorDuplicatePropertyGroups = "duplicate_property_groups"
177 )
178
179 // UnmarshalJSON deserializes into a InvalidPropertyGroupError instance
180 func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error {
181 type wrap struct {
182 dropbox.Tagged
183 // TemplateNotFound : Template does not exist for the given identifier.
184 TemplateNotFound string `json:"template_not_found,omitempty"`
185 // Path : has no documentation (yet)
186 Path *LookupError `json:"path,omitempty"`
187 }
188 var w wrap
189 var err error
190 if err = json.Unmarshal(body, &w); err != nil {
191 return err
192 }
193 u.Tag = w.Tag
194 switch u.Tag {
195 case "template_not_found":
196 u.TemplateNotFound = w.TemplateNotFound
197
198 if err != nil {
199 return err
200 }
201 case "path":
202 u.Path = w.Path
203
204 if err != nil {
205 return err
206 }
207 }
208 return nil
209 }
210
211 // AddPropertiesError : has no documentation (yet)
212 type AddPropertiesError struct {
213 dropbox.Tagged
214 // TemplateNotFound : Template does not exist for the given identifier.
215 TemplateNotFound string `json:"template_not_found,omitempty"`
216 // Path : has no documentation (yet)
217 Path *LookupError `json:"path,omitempty"`
218 }
219
220 // Valid tag values for AddPropertiesError
221 const (
222 AddPropertiesErrorTemplateNotFound = "template_not_found"
223 AddPropertiesErrorRestrictedContent = "restricted_content"
224 AddPropertiesErrorOther = "other"
225 AddPropertiesErrorPath = "path"
226 AddPropertiesErrorUnsupportedFolder = "unsupported_folder"
227 AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
228 AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
229 AddPropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
230 AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_exists"
231 )
232
233 // UnmarshalJSON deserializes into a AddPropertiesError instance
234 func (u *AddPropertiesError) UnmarshalJSON(body []byte) error {
235 type wrap struct {
236 dropbox.Tagged
237 // TemplateNotFound : Template does not exist for the given identifier.
238 TemplateNotFound string `json:"template_not_found,omitempty"`
239 // Path : has no documentation (yet)
240 Path *LookupError `json:"path,omitempty"`
241 }
242 var w wrap
243 var err error
244 if err = json.Unmarshal(body, &w); err != nil {
245 return err
246 }
247 u.Tag = w.Tag
248 switch u.Tag {
249 case "template_not_found":
250 u.TemplateNotFound = w.TemplateNotFound
251
252 if err != nil {
253 return err
254 }
255 case "path":
256 u.Path = w.Path
257
258 if err != nil {
259 return err
260 }
261 }
262 return nil
263 }
264
265 // PropertyGroupTemplate : Defines how a property group may be structured.
266 type PropertyGroupTemplate struct {
267 // Name : Display name for the template. Template names can be up to 256
268 // bytes.
269 Name string `json:"name"`
270 // Description : Description for the template. Template descriptions can be
271 // up to 1024 bytes.
272 Description string `json:"description"`
273 // Fields : Definitions of the property fields associated with this
274 // template. There can be up to 32 properties in a single template.
275 Fields []*PropertyFieldTemplate `json:"fields"`
276 }
277
278 // NewPropertyGroupTemplate returns a new PropertyGroupTemplate instance
279 func NewPropertyGroupTemplate(Name string, Description string, Fields []*PropertyFieldTemplate) *PropertyGroupTemplate {
280 s := new(PropertyGroupTemplate)
281 s.Name = Name
282 s.Description = Description
283 s.Fields = Fields
284 return s
285 }
286
287 // AddTemplateArg : has no documentation (yet)
288 type AddTemplateArg struct {
289 PropertyGroupTemplate
290 }
291
292 // NewAddTemplateArg returns a new AddTemplateArg instance
293 func NewAddTemplateArg(Name string, Description string, Fields []*PropertyFieldTemplate) *AddTemplateArg {
294 s := new(AddTemplateArg)
295 s.Name = Name
296 s.Description = Description
297 s.Fields = Fields
298 return s
299 }
300
301 // AddTemplateResult : has no documentation (yet)
302 type AddTemplateResult struct {
303 // TemplateId : An identifier for template added by See
304 // `templatesAddForUser` or `templatesAddForTeam`.
305 TemplateId string `json:"template_id"`
306 }
307
308 // NewAddTemplateResult returns a new AddTemplateResult instance
309 func NewAddTemplateResult(TemplateId string) *AddTemplateResult {
310 s := new(AddTemplateResult)
311 s.TemplateId = TemplateId
312 return s
313 }
314
315 // GetTemplateArg : has no documentation (yet)
316 type GetTemplateArg struct {
317 // TemplateId : An identifier for template added by route See
318 // `templatesAddForUser` or `templatesAddForTeam`.
319 TemplateId string `json:"template_id"`
320 }
321
322 // NewGetTemplateArg returns a new GetTemplateArg instance
323 func NewGetTemplateArg(TemplateId string) *GetTemplateArg {
324 s := new(GetTemplateArg)
325 s.TemplateId = TemplateId
326 return s
327 }
328
329 // GetTemplateResult : has no documentation (yet)
330 type GetTemplateResult struct {
331 PropertyGroupTemplate
332 }
333
334 // NewGetTemplateResult returns a new GetTemplateResult instance
335 func NewGetTemplateResult(Name string, Description string, Fields []*PropertyFieldTemplate) *GetTemplateResult {
336 s := new(GetTemplateResult)
337 s.Name = Name
338 s.Description = Description
339 s.Fields = Fields
340 return s
341 }
342
343 // ListTemplateResult : has no documentation (yet)
344 type ListTemplateResult struct {
345 // TemplateIds : List of identifiers for templates added by See
346 // `templatesAddForUser` or `templatesAddForTeam`.
347 TemplateIds []string `json:"template_ids"`
348 }
349
350 // NewListTemplateResult returns a new ListTemplateResult instance
351 func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
352 s := new(ListTemplateResult)
353 s.TemplateIds = TemplateIds
354 return s
355 }
356
357 // LogicalOperator : Logical operator to join search queries together.
358 type LogicalOperator struct {
359 dropbox.Tagged
360 }
361
362 // Valid tag values for LogicalOperator
363 const (
364 LogicalOperatorOrOperator = "or_operator"
365 LogicalOperatorOther = "other"
366 )
367
368 // LookUpPropertiesError : has no documentation (yet)
369 type LookUpPropertiesError struct {
370 dropbox.Tagged
371 }
372
373 // Valid tag values for LookUpPropertiesError
374 const (
375 LookUpPropertiesErrorPropertyGroupNotFound = "property_group_not_found"
376 LookUpPropertiesErrorOther = "other"
377 )
378
379 // LookupError : has no documentation (yet)
380 type LookupError struct {
381 dropbox.Tagged
382 // MalformedPath : has no documentation (yet)
383 MalformedPath string `json:"malformed_path,omitempty"`
384 }
385
386 // Valid tag values for LookupError
387 const (
388 LookupErrorMalformedPath = "malformed_path"
389 LookupErrorNotFound = "not_found"
390 LookupErrorNotFile = "not_file"
391 LookupErrorNotFolder = "not_folder"
392 LookupErrorRestrictedContent = "restricted_content"
393 LookupErrorOther = "other"
394 )
395
396 // UnmarshalJSON deserializes into a LookupError instance
397 func (u *LookupError) UnmarshalJSON(body []byte) error {
398 type wrap struct {
399 dropbox.Tagged
400 // MalformedPath : has no documentation (yet)
401 MalformedPath string `json:"malformed_path,omitempty"`
402 }
403 var w wrap
404 var err error
405 if err = json.Unmarshal(body, &w); err != nil {
406 return err
407 }
408 u.Tag = w.Tag
409 switch u.Tag {
410 case "malformed_path":
411 u.MalformedPath = w.MalformedPath
412
413 if err != nil {
414 return err
415 }
416 }
417 return nil
418 }
419
420 // ModifyTemplateError : has no documentation (yet)
421 type ModifyTemplateError struct {
422 dropbox.Tagged
423 // TemplateNotFound : Template does not exist for the given identifier.
424 TemplateNotFound string `json:"template_not_found,omitempty"`
425 }
426
427 // Valid tag values for ModifyTemplateError
428 const (
429 ModifyTemplateErrorTemplateNotFound = "template_not_found"
430 ModifyTemplateErrorRestrictedContent = "restricted_content"
431 ModifyTemplateErrorOther = "other"
432 ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names"
433 ModifyTemplateErrorTooManyProperties = "too_many_properties"
434 ModifyTemplateErrorTooManyTemplates = "too_many_templates"
435 ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large"
436 )
437
438 // UnmarshalJSON deserializes into a ModifyTemplateError instance
439 func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error {
440 type wrap struct {
441 dropbox.Tagged
442 // TemplateNotFound : Template does not exist for the given identifier.
443 TemplateNotFound string `json:"template_not_found,omitempty"`
444 }
445 var w wrap
446 var err error
447 if err = json.Unmarshal(body, &w); err != nil {
448 return err
449 }
450 u.Tag = w.Tag
451 switch u.Tag {
452 case "template_not_found":
453 u.TemplateNotFound = w.TemplateNotFound
454
455 if err != nil {
456 return err
457 }
458 }
459 return nil
460 }
461
462 // OverwritePropertyGroupArg : has no documentation (yet)
463 type OverwritePropertyGroupArg struct {
464 // Path : A unique identifier for the file or folder.
465 Path string `json:"path"`
466 // PropertyGroups : The property groups "snapshot" updates to force apply.
467 // No two groups in the input should refer to the same template.
468 PropertyGroups []*PropertyGroup `json:"property_groups"`
469 }
470
471 // NewOverwritePropertyGroupArg returns a new OverwritePropertyGroupArg instance
472 func NewOverwritePropertyGroupArg(Path string, PropertyGroups []*PropertyGroup) *OverwritePropertyGroupArg {
473 s := new(OverwritePropertyGroupArg)
474 s.Path = Path
475 s.PropertyGroups = PropertyGroups
476 return s
477 }
478
479 // PropertiesSearchArg : has no documentation (yet)
480 type PropertiesSearchArg struct {
481 // Queries : Queries to search.
482 Queries []*PropertiesSearchQuery `json:"queries"`
483 // TemplateFilter : Filter results to contain only properties associated
484 // with these template IDs.
485 TemplateFilter *TemplateFilter `json:"template_filter"`
486 }
487
488 // NewPropertiesSearchArg returns a new PropertiesSearchArg instance
489 func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *PropertiesSearchArg {
490 s := new(PropertiesSearchArg)
491 s.Queries = Queries
492 s.TemplateFilter = &TemplateFilter{Tagged: dropbox.Tagged{Tag: "filter_none"}}
493 return s
494 }
495
496 // PropertiesSearchContinueArg : has no documentation (yet)
497 type PropertiesSearchContinueArg struct {
498 // Cursor : The cursor returned by your last call to `propertiesSearch` or
499 // `propertiesSearchContinue`.
500 Cursor string `json:"cursor"`
501 }
502
503 // NewPropertiesSearchContinueArg returns a new PropertiesSearchContinueArg instance
504 func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchContinueArg {
505 s := new(PropertiesSearchContinueArg)
506 s.Cursor = Cursor
507 return s
508 }
509
510 // PropertiesSearchContinueError : has no documentation (yet)
511 type PropertiesSearchContinueError struct {
512 dropbox.Tagged
513 }
514
515 // Valid tag values for PropertiesSearchContinueError
516 const (
517 PropertiesSearchContinueErrorReset = "reset"
518 PropertiesSearchContinueErrorOther = "other"
519 )
520
521 // PropertiesSearchError : has no documentation (yet)
522 type PropertiesSearchError struct {
523 dropbox.Tagged
524 // PropertyGroupLookup : has no documentation (yet)
525 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
526 }
527
528 // Valid tag values for PropertiesSearchError
529 const (
530 PropertiesSearchErrorPropertyGroupLookup = "property_group_lookup"
531 PropertiesSearchErrorOther = "other"
532 )
533
534 // UnmarshalJSON deserializes into a PropertiesSearchError instance
535 func (u *PropertiesSearchError) UnmarshalJSON(body []byte) error {
536 type wrap struct {
537 dropbox.Tagged
538 // PropertyGroupLookup : has no documentation (yet)
539 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
540 }
541 var w wrap
542 var err error
543 if err = json.Unmarshal(body, &w); err != nil {
544 return err
545 }
546 u.Tag = w.Tag
547 switch u.Tag {
548 case "property_group_lookup":
549 u.PropertyGroupLookup = w.PropertyGroupLookup
550
551 if err != nil {
552 return err
553 }
554 }
555 return nil
556 }
557
558 // PropertiesSearchMatch : has no documentation (yet)
559 type PropertiesSearchMatch struct {
560 // Id : The ID for the matched file or folder.
561 Id string `json:"id"`
562 // Path : The path for the matched file or folder.
563 Path string `json:"path"`
564 // IsDeleted : Whether the file or folder is deleted.
565 IsDeleted bool `json:"is_deleted"`
566 // PropertyGroups : List of custom property groups associated with the file.
567 PropertyGroups []*PropertyGroup `json:"property_groups"`
568 }
569
570 // NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance
571 func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch {
572 s := new(PropertiesSearchMatch)
573 s.Id = Id
574 s.Path = Path
575 s.IsDeleted = IsDeleted
576 s.PropertyGroups = PropertyGroups
577 return s
578 }
579
580 // PropertiesSearchMode : has no documentation (yet)
581 type PropertiesSearchMode struct {
582 dropbox.Tagged
583 // FieldName : Search for a value associated with this field name.
584 FieldName string `json:"field_name,omitempty"`
585 }
586
587 // Valid tag values for PropertiesSearchMode
588 const (
589 PropertiesSearchModeFieldName = "field_name"
590 PropertiesSearchModeOther = "other"
591 )
592
593 // UnmarshalJSON deserializes into a PropertiesSearchMode instance
594 func (u *PropertiesSearchMode) UnmarshalJSON(body []byte) error {
595 type wrap struct {
596 dropbox.Tagged
597 // FieldName : Search for a value associated with this field name.
598 FieldName string `json:"field_name,omitempty"`
599 }
600 var w wrap
601 var err error
602 if err = json.Unmarshal(body, &w); err != nil {
603 return err
604 }
605 u.Tag = w.Tag
606 switch u.Tag {
607 case "field_name":
608 u.FieldName = w.FieldName
609
610 if err != nil {
611 return err
612 }
613 }
614 return nil
615 }
616
617 // PropertiesSearchQuery : has no documentation (yet)
618 type PropertiesSearchQuery struct {
619 // Query : The property field value for which to search across templates.
620 Query string `json:"query"`
621 // Mode : The mode with which to perform the search.
622 Mode *PropertiesSearchMode `json:"mode"`
623 // LogicalOperator : The logical operator with which to append the query.
624 LogicalOperator *LogicalOperator `json:"logical_operator"`
625 }
626
627 // NewPropertiesSearchQuery returns a new PropertiesSearchQuery instance
628 func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) *PropertiesSearchQuery {
629 s := new(PropertiesSearchQuery)
630 s.Query = Query
631 s.Mode = Mode
632 s.LogicalOperator = &LogicalOperator{Tagged: dropbox.Tagged{Tag: "or_operator"}}
633 return s
634 }
635
636 // PropertiesSearchResult : has no documentation (yet)
637 type PropertiesSearchResult struct {
638 // Matches : A list (possibly empty) of matches for the query.
639 Matches []*PropertiesSearchMatch `json:"matches"`
640 // Cursor : Pass the cursor into `propertiesSearchContinue` to continue to
641 // receive search results. Cursor will be null when there are no more
642 // results.
643 Cursor string `json:"cursor,omitempty"`
644 }
645
646 // NewPropertiesSearchResult returns a new PropertiesSearchResult instance
647 func NewPropertiesSearchResult(Matches []*PropertiesSearchMatch) *PropertiesSearchResult {
648 s := new(PropertiesSearchResult)
649 s.Matches = Matches
650 return s
651 }
652
653 // PropertyField : Raw key/value data to be associated with a Dropbox file.
654 // Property fields are added to Dropbox files as a `PropertyGroup`.
655 type PropertyField struct {
656 // Name : Key of the property field associated with a file and template.
657 // Keys can be up to 256 bytes.
658 Name string `json:"name"`
659 // Value : Value of the property field associated with a file and template.
660 // Values can be up to 1024 bytes.
661 Value string `json:"value"`
662 }
663
664 // NewPropertyField returns a new PropertyField instance
665 func NewPropertyField(Name string, Value string) *PropertyField {
666 s := new(PropertyField)
667 s.Name = Name
668 s.Value = Value
669 return s
670 }
671
672 // PropertyFieldTemplate : Defines how a single property field may be
673 // structured. Used exclusively by `PropertyGroupTemplate`.
674 type PropertyFieldTemplate struct {
675 // Name : Key of the property field being described. Property field keys can
676 // be up to 256 bytes.
677 Name string `json:"name"`
678 // Description : Description of the property field. Property field
679 // descriptions can be up to 1024 bytes.
680 Description string `json:"description"`
681 // Type : Data type of the value of this property field. This type will be
682 // enforced upon property creation and modifications.
683 Type *PropertyType `json:"type"`
684 }
685
686 // NewPropertyFieldTemplate returns a new PropertyFieldTemplate instance
687 func NewPropertyFieldTemplate(Name string, Description string, Type *PropertyType) *PropertyFieldTemplate {
688 s := new(PropertyFieldTemplate)
689 s.Name = Name
690 s.Description = Description
691 s.Type = Type
692 return s
693 }
694
695 // PropertyGroup : A subset of the property fields described by the
696 // corresponding `PropertyGroupTemplate`. Properties are always added to a
697 // Dropbox file as a `PropertyGroup`. The possible key names and value types in
698 // this group are defined by the corresponding `PropertyGroupTemplate`.
699 type PropertyGroup struct {
700 // TemplateId : A unique identifier for the associated template.
701 TemplateId string `json:"template_id"`
702 // Fields : The actual properties associated with the template. There can be
703 // up to 32 property types per template.
704 Fields []*PropertyField `json:"fields"`
705 }
706
707 // NewPropertyGroup returns a new PropertyGroup instance
708 func NewPropertyGroup(TemplateId string, Fields []*PropertyField) *PropertyGroup {
709 s := new(PropertyGroup)
710 s.TemplateId = TemplateId
711 s.Fields = Fields
712 return s
713 }
714
715 // PropertyGroupUpdate : has no documentation (yet)
716 type PropertyGroupUpdate struct {
717 // TemplateId : A unique identifier for a property template.
718 TemplateId string `json:"template_id"`
719 // AddOrUpdateFields : Property fields to update. If the property field
720 // already exists, it is updated. If the property field doesn't exist, the
721 // property group is added.
722 AddOrUpdateFields []*PropertyField `json:"add_or_update_fields,omitempty"`
723 // RemoveFields : Property fields to remove (by name), provided they exist.
724 RemoveFields []string `json:"remove_fields,omitempty"`
725 }
726
727 // NewPropertyGroupUpdate returns a new PropertyGroupUpdate instance
728 func NewPropertyGroupUpdate(TemplateId string) *PropertyGroupUpdate {
729 s := new(PropertyGroupUpdate)
730 s.TemplateId = TemplateId
731 return s
732 }
733
734 // PropertyType : Data type of the given property field added.
735 type PropertyType struct {
736 dropbox.Tagged
737 }
738
739 // Valid tag values for PropertyType
740 const (
741 PropertyTypeString = "string"
742 PropertyTypeOther = "other"
743 )
744
745 // RemovePropertiesArg : has no documentation (yet)
746 type RemovePropertiesArg struct {
747 // Path : A unique identifier for the file or folder.
748 Path string `json:"path"`
749 // PropertyTemplateIds : A list of identifiers for a template created by
750 // `templatesAddForUser` or `templatesAddForTeam`.
751 PropertyTemplateIds []string `json:"property_template_ids"`
752 }
753
754 // NewRemovePropertiesArg returns a new RemovePropertiesArg instance
755 func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *RemovePropertiesArg {
756 s := new(RemovePropertiesArg)
757 s.Path = Path
758 s.PropertyTemplateIds = PropertyTemplateIds
759 return s
760 }
761
762 // RemovePropertiesError : has no documentation (yet)
763 type RemovePropertiesError struct {
764 dropbox.Tagged
765 // TemplateNotFound : Template does not exist for the given identifier.
766 TemplateNotFound string `json:"template_not_found,omitempty"`
767 // Path : has no documentation (yet)
768 Path *LookupError `json:"path,omitempty"`
769 // PropertyGroupLookup : has no documentation (yet)
770 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
771 }
772
773 // Valid tag values for RemovePropertiesError
774 const (
775 RemovePropertiesErrorTemplateNotFound = "template_not_found"
776 RemovePropertiesErrorRestrictedContent = "restricted_content"
777 RemovePropertiesErrorOther = "other"
778 RemovePropertiesErrorPath = "path"
779 RemovePropertiesErrorUnsupportedFolder = "unsupported_folder"
780 RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup"
781 )
782
783 // UnmarshalJSON deserializes into a RemovePropertiesError instance
784 func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error {
785 type wrap struct {
786 dropbox.Tagged
787 // TemplateNotFound : Template does not exist for the given identifier.
788 TemplateNotFound string `json:"template_not_found,omitempty"`
789 // Path : has no documentation (yet)
790 Path *LookupError `json:"path,omitempty"`
791 // PropertyGroupLookup : has no documentation (yet)
792 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
793 }
794 var w wrap
795 var err error
796 if err = json.Unmarshal(body, &w); err != nil {
797 return err
798 }
799 u.Tag = w.Tag
800 switch u.Tag {
801 case "template_not_found":
802 u.TemplateNotFound = w.TemplateNotFound
803
804 if err != nil {
805 return err
806 }
807 case "path":
808 u.Path = w.Path
809
810 if err != nil {
811 return err
812 }
813 case "property_group_lookup":
814 u.PropertyGroupLookup = w.PropertyGroupLookup
815
816 if err != nil {
817 return err
818 }
819 }
820 return nil
821 }
822
823 // RemoveTemplateArg : has no documentation (yet)
824 type RemoveTemplateArg struct {
825 // TemplateId : An identifier for a template created by
826 // `templatesAddForUser` or `templatesAddForTeam`.
827 TemplateId string `json:"template_id"`
828 }
829
830 // NewRemoveTemplateArg returns a new RemoveTemplateArg instance
831 func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg {
832 s := new(RemoveTemplateArg)
833 s.TemplateId = TemplateId
834 return s
835 }
836
837 // TemplateFilterBase : has no documentation (yet)
838 type TemplateFilterBase struct {
839 dropbox.Tagged
840 // FilterSome : Only templates with an ID in the supplied list will be
841 // returned (a subset of templates will be returned).
842 FilterSome []string `json:"filter_some,omitempty"`
843 }
844
845 // Valid tag values for TemplateFilterBase
846 const (
847 TemplateFilterBaseFilterSome = "filter_some"
848 TemplateFilterBaseOther = "other"
849 )
850
851 // UnmarshalJSON deserializes into a TemplateFilterBase instance
852 func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error {
853 type wrap struct {
854 dropbox.Tagged
855 // FilterSome : Only templates with an ID in the supplied list will be
856 // returned (a subset of templates will be returned).
857 FilterSome []string `json:"filter_some,omitempty"`
858 }
859 var w wrap
860 var err error
861 if err = json.Unmarshal(body, &w); err != nil {
862 return err
863 }
864 u.Tag = w.Tag
865 switch u.Tag {
866 case "filter_some":
867 u.FilterSome = w.FilterSome
868
869 if err != nil {
870 return err
871 }
872 }
873 return nil
874 }
875
876 // TemplateFilter : has no documentation (yet)
877 type TemplateFilter struct {
878 dropbox.Tagged
879 // FilterSome : Only templates with an ID in the supplied list will be
880 // returned (a subset of templates will be returned).
881 FilterSome []string `json:"filter_some,omitempty"`
882 }
883
884 // Valid tag values for TemplateFilter
885 const (
886 TemplateFilterFilterSome = "filter_some"
887 TemplateFilterOther = "other"
888 TemplateFilterFilterNone = "filter_none"
889 )
890
891 // UnmarshalJSON deserializes into a TemplateFilter instance
892 func (u *TemplateFilter) UnmarshalJSON(body []byte) error {
893 type wrap struct {
894 dropbox.Tagged
895 // FilterSome : Only templates with an ID in the supplied list will be
896 // returned (a subset of templates will be returned).
897 FilterSome []string `json:"filter_some,omitempty"`
898 }
899 var w wrap
900 var err error
901 if err = json.Unmarshal(body, &w); err != nil {
902 return err
903 }
904 u.Tag = w.Tag
905 switch u.Tag {
906 case "filter_some":
907 u.FilterSome = w.FilterSome
908
909 if err != nil {
910 return err
911 }
912 }
913 return nil
914 }
915
916 // TemplateOwnerType : has no documentation (yet)
917 type TemplateOwnerType struct {
918 dropbox.Tagged
919 }
920
921 // Valid tag values for TemplateOwnerType
922 const (
923 TemplateOwnerTypeUser = "user"
924 TemplateOwnerTypeTeam = "team"
925 TemplateOwnerTypeOther = "other"
926 )
927
928 // UpdatePropertiesArg : has no documentation (yet)
929 type UpdatePropertiesArg struct {
930 // Path : A unique identifier for the file or folder.
931 Path string `json:"path"`
932 // UpdatePropertyGroups : The property groups "delta" updates to apply.
933 UpdatePropertyGroups []*PropertyGroupUpdate `json:"update_property_groups"`
934 }
935
936 // NewUpdatePropertiesArg returns a new UpdatePropertiesArg instance
937 func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUpdate) *UpdatePropertiesArg {
938 s := new(UpdatePropertiesArg)
939 s.Path = Path
940 s.UpdatePropertyGroups = UpdatePropertyGroups
941 return s
942 }
943
944 // UpdatePropertiesError : has no documentation (yet)
945 type UpdatePropertiesError struct {
946 dropbox.Tagged
947 // TemplateNotFound : Template does not exist for the given identifier.
948 TemplateNotFound string `json:"template_not_found,omitempty"`
949 // Path : has no documentation (yet)
950 Path *LookupError `json:"path,omitempty"`
951 // PropertyGroupLookup : has no documentation (yet)
952 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
953 }
954
955 // Valid tag values for UpdatePropertiesError
956 const (
957 UpdatePropertiesErrorTemplateNotFound = "template_not_found"
958 UpdatePropertiesErrorRestrictedContent = "restricted_content"
959 UpdatePropertiesErrorOther = "other"
960 UpdatePropertiesErrorPath = "path"
961 UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder"
962 UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large"
963 UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template"
964 UpdatePropertiesErrorDuplicatePropertyGroups = "duplicate_property_groups"
965 UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup"
966 )
967
968 // UnmarshalJSON deserializes into a UpdatePropertiesError instance
969 func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error {
970 type wrap struct {
971 dropbox.Tagged
972 // TemplateNotFound : Template does not exist for the given identifier.
973 TemplateNotFound string `json:"template_not_found,omitempty"`
974 // Path : has no documentation (yet)
975 Path *LookupError `json:"path,omitempty"`
976 // PropertyGroupLookup : has no documentation (yet)
977 PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"`
978 }
979 var w wrap
980 var err error
981 if err = json.Unmarshal(body, &w); err != nil {
982 return err
983 }
984 u.Tag = w.Tag
985 switch u.Tag {
986 case "template_not_found":
987 u.TemplateNotFound = w.TemplateNotFound
988
989 if err != nil {
990 return err
991 }
992 case "path":
993 u.Path = w.Path
994
995 if err != nil {
996 return err
997 }
998 case "property_group_lookup":
999 u.PropertyGroupLookup = w.PropertyGroupLookup
1000
1001 if err != nil {
1002 return err
1003 }
1004 }
1005 return nil
1006 }
1007
1008 // UpdateTemplateArg : has no documentation (yet)
1009 type UpdateTemplateArg struct {
1010 // TemplateId : An identifier for template added by See
1011 // `templatesAddForUser` or `templatesAddForTeam`.
1012 TemplateId string `json:"template_id"`
1013 // Name : A display name for the template. template names can be up to 256
1014 // bytes.
1015 Name string `json:"name,omitempty"`
1016 // Description : Description for the new template. Template descriptions can
1017 // be up to 1024 bytes.
1018 Description string `json:"description,omitempty"`
1019 // AddFields : Property field templates to be added to the group template.
1020 // There can be up to 32 properties in a single template.
1021 AddFields []*PropertyFieldTemplate `json:"add_fields,omitempty"`
1022 }
1023
1024 // NewUpdateTemplateArg returns a new UpdateTemplateArg instance
1025 func NewUpdateTemplateArg(TemplateId string) *UpdateTemplateArg {
1026 s := new(UpdateTemplateArg)
1027 s.TemplateId = TemplateId
1028 return s
1029 }
1030
1031 // UpdateTemplateResult : has no documentation (yet)
1032 type UpdateTemplateResult struct {
1033 // TemplateId : An identifier for template added by route See
1034 // `templatesAddForUser` or `templatesAddForTeam`.
1035 TemplateId string `json:"template_id"`
1036 }
1037
1038 // NewUpdateTemplateResult returns a new UpdateTemplateResult instance
1039 func NewUpdateTemplateResult(TemplateId string) *UpdateTemplateResult {
1040 s := new(UpdateTemplateResult)
1041 s.TemplateId = TemplateId
1042 return s
1043 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package file_requests
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // Count : Returns the total number of file requests owned by this user.
33 // Includes both open and closed file requests.
34 Count() (res *CountFileRequestsResult, err error)
35 // Create : Creates a file request for this user.
36 Create(arg *CreateFileRequestArgs) (res *FileRequest, err error)
37 // Delete : Delete a batch of closed file requests.
38 Delete(arg *DeleteFileRequestArgs) (res *DeleteFileRequestsResult, err error)
39 // DeleteAllClosed : Delete all closed file requests owned by this user.
40 DeleteAllClosed() (res *DeleteAllClosedFileRequestsResult, err error)
41 // Get : Returns the specified file request.
42 Get(arg *GetFileRequestArgs) (res *FileRequest, err error)
43 // List : Returns a list of file requests owned by this user. For apps with
44 // the app folder permission, this will only return file requests with
45 // destinations in the app folder.
46 ListV2(arg *ListFileRequestsArg) (res *ListFileRequestsV2Result, err error)
47 // List : Returns a list of file requests owned by this user. For apps with
48 // the app folder permission, this will only return file requests with
49 // destinations in the app folder.
50 List() (res *ListFileRequestsResult, err error)
51 // ListContinue : Once a cursor has been retrieved from `list`, use this to
52 // paginate through all file requests. The cursor must come from a previous
53 // call to `list` or `listContinue`.
54 ListContinue(arg *ListFileRequestsContinueArg) (res *ListFileRequestsV2Result, err error)
55 // Update : Update a file request.
56 Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error)
57 }
58
59 type apiImpl dropbox.Context
60
61 //CountAPIError is an error-wrapper for the count route
62 type CountAPIError struct {
63 dropbox.APIError
64 EndpointError *CountFileRequestsError `json:"error"`
65 }
66
67 func (dbx *apiImpl) Count() (res *CountFileRequestsResult, err error) {
68 req := dropbox.Request{
69 Host: "api",
70 Namespace: "file_requests",
71 Route: "count",
72 Auth: "user",
73 Style: "rpc",
74 Arg: nil,
75 ExtraHeaders: nil,
76 }
77
78 var resp []byte
79 var respBody io.ReadCloser
80 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
81 if err != nil {
82 var appErr CountAPIError
83 err = auth.ParseError(err, &appErr)
84 if err == &appErr {
85 err = appErr
86 }
87 return
88 }
89
90 err = json.Unmarshal(resp, &res)
91 if err != nil {
92 return
93 }
94
95 _ = respBody
96 return
97 }
98
99 //CreateAPIError is an error-wrapper for the create route
100 type CreateAPIError struct {
101 dropbox.APIError
102 EndpointError *CreateFileRequestError `json:"error"`
103 }
104
105 func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) {
106 req := dropbox.Request{
107 Host: "api",
108 Namespace: "file_requests",
109 Route: "create",
110 Auth: "user",
111 Style: "rpc",
112 Arg: arg,
113 ExtraHeaders: nil,
114 }
115
116 var resp []byte
117 var respBody io.ReadCloser
118 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
119 if err != nil {
120 var appErr CreateAPIError
121 err = auth.ParseError(err, &appErr)
122 if err == &appErr {
123 err = appErr
124 }
125 return
126 }
127
128 err = json.Unmarshal(resp, &res)
129 if err != nil {
130 return
131 }
132
133 _ = respBody
134 return
135 }
136
137 //DeleteAPIError is an error-wrapper for the delete route
138 type DeleteAPIError struct {
139 dropbox.APIError
140 EndpointError *DeleteFileRequestError `json:"error"`
141 }
142
143 func (dbx *apiImpl) Delete(arg *DeleteFileRequestArgs) (res *DeleteFileRequestsResult, err error) {
144 req := dropbox.Request{
145 Host: "api",
146 Namespace: "file_requests",
147 Route: "delete",
148 Auth: "user",
149 Style: "rpc",
150 Arg: arg,
151 ExtraHeaders: nil,
152 }
153
154 var resp []byte
155 var respBody io.ReadCloser
156 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
157 if err != nil {
158 var appErr DeleteAPIError
159 err = auth.ParseError(err, &appErr)
160 if err == &appErr {
161 err = appErr
162 }
163 return
164 }
165
166 err = json.Unmarshal(resp, &res)
167 if err != nil {
168 return
169 }
170
171 _ = respBody
172 return
173 }
174
175 //DeleteAllClosedAPIError is an error-wrapper for the delete_all_closed route
176 type DeleteAllClosedAPIError struct {
177 dropbox.APIError
178 EndpointError *DeleteAllClosedFileRequestsError `json:"error"`
179 }
180
181 func (dbx *apiImpl) DeleteAllClosed() (res *DeleteAllClosedFileRequestsResult, err error) {
182 req := dropbox.Request{
183 Host: "api",
184 Namespace: "file_requests",
185 Route: "delete_all_closed",
186 Auth: "user",
187 Style: "rpc",
188 Arg: nil,
189 ExtraHeaders: nil,
190 }
191
192 var resp []byte
193 var respBody io.ReadCloser
194 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
195 if err != nil {
196 var appErr DeleteAllClosedAPIError
197 err = auth.ParseError(err, &appErr)
198 if err == &appErr {
199 err = appErr
200 }
201 return
202 }
203
204 err = json.Unmarshal(resp, &res)
205 if err != nil {
206 return
207 }
208
209 _ = respBody
210 return
211 }
212
213 //GetAPIError is an error-wrapper for the get route
214 type GetAPIError struct {
215 dropbox.APIError
216 EndpointError *GetFileRequestError `json:"error"`
217 }
218
219 func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) {
220 req := dropbox.Request{
221 Host: "api",
222 Namespace: "file_requests",
223 Route: "get",
224 Auth: "user",
225 Style: "rpc",
226 Arg: arg,
227 ExtraHeaders: nil,
228 }
229
230 var resp []byte
231 var respBody io.ReadCloser
232 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
233 if err != nil {
234 var appErr GetAPIError
235 err = auth.ParseError(err, &appErr)
236 if err == &appErr {
237 err = appErr
238 }
239 return
240 }
241
242 err = json.Unmarshal(resp, &res)
243 if err != nil {
244 return
245 }
246
247 _ = respBody
248 return
249 }
250
251 //ListV2APIError is an error-wrapper for the list_v2 route
252 type ListV2APIError struct {
253 dropbox.APIError
254 EndpointError *ListFileRequestsError `json:"error"`
255 }
256
257 func (dbx *apiImpl) ListV2(arg *ListFileRequestsArg) (res *ListFileRequestsV2Result, err error) {
258 req := dropbox.Request{
259 Host: "api",
260 Namespace: "file_requests",
261 Route: "list_v2",
262 Auth: "user",
263 Style: "rpc",
264 Arg: arg,
265 ExtraHeaders: nil,
266 }
267
268 var resp []byte
269 var respBody io.ReadCloser
270 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
271 if err != nil {
272 var appErr ListV2APIError
273 err = auth.ParseError(err, &appErr)
274 if err == &appErr {
275 err = appErr
276 }
277 return
278 }
279
280 err = json.Unmarshal(resp, &res)
281 if err != nil {
282 return
283 }
284
285 _ = respBody
286 return
287 }
288
289 //ListAPIError is an error-wrapper for the list route
290 type ListAPIError struct {
291 dropbox.APIError
292 EndpointError *ListFileRequestsError `json:"error"`
293 }
294
295 func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) {
296 req := dropbox.Request{
297 Host: "api",
298 Namespace: "file_requests",
299 Route: "list",
300 Auth: "user",
301 Style: "rpc",
302 Arg: nil,
303 ExtraHeaders: nil,
304 }
305
306 var resp []byte
307 var respBody io.ReadCloser
308 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
309 if err != nil {
310 var appErr ListAPIError
311 err = auth.ParseError(err, &appErr)
312 if err == &appErr {
313 err = appErr
314 }
315 return
316 }
317
318 err = json.Unmarshal(resp, &res)
319 if err != nil {
320 return
321 }
322
323 _ = respBody
324 return
325 }
326
327 //ListContinueAPIError is an error-wrapper for the list/continue route
328 type ListContinueAPIError struct {
329 dropbox.APIError
330 EndpointError *ListFileRequestsContinueError `json:"error"`
331 }
332
333 func (dbx *apiImpl) ListContinue(arg *ListFileRequestsContinueArg) (res *ListFileRequestsV2Result, err error) {
334 req := dropbox.Request{
335 Host: "api",
336 Namespace: "file_requests",
337 Route: "list/continue",
338 Auth: "user",
339 Style: "rpc",
340 Arg: arg,
341 ExtraHeaders: nil,
342 }
343
344 var resp []byte
345 var respBody io.ReadCloser
346 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
347 if err != nil {
348 var appErr ListContinueAPIError
349 err = auth.ParseError(err, &appErr)
350 if err == &appErr {
351 err = appErr
352 }
353 return
354 }
355
356 err = json.Unmarshal(resp, &res)
357 if err != nil {
358 return
359 }
360
361 _ = respBody
362 return
363 }
364
365 //UpdateAPIError is an error-wrapper for the update route
366 type UpdateAPIError struct {
367 dropbox.APIError
368 EndpointError *UpdateFileRequestError `json:"error"`
369 }
370
371 func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) {
372 req := dropbox.Request{
373 Host: "api",
374 Namespace: "file_requests",
375 Route: "update",
376 Auth: "user",
377 Style: "rpc",
378 Arg: arg,
379 ExtraHeaders: nil,
380 }
381
382 var resp []byte
383 var respBody io.ReadCloser
384 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
385 if err != nil {
386 var appErr UpdateAPIError
387 err = auth.ParseError(err, &appErr)
388 if err == &appErr {
389 err = appErr
390 }
391 return
392 }
393
394 err = json.Unmarshal(resp, &res)
395 if err != nil {
396 return
397 }
398
399 _ = respBody
400 return
401 }
402
403 // New returns a Client implementation for this namespace
404 func New(c dropbox.Config) Client {
405 ctx := apiImpl(dropbox.NewContext(c))
406 return &ctx
407 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package file_requests : This namespace contains endpoints and data types for
21 // file request operations.
22 package file_requests
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
29 )
30
31 // GeneralFileRequestsError : There is an error accessing the file requests
32 // functionality.
33 type GeneralFileRequestsError struct {
34 dropbox.Tagged
35 }
36
37 // Valid tag values for GeneralFileRequestsError
38 const (
39 GeneralFileRequestsErrorDisabledForTeam = "disabled_for_team"
40 GeneralFileRequestsErrorOther = "other"
41 )
42
43 // CountFileRequestsError : There was an error counting the file requests.
44 type CountFileRequestsError struct {
45 dropbox.Tagged
46 }
47
48 // Valid tag values for CountFileRequestsError
49 const (
50 CountFileRequestsErrorDisabledForTeam = "disabled_for_team"
51 CountFileRequestsErrorOther = "other"
52 )
53
54 // CountFileRequestsResult : Result for `count`.
55 type CountFileRequestsResult struct {
56 // FileRequestCount : The number file requests owner by this user.
57 FileRequestCount uint64 `json:"file_request_count"`
58 }
59
60 // NewCountFileRequestsResult returns a new CountFileRequestsResult instance
61 func NewCountFileRequestsResult(FileRequestCount uint64) *CountFileRequestsResult {
62 s := new(CountFileRequestsResult)
63 s.FileRequestCount = FileRequestCount
64 return s
65 }
66
67 // CreateFileRequestArgs : Arguments for `create`.
68 type CreateFileRequestArgs struct {
69 // Title : The title of the file request. Must not be empty.
70 Title string `json:"title"`
71 // Destination : The path of the folder in the Dropbox where uploaded files
72 // will be sent. For apps with the app folder permission, this will be
73 // relative to the app folder.
74 Destination string `json:"destination"`
75 // Deadline : The deadline for the file request. Deadlines can only be set
76 // by Professional and Business accounts.
77 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
78 // Open : Whether or not the file request should be open. If the file
79 // request is closed, it will not accept any file submissions, but it can be
80 // opened later.
81 Open bool `json:"open"`
82 // Description : A description of the file request.
83 Description string `json:"description,omitempty"`
84 }
85
86 // NewCreateFileRequestArgs returns a new CreateFileRequestArgs instance
87 func NewCreateFileRequestArgs(Title string, Destination string) *CreateFileRequestArgs {
88 s := new(CreateFileRequestArgs)
89 s.Title = Title
90 s.Destination = Destination
91 s.Open = true
92 return s
93 }
94
95 // FileRequestError : There is an error with the file request.
96 type FileRequestError struct {
97 dropbox.Tagged
98 }
99
100 // Valid tag values for FileRequestError
101 const (
102 FileRequestErrorDisabledForTeam = "disabled_for_team"
103 FileRequestErrorOther = "other"
104 FileRequestErrorNotFound = "not_found"
105 FileRequestErrorNotAFolder = "not_a_folder"
106 FileRequestErrorAppLacksAccess = "app_lacks_access"
107 FileRequestErrorNoPermission = "no_permission"
108 FileRequestErrorEmailUnverified = "email_unverified"
109 FileRequestErrorValidationError = "validation_error"
110 )
111
112 // CreateFileRequestError : There was an error creating the file request.
113 type CreateFileRequestError struct {
114 dropbox.Tagged
115 }
116
117 // Valid tag values for CreateFileRequestError
118 const (
119 CreateFileRequestErrorDisabledForTeam = "disabled_for_team"
120 CreateFileRequestErrorOther = "other"
121 CreateFileRequestErrorNotFound = "not_found"
122 CreateFileRequestErrorNotAFolder = "not_a_folder"
123 CreateFileRequestErrorAppLacksAccess = "app_lacks_access"
124 CreateFileRequestErrorNoPermission = "no_permission"
125 CreateFileRequestErrorEmailUnverified = "email_unverified"
126 CreateFileRequestErrorValidationError = "validation_error"
127 CreateFileRequestErrorInvalidLocation = "invalid_location"
128 CreateFileRequestErrorRateLimit = "rate_limit"
129 )
130
131 // DeleteAllClosedFileRequestsError : There was an error deleting all closed
132 // file requests.
133 type DeleteAllClosedFileRequestsError struct {
134 dropbox.Tagged
135 }
136
137 // Valid tag values for DeleteAllClosedFileRequestsError
138 const (
139 DeleteAllClosedFileRequestsErrorDisabledForTeam = "disabled_for_team"
140 DeleteAllClosedFileRequestsErrorOther = "other"
141 DeleteAllClosedFileRequestsErrorNotFound = "not_found"
142 DeleteAllClosedFileRequestsErrorNotAFolder = "not_a_folder"
143 DeleteAllClosedFileRequestsErrorAppLacksAccess = "app_lacks_access"
144 DeleteAllClosedFileRequestsErrorNoPermission = "no_permission"
145 DeleteAllClosedFileRequestsErrorEmailUnverified = "email_unverified"
146 DeleteAllClosedFileRequestsErrorValidationError = "validation_error"
147 )
148
149 // DeleteAllClosedFileRequestsResult : Result for `deleteAllClosed`.
150 type DeleteAllClosedFileRequestsResult struct {
151 // FileRequests : The file requests deleted for this user.
152 FileRequests []*FileRequest `json:"file_requests"`
153 }
154
155 // NewDeleteAllClosedFileRequestsResult returns a new DeleteAllClosedFileRequestsResult instance
156 func NewDeleteAllClosedFileRequestsResult(FileRequests []*FileRequest) *DeleteAllClosedFileRequestsResult {
157 s := new(DeleteAllClosedFileRequestsResult)
158 s.FileRequests = FileRequests
159 return s
160 }
161
162 // DeleteFileRequestArgs : Arguments for `delete`.
163 type DeleteFileRequestArgs struct {
164 // Ids : List IDs of the file requests to delete.
165 Ids []string `json:"ids"`
166 }
167
168 // NewDeleteFileRequestArgs returns a new DeleteFileRequestArgs instance
169 func NewDeleteFileRequestArgs(Ids []string) *DeleteFileRequestArgs {
170 s := new(DeleteFileRequestArgs)
171 s.Ids = Ids
172 return s
173 }
174
175 // DeleteFileRequestError : There was an error deleting these file requests.
176 type DeleteFileRequestError struct {
177 dropbox.Tagged
178 }
179
180 // Valid tag values for DeleteFileRequestError
181 const (
182 DeleteFileRequestErrorDisabledForTeam = "disabled_for_team"
183 DeleteFileRequestErrorOther = "other"
184 DeleteFileRequestErrorNotFound = "not_found"
185 DeleteFileRequestErrorNotAFolder = "not_a_folder"
186 DeleteFileRequestErrorAppLacksAccess = "app_lacks_access"
187 DeleteFileRequestErrorNoPermission = "no_permission"
188 DeleteFileRequestErrorEmailUnverified = "email_unverified"
189 DeleteFileRequestErrorValidationError = "validation_error"
190 DeleteFileRequestErrorFileRequestOpen = "file_request_open"
191 )
192
193 // DeleteFileRequestsResult : Result for `delete`.
194 type DeleteFileRequestsResult struct {
195 // FileRequests : The file requests deleted by the request.
196 FileRequests []*FileRequest `json:"file_requests"`
197 }
198
199 // NewDeleteFileRequestsResult returns a new DeleteFileRequestsResult instance
200 func NewDeleteFileRequestsResult(FileRequests []*FileRequest) *DeleteFileRequestsResult {
201 s := new(DeleteFileRequestsResult)
202 s.FileRequests = FileRequests
203 return s
204 }
205
206 // FileRequest : A `file request` <https://www.dropbox.com/help/9090> for
207 // receiving files into the user's Dropbox account.
208 type FileRequest struct {
209 // Id : The ID of the file request.
210 Id string `json:"id"`
211 // Url : The URL of the file request.
212 Url string `json:"url"`
213 // Title : The title of the file request.
214 Title string `json:"title"`
215 // Destination : The path of the folder in the Dropbox where uploaded files
216 // will be sent. This can be nil if the destination was removed. For apps
217 // with the app folder permission, this will be relative to the app folder.
218 Destination string `json:"destination,omitempty"`
219 // Created : When this file request was created.
220 Created time.Time `json:"created"`
221 // Deadline : The deadline for this file request. Only set if the request
222 // has a deadline.
223 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
224 // IsOpen : Whether or not the file request is open. If the file request is
225 // closed, it will not accept any more file submissions.
226 IsOpen bool `json:"is_open"`
227 // FileCount : The number of files this file request has received.
228 FileCount int64 `json:"file_count"`
229 // Description : A description of the file request.
230 Description string `json:"description,omitempty"`
231 }
232
233 // NewFileRequest returns a new FileRequest instance
234 func NewFileRequest(Id string, Url string, Title string, Created time.Time, IsOpen bool, FileCount int64) *FileRequest {
235 s := new(FileRequest)
236 s.Id = Id
237 s.Url = Url
238 s.Title = Title
239 s.Created = Created
240 s.IsOpen = IsOpen
241 s.FileCount = FileCount
242 return s
243 }
244
245 // FileRequestDeadline : has no documentation (yet)
246 type FileRequestDeadline struct {
247 // Deadline : The deadline for this file request.
248 Deadline time.Time `json:"deadline"`
249 // AllowLateUploads : If set, allow uploads after the deadline has passed.
250 // These uploads will be marked overdue.
251 AllowLateUploads *GracePeriod `json:"allow_late_uploads,omitempty"`
252 }
253
254 // NewFileRequestDeadline returns a new FileRequestDeadline instance
255 func NewFileRequestDeadline(Deadline time.Time) *FileRequestDeadline {
256 s := new(FileRequestDeadline)
257 s.Deadline = Deadline
258 return s
259 }
260
261 // GetFileRequestArgs : Arguments for `get`.
262 type GetFileRequestArgs struct {
263 // Id : The ID of the file request to retrieve.
264 Id string `json:"id"`
265 }
266
267 // NewGetFileRequestArgs returns a new GetFileRequestArgs instance
268 func NewGetFileRequestArgs(Id string) *GetFileRequestArgs {
269 s := new(GetFileRequestArgs)
270 s.Id = Id
271 return s
272 }
273
274 // GetFileRequestError : There was an error retrieving the specified file
275 // request.
276 type GetFileRequestError struct {
277 dropbox.Tagged
278 }
279
280 // Valid tag values for GetFileRequestError
281 const (
282 GetFileRequestErrorDisabledForTeam = "disabled_for_team"
283 GetFileRequestErrorOther = "other"
284 GetFileRequestErrorNotFound = "not_found"
285 GetFileRequestErrorNotAFolder = "not_a_folder"
286 GetFileRequestErrorAppLacksAccess = "app_lacks_access"
287 GetFileRequestErrorNoPermission = "no_permission"
288 GetFileRequestErrorEmailUnverified = "email_unverified"
289 GetFileRequestErrorValidationError = "validation_error"
290 )
291
292 // GracePeriod : has no documentation (yet)
293 type GracePeriod struct {
294 dropbox.Tagged
295 }
296
297 // Valid tag values for GracePeriod
298 const (
299 GracePeriodOneDay = "one_day"
300 GracePeriodTwoDays = "two_days"
301 GracePeriodSevenDays = "seven_days"
302 GracePeriodThirtyDays = "thirty_days"
303 GracePeriodAlways = "always"
304 GracePeriodOther = "other"
305 )
306
307 // ListFileRequestsArg : Arguments for `list`.
308 type ListFileRequestsArg struct {
309 // Limit : The maximum number of file requests that should be returned per
310 // request.
311 Limit uint64 `json:"limit"`
312 }
313
314 // NewListFileRequestsArg returns a new ListFileRequestsArg instance
315 func NewListFileRequestsArg() *ListFileRequestsArg {
316 s := new(ListFileRequestsArg)
317 s.Limit = 1000
318 return s
319 }
320
321 // ListFileRequestsContinueArg : has no documentation (yet)
322 type ListFileRequestsContinueArg struct {
323 // Cursor : The cursor returned by the previous API call specified in the
324 // endpoint description.
325 Cursor string `json:"cursor"`
326 }
327
328 // NewListFileRequestsContinueArg returns a new ListFileRequestsContinueArg instance
329 func NewListFileRequestsContinueArg(Cursor string) *ListFileRequestsContinueArg {
330 s := new(ListFileRequestsContinueArg)
331 s.Cursor = Cursor
332 return s
333 }
334
335 // ListFileRequestsContinueError : There was an error retrieving the file
336 // requests.
337 type ListFileRequestsContinueError struct {
338 dropbox.Tagged
339 }
340
341 // Valid tag values for ListFileRequestsContinueError
342 const (
343 ListFileRequestsContinueErrorDisabledForTeam = "disabled_for_team"
344 ListFileRequestsContinueErrorOther = "other"
345 ListFileRequestsContinueErrorInvalidCursor = "invalid_cursor"
346 )
347
348 // ListFileRequestsError : There was an error retrieving the file requests.
349 type ListFileRequestsError struct {
350 dropbox.Tagged
351 }
352
353 // Valid tag values for ListFileRequestsError
354 const (
355 ListFileRequestsErrorDisabledForTeam = "disabled_for_team"
356 ListFileRequestsErrorOther = "other"
357 )
358
359 // ListFileRequestsResult : Result for `list`.
360 type ListFileRequestsResult struct {
361 // FileRequests : The file requests owned by this user. Apps with the app
362 // folder permission will only see file requests in their app folder.
363 FileRequests []*FileRequest `json:"file_requests"`
364 }
365
366 // NewListFileRequestsResult returns a new ListFileRequestsResult instance
367 func NewListFileRequestsResult(FileRequests []*FileRequest) *ListFileRequestsResult {
368 s := new(ListFileRequestsResult)
369 s.FileRequests = FileRequests
370 return s
371 }
372
373 // ListFileRequestsV2Result : Result for `list` and `listContinue`.
374 type ListFileRequestsV2Result struct {
375 // FileRequests : The file requests owned by this user. Apps with the app
376 // folder permission will only see file requests in their app folder.
377 FileRequests []*FileRequest `json:"file_requests"`
378 // Cursor : Pass the cursor into `listContinue` to obtain additional file
379 // requests.
380 Cursor string `json:"cursor"`
381 // HasMore : Is true if there are additional file requests that have not
382 // been returned yet. An additional call to :route:list/continue` can
383 // retrieve them.
384 HasMore bool `json:"has_more"`
385 }
386
387 // NewListFileRequestsV2Result returns a new ListFileRequestsV2Result instance
388 func NewListFileRequestsV2Result(FileRequests []*FileRequest, Cursor string, HasMore bool) *ListFileRequestsV2Result {
389 s := new(ListFileRequestsV2Result)
390 s.FileRequests = FileRequests
391 s.Cursor = Cursor
392 s.HasMore = HasMore
393 return s
394 }
395
396 // UpdateFileRequestArgs : Arguments for `update`.
397 type UpdateFileRequestArgs struct {
398 // Id : The ID of the file request to update.
399 Id string `json:"id"`
400 // Title : The new title of the file request. Must not be empty.
401 Title string `json:"title,omitempty"`
402 // Destination : The new path of the folder in the Dropbox where uploaded
403 // files will be sent. For apps with the app folder permission, this will be
404 // relative to the app folder.
405 Destination string `json:"destination,omitempty"`
406 // Deadline : The new deadline for the file request. Deadlines can only be
407 // set by Professional and Business accounts.
408 Deadline *UpdateFileRequestDeadline `json:"deadline"`
409 // Open : Whether to set this file request as open or closed.
410 Open bool `json:"open,omitempty"`
411 // Description : The description of the file request.
412 Description string `json:"description,omitempty"`
413 }
414
415 // NewUpdateFileRequestArgs returns a new UpdateFileRequestArgs instance
416 func NewUpdateFileRequestArgs(Id string) *UpdateFileRequestArgs {
417 s := new(UpdateFileRequestArgs)
418 s.Id = Id
419 s.Deadline = &UpdateFileRequestDeadline{Tagged: dropbox.Tagged{Tag: "no_update"}}
420 return s
421 }
422
423 // UpdateFileRequestDeadline : has no documentation (yet)
424 type UpdateFileRequestDeadline struct {
425 dropbox.Tagged
426 // Update : If nil, the file request's deadline is cleared.
427 Update *FileRequestDeadline `json:"update,omitempty"`
428 }
429
430 // Valid tag values for UpdateFileRequestDeadline
431 const (
432 UpdateFileRequestDeadlineNoUpdate = "no_update"
433 UpdateFileRequestDeadlineUpdate = "update"
434 UpdateFileRequestDeadlineOther = "other"
435 )
436
437 // UnmarshalJSON deserializes into a UpdateFileRequestDeadline instance
438 func (u *UpdateFileRequestDeadline) UnmarshalJSON(body []byte) error {
439 type wrap struct {
440 dropbox.Tagged
441 // Update : If nil, the file request's deadline is cleared.
442 Update *FileRequestDeadline `json:"update,omitempty"`
443 }
444 var w wrap
445 var err error
446 if err = json.Unmarshal(body, &w); err != nil {
447 return err
448 }
449 u.Tag = w.Tag
450 switch u.Tag {
451 case "update":
452 u.Update = w.Update
453
454 if err != nil {
455 return err
456 }
457 }
458 return nil
459 }
460
461 // UpdateFileRequestError : There is an error updating the file request.
462 type UpdateFileRequestError struct {
463 dropbox.Tagged
464 }
465
466 // Valid tag values for UpdateFileRequestError
467 const (
468 UpdateFileRequestErrorDisabledForTeam = "disabled_for_team"
469 UpdateFileRequestErrorOther = "other"
470 UpdateFileRequestErrorNotFound = "not_found"
471 UpdateFileRequestErrorNotAFolder = "not_a_folder"
472 UpdateFileRequestErrorAppLacksAccess = "app_lacks_access"
473 UpdateFileRequestErrorNoPermission = "no_permission"
474 UpdateFileRequestErrorEmailUnverified = "email_unverified"
475 UpdateFileRequestErrorValidationError = "validation_error"
476 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package files
21
22 import (
23 "encoding/json"
24 "io"
25 "log"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
31 )
32
33 // Client interface describes all routes in this namespace
34 type Client interface {
35 // AlphaGetMetadata : Returns the metadata for a file or folder. This is an
36 // alpha endpoint compatible with the properties API. Note: Metadata for the
37 // root folder is unsupported.
38 // Deprecated: Use `GetMetadata` instead
39 AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error)
40 // AlphaUpload : Create a new file with the contents provided in the
41 // request. Note that this endpoint is part of the properties API alpha and
42 // is slightly different from `upload`. Do not use this to upload a file
43 // larger than 150 MB. Instead, create an upload session with
44 // `uploadSessionStart`.
45 // Deprecated: Use `AlphaUpload` instead
46 AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error)
47 // Copy : Copy a file or folder to a different location in the user's
48 // Dropbox. If the source path is a folder all its contents will be copied.
49 CopyV2(arg *RelocationArg) (res *RelocationResult, err error)
50 // Copy : Copy a file or folder to a different location in the user's
51 // Dropbox. If the source path is a folder all its contents will be copied.
52 // Deprecated: Use `CopyV2` instead
53 Copy(arg *RelocationArg) (res IsMetadata, err error)
54 // CopyBatch : Copy multiple files or folders to different locations at once
55 // in the user's Dropbox. This route will replace `copyBatch`. The main
56 // difference is this route will return status for each entry, while
57 // `copyBatch` raises failure if any entry fails. This route will either
58 // finish synchronously, or return a job ID and do the async copy job in
59 // background. Please use `copyBatchCheck` to check the job status.
60 CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error)
61 // CopyBatch : Copy multiple files or folders to different locations at once
62 // in the user's Dropbox. This route will return job ID immediately and do
63 // the async copy job in background. Please use `copyBatchCheck` to check
64 // the job status.
65 // Deprecated: Use `CopyBatchV2` instead
66 CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
67 // CopyBatchCheck : Returns the status of an asynchronous job for
68 // `copyBatch`. It returns list of results for each entry.
69 CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
70 // CopyBatchCheck : Returns the status of an asynchronous job for
71 // `copyBatch`. If success, it returns list of results for each entry.
72 // Deprecated: Use `CopyBatchCheckV2` instead
73 CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
74 // CopyReferenceGet : Get a copy reference to a file or folder. This
75 // reference string can be used to save that file or folder to another
76 // user's Dropbox by passing it to `copyReferenceSave`.
77 CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error)
78 // CopyReferenceSave : Save a copy reference returned by `copyReferenceGet`
79 // to the user's Dropbox.
80 CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error)
81 // CreateFolder : Create a folder at a given path.
82 CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error)
83 // CreateFolder : Create a folder at a given path.
84 // Deprecated: Use `CreateFolderV2` instead
85 CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error)
86 // CreateFolderBatch : Create multiple folders at once. This route is
87 // asynchronous for large batches, which returns a job ID immediately and
88 // runs the create folder batch asynchronously. Otherwise, creates the
89 // folders and returns the result synchronously for smaller inputs. You can
90 // force asynchronous behaviour by using the
91 // `CreateFolderBatchArg.force_async` flag. Use `createFolderBatchCheck` to
92 // check the job status.
93 CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error)
94 // CreateFolderBatchCheck : Returns the status of an asynchronous job for
95 // `createFolderBatch`. If success, it returns list of result for each
96 // entry.
97 CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error)
98 // Delete : Delete the file or folder at a given path. If the path is a
99 // folder, all its contents will be deleted too. A successful response
100 // indicates that the file or folder was deleted. The returned metadata will
101 // be the corresponding `FileMetadata` or `FolderMetadata` for the item at
102 // time of deletion, and not a `DeletedMetadata` object.
103 DeleteV2(arg *DeleteArg) (res *DeleteResult, err error)
104 // Delete : Delete the file or folder at a given path. If the path is a
105 // folder, all its contents will be deleted too. A successful response
106 // indicates that the file or folder was deleted. The returned metadata will
107 // be the corresponding `FileMetadata` or `FolderMetadata` for the item at
108 // time of deletion, and not a `DeletedMetadata` object.
109 // Deprecated: Use `DeleteV2` instead
110 Delete(arg *DeleteArg) (res IsMetadata, err error)
111 // DeleteBatch : Delete multiple files/folders at once. This route is
112 // asynchronous, which returns a job ID immediately and runs the delete
113 // batch asynchronously. Use `deleteBatchCheck` to check the job status.
114 DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error)
115 // DeleteBatchCheck : Returns the status of an asynchronous job for
116 // `deleteBatch`. If success, it returns list of result for each entry.
117 DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error)
118 // Download : Download a file from a user's Dropbox.
119 Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error)
120 // DownloadZip : Download a folder from the user's Dropbox, as a zip file.
121 // The folder must be less than 20 GB in size and any single file within
122 // must be less than 4 GB in size. The resulting zip must have fewer than
123 // 10,000 total file and folder entries, including the top level folder. The
124 // input cannot be a single file.
125 DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error)
126 // Export : Export a file from a user's Dropbox. This route only supports
127 // exporting files that cannot be downloaded directly and whose
128 // `ExportResult.file_metadata` has `ExportInfo.export_as` populated.
129 Export(arg *ExportArg) (res *ExportResult, content io.ReadCloser, err error)
130 // GetFileLockBatch : Return the lock metadata for the given list of paths.
131 GetFileLockBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error)
132 // GetMetadata : Returns the metadata for a file or folder. Note: Metadata
133 // for the root folder is unsupported.
134 GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error)
135 // GetPreview : Get a preview for a file. Currently, PDF previews are
136 // generated for files with the following extensions: .ai, .doc, .docm,
137 // .docx, .eps, .gdoc, .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt,
138 // .pptm, .pptx, .rtf. HTML previews are generated for files with the
139 // following extensions: .csv, .ods, .xls, .xlsm, .gsheet, .xlsx. Other
140 // formats will return an unsupported extension error.
141 GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error)
142 // GetTemporaryLink : Get a temporary link to stream content of a file. This
143 // link will expire in four hours and afterwards you will get 410 Gone. This
144 // URL should not be used to display content directly in the browser. The
145 // Content-Type of the link is determined automatically by the file's mime
146 // type.
147 GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error)
148 // GetTemporaryUploadLink : Get a one-time use temporary upload link to
149 // upload a file to a Dropbox location. This endpoint acts as a delayed
150 // `upload`. The returned temporary upload link may be used to make a POST
151 // request with the data to be uploaded. The upload will then be perfomed
152 // with the `CommitInfo` previously provided to `getTemporaryUploadLink` but
153 // evaluated only upon consumption. Hence, errors stemming from invalid
154 // `CommitInfo` with respect to the state of the user's Dropbox will only be
155 // communicated at consumption time. Additionally, these errors are surfaced
156 // as generic HTTP 409 Conflict responses, potentially hiding issue details.
157 // The maximum temporary upload link duration is 4 hours. Upon consumption
158 // or expiration, a new link will have to be generated. Multiple links may
159 // exist for a specific upload path at any given time. The POST request on
160 // the temporary upload link must have its Content-Type set to
161 // "application/octet-stream". Example temporary upload link consumption
162 // request: curl -X POST
163 // https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header
164 // "Content-Type: application/octet-stream" --data-binary @local_file.txt A
165 // successful temporary upload link consumption request returns the content
166 // hash of the uploaded data in JSON format. Example successful temporary
167 // upload link consumption response: {"content-hash":
168 // "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary
169 // upload link consumption request returns any of the following status
170 // codes: HTTP 400 Bad Request: Content-Type is not one of
171 // application/octet-stream and text/plain or request is invalid. HTTP 409
172 // Conflict: The temporary upload link does not exist or is currently
173 // unavailable, the upload failed, or another error happened. HTTP 410 Gone:
174 // The temporary upload link is expired or consumed. Example unsuccessful
175 // temporary upload link consumption response: Temporary upload link has
176 // been recently consumed.
177 GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error)
178 // GetThumbnail : Get a thumbnail for an image. This method currently
179 // supports files with the following file extensions: jpg, jpeg, png, tiff,
180 // tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size
181 // won't be converted to a thumbnail.
182 GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error)
183 // GetThumbnail : Get a thumbnail for an image. This method currently
184 // supports files with the following file extensions: jpg, jpeg, png, tiff,
185 // tif, gif, webp, ppm and bmp. Photos that are larger than 20MB in size
186 // won't be converted to a thumbnail.
187 GetThumbnailV2(arg *ThumbnailV2Arg) (res *PreviewResult, content io.ReadCloser, err error)
188 // GetThumbnailBatch : Get thumbnails for a list of images. We allow up to
189 // 25 thumbnails in a single batch. This method currently supports files
190 // with the following file extensions: jpg, jpeg, png, tiff, tif, gif, webp,
191 // ppm and bmp. Photos that are larger than 20MB in size won't be converted
192 // to a thumbnail.
193 GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error)
194 // ListFolder : Starts returning the contents of a folder. If the result's
195 // `ListFolderResult.has_more` field is true, call `listFolderContinue` with
196 // the returned `ListFolderResult.cursor` to retrieve more entries. If
197 // you're using `ListFolderArg.recursive` set to true to keep a local cache
198 // of the contents of a Dropbox account, iterate through each entry in order
199 // and process them as follows to keep your local state in sync: For each
200 // `FileMetadata`, store the new entry at the given path in your local
201 // state. If the required parent folders don't exist yet, create them. If
202 // there's already something else at the given path, replace it and remove
203 // all its children. For each `FolderMetadata`, store the new entry at the
204 // given path in your local state. If the required parent folders don't
205 // exist yet, create them. If there's already something else at the given
206 // path, replace it but leave the children as they are. Check the new
207 // entry's `FolderSharingInfo.read_only` and set all its children's
208 // read-only statuses to match. For each `DeletedMetadata`, if your local
209 // state has something at the given path, remove it and all its children. If
210 // there's nothing at the given path, ignore this entry. Note:
211 // `auth.RateLimitError` may be returned if multiple `listFolder` or
212 // `listFolderContinue` calls with same parameters are made simultaneously
213 // by same API app for same user. If your app implements retry logic, please
214 // hold off the retry until the previous request finishes.
215 ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error)
216 // ListFolderContinue : Once a cursor has been retrieved from `listFolder`,
217 // use this to paginate through all files and retrieve updates to the
218 // folder, following the same rules as documented for `listFolder`.
219 ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error)
220 // ListFolderGetLatestCursor : A way to quickly get a cursor for the
221 // folder's state. Unlike `listFolder`, `listFolderGetLatestCursor` doesn't
222 // return any entries. This endpoint is for app which only needs to know
223 // about new files and modifications and doesn't need to know about files
224 // that already exist in Dropbox.
225 ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error)
226 // ListFolderLongpoll : A longpoll endpoint to wait for changes on an
227 // account. In conjunction with `listFolderContinue`, this call gives you a
228 // low-latency way to monitor an account for file changes. The connection
229 // will block until there are changes available or a timeout occurs. This
230 // endpoint is useful mostly for client-side apps. If you're looking for
231 // server-side notifications, check out our `webhooks documentation`
232 // <https://www.dropbox.com/developers/reference/webhooks>.
233 ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error)
234 // ListRevisions : Returns revisions for files based on a file path or a
235 // file id. The file path or file id is identified from the latest file
236 // entry at the given file path or id. This end point allows your app to
237 // query either by file path or file id by setting the mode parameter
238 // appropriately. In the `ListRevisionsMode.path` (default) mode, all
239 // revisions at the same file path as the latest file entry are returned. If
240 // revisions with the same file id are desired, then mode must be set to
241 // `ListRevisionsMode.id`. The `ListRevisionsMode.id` mode is useful to
242 // retrieve revisions for a given file across moves or renames.
243 ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error)
244 // LockFileBatch : Lock the files at the given paths. A locked file will be
245 // writable only by the lock holder. A successful response indicates that
246 // the file has been locked. Returns a list of the locked file paths and
247 // their metadata after this operation.
248 LockFileBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error)
249 // Move : Move a file or folder to a different location in the user's
250 // Dropbox. If the source path is a folder all its contents will be moved.
251 // Note that we do not currently support case-only renaming.
252 MoveV2(arg *RelocationArg) (res *RelocationResult, err error)
253 // Move : Move a file or folder to a different location in the user's
254 // Dropbox. If the source path is a folder all its contents will be moved.
255 // Deprecated: Use `MoveV2` instead
256 Move(arg *RelocationArg) (res IsMetadata, err error)
257 // MoveBatch : Move multiple files or folders to different locations at once
258 // in the user's Dropbox. Note that we do not currently support case-only
259 // renaming. This route will replace `moveBatch`. The main difference is
260 // this route will return status for each entry, while `moveBatch` raises
261 // failure if any entry fails. This route will either finish synchronously,
262 // or return a job ID and do the async move job in background. Please use
263 // `moveBatchCheck` to check the job status.
264 MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error)
265 // MoveBatch : Move multiple files or folders to different locations at once
266 // in the user's Dropbox. This route will return job ID immediately and do
267 // the async moving job in background. Please use `moveBatchCheck` to check
268 // the job status.
269 // Deprecated: Use `MoveBatchV2` instead
270 MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error)
271 // MoveBatchCheck : Returns the status of an asynchronous job for
272 // `moveBatch`. It returns list of results for each entry.
273 MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error)
274 // MoveBatchCheck : Returns the status of an asynchronous job for
275 // `moveBatch`. If success, it returns list of results for each entry.
276 // Deprecated: Use `MoveBatchCheckV2` instead
277 MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error)
278 // PaperCreate : Creates a new Paper doc with the provided content.
279 PaperCreate(arg *PaperCreateArg, content io.Reader) (res *PaperCreateResult, err error)
280 // PaperUpdate : Updates an existing Paper doc with the provided content.
281 PaperUpdate(arg *PaperUpdateArg, content io.Reader) (res *PaperUpdateResult, err error)
282 // PermanentlyDelete : Permanently delete the file or folder at a given path
283 // (see https://www.dropbox.com/en/help/40). If the given file or folder is
284 // not yet deleted, this route will first delete it. It is possible for this
285 // route to successfully delete, then fail to permanently delete. Note: This
286 // endpoint is only available for Dropbox Business apps.
287 PermanentlyDelete(arg *DeleteArg) (err error)
288 // PropertiesAdd : has no documentation (yet)
289 // Deprecated:
290 PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error)
291 // PropertiesOverwrite : has no documentation (yet)
292 // Deprecated:
293 PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error)
294 // PropertiesRemove : has no documentation (yet)
295 // Deprecated:
296 PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error)
297 // PropertiesTemplateGet : has no documentation (yet)
298 // Deprecated:
299 PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error)
300 // PropertiesTemplateList : has no documentation (yet)
301 // Deprecated:
302 PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error)
303 // PropertiesUpdate : has no documentation (yet)
304 // Deprecated:
305 PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error)
306 // Restore : Restore a specific revision of a file to the given path.
307 Restore(arg *RestoreArg) (res *FileMetadata, err error)
308 // SaveUrl : Save the data from a specified URL into a file in user's
309 // Dropbox. Note that the transfer from the URL must complete within 5
310 // minutes, or the operation will time out and the job will fail. If the
311 // given path already exists, the file will be renamed to avoid the conflict
312 // (e.g. myfile (1).txt).
313 SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error)
314 // SaveUrlCheckJobStatus : Check the status of a `saveUrl` job.
315 SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error)
316 // Search : Searches for files and folders. Note: Recent changes will be
317 // reflected in search results within a few seconds and older revisions of
318 // existing files may still match your query for up to a few days.
319 // Deprecated: Use `SearchV2` instead
320 Search(arg *SearchArg) (res *SearchResult, err error)
321 // Search : Searches for files and folders. Note: `search` along with
322 // `searchContinue` can only be used to retrieve a maximum of 10,000
323 // matches. Recent changes may not immediately be reflected in search
324 // results due to a short delay in indexing. Duplicate results may be
325 // returned across pages. Some results may not be returned.
326 SearchV2(arg *SearchV2Arg) (res *SearchV2Result, err error)
327 // SearchContinue : Fetches the next page of search results returned from
328 // `search`. Note: `search` along with `searchContinue` can only be used to
329 // retrieve a maximum of 10,000 matches. Recent changes may not immediately
330 // be reflected in search results due to a short delay in indexing.
331 // Duplicate results may be returned across pages. Some results may not be
332 // returned.
333 SearchContinueV2(arg *SearchV2ContinueArg) (res *SearchV2Result, err error)
334 // UnlockFileBatch : Unlock the files at the given paths. A locked file can
335 // only be unlocked by the lock holder or, if a business account, a team
336 // admin. A successful response indicates that the file has been unlocked.
337 // Returns a list of the unlocked file paths and their metadata after this
338 // operation.
339 UnlockFileBatch(arg *UnlockFileBatchArg) (res *LockFileBatchResult, err error)
340 // Upload : Create a new file with the contents provided in the request. Do
341 // not use this to upload a file larger than 150 MB. Instead, create an
342 // upload session with `uploadSessionStart`. Calls to this endpoint will
343 // count as data transport calls for any Dropbox Business teams with a limit
344 // on the number of data transport calls allowed per month. For more
345 // information, see the `Data transport limit page`
346 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
347 Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error)
348 // UploadSessionAppend : Append more data to an upload session. When the
349 // parameter close is set, this call will close the session. A single
350 // request should not upload more than 150 MB. The maximum size of a file
351 // one can upload to an upload session is 350 GB. Calls to this endpoint
352 // will count as data transport calls for any Dropbox Business teams with a
353 // limit on the number of data transport calls allowed per month. For more
354 // information, see the `Data transport limit page`
355 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
356 UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error)
357 // UploadSessionAppend : Append more data to an upload session. A single
358 // request should not upload more than 150 MB. The maximum size of a file
359 // one can upload to an upload session is 350 GB. Calls to this endpoint
360 // will count as data transport calls for any Dropbox Business teams with a
361 // limit on the number of data transport calls allowed per month. For more
362 // information, see the `Data transport limit page`
363 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
364 // Deprecated: Use `UploadSessionAppendV2` instead
365 UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error)
366 // UploadSessionFinish : Finish an upload session and save the uploaded data
367 // to the given file path. A single request should not upload more than 150
368 // MB. The maximum size of a file one can upload to an upload session is 350
369 // GB. Calls to this endpoint will count as data transport calls for any
370 // Dropbox Business teams with a limit on the number of data transport calls
371 // allowed per month. For more information, see the `Data transport limit
372 // page`
373 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
374 UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error)
375 // UploadSessionFinishBatch : This route helps you commit many files at once
376 // into a user's Dropbox. Use `uploadSessionStart` and `uploadSessionAppend`
377 // to upload file contents. We recommend uploading many files in parallel to
378 // increase throughput. Once the file contents have been uploaded, rather
379 // than calling `uploadSessionFinish`, use this route to finish all your
380 // upload sessions in a single request. `UploadSessionStartArg.close` or
381 // `UploadSessionAppendArg.close` needs to be true for the last
382 // `uploadSessionStart` or `uploadSessionAppend` call. The maximum size of a
383 // file one can upload to an upload session is 350 GB. This route will
384 // return a job_id immediately and do the async commit job in background.
385 // Use `uploadSessionFinishBatchCheck` to check the job status. For the same
386 // account, this route should be executed serially. That means you should
387 // not start the next job before current job finishes. We allow up to 1000
388 // entries in a single request. Calls to this endpoint will count as data
389 // transport calls for any Dropbox Business teams with a limit on the number
390 // of data transport calls allowed per month. For more information, see the
391 // `Data transport limit page`
392 // <https://www.dropbox.com/developers/reference/data-transport-limit>.
393 UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error)
394 // UploadSessionFinishBatchCheck : Returns the status of an asynchronous job
395 // for `uploadSessionFinishBatch`. If success, it returns list of result for
396 // each entry.
397 UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error)
398 // UploadSessionStart : Upload sessions allow you to upload a single file in
399 // one or more requests, for example where the size of the file is greater
400 // than 150 MB. This call starts a new upload session with the given data.
401 // You can then use `uploadSessionAppend` to add more data and
402 // `uploadSessionFinish` to save all the data to a file in Dropbox. A single
403 // request should not upload more than 150 MB. The maximum size of a file
404 // one can upload to an upload session is 350 GB. An upload session can be
405 // used for a maximum of 7 days. Attempting to use an
406 // `UploadSessionStartResult.session_id` with `uploadSessionAppend` or
407 // `uploadSessionFinish` more than 7 days after its creation will return a
408 // `UploadSessionLookupError.not_found`. Calls to this endpoint will count
409 // as data transport calls for any Dropbox Business teams with a limit on
410 // the number of data transport calls allowed per month. For more
411 // information, see the `Data transport limit page`
412 // <https://www.dropbox.com/developers/reference/data-transport-limit>. By
413 // default, upload sessions require you to send content of the file in
414 // sequential order via consecutive `uploadSessionStart`,
415 // `uploadSessionAppend`, `uploadSessionFinish` calls. For better
416 // performance, you can instead optionally use a
417 // `UploadSessionType.concurrent` upload session. To start a new concurrent
418 // session, set `UploadSessionStartArg.session_type` to
419 // `UploadSessionType.concurrent`. After that, you can send file data in
420 // concurrent `uploadSessionAppend` requests. Finally finish the session
421 // with `uploadSessionFinish`. There are couple of constraints with
422 // concurrent sessions to make them work. You can not send data with
423 // `uploadSessionStart` or `uploadSessionFinish` call, only with
424 // `uploadSessionAppend` call. Also data uploaded in `uploadSessionAppend`
425 // call must be multiple of 4194304 bytes (except for last
426 // `uploadSessionAppend` with `UploadSessionStartArg.close` to true, that
427 // may contain any remaining data).
428 UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error)
429 }
430
431 type apiImpl dropbox.Context
432
433 //AlphaGetMetadataAPIError is an error-wrapper for the alpha/get_metadata route
434 type AlphaGetMetadataAPIError struct {
435 dropbox.APIError
436 EndpointError *AlphaGetMetadataError `json:"error"`
437 }
438
439 func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) {
440 log.Printf("WARNING: API `AlphaGetMetadata` is deprecated")
441 log.Printf("Use API `GetMetadata` instead")
442
443 req := dropbox.Request{
444 Host: "api",
445 Namespace: "files",
446 Route: "alpha/get_metadata",
447 Auth: "user",
448 Style: "rpc",
449 Arg: arg,
450 ExtraHeaders: nil,
451 }
452
453 var resp []byte
454 var respBody io.ReadCloser
455 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
456 if err != nil {
457 var appErr AlphaGetMetadataAPIError
458 err = auth.ParseError(err, &appErr)
459 if err == &appErr {
460 err = appErr
461 }
462 return
463 }
464
465 var tmp metadataUnion
466 err = json.Unmarshal(resp, &tmp)
467 if err != nil {
468 return
469 }
470 switch tmp.Tag {
471 case "file":
472 res = tmp.File
473
474 case "folder":
475 res = tmp.Folder
476
477 case "deleted":
478 res = tmp.Deleted
479
480 }
481 _ = respBody
482 return
483 }
484
485 //AlphaUploadAPIError is an error-wrapper for the alpha/upload route
486 type AlphaUploadAPIError struct {
487 dropbox.APIError
488 EndpointError *UploadErrorWithProperties `json:"error"`
489 }
490
491 func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) {
492 log.Printf("WARNING: API `AlphaUpload` is deprecated")
493 log.Printf("Use API `AlphaUpload` instead")
494
495 req := dropbox.Request{
496 Host: "content",
497 Namespace: "files",
498 Route: "alpha/upload",
499 Auth: "user",
500 Style: "upload",
501 Arg: arg,
502 ExtraHeaders: nil,
503 }
504
505 var resp []byte
506 var respBody io.ReadCloser
507 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
508 if err != nil {
509 var appErr AlphaUploadAPIError
510 err = auth.ParseError(err, &appErr)
511 if err == &appErr {
512 err = appErr
513 }
514 return
515 }
516
517 err = json.Unmarshal(resp, &res)
518 if err != nil {
519 return
520 }
521
522 _ = respBody
523 return
524 }
525
526 //CopyV2APIError is an error-wrapper for the copy_v2 route
527 type CopyV2APIError struct {
528 dropbox.APIError
529 EndpointError *RelocationError `json:"error"`
530 }
531
532 func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error) {
533 req := dropbox.Request{
534 Host: "api",
535 Namespace: "files",
536 Route: "copy_v2",
537 Auth: "user",
538 Style: "rpc",
539 Arg: arg,
540 ExtraHeaders: nil,
541 }
542
543 var resp []byte
544 var respBody io.ReadCloser
545 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
546 if err != nil {
547 var appErr CopyV2APIError
548 err = auth.ParseError(err, &appErr)
549 if err == &appErr {
550 err = appErr
551 }
552 return
553 }
554
555 err = json.Unmarshal(resp, &res)
556 if err != nil {
557 return
558 }
559
560 _ = respBody
561 return
562 }
563
564 //CopyAPIError is an error-wrapper for the copy route
565 type CopyAPIError struct {
566 dropbox.APIError
567 EndpointError *RelocationError `json:"error"`
568 }
569
570 func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) {
571 log.Printf("WARNING: API `Copy` is deprecated")
572 log.Printf("Use API `CopyV2` instead")
573
574 req := dropbox.Request{
575 Host: "api",
576 Namespace: "files",
577 Route: "copy",
578 Auth: "user",
579 Style: "rpc",
580 Arg: arg,
581 ExtraHeaders: nil,
582 }
583
584 var resp []byte
585 var respBody io.ReadCloser
586 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
587 if err != nil {
588 var appErr CopyAPIError
589 err = auth.ParseError(err, &appErr)
590 if err == &appErr {
591 err = appErr
592 }
593 return
594 }
595
596 var tmp metadataUnion
597 err = json.Unmarshal(resp, &tmp)
598 if err != nil {
599 return
600 }
601 switch tmp.Tag {
602 case "file":
603 res = tmp.File
604
605 case "folder":
606 res = tmp.Folder
607
608 case "deleted":
609 res = tmp.Deleted
610
611 }
612 _ = respBody
613 return
614 }
615
616 //CopyBatchV2APIError is an error-wrapper for the copy_batch_v2 route
617 type CopyBatchV2APIError struct {
618 dropbox.APIError
619 EndpointError struct{} `json:"error"`
620 }
621
622 func (dbx *apiImpl) CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error) {
623 req := dropbox.Request{
624 Host: "api",
625 Namespace: "files",
626 Route: "copy_batch_v2",
627 Auth: "user",
628 Style: "rpc",
629 Arg: arg,
630 ExtraHeaders: nil,
631 }
632
633 var resp []byte
634 var respBody io.ReadCloser
635 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
636 if err != nil {
637 var appErr CopyBatchV2APIError
638 err = auth.ParseError(err, &appErr)
639 if err == &appErr {
640 err = appErr
641 }
642 return
643 }
644
645 err = json.Unmarshal(resp, &res)
646 if err != nil {
647 return
648 }
649
650 _ = respBody
651 return
652 }
653
654 //CopyBatchAPIError is an error-wrapper for the copy_batch route
655 type CopyBatchAPIError struct {
656 dropbox.APIError
657 EndpointError struct{} `json:"error"`
658 }
659
660 func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
661 log.Printf("WARNING: API `CopyBatch` is deprecated")
662 log.Printf("Use API `CopyBatchV2` instead")
663
664 req := dropbox.Request{
665 Host: "api",
666 Namespace: "files",
667 Route: "copy_batch",
668 Auth: "user",
669 Style: "rpc",
670 Arg: arg,
671 ExtraHeaders: nil,
672 }
673
674 var resp []byte
675 var respBody io.ReadCloser
676 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
677 if err != nil {
678 var appErr CopyBatchAPIError
679 err = auth.ParseError(err, &appErr)
680 if err == &appErr {
681 err = appErr
682 }
683 return
684 }
685
686 err = json.Unmarshal(resp, &res)
687 if err != nil {
688 return
689 }
690
691 _ = respBody
692 return
693 }
694
695 //CopyBatchCheckV2APIError is an error-wrapper for the copy_batch/check_v2 route
696 type CopyBatchCheckV2APIError struct {
697 dropbox.APIError
698 EndpointError *async.PollError `json:"error"`
699 }
700
701 func (dbx *apiImpl) CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) {
702 req := dropbox.Request{
703 Host: "api",
704 Namespace: "files",
705 Route: "copy_batch/check_v2",
706 Auth: "user",
707 Style: "rpc",
708 Arg: arg,
709 ExtraHeaders: nil,
710 }
711
712 var resp []byte
713 var respBody io.ReadCloser
714 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
715 if err != nil {
716 var appErr CopyBatchCheckV2APIError
717 err = auth.ParseError(err, &appErr)
718 if err == &appErr {
719 err = appErr
720 }
721 return
722 }
723
724 err = json.Unmarshal(resp, &res)
725 if err != nil {
726 return
727 }
728
729 _ = respBody
730 return
731 }
732
733 //CopyBatchCheckAPIError is an error-wrapper for the copy_batch/check route
734 type CopyBatchCheckAPIError struct {
735 dropbox.APIError
736 EndpointError *async.PollError `json:"error"`
737 }
738
739 func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
740 log.Printf("WARNING: API `CopyBatchCheck` is deprecated")
741 log.Printf("Use API `CopyBatchCheckV2` instead")
742
743 req := dropbox.Request{
744 Host: "api",
745 Namespace: "files",
746 Route: "copy_batch/check",
747 Auth: "user",
748 Style: "rpc",
749 Arg: arg,
750 ExtraHeaders: nil,
751 }
752
753 var resp []byte
754 var respBody io.ReadCloser
755 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
756 if err != nil {
757 var appErr CopyBatchCheckAPIError
758 err = auth.ParseError(err, &appErr)
759 if err == &appErr {
760 err = appErr
761 }
762 return
763 }
764
765 err = json.Unmarshal(resp, &res)
766 if err != nil {
767 return
768 }
769
770 _ = respBody
771 return
772 }
773
774 //CopyReferenceGetAPIError is an error-wrapper for the copy_reference/get route
775 type CopyReferenceGetAPIError struct {
776 dropbox.APIError
777 EndpointError *GetCopyReferenceError `json:"error"`
778 }
779
780 func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error) {
781 req := dropbox.Request{
782 Host: "api",
783 Namespace: "files",
784 Route: "copy_reference/get",
785 Auth: "user",
786 Style: "rpc",
787 Arg: arg,
788 ExtraHeaders: nil,
789 }
790
791 var resp []byte
792 var respBody io.ReadCloser
793 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
794 if err != nil {
795 var appErr CopyReferenceGetAPIError
796 err = auth.ParseError(err, &appErr)
797 if err == &appErr {
798 err = appErr
799 }
800 return
801 }
802
803 err = json.Unmarshal(resp, &res)
804 if err != nil {
805 return
806 }
807
808 _ = respBody
809 return
810 }
811
812 //CopyReferenceSaveAPIError is an error-wrapper for the copy_reference/save route
813 type CopyReferenceSaveAPIError struct {
814 dropbox.APIError
815 EndpointError *SaveCopyReferenceError `json:"error"`
816 }
817
818 func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error) {
819 req := dropbox.Request{
820 Host: "api",
821 Namespace: "files",
822 Route: "copy_reference/save",
823 Auth: "user",
824 Style: "rpc",
825 Arg: arg,
826 ExtraHeaders: nil,
827 }
828
829 var resp []byte
830 var respBody io.ReadCloser
831 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
832 if err != nil {
833 var appErr CopyReferenceSaveAPIError
834 err = auth.ParseError(err, &appErr)
835 if err == &appErr {
836 err = appErr
837 }
838 return
839 }
840
841 err = json.Unmarshal(resp, &res)
842 if err != nil {
843 return
844 }
845
846 _ = respBody
847 return
848 }
849
850 //CreateFolderV2APIError is an error-wrapper for the create_folder_v2 route
851 type CreateFolderV2APIError struct {
852 dropbox.APIError
853 EndpointError *CreateFolderError `json:"error"`
854 }
855
856 func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error) {
857 req := dropbox.Request{
858 Host: "api",
859 Namespace: "files",
860 Route: "create_folder_v2",
861 Auth: "user",
862 Style: "rpc",
863 Arg: arg,
864 ExtraHeaders: nil,
865 }
866
867 var resp []byte
868 var respBody io.ReadCloser
869 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
870 if err != nil {
871 var appErr CreateFolderV2APIError
872 err = auth.ParseError(err, &appErr)
873 if err == &appErr {
874 err = appErr
875 }
876 return
877 }
878
879 err = json.Unmarshal(resp, &res)
880 if err != nil {
881 return
882 }
883
884 _ = respBody
885 return
886 }
887
888 //CreateFolderAPIError is an error-wrapper for the create_folder route
889 type CreateFolderAPIError struct {
890 dropbox.APIError
891 EndpointError *CreateFolderError `json:"error"`
892 }
893
894 func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error) {
895 log.Printf("WARNING: API `CreateFolder` is deprecated")
896 log.Printf("Use API `CreateFolderV2` instead")
897
898 req := dropbox.Request{
899 Host: "api",
900 Namespace: "files",
901 Route: "create_folder",
902 Auth: "user",
903 Style: "rpc",
904 Arg: arg,
905 ExtraHeaders: nil,
906 }
907
908 var resp []byte
909 var respBody io.ReadCloser
910 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
911 if err != nil {
912 var appErr CreateFolderAPIError
913 err = auth.ParseError(err, &appErr)
914 if err == &appErr {
915 err = appErr
916 }
917 return
918 }
919
920 err = json.Unmarshal(resp, &res)
921 if err != nil {
922 return
923 }
924
925 _ = respBody
926 return
927 }
928
929 //CreateFolderBatchAPIError is an error-wrapper for the create_folder_batch route
930 type CreateFolderBatchAPIError struct {
931 dropbox.APIError
932 EndpointError struct{} `json:"error"`
933 }
934
935 func (dbx *apiImpl) CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error) {
936 req := dropbox.Request{
937 Host: "api",
938 Namespace: "files",
939 Route: "create_folder_batch",
940 Auth: "user",
941 Style: "rpc",
942 Arg: arg,
943 ExtraHeaders: nil,
944 }
945
946 var resp []byte
947 var respBody io.ReadCloser
948 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
949 if err != nil {
950 var appErr CreateFolderBatchAPIError
951 err = auth.ParseError(err, &appErr)
952 if err == &appErr {
953 err = appErr
954 }
955 return
956 }
957
958 err = json.Unmarshal(resp, &res)
959 if err != nil {
960 return
961 }
962
963 _ = respBody
964 return
965 }
966
967 //CreateFolderBatchCheckAPIError is an error-wrapper for the create_folder_batch/check route
968 type CreateFolderBatchCheckAPIError struct {
969 dropbox.APIError
970 EndpointError *async.PollError `json:"error"`
971 }
972
973 func (dbx *apiImpl) CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error) {
974 req := dropbox.Request{
975 Host: "api",
976 Namespace: "files",
977 Route: "create_folder_batch/check",
978 Auth: "user",
979 Style: "rpc",
980 Arg: arg,
981 ExtraHeaders: nil,
982 }
983
984 var resp []byte
985 var respBody io.ReadCloser
986 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
987 if err != nil {
988 var appErr CreateFolderBatchCheckAPIError
989 err = auth.ParseError(err, &appErr)
990 if err == &appErr {
991 err = appErr
992 }
993 return
994 }
995
996 err = json.Unmarshal(resp, &res)
997 if err != nil {
998 return
999 }
1000
1001 _ = respBody
1002 return
1003 }
1004
1005 //DeleteV2APIError is an error-wrapper for the delete_v2 route
1006 type DeleteV2APIError struct {
1007 dropbox.APIError
1008 EndpointError *DeleteError `json:"error"`
1009 }
1010
1011 func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) {
1012 req := dropbox.Request{
1013 Host: "api",
1014 Namespace: "files",
1015 Route: "delete_v2",
1016 Auth: "user",
1017 Style: "rpc",
1018 Arg: arg,
1019 ExtraHeaders: nil,
1020 }
1021
1022 var resp []byte
1023 var respBody io.ReadCloser
1024 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1025 if err != nil {
1026 var appErr DeleteV2APIError
1027 err = auth.ParseError(err, &appErr)
1028 if err == &appErr {
1029 err = appErr
1030 }
1031 return
1032 }
1033
1034 err = json.Unmarshal(resp, &res)
1035 if err != nil {
1036 return
1037 }
1038
1039 _ = respBody
1040 return
1041 }
1042
1043 //DeleteAPIError is an error-wrapper for the delete route
1044 type DeleteAPIError struct {
1045 dropbox.APIError
1046 EndpointError *DeleteError `json:"error"`
1047 }
1048
1049 func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) {
1050 log.Printf("WARNING: API `Delete` is deprecated")
1051 log.Printf("Use API `DeleteV2` instead")
1052
1053 req := dropbox.Request{
1054 Host: "api",
1055 Namespace: "files",
1056 Route: "delete",
1057 Auth: "user",
1058 Style: "rpc",
1059 Arg: arg,
1060 ExtraHeaders: nil,
1061 }
1062
1063 var resp []byte
1064 var respBody io.ReadCloser
1065 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1066 if err != nil {
1067 var appErr DeleteAPIError
1068 err = auth.ParseError(err, &appErr)
1069 if err == &appErr {
1070 err = appErr
1071 }
1072 return
1073 }
1074
1075 var tmp metadataUnion
1076 err = json.Unmarshal(resp, &tmp)
1077 if err != nil {
1078 return
1079 }
1080 switch tmp.Tag {
1081 case "file":
1082 res = tmp.File
1083
1084 case "folder":
1085 res = tmp.Folder
1086
1087 case "deleted":
1088 res = tmp.Deleted
1089
1090 }
1091 _ = respBody
1092 return
1093 }
1094
1095 //DeleteBatchAPIError is an error-wrapper for the delete_batch route
1096 type DeleteBatchAPIError struct {
1097 dropbox.APIError
1098 EndpointError struct{} `json:"error"`
1099 }
1100
1101 func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error) {
1102 req := dropbox.Request{
1103 Host: "api",
1104 Namespace: "files",
1105 Route: "delete_batch",
1106 Auth: "user",
1107 Style: "rpc",
1108 Arg: arg,
1109 ExtraHeaders: nil,
1110 }
1111
1112 var resp []byte
1113 var respBody io.ReadCloser
1114 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1115 if err != nil {
1116 var appErr DeleteBatchAPIError
1117 err = auth.ParseError(err, &appErr)
1118 if err == &appErr {
1119 err = appErr
1120 }
1121 return
1122 }
1123
1124 err = json.Unmarshal(resp, &res)
1125 if err != nil {
1126 return
1127 }
1128
1129 _ = respBody
1130 return
1131 }
1132
1133 //DeleteBatchCheckAPIError is an error-wrapper for the delete_batch/check route
1134 type DeleteBatchCheckAPIError struct {
1135 dropbox.APIError
1136 EndpointError *async.PollError `json:"error"`
1137 }
1138
1139 func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error) {
1140 req := dropbox.Request{
1141 Host: "api",
1142 Namespace: "files",
1143 Route: "delete_batch/check",
1144 Auth: "user",
1145 Style: "rpc",
1146 Arg: arg,
1147 ExtraHeaders: nil,
1148 }
1149
1150 var resp []byte
1151 var respBody io.ReadCloser
1152 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1153 if err != nil {
1154 var appErr DeleteBatchCheckAPIError
1155 err = auth.ParseError(err, &appErr)
1156 if err == &appErr {
1157 err = appErr
1158 }
1159 return
1160 }
1161
1162 err = json.Unmarshal(resp, &res)
1163 if err != nil {
1164 return
1165 }
1166
1167 _ = respBody
1168 return
1169 }
1170
1171 //DownloadAPIError is an error-wrapper for the download route
1172 type DownloadAPIError struct {
1173 dropbox.APIError
1174 EndpointError *DownloadError `json:"error"`
1175 }
1176
1177 func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error) {
1178 req := dropbox.Request{
1179 Host: "content",
1180 Namespace: "files",
1181 Route: "download",
1182 Auth: "user",
1183 Style: "download",
1184 Arg: arg,
1185 ExtraHeaders: arg.ExtraHeaders,
1186 }
1187
1188 var resp []byte
1189 var respBody io.ReadCloser
1190 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1191 if err != nil {
1192 var appErr DownloadAPIError
1193 err = auth.ParseError(err, &appErr)
1194 if err == &appErr {
1195 err = appErr
1196 }
1197 return
1198 }
1199
1200 err = json.Unmarshal(resp, &res)
1201 if err != nil {
1202 return
1203 }
1204
1205 content = respBody
1206 return
1207 }
1208
1209 //DownloadZipAPIError is an error-wrapper for the download_zip route
1210 type DownloadZipAPIError struct {
1211 dropbox.APIError
1212 EndpointError *DownloadZipError `json:"error"`
1213 }
1214
1215 func (dbx *apiImpl) DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error) {
1216 req := dropbox.Request{
1217 Host: "content",
1218 Namespace: "files",
1219 Route: "download_zip",
1220 Auth: "user",
1221 Style: "download",
1222 Arg: arg,
1223 ExtraHeaders: nil,
1224 }
1225
1226 var resp []byte
1227 var respBody io.ReadCloser
1228 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1229 if err != nil {
1230 var appErr DownloadZipAPIError
1231 err = auth.ParseError(err, &appErr)
1232 if err == &appErr {
1233 err = appErr
1234 }
1235 return
1236 }
1237
1238 err = json.Unmarshal(resp, &res)
1239 if err != nil {
1240 return
1241 }
1242
1243 content = respBody
1244 return
1245 }
1246
1247 //ExportAPIError is an error-wrapper for the export route
1248 type ExportAPIError struct {
1249 dropbox.APIError
1250 EndpointError *ExportError `json:"error"`
1251 }
1252
1253 func (dbx *apiImpl) Export(arg *ExportArg) (res *ExportResult, content io.ReadCloser, err error) {
1254 req := dropbox.Request{
1255 Host: "content",
1256 Namespace: "files",
1257 Route: "export",
1258 Auth: "user",
1259 Style: "download",
1260 Arg: arg,
1261 ExtraHeaders: nil,
1262 }
1263
1264 var resp []byte
1265 var respBody io.ReadCloser
1266 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1267 if err != nil {
1268 var appErr ExportAPIError
1269 err = auth.ParseError(err, &appErr)
1270 if err == &appErr {
1271 err = appErr
1272 }
1273 return
1274 }
1275
1276 err = json.Unmarshal(resp, &res)
1277 if err != nil {
1278 return
1279 }
1280
1281 content = respBody
1282 return
1283 }
1284
1285 //GetFileLockBatchAPIError is an error-wrapper for the get_file_lock_batch route
1286 type GetFileLockBatchAPIError struct {
1287 dropbox.APIError
1288 EndpointError *LockFileError `json:"error"`
1289 }
1290
1291 func (dbx *apiImpl) GetFileLockBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error) {
1292 req := dropbox.Request{
1293 Host: "api",
1294 Namespace: "files",
1295 Route: "get_file_lock_batch",
1296 Auth: "user",
1297 Style: "rpc",
1298 Arg: arg,
1299 ExtraHeaders: nil,
1300 }
1301
1302 var resp []byte
1303 var respBody io.ReadCloser
1304 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1305 if err != nil {
1306 var appErr GetFileLockBatchAPIError
1307 err = auth.ParseError(err, &appErr)
1308 if err == &appErr {
1309 err = appErr
1310 }
1311 return
1312 }
1313
1314 err = json.Unmarshal(resp, &res)
1315 if err != nil {
1316 return
1317 }
1318
1319 _ = respBody
1320 return
1321 }
1322
1323 //GetMetadataAPIError is an error-wrapper for the get_metadata route
1324 type GetMetadataAPIError struct {
1325 dropbox.APIError
1326 EndpointError *GetMetadataError `json:"error"`
1327 }
1328
1329 func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {
1330 req := dropbox.Request{
1331 Host: "api",
1332 Namespace: "files",
1333 Route: "get_metadata",
1334 Auth: "user",
1335 Style: "rpc",
1336 Arg: arg,
1337 ExtraHeaders: nil,
1338 }
1339
1340 var resp []byte
1341 var respBody io.ReadCloser
1342 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1343 if err != nil {
1344 var appErr GetMetadataAPIError
1345 err = auth.ParseError(err, &appErr)
1346 if err == &appErr {
1347 err = appErr
1348 }
1349 return
1350 }
1351
1352 var tmp metadataUnion
1353 err = json.Unmarshal(resp, &tmp)
1354 if err != nil {
1355 return
1356 }
1357 switch tmp.Tag {
1358 case "file":
1359 res = tmp.File
1360
1361 case "folder":
1362 res = tmp.Folder
1363
1364 case "deleted":
1365 res = tmp.Deleted
1366
1367 }
1368 _ = respBody
1369 return
1370 }
1371
1372 //GetPreviewAPIError is an error-wrapper for the get_preview route
1373 type GetPreviewAPIError struct {
1374 dropbox.APIError
1375 EndpointError *PreviewError `json:"error"`
1376 }
1377
1378 func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error) {
1379 req := dropbox.Request{
1380 Host: "content",
1381 Namespace: "files",
1382 Route: "get_preview",
1383 Auth: "user",
1384 Style: "download",
1385 Arg: arg,
1386 ExtraHeaders: nil,
1387 }
1388
1389 var resp []byte
1390 var respBody io.ReadCloser
1391 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1392 if err != nil {
1393 var appErr GetPreviewAPIError
1394 err = auth.ParseError(err, &appErr)
1395 if err == &appErr {
1396 err = appErr
1397 }
1398 return
1399 }
1400
1401 err = json.Unmarshal(resp, &res)
1402 if err != nil {
1403 return
1404 }
1405
1406 content = respBody
1407 return
1408 }
1409
1410 //GetTemporaryLinkAPIError is an error-wrapper for the get_temporary_link route
1411 type GetTemporaryLinkAPIError struct {
1412 dropbox.APIError
1413 EndpointError *GetTemporaryLinkError `json:"error"`
1414 }
1415
1416 func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error) {
1417 req := dropbox.Request{
1418 Host: "api",
1419 Namespace: "files",
1420 Route: "get_temporary_link",
1421 Auth: "user",
1422 Style: "rpc",
1423 Arg: arg,
1424 ExtraHeaders: nil,
1425 }
1426
1427 var resp []byte
1428 var respBody io.ReadCloser
1429 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1430 if err != nil {
1431 var appErr GetTemporaryLinkAPIError
1432 err = auth.ParseError(err, &appErr)
1433 if err == &appErr {
1434 err = appErr
1435 }
1436 return
1437 }
1438
1439 err = json.Unmarshal(resp, &res)
1440 if err != nil {
1441 return
1442 }
1443
1444 _ = respBody
1445 return
1446 }
1447
1448 //GetTemporaryUploadLinkAPIError is an error-wrapper for the get_temporary_upload_link route
1449 type GetTemporaryUploadLinkAPIError struct {
1450 dropbox.APIError
1451 EndpointError struct{} `json:"error"`
1452 }
1453
1454 func (dbx *apiImpl) GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error) {
1455 req := dropbox.Request{
1456 Host: "api",
1457 Namespace: "files",
1458 Route: "get_temporary_upload_link",
1459 Auth: "user",
1460 Style: "rpc",
1461 Arg: arg,
1462 ExtraHeaders: nil,
1463 }
1464
1465 var resp []byte
1466 var respBody io.ReadCloser
1467 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1468 if err != nil {
1469 var appErr GetTemporaryUploadLinkAPIError
1470 err = auth.ParseError(err, &appErr)
1471 if err == &appErr {
1472 err = appErr
1473 }
1474 return
1475 }
1476
1477 err = json.Unmarshal(resp, &res)
1478 if err != nil {
1479 return
1480 }
1481
1482 _ = respBody
1483 return
1484 }
1485
1486 //GetThumbnailAPIError is an error-wrapper for the get_thumbnail route
1487 type GetThumbnailAPIError struct {
1488 dropbox.APIError
1489 EndpointError *ThumbnailError `json:"error"`
1490 }
1491
1492 func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error) {
1493 req := dropbox.Request{
1494 Host: "content",
1495 Namespace: "files",
1496 Route: "get_thumbnail",
1497 Auth: "user",
1498 Style: "download",
1499 Arg: arg,
1500 ExtraHeaders: nil,
1501 }
1502
1503 var resp []byte
1504 var respBody io.ReadCloser
1505 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1506 if err != nil {
1507 var appErr GetThumbnailAPIError
1508 err = auth.ParseError(err, &appErr)
1509 if err == &appErr {
1510 err = appErr
1511 }
1512 return
1513 }
1514
1515 err = json.Unmarshal(resp, &res)
1516 if err != nil {
1517 return
1518 }
1519
1520 content = respBody
1521 return
1522 }
1523
1524 //GetThumbnailV2APIError is an error-wrapper for the get_thumbnail_v2 route
1525 type GetThumbnailV2APIError struct {
1526 dropbox.APIError
1527 EndpointError *ThumbnailV2Error `json:"error"`
1528 }
1529
1530 func (dbx *apiImpl) GetThumbnailV2(arg *ThumbnailV2Arg) (res *PreviewResult, content io.ReadCloser, err error) {
1531 req := dropbox.Request{
1532 Host: "content",
1533 Namespace: "files",
1534 Route: "get_thumbnail_v2",
1535 Auth: "app, user",
1536 Style: "download",
1537 Arg: arg,
1538 ExtraHeaders: nil,
1539 }
1540
1541 var resp []byte
1542 var respBody io.ReadCloser
1543 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1544 if err != nil {
1545 var appErr GetThumbnailV2APIError
1546 err = auth.ParseError(err, &appErr)
1547 if err == &appErr {
1548 err = appErr
1549 }
1550 return
1551 }
1552
1553 err = json.Unmarshal(resp, &res)
1554 if err != nil {
1555 return
1556 }
1557
1558 content = respBody
1559 return
1560 }
1561
1562 //GetThumbnailBatchAPIError is an error-wrapper for the get_thumbnail_batch route
1563 type GetThumbnailBatchAPIError struct {
1564 dropbox.APIError
1565 EndpointError *GetThumbnailBatchError `json:"error"`
1566 }
1567
1568 func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error) {
1569 req := dropbox.Request{
1570 Host: "content",
1571 Namespace: "files",
1572 Route: "get_thumbnail_batch",
1573 Auth: "user",
1574 Style: "rpc",
1575 Arg: arg,
1576 ExtraHeaders: nil,
1577 }
1578
1579 var resp []byte
1580 var respBody io.ReadCloser
1581 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1582 if err != nil {
1583 var appErr GetThumbnailBatchAPIError
1584 err = auth.ParseError(err, &appErr)
1585 if err == &appErr {
1586 err = appErr
1587 }
1588 return
1589 }
1590
1591 err = json.Unmarshal(resp, &res)
1592 if err != nil {
1593 return
1594 }
1595
1596 _ = respBody
1597 return
1598 }
1599
1600 //ListFolderAPIError is an error-wrapper for the list_folder route
1601 type ListFolderAPIError struct {
1602 dropbox.APIError
1603 EndpointError *ListFolderError `json:"error"`
1604 }
1605
1606 func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error) {
1607 req := dropbox.Request{
1608 Host: "api",
1609 Namespace: "files",
1610 Route: "list_folder",
1611 Auth: "user",
1612 Style: "rpc",
1613 Arg: arg,
1614 ExtraHeaders: nil,
1615 }
1616
1617 var resp []byte
1618 var respBody io.ReadCloser
1619 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1620 if err != nil {
1621 var appErr ListFolderAPIError
1622 err = auth.ParseError(err, &appErr)
1623 if err == &appErr {
1624 err = appErr
1625 }
1626 return
1627 }
1628
1629 err = json.Unmarshal(resp, &res)
1630 if err != nil {
1631 return
1632 }
1633
1634 _ = respBody
1635 return
1636 }
1637
1638 //ListFolderContinueAPIError is an error-wrapper for the list_folder/continue route
1639 type ListFolderContinueAPIError struct {
1640 dropbox.APIError
1641 EndpointError *ListFolderContinueError `json:"error"`
1642 }
1643
1644 func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error) {
1645 req := dropbox.Request{
1646 Host: "api",
1647 Namespace: "files",
1648 Route: "list_folder/continue",
1649 Auth: "user",
1650 Style: "rpc",
1651 Arg: arg,
1652 ExtraHeaders: nil,
1653 }
1654
1655 var resp []byte
1656 var respBody io.ReadCloser
1657 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1658 if err != nil {
1659 var appErr ListFolderContinueAPIError
1660 err = auth.ParseError(err, &appErr)
1661 if err == &appErr {
1662 err = appErr
1663 }
1664 return
1665 }
1666
1667 err = json.Unmarshal(resp, &res)
1668 if err != nil {
1669 return
1670 }
1671
1672 _ = respBody
1673 return
1674 }
1675
1676 //ListFolderGetLatestCursorAPIError is an error-wrapper for the list_folder/get_latest_cursor route
1677 type ListFolderGetLatestCursorAPIError struct {
1678 dropbox.APIError
1679 EndpointError *ListFolderError `json:"error"`
1680 }
1681
1682 func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error) {
1683 req := dropbox.Request{
1684 Host: "api",
1685 Namespace: "files",
1686 Route: "list_folder/get_latest_cursor",
1687 Auth: "user",
1688 Style: "rpc",
1689 Arg: arg,
1690 ExtraHeaders: nil,
1691 }
1692
1693 var resp []byte
1694 var respBody io.ReadCloser
1695 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1696 if err != nil {
1697 var appErr ListFolderGetLatestCursorAPIError
1698 err = auth.ParseError(err, &appErr)
1699 if err == &appErr {
1700 err = appErr
1701 }
1702 return
1703 }
1704
1705 err = json.Unmarshal(resp, &res)
1706 if err != nil {
1707 return
1708 }
1709
1710 _ = respBody
1711 return
1712 }
1713
1714 //ListFolderLongpollAPIError is an error-wrapper for the list_folder/longpoll route
1715 type ListFolderLongpollAPIError struct {
1716 dropbox.APIError
1717 EndpointError *ListFolderLongpollError `json:"error"`
1718 }
1719
1720 func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error) {
1721 req := dropbox.Request{
1722 Host: "notify",
1723 Namespace: "files",
1724 Route: "list_folder/longpoll",
1725 Auth: "noauth",
1726 Style: "rpc",
1727 Arg: arg,
1728 ExtraHeaders: nil,
1729 }
1730
1731 var resp []byte
1732 var respBody io.ReadCloser
1733 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1734 if err != nil {
1735 var appErr ListFolderLongpollAPIError
1736 err = auth.ParseError(err, &appErr)
1737 if err == &appErr {
1738 err = appErr
1739 }
1740 return
1741 }
1742
1743 err = json.Unmarshal(resp, &res)
1744 if err != nil {
1745 return
1746 }
1747
1748 _ = respBody
1749 return
1750 }
1751
1752 //ListRevisionsAPIError is an error-wrapper for the list_revisions route
1753 type ListRevisionsAPIError struct {
1754 dropbox.APIError
1755 EndpointError *ListRevisionsError `json:"error"`
1756 }
1757
1758 func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error) {
1759 req := dropbox.Request{
1760 Host: "api",
1761 Namespace: "files",
1762 Route: "list_revisions",
1763 Auth: "user",
1764 Style: "rpc",
1765 Arg: arg,
1766 ExtraHeaders: nil,
1767 }
1768
1769 var resp []byte
1770 var respBody io.ReadCloser
1771 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1772 if err != nil {
1773 var appErr ListRevisionsAPIError
1774 err = auth.ParseError(err, &appErr)
1775 if err == &appErr {
1776 err = appErr
1777 }
1778 return
1779 }
1780
1781 err = json.Unmarshal(resp, &res)
1782 if err != nil {
1783 return
1784 }
1785
1786 _ = respBody
1787 return
1788 }
1789
1790 //LockFileBatchAPIError is an error-wrapper for the lock_file_batch route
1791 type LockFileBatchAPIError struct {
1792 dropbox.APIError
1793 EndpointError *LockFileError `json:"error"`
1794 }
1795
1796 func (dbx *apiImpl) LockFileBatch(arg *LockFileBatchArg) (res *LockFileBatchResult, err error) {
1797 req := dropbox.Request{
1798 Host: "api",
1799 Namespace: "files",
1800 Route: "lock_file_batch",
1801 Auth: "user",
1802 Style: "rpc",
1803 Arg: arg,
1804 ExtraHeaders: nil,
1805 }
1806
1807 var resp []byte
1808 var respBody io.ReadCloser
1809 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1810 if err != nil {
1811 var appErr LockFileBatchAPIError
1812 err = auth.ParseError(err, &appErr)
1813 if err == &appErr {
1814 err = appErr
1815 }
1816 return
1817 }
1818
1819 err = json.Unmarshal(resp, &res)
1820 if err != nil {
1821 return
1822 }
1823
1824 _ = respBody
1825 return
1826 }
1827
1828 //MoveV2APIError is an error-wrapper for the move_v2 route
1829 type MoveV2APIError struct {
1830 dropbox.APIError
1831 EndpointError *RelocationError `json:"error"`
1832 }
1833
1834 func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error) {
1835 req := dropbox.Request{
1836 Host: "api",
1837 Namespace: "files",
1838 Route: "move_v2",
1839 Auth: "user",
1840 Style: "rpc",
1841 Arg: arg,
1842 ExtraHeaders: nil,
1843 }
1844
1845 var resp []byte
1846 var respBody io.ReadCloser
1847 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1848 if err != nil {
1849 var appErr MoveV2APIError
1850 err = auth.ParseError(err, &appErr)
1851 if err == &appErr {
1852 err = appErr
1853 }
1854 return
1855 }
1856
1857 err = json.Unmarshal(resp, &res)
1858 if err != nil {
1859 return
1860 }
1861
1862 _ = respBody
1863 return
1864 }
1865
1866 //MoveAPIError is an error-wrapper for the move route
1867 type MoveAPIError struct {
1868 dropbox.APIError
1869 EndpointError *RelocationError `json:"error"`
1870 }
1871
1872 func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) {
1873 log.Printf("WARNING: API `Move` is deprecated")
1874 log.Printf("Use API `MoveV2` instead")
1875
1876 req := dropbox.Request{
1877 Host: "api",
1878 Namespace: "files",
1879 Route: "move",
1880 Auth: "user",
1881 Style: "rpc",
1882 Arg: arg,
1883 ExtraHeaders: nil,
1884 }
1885
1886 var resp []byte
1887 var respBody io.ReadCloser
1888 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1889 if err != nil {
1890 var appErr MoveAPIError
1891 err = auth.ParseError(err, &appErr)
1892 if err == &appErr {
1893 err = appErr
1894 }
1895 return
1896 }
1897
1898 var tmp metadataUnion
1899 err = json.Unmarshal(resp, &tmp)
1900 if err != nil {
1901 return
1902 }
1903 switch tmp.Tag {
1904 case "file":
1905 res = tmp.File
1906
1907 case "folder":
1908 res = tmp.Folder
1909
1910 case "deleted":
1911 res = tmp.Deleted
1912
1913 }
1914 _ = respBody
1915 return
1916 }
1917
1918 //MoveBatchV2APIError is an error-wrapper for the move_batch_v2 route
1919 type MoveBatchV2APIError struct {
1920 dropbox.APIError
1921 EndpointError struct{} `json:"error"`
1922 }
1923
1924 func (dbx *apiImpl) MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error) {
1925 req := dropbox.Request{
1926 Host: "api",
1927 Namespace: "files",
1928 Route: "move_batch_v2",
1929 Auth: "user",
1930 Style: "rpc",
1931 Arg: arg,
1932 ExtraHeaders: nil,
1933 }
1934
1935 var resp []byte
1936 var respBody io.ReadCloser
1937 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1938 if err != nil {
1939 var appErr MoveBatchV2APIError
1940 err = auth.ParseError(err, &appErr)
1941 if err == &appErr {
1942 err = appErr
1943 }
1944 return
1945 }
1946
1947 err = json.Unmarshal(resp, &res)
1948 if err != nil {
1949 return
1950 }
1951
1952 _ = respBody
1953 return
1954 }
1955
1956 //MoveBatchAPIError is an error-wrapper for the move_batch route
1957 type MoveBatchAPIError struct {
1958 dropbox.APIError
1959 EndpointError struct{} `json:"error"`
1960 }
1961
1962 func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) {
1963 log.Printf("WARNING: API `MoveBatch` is deprecated")
1964 log.Printf("Use API `MoveBatchV2` instead")
1965
1966 req := dropbox.Request{
1967 Host: "api",
1968 Namespace: "files",
1969 Route: "move_batch",
1970 Auth: "user",
1971 Style: "rpc",
1972 Arg: arg,
1973 ExtraHeaders: nil,
1974 }
1975
1976 var resp []byte
1977 var respBody io.ReadCloser
1978 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1979 if err != nil {
1980 var appErr MoveBatchAPIError
1981 err = auth.ParseError(err, &appErr)
1982 if err == &appErr {
1983 err = appErr
1984 }
1985 return
1986 }
1987
1988 err = json.Unmarshal(resp, &res)
1989 if err != nil {
1990 return
1991 }
1992
1993 _ = respBody
1994 return
1995 }
1996
1997 //MoveBatchCheckV2APIError is an error-wrapper for the move_batch/check_v2 route
1998 type MoveBatchCheckV2APIError struct {
1999 dropbox.APIError
2000 EndpointError *async.PollError `json:"error"`
2001 }
2002
2003 func (dbx *apiImpl) MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) {
2004 req := dropbox.Request{
2005 Host: "api",
2006 Namespace: "files",
2007 Route: "move_batch/check_v2",
2008 Auth: "user",
2009 Style: "rpc",
2010 Arg: arg,
2011 ExtraHeaders: nil,
2012 }
2013
2014 var resp []byte
2015 var respBody io.ReadCloser
2016 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2017 if err != nil {
2018 var appErr MoveBatchCheckV2APIError
2019 err = auth.ParseError(err, &appErr)
2020 if err == &appErr {
2021 err = appErr
2022 }
2023 return
2024 }
2025
2026 err = json.Unmarshal(resp, &res)
2027 if err != nil {
2028 return
2029 }
2030
2031 _ = respBody
2032 return
2033 }
2034
2035 //MoveBatchCheckAPIError is an error-wrapper for the move_batch/check route
2036 type MoveBatchCheckAPIError struct {
2037 dropbox.APIError
2038 EndpointError *async.PollError `json:"error"`
2039 }
2040
2041 func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) {
2042 log.Printf("WARNING: API `MoveBatchCheck` is deprecated")
2043 log.Printf("Use API `MoveBatchCheckV2` instead")
2044
2045 req := dropbox.Request{
2046 Host: "api",
2047 Namespace: "files",
2048 Route: "move_batch/check",
2049 Auth: "user",
2050 Style: "rpc",
2051 Arg: arg,
2052 ExtraHeaders: nil,
2053 }
2054
2055 var resp []byte
2056 var respBody io.ReadCloser
2057 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2058 if err != nil {
2059 var appErr MoveBatchCheckAPIError
2060 err = auth.ParseError(err, &appErr)
2061 if err == &appErr {
2062 err = appErr
2063 }
2064 return
2065 }
2066
2067 err = json.Unmarshal(resp, &res)
2068 if err != nil {
2069 return
2070 }
2071
2072 _ = respBody
2073 return
2074 }
2075
2076 //PaperCreateAPIError is an error-wrapper for the paper/create route
2077 type PaperCreateAPIError struct {
2078 dropbox.APIError
2079 EndpointError *PaperCreateError `json:"error"`
2080 }
2081
2082 func (dbx *apiImpl) PaperCreate(arg *PaperCreateArg, content io.Reader) (res *PaperCreateResult, err error) {
2083 req := dropbox.Request{
2084 Host: "api",
2085 Namespace: "files",
2086 Route: "paper/create",
2087 Auth: "user",
2088 Style: "upload",
2089 Arg: arg,
2090 ExtraHeaders: nil,
2091 }
2092
2093 var resp []byte
2094 var respBody io.ReadCloser
2095 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2096 if err != nil {
2097 var appErr PaperCreateAPIError
2098 err = auth.ParseError(err, &appErr)
2099 if err == &appErr {
2100 err = appErr
2101 }
2102 return
2103 }
2104
2105 err = json.Unmarshal(resp, &res)
2106 if err != nil {
2107 return
2108 }
2109
2110 _ = respBody
2111 return
2112 }
2113
2114 //PaperUpdateAPIError is an error-wrapper for the paper/update route
2115 type PaperUpdateAPIError struct {
2116 dropbox.APIError
2117 EndpointError *PaperUpdateError `json:"error"`
2118 }
2119
2120 func (dbx *apiImpl) PaperUpdate(arg *PaperUpdateArg, content io.Reader) (res *PaperUpdateResult, err error) {
2121 req := dropbox.Request{
2122 Host: "api",
2123 Namespace: "files",
2124 Route: "paper/update",
2125 Auth: "user",
2126 Style: "upload",
2127 Arg: arg,
2128 ExtraHeaders: nil,
2129 }
2130
2131 var resp []byte
2132 var respBody io.ReadCloser
2133 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2134 if err != nil {
2135 var appErr PaperUpdateAPIError
2136 err = auth.ParseError(err, &appErr)
2137 if err == &appErr {
2138 err = appErr
2139 }
2140 return
2141 }
2142
2143 err = json.Unmarshal(resp, &res)
2144 if err != nil {
2145 return
2146 }
2147
2148 _ = respBody
2149 return
2150 }
2151
2152 //PermanentlyDeleteAPIError is an error-wrapper for the permanently_delete route
2153 type PermanentlyDeleteAPIError struct {
2154 dropbox.APIError
2155 EndpointError *DeleteError `json:"error"`
2156 }
2157
2158 func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) {
2159 req := dropbox.Request{
2160 Host: "api",
2161 Namespace: "files",
2162 Route: "permanently_delete",
2163 Auth: "user",
2164 Style: "rpc",
2165 Arg: arg,
2166 ExtraHeaders: nil,
2167 }
2168
2169 var resp []byte
2170 var respBody io.ReadCloser
2171 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2172 if err != nil {
2173 var appErr PermanentlyDeleteAPIError
2174 err = auth.ParseError(err, &appErr)
2175 if err == &appErr {
2176 err = appErr
2177 }
2178 return
2179 }
2180
2181 _ = resp
2182 _ = respBody
2183 return
2184 }
2185
2186 //PropertiesAddAPIError is an error-wrapper for the properties/add route
2187 type PropertiesAddAPIError struct {
2188 dropbox.APIError
2189 EndpointError *file_properties.AddPropertiesError `json:"error"`
2190 }
2191
2192 func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error) {
2193 log.Printf("WARNING: API `PropertiesAdd` is deprecated")
2194
2195 req := dropbox.Request{
2196 Host: "api",
2197 Namespace: "files",
2198 Route: "properties/add",
2199 Auth: "user",
2200 Style: "rpc",
2201 Arg: arg,
2202 ExtraHeaders: nil,
2203 }
2204
2205 var resp []byte
2206 var respBody io.ReadCloser
2207 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2208 if err != nil {
2209 var appErr PropertiesAddAPIError
2210 err = auth.ParseError(err, &appErr)
2211 if err == &appErr {
2212 err = appErr
2213 }
2214 return
2215 }
2216
2217 _ = resp
2218 _ = respBody
2219 return
2220 }
2221
2222 //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route
2223 type PropertiesOverwriteAPIError struct {
2224 dropbox.APIError
2225 EndpointError *file_properties.InvalidPropertyGroupError `json:"error"`
2226 }
2227
2228 func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error) {
2229 log.Printf("WARNING: API `PropertiesOverwrite` is deprecated")
2230
2231 req := dropbox.Request{
2232 Host: "api",
2233 Namespace: "files",
2234 Route: "properties/overwrite",
2235 Auth: "user",
2236 Style: "rpc",
2237 Arg: arg,
2238 ExtraHeaders: nil,
2239 }
2240
2241 var resp []byte
2242 var respBody io.ReadCloser
2243 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2244 if err != nil {
2245 var appErr PropertiesOverwriteAPIError
2246 err = auth.ParseError(err, &appErr)
2247 if err == &appErr {
2248 err = appErr
2249 }
2250 return
2251 }
2252
2253 _ = resp
2254 _ = respBody
2255 return
2256 }
2257
2258 //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route
2259 type PropertiesRemoveAPIError struct {
2260 dropbox.APIError
2261 EndpointError *file_properties.RemovePropertiesError `json:"error"`
2262 }
2263
2264 func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error) {
2265 log.Printf("WARNING: API `PropertiesRemove` is deprecated")
2266
2267 req := dropbox.Request{
2268 Host: "api",
2269 Namespace: "files",
2270 Route: "properties/remove",
2271 Auth: "user",
2272 Style: "rpc",
2273 Arg: arg,
2274 ExtraHeaders: nil,
2275 }
2276
2277 var resp []byte
2278 var respBody io.ReadCloser
2279 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2280 if err != nil {
2281 var appErr PropertiesRemoveAPIError
2282 err = auth.ParseError(err, &appErr)
2283 if err == &appErr {
2284 err = appErr
2285 }
2286 return
2287 }
2288
2289 _ = resp
2290 _ = respBody
2291 return
2292 }
2293
2294 //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route
2295 type PropertiesTemplateGetAPIError struct {
2296 dropbox.APIError
2297 EndpointError *file_properties.TemplateError `json:"error"`
2298 }
2299
2300 func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) {
2301 log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated")
2302
2303 req := dropbox.Request{
2304 Host: "api",
2305 Namespace: "files",
2306 Route: "properties/template/get",
2307 Auth: "user",
2308 Style: "rpc",
2309 Arg: arg,
2310 ExtraHeaders: nil,
2311 }
2312
2313 var resp []byte
2314 var respBody io.ReadCloser
2315 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2316 if err != nil {
2317 var appErr PropertiesTemplateGetAPIError
2318 err = auth.ParseError(err, &appErr)
2319 if err == &appErr {
2320 err = appErr
2321 }
2322 return
2323 }
2324
2325 err = json.Unmarshal(resp, &res)
2326 if err != nil {
2327 return
2328 }
2329
2330 _ = respBody
2331 return
2332 }
2333
2334 //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route
2335 type PropertiesTemplateListAPIError struct {
2336 dropbox.APIError
2337 EndpointError *file_properties.TemplateError `json:"error"`
2338 }
2339
2340 func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) {
2341 log.Printf("WARNING: API `PropertiesTemplateList` is deprecated")
2342
2343 req := dropbox.Request{
2344 Host: "api",
2345 Namespace: "files",
2346 Route: "properties/template/list",
2347 Auth: "user",
2348 Style: "rpc",
2349 Arg: nil,
2350 ExtraHeaders: nil,
2351 }
2352
2353 var resp []byte
2354 var respBody io.ReadCloser
2355 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2356 if err != nil {
2357 var appErr PropertiesTemplateListAPIError
2358 err = auth.ParseError(err, &appErr)
2359 if err == &appErr {
2360 err = appErr
2361 }
2362 return
2363 }
2364
2365 err = json.Unmarshal(resp, &res)
2366 if err != nil {
2367 return
2368 }
2369
2370 _ = respBody
2371 return
2372 }
2373
2374 //PropertiesUpdateAPIError is an error-wrapper for the properties/update route
2375 type PropertiesUpdateAPIError struct {
2376 dropbox.APIError
2377 EndpointError *file_properties.UpdatePropertiesError `json:"error"`
2378 }
2379
2380 func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error) {
2381 log.Printf("WARNING: API `PropertiesUpdate` is deprecated")
2382
2383 req := dropbox.Request{
2384 Host: "api",
2385 Namespace: "files",
2386 Route: "properties/update",
2387 Auth: "user",
2388 Style: "rpc",
2389 Arg: arg,
2390 ExtraHeaders: nil,
2391 }
2392
2393 var resp []byte
2394 var respBody io.ReadCloser
2395 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2396 if err != nil {
2397 var appErr PropertiesUpdateAPIError
2398 err = auth.ParseError(err, &appErr)
2399 if err == &appErr {
2400 err = appErr
2401 }
2402 return
2403 }
2404
2405 _ = resp
2406 _ = respBody
2407 return
2408 }
2409
2410 //RestoreAPIError is an error-wrapper for the restore route
2411 type RestoreAPIError struct {
2412 dropbox.APIError
2413 EndpointError *RestoreError `json:"error"`
2414 }
2415
2416 func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) {
2417 req := dropbox.Request{
2418 Host: "api",
2419 Namespace: "files",
2420 Route: "restore",
2421 Auth: "user",
2422 Style: "rpc",
2423 Arg: arg,
2424 ExtraHeaders: nil,
2425 }
2426
2427 var resp []byte
2428 var respBody io.ReadCloser
2429 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2430 if err != nil {
2431 var appErr RestoreAPIError
2432 err = auth.ParseError(err, &appErr)
2433 if err == &appErr {
2434 err = appErr
2435 }
2436 return
2437 }
2438
2439 err = json.Unmarshal(resp, &res)
2440 if err != nil {
2441 return
2442 }
2443
2444 _ = respBody
2445 return
2446 }
2447
2448 //SaveUrlAPIError is an error-wrapper for the save_url route
2449 type SaveUrlAPIError struct {
2450 dropbox.APIError
2451 EndpointError *SaveUrlError `json:"error"`
2452 }
2453
2454 func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) {
2455 req := dropbox.Request{
2456 Host: "api",
2457 Namespace: "files",
2458 Route: "save_url",
2459 Auth: "user",
2460 Style: "rpc",
2461 Arg: arg,
2462 ExtraHeaders: nil,
2463 }
2464
2465 var resp []byte
2466 var respBody io.ReadCloser
2467 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2468 if err != nil {
2469 var appErr SaveUrlAPIError
2470 err = auth.ParseError(err, &appErr)
2471 if err == &appErr {
2472 err = appErr
2473 }
2474 return
2475 }
2476
2477 err = json.Unmarshal(resp, &res)
2478 if err != nil {
2479 return
2480 }
2481
2482 _ = respBody
2483 return
2484 }
2485
2486 //SaveUrlCheckJobStatusAPIError is an error-wrapper for the save_url/check_job_status route
2487 type SaveUrlCheckJobStatusAPIError struct {
2488 dropbox.APIError
2489 EndpointError *async.PollError `json:"error"`
2490 }
2491
2492 func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error) {
2493 req := dropbox.Request{
2494 Host: "api",
2495 Namespace: "files",
2496 Route: "save_url/check_job_status",
2497 Auth: "user",
2498 Style: "rpc",
2499 Arg: arg,
2500 ExtraHeaders: nil,
2501 }
2502
2503 var resp []byte
2504 var respBody io.ReadCloser
2505 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2506 if err != nil {
2507 var appErr SaveUrlCheckJobStatusAPIError
2508 err = auth.ParseError(err, &appErr)
2509 if err == &appErr {
2510 err = appErr
2511 }
2512 return
2513 }
2514
2515 err = json.Unmarshal(resp, &res)
2516 if err != nil {
2517 return
2518 }
2519
2520 _ = respBody
2521 return
2522 }
2523
2524 //SearchAPIError is an error-wrapper for the search route
2525 type SearchAPIError struct {
2526 dropbox.APIError
2527 EndpointError *SearchError `json:"error"`
2528 }
2529
2530 func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) {
2531 log.Printf("WARNING: API `Search` is deprecated")
2532 log.Printf("Use API `SearchV2` instead")
2533
2534 req := dropbox.Request{
2535 Host: "api",
2536 Namespace: "files",
2537 Route: "search",
2538 Auth: "user",
2539 Style: "rpc",
2540 Arg: arg,
2541 ExtraHeaders: nil,
2542 }
2543
2544 var resp []byte
2545 var respBody io.ReadCloser
2546 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2547 if err != nil {
2548 var appErr SearchAPIError
2549 err = auth.ParseError(err, &appErr)
2550 if err == &appErr {
2551 err = appErr
2552 }
2553 return
2554 }
2555
2556 err = json.Unmarshal(resp, &res)
2557 if err != nil {
2558 return
2559 }
2560
2561 _ = respBody
2562 return
2563 }
2564
2565 //SearchV2APIError is an error-wrapper for the search_v2 route
2566 type SearchV2APIError struct {
2567 dropbox.APIError
2568 EndpointError *SearchError `json:"error"`
2569 }
2570
2571 func (dbx *apiImpl) SearchV2(arg *SearchV2Arg) (res *SearchV2Result, err error) {
2572 req := dropbox.Request{
2573 Host: "api",
2574 Namespace: "files",
2575 Route: "search_v2",
2576 Auth: "user",
2577 Style: "rpc",
2578 Arg: arg,
2579 ExtraHeaders: nil,
2580 }
2581
2582 var resp []byte
2583 var respBody io.ReadCloser
2584 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2585 if err != nil {
2586 var appErr SearchV2APIError
2587 err = auth.ParseError(err, &appErr)
2588 if err == &appErr {
2589 err = appErr
2590 }
2591 return
2592 }
2593
2594 err = json.Unmarshal(resp, &res)
2595 if err != nil {
2596 return
2597 }
2598
2599 _ = respBody
2600 return
2601 }
2602
2603 //SearchContinueV2APIError is an error-wrapper for the search/continue_v2 route
2604 type SearchContinueV2APIError struct {
2605 dropbox.APIError
2606 EndpointError *SearchError `json:"error"`
2607 }
2608
2609 func (dbx *apiImpl) SearchContinueV2(arg *SearchV2ContinueArg) (res *SearchV2Result, err error) {
2610 req := dropbox.Request{
2611 Host: "api",
2612 Namespace: "files",
2613 Route: "search/continue_v2",
2614 Auth: "user",
2615 Style: "rpc",
2616 Arg: arg,
2617 ExtraHeaders: nil,
2618 }
2619
2620 var resp []byte
2621 var respBody io.ReadCloser
2622 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2623 if err != nil {
2624 var appErr SearchContinueV2APIError
2625 err = auth.ParseError(err, &appErr)
2626 if err == &appErr {
2627 err = appErr
2628 }
2629 return
2630 }
2631
2632 err = json.Unmarshal(resp, &res)
2633 if err != nil {
2634 return
2635 }
2636
2637 _ = respBody
2638 return
2639 }
2640
2641 //UnlockFileBatchAPIError is an error-wrapper for the unlock_file_batch route
2642 type UnlockFileBatchAPIError struct {
2643 dropbox.APIError
2644 EndpointError *LockFileError `json:"error"`
2645 }
2646
2647 func (dbx *apiImpl) UnlockFileBatch(arg *UnlockFileBatchArg) (res *LockFileBatchResult, err error) {
2648 req := dropbox.Request{
2649 Host: "api",
2650 Namespace: "files",
2651 Route: "unlock_file_batch",
2652 Auth: "user",
2653 Style: "rpc",
2654 Arg: arg,
2655 ExtraHeaders: nil,
2656 }
2657
2658 var resp []byte
2659 var respBody io.ReadCloser
2660 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2661 if err != nil {
2662 var appErr UnlockFileBatchAPIError
2663 err = auth.ParseError(err, &appErr)
2664 if err == &appErr {
2665 err = appErr
2666 }
2667 return
2668 }
2669
2670 err = json.Unmarshal(resp, &res)
2671 if err != nil {
2672 return
2673 }
2674
2675 _ = respBody
2676 return
2677 }
2678
2679 //UploadAPIError is an error-wrapper for the upload route
2680 type UploadAPIError struct {
2681 dropbox.APIError
2682 EndpointError *UploadError `json:"error"`
2683 }
2684
2685 func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error) {
2686 req := dropbox.Request{
2687 Host: "content",
2688 Namespace: "files",
2689 Route: "upload",
2690 Auth: "user",
2691 Style: "upload",
2692 Arg: arg,
2693 ExtraHeaders: nil,
2694 }
2695
2696 var resp []byte
2697 var respBody io.ReadCloser
2698 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2699 if err != nil {
2700 var appErr UploadAPIError
2701 err = auth.ParseError(err, &appErr)
2702 if err == &appErr {
2703 err = appErr
2704 }
2705 return
2706 }
2707
2708 err = json.Unmarshal(resp, &res)
2709 if err != nil {
2710 return
2711 }
2712
2713 _ = respBody
2714 return
2715 }
2716
2717 //UploadSessionAppendV2APIError is an error-wrapper for the upload_session/append_v2 route
2718 type UploadSessionAppendV2APIError struct {
2719 dropbox.APIError
2720 EndpointError *UploadSessionLookupError `json:"error"`
2721 }
2722
2723 func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error) {
2724 req := dropbox.Request{
2725 Host: "content",
2726 Namespace: "files",
2727 Route: "upload_session/append_v2",
2728 Auth: "user",
2729 Style: "upload",
2730 Arg: arg,
2731 ExtraHeaders: nil,
2732 }
2733
2734 var resp []byte
2735 var respBody io.ReadCloser
2736 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2737 if err != nil {
2738 var appErr UploadSessionAppendV2APIError
2739 err = auth.ParseError(err, &appErr)
2740 if err == &appErr {
2741 err = appErr
2742 }
2743 return
2744 }
2745
2746 _ = resp
2747 _ = respBody
2748 return
2749 }
2750
2751 //UploadSessionAppendAPIError is an error-wrapper for the upload_session/append route
2752 type UploadSessionAppendAPIError struct {
2753 dropbox.APIError
2754 EndpointError *UploadSessionLookupError `json:"error"`
2755 }
2756
2757 func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error) {
2758 log.Printf("WARNING: API `UploadSessionAppend` is deprecated")
2759 log.Printf("Use API `UploadSessionAppendV2` instead")
2760
2761 req := dropbox.Request{
2762 Host: "content",
2763 Namespace: "files",
2764 Route: "upload_session/append",
2765 Auth: "user",
2766 Style: "upload",
2767 Arg: arg,
2768 ExtraHeaders: nil,
2769 }
2770
2771 var resp []byte
2772 var respBody io.ReadCloser
2773 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2774 if err != nil {
2775 var appErr UploadSessionAppendAPIError
2776 err = auth.ParseError(err, &appErr)
2777 if err == &appErr {
2778 err = appErr
2779 }
2780 return
2781 }
2782
2783 _ = resp
2784 _ = respBody
2785 return
2786 }
2787
2788 //UploadSessionFinishAPIError is an error-wrapper for the upload_session/finish route
2789 type UploadSessionFinishAPIError struct {
2790 dropbox.APIError
2791 EndpointError *UploadSessionFinishError `json:"error"`
2792 }
2793
2794 func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error) {
2795 req := dropbox.Request{
2796 Host: "content",
2797 Namespace: "files",
2798 Route: "upload_session/finish",
2799 Auth: "user",
2800 Style: "upload",
2801 Arg: arg,
2802 ExtraHeaders: nil,
2803 }
2804
2805 var resp []byte
2806 var respBody io.ReadCloser
2807 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2808 if err != nil {
2809 var appErr UploadSessionFinishAPIError
2810 err = auth.ParseError(err, &appErr)
2811 if err == &appErr {
2812 err = appErr
2813 }
2814 return
2815 }
2816
2817 err = json.Unmarshal(resp, &res)
2818 if err != nil {
2819 return
2820 }
2821
2822 _ = respBody
2823 return
2824 }
2825
2826 //UploadSessionFinishBatchAPIError is an error-wrapper for the upload_session/finish_batch route
2827 type UploadSessionFinishBatchAPIError struct {
2828 dropbox.APIError
2829 EndpointError struct{} `json:"error"`
2830 }
2831
2832 func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error) {
2833 req := dropbox.Request{
2834 Host: "api",
2835 Namespace: "files",
2836 Route: "upload_session/finish_batch",
2837 Auth: "user",
2838 Style: "rpc",
2839 Arg: arg,
2840 ExtraHeaders: nil,
2841 }
2842
2843 var resp []byte
2844 var respBody io.ReadCloser
2845 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2846 if err != nil {
2847 var appErr UploadSessionFinishBatchAPIError
2848 err = auth.ParseError(err, &appErr)
2849 if err == &appErr {
2850 err = appErr
2851 }
2852 return
2853 }
2854
2855 err = json.Unmarshal(resp, &res)
2856 if err != nil {
2857 return
2858 }
2859
2860 _ = respBody
2861 return
2862 }
2863
2864 //UploadSessionFinishBatchCheckAPIError is an error-wrapper for the upload_session/finish_batch/check route
2865 type UploadSessionFinishBatchCheckAPIError struct {
2866 dropbox.APIError
2867 EndpointError *async.PollError `json:"error"`
2868 }
2869
2870 func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error) {
2871 req := dropbox.Request{
2872 Host: "api",
2873 Namespace: "files",
2874 Route: "upload_session/finish_batch/check",
2875 Auth: "user",
2876 Style: "rpc",
2877 Arg: arg,
2878 ExtraHeaders: nil,
2879 }
2880
2881 var resp []byte
2882 var respBody io.ReadCloser
2883 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2884 if err != nil {
2885 var appErr UploadSessionFinishBatchCheckAPIError
2886 err = auth.ParseError(err, &appErr)
2887 if err == &appErr {
2888 err = appErr
2889 }
2890 return
2891 }
2892
2893 err = json.Unmarshal(resp, &res)
2894 if err != nil {
2895 return
2896 }
2897
2898 _ = respBody
2899 return
2900 }
2901
2902 //UploadSessionStartAPIError is an error-wrapper for the upload_session/start route
2903 type UploadSessionStartAPIError struct {
2904 dropbox.APIError
2905 EndpointError *UploadSessionStartError `json:"error"`
2906 }
2907
2908 func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error) {
2909 req := dropbox.Request{
2910 Host: "content",
2911 Namespace: "files",
2912 Route: "upload_session/start",
2913 Auth: "user",
2914 Style: "upload",
2915 Arg: arg,
2916 ExtraHeaders: nil,
2917 }
2918
2919 var resp []byte
2920 var respBody io.ReadCloser
2921 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
2922 if err != nil {
2923 var appErr UploadSessionStartAPIError
2924 err = auth.ParseError(err, &appErr)
2925 if err == &appErr {
2926 err = appErr
2927 }
2928 return
2929 }
2930
2931 err = json.Unmarshal(resp, &res)
2932 if err != nil {
2933 return
2934 }
2935
2936 _ = respBody
2937 return
2938 }
2939
2940 // New returns a Client implementation for this namespace
2941 func New(c dropbox.Config) Client {
2942 ctx := apiImpl(dropbox.NewContext(c))
2943 return &ctx
2944 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package files : This namespace contains endpoints and data types for basic
21 // file operations.
22 package files
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
30 )
31
32 // GetMetadataArg : has no documentation (yet)
33 type GetMetadataArg struct {
34 // Path : The path of a file or folder on Dropbox.
35 Path string `json:"path"`
36 // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo
37 // and video.
38 IncludeMediaInfo bool `json:"include_media_info"`
39 // IncludeDeleted : If true, `DeletedMetadata` will be returned for deleted
40 // file or folder, otherwise `LookupError.not_found` will be returned.
41 IncludeDeleted bool `json:"include_deleted"`
42 // IncludeHasExplicitSharedMembers : If true, the results will include a
43 // flag for each file indicating whether or not that file has any explicit
44 // members.
45 IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
46 // IncludePropertyGroups : If set to a valid list of template IDs,
47 // `FileMetadata.property_groups` is set if there exists property data
48 // associated with the file and each of the listed templates.
49 IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
50 }
51
52 // NewGetMetadataArg returns a new GetMetadataArg instance
53 func NewGetMetadataArg(Path string) *GetMetadataArg {
54 s := new(GetMetadataArg)
55 s.Path = Path
56 s.IncludeMediaInfo = false
57 s.IncludeDeleted = false
58 s.IncludeHasExplicitSharedMembers = false
59 return s
60 }
61
62 // AlphaGetMetadataArg : has no documentation (yet)
63 type AlphaGetMetadataArg struct {
64 GetMetadataArg
65 // IncludePropertyTemplates : If set to a valid list of template IDs,
66 // `FileMetadata.property_groups` is set for files with custom properties.
67 IncludePropertyTemplates []string `json:"include_property_templates,omitempty"`
68 }
69
70 // NewAlphaGetMetadataArg returns a new AlphaGetMetadataArg instance
71 func NewAlphaGetMetadataArg(Path string) *AlphaGetMetadataArg {
72 s := new(AlphaGetMetadataArg)
73 s.Path = Path
74 s.IncludeMediaInfo = false
75 s.IncludeDeleted = false
76 s.IncludeHasExplicitSharedMembers = false
77 return s
78 }
79
80 // GetMetadataError : has no documentation (yet)
81 type GetMetadataError struct {
82 dropbox.Tagged
83 // Path : has no documentation (yet)
84 Path *LookupError `json:"path,omitempty"`
85 }
86
87 // Valid tag values for GetMetadataError
88 const (
89 GetMetadataErrorPath = "path"
90 )
91
92 // UnmarshalJSON deserializes into a GetMetadataError instance
93 func (u *GetMetadataError) UnmarshalJSON(body []byte) error {
94 type wrap struct {
95 dropbox.Tagged
96 // Path : has no documentation (yet)
97 Path *LookupError `json:"path,omitempty"`
98 }
99 var w wrap
100 var err error
101 if err = json.Unmarshal(body, &w); err != nil {
102 return err
103 }
104 u.Tag = w.Tag
105 switch u.Tag {
106 case "path":
107 u.Path = w.Path
108
109 if err != nil {
110 return err
111 }
112 }
113 return nil
114 }
115
116 // AlphaGetMetadataError : has no documentation (yet)
117 type AlphaGetMetadataError struct {
118 dropbox.Tagged
119 // Path : has no documentation (yet)
120 Path *LookupError `json:"path,omitempty"`
121 // PropertiesError : has no documentation (yet)
122 PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
123 }
124
125 // Valid tag values for AlphaGetMetadataError
126 const (
127 AlphaGetMetadataErrorPath = "path"
128 AlphaGetMetadataErrorPropertiesError = "properties_error"
129 )
130
131 // UnmarshalJSON deserializes into a AlphaGetMetadataError instance
132 func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error {
133 type wrap struct {
134 dropbox.Tagged
135 // Path : has no documentation (yet)
136 Path *LookupError `json:"path,omitempty"`
137 // PropertiesError : has no documentation (yet)
138 PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"`
139 }
140 var w wrap
141 var err error
142 if err = json.Unmarshal(body, &w); err != nil {
143 return err
144 }
145 u.Tag = w.Tag
146 switch u.Tag {
147 case "path":
148 u.Path = w.Path
149
150 if err != nil {
151 return err
152 }
153 case "properties_error":
154 u.PropertiesError = w.PropertiesError
155
156 if err != nil {
157 return err
158 }
159 }
160 return nil
161 }
162
163 // CommitInfo : has no documentation (yet)
164 type CommitInfo struct {
165 // Path : Path in the user's Dropbox to save the file.
166 Path string `json:"path"`
167 // Mode : Selects what to do if the file already exists.
168 Mode *WriteMode `json:"mode"`
169 // Autorename : If there's a conflict, as determined by `mode`, have the
170 // Dropbox server try to autorename the file to avoid conflict.
171 Autorename bool `json:"autorename"`
172 // ClientModified : The value to store as the `client_modified` timestamp.
173 // Dropbox automatically records the time at which the file was written to
174 // the Dropbox servers. It can also record an additional timestamp, provided
175 // by Dropbox desktop clients, mobile clients, and API apps of when the file
176 // was actually created or modified.
177 ClientModified *time.Time `json:"client_modified,omitempty"`
178 // Mute : Normally, users are made aware of any file modifications in their
179 // Dropbox account via notifications in the client software. If true, this
180 // tells the clients that this modification shouldn't result in a user
181 // notification.
182 Mute bool `json:"mute"`
183 // PropertyGroups : List of custom properties to add to file.
184 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
185 // StrictConflict : Be more strict about how each `WriteMode` detects
186 // conflict. For example, always return a conflict error when `mode` =
187 // `WriteMode.update` and the given "rev" doesn't match the existing file's
188 // "rev", even if the existing file has been deleted. This also forces a
189 // conflict even when the target path refers to a file with identical
190 // contents.
191 StrictConflict bool `json:"strict_conflict"`
192 }
193
194 // NewCommitInfo returns a new CommitInfo instance
195 func NewCommitInfo(Path string) *CommitInfo {
196 s := new(CommitInfo)
197 s.Path = Path
198 s.Mode = &WriteMode{Tagged: dropbox.Tagged{Tag: "add"}}
199 s.Autorename = false
200 s.Mute = false
201 s.StrictConflict = false
202 return s
203 }
204
205 // CommitInfoWithProperties : has no documentation (yet)
206 type CommitInfoWithProperties struct {
207 CommitInfo
208 }
209
210 // NewCommitInfoWithProperties returns a new CommitInfoWithProperties instance
211 func NewCommitInfoWithProperties(Path string) *CommitInfoWithProperties {
212 s := new(CommitInfoWithProperties)
213 s.Path = Path
214 s.Mode = &WriteMode{Tagged: dropbox.Tagged{Tag: "add"}}
215 s.Autorename = false
216 s.Mute = false
217 s.StrictConflict = false
218 return s
219 }
220
221 // ContentSyncSetting : has no documentation (yet)
222 type ContentSyncSetting struct {
223 // Id : Id of the item this setting is applied to.
224 Id string `json:"id"`
225 // SyncSetting : Setting for this item.
226 SyncSetting *SyncSetting `json:"sync_setting"`
227 }
228
229 // NewContentSyncSetting returns a new ContentSyncSetting instance
230 func NewContentSyncSetting(Id string, SyncSetting *SyncSetting) *ContentSyncSetting {
231 s := new(ContentSyncSetting)
232 s.Id = Id
233 s.SyncSetting = SyncSetting
234 return s
235 }
236
237 // ContentSyncSettingArg : has no documentation (yet)
238 type ContentSyncSettingArg struct {
239 // Id : Id of the item this setting is applied to.
240 Id string `json:"id"`
241 // SyncSetting : Setting for this item.
242 SyncSetting *SyncSettingArg `json:"sync_setting"`
243 }
244
245 // NewContentSyncSettingArg returns a new ContentSyncSettingArg instance
246 func NewContentSyncSettingArg(Id string, SyncSetting *SyncSettingArg) *ContentSyncSettingArg {
247 s := new(ContentSyncSettingArg)
248 s.Id = Id
249 s.SyncSetting = SyncSetting
250 return s
251 }
252
253 // CreateFolderArg : has no documentation (yet)
254 type CreateFolderArg struct {
255 // Path : Path in the user's Dropbox to create.
256 Path string `json:"path"`
257 // Autorename : If there's a conflict, have the Dropbox server try to
258 // autorename the folder to avoid the conflict.
259 Autorename bool `json:"autorename"`
260 }
261
262 // NewCreateFolderArg returns a new CreateFolderArg instance
263 func NewCreateFolderArg(Path string) *CreateFolderArg {
264 s := new(CreateFolderArg)
265 s.Path = Path
266 s.Autorename = false
267 return s
268 }
269
270 // CreateFolderBatchArg : has no documentation (yet)
271 type CreateFolderBatchArg struct {
272 // Paths : List of paths to be created in the user's Dropbox. Duplicate path
273 // arguments in the batch are considered only once.
274 Paths []string `json:"paths"`
275 // Autorename : If there's a conflict, have the Dropbox server try to
276 // autorename the folder to avoid the conflict.
277 Autorename bool `json:"autorename"`
278 // ForceAsync : Whether to force the create to happen asynchronously.
279 ForceAsync bool `json:"force_async"`
280 }
281
282 // NewCreateFolderBatchArg returns a new CreateFolderBatchArg instance
283 func NewCreateFolderBatchArg(Paths []string) *CreateFolderBatchArg {
284 s := new(CreateFolderBatchArg)
285 s.Paths = Paths
286 s.Autorename = false
287 s.ForceAsync = false
288 return s
289 }
290
291 // CreateFolderBatchError : has no documentation (yet)
292 type CreateFolderBatchError struct {
293 dropbox.Tagged
294 }
295
296 // Valid tag values for CreateFolderBatchError
297 const (
298 CreateFolderBatchErrorTooManyFiles = "too_many_files"
299 CreateFolderBatchErrorOther = "other"
300 )
301
302 // CreateFolderBatchJobStatus : has no documentation (yet)
303 type CreateFolderBatchJobStatus struct {
304 dropbox.Tagged
305 // Complete : The batch create folder has finished.
306 Complete *CreateFolderBatchResult `json:"complete,omitempty"`
307 // Failed : The batch create folder has failed.
308 Failed *CreateFolderBatchError `json:"failed,omitempty"`
309 }
310
311 // Valid tag values for CreateFolderBatchJobStatus
312 const (
313 CreateFolderBatchJobStatusInProgress = "in_progress"
314 CreateFolderBatchJobStatusComplete = "complete"
315 CreateFolderBatchJobStatusFailed = "failed"
316 CreateFolderBatchJobStatusOther = "other"
317 )
318
319 // UnmarshalJSON deserializes into a CreateFolderBatchJobStatus instance
320 func (u *CreateFolderBatchJobStatus) UnmarshalJSON(body []byte) error {
321 type wrap struct {
322 dropbox.Tagged
323 // Failed : The batch create folder has failed.
324 Failed *CreateFolderBatchError `json:"failed,omitempty"`
325 }
326 var w wrap
327 var err error
328 if err = json.Unmarshal(body, &w); err != nil {
329 return err
330 }
331 u.Tag = w.Tag
332 switch u.Tag {
333 case "complete":
334 err = json.Unmarshal(body, &u.Complete)
335
336 if err != nil {
337 return err
338 }
339 case "failed":
340 u.Failed = w.Failed
341
342 if err != nil {
343 return err
344 }
345 }
346 return nil
347 }
348
349 // CreateFolderBatchLaunch : Result returned by `createFolderBatch` that may
350 // either launch an asynchronous job or complete synchronously.
351 type CreateFolderBatchLaunch struct {
352 dropbox.Tagged
353 // AsyncJobId : This response indicates that the processing is asynchronous.
354 // The string is an id that can be used to obtain the status of the
355 // asynchronous job.
356 AsyncJobId string `json:"async_job_id,omitempty"`
357 // Complete : has no documentation (yet)
358 Complete *CreateFolderBatchResult `json:"complete,omitempty"`
359 }
360
361 // Valid tag values for CreateFolderBatchLaunch
362 const (
363 CreateFolderBatchLaunchAsyncJobId = "async_job_id"
364 CreateFolderBatchLaunchComplete = "complete"
365 CreateFolderBatchLaunchOther = "other"
366 )
367
368 // UnmarshalJSON deserializes into a CreateFolderBatchLaunch instance
369 func (u *CreateFolderBatchLaunch) UnmarshalJSON(body []byte) error {
370 type wrap struct {
371 dropbox.Tagged
372 // AsyncJobId : This response indicates that the processing is
373 // asynchronous. The string is an id that can be used to obtain the
374 // status of the asynchronous job.
375 AsyncJobId string `json:"async_job_id,omitempty"`
376 }
377 var w wrap
378 var err error
379 if err = json.Unmarshal(body, &w); err != nil {
380 return err
381 }
382 u.Tag = w.Tag
383 switch u.Tag {
384 case "async_job_id":
385 u.AsyncJobId = w.AsyncJobId
386
387 if err != nil {
388 return err
389 }
390 case "complete":
391 err = json.Unmarshal(body, &u.Complete)
392
393 if err != nil {
394 return err
395 }
396 }
397 return nil
398 }
399
400 // FileOpsResult : has no documentation (yet)
401 type FileOpsResult struct {
402 }
403
404 // NewFileOpsResult returns a new FileOpsResult instance
405 func NewFileOpsResult() *FileOpsResult {
406 s := new(FileOpsResult)
407 return s
408 }
409
410 // CreateFolderBatchResult : has no documentation (yet)
411 type CreateFolderBatchResult struct {
412 FileOpsResult
413 // Entries : Each entry in `CreateFolderBatchArg.paths` will appear at the
414 // same position inside `CreateFolderBatchResult.entries`.
415 Entries []*CreateFolderBatchResultEntry `json:"entries"`
416 }
417
418 // NewCreateFolderBatchResult returns a new CreateFolderBatchResult instance
419 func NewCreateFolderBatchResult(Entries []*CreateFolderBatchResultEntry) *CreateFolderBatchResult {
420 s := new(CreateFolderBatchResult)
421 s.Entries = Entries
422 return s
423 }
424
425 // CreateFolderBatchResultEntry : has no documentation (yet)
426 type CreateFolderBatchResultEntry struct {
427 dropbox.Tagged
428 // Success : has no documentation (yet)
429 Success *CreateFolderEntryResult `json:"success,omitempty"`
430 // Failure : has no documentation (yet)
431 Failure *CreateFolderEntryError `json:"failure,omitempty"`
432 }
433
434 // Valid tag values for CreateFolderBatchResultEntry
435 const (
436 CreateFolderBatchResultEntrySuccess = "success"
437 CreateFolderBatchResultEntryFailure = "failure"
438 )
439
440 // UnmarshalJSON deserializes into a CreateFolderBatchResultEntry instance
441 func (u *CreateFolderBatchResultEntry) UnmarshalJSON(body []byte) error {
442 type wrap struct {
443 dropbox.Tagged
444 // Failure : has no documentation (yet)
445 Failure *CreateFolderEntryError `json:"failure,omitempty"`
446 }
447 var w wrap
448 var err error
449 if err = json.Unmarshal(body, &w); err != nil {
450 return err
451 }
452 u.Tag = w.Tag
453 switch u.Tag {
454 case "success":
455 err = json.Unmarshal(body, &u.Success)
456
457 if err != nil {
458 return err
459 }
460 case "failure":
461 u.Failure = w.Failure
462
463 if err != nil {
464 return err
465 }
466 }
467 return nil
468 }
469
470 // CreateFolderEntryError : has no documentation (yet)
471 type CreateFolderEntryError struct {
472 dropbox.Tagged
473 // Path : has no documentation (yet)
474 Path *WriteError `json:"path,omitempty"`
475 }
476
477 // Valid tag values for CreateFolderEntryError
478 const (
479 CreateFolderEntryErrorPath = "path"
480 CreateFolderEntryErrorOther = "other"
481 )
482
483 // UnmarshalJSON deserializes into a CreateFolderEntryError instance
484 func (u *CreateFolderEntryError) UnmarshalJSON(body []byte) error {
485 type wrap struct {
486 dropbox.Tagged
487 // Path : has no documentation (yet)
488 Path *WriteError `json:"path,omitempty"`
489 }
490 var w wrap
491 var err error
492 if err = json.Unmarshal(body, &w); err != nil {
493 return err
494 }
495 u.Tag = w.Tag
496 switch u.Tag {
497 case "path":
498 u.Path = w.Path
499
500 if err != nil {
501 return err
502 }
503 }
504 return nil
505 }
506
507 // CreateFolderEntryResult : has no documentation (yet)
508 type CreateFolderEntryResult struct {
509 // Metadata : Metadata of the created folder.
510 Metadata *FolderMetadata `json:"metadata"`
511 }
512
513 // NewCreateFolderEntryResult returns a new CreateFolderEntryResult instance
514 func NewCreateFolderEntryResult(Metadata *FolderMetadata) *CreateFolderEntryResult {
515 s := new(CreateFolderEntryResult)
516 s.Metadata = Metadata
517 return s
518 }
519
520 // CreateFolderError : has no documentation (yet)
521 type CreateFolderError struct {
522 dropbox.Tagged
523 // Path : has no documentation (yet)
524 Path *WriteError `json:"path,omitempty"`
525 }
526
527 // Valid tag values for CreateFolderError
528 const (
529 CreateFolderErrorPath = "path"
530 )
531
532 // UnmarshalJSON deserializes into a CreateFolderError instance
533 func (u *CreateFolderError) UnmarshalJSON(body []byte) error {
534 type wrap struct {
535 dropbox.Tagged
536 // Path : has no documentation (yet)
537 Path *WriteError `json:"path,omitempty"`
538 }
539 var w wrap
540 var err error
541 if err = json.Unmarshal(body, &w); err != nil {
542 return err
543 }
544 u.Tag = w.Tag
545 switch u.Tag {
546 case "path":
547 u.Path = w.Path
548
549 if err != nil {
550 return err
551 }
552 }
553 return nil
554 }
555
556 // CreateFolderResult : has no documentation (yet)
557 type CreateFolderResult struct {
558 FileOpsResult
559 // Metadata : Metadata of the created folder.
560 Metadata *FolderMetadata `json:"metadata"`
561 }
562
563 // NewCreateFolderResult returns a new CreateFolderResult instance
564 func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult {
565 s := new(CreateFolderResult)
566 s.Metadata = Metadata
567 return s
568 }
569
570 // DeleteArg : has no documentation (yet)
571 type DeleteArg struct {
572 // Path : Path in the user's Dropbox to delete.
573 Path string `json:"path"`
574 // ParentRev : Perform delete if given "rev" matches the existing file's
575 // latest "rev". This field does not support deleting a folder.
576 ParentRev string `json:"parent_rev,omitempty"`
577 }
578
579 // NewDeleteArg returns a new DeleteArg instance
580 func NewDeleteArg(Path string) *DeleteArg {
581 s := new(DeleteArg)
582 s.Path = Path
583 return s
584 }
585
586 // DeleteBatchArg : has no documentation (yet)
587 type DeleteBatchArg struct {
588 // Entries : has no documentation (yet)
589 Entries []*DeleteArg `json:"entries"`
590 }
591
592 // NewDeleteBatchArg returns a new DeleteBatchArg instance
593 func NewDeleteBatchArg(Entries []*DeleteArg) *DeleteBatchArg {
594 s := new(DeleteBatchArg)
595 s.Entries = Entries
596 return s
597 }
598
599 // DeleteBatchError : has no documentation (yet)
600 type DeleteBatchError struct {
601 dropbox.Tagged
602 }
603
604 // Valid tag values for DeleteBatchError
605 const (
606 DeleteBatchErrorTooManyWriteOperations = "too_many_write_operations"
607 DeleteBatchErrorOther = "other"
608 )
609
610 // DeleteBatchJobStatus : has no documentation (yet)
611 type DeleteBatchJobStatus struct {
612 dropbox.Tagged
613 // Complete : The batch delete has finished.
614 Complete *DeleteBatchResult `json:"complete,omitempty"`
615 // Failed : The batch delete has failed.
616 Failed *DeleteBatchError `json:"failed,omitempty"`
617 }
618
619 // Valid tag values for DeleteBatchJobStatus
620 const (
621 DeleteBatchJobStatusInProgress = "in_progress"
622 DeleteBatchJobStatusComplete = "complete"
623 DeleteBatchJobStatusFailed = "failed"
624 DeleteBatchJobStatusOther = "other"
625 )
626
627 // UnmarshalJSON deserializes into a DeleteBatchJobStatus instance
628 func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error {
629 type wrap struct {
630 dropbox.Tagged
631 // Failed : The batch delete has failed.
632 Failed *DeleteBatchError `json:"failed,omitempty"`
633 }
634 var w wrap
635 var err error
636 if err = json.Unmarshal(body, &w); err != nil {
637 return err
638 }
639 u.Tag = w.Tag
640 switch u.Tag {
641 case "complete":
642 err = json.Unmarshal(body, &u.Complete)
643
644 if err != nil {
645 return err
646 }
647 case "failed":
648 u.Failed = w.Failed
649
650 if err != nil {
651 return err
652 }
653 }
654 return nil
655 }
656
657 // DeleteBatchLaunch : Result returned by `deleteBatch` that may either launch
658 // an asynchronous job or complete synchronously.
659 type DeleteBatchLaunch struct {
660 dropbox.Tagged
661 // AsyncJobId : This response indicates that the processing is asynchronous.
662 // The string is an id that can be used to obtain the status of the
663 // asynchronous job.
664 AsyncJobId string `json:"async_job_id,omitempty"`
665 // Complete : has no documentation (yet)
666 Complete *DeleteBatchResult `json:"complete,omitempty"`
667 }
668
669 // Valid tag values for DeleteBatchLaunch
670 const (
671 DeleteBatchLaunchAsyncJobId = "async_job_id"
672 DeleteBatchLaunchComplete = "complete"
673 DeleteBatchLaunchOther = "other"
674 )
675
676 // UnmarshalJSON deserializes into a DeleteBatchLaunch instance
677 func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error {
678 type wrap struct {
679 dropbox.Tagged
680 // AsyncJobId : This response indicates that the processing is
681 // asynchronous. The string is an id that can be used to obtain the
682 // status of the asynchronous job.
683 AsyncJobId string `json:"async_job_id,omitempty"`
684 }
685 var w wrap
686 var err error
687 if err = json.Unmarshal(body, &w); err != nil {
688 return err
689 }
690 u.Tag = w.Tag
691 switch u.Tag {
692 case "async_job_id":
693 u.AsyncJobId = w.AsyncJobId
694
695 if err != nil {
696 return err
697 }
698 case "complete":
699 err = json.Unmarshal(body, &u.Complete)
700
701 if err != nil {
702 return err
703 }
704 }
705 return nil
706 }
707
708 // DeleteBatchResult : has no documentation (yet)
709 type DeleteBatchResult struct {
710 FileOpsResult
711 // Entries : Each entry in `DeleteBatchArg.entries` will appear at the same
712 // position inside `DeleteBatchResult.entries`.
713 Entries []*DeleteBatchResultEntry `json:"entries"`
714 }
715
716 // NewDeleteBatchResult returns a new DeleteBatchResult instance
717 func NewDeleteBatchResult(Entries []*DeleteBatchResultEntry) *DeleteBatchResult {
718 s := new(DeleteBatchResult)
719 s.Entries = Entries
720 return s
721 }
722
723 // DeleteBatchResultData : has no documentation (yet)
724 type DeleteBatchResultData struct {
725 // Metadata : Metadata of the deleted object.
726 Metadata IsMetadata `json:"metadata"`
727 }
728
729 // NewDeleteBatchResultData returns a new DeleteBatchResultData instance
730 func NewDeleteBatchResultData(Metadata IsMetadata) *DeleteBatchResultData {
731 s := new(DeleteBatchResultData)
732 s.Metadata = Metadata
733 return s
734 }
735
736 // UnmarshalJSON deserializes into a DeleteBatchResultData instance
737 func (u *DeleteBatchResultData) UnmarshalJSON(b []byte) error {
738 type wrap struct {
739 // Metadata : Metadata of the deleted object.
740 Metadata json.RawMessage `json:"metadata"`
741 }
742 var w wrap
743 if err := json.Unmarshal(b, &w); err != nil {
744 return err
745 }
746 Metadata, err := IsMetadataFromJSON(w.Metadata)
747 if err != nil {
748 return err
749 }
750 u.Metadata = Metadata
751 return nil
752 }
753
754 // DeleteBatchResultEntry : has no documentation (yet)
755 type DeleteBatchResultEntry struct {
756 dropbox.Tagged
757 // Success : has no documentation (yet)
758 Success *DeleteBatchResultData `json:"success,omitempty"`
759 // Failure : has no documentation (yet)
760 Failure *DeleteError `json:"failure,omitempty"`
761 }
762
763 // Valid tag values for DeleteBatchResultEntry
764 const (
765 DeleteBatchResultEntrySuccess = "success"
766 DeleteBatchResultEntryFailure = "failure"
767 )
768
769 // UnmarshalJSON deserializes into a DeleteBatchResultEntry instance
770 func (u *DeleteBatchResultEntry) UnmarshalJSON(body []byte) error {
771 type wrap struct {
772 dropbox.Tagged
773 // Failure : has no documentation (yet)
774 Failure *DeleteError `json:"failure,omitempty"`
775 }
776 var w wrap
777 var err error
778 if err = json.Unmarshal(body, &w); err != nil {
779 return err
780 }
781 u.Tag = w.Tag
782 switch u.Tag {
783 case "success":
784 err = json.Unmarshal(body, &u.Success)
785
786 if err != nil {
787 return err
788 }
789 case "failure":
790 u.Failure = w.Failure
791
792 if err != nil {
793 return err
794 }
795 }
796 return nil
797 }
798
799 // DeleteError : has no documentation (yet)
800 type DeleteError struct {
801 dropbox.Tagged
802 // PathLookup : has no documentation (yet)
803 PathLookup *LookupError `json:"path_lookup,omitempty"`
804 // PathWrite : has no documentation (yet)
805 PathWrite *WriteError `json:"path_write,omitempty"`
806 }
807
808 // Valid tag values for DeleteError
809 const (
810 DeleteErrorPathLookup = "path_lookup"
811 DeleteErrorPathWrite = "path_write"
812 DeleteErrorTooManyWriteOperations = "too_many_write_operations"
813 DeleteErrorTooManyFiles = "too_many_files"
814 DeleteErrorOther = "other"
815 )
816
817 // UnmarshalJSON deserializes into a DeleteError instance
818 func (u *DeleteError) UnmarshalJSON(body []byte) error {
819 type wrap struct {
820 dropbox.Tagged
821 // PathLookup : has no documentation (yet)
822 PathLookup *LookupError `json:"path_lookup,omitempty"`
823 // PathWrite : has no documentation (yet)
824 PathWrite *WriteError `json:"path_write,omitempty"`
825 }
826 var w wrap
827 var err error
828 if err = json.Unmarshal(body, &w); err != nil {
829 return err
830 }
831 u.Tag = w.Tag
832 switch u.Tag {
833 case "path_lookup":
834 u.PathLookup = w.PathLookup
835
836 if err != nil {
837 return err
838 }
839 case "path_write":
840 u.PathWrite = w.PathWrite
841
842 if err != nil {
843 return err
844 }
845 }
846 return nil
847 }
848
849 // DeleteResult : has no documentation (yet)
850 type DeleteResult struct {
851 FileOpsResult
852 // Metadata : Metadata of the deleted object.
853 Metadata IsMetadata `json:"metadata"`
854 }
855
856 // NewDeleteResult returns a new DeleteResult instance
857 func NewDeleteResult(Metadata IsMetadata) *DeleteResult {
858 s := new(DeleteResult)
859 s.Metadata = Metadata
860 return s
861 }
862
863 // UnmarshalJSON deserializes into a DeleteResult instance
864 func (u *DeleteResult) UnmarshalJSON(b []byte) error {
865 type wrap struct {
866 // Metadata : Metadata of the deleted object.
867 Metadata json.RawMessage `json:"metadata"`
868 }
869 var w wrap
870 if err := json.Unmarshal(b, &w); err != nil {
871 return err
872 }
873 Metadata, err := IsMetadataFromJSON(w.Metadata)
874 if err != nil {
875 return err
876 }
877 u.Metadata = Metadata
878 return nil
879 }
880
881 // Metadata : Metadata for a file or folder.
882 type Metadata struct {
883 // Name : The last component of the path (including extension). This never
884 // contains a slash.
885 Name string `json:"name"`
886 // PathLower : The lowercased full path in the user's Dropbox. This always
887 // starts with a slash. This field will be null if the file or folder is not
888 // mounted.
889 PathLower string `json:"path_lower,omitempty"`
890 // PathDisplay : The cased path to be used for display purposes only. In
891 // rare instances the casing will not correctly match the user's filesystem,
892 // but this behavior will match the path provided in the Core API v1, and at
893 // least the last path component will have the correct casing. Changes to
894 // only the casing of paths won't be returned by `listFolderContinue`. This
895 // field will be null if the file or folder is not mounted.
896 PathDisplay string `json:"path_display,omitempty"`
897 // ParentSharedFolderId : Please use
898 // `FileSharingInfo.parent_shared_folder_id` or
899 // `FolderSharingInfo.parent_shared_folder_id` instead.
900 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
901 }
902
903 // NewMetadata returns a new Metadata instance
904 func NewMetadata(Name string) *Metadata {
905 s := new(Metadata)
906 s.Name = Name
907 return s
908 }
909
910 // IsMetadata is the interface type for Metadata and its subtypes
911 type IsMetadata interface {
912 IsMetadata()
913 }
914
915 // IsMetadata implements the IsMetadata interface
916 func (u *Metadata) IsMetadata() {}
917
918 type metadataUnion struct {
919 dropbox.Tagged
920 // File : has no documentation (yet)
921 File *FileMetadata `json:"file,omitempty"`
922 // Folder : has no documentation (yet)
923 Folder *FolderMetadata `json:"folder,omitempty"`
924 // Deleted : has no documentation (yet)
925 Deleted *DeletedMetadata `json:"deleted,omitempty"`
926 }
927
928 // Valid tag values for Metadata
929 const (
930 MetadataFile = "file"
931 MetadataFolder = "folder"
932 MetadataDeleted = "deleted"
933 )
934
935 // UnmarshalJSON deserializes into a metadataUnion instance
936 func (u *metadataUnion) UnmarshalJSON(body []byte) error {
937 type wrap struct {
938 dropbox.Tagged
939 }
940 var w wrap
941 var err error
942 if err = json.Unmarshal(body, &w); err != nil {
943 return err
944 }
945 u.Tag = w.Tag
946 switch u.Tag {
947 case "file":
948 err = json.Unmarshal(body, &u.File)
949
950 if err != nil {
951 return err
952 }
953 case "folder":
954 err = json.Unmarshal(body, &u.Folder)
955
956 if err != nil {
957 return err
958 }
959 case "deleted":
960 err = json.Unmarshal(body, &u.Deleted)
961
962 if err != nil {
963 return err
964 }
965 }
966 return nil
967 }
968
969 // IsMetadataFromJSON converts JSON to a concrete IsMetadata instance
970 func IsMetadataFromJSON(data []byte) (IsMetadata, error) {
971 var t metadataUnion
972 if err := json.Unmarshal(data, &t); err != nil {
973 return nil, err
974 }
975 switch t.Tag {
976 case "file":
977 return t.File, nil
978
979 case "folder":
980 return t.Folder, nil
981
982 case "deleted":
983 return t.Deleted, nil
984
985 }
986 return nil, nil
987 }
988
989 // DeletedMetadata : Indicates that there used to be a file or folder at this
990 // path, but it no longer exists.
991 type DeletedMetadata struct {
992 Metadata
993 }
994
995 // NewDeletedMetadata returns a new DeletedMetadata instance
996 func NewDeletedMetadata(Name string) *DeletedMetadata {
997 s := new(DeletedMetadata)
998 s.Name = Name
999 return s
1000 }
1001
1002 // Dimensions : Dimensions for a photo or video.
1003 type Dimensions struct {
1004 // Height : Height of the photo/video.
1005 Height uint64 `json:"height"`
1006 // Width : Width of the photo/video.
1007 Width uint64 `json:"width"`
1008 }
1009
1010 // NewDimensions returns a new Dimensions instance
1011 func NewDimensions(Height uint64, Width uint64) *Dimensions {
1012 s := new(Dimensions)
1013 s.Height = Height
1014 s.Width = Width
1015 return s
1016 }
1017
1018 // DownloadArg : has no documentation (yet)
1019 type DownloadArg struct {
1020 // Path : The path of the file to download.
1021 Path string `json:"path"`
1022 // Rev : Please specify revision in `path` instead.
1023 Rev string `json:"rev,omitempty"`
1024 // ExtraHeaders can be used to pass Range, If-None-Match headers
1025 ExtraHeaders map[string]string `json:"-"`
1026 }
1027
1028 // NewDownloadArg returns a new DownloadArg instance
1029 func NewDownloadArg(Path string) *DownloadArg {
1030 s := new(DownloadArg)
1031 s.Path = Path
1032 return s
1033 }
1034
1035 // DownloadError : has no documentation (yet)
1036 type DownloadError struct {
1037 dropbox.Tagged
1038 // Path : has no documentation (yet)
1039 Path *LookupError `json:"path,omitempty"`
1040 }
1041
1042 // Valid tag values for DownloadError
1043 const (
1044 DownloadErrorPath = "path"
1045 DownloadErrorUnsupportedFile = "unsupported_file"
1046 DownloadErrorOther = "other"
1047 )
1048
1049 // UnmarshalJSON deserializes into a DownloadError instance
1050 func (u *DownloadError) UnmarshalJSON(body []byte) error {
1051 type wrap struct {
1052 dropbox.Tagged
1053 // Path : has no documentation (yet)
1054 Path *LookupError `json:"path,omitempty"`
1055 }
1056 var w wrap
1057 var err error
1058 if err = json.Unmarshal(body, &w); err != nil {
1059 return err
1060 }
1061 u.Tag = w.Tag
1062 switch u.Tag {
1063 case "path":
1064 u.Path = w.Path
1065
1066 if err != nil {
1067 return err
1068 }
1069 }
1070 return nil
1071 }
1072
1073 // DownloadZipArg : has no documentation (yet)
1074 type DownloadZipArg struct {
1075 // Path : The path of the folder to download.
1076 Path string `json:"path"`
1077 }
1078
1079 // NewDownloadZipArg returns a new DownloadZipArg instance
1080 func NewDownloadZipArg(Path string) *DownloadZipArg {
1081 s := new(DownloadZipArg)
1082 s.Path = Path
1083 return s
1084 }
1085
1086 // DownloadZipError : has no documentation (yet)
1087 type DownloadZipError struct {
1088 dropbox.Tagged
1089 // Path : has no documentation (yet)
1090 Path *LookupError `json:"path,omitempty"`
1091 }
1092
1093 // Valid tag values for DownloadZipError
1094 const (
1095 DownloadZipErrorPath = "path"
1096 DownloadZipErrorTooLarge = "too_large"
1097 DownloadZipErrorTooManyFiles = "too_many_files"
1098 DownloadZipErrorOther = "other"
1099 )
1100
1101 // UnmarshalJSON deserializes into a DownloadZipError instance
1102 func (u *DownloadZipError) UnmarshalJSON(body []byte) error {
1103 type wrap struct {
1104 dropbox.Tagged
1105 // Path : has no documentation (yet)
1106 Path *LookupError `json:"path,omitempty"`
1107 }
1108 var w wrap
1109 var err error
1110 if err = json.Unmarshal(body, &w); err != nil {
1111 return err
1112 }
1113 u.Tag = w.Tag
1114 switch u.Tag {
1115 case "path":
1116 u.Path = w.Path
1117
1118 if err != nil {
1119 return err
1120 }
1121 }
1122 return nil
1123 }
1124
1125 // DownloadZipResult : has no documentation (yet)
1126 type DownloadZipResult struct {
1127 // Metadata : has no documentation (yet)
1128 Metadata *FolderMetadata `json:"metadata"`
1129 }
1130
1131 // NewDownloadZipResult returns a new DownloadZipResult instance
1132 func NewDownloadZipResult(Metadata *FolderMetadata) *DownloadZipResult {
1133 s := new(DownloadZipResult)
1134 s.Metadata = Metadata
1135 return s
1136 }
1137
1138 // ExportArg : has no documentation (yet)
1139 type ExportArg struct {
1140 // Path : The path of the file to be exported.
1141 Path string `json:"path"`
1142 // ExportFormat : The file format to which the file should be exported. This
1143 // must be one of the formats listed in the file's export_options returned
1144 // by `getMetadata`. If none is specified, the default format (specified in
1145 // export_as in file metadata) will be used.
1146 ExportFormat string `json:"export_format,omitempty"`
1147 }
1148
1149 // NewExportArg returns a new ExportArg instance
1150 func NewExportArg(Path string) *ExportArg {
1151 s := new(ExportArg)
1152 s.Path = Path
1153 return s
1154 }
1155
1156 // ExportError : has no documentation (yet)
1157 type ExportError struct {
1158 dropbox.Tagged
1159 // Path : has no documentation (yet)
1160 Path *LookupError `json:"path,omitempty"`
1161 }
1162
1163 // Valid tag values for ExportError
1164 const (
1165 ExportErrorPath = "path"
1166 ExportErrorNonExportable = "non_exportable"
1167 ExportErrorInvalidExportFormat = "invalid_export_format"
1168 ExportErrorRetryError = "retry_error"
1169 ExportErrorOther = "other"
1170 )
1171
1172 // UnmarshalJSON deserializes into a ExportError instance
1173 func (u *ExportError) UnmarshalJSON(body []byte) error {
1174 type wrap struct {
1175 dropbox.Tagged
1176 // Path : has no documentation (yet)
1177 Path *LookupError `json:"path,omitempty"`
1178 }
1179 var w wrap
1180 var err error
1181 if err = json.Unmarshal(body, &w); err != nil {
1182 return err
1183 }
1184 u.Tag = w.Tag
1185 switch u.Tag {
1186 case "path":
1187 u.Path = w.Path
1188
1189 if err != nil {
1190 return err
1191 }
1192 }
1193 return nil
1194 }
1195
1196 // ExportInfo : Export information for a file.
1197 type ExportInfo struct {
1198 // ExportAs : Format to which the file can be exported to.
1199 ExportAs string `json:"export_as,omitempty"`
1200 // ExportOptions : Additional formats to which the file can be exported.
1201 // These values can be specified as the export_format in /files/export.
1202 ExportOptions []string `json:"export_options,omitempty"`
1203 }
1204
1205 // NewExportInfo returns a new ExportInfo instance
1206 func NewExportInfo() *ExportInfo {
1207 s := new(ExportInfo)
1208 return s
1209 }
1210
1211 // ExportMetadata : has no documentation (yet)
1212 type ExportMetadata struct {
1213 // Name : The last component of the path (including extension). This never
1214 // contains a slash.
1215 Name string `json:"name"`
1216 // Size : The file size in bytes.
1217 Size uint64 `json:"size"`
1218 // ExportHash : A hash based on the exported file content. This field can be
1219 // used to verify data integrity. Similar to content hash. For more
1220 // information see our `Content hash`
1221 // <https://www.dropbox.com/developers/reference/content-hash> page.
1222 ExportHash string `json:"export_hash,omitempty"`
1223 // PaperRevision : If the file is a Paper doc, this gives the latest doc
1224 // revision which can be used in `paperUpdate`.
1225 PaperRevision int64 `json:"paper_revision,omitempty"`
1226 }
1227
1228 // NewExportMetadata returns a new ExportMetadata instance
1229 func NewExportMetadata(Name string, Size uint64) *ExportMetadata {
1230 s := new(ExportMetadata)
1231 s.Name = Name
1232 s.Size = Size
1233 return s
1234 }
1235
1236 // ExportResult : has no documentation (yet)
1237 type ExportResult struct {
1238 // ExportMetadata : Metadata for the exported version of the file.
1239 ExportMetadata *ExportMetadata `json:"export_metadata"`
1240 // FileMetadata : Metadata for the original file.
1241 FileMetadata *FileMetadata `json:"file_metadata"`
1242 }
1243
1244 // NewExportResult returns a new ExportResult instance
1245 func NewExportResult(ExportMetadata *ExportMetadata, FileMetadata *FileMetadata) *ExportResult {
1246 s := new(ExportResult)
1247 s.ExportMetadata = ExportMetadata
1248 s.FileMetadata = FileMetadata
1249 return s
1250 }
1251
1252 // FileCategory : has no documentation (yet)
1253 type FileCategory struct {
1254 dropbox.Tagged
1255 }
1256
1257 // Valid tag values for FileCategory
1258 const (
1259 FileCategoryImage = "image"
1260 FileCategoryDocument = "document"
1261 FileCategoryPdf = "pdf"
1262 FileCategorySpreadsheet = "spreadsheet"
1263 FileCategoryPresentation = "presentation"
1264 FileCategoryAudio = "audio"
1265 FileCategoryVideo = "video"
1266 FileCategoryFolder = "folder"
1267 FileCategoryPaper = "paper"
1268 FileCategoryOthers = "others"
1269 FileCategoryOther = "other"
1270 )
1271
1272 // FileLock : has no documentation (yet)
1273 type FileLock struct {
1274 // Content : The lock description.
1275 Content *FileLockContent `json:"content"`
1276 }
1277
1278 // NewFileLock returns a new FileLock instance
1279 func NewFileLock(Content *FileLockContent) *FileLock {
1280 s := new(FileLock)
1281 s.Content = Content
1282 return s
1283 }
1284
1285 // FileLockContent : has no documentation (yet)
1286 type FileLockContent struct {
1287 dropbox.Tagged
1288 // SingleUser : A lock held by a single user.
1289 SingleUser *SingleUserLock `json:"single_user,omitempty"`
1290 }
1291
1292 // Valid tag values for FileLockContent
1293 const (
1294 FileLockContentUnlocked = "unlocked"
1295 FileLockContentSingleUser = "single_user"
1296 FileLockContentOther = "other"
1297 )
1298
1299 // UnmarshalJSON deserializes into a FileLockContent instance
1300 func (u *FileLockContent) UnmarshalJSON(body []byte) error {
1301 type wrap struct {
1302 dropbox.Tagged
1303 }
1304 var w wrap
1305 var err error
1306 if err = json.Unmarshal(body, &w); err != nil {
1307 return err
1308 }
1309 u.Tag = w.Tag
1310 switch u.Tag {
1311 case "single_user":
1312 err = json.Unmarshal(body, &u.SingleUser)
1313
1314 if err != nil {
1315 return err
1316 }
1317 }
1318 return nil
1319 }
1320
1321 // FileLockMetadata : has no documentation (yet)
1322 type FileLockMetadata struct {
1323 // IsLockholder : True if caller holds the file lock.
1324 IsLockholder bool `json:"is_lockholder,omitempty"`
1325 // LockholderName : The display name of the lock holder.
1326 LockholderName string `json:"lockholder_name,omitempty"`
1327 // LockholderAccountId : The account ID of the lock holder if known.
1328 LockholderAccountId string `json:"lockholder_account_id,omitempty"`
1329 // Created : The timestamp of the lock was created.
1330 Created *time.Time `json:"created,omitempty"`
1331 }
1332
1333 // NewFileLockMetadata returns a new FileLockMetadata instance
1334 func NewFileLockMetadata() *FileLockMetadata {
1335 s := new(FileLockMetadata)
1336 return s
1337 }
1338
1339 // FileMetadata : has no documentation (yet)
1340 type FileMetadata struct {
1341 Metadata
1342 // Id : A unique identifier for the file.
1343 Id string `json:"id"`
1344 // ClientModified : For files, this is the modification time set by the
1345 // desktop client when the file was added to Dropbox. Since this time is not
1346 // verified (the Dropbox server stores whatever the desktop client sends
1347 // up), this should only be used for display purposes (such as sorting) and
1348 // not, for example, to determine if a file has changed or not.
1349 ClientModified time.Time `json:"client_modified"`
1350 // ServerModified : The last time the file was modified on Dropbox.
1351 ServerModified time.Time `json:"server_modified"`
1352 // Rev : A unique identifier for the current revision of a file. This field
1353 // is the same rev as elsewhere in the API and can be used to detect changes
1354 // and avoid conflicts.
1355 Rev string `json:"rev"`
1356 // Size : The file size in bytes.
1357 Size uint64 `json:"size"`
1358 // MediaInfo : Additional information if the file is a photo or video. This
1359 // field will not be set on entries returned by `listFolder`,
1360 // `listFolderContinue`, or `getThumbnailBatch`, starting December 2, 2019.
1361 MediaInfo *MediaInfo `json:"media_info,omitempty"`
1362 // SymlinkInfo : Set if this file is a symlink.
1363 SymlinkInfo *SymlinkInfo `json:"symlink_info,omitempty"`
1364 // SharingInfo : Set if this file is contained in a shared folder.
1365 SharingInfo *FileSharingInfo `json:"sharing_info,omitempty"`
1366 // IsDownloadable : If true, file can be downloaded directly; else the file
1367 // must be exported.
1368 IsDownloadable bool `json:"is_downloadable"`
1369 // ExportInfo : Information about format this file can be exported to. This
1370 // filed must be set if `is_downloadable` is set to false.
1371 ExportInfo *ExportInfo `json:"export_info,omitempty"`
1372 // PropertyGroups : Additional information if the file has custom properties
1373 // with the property template specified.
1374 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
1375 // HasExplicitSharedMembers : This flag will only be present if
1376 // include_has_explicit_shared_members is true in `listFolder` or
1377 // `getMetadata`. If this flag is present, it will be true if this file has
1378 // any explicit shared members. This is different from sharing_info in that
1379 // this could be true in the case where a file has explicit members but is
1380 // not contained within a shared folder.
1381 HasExplicitSharedMembers bool `json:"has_explicit_shared_members,omitempty"`
1382 // ContentHash : A hash of the file content. This field can be used to
1383 // verify data integrity. For more information see our `Content hash`
1384 // <https://www.dropbox.com/developers/reference/content-hash> page.
1385 ContentHash string `json:"content_hash,omitempty"`
1386 // FileLockInfo : If present, the metadata associated with the file's
1387 // current lock.
1388 FileLockInfo *FileLockMetadata `json:"file_lock_info,omitempty"`
1389 }
1390
1391 // NewFileMetadata returns a new FileMetadata instance
1392 func NewFileMetadata(Name string, Id string, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileMetadata {
1393 s := new(FileMetadata)
1394 s.Name = Name
1395 s.Id = Id
1396 s.ClientModified = ClientModified
1397 s.ServerModified = ServerModified
1398 s.Rev = Rev
1399 s.Size = Size
1400 s.IsDownloadable = true
1401 return s
1402 }
1403
1404 // SharingInfo : Sharing info for a file or folder.
1405 type SharingInfo struct {
1406 // ReadOnly : True if the file or folder is inside a read-only shared
1407 // folder.
1408 ReadOnly bool `json:"read_only"`
1409 }
1410
1411 // NewSharingInfo returns a new SharingInfo instance
1412 func NewSharingInfo(ReadOnly bool) *SharingInfo {
1413 s := new(SharingInfo)
1414 s.ReadOnly = ReadOnly
1415 return s
1416 }
1417
1418 // FileSharingInfo : Sharing info for a file which is contained by a shared
1419 // folder.
1420 type FileSharingInfo struct {
1421 SharingInfo
1422 // ParentSharedFolderId : ID of shared folder that holds this file.
1423 ParentSharedFolderId string `json:"parent_shared_folder_id"`
1424 // ModifiedBy : The last user who modified the file. This field will be null
1425 // if the user's account has been deleted.
1426 ModifiedBy string `json:"modified_by,omitempty"`
1427 }
1428
1429 // NewFileSharingInfo returns a new FileSharingInfo instance
1430 func NewFileSharingInfo(ReadOnly bool, ParentSharedFolderId string) *FileSharingInfo {
1431 s := new(FileSharingInfo)
1432 s.ReadOnly = ReadOnly
1433 s.ParentSharedFolderId = ParentSharedFolderId
1434 return s
1435 }
1436
1437 // FileStatus : has no documentation (yet)
1438 type FileStatus struct {
1439 dropbox.Tagged
1440 }
1441
1442 // Valid tag values for FileStatus
1443 const (
1444 FileStatusActive = "active"
1445 FileStatusDeleted = "deleted"
1446 FileStatusOther = "other"
1447 )
1448
1449 // FolderMetadata : has no documentation (yet)
1450 type FolderMetadata struct {
1451 Metadata
1452 // Id : A unique identifier for the folder.
1453 Id string `json:"id"`
1454 // SharedFolderId : Please use `sharing_info` instead.
1455 SharedFolderId string `json:"shared_folder_id,omitempty"`
1456 // SharingInfo : Set if the folder is contained in a shared folder or is a
1457 // shared folder mount point.
1458 SharingInfo *FolderSharingInfo `json:"sharing_info,omitempty"`
1459 // PropertyGroups : Additional information if the file has custom properties
1460 // with the property template specified. Note that only properties
1461 // associated with user-owned templates, not team-owned templates, can be
1462 // attached to folders.
1463 PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"`
1464 }
1465
1466 // NewFolderMetadata returns a new FolderMetadata instance
1467 func NewFolderMetadata(Name string, Id string) *FolderMetadata {
1468 s := new(FolderMetadata)
1469 s.Name = Name
1470 s.Id = Id
1471 return s
1472 }
1473
1474 // FolderSharingInfo : Sharing info for a folder which is contained in a shared
1475 // folder or is a shared folder mount point.
1476 type FolderSharingInfo struct {
1477 SharingInfo
1478 // ParentSharedFolderId : Set if the folder is contained by a shared folder.
1479 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
1480 // SharedFolderId : If this folder is a shared folder mount point, the ID of
1481 // the shared folder mounted at this location.
1482 SharedFolderId string `json:"shared_folder_id,omitempty"`
1483 // TraverseOnly : Specifies that the folder can only be traversed and the
1484 // user can only see a limited subset of the contents of this folder because
1485 // they don't have read access to this folder. They do, however, have access
1486 // to some sub folder.
1487 TraverseOnly bool `json:"traverse_only"`
1488 // NoAccess : Specifies that the folder cannot be accessed by the user.
1489 NoAccess bool `json:"no_access"`
1490 }
1491
1492 // NewFolderSharingInfo returns a new FolderSharingInfo instance
1493 func NewFolderSharingInfo(ReadOnly bool) *FolderSharingInfo {
1494 s := new(FolderSharingInfo)
1495 s.ReadOnly = ReadOnly
1496 s.TraverseOnly = false
1497 s.NoAccess = false
1498 return s
1499 }
1500
1501 // GetCopyReferenceArg : has no documentation (yet)
1502 type GetCopyReferenceArg struct {
1503 // Path : The path to the file or folder you want to get a copy reference
1504 // to.
1505 Path string `json:"path"`
1506 }
1507
1508 // NewGetCopyReferenceArg returns a new GetCopyReferenceArg instance
1509 func NewGetCopyReferenceArg(Path string) *GetCopyReferenceArg {
1510 s := new(GetCopyReferenceArg)
1511 s.Path = Path
1512 return s
1513 }
1514
1515 // GetCopyReferenceError : has no documentation (yet)
1516 type GetCopyReferenceError struct {
1517 dropbox.Tagged
1518 // Path : has no documentation (yet)
1519 Path *LookupError `json:"path,omitempty"`
1520 }
1521
1522 // Valid tag values for GetCopyReferenceError
1523 const (
1524 GetCopyReferenceErrorPath = "path"
1525 GetCopyReferenceErrorOther = "other"
1526 )
1527
1528 // UnmarshalJSON deserializes into a GetCopyReferenceError instance
1529 func (u *GetCopyReferenceError) UnmarshalJSON(body []byte) error {
1530 type wrap struct {
1531 dropbox.Tagged
1532 // Path : has no documentation (yet)
1533 Path *LookupError `json:"path,omitempty"`
1534 }
1535 var w wrap
1536 var err error
1537 if err = json.Unmarshal(body, &w); err != nil {
1538 return err
1539 }
1540 u.Tag = w.Tag
1541 switch u.Tag {
1542 case "path":
1543 u.Path = w.Path
1544
1545 if err != nil {
1546 return err
1547 }
1548 }
1549 return nil
1550 }
1551
1552 // GetCopyReferenceResult : has no documentation (yet)
1553 type GetCopyReferenceResult struct {
1554 // Metadata : Metadata of the file or folder.
1555 Metadata IsMetadata `json:"metadata"`
1556 // CopyReference : A copy reference to the file or folder.
1557 CopyReference string `json:"copy_reference"`
1558 // Expires : The expiration date of the copy reference. This value is
1559 // currently set to be far enough in the future so that expiration is
1560 // effectively not an issue.
1561 Expires time.Time `json:"expires"`
1562 }
1563
1564 // NewGetCopyReferenceResult returns a new GetCopyReferenceResult instance
1565 func NewGetCopyReferenceResult(Metadata IsMetadata, CopyReference string, Expires time.Time) *GetCopyReferenceResult {
1566 s := new(GetCopyReferenceResult)
1567 s.Metadata = Metadata
1568 s.CopyReference = CopyReference
1569 s.Expires = Expires
1570 return s
1571 }
1572
1573 // UnmarshalJSON deserializes into a GetCopyReferenceResult instance
1574 func (u *GetCopyReferenceResult) UnmarshalJSON(b []byte) error {
1575 type wrap struct {
1576 // Metadata : Metadata of the file or folder.
1577 Metadata json.RawMessage `json:"metadata"`
1578 // CopyReference : A copy reference to the file or folder.
1579 CopyReference string `json:"copy_reference"`
1580 // Expires : The expiration date of the copy reference. This value is
1581 // currently set to be far enough in the future so that expiration is
1582 // effectively not an issue.
1583 Expires time.Time `json:"expires"`
1584 }
1585 var w wrap
1586 if err := json.Unmarshal(b, &w); err != nil {
1587 return err
1588 }
1589 Metadata, err := IsMetadataFromJSON(w.Metadata)
1590 if err != nil {
1591 return err
1592 }
1593 u.Metadata = Metadata
1594 u.CopyReference = w.CopyReference
1595 u.Expires = w.Expires
1596 return nil
1597 }
1598
1599 // GetTemporaryLinkArg : has no documentation (yet)
1600 type GetTemporaryLinkArg struct {
1601 // Path : The path to the file you want a temporary link to.
1602 Path string `json:"path"`
1603 }
1604
1605 // NewGetTemporaryLinkArg returns a new GetTemporaryLinkArg instance
1606 func NewGetTemporaryLinkArg(Path string) *GetTemporaryLinkArg {
1607 s := new(GetTemporaryLinkArg)
1608 s.Path = Path
1609 return s
1610 }
1611
1612 // GetTemporaryLinkError : has no documentation (yet)
1613 type GetTemporaryLinkError struct {
1614 dropbox.Tagged
1615 // Path : has no documentation (yet)
1616 Path *LookupError `json:"path,omitempty"`
1617 }
1618
1619 // Valid tag values for GetTemporaryLinkError
1620 const (
1621 GetTemporaryLinkErrorPath = "path"
1622 GetTemporaryLinkErrorEmailNotVerified = "email_not_verified"
1623 GetTemporaryLinkErrorUnsupportedFile = "unsupported_file"
1624 GetTemporaryLinkErrorNotAllowed = "not_allowed"
1625 GetTemporaryLinkErrorOther = "other"
1626 )
1627
1628 // UnmarshalJSON deserializes into a GetTemporaryLinkError instance
1629 func (u *GetTemporaryLinkError) UnmarshalJSON(body []byte) error {
1630 type wrap struct {
1631 dropbox.Tagged
1632 // Path : has no documentation (yet)
1633 Path *LookupError `json:"path,omitempty"`
1634 }
1635 var w wrap
1636 var err error
1637 if err = json.Unmarshal(body, &w); err != nil {
1638 return err
1639 }
1640 u.Tag = w.Tag
1641 switch u.Tag {
1642 case "path":
1643 u.Path = w.Path
1644
1645 if err != nil {
1646 return err
1647 }
1648 }
1649 return nil
1650 }
1651
1652 // GetTemporaryLinkResult : has no documentation (yet)
1653 type GetTemporaryLinkResult struct {
1654 // Metadata : Metadata of the file.
1655 Metadata *FileMetadata `json:"metadata"`
1656 // Link : The temporary link which can be used to stream content the file.
1657 Link string `json:"link"`
1658 }
1659
1660 // NewGetTemporaryLinkResult returns a new GetTemporaryLinkResult instance
1661 func NewGetTemporaryLinkResult(Metadata *FileMetadata, Link string) *GetTemporaryLinkResult {
1662 s := new(GetTemporaryLinkResult)
1663 s.Metadata = Metadata
1664 s.Link = Link
1665 return s
1666 }
1667
1668 // GetTemporaryUploadLinkArg : has no documentation (yet)
1669 type GetTemporaryUploadLinkArg struct {
1670 // CommitInfo : Contains the path and other optional modifiers for the
1671 // future upload commit. Equivalent to the parameters provided to `upload`.
1672 CommitInfo *CommitInfo `json:"commit_info"`
1673 // Duration : How long before this link expires, in seconds. Attempting to
1674 // start an upload with this link longer than this period of time after
1675 // link creation will result in an error.
1676 Duration float64 `json:"duration"`
1677 }
1678
1679 // NewGetTemporaryUploadLinkArg returns a new GetTemporaryUploadLinkArg instance
1680 func NewGetTemporaryUploadLinkArg(CommitInfo *CommitInfo) *GetTemporaryUploadLinkArg {
1681 s := new(GetTemporaryUploadLinkArg)
1682 s.CommitInfo = CommitInfo
1683 s.Duration = 14400.0
1684 return s
1685 }
1686
1687 // GetTemporaryUploadLinkResult : has no documentation (yet)
1688 type GetTemporaryUploadLinkResult struct {
1689 // Link : The temporary link which can be used to stream a file to a Dropbox
1690 // location.
1691 Link string `json:"link"`
1692 }
1693
1694 // NewGetTemporaryUploadLinkResult returns a new GetTemporaryUploadLinkResult instance
1695 func NewGetTemporaryUploadLinkResult(Link string) *GetTemporaryUploadLinkResult {
1696 s := new(GetTemporaryUploadLinkResult)
1697 s.Link = Link
1698 return s
1699 }
1700
1701 // GetThumbnailBatchArg : Arguments for `getThumbnailBatch`.
1702 type GetThumbnailBatchArg struct {
1703 // Entries : List of files to get thumbnails.
1704 Entries []*ThumbnailArg `json:"entries"`
1705 }
1706
1707 // NewGetThumbnailBatchArg returns a new GetThumbnailBatchArg instance
1708 func NewGetThumbnailBatchArg(Entries []*ThumbnailArg) *GetThumbnailBatchArg {
1709 s := new(GetThumbnailBatchArg)
1710 s.Entries = Entries
1711 return s
1712 }
1713
1714 // GetThumbnailBatchError : has no documentation (yet)
1715 type GetThumbnailBatchError struct {
1716 dropbox.Tagged
1717 }
1718
1719 // Valid tag values for GetThumbnailBatchError
1720 const (
1721 GetThumbnailBatchErrorTooManyFiles = "too_many_files"
1722 GetThumbnailBatchErrorOther = "other"
1723 )
1724
1725 // GetThumbnailBatchResult : has no documentation (yet)
1726 type GetThumbnailBatchResult struct {
1727 // Entries : List of files and their thumbnails.
1728 Entries []*GetThumbnailBatchResultEntry `json:"entries"`
1729 }
1730
1731 // NewGetThumbnailBatchResult returns a new GetThumbnailBatchResult instance
1732 func NewGetThumbnailBatchResult(Entries []*GetThumbnailBatchResultEntry) *GetThumbnailBatchResult {
1733 s := new(GetThumbnailBatchResult)
1734 s.Entries = Entries
1735 return s
1736 }
1737
1738 // GetThumbnailBatchResultData : has no documentation (yet)
1739 type GetThumbnailBatchResultData struct {
1740 // Metadata : has no documentation (yet)
1741 Metadata *FileMetadata `json:"metadata"`
1742 // Thumbnail : A string containing the base64-encoded thumbnail data for
1743 // this file.
1744 Thumbnail string `json:"thumbnail"`
1745 }
1746
1747 // NewGetThumbnailBatchResultData returns a new GetThumbnailBatchResultData instance
1748 func NewGetThumbnailBatchResultData(Metadata *FileMetadata, Thumbnail string) *GetThumbnailBatchResultData {
1749 s := new(GetThumbnailBatchResultData)
1750 s.Metadata = Metadata
1751 s.Thumbnail = Thumbnail
1752 return s
1753 }
1754
1755 // GetThumbnailBatchResultEntry : has no documentation (yet)
1756 type GetThumbnailBatchResultEntry struct {
1757 dropbox.Tagged
1758 // Success : has no documentation (yet)
1759 Success *GetThumbnailBatchResultData `json:"success,omitempty"`
1760 // Failure : The result for this file if it was an error.
1761 Failure *ThumbnailError `json:"failure,omitempty"`
1762 }
1763
1764 // Valid tag values for GetThumbnailBatchResultEntry
1765 const (
1766 GetThumbnailBatchResultEntrySuccess = "success"
1767 GetThumbnailBatchResultEntryFailure = "failure"
1768 GetThumbnailBatchResultEntryOther = "other"
1769 )
1770
1771 // UnmarshalJSON deserializes into a GetThumbnailBatchResultEntry instance
1772 func (u *GetThumbnailBatchResultEntry) UnmarshalJSON(body []byte) error {
1773 type wrap struct {
1774 dropbox.Tagged
1775 // Failure : The result for this file if it was an error.
1776 Failure *ThumbnailError `json:"failure,omitempty"`
1777 }
1778 var w wrap
1779 var err error
1780 if err = json.Unmarshal(body, &w); err != nil {
1781 return err
1782 }
1783 u.Tag = w.Tag
1784 switch u.Tag {
1785 case "success":
1786 err = json.Unmarshal(body, &u.Success)
1787
1788 if err != nil {
1789 return err
1790 }
1791 case "failure":
1792 u.Failure = w.Failure
1793
1794 if err != nil {
1795 return err
1796 }
1797 }
1798 return nil
1799 }
1800
1801 // GpsCoordinates : GPS coordinates for a photo or video.
1802 type GpsCoordinates struct {
1803 // Latitude : Latitude of the GPS coordinates.
1804 Latitude float64 `json:"latitude"`
1805 // Longitude : Longitude of the GPS coordinates.
1806 Longitude float64 `json:"longitude"`
1807 }
1808
1809 // NewGpsCoordinates returns a new GpsCoordinates instance
1810 func NewGpsCoordinates(Latitude float64, Longitude float64) *GpsCoordinates {
1811 s := new(GpsCoordinates)
1812 s.Latitude = Latitude
1813 s.Longitude = Longitude
1814 return s
1815 }
1816
1817 // HighlightSpan : has no documentation (yet)
1818 type HighlightSpan struct {
1819 // HighlightStr : String to be determined whether it should be highlighted
1820 // or not.
1821 HighlightStr string `json:"highlight_str"`
1822 // IsHighlighted : The string should be highlighted or not.
1823 IsHighlighted bool `json:"is_highlighted"`
1824 }
1825
1826 // NewHighlightSpan returns a new HighlightSpan instance
1827 func NewHighlightSpan(HighlightStr string, IsHighlighted bool) *HighlightSpan {
1828 s := new(HighlightSpan)
1829 s.HighlightStr = HighlightStr
1830 s.IsHighlighted = IsHighlighted
1831 return s
1832 }
1833
1834 // ImportFormat : The import format of the incoming Paper doc content.
1835 type ImportFormat struct {
1836 dropbox.Tagged
1837 }
1838
1839 // Valid tag values for ImportFormat
1840 const (
1841 ImportFormatHtml = "html"
1842 ImportFormatMarkdown = "markdown"
1843 ImportFormatPlainText = "plain_text"
1844 ImportFormatOther = "other"
1845 )
1846
1847 // ListFolderArg : has no documentation (yet)
1848 type ListFolderArg struct {
1849 // Path : A unique identifier for the file.
1850 Path string `json:"path"`
1851 // Recursive : If true, the list folder operation will be applied
1852 // recursively to all subfolders and the response will contain contents of
1853 // all subfolders.
1854 Recursive bool `json:"recursive"`
1855 // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo
1856 // and video. This parameter will no longer have an effect starting December
1857 // 2, 2019.
1858 IncludeMediaInfo bool `json:"include_media_info"`
1859 // IncludeDeleted : If true, the results will include entries for files and
1860 // folders that used to exist but were deleted.
1861 IncludeDeleted bool `json:"include_deleted"`
1862 // IncludeHasExplicitSharedMembers : If true, the results will include a
1863 // flag for each file indicating whether or not that file has any explicit
1864 // members.
1865 IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"`
1866 // IncludeMountedFolders : If true, the results will include entries under
1867 // mounted folders which includes app folder, shared folder and team folder.
1868 IncludeMountedFolders bool `json:"include_mounted_folders"`
1869 // Limit : The maximum number of results to return per request. Note: This
1870 // is an approximate number and there can be slightly more entries returned
1871 // in some cases.
1872 Limit uint32 `json:"limit,omitempty"`
1873 // SharedLink : A shared link to list the contents of. If the link is
1874 // password-protected, the password must be provided. If this field is
1875 // present, `ListFolderArg.path` will be relative to root of the shared
1876 // link. Only non-recursive mode is supported for shared link.
1877 SharedLink *SharedLink `json:"shared_link,omitempty"`
1878 // IncludePropertyGroups : If set to a valid list of template IDs,
1879 // `FileMetadata.property_groups` is set if there exists property data
1880 // associated with the file and each of the listed templates.
1881 IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"`
1882 // IncludeNonDownloadableFiles : If true, include files that are not
1883 // downloadable, i.e. Google Docs.
1884 IncludeNonDownloadableFiles bool `json:"include_non_downloadable_files"`
1885 }
1886
1887 // NewListFolderArg returns a new ListFolderArg instance
1888 func NewListFolderArg(Path string) *ListFolderArg {
1889 s := new(ListFolderArg)
1890 s.Path = Path
1891 s.Recursive = false
1892 s.IncludeMediaInfo = false
1893 s.IncludeDeleted = false
1894 s.IncludeHasExplicitSharedMembers = false
1895 s.IncludeMountedFolders = true
1896 s.IncludeNonDownloadableFiles = true
1897 return s
1898 }
1899
1900 // ListFolderContinueArg : has no documentation (yet)
1901 type ListFolderContinueArg struct {
1902 // Cursor : The cursor returned by your last call to `listFolder` or
1903 // `listFolderContinue`.
1904 Cursor string `json:"cursor"`
1905 }
1906
1907 // NewListFolderContinueArg returns a new ListFolderContinueArg instance
1908 func NewListFolderContinueArg(Cursor string) *ListFolderContinueArg {
1909 s := new(ListFolderContinueArg)
1910 s.Cursor = Cursor
1911 return s
1912 }
1913
1914 // ListFolderContinueError : has no documentation (yet)
1915 type ListFolderContinueError struct {
1916 dropbox.Tagged
1917 // Path : has no documentation (yet)
1918 Path *LookupError `json:"path,omitempty"`
1919 }
1920
1921 // Valid tag values for ListFolderContinueError
1922 const (
1923 ListFolderContinueErrorPath = "path"
1924 ListFolderContinueErrorReset = "reset"
1925 ListFolderContinueErrorOther = "other"
1926 )
1927
1928 // UnmarshalJSON deserializes into a ListFolderContinueError instance
1929 func (u *ListFolderContinueError) UnmarshalJSON(body []byte) error {
1930 type wrap struct {
1931 dropbox.Tagged
1932 // Path : has no documentation (yet)
1933 Path *LookupError `json:"path,omitempty"`
1934 }
1935 var w wrap
1936 var err error
1937 if err = json.Unmarshal(body, &w); err != nil {
1938 return err
1939 }
1940 u.Tag = w.Tag
1941 switch u.Tag {
1942 case "path":
1943 u.Path = w.Path
1944
1945 if err != nil {
1946 return err
1947 }
1948 }
1949 return nil
1950 }
1951
1952 // ListFolderError : has no documentation (yet)
1953 type ListFolderError struct {
1954 dropbox.Tagged
1955 // Path : has no documentation (yet)
1956 Path *LookupError `json:"path,omitempty"`
1957 // TemplateError : has no documentation (yet)
1958 TemplateError *file_properties.TemplateError `json:"template_error,omitempty"`
1959 }
1960
1961 // Valid tag values for ListFolderError
1962 const (
1963 ListFolderErrorPath = "path"
1964 ListFolderErrorTemplateError = "template_error"
1965 ListFolderErrorOther = "other"
1966 )
1967
1968 // UnmarshalJSON deserializes into a ListFolderError instance
1969 func (u *ListFolderError) UnmarshalJSON(body []byte) error {
1970 type wrap struct {
1971 dropbox.Tagged
1972 // Path : has no documentation (yet)
1973 Path *LookupError `json:"path,omitempty"`
1974 // TemplateError : has no documentation (yet)
1975 TemplateError *file_properties.TemplateError `json:"template_error,omitempty"`
1976 }
1977 var w wrap
1978 var err error
1979 if err = json.Unmarshal(body, &w); err != nil {
1980 return err
1981 }
1982 u.Tag = w.Tag
1983 switch u.Tag {
1984 case "path":
1985 u.Path = w.Path
1986
1987 if err != nil {
1988 return err
1989 }
1990 case "template_error":
1991 u.TemplateError = w.TemplateError
1992
1993 if err != nil {
1994 return err
1995 }
1996 }
1997 return nil
1998 }
1999
2000 // ListFolderGetLatestCursorResult : has no documentation (yet)
2001 type ListFolderGetLatestCursorResult struct {
2002 // Cursor : Pass the cursor into `listFolderContinue` to see what's changed
2003 // in the folder since your previous query.
2004 Cursor string `json:"cursor"`
2005 }
2006
2007 // NewListFolderGetLatestCursorResult returns a new ListFolderGetLatestCursorResult instance
2008 func NewListFolderGetLatestCursorResult(Cursor string) *ListFolderGetLatestCursorResult {
2009 s := new(ListFolderGetLatestCursorResult)
2010 s.Cursor = Cursor
2011 return s
2012 }
2013
2014 // ListFolderLongpollArg : has no documentation (yet)
2015 type ListFolderLongpollArg struct {
2016 // Cursor : A cursor as returned by `listFolder` or `listFolderContinue`.
2017 // Cursors retrieved by setting `ListFolderArg.include_media_info` to true
2018 // are not supported.
2019 Cursor string `json:"cursor"`
2020 // Timeout : A timeout in seconds. The request will block for at most this
2021 // length of time, plus up to 90 seconds of random jitter added to avoid the
2022 // thundering herd problem. Care should be taken when using this parameter,
2023 // as some network infrastructure does not support long timeouts.
2024 Timeout uint64 `json:"timeout"`
2025 }
2026
2027 // NewListFolderLongpollArg returns a new ListFolderLongpollArg instance
2028 func NewListFolderLongpollArg(Cursor string) *ListFolderLongpollArg {
2029 s := new(ListFolderLongpollArg)
2030 s.Cursor = Cursor
2031 s.Timeout = 30
2032 return s
2033 }
2034
2035 // ListFolderLongpollError : has no documentation (yet)
2036 type ListFolderLongpollError struct {
2037 dropbox.Tagged
2038 }
2039
2040 // Valid tag values for ListFolderLongpollError
2041 const (
2042 ListFolderLongpollErrorReset = "reset"
2043 ListFolderLongpollErrorOther = "other"
2044 )
2045
2046 // ListFolderLongpollResult : has no documentation (yet)
2047 type ListFolderLongpollResult struct {
2048 // Changes : Indicates whether new changes are available. If true, call
2049 // `listFolderContinue` to retrieve the changes.
2050 Changes bool `json:"changes"`
2051 // Backoff : If present, backoff for at least this many seconds before
2052 // calling `listFolderLongpoll` again.
2053 Backoff uint64 `json:"backoff,omitempty"`
2054 }
2055
2056 // NewListFolderLongpollResult returns a new ListFolderLongpollResult instance
2057 func NewListFolderLongpollResult(Changes bool) *ListFolderLongpollResult {
2058 s := new(ListFolderLongpollResult)
2059 s.Changes = Changes
2060 return s
2061 }
2062
2063 // ListFolderResult : has no documentation (yet)
2064 type ListFolderResult struct {
2065 // Entries : The files and (direct) subfolders in the folder.
2066 Entries []IsMetadata `json:"entries"`
2067 // Cursor : Pass the cursor into `listFolderContinue` to see what's changed
2068 // in the folder since your previous query.
2069 Cursor string `json:"cursor"`
2070 // HasMore : If true, then there are more entries available. Pass the cursor
2071 // to `listFolderContinue` to retrieve the rest.
2072 HasMore bool `json:"has_more"`
2073 }
2074
2075 // NewListFolderResult returns a new ListFolderResult instance
2076 func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bool) *ListFolderResult {
2077 s := new(ListFolderResult)
2078 s.Entries = Entries
2079 s.Cursor = Cursor
2080 s.HasMore = HasMore
2081 return s
2082 }
2083
2084 // UnmarshalJSON deserializes into a ListFolderResult instance
2085 func (u *ListFolderResult) UnmarshalJSON(b []byte) error {
2086 type wrap struct {
2087 // Entries : The files and (direct) subfolders in the folder.
2088 Entries []json.RawMessage `json:"entries"`
2089 // Cursor : Pass the cursor into `listFolderContinue` to see what's
2090 // changed in the folder since your previous query.
2091 Cursor string `json:"cursor"`
2092 // HasMore : If true, then there are more entries available. Pass the
2093 // cursor to `listFolderContinue` to retrieve the rest.
2094 HasMore bool `json:"has_more"`
2095 }
2096 var w wrap
2097 if err := json.Unmarshal(b, &w); err != nil {
2098 return err
2099 }
2100 u.Entries = make([]IsMetadata, len(w.Entries))
2101 for i, e := range w.Entries {
2102 v, err := IsMetadataFromJSON(e)
2103 if err != nil {
2104 return err
2105 }
2106 u.Entries[i] = v
2107 }
2108 u.Cursor = w.Cursor
2109 u.HasMore = w.HasMore
2110 return nil
2111 }
2112
2113 // ListRevisionsArg : has no documentation (yet)
2114 type ListRevisionsArg struct {
2115 // Path : The path to the file you want to see the revisions of.
2116 Path string `json:"path"`
2117 // Mode : Determines the behavior of the API in listing the revisions for a
2118 // given file path or id.
2119 Mode *ListRevisionsMode `json:"mode"`
2120 // Limit : The maximum number of revision entries returned.
2121 Limit uint64 `json:"limit"`
2122 }
2123
2124 // NewListRevisionsArg returns a new ListRevisionsArg instance
2125 func NewListRevisionsArg(Path string) *ListRevisionsArg {
2126 s := new(ListRevisionsArg)
2127 s.Path = Path
2128 s.Mode = &ListRevisionsMode{Tagged: dropbox.Tagged{Tag: "path"}}
2129 s.Limit = 10
2130 return s
2131 }
2132
2133 // ListRevisionsError : has no documentation (yet)
2134 type ListRevisionsError struct {
2135 dropbox.Tagged
2136 // Path : has no documentation (yet)
2137 Path *LookupError `json:"path,omitempty"`
2138 }
2139
2140 // Valid tag values for ListRevisionsError
2141 const (
2142 ListRevisionsErrorPath = "path"
2143 ListRevisionsErrorOther = "other"
2144 )
2145
2146 // UnmarshalJSON deserializes into a ListRevisionsError instance
2147 func (u *ListRevisionsError) UnmarshalJSON(body []byte) error {
2148 type wrap struct {
2149 dropbox.Tagged
2150 // Path : has no documentation (yet)
2151 Path *LookupError `json:"path,omitempty"`
2152 }
2153 var w wrap
2154 var err error
2155 if err = json.Unmarshal(body, &w); err != nil {
2156 return err
2157 }
2158 u.Tag = w.Tag
2159 switch u.Tag {
2160 case "path":
2161 u.Path = w.Path
2162
2163 if err != nil {
2164 return err
2165 }
2166 }
2167 return nil
2168 }
2169
2170 // ListRevisionsMode : has no documentation (yet)
2171 type ListRevisionsMode struct {
2172 dropbox.Tagged
2173 }
2174
2175 // Valid tag values for ListRevisionsMode
2176 const (
2177 ListRevisionsModePath = "path"
2178 ListRevisionsModeId = "id"
2179 ListRevisionsModeOther = "other"
2180 )
2181
2182 // ListRevisionsResult : has no documentation (yet)
2183 type ListRevisionsResult struct {
2184 // IsDeleted : If the file identified by the latest revision in the response
2185 // is either deleted or moved.
2186 IsDeleted bool `json:"is_deleted"`
2187 // ServerDeleted : The time of deletion if the file was deleted.
2188 ServerDeleted *time.Time `json:"server_deleted,omitempty"`
2189 // Entries : The revisions for the file. Only revisions that are not deleted
2190 // will show up here.
2191 Entries []*FileMetadata `json:"entries"`
2192 }
2193
2194 // NewListRevisionsResult returns a new ListRevisionsResult instance
2195 func NewListRevisionsResult(IsDeleted bool, Entries []*FileMetadata) *ListRevisionsResult {
2196 s := new(ListRevisionsResult)
2197 s.IsDeleted = IsDeleted
2198 s.Entries = Entries
2199 return s
2200 }
2201
2202 // LockConflictError : has no documentation (yet)
2203 type LockConflictError struct {
2204 // Lock : The lock that caused the conflict.
2205 Lock *FileLock `json:"lock"`
2206 }
2207
2208 // NewLockConflictError returns a new LockConflictError instance
2209 func NewLockConflictError(Lock *FileLock) *LockConflictError {
2210 s := new(LockConflictError)
2211 s.Lock = Lock
2212 return s
2213 }
2214
2215 // LockFileArg : has no documentation (yet)
2216 type LockFileArg struct {
2217 // Path : Path in the user's Dropbox to a file.
2218 Path string `json:"path"`
2219 }
2220
2221 // NewLockFileArg returns a new LockFileArg instance
2222 func NewLockFileArg(Path string) *LockFileArg {
2223 s := new(LockFileArg)
2224 s.Path = Path
2225 return s
2226 }
2227
2228 // LockFileBatchArg : has no documentation (yet)
2229 type LockFileBatchArg struct {
2230 // Entries : List of 'entries'. Each 'entry' contains a path of the file
2231 // which will be locked or queried. Duplicate path arguments in the batch
2232 // are considered only once.
2233 Entries []*LockFileArg `json:"entries"`
2234 }
2235
2236 // NewLockFileBatchArg returns a new LockFileBatchArg instance
2237 func NewLockFileBatchArg(Entries []*LockFileArg) *LockFileBatchArg {
2238 s := new(LockFileBatchArg)
2239 s.Entries = Entries
2240 return s
2241 }
2242
2243 // LockFileBatchResult : has no documentation (yet)
2244 type LockFileBatchResult struct {
2245 FileOpsResult
2246 // Entries : Each Entry in the 'entries' will have '.tag' with the operation
2247 // status (e.g. success), the metadata for the file and the lock state after
2248 // the operation.
2249 Entries []*LockFileResultEntry `json:"entries"`
2250 }
2251
2252 // NewLockFileBatchResult returns a new LockFileBatchResult instance
2253 func NewLockFileBatchResult(Entries []*LockFileResultEntry) *LockFileBatchResult {
2254 s := new(LockFileBatchResult)
2255 s.Entries = Entries
2256 return s
2257 }
2258
2259 // LockFileError : has no documentation (yet)
2260 type LockFileError struct {
2261 dropbox.Tagged
2262 // PathLookup : Could not find the specified resource.
2263 PathLookup *LookupError `json:"path_lookup,omitempty"`
2264 // LockConflict : The user action conflicts with an existing lock on the
2265 // file.
2266 LockConflict *LockConflictError `json:"lock_conflict,omitempty"`
2267 }
2268
2269 // Valid tag values for LockFileError
2270 const (
2271 LockFileErrorPathLookup = "path_lookup"
2272 LockFileErrorTooManyWriteOperations = "too_many_write_operations"
2273 LockFileErrorTooManyFiles = "too_many_files"
2274 LockFileErrorNoWritePermission = "no_write_permission"
2275 LockFileErrorCannotBeLocked = "cannot_be_locked"
2276 LockFileErrorFileNotShared = "file_not_shared"
2277 LockFileErrorLockConflict = "lock_conflict"
2278 LockFileErrorInternalError = "internal_error"
2279 LockFileErrorOther = "other"
2280 )
2281
2282 // UnmarshalJSON deserializes into a LockFileError instance
2283 func (u *LockFileError) UnmarshalJSON(body []byte) error {
2284 type wrap struct {
2285 dropbox.Tagged
2286 // PathLookup : Could not find the specified resource.
2287 PathLookup *LookupError `json:"path_lookup,omitempty"`
2288 }
2289 var w wrap
2290 var err error
2291 if err = json.Unmarshal(body, &w); err != nil {
2292 return err
2293 }
2294 u.Tag = w.Tag
2295 switch u.Tag {
2296 case "path_lookup":
2297 u.PathLookup = w.PathLookup
2298
2299 if err != nil {
2300 return err
2301 }
2302 case "lock_conflict":
2303 err = json.Unmarshal(body, &u.LockConflict)
2304
2305 if err != nil {
2306 return err
2307 }
2308 }
2309 return nil
2310 }
2311
2312 // LockFileResult : has no documentation (yet)
2313 type LockFileResult struct {
2314 // Metadata : Metadata of the file.
2315 Metadata IsMetadata `json:"metadata"`
2316 // Lock : The file lock state after the operation.
2317 Lock *FileLock `json:"lock"`
2318 }
2319
2320 // NewLockFileResult returns a new LockFileResult instance
2321 func NewLockFileResult(Metadata IsMetadata, Lock *FileLock) *LockFileResult {
2322 s := new(LockFileResult)
2323 s.Metadata = Metadata
2324 s.Lock = Lock
2325 return s
2326 }
2327
2328 // UnmarshalJSON deserializes into a LockFileResult instance
2329 func (u *LockFileResult) UnmarshalJSON(b []byte) error {
2330 type wrap struct {
2331 // Metadata : Metadata of the file.
2332 Metadata json.RawMessage `json:"metadata"`
2333 // Lock : The file lock state after the operation.
2334 Lock *FileLock `json:"lock"`
2335 }
2336 var w wrap
2337 if err := json.Unmarshal(b, &w); err != nil {
2338 return err
2339 }
2340 Metadata, err := IsMetadataFromJSON(w.Metadata)
2341 if err != nil {
2342 return err
2343 }
2344 u.Metadata = Metadata
2345 u.Lock = w.Lock
2346 return nil
2347 }
2348
2349 // LockFileResultEntry : has no documentation (yet)
2350 type LockFileResultEntry struct {
2351 dropbox.Tagged
2352 // Success : has no documentation (yet)
2353 Success *LockFileResult `json:"success,omitempty"`
2354 // Failure : has no documentation (yet)
2355 Failure *LockFileError `json:"failure,omitempty"`
2356 }
2357
2358 // Valid tag values for LockFileResultEntry
2359 const (
2360 LockFileResultEntrySuccess = "success"
2361 LockFileResultEntryFailure = "failure"
2362 )
2363
2364 // UnmarshalJSON deserializes into a LockFileResultEntry instance
2365 func (u *LockFileResultEntry) UnmarshalJSON(body []byte) error {
2366 type wrap struct {
2367 dropbox.Tagged
2368 // Failure : has no documentation (yet)
2369 Failure *LockFileError `json:"failure,omitempty"`
2370 }
2371 var w wrap
2372 var err error
2373 if err = json.Unmarshal(body, &w); err != nil {
2374 return err
2375 }
2376 u.Tag = w.Tag
2377 switch u.Tag {
2378 case "success":
2379 err = json.Unmarshal(body, &u.Success)
2380
2381 if err != nil {
2382 return err
2383 }
2384 case "failure":
2385 u.Failure = w.Failure
2386
2387 if err != nil {
2388 return err
2389 }
2390 }
2391 return nil
2392 }
2393
2394 // LookupError : has no documentation (yet)
2395 type LookupError struct {
2396 dropbox.Tagged
2397 // MalformedPath : The given path does not satisfy the required path format.
2398 // Please refer to the `Path formats documentation`
2399 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
2400 // for more information.
2401 MalformedPath string `json:"malformed_path,omitempty"`
2402 }
2403
2404 // Valid tag values for LookupError
2405 const (
2406 LookupErrorMalformedPath = "malformed_path"
2407 LookupErrorNotFound = "not_found"
2408 LookupErrorNotFile = "not_file"
2409 LookupErrorNotFolder = "not_folder"
2410 LookupErrorRestrictedContent = "restricted_content"
2411 LookupErrorUnsupportedContentType = "unsupported_content_type"
2412 LookupErrorLocked = "locked"
2413 LookupErrorOther = "other"
2414 )
2415
2416 // UnmarshalJSON deserializes into a LookupError instance
2417 func (u *LookupError) UnmarshalJSON(body []byte) error {
2418 type wrap struct {
2419 dropbox.Tagged
2420 // MalformedPath : The given path does not satisfy the required path
2421 // format. Please refer to the `Path formats documentation`
2422 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
2423 // for more information.
2424 MalformedPath string `json:"malformed_path,omitempty"`
2425 }
2426 var w wrap
2427 var err error
2428 if err = json.Unmarshal(body, &w); err != nil {
2429 return err
2430 }
2431 u.Tag = w.Tag
2432 switch u.Tag {
2433 case "malformed_path":
2434 u.MalformedPath = w.MalformedPath
2435
2436 if err != nil {
2437 return err
2438 }
2439 }
2440 return nil
2441 }
2442
2443 // MediaInfo : has no documentation (yet)
2444 type MediaInfo struct {
2445 dropbox.Tagged
2446 // Metadata : The metadata for the photo/video.
2447 Metadata IsMediaMetadata `json:"metadata,omitempty"`
2448 }
2449
2450 // Valid tag values for MediaInfo
2451 const (
2452 MediaInfoPending = "pending"
2453 MediaInfoMetadata = "metadata"
2454 )
2455
2456 // UnmarshalJSON deserializes into a MediaInfo instance
2457 func (u *MediaInfo) UnmarshalJSON(body []byte) error {
2458 type wrap struct {
2459 dropbox.Tagged
2460 // Metadata : The metadata for the photo/video.
2461 Metadata json.RawMessage `json:"metadata,omitempty"`
2462 }
2463 var w wrap
2464 var err error
2465 if err = json.Unmarshal(body, &w); err != nil {
2466 return err
2467 }
2468 u.Tag = w.Tag
2469 switch u.Tag {
2470 case "metadata":
2471 u.Metadata, err = IsMediaMetadataFromJSON(w.Metadata)
2472
2473 if err != nil {
2474 return err
2475 }
2476 }
2477 return nil
2478 }
2479
2480 // MediaMetadata : Metadata for a photo or video.
2481 type MediaMetadata struct {
2482 // Dimensions : Dimension of the photo/video.
2483 Dimensions *Dimensions `json:"dimensions,omitempty"`
2484 // Location : The GPS coordinate of the photo/video.
2485 Location *GpsCoordinates `json:"location,omitempty"`
2486 // TimeTaken : The timestamp when the photo/video is taken.
2487 TimeTaken *time.Time `json:"time_taken,omitempty"`
2488 }
2489
2490 // NewMediaMetadata returns a new MediaMetadata instance
2491 func NewMediaMetadata() *MediaMetadata {
2492 s := new(MediaMetadata)
2493 return s
2494 }
2495
2496 // IsMediaMetadata is the interface type for MediaMetadata and its subtypes
2497 type IsMediaMetadata interface {
2498 IsMediaMetadata()
2499 }
2500
2501 // IsMediaMetadata implements the IsMediaMetadata interface
2502 func (u *MediaMetadata) IsMediaMetadata() {}
2503
2504 type mediaMetadataUnion struct {
2505 dropbox.Tagged
2506 // Photo : has no documentation (yet)
2507 Photo *PhotoMetadata `json:"photo,omitempty"`
2508 // Video : has no documentation (yet)
2509 Video *VideoMetadata `json:"video,omitempty"`
2510 }
2511
2512 // Valid tag values for MediaMetadata
2513 const (
2514 MediaMetadataPhoto = "photo"
2515 MediaMetadataVideo = "video"
2516 )
2517
2518 // UnmarshalJSON deserializes into a mediaMetadataUnion instance
2519 func (u *mediaMetadataUnion) UnmarshalJSON(body []byte) error {
2520 type wrap struct {
2521 dropbox.Tagged
2522 }
2523 var w wrap
2524 var err error
2525 if err = json.Unmarshal(body, &w); err != nil {
2526 return err
2527 }
2528 u.Tag = w.Tag
2529 switch u.Tag {
2530 case "photo":
2531 err = json.Unmarshal(body, &u.Photo)
2532
2533 if err != nil {
2534 return err
2535 }
2536 case "video":
2537 err = json.Unmarshal(body, &u.Video)
2538
2539 if err != nil {
2540 return err
2541 }
2542 }
2543 return nil
2544 }
2545
2546 // IsMediaMetadataFromJSON converts JSON to a concrete IsMediaMetadata instance
2547 func IsMediaMetadataFromJSON(data []byte) (IsMediaMetadata, error) {
2548 var t mediaMetadataUnion
2549 if err := json.Unmarshal(data, &t); err != nil {
2550 return nil, err
2551 }
2552 switch t.Tag {
2553 case "photo":
2554 return t.Photo, nil
2555
2556 case "video":
2557 return t.Video, nil
2558
2559 }
2560 return nil, nil
2561 }
2562
2563 // MetadataV2 : Metadata for a file, folder or other resource types.
2564 type MetadataV2 struct {
2565 dropbox.Tagged
2566 // Metadata : has no documentation (yet)
2567 Metadata IsMetadata `json:"metadata,omitempty"`
2568 }
2569
2570 // Valid tag values for MetadataV2
2571 const (
2572 MetadataV2Metadata = "metadata"
2573 MetadataV2Other = "other"
2574 )
2575
2576 // UnmarshalJSON deserializes into a MetadataV2 instance
2577 func (u *MetadataV2) UnmarshalJSON(body []byte) error {
2578 type wrap struct {
2579 dropbox.Tagged
2580 // Metadata : has no documentation (yet)
2581 Metadata json.RawMessage `json:"metadata,omitempty"`
2582 }
2583 var w wrap
2584 var err error
2585 if err = json.Unmarshal(body, &w); err != nil {
2586 return err
2587 }
2588 u.Tag = w.Tag
2589 switch u.Tag {
2590 case "metadata":
2591 u.Metadata, err = IsMetadataFromJSON(w.Metadata)
2592
2593 if err != nil {
2594 return err
2595 }
2596 }
2597 return nil
2598 }
2599
2600 // MinimalFileLinkMetadata : has no documentation (yet)
2601 type MinimalFileLinkMetadata struct {
2602 // Url : URL of the shared link.
2603 Url string `json:"url"`
2604 // Id : Unique identifier for the linked file.
2605 Id string `json:"id,omitempty"`
2606 // Path : Full path in the user's Dropbox. This always starts with a slash.
2607 // This field will only be present only if the linked file is in the
2608 // authenticated user's Dropbox.
2609 Path string `json:"path,omitempty"`
2610 // Rev : A unique identifier for the current revision of a file. This field
2611 // is the same rev as elsewhere in the API and can be used to detect changes
2612 // and avoid conflicts.
2613 Rev string `json:"rev"`
2614 }
2615
2616 // NewMinimalFileLinkMetadata returns a new MinimalFileLinkMetadata instance
2617 func NewMinimalFileLinkMetadata(Url string, Rev string) *MinimalFileLinkMetadata {
2618 s := new(MinimalFileLinkMetadata)
2619 s.Url = Url
2620 s.Rev = Rev
2621 return s
2622 }
2623
2624 // RelocationBatchArgBase : has no documentation (yet)
2625 type RelocationBatchArgBase struct {
2626 // Entries : List of entries to be moved or copied. Each entry is
2627 // `RelocationPath`.
2628 Entries []*RelocationPath `json:"entries"`
2629 // Autorename : If there's a conflict with any file, have the Dropbox server
2630 // try to autorename that file to avoid the conflict.
2631 Autorename bool `json:"autorename"`
2632 }
2633
2634 // NewRelocationBatchArgBase returns a new RelocationBatchArgBase instance
2635 func NewRelocationBatchArgBase(Entries []*RelocationPath) *RelocationBatchArgBase {
2636 s := new(RelocationBatchArgBase)
2637 s.Entries = Entries
2638 s.Autorename = false
2639 return s
2640 }
2641
2642 // MoveBatchArg : has no documentation (yet)
2643 type MoveBatchArg struct {
2644 RelocationBatchArgBase
2645 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
2646 // an ownership transfer for the content being moved. This does not apply to
2647 // copies.
2648 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
2649 }
2650
2651 // NewMoveBatchArg returns a new MoveBatchArg instance
2652 func NewMoveBatchArg(Entries []*RelocationPath) *MoveBatchArg {
2653 s := new(MoveBatchArg)
2654 s.Entries = Entries
2655 s.Autorename = false
2656 s.AllowOwnershipTransfer = false
2657 return s
2658 }
2659
2660 // MoveIntoVaultError : has no documentation (yet)
2661 type MoveIntoVaultError struct {
2662 dropbox.Tagged
2663 }
2664
2665 // Valid tag values for MoveIntoVaultError
2666 const (
2667 MoveIntoVaultErrorIsSharedFolder = "is_shared_folder"
2668 MoveIntoVaultErrorOther = "other"
2669 )
2670
2671 // PaperContentError : has no documentation (yet)
2672 type PaperContentError struct {
2673 dropbox.Tagged
2674 }
2675
2676 // Valid tag values for PaperContentError
2677 const (
2678 PaperContentErrorInsufficientPermissions = "insufficient_permissions"
2679 PaperContentErrorContentMalformed = "content_malformed"
2680 PaperContentErrorDocLengthExceeded = "doc_length_exceeded"
2681 PaperContentErrorImageSizeExceeded = "image_size_exceeded"
2682 PaperContentErrorOther = "other"
2683 )
2684
2685 // PaperCreateArg : has no documentation (yet)
2686 type PaperCreateArg struct {
2687 // Path : The fully qualified path to the location in the user's Dropbox
2688 // where the Paper Doc should be created. This should include the document's
2689 // title and end with .paper.
2690 Path string `json:"path"`
2691 // ImportFormat : The format of the provided data.
2692 ImportFormat *ImportFormat `json:"import_format"`
2693 }
2694
2695 // NewPaperCreateArg returns a new PaperCreateArg instance
2696 func NewPaperCreateArg(Path string, ImportFormat *ImportFormat) *PaperCreateArg {
2697 s := new(PaperCreateArg)
2698 s.Path = Path
2699 s.ImportFormat = ImportFormat
2700 return s
2701 }
2702
2703 // PaperCreateError : has no documentation (yet)
2704 type PaperCreateError struct {
2705 dropbox.Tagged
2706 }
2707
2708 // Valid tag values for PaperCreateError
2709 const (
2710 PaperCreateErrorInsufficientPermissions = "insufficient_permissions"
2711 PaperCreateErrorContentMalformed = "content_malformed"
2712 PaperCreateErrorDocLengthExceeded = "doc_length_exceeded"
2713 PaperCreateErrorImageSizeExceeded = "image_size_exceeded"
2714 PaperCreateErrorOther = "other"
2715 PaperCreateErrorInvalidPath = "invalid_path"
2716 PaperCreateErrorEmailUnverified = "email_unverified"
2717 PaperCreateErrorInvalidFileExtension = "invalid_file_extension"
2718 PaperCreateErrorPaperDisabled = "paper_disabled"
2719 )
2720
2721 // PaperCreateResult : has no documentation (yet)
2722 type PaperCreateResult struct {
2723 // Url : URL to open the Paper Doc.
2724 Url string `json:"url"`
2725 // ResultPath : The fully qualified path the Paper Doc was actually created
2726 // at.
2727 ResultPath string `json:"result_path"`
2728 // FileId : The id to use in Dropbox APIs when referencing the Paper Doc.
2729 FileId string `json:"file_id"`
2730 // PaperRevision : The current doc revision.
2731 PaperRevision int64 `json:"paper_revision"`
2732 }
2733
2734 // NewPaperCreateResult returns a new PaperCreateResult instance
2735 func NewPaperCreateResult(Url string, ResultPath string, FileId string, PaperRevision int64) *PaperCreateResult {
2736 s := new(PaperCreateResult)
2737 s.Url = Url
2738 s.ResultPath = ResultPath
2739 s.FileId = FileId
2740 s.PaperRevision = PaperRevision
2741 return s
2742 }
2743
2744 // PaperDocUpdatePolicy : has no documentation (yet)
2745 type PaperDocUpdatePolicy struct {
2746 dropbox.Tagged
2747 }
2748
2749 // Valid tag values for PaperDocUpdatePolicy
2750 const (
2751 PaperDocUpdatePolicyUpdate = "update"
2752 PaperDocUpdatePolicyOverwrite = "overwrite"
2753 PaperDocUpdatePolicyPrepend = "prepend"
2754 PaperDocUpdatePolicyAppend = "append"
2755 PaperDocUpdatePolicyOther = "other"
2756 )
2757
2758 // PaperUpdateArg : has no documentation (yet)
2759 type PaperUpdateArg struct {
2760 // Path : Path in the user's Dropbox to update. The path must correspond to
2761 // a Paper doc or an error will be returned.
2762 Path string `json:"path"`
2763 // ImportFormat : The format of the provided data.
2764 ImportFormat *ImportFormat `json:"import_format"`
2765 // DocUpdatePolicy : How the provided content should be applied to the doc.
2766 DocUpdatePolicy *PaperDocUpdatePolicy `json:"doc_update_policy"`
2767 // PaperRevision : The latest doc revision. Required when doc_update_policy
2768 // is update. This value must match the current revision of the doc or error
2769 // revision_mismatch will be returned.
2770 PaperRevision int64 `json:"paper_revision,omitempty"`
2771 }
2772
2773 // NewPaperUpdateArg returns a new PaperUpdateArg instance
2774 func NewPaperUpdateArg(Path string, ImportFormat *ImportFormat, DocUpdatePolicy *PaperDocUpdatePolicy) *PaperUpdateArg {
2775 s := new(PaperUpdateArg)
2776 s.Path = Path
2777 s.ImportFormat = ImportFormat
2778 s.DocUpdatePolicy = DocUpdatePolicy
2779 return s
2780 }
2781
2782 // PaperUpdateError : has no documentation (yet)
2783 type PaperUpdateError struct {
2784 dropbox.Tagged
2785 // Path : has no documentation (yet)
2786 Path *LookupError `json:"path,omitempty"`
2787 }
2788
2789 // Valid tag values for PaperUpdateError
2790 const (
2791 PaperUpdateErrorInsufficientPermissions = "insufficient_permissions"
2792 PaperUpdateErrorContentMalformed = "content_malformed"
2793 PaperUpdateErrorDocLengthExceeded = "doc_length_exceeded"
2794 PaperUpdateErrorImageSizeExceeded = "image_size_exceeded"
2795 PaperUpdateErrorOther = "other"
2796 PaperUpdateErrorPath = "path"
2797 PaperUpdateErrorRevisionMismatch = "revision_mismatch"
2798 PaperUpdateErrorDocArchived = "doc_archived"
2799 PaperUpdateErrorDocDeleted = "doc_deleted"
2800 )
2801
2802 // UnmarshalJSON deserializes into a PaperUpdateError instance
2803 func (u *PaperUpdateError) UnmarshalJSON(body []byte) error {
2804 type wrap struct {
2805 dropbox.Tagged
2806 // Path : has no documentation (yet)
2807 Path *LookupError `json:"path,omitempty"`
2808 }
2809 var w wrap
2810 var err error
2811 if err = json.Unmarshal(body, &w); err != nil {
2812 return err
2813 }
2814 u.Tag = w.Tag
2815 switch u.Tag {
2816 case "path":
2817 u.Path = w.Path
2818
2819 if err != nil {
2820 return err
2821 }
2822 }
2823 return nil
2824 }
2825
2826 // PaperUpdateResult : has no documentation (yet)
2827 type PaperUpdateResult struct {
2828 // PaperRevision : The current doc revision.
2829 PaperRevision int64 `json:"paper_revision"`
2830 }
2831
2832 // NewPaperUpdateResult returns a new PaperUpdateResult instance
2833 func NewPaperUpdateResult(PaperRevision int64) *PaperUpdateResult {
2834 s := new(PaperUpdateResult)
2835 s.PaperRevision = PaperRevision
2836 return s
2837 }
2838
2839 // PathOrLink : has no documentation (yet)
2840 type PathOrLink struct {
2841 dropbox.Tagged
2842 // Path : has no documentation (yet)
2843 Path string `json:"path,omitempty"`
2844 // Link : has no documentation (yet)
2845 Link *SharedLinkFileInfo `json:"link,omitempty"`
2846 }
2847
2848 // Valid tag values for PathOrLink
2849 const (
2850 PathOrLinkPath = "path"
2851 PathOrLinkLink = "link"
2852 PathOrLinkOther = "other"
2853 )
2854
2855 // UnmarshalJSON deserializes into a PathOrLink instance
2856 func (u *PathOrLink) UnmarshalJSON(body []byte) error {
2857 type wrap struct {
2858 dropbox.Tagged
2859 // Path : has no documentation (yet)
2860 Path string `json:"path,omitempty"`
2861 }
2862 var w wrap
2863 var err error
2864 if err = json.Unmarshal(body, &w); err != nil {
2865 return err
2866 }
2867 u.Tag = w.Tag
2868 switch u.Tag {
2869 case "path":
2870 u.Path = w.Path
2871
2872 if err != nil {
2873 return err
2874 }
2875 case "link":
2876 err = json.Unmarshal(body, &u.Link)
2877
2878 if err != nil {
2879 return err
2880 }
2881 }
2882 return nil
2883 }
2884
2885 // PhotoMetadata : Metadata for a photo.
2886 type PhotoMetadata struct {
2887 MediaMetadata
2888 }
2889
2890 // NewPhotoMetadata returns a new PhotoMetadata instance
2891 func NewPhotoMetadata() *PhotoMetadata {
2892 s := new(PhotoMetadata)
2893 return s
2894 }
2895
2896 // PreviewArg : has no documentation (yet)
2897 type PreviewArg struct {
2898 // Path : The path of the file to preview.
2899 Path string `json:"path"`
2900 // Rev : Please specify revision in `path` instead.
2901 Rev string `json:"rev,omitempty"`
2902 }
2903
2904 // NewPreviewArg returns a new PreviewArg instance
2905 func NewPreviewArg(Path string) *PreviewArg {
2906 s := new(PreviewArg)
2907 s.Path = Path
2908 return s
2909 }
2910
2911 // PreviewError : has no documentation (yet)
2912 type PreviewError struct {
2913 dropbox.Tagged
2914 // Path : An error occurs when downloading metadata for the file.
2915 Path *LookupError `json:"path,omitempty"`
2916 }
2917
2918 // Valid tag values for PreviewError
2919 const (
2920 PreviewErrorPath = "path"
2921 PreviewErrorInProgress = "in_progress"
2922 PreviewErrorUnsupportedExtension = "unsupported_extension"
2923 PreviewErrorUnsupportedContent = "unsupported_content"
2924 )
2925
2926 // UnmarshalJSON deserializes into a PreviewError instance
2927 func (u *PreviewError) UnmarshalJSON(body []byte) error {
2928 type wrap struct {
2929 dropbox.Tagged
2930 // Path : An error occurs when downloading metadata for the file.
2931 Path *LookupError `json:"path,omitempty"`
2932 }
2933 var w wrap
2934 var err error
2935 if err = json.Unmarshal(body, &w); err != nil {
2936 return err
2937 }
2938 u.Tag = w.Tag
2939 switch u.Tag {
2940 case "path":
2941 u.Path = w.Path
2942
2943 if err != nil {
2944 return err
2945 }
2946 }
2947 return nil
2948 }
2949
2950 // PreviewResult : has no documentation (yet)
2951 type PreviewResult struct {
2952 // FileMetadata : Metadata corresponding to the file received as an
2953 // argument. Will be populated if the endpoint is called with a path
2954 // (ReadPath).
2955 FileMetadata *FileMetadata `json:"file_metadata,omitempty"`
2956 // LinkMetadata : Minimal metadata corresponding to the file received as an
2957 // argument. Will be populated if the endpoint is called using a shared link
2958 // (SharedLinkFileInfo).
2959 LinkMetadata *MinimalFileLinkMetadata `json:"link_metadata,omitempty"`
2960 }
2961
2962 // NewPreviewResult returns a new PreviewResult instance
2963 func NewPreviewResult() *PreviewResult {
2964 s := new(PreviewResult)
2965 return s
2966 }
2967
2968 // RelocationPath : has no documentation (yet)
2969 type RelocationPath struct {
2970 // FromPath : Path in the user's Dropbox to be copied or moved.
2971 FromPath string `json:"from_path"`
2972 // ToPath : Path in the user's Dropbox that is the destination.
2973 ToPath string `json:"to_path"`
2974 }
2975
2976 // NewRelocationPath returns a new RelocationPath instance
2977 func NewRelocationPath(FromPath string, ToPath string) *RelocationPath {
2978 s := new(RelocationPath)
2979 s.FromPath = FromPath
2980 s.ToPath = ToPath
2981 return s
2982 }
2983
2984 // RelocationArg : has no documentation (yet)
2985 type RelocationArg struct {
2986 RelocationPath
2987 // AllowSharedFolder : This flag has no effect.
2988 AllowSharedFolder bool `json:"allow_shared_folder"`
2989 // Autorename : If there's a conflict, have the Dropbox server try to
2990 // autorename the file to avoid the conflict.
2991 Autorename bool `json:"autorename"`
2992 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
2993 // an ownership transfer for the content being moved. This does not apply to
2994 // copies.
2995 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
2996 }
2997
2998 // NewRelocationArg returns a new RelocationArg instance
2999 func NewRelocationArg(FromPath string, ToPath string) *RelocationArg {
3000 s := new(RelocationArg)
3001 s.FromPath = FromPath
3002 s.ToPath = ToPath
3003 s.AllowSharedFolder = false
3004 s.Autorename = false
3005 s.AllowOwnershipTransfer = false
3006 return s
3007 }
3008
3009 // RelocationBatchArg : has no documentation (yet)
3010 type RelocationBatchArg struct {
3011 RelocationBatchArgBase
3012 // AllowSharedFolder : This flag has no effect.
3013 AllowSharedFolder bool `json:"allow_shared_folder"`
3014 // AllowOwnershipTransfer : Allow moves by owner even if it would result in
3015 // an ownership transfer for the content being moved. This does not apply to
3016 // copies.
3017 AllowOwnershipTransfer bool `json:"allow_ownership_transfer"`
3018 }
3019
3020 // NewRelocationBatchArg returns a new RelocationBatchArg instance
3021 func NewRelocationBatchArg(Entries []*RelocationPath) *RelocationBatchArg {
3022 s := new(RelocationBatchArg)
3023 s.Entries = Entries
3024 s.Autorename = false
3025 s.AllowSharedFolder = false
3026 s.AllowOwnershipTransfer = false
3027 return s
3028 }
3029
3030 // RelocationError : has no documentation (yet)
3031 type RelocationError struct {
3032 dropbox.Tagged
3033 // FromLookup : has no documentation (yet)
3034 FromLookup *LookupError `json:"from_lookup,omitempty"`
3035 // FromWrite : has no documentation (yet)
3036 FromWrite *WriteError `json:"from_write,omitempty"`
3037 // To : has no documentation (yet)
3038 To *WriteError `json:"to,omitempty"`
3039 // CantMoveIntoVault : Some content cannot be moved into Vault under certain
3040 // circumstances, see detailed error.
3041 CantMoveIntoVault *MoveIntoVaultError `json:"cant_move_into_vault,omitempty"`
3042 }
3043
3044 // Valid tag values for RelocationError
3045 const (
3046 RelocationErrorFromLookup = "from_lookup"
3047 RelocationErrorFromWrite = "from_write"
3048 RelocationErrorTo = "to"
3049 RelocationErrorCantCopySharedFolder = "cant_copy_shared_folder"
3050 RelocationErrorCantNestSharedFolder = "cant_nest_shared_folder"
3051 RelocationErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
3052 RelocationErrorTooManyFiles = "too_many_files"
3053 RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
3054 RelocationErrorCantTransferOwnership = "cant_transfer_ownership"
3055 RelocationErrorInsufficientQuota = "insufficient_quota"
3056 RelocationErrorInternalError = "internal_error"
3057 RelocationErrorCantMoveSharedFolder = "cant_move_shared_folder"
3058 RelocationErrorCantMoveIntoVault = "cant_move_into_vault"
3059 RelocationErrorOther = "other"
3060 )
3061
3062 // UnmarshalJSON deserializes into a RelocationError instance
3063 func (u *RelocationError) UnmarshalJSON(body []byte) error {
3064 type wrap struct {
3065 dropbox.Tagged
3066 // FromLookup : has no documentation (yet)
3067 FromLookup *LookupError `json:"from_lookup,omitempty"`
3068 // FromWrite : has no documentation (yet)
3069 FromWrite *WriteError `json:"from_write,omitempty"`
3070 // To : has no documentation (yet)
3071 To *WriteError `json:"to,omitempty"`
3072 // CantMoveIntoVault : Some content cannot be moved into Vault under
3073 // certain circumstances, see detailed error.
3074 CantMoveIntoVault *MoveIntoVaultError `json:"cant_move_into_vault,omitempty"`
3075 }
3076 var w wrap
3077 var err error
3078 if err = json.Unmarshal(body, &w); err != nil {
3079 return err
3080 }
3081 u.Tag = w.Tag
3082 switch u.Tag {
3083 case "from_lookup":
3084 u.FromLookup = w.FromLookup
3085
3086 if err != nil {
3087 return err
3088 }
3089 case "from_write":
3090 u.FromWrite = w.FromWrite
3091
3092 if err != nil {
3093 return err
3094 }
3095 case "to":
3096 u.To = w.To
3097
3098 if err != nil {
3099 return err
3100 }
3101 case "cant_move_into_vault":
3102 u.CantMoveIntoVault = w.CantMoveIntoVault
3103
3104 if err != nil {
3105 return err
3106 }
3107 }
3108 return nil
3109 }
3110
3111 // RelocationBatchError : has no documentation (yet)
3112 type RelocationBatchError struct {
3113 dropbox.Tagged
3114 // FromLookup : has no documentation (yet)
3115 FromLookup *LookupError `json:"from_lookup,omitempty"`
3116 // FromWrite : has no documentation (yet)
3117 FromWrite *WriteError `json:"from_write,omitempty"`
3118 // To : has no documentation (yet)
3119 To *WriteError `json:"to,omitempty"`
3120 // CantMoveIntoVault : Some content cannot be moved into Vault under certain
3121 // circumstances, see detailed error.
3122 CantMoveIntoVault *MoveIntoVaultError `json:"cant_move_into_vault,omitempty"`
3123 }
3124
3125 // Valid tag values for RelocationBatchError
3126 const (
3127 RelocationBatchErrorFromLookup = "from_lookup"
3128 RelocationBatchErrorFromWrite = "from_write"
3129 RelocationBatchErrorTo = "to"
3130 RelocationBatchErrorCantCopySharedFolder = "cant_copy_shared_folder"
3131 RelocationBatchErrorCantNestSharedFolder = "cant_nest_shared_folder"
3132 RelocationBatchErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself"
3133 RelocationBatchErrorTooManyFiles = "too_many_files"
3134 RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths"
3135 RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership"
3136 RelocationBatchErrorInsufficientQuota = "insufficient_quota"
3137 RelocationBatchErrorInternalError = "internal_error"
3138 RelocationBatchErrorCantMoveSharedFolder = "cant_move_shared_folder"
3139 RelocationBatchErrorCantMoveIntoVault = "cant_move_into_vault"
3140 RelocationBatchErrorOther = "other"
3141 RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations"
3142 )
3143
3144 // UnmarshalJSON deserializes into a RelocationBatchError instance
3145 func (u *RelocationBatchError) UnmarshalJSON(body []byte) error {
3146 type wrap struct {
3147 dropbox.Tagged
3148 // FromLookup : has no documentation (yet)
3149 FromLookup *LookupError `json:"from_lookup,omitempty"`
3150 // FromWrite : has no documentation (yet)
3151 FromWrite *WriteError `json:"from_write,omitempty"`
3152 // To : has no documentation (yet)
3153 To *WriteError `json:"to,omitempty"`
3154 // CantMoveIntoVault : Some content cannot be moved into Vault under
3155 // certain circumstances, see detailed error.
3156 CantMoveIntoVault *MoveIntoVaultError `json:"cant_move_into_vault,omitempty"`
3157 }
3158 var w wrap
3159 var err error
3160 if err = json.Unmarshal(body, &w); err != nil {
3161 return err
3162 }
3163 u.Tag = w.Tag
3164 switch u.Tag {
3165 case "from_lookup":
3166 u.FromLookup = w.FromLookup
3167
3168 if err != nil {
3169 return err
3170 }
3171 case "from_write":
3172 u.FromWrite = w.FromWrite
3173
3174 if err != nil {
3175 return err
3176 }
3177 case "to":
3178 u.To = w.To
3179
3180 if err != nil {
3181 return err
3182 }
3183 case "cant_move_into_vault":
3184 u.CantMoveIntoVault = w.CantMoveIntoVault
3185
3186 if err != nil {
3187 return err
3188 }
3189 }
3190 return nil
3191 }
3192
3193 // RelocationBatchErrorEntry : has no documentation (yet)
3194 type RelocationBatchErrorEntry struct {
3195 dropbox.Tagged
3196 // RelocationError : User errors that retry won't help.
3197 RelocationError *RelocationError `json:"relocation_error,omitempty"`
3198 }
3199
3200 // Valid tag values for RelocationBatchErrorEntry
3201 const (
3202 RelocationBatchErrorEntryRelocationError = "relocation_error"
3203 RelocationBatchErrorEntryInternalError = "internal_error"
3204 RelocationBatchErrorEntryTooManyWriteOperations = "too_many_write_operations"
3205 RelocationBatchErrorEntryOther = "other"
3206 )
3207
3208 // UnmarshalJSON deserializes into a RelocationBatchErrorEntry instance
3209 func (u *RelocationBatchErrorEntry) UnmarshalJSON(body []byte) error {
3210 type wrap struct {
3211 dropbox.Tagged
3212 // RelocationError : User errors that retry won't help.
3213 RelocationError *RelocationError `json:"relocation_error,omitempty"`
3214 }
3215 var w wrap
3216 var err error
3217 if err = json.Unmarshal(body, &w); err != nil {
3218 return err
3219 }
3220 u.Tag = w.Tag
3221 switch u.Tag {
3222 case "relocation_error":
3223 u.RelocationError = w.RelocationError
3224
3225 if err != nil {
3226 return err
3227 }
3228 }
3229 return nil
3230 }
3231
3232 // RelocationBatchJobStatus : has no documentation (yet)
3233 type RelocationBatchJobStatus struct {
3234 dropbox.Tagged
3235 // Complete : The copy or move batch job has finished.
3236 Complete *RelocationBatchResult `json:"complete,omitempty"`
3237 // Failed : The copy or move batch job has failed with exception.
3238 Failed *RelocationBatchError `json:"failed,omitempty"`
3239 }
3240
3241 // Valid tag values for RelocationBatchJobStatus
3242 const (
3243 RelocationBatchJobStatusInProgress = "in_progress"
3244 RelocationBatchJobStatusComplete = "complete"
3245 RelocationBatchJobStatusFailed = "failed"
3246 )
3247
3248 // UnmarshalJSON deserializes into a RelocationBatchJobStatus instance
3249 func (u *RelocationBatchJobStatus) UnmarshalJSON(body []byte) error {
3250 type wrap struct {
3251 dropbox.Tagged
3252 // Failed : The copy or move batch job has failed with exception.
3253 Failed *RelocationBatchError `json:"failed,omitempty"`
3254 }
3255 var w wrap
3256 var err error
3257 if err = json.Unmarshal(body, &w); err != nil {
3258 return err
3259 }
3260 u.Tag = w.Tag
3261 switch u.Tag {
3262 case "complete":
3263 err = json.Unmarshal(body, &u.Complete)
3264
3265 if err != nil {
3266 return err
3267 }
3268 case "failed":
3269 u.Failed = w.Failed
3270
3271 if err != nil {
3272 return err
3273 }
3274 }
3275 return nil
3276 }
3277
3278 // RelocationBatchLaunch : Result returned by `copyBatch` or `moveBatch` that
3279 // may either launch an asynchronous job or complete synchronously.
3280 type RelocationBatchLaunch struct {
3281 dropbox.Tagged
3282 // AsyncJobId : This response indicates that the processing is asynchronous.
3283 // The string is an id that can be used to obtain the status of the
3284 // asynchronous job.
3285 AsyncJobId string `json:"async_job_id,omitempty"`
3286 // Complete : has no documentation (yet)
3287 Complete *RelocationBatchResult `json:"complete,omitempty"`
3288 }
3289
3290 // Valid tag values for RelocationBatchLaunch
3291 const (
3292 RelocationBatchLaunchAsyncJobId = "async_job_id"
3293 RelocationBatchLaunchComplete = "complete"
3294 RelocationBatchLaunchOther = "other"
3295 )
3296
3297 // UnmarshalJSON deserializes into a RelocationBatchLaunch instance
3298 func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error {
3299 type wrap struct {
3300 dropbox.Tagged
3301 // AsyncJobId : This response indicates that the processing is
3302 // asynchronous. The string is an id that can be used to obtain the
3303 // status of the asynchronous job.
3304 AsyncJobId string `json:"async_job_id,omitempty"`
3305 }
3306 var w wrap
3307 var err error
3308 if err = json.Unmarshal(body, &w); err != nil {
3309 return err
3310 }
3311 u.Tag = w.Tag
3312 switch u.Tag {
3313 case "async_job_id":
3314 u.AsyncJobId = w.AsyncJobId
3315
3316 if err != nil {
3317 return err
3318 }
3319 case "complete":
3320 err = json.Unmarshal(body, &u.Complete)
3321
3322 if err != nil {
3323 return err
3324 }
3325 }
3326 return nil
3327 }
3328
3329 // RelocationBatchResult : has no documentation (yet)
3330 type RelocationBatchResult struct {
3331 FileOpsResult
3332 // Entries : has no documentation (yet)
3333 Entries []*RelocationBatchResultData `json:"entries"`
3334 }
3335
3336 // NewRelocationBatchResult returns a new RelocationBatchResult instance
3337 func NewRelocationBatchResult(Entries []*RelocationBatchResultData) *RelocationBatchResult {
3338 s := new(RelocationBatchResult)
3339 s.Entries = Entries
3340 return s
3341 }
3342
3343 // RelocationBatchResultData : has no documentation (yet)
3344 type RelocationBatchResultData struct {
3345 // Metadata : Metadata of the relocated object.
3346 Metadata IsMetadata `json:"metadata"`
3347 }
3348
3349 // NewRelocationBatchResultData returns a new RelocationBatchResultData instance
3350 func NewRelocationBatchResultData(Metadata IsMetadata) *RelocationBatchResultData {
3351 s := new(RelocationBatchResultData)
3352 s.Metadata = Metadata
3353 return s
3354 }
3355
3356 // UnmarshalJSON deserializes into a RelocationBatchResultData instance
3357 func (u *RelocationBatchResultData) UnmarshalJSON(b []byte) error {
3358 type wrap struct {
3359 // Metadata : Metadata of the relocated object.
3360 Metadata json.RawMessage `json:"metadata"`
3361 }
3362 var w wrap
3363 if err := json.Unmarshal(b, &w); err != nil {
3364 return err
3365 }
3366 Metadata, err := IsMetadataFromJSON(w.Metadata)
3367 if err != nil {
3368 return err
3369 }
3370 u.Metadata = Metadata
3371 return nil
3372 }
3373
3374 // RelocationBatchResultEntry : has no documentation (yet)
3375 type RelocationBatchResultEntry struct {
3376 dropbox.Tagged
3377 // Success : has no documentation (yet)
3378 Success IsMetadata `json:"success,omitempty"`
3379 // Failure : has no documentation (yet)
3380 Failure *RelocationBatchErrorEntry `json:"failure,omitempty"`
3381 }
3382
3383 // Valid tag values for RelocationBatchResultEntry
3384 const (
3385 RelocationBatchResultEntrySuccess = "success"
3386 RelocationBatchResultEntryFailure = "failure"
3387 RelocationBatchResultEntryOther = "other"
3388 )
3389
3390 // UnmarshalJSON deserializes into a RelocationBatchResultEntry instance
3391 func (u *RelocationBatchResultEntry) UnmarshalJSON(body []byte) error {
3392 type wrap struct {
3393 dropbox.Tagged
3394 // Success : has no documentation (yet)
3395 Success json.RawMessage `json:"success,omitempty"`
3396 // Failure : has no documentation (yet)
3397 Failure *RelocationBatchErrorEntry `json:"failure,omitempty"`
3398 }
3399 var w wrap
3400 var err error
3401 if err = json.Unmarshal(body, &w); err != nil {
3402 return err
3403 }
3404 u.Tag = w.Tag
3405 switch u.Tag {
3406 case "success":
3407 u.Success, err = IsMetadataFromJSON(w.Success)
3408
3409 if err != nil {
3410 return err
3411 }
3412 case "failure":
3413 u.Failure = w.Failure
3414
3415 if err != nil {
3416 return err
3417 }
3418 }
3419 return nil
3420 }
3421
3422 // RelocationBatchV2JobStatus : Result returned by `copyBatchCheck` or
3423 // `moveBatchCheck` that may either be in progress or completed with result for
3424 // each entry.
3425 type RelocationBatchV2JobStatus struct {
3426 dropbox.Tagged
3427 // Complete : The copy or move batch job has finished.
3428 Complete *RelocationBatchV2Result `json:"complete,omitempty"`
3429 }
3430
3431 // Valid tag values for RelocationBatchV2JobStatus
3432 const (
3433 RelocationBatchV2JobStatusInProgress = "in_progress"
3434 RelocationBatchV2JobStatusComplete = "complete"
3435 )
3436
3437 // UnmarshalJSON deserializes into a RelocationBatchV2JobStatus instance
3438 func (u *RelocationBatchV2JobStatus) UnmarshalJSON(body []byte) error {
3439 type wrap struct {
3440 dropbox.Tagged
3441 }
3442 var w wrap
3443 var err error
3444 if err = json.Unmarshal(body, &w); err != nil {
3445 return err
3446 }
3447 u.Tag = w.Tag
3448 switch u.Tag {
3449 case "complete":
3450 err = json.Unmarshal(body, &u.Complete)
3451
3452 if err != nil {
3453 return err
3454 }
3455 }
3456 return nil
3457 }
3458
3459 // RelocationBatchV2Launch : Result returned by `copyBatch` or `moveBatch` that
3460 // may either launch an asynchronous job or complete synchronously.
3461 type RelocationBatchV2Launch struct {
3462 dropbox.Tagged
3463 // AsyncJobId : This response indicates that the processing is asynchronous.
3464 // The string is an id that can be used to obtain the status of the
3465 // asynchronous job.
3466 AsyncJobId string `json:"async_job_id,omitempty"`
3467 // Complete : has no documentation (yet)
3468 Complete *RelocationBatchV2Result `json:"complete,omitempty"`
3469 }
3470
3471 // Valid tag values for RelocationBatchV2Launch
3472 const (
3473 RelocationBatchV2LaunchAsyncJobId = "async_job_id"
3474 RelocationBatchV2LaunchComplete = "complete"
3475 )
3476
3477 // UnmarshalJSON deserializes into a RelocationBatchV2Launch instance
3478 func (u *RelocationBatchV2Launch) UnmarshalJSON(body []byte) error {
3479 type wrap struct {
3480 dropbox.Tagged
3481 // AsyncJobId : This response indicates that the processing is
3482 // asynchronous. The string is an id that can be used to obtain the
3483 // status of the asynchronous job.
3484 AsyncJobId string `json:"async_job_id,omitempty"`
3485 }
3486 var w wrap
3487 var err error
3488 if err = json.Unmarshal(body, &w); err != nil {
3489 return err
3490 }
3491 u.Tag = w.Tag
3492 switch u.Tag {
3493 case "async_job_id":
3494 u.AsyncJobId = w.AsyncJobId
3495
3496 if err != nil {
3497 return err
3498 }
3499 case "complete":
3500 err = json.Unmarshal(body, &u.Complete)
3501
3502 if err != nil {
3503 return err
3504 }
3505 }
3506 return nil
3507 }
3508
3509 // RelocationBatchV2Result : has no documentation (yet)
3510 type RelocationBatchV2Result struct {
3511 FileOpsResult
3512 // Entries : Each entry in CopyBatchArg.entries or `MoveBatchArg.entries`
3513 // will appear at the same position inside
3514 // `RelocationBatchV2Result.entries`.
3515 Entries []*RelocationBatchResultEntry `json:"entries"`
3516 }
3517
3518 // NewRelocationBatchV2Result returns a new RelocationBatchV2Result instance
3519 func NewRelocationBatchV2Result(Entries []*RelocationBatchResultEntry) *RelocationBatchV2Result {
3520 s := new(RelocationBatchV2Result)
3521 s.Entries = Entries
3522 return s
3523 }
3524
3525 // RelocationResult : has no documentation (yet)
3526 type RelocationResult struct {
3527 FileOpsResult
3528 // Metadata : Metadata of the relocated object.
3529 Metadata IsMetadata `json:"metadata"`
3530 }
3531
3532 // NewRelocationResult returns a new RelocationResult instance
3533 func NewRelocationResult(Metadata IsMetadata) *RelocationResult {
3534 s := new(RelocationResult)
3535 s.Metadata = Metadata
3536 return s
3537 }
3538
3539 // UnmarshalJSON deserializes into a RelocationResult instance
3540 func (u *RelocationResult) UnmarshalJSON(b []byte) error {
3541 type wrap struct {
3542 // Metadata : Metadata of the relocated object.
3543 Metadata json.RawMessage `json:"metadata"`
3544 }
3545 var w wrap
3546 if err := json.Unmarshal(b, &w); err != nil {
3547 return err
3548 }
3549 Metadata, err := IsMetadataFromJSON(w.Metadata)
3550 if err != nil {
3551 return err
3552 }
3553 u.Metadata = Metadata
3554 return nil
3555 }
3556
3557 // RestoreArg : has no documentation (yet)
3558 type RestoreArg struct {
3559 // Path : The path to save the restored file.
3560 Path string `json:"path"`
3561 // Rev : The revision to restore.
3562 Rev string `json:"rev"`
3563 }
3564
3565 // NewRestoreArg returns a new RestoreArg instance
3566 func NewRestoreArg(Path string, Rev string) *RestoreArg {
3567 s := new(RestoreArg)
3568 s.Path = Path
3569 s.Rev = Rev
3570 return s
3571 }
3572
3573 // RestoreError : has no documentation (yet)
3574 type RestoreError struct {
3575 dropbox.Tagged
3576 // PathLookup : An error occurs when downloading metadata for the file.
3577 PathLookup *LookupError `json:"path_lookup,omitempty"`
3578 // PathWrite : An error occurs when trying to restore the file to that path.
3579 PathWrite *WriteError `json:"path_write,omitempty"`
3580 }
3581
3582 // Valid tag values for RestoreError
3583 const (
3584 RestoreErrorPathLookup = "path_lookup"
3585 RestoreErrorPathWrite = "path_write"
3586 RestoreErrorInvalidRevision = "invalid_revision"
3587 RestoreErrorInProgress = "in_progress"
3588 RestoreErrorOther = "other"
3589 )
3590
3591 // UnmarshalJSON deserializes into a RestoreError instance
3592 func (u *RestoreError) UnmarshalJSON(body []byte) error {
3593 type wrap struct {
3594 dropbox.Tagged
3595 // PathLookup : An error occurs when downloading metadata for the file.
3596 PathLookup *LookupError `json:"path_lookup,omitempty"`
3597 // PathWrite : An error occurs when trying to restore the file to that
3598 // path.
3599 PathWrite *WriteError `json:"path_write,omitempty"`
3600 }
3601 var w wrap
3602 var err error
3603 if err = json.Unmarshal(body, &w); err != nil {
3604 return err
3605 }
3606 u.Tag = w.Tag
3607 switch u.Tag {
3608 case "path_lookup":
3609 u.PathLookup = w.PathLookup
3610
3611 if err != nil {
3612 return err
3613 }
3614 case "path_write":
3615 u.PathWrite = w.PathWrite
3616
3617 if err != nil {
3618 return err
3619 }
3620 }
3621 return nil
3622 }
3623
3624 // SaveCopyReferenceArg : has no documentation (yet)
3625 type SaveCopyReferenceArg struct {
3626 // CopyReference : A copy reference returned by `copyReferenceGet`.
3627 CopyReference string `json:"copy_reference"`
3628 // Path : Path in the user's Dropbox that is the destination.
3629 Path string `json:"path"`
3630 }
3631
3632 // NewSaveCopyReferenceArg returns a new SaveCopyReferenceArg instance
3633 func NewSaveCopyReferenceArg(CopyReference string, Path string) *SaveCopyReferenceArg {
3634 s := new(SaveCopyReferenceArg)
3635 s.CopyReference = CopyReference
3636 s.Path = Path
3637 return s
3638 }
3639
3640 // SaveCopyReferenceError : has no documentation (yet)
3641 type SaveCopyReferenceError struct {
3642 dropbox.Tagged
3643 // Path : has no documentation (yet)
3644 Path *WriteError `json:"path,omitempty"`
3645 }
3646
3647 // Valid tag values for SaveCopyReferenceError
3648 const (
3649 SaveCopyReferenceErrorPath = "path"
3650 SaveCopyReferenceErrorInvalidCopyReference = "invalid_copy_reference"
3651 SaveCopyReferenceErrorNoPermission = "no_permission"
3652 SaveCopyReferenceErrorNotFound = "not_found"
3653 SaveCopyReferenceErrorTooManyFiles = "too_many_files"
3654 SaveCopyReferenceErrorOther = "other"
3655 )
3656
3657 // UnmarshalJSON deserializes into a SaveCopyReferenceError instance
3658 func (u *SaveCopyReferenceError) UnmarshalJSON(body []byte) error {
3659 type wrap struct {
3660 dropbox.Tagged
3661 // Path : has no documentation (yet)
3662 Path *WriteError `json:"path,omitempty"`
3663 }
3664 var w wrap
3665 var err error
3666 if err = json.Unmarshal(body, &w); err != nil {
3667 return err
3668 }
3669 u.Tag = w.Tag
3670 switch u.Tag {
3671 case "path":
3672 u.Path = w.Path
3673
3674 if err != nil {
3675 return err
3676 }
3677 }
3678 return nil
3679 }
3680
3681 // SaveCopyReferenceResult : has no documentation (yet)
3682 type SaveCopyReferenceResult struct {
3683 // Metadata : The metadata of the saved file or folder in the user's
3684 // Dropbox.
3685 Metadata IsMetadata `json:"metadata"`
3686 }
3687
3688 // NewSaveCopyReferenceResult returns a new SaveCopyReferenceResult instance
3689 func NewSaveCopyReferenceResult(Metadata IsMetadata) *SaveCopyReferenceResult {
3690 s := new(SaveCopyReferenceResult)
3691 s.Metadata = Metadata
3692 return s
3693 }
3694
3695 // UnmarshalJSON deserializes into a SaveCopyReferenceResult instance
3696 func (u *SaveCopyReferenceResult) UnmarshalJSON(b []byte) error {
3697 type wrap struct {
3698 // Metadata : The metadata of the saved file or folder in the user's
3699 // Dropbox.
3700 Metadata json.RawMessage `json:"metadata"`
3701 }
3702 var w wrap
3703 if err := json.Unmarshal(b, &w); err != nil {
3704 return err
3705 }
3706 Metadata, err := IsMetadataFromJSON(w.Metadata)
3707 if err != nil {
3708 return err
3709 }
3710 u.Metadata = Metadata
3711 return nil
3712 }
3713
3714 // SaveUrlArg : has no documentation (yet)
3715 type SaveUrlArg struct {
3716 // Path : The path in Dropbox where the URL will be saved to.
3717 Path string `json:"path"`
3718 // Url : The URL to be saved.
3719 Url string `json:"url"`
3720 }
3721
3722 // NewSaveUrlArg returns a new SaveUrlArg instance
3723 func NewSaveUrlArg(Path string, Url string) *SaveUrlArg {
3724 s := new(SaveUrlArg)
3725 s.Path = Path
3726 s.Url = Url
3727 return s
3728 }
3729
3730 // SaveUrlError : has no documentation (yet)
3731 type SaveUrlError struct {
3732 dropbox.Tagged
3733 // Path : has no documentation (yet)
3734 Path *WriteError `json:"path,omitempty"`
3735 }
3736
3737 // Valid tag values for SaveUrlError
3738 const (
3739 SaveUrlErrorPath = "path"
3740 SaveUrlErrorDownloadFailed = "download_failed"
3741 SaveUrlErrorInvalidUrl = "invalid_url"
3742 SaveUrlErrorNotFound = "not_found"
3743 SaveUrlErrorOther = "other"
3744 )
3745
3746 // UnmarshalJSON deserializes into a SaveUrlError instance
3747 func (u *SaveUrlError) UnmarshalJSON(body []byte) error {
3748 type wrap struct {
3749 dropbox.Tagged
3750 // Path : has no documentation (yet)
3751 Path *WriteError `json:"path,omitempty"`
3752 }
3753 var w wrap
3754 var err error
3755 if err = json.Unmarshal(body, &w); err != nil {
3756 return err
3757 }
3758 u.Tag = w.Tag
3759 switch u.Tag {
3760 case "path":
3761 u.Path = w.Path
3762
3763 if err != nil {
3764 return err
3765 }
3766 }
3767 return nil
3768 }
3769
3770 // SaveUrlJobStatus : has no documentation (yet)
3771 type SaveUrlJobStatus struct {
3772 dropbox.Tagged
3773 // Complete : Metadata of the file where the URL is saved to.
3774 Complete *FileMetadata `json:"complete,omitempty"`
3775 // Failed : has no documentation (yet)
3776 Failed *SaveUrlError `json:"failed,omitempty"`
3777 }
3778
3779 // Valid tag values for SaveUrlJobStatus
3780 const (
3781 SaveUrlJobStatusInProgress = "in_progress"
3782 SaveUrlJobStatusComplete = "complete"
3783 SaveUrlJobStatusFailed = "failed"
3784 )
3785
3786 // UnmarshalJSON deserializes into a SaveUrlJobStatus instance
3787 func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error {
3788 type wrap struct {
3789 dropbox.Tagged
3790 // Failed : has no documentation (yet)
3791 Failed *SaveUrlError `json:"failed,omitempty"`
3792 }
3793 var w wrap
3794 var err error
3795 if err = json.Unmarshal(body, &w); err != nil {
3796 return err
3797 }
3798 u.Tag = w.Tag
3799 switch u.Tag {
3800 case "complete":
3801 err = json.Unmarshal(body, &u.Complete)
3802
3803 if err != nil {
3804 return err
3805 }
3806 case "failed":
3807 u.Failed = w.Failed
3808
3809 if err != nil {
3810 return err
3811 }
3812 }
3813 return nil
3814 }
3815
3816 // SaveUrlResult : has no documentation (yet)
3817 type SaveUrlResult struct {
3818 dropbox.Tagged
3819 // AsyncJobId : This response indicates that the processing is asynchronous.
3820 // The string is an id that can be used to obtain the status of the
3821 // asynchronous job.
3822 AsyncJobId string `json:"async_job_id,omitempty"`
3823 // Complete : Metadata of the file where the URL is saved to.
3824 Complete *FileMetadata `json:"complete,omitempty"`
3825 }
3826
3827 // Valid tag values for SaveUrlResult
3828 const (
3829 SaveUrlResultAsyncJobId = "async_job_id"
3830 SaveUrlResultComplete = "complete"
3831 )
3832
3833 // UnmarshalJSON deserializes into a SaveUrlResult instance
3834 func (u *SaveUrlResult) UnmarshalJSON(body []byte) error {
3835 type wrap struct {
3836 dropbox.Tagged
3837 // AsyncJobId : This response indicates that the processing is
3838 // asynchronous. The string is an id that can be used to obtain the
3839 // status of the asynchronous job.
3840 AsyncJobId string `json:"async_job_id,omitempty"`
3841 }
3842 var w wrap
3843 var err error
3844 if err = json.Unmarshal(body, &w); err != nil {
3845 return err
3846 }
3847 u.Tag = w.Tag
3848 switch u.Tag {
3849 case "async_job_id":
3850 u.AsyncJobId = w.AsyncJobId
3851
3852 if err != nil {
3853 return err
3854 }
3855 case "complete":
3856 err = json.Unmarshal(body, &u.Complete)
3857
3858 if err != nil {
3859 return err
3860 }
3861 }
3862 return nil
3863 }
3864
3865 // SearchArg : has no documentation (yet)
3866 type SearchArg struct {
3867 // Path : The path in the user's Dropbox to search. Should probably be a
3868 // folder.
3869 Path string `json:"path"`
3870 // Query : The string to search for. Query string may be rewritten to
3871 // improve relevance of results. The string is split on spaces into multiple
3872 // tokens. For file name searching, the last token is used for prefix
3873 // matching (i.e. "bat c" matches "bat cave" but not "batman car").
3874 Query string `json:"query"`
3875 // Start : The starting index within the search results (used for paging).
3876 Start uint64 `json:"start"`
3877 // MaxResults : The maximum number of search results to return.
3878 MaxResults uint64 `json:"max_results"`
3879 // Mode : The search mode (filename, filename_and_content, or
3880 // deleted_filename). Note that searching file content is only available for
3881 // Dropbox Business accounts.
3882 Mode *SearchMode `json:"mode"`
3883 }
3884
3885 // NewSearchArg returns a new SearchArg instance
3886 func NewSearchArg(Path string, Query string) *SearchArg {
3887 s := new(SearchArg)
3888 s.Path = Path
3889 s.Query = Query
3890 s.Start = 0
3891 s.MaxResults = 100
3892 s.Mode = &SearchMode{Tagged: dropbox.Tagged{Tag: "filename"}}
3893 return s
3894 }
3895
3896 // SearchError : has no documentation (yet)
3897 type SearchError struct {
3898 dropbox.Tagged
3899 // Path : has no documentation (yet)
3900 Path *LookupError `json:"path,omitempty"`
3901 // InvalidArgument : has no documentation (yet)
3902 InvalidArgument string `json:"invalid_argument,omitempty"`
3903 }
3904
3905 // Valid tag values for SearchError
3906 const (
3907 SearchErrorPath = "path"
3908 SearchErrorInvalidArgument = "invalid_argument"
3909 SearchErrorInternalError = "internal_error"
3910 SearchErrorOther = "other"
3911 )
3912
3913 // UnmarshalJSON deserializes into a SearchError instance
3914 func (u *SearchError) UnmarshalJSON(body []byte) error {
3915 type wrap struct {
3916 dropbox.Tagged
3917 // Path : has no documentation (yet)
3918 Path *LookupError `json:"path,omitempty"`
3919 // InvalidArgument : has no documentation (yet)
3920 InvalidArgument string `json:"invalid_argument,omitempty"`
3921 }
3922 var w wrap
3923 var err error
3924 if err = json.Unmarshal(body, &w); err != nil {
3925 return err
3926 }
3927 u.Tag = w.Tag
3928 switch u.Tag {
3929 case "path":
3930 u.Path = w.Path
3931
3932 if err != nil {
3933 return err
3934 }
3935 case "invalid_argument":
3936 u.InvalidArgument = w.InvalidArgument
3937
3938 if err != nil {
3939 return err
3940 }
3941 }
3942 return nil
3943 }
3944
3945 // SearchMatch : has no documentation (yet)
3946 type SearchMatch struct {
3947 // MatchType : The type of the match.
3948 MatchType *SearchMatchType `json:"match_type"`
3949 // Metadata : The metadata for the matched file or folder.
3950 Metadata IsMetadata `json:"metadata"`
3951 }
3952
3953 // NewSearchMatch returns a new SearchMatch instance
3954 func NewSearchMatch(MatchType *SearchMatchType, Metadata IsMetadata) *SearchMatch {
3955 s := new(SearchMatch)
3956 s.MatchType = MatchType
3957 s.Metadata = Metadata
3958 return s
3959 }
3960
3961 // UnmarshalJSON deserializes into a SearchMatch instance
3962 func (u *SearchMatch) UnmarshalJSON(b []byte) error {
3963 type wrap struct {
3964 // MatchType : The type of the match.
3965 MatchType *SearchMatchType `json:"match_type"`
3966 // Metadata : The metadata for the matched file or folder.
3967 Metadata json.RawMessage `json:"metadata"`
3968 }
3969 var w wrap
3970 if err := json.Unmarshal(b, &w); err != nil {
3971 return err
3972 }
3973 u.MatchType = w.MatchType
3974 Metadata, err := IsMetadataFromJSON(w.Metadata)
3975 if err != nil {
3976 return err
3977 }
3978 u.Metadata = Metadata
3979 return nil
3980 }
3981
3982 // SearchMatchFieldOptions : has no documentation (yet)
3983 type SearchMatchFieldOptions struct {
3984 // IncludeHighlights : Whether to include highlight span from file title.
3985 IncludeHighlights bool `json:"include_highlights"`
3986 }
3987
3988 // NewSearchMatchFieldOptions returns a new SearchMatchFieldOptions instance
3989 func NewSearchMatchFieldOptions() *SearchMatchFieldOptions {
3990 s := new(SearchMatchFieldOptions)
3991 s.IncludeHighlights = false
3992 return s
3993 }
3994
3995 // SearchMatchType : Indicates what type of match was found for a given item.
3996 type SearchMatchType struct {
3997 dropbox.Tagged
3998 }
3999
4000 // Valid tag values for SearchMatchType
4001 const (
4002 SearchMatchTypeFilename = "filename"
4003 SearchMatchTypeContent = "content"
4004 SearchMatchTypeBoth = "both"
4005 )
4006
4007 // SearchMatchTypeV2 : Indicates what type of match was found for a given item.
4008 type SearchMatchTypeV2 struct {
4009 dropbox.Tagged
4010 }
4011
4012 // Valid tag values for SearchMatchTypeV2
4013 const (
4014 SearchMatchTypeV2Filename = "filename"
4015 SearchMatchTypeV2FileContent = "file_content"
4016 SearchMatchTypeV2FilenameAndContent = "filename_and_content"
4017 SearchMatchTypeV2ImageContent = "image_content"
4018 SearchMatchTypeV2Other = "other"
4019 )
4020
4021 // SearchMatchV2 : has no documentation (yet)
4022 type SearchMatchV2 struct {
4023 // Metadata : The metadata for the matched file or folder.
4024 Metadata *MetadataV2 `json:"metadata"`
4025 // MatchType : The type of the match.
4026 MatchType *SearchMatchTypeV2 `json:"match_type,omitempty"`
4027 // HighlightSpans : The list of HighlightSpan determines which parts of the
4028 // file title should be highlighted.
4029 HighlightSpans []*HighlightSpan `json:"highlight_spans,omitempty"`
4030 }
4031
4032 // NewSearchMatchV2 returns a new SearchMatchV2 instance
4033 func NewSearchMatchV2(Metadata *MetadataV2) *SearchMatchV2 {
4034 s := new(SearchMatchV2)
4035 s.Metadata = Metadata
4036 return s
4037 }
4038
4039 // SearchMode : has no documentation (yet)
4040 type SearchMode struct {
4041 dropbox.Tagged
4042 }
4043
4044 // Valid tag values for SearchMode
4045 const (
4046 SearchModeFilename = "filename"
4047 SearchModeFilenameAndContent = "filename_and_content"
4048 SearchModeDeletedFilename = "deleted_filename"
4049 )
4050
4051 // SearchOptions : has no documentation (yet)
4052 type SearchOptions struct {
4053 // Path : Scopes the search to a path in the user's Dropbox. Searches the
4054 // entire Dropbox if not specified.
4055 Path string `json:"path,omitempty"`
4056 // MaxResults : The maximum number of search results to return.
4057 MaxResults uint64 `json:"max_results"`
4058 // OrderBy : Specified property of the order of search results. By default,
4059 // results are sorted by relevance.
4060 OrderBy *SearchOrderBy `json:"order_by,omitempty"`
4061 // FileStatus : Restricts search to the given file status.
4062 FileStatus *FileStatus `json:"file_status"`
4063 // FilenameOnly : Restricts search to only match on filenames.
4064 FilenameOnly bool `json:"filename_only"`
4065 // FileExtensions : Restricts search to only the extensions specified. Only
4066 // supported for active file search.
4067 FileExtensions []string `json:"file_extensions,omitempty"`
4068 // FileCategories : Restricts search to only the file categories specified.
4069 // Only supported for active file search.
4070 FileCategories []*FileCategory `json:"file_categories,omitempty"`
4071 }
4072
4073 // NewSearchOptions returns a new SearchOptions instance
4074 func NewSearchOptions() *SearchOptions {
4075 s := new(SearchOptions)
4076 s.MaxResults = 100
4077 s.FileStatus = &FileStatus{Tagged: dropbox.Tagged{Tag: "active"}}
4078 s.FilenameOnly = false
4079 return s
4080 }
4081
4082 // SearchOrderBy : has no documentation (yet)
4083 type SearchOrderBy struct {
4084 dropbox.Tagged
4085 }
4086
4087 // Valid tag values for SearchOrderBy
4088 const (
4089 SearchOrderByRelevance = "relevance"
4090 SearchOrderByLastModifiedTime = "last_modified_time"
4091 SearchOrderByOther = "other"
4092 )
4093
4094 // SearchResult : has no documentation (yet)
4095 type SearchResult struct {
4096 // Matches : A list (possibly empty) of matches for the query.
4097 Matches []*SearchMatch `json:"matches"`
4098 // More : Used for paging. If true, indicates there is another page of
4099 // results available that can be fetched by calling `search` again.
4100 More bool `json:"more"`
4101 // Start : Used for paging. Value to set the start argument to when calling
4102 // `search` to fetch the next page of results.
4103 Start uint64 `json:"start"`
4104 }
4105
4106 // NewSearchResult returns a new SearchResult instance
4107 func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchResult {
4108 s := new(SearchResult)
4109 s.Matches = Matches
4110 s.More = More
4111 s.Start = Start
4112 return s
4113 }
4114
4115 // SearchV2Arg : has no documentation (yet)
4116 type SearchV2Arg struct {
4117 // Query : The string to search for. May match across multiple fields based
4118 // on the request arguments.
4119 Query string `json:"query"`
4120 // Options : Options for more targeted search results.
4121 Options *SearchOptions `json:"options,omitempty"`
4122 // MatchFieldOptions : Options for search results match fields.
4123 MatchFieldOptions *SearchMatchFieldOptions `json:"match_field_options,omitempty"`
4124 // IncludeHighlights : Deprecated and moved this option to
4125 // SearchMatchFieldOptions.
4126 IncludeHighlights bool `json:"include_highlights,omitempty"`
4127 }
4128
4129 // NewSearchV2Arg returns a new SearchV2Arg instance
4130 func NewSearchV2Arg(Query string) *SearchV2Arg {
4131 s := new(SearchV2Arg)
4132 s.Query = Query
4133 return s
4134 }
4135
4136 // SearchV2ContinueArg : has no documentation (yet)
4137 type SearchV2ContinueArg struct {
4138 // Cursor : The cursor returned by your last call to `search`. Used to fetch
4139 // the next page of results.
4140 Cursor string `json:"cursor"`
4141 }
4142
4143 // NewSearchV2ContinueArg returns a new SearchV2ContinueArg instance
4144 func NewSearchV2ContinueArg(Cursor string) *SearchV2ContinueArg {
4145 s := new(SearchV2ContinueArg)
4146 s.Cursor = Cursor
4147 return s
4148 }
4149
4150 // SearchV2Result : has no documentation (yet)
4151 type SearchV2Result struct {
4152 // Matches : A list (possibly empty) of matches for the query.
4153 Matches []*SearchMatchV2 `json:"matches"`
4154 // HasMore : Used for paging. If true, indicates there is another page of
4155 // results available that can be fetched by calling `searchContinue` with
4156 // the cursor.
4157 HasMore bool `json:"has_more"`
4158 // Cursor : Pass the cursor into `searchContinue` to fetch the next page of
4159 // results.
4160 Cursor string `json:"cursor,omitempty"`
4161 }
4162
4163 // NewSearchV2Result returns a new SearchV2Result instance
4164 func NewSearchV2Result(Matches []*SearchMatchV2, HasMore bool) *SearchV2Result {
4165 s := new(SearchV2Result)
4166 s.Matches = Matches
4167 s.HasMore = HasMore
4168 return s
4169 }
4170
4171 // SharedLink : has no documentation (yet)
4172 type SharedLink struct {
4173 // Url : Shared link url.
4174 Url string `json:"url"`
4175 // Password : Password for the shared link.
4176 Password string `json:"password,omitempty"`
4177 }
4178
4179 // NewSharedLink returns a new SharedLink instance
4180 func NewSharedLink(Url string) *SharedLink {
4181 s := new(SharedLink)
4182 s.Url = Url
4183 return s
4184 }
4185
4186 // SharedLinkFileInfo : has no documentation (yet)
4187 type SharedLinkFileInfo struct {
4188 // Url : The shared link corresponding to either a file or shared link to a
4189 // folder. If it is for a folder shared link, we use the path param to
4190 // determine for which file in the folder the view is for.
4191 Url string `json:"url"`
4192 // Path : The path corresponding to a file in a shared link to a folder.
4193 // Required for shared links to folders.
4194 Path string `json:"path,omitempty"`
4195 // Password : Password for the shared link. Required for password-protected
4196 // shared links to files unless it can be read from a cookie.
4197 Password string `json:"password,omitempty"`
4198 }
4199
4200 // NewSharedLinkFileInfo returns a new SharedLinkFileInfo instance
4201 func NewSharedLinkFileInfo(Url string) *SharedLinkFileInfo {
4202 s := new(SharedLinkFileInfo)
4203 s.Url = Url
4204 return s
4205 }
4206
4207 // SingleUserLock : has no documentation (yet)
4208 type SingleUserLock struct {
4209 // Created : The time the lock was created.
4210 Created time.Time `json:"created"`
4211 // LockHolderAccountId : The account ID of the lock holder if known.
4212 LockHolderAccountId string `json:"lock_holder_account_id"`
4213 // LockHolderTeamId : The id of the team of the account holder if it exists.
4214 LockHolderTeamId string `json:"lock_holder_team_id,omitempty"`
4215 }
4216
4217 // NewSingleUserLock returns a new SingleUserLock instance
4218 func NewSingleUserLock(Created time.Time, LockHolderAccountId string) *SingleUserLock {
4219 s := new(SingleUserLock)
4220 s.Created = Created
4221 s.LockHolderAccountId = LockHolderAccountId
4222 return s
4223 }
4224
4225 // SymlinkInfo : has no documentation (yet)
4226 type SymlinkInfo struct {
4227 // Target : The target this symlink points to.
4228 Target string `json:"target"`
4229 }
4230
4231 // NewSymlinkInfo returns a new SymlinkInfo instance
4232 func NewSymlinkInfo(Target string) *SymlinkInfo {
4233 s := new(SymlinkInfo)
4234 s.Target = Target
4235 return s
4236 }
4237
4238 // SyncSetting : has no documentation (yet)
4239 type SyncSetting struct {
4240 dropbox.Tagged
4241 }
4242
4243 // Valid tag values for SyncSetting
4244 const (
4245 SyncSettingDefault = "default"
4246 SyncSettingNotSynced = "not_synced"
4247 SyncSettingNotSyncedInactive = "not_synced_inactive"
4248 SyncSettingOther = "other"
4249 )
4250
4251 // SyncSettingArg : has no documentation (yet)
4252 type SyncSettingArg struct {
4253 dropbox.Tagged
4254 }
4255
4256 // Valid tag values for SyncSettingArg
4257 const (
4258 SyncSettingArgDefault = "default"
4259 SyncSettingArgNotSynced = "not_synced"
4260 SyncSettingArgOther = "other"
4261 )
4262
4263 // SyncSettingsError : has no documentation (yet)
4264 type SyncSettingsError struct {
4265 dropbox.Tagged
4266 // Path : has no documentation (yet)
4267 Path *LookupError `json:"path,omitempty"`
4268 }
4269
4270 // Valid tag values for SyncSettingsError
4271 const (
4272 SyncSettingsErrorPath = "path"
4273 SyncSettingsErrorUnsupportedCombination = "unsupported_combination"
4274 SyncSettingsErrorUnsupportedConfiguration = "unsupported_configuration"
4275 SyncSettingsErrorOther = "other"
4276 )
4277
4278 // UnmarshalJSON deserializes into a SyncSettingsError instance
4279 func (u *SyncSettingsError) UnmarshalJSON(body []byte) error {
4280 type wrap struct {
4281 dropbox.Tagged
4282 // Path : has no documentation (yet)
4283 Path *LookupError `json:"path,omitempty"`
4284 }
4285 var w wrap
4286 var err error
4287 if err = json.Unmarshal(body, &w); err != nil {
4288 return err
4289 }
4290 u.Tag = w.Tag
4291 switch u.Tag {
4292 case "path":
4293 u.Path = w.Path
4294
4295 if err != nil {
4296 return err
4297 }
4298 }
4299 return nil
4300 }
4301
4302 // ThumbnailArg : has no documentation (yet)
4303 type ThumbnailArg struct {
4304 // Path : The path to the image file you want to thumbnail.
4305 Path string `json:"path"`
4306 // Format : The format for the thumbnail image, jpeg (default) or png. For
4307 // images that are photos, jpeg should be preferred, while png is better
4308 // for screenshots and digital arts.
4309 Format *ThumbnailFormat `json:"format"`
4310 // Size : The size for the thumbnail image.
4311 Size *ThumbnailSize `json:"size"`
4312 // Mode : How to resize and crop the image to achieve the desired size.
4313 Mode *ThumbnailMode `json:"mode"`
4314 }
4315
4316 // NewThumbnailArg returns a new ThumbnailArg instance
4317 func NewThumbnailArg(Path string) *ThumbnailArg {
4318 s := new(ThumbnailArg)
4319 s.Path = Path
4320 s.Format = &ThumbnailFormat{Tagged: dropbox.Tagged{Tag: "jpeg"}}
4321 s.Size = &ThumbnailSize{Tagged: dropbox.Tagged{Tag: "w64h64"}}
4322 s.Mode = &ThumbnailMode{Tagged: dropbox.Tagged{Tag: "strict"}}
4323 return s
4324 }
4325
4326 // ThumbnailError : has no documentation (yet)
4327 type ThumbnailError struct {
4328 dropbox.Tagged
4329 // Path : An error occurs when downloading metadata for the image.
4330 Path *LookupError `json:"path,omitempty"`
4331 }
4332
4333 // Valid tag values for ThumbnailError
4334 const (
4335 ThumbnailErrorPath = "path"
4336 ThumbnailErrorUnsupportedExtension = "unsupported_extension"
4337 ThumbnailErrorUnsupportedImage = "unsupported_image"
4338 ThumbnailErrorConversionError = "conversion_error"
4339 )
4340
4341 // UnmarshalJSON deserializes into a ThumbnailError instance
4342 func (u *ThumbnailError) UnmarshalJSON(body []byte) error {
4343 type wrap struct {
4344 dropbox.Tagged
4345 // Path : An error occurs when downloading metadata for the image.
4346 Path *LookupError `json:"path,omitempty"`
4347 }
4348 var w wrap
4349 var err error
4350 if err = json.Unmarshal(body, &w); err != nil {
4351 return err
4352 }
4353 u.Tag = w.Tag
4354 switch u.Tag {
4355 case "path":
4356 u.Path = w.Path
4357
4358 if err != nil {
4359 return err
4360 }
4361 }
4362 return nil
4363 }
4364
4365 // ThumbnailFormat : has no documentation (yet)
4366 type ThumbnailFormat struct {
4367 dropbox.Tagged
4368 }
4369
4370 // Valid tag values for ThumbnailFormat
4371 const (
4372 ThumbnailFormatJpeg = "jpeg"
4373 ThumbnailFormatPng = "png"
4374 )
4375
4376 // ThumbnailMode : has no documentation (yet)
4377 type ThumbnailMode struct {
4378 dropbox.Tagged
4379 }
4380
4381 // Valid tag values for ThumbnailMode
4382 const (
4383 ThumbnailModeStrict = "strict"
4384 ThumbnailModeBestfit = "bestfit"
4385 ThumbnailModeFitoneBestfit = "fitone_bestfit"
4386 )
4387
4388 // ThumbnailSize : has no documentation (yet)
4389 type ThumbnailSize struct {
4390 dropbox.Tagged
4391 }
4392
4393 // Valid tag values for ThumbnailSize
4394 const (
4395 ThumbnailSizeW32h32 = "w32h32"
4396 ThumbnailSizeW64h64 = "w64h64"
4397 ThumbnailSizeW128h128 = "w128h128"
4398 ThumbnailSizeW256h256 = "w256h256"
4399 ThumbnailSizeW480h320 = "w480h320"
4400 ThumbnailSizeW640h480 = "w640h480"
4401 ThumbnailSizeW960h640 = "w960h640"
4402 ThumbnailSizeW1024h768 = "w1024h768"
4403 ThumbnailSizeW2048h1536 = "w2048h1536"
4404 )
4405
4406 // ThumbnailV2Arg : has no documentation (yet)
4407 type ThumbnailV2Arg struct {
4408 // Resource : Information specifying which file to preview. This could be a
4409 // path to a file, a shared link pointing to a file, or a shared link
4410 // pointing to a folder, with a relative path.
4411 Resource *PathOrLink `json:"resource"`
4412 // Format : The format for the thumbnail image, jpeg (default) or png. For
4413 // images that are photos, jpeg should be preferred, while png is better
4414 // for screenshots and digital arts.
4415 Format *ThumbnailFormat `json:"format"`
4416 // Size : The size for the thumbnail image.
4417 Size *ThumbnailSize `json:"size"`
4418 // Mode : How to resize and crop the image to achieve the desired size.
4419 Mode *ThumbnailMode `json:"mode"`
4420 }
4421
4422 // NewThumbnailV2Arg returns a new ThumbnailV2Arg instance
4423 func NewThumbnailV2Arg(Resource *PathOrLink) *ThumbnailV2Arg {
4424 s := new(ThumbnailV2Arg)
4425 s.Resource = Resource
4426 s.Format = &ThumbnailFormat{Tagged: dropbox.Tagged{Tag: "jpeg"}}
4427 s.Size = &ThumbnailSize{Tagged: dropbox.Tagged{Tag: "w64h64"}}
4428 s.Mode = &ThumbnailMode{Tagged: dropbox.Tagged{Tag: "strict"}}
4429 return s
4430 }
4431
4432 // ThumbnailV2Error : has no documentation (yet)
4433 type ThumbnailV2Error struct {
4434 dropbox.Tagged
4435 // Path : An error occurred when downloading metadata for the image.
4436 Path *LookupError `json:"path,omitempty"`
4437 }
4438
4439 // Valid tag values for ThumbnailV2Error
4440 const (
4441 ThumbnailV2ErrorPath = "path"
4442 ThumbnailV2ErrorUnsupportedExtension = "unsupported_extension"
4443 ThumbnailV2ErrorUnsupportedImage = "unsupported_image"
4444 ThumbnailV2ErrorConversionError = "conversion_error"
4445 ThumbnailV2ErrorAccessDenied = "access_denied"
4446 ThumbnailV2ErrorNotFound = "not_found"
4447 ThumbnailV2ErrorOther = "other"
4448 )
4449
4450 // UnmarshalJSON deserializes into a ThumbnailV2Error instance
4451 func (u *ThumbnailV2Error) UnmarshalJSON(body []byte) error {
4452 type wrap struct {
4453 dropbox.Tagged
4454 // Path : An error occurred when downloading metadata for the image.
4455 Path *LookupError `json:"path,omitempty"`
4456 }
4457 var w wrap
4458 var err error
4459 if err = json.Unmarshal(body, &w); err != nil {
4460 return err
4461 }
4462 u.Tag = w.Tag
4463 switch u.Tag {
4464 case "path":
4465 u.Path = w.Path
4466
4467 if err != nil {
4468 return err
4469 }
4470 }
4471 return nil
4472 }
4473
4474 // UnlockFileArg : has no documentation (yet)
4475 type UnlockFileArg struct {
4476 // Path : Path in the user's Dropbox to a file.
4477 Path string `json:"path"`
4478 }
4479
4480 // NewUnlockFileArg returns a new UnlockFileArg instance
4481 func NewUnlockFileArg(Path string) *UnlockFileArg {
4482 s := new(UnlockFileArg)
4483 s.Path = Path
4484 return s
4485 }
4486
4487 // UnlockFileBatchArg : has no documentation (yet)
4488 type UnlockFileBatchArg struct {
4489 // Entries : List of 'entries'. Each 'entry' contains a path of the file
4490 // which will be unlocked. Duplicate path arguments in the batch are
4491 // considered only once.
4492 Entries []*UnlockFileArg `json:"entries"`
4493 }
4494
4495 // NewUnlockFileBatchArg returns a new UnlockFileBatchArg instance
4496 func NewUnlockFileBatchArg(Entries []*UnlockFileArg) *UnlockFileBatchArg {
4497 s := new(UnlockFileBatchArg)
4498 s.Entries = Entries
4499 return s
4500 }
4501
4502 // UploadError : has no documentation (yet)
4503 type UploadError struct {
4504 dropbox.Tagged
4505 // Path : Unable to save the uploaded contents to a file.
4506 Path *UploadWriteFailed `json:"path,omitempty"`
4507 // PropertiesError : The supplied property group is invalid. The file has
4508 // uploaded without property groups.
4509 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4510 }
4511
4512 // Valid tag values for UploadError
4513 const (
4514 UploadErrorPath = "path"
4515 UploadErrorPropertiesError = "properties_error"
4516 UploadErrorOther = "other"
4517 )
4518
4519 // UnmarshalJSON deserializes into a UploadError instance
4520 func (u *UploadError) UnmarshalJSON(body []byte) error {
4521 type wrap struct {
4522 dropbox.Tagged
4523 // PropertiesError : The supplied property group is invalid. The file
4524 // has uploaded without property groups.
4525 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4526 }
4527 var w wrap
4528 var err error
4529 if err = json.Unmarshal(body, &w); err != nil {
4530 return err
4531 }
4532 u.Tag = w.Tag
4533 switch u.Tag {
4534 case "path":
4535 err = json.Unmarshal(body, &u.Path)
4536
4537 if err != nil {
4538 return err
4539 }
4540 case "properties_error":
4541 u.PropertiesError = w.PropertiesError
4542
4543 if err != nil {
4544 return err
4545 }
4546 }
4547 return nil
4548 }
4549
4550 // UploadErrorWithProperties : has no documentation (yet)
4551 type UploadErrorWithProperties struct {
4552 dropbox.Tagged
4553 // Path : Unable to save the uploaded contents to a file.
4554 Path *UploadWriteFailed `json:"path,omitempty"`
4555 // PropertiesError : The supplied property group is invalid. The file has
4556 // uploaded without property groups.
4557 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4558 }
4559
4560 // Valid tag values for UploadErrorWithProperties
4561 const (
4562 UploadErrorWithPropertiesPath = "path"
4563 UploadErrorWithPropertiesPropertiesError = "properties_error"
4564 UploadErrorWithPropertiesOther = "other"
4565 )
4566
4567 // UnmarshalJSON deserializes into a UploadErrorWithProperties instance
4568 func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error {
4569 type wrap struct {
4570 dropbox.Tagged
4571 // PropertiesError : The supplied property group is invalid. The file
4572 // has uploaded without property groups.
4573 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4574 }
4575 var w wrap
4576 var err error
4577 if err = json.Unmarshal(body, &w); err != nil {
4578 return err
4579 }
4580 u.Tag = w.Tag
4581 switch u.Tag {
4582 case "path":
4583 err = json.Unmarshal(body, &u.Path)
4584
4585 if err != nil {
4586 return err
4587 }
4588 case "properties_error":
4589 u.PropertiesError = w.PropertiesError
4590
4591 if err != nil {
4592 return err
4593 }
4594 }
4595 return nil
4596 }
4597
4598 // UploadSessionAppendArg : has no documentation (yet)
4599 type UploadSessionAppendArg struct {
4600 // Cursor : Contains the upload session ID and the offset.
4601 Cursor *UploadSessionCursor `json:"cursor"`
4602 // Close : If true, the current session will be closed, at which point you
4603 // won't be able to call `uploadSessionAppend` anymore with the current
4604 // session.
4605 Close bool `json:"close"`
4606 }
4607
4608 // NewUploadSessionAppendArg returns a new UploadSessionAppendArg instance
4609 func NewUploadSessionAppendArg(Cursor *UploadSessionCursor) *UploadSessionAppendArg {
4610 s := new(UploadSessionAppendArg)
4611 s.Cursor = Cursor
4612 s.Close = false
4613 return s
4614 }
4615
4616 // UploadSessionCursor : has no documentation (yet)
4617 type UploadSessionCursor struct {
4618 // SessionId : The upload session ID (returned by `uploadSessionStart`).
4619 SessionId string `json:"session_id"`
4620 // Offset : Offset in bytes at which data should be appended. We use this to
4621 // make sure upload data isn't lost or duplicated in the event of a network
4622 // error.
4623 Offset uint64 `json:"offset"`
4624 }
4625
4626 // NewUploadSessionCursor returns a new UploadSessionCursor instance
4627 func NewUploadSessionCursor(SessionId string, Offset uint64) *UploadSessionCursor {
4628 s := new(UploadSessionCursor)
4629 s.SessionId = SessionId
4630 s.Offset = Offset
4631 return s
4632 }
4633
4634 // UploadSessionFinishArg : has no documentation (yet)
4635 type UploadSessionFinishArg struct {
4636 // Cursor : Contains the upload session ID and the offset.
4637 Cursor *UploadSessionCursor `json:"cursor"`
4638 // Commit : Contains the path and other optional modifiers for the commit.
4639 Commit *CommitInfo `json:"commit"`
4640 }
4641
4642 // NewUploadSessionFinishArg returns a new UploadSessionFinishArg instance
4643 func NewUploadSessionFinishArg(Cursor *UploadSessionCursor, Commit *CommitInfo) *UploadSessionFinishArg {
4644 s := new(UploadSessionFinishArg)
4645 s.Cursor = Cursor
4646 s.Commit = Commit
4647 return s
4648 }
4649
4650 // UploadSessionFinishBatchArg : has no documentation (yet)
4651 type UploadSessionFinishBatchArg struct {
4652 // Entries : Commit information for each file in the batch.
4653 Entries []*UploadSessionFinishArg `json:"entries"`
4654 }
4655
4656 // NewUploadSessionFinishBatchArg returns a new UploadSessionFinishBatchArg instance
4657 func NewUploadSessionFinishBatchArg(Entries []*UploadSessionFinishArg) *UploadSessionFinishBatchArg {
4658 s := new(UploadSessionFinishBatchArg)
4659 s.Entries = Entries
4660 return s
4661 }
4662
4663 // UploadSessionFinishBatchJobStatus : has no documentation (yet)
4664 type UploadSessionFinishBatchJobStatus struct {
4665 dropbox.Tagged
4666 // Complete : The `uploadSessionFinishBatch` has finished.
4667 Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
4668 }
4669
4670 // Valid tag values for UploadSessionFinishBatchJobStatus
4671 const (
4672 UploadSessionFinishBatchJobStatusInProgress = "in_progress"
4673 UploadSessionFinishBatchJobStatusComplete = "complete"
4674 )
4675
4676 // UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance
4677 func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte) error {
4678 type wrap struct {
4679 dropbox.Tagged
4680 }
4681 var w wrap
4682 var err error
4683 if err = json.Unmarshal(body, &w); err != nil {
4684 return err
4685 }
4686 u.Tag = w.Tag
4687 switch u.Tag {
4688 case "complete":
4689 err = json.Unmarshal(body, &u.Complete)
4690
4691 if err != nil {
4692 return err
4693 }
4694 }
4695 return nil
4696 }
4697
4698 // UploadSessionFinishBatchLaunch : Result returned by
4699 // `uploadSessionFinishBatch` that may either launch an asynchronous job or
4700 // complete synchronously.
4701 type UploadSessionFinishBatchLaunch struct {
4702 dropbox.Tagged
4703 // AsyncJobId : This response indicates that the processing is asynchronous.
4704 // The string is an id that can be used to obtain the status of the
4705 // asynchronous job.
4706 AsyncJobId string `json:"async_job_id,omitempty"`
4707 // Complete : has no documentation (yet)
4708 Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"`
4709 }
4710
4711 // Valid tag values for UploadSessionFinishBatchLaunch
4712 const (
4713 UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id"
4714 UploadSessionFinishBatchLaunchComplete = "complete"
4715 UploadSessionFinishBatchLaunchOther = "other"
4716 )
4717
4718 // UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance
4719 func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) error {
4720 type wrap struct {
4721 dropbox.Tagged
4722 // AsyncJobId : This response indicates that the processing is
4723 // asynchronous. The string is an id that can be used to obtain the
4724 // status of the asynchronous job.
4725 AsyncJobId string `json:"async_job_id,omitempty"`
4726 }
4727 var w wrap
4728 var err error
4729 if err = json.Unmarshal(body, &w); err != nil {
4730 return err
4731 }
4732 u.Tag = w.Tag
4733 switch u.Tag {
4734 case "async_job_id":
4735 u.AsyncJobId = w.AsyncJobId
4736
4737 if err != nil {
4738 return err
4739 }
4740 case "complete":
4741 err = json.Unmarshal(body, &u.Complete)
4742
4743 if err != nil {
4744 return err
4745 }
4746 }
4747 return nil
4748 }
4749
4750 // UploadSessionFinishBatchResult : has no documentation (yet)
4751 type UploadSessionFinishBatchResult struct {
4752 // Entries : Each entry in `UploadSessionFinishBatchArg.entries` will appear
4753 // at the same position inside `UploadSessionFinishBatchResult.entries`.
4754 Entries []*UploadSessionFinishBatchResultEntry `json:"entries"`
4755 }
4756
4757 // NewUploadSessionFinishBatchResult returns a new UploadSessionFinishBatchResult instance
4758 func NewUploadSessionFinishBatchResult(Entries []*UploadSessionFinishBatchResultEntry) *UploadSessionFinishBatchResult {
4759 s := new(UploadSessionFinishBatchResult)
4760 s.Entries = Entries
4761 return s
4762 }
4763
4764 // UploadSessionFinishBatchResultEntry : has no documentation (yet)
4765 type UploadSessionFinishBatchResultEntry struct {
4766 dropbox.Tagged
4767 // Success : has no documentation (yet)
4768 Success *FileMetadata `json:"success,omitempty"`
4769 // Failure : has no documentation (yet)
4770 Failure *UploadSessionFinishError `json:"failure,omitempty"`
4771 }
4772
4773 // Valid tag values for UploadSessionFinishBatchResultEntry
4774 const (
4775 UploadSessionFinishBatchResultEntrySuccess = "success"
4776 UploadSessionFinishBatchResultEntryFailure = "failure"
4777 )
4778
4779 // UnmarshalJSON deserializes into a UploadSessionFinishBatchResultEntry instance
4780 func (u *UploadSessionFinishBatchResultEntry) UnmarshalJSON(body []byte) error {
4781 type wrap struct {
4782 dropbox.Tagged
4783 // Failure : has no documentation (yet)
4784 Failure *UploadSessionFinishError `json:"failure,omitempty"`
4785 }
4786 var w wrap
4787 var err error
4788 if err = json.Unmarshal(body, &w); err != nil {
4789 return err
4790 }
4791 u.Tag = w.Tag
4792 switch u.Tag {
4793 case "success":
4794 err = json.Unmarshal(body, &u.Success)
4795
4796 if err != nil {
4797 return err
4798 }
4799 case "failure":
4800 u.Failure = w.Failure
4801
4802 if err != nil {
4803 return err
4804 }
4805 }
4806 return nil
4807 }
4808
4809 // UploadSessionFinishError : has no documentation (yet)
4810 type UploadSessionFinishError struct {
4811 dropbox.Tagged
4812 // LookupFailed : The session arguments are incorrect; the value explains
4813 // the reason.
4814 LookupFailed *UploadSessionLookupError `json:"lookup_failed,omitempty"`
4815 // Path : Unable to save the uploaded contents to a file. Data has already
4816 // been appended to the upload session. Please retry with empty data body
4817 // and updated offset.
4818 Path *WriteError `json:"path,omitempty"`
4819 // PropertiesError : The supplied property group is invalid. The file has
4820 // uploaded without property groups.
4821 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4822 }
4823
4824 // Valid tag values for UploadSessionFinishError
4825 const (
4826 UploadSessionFinishErrorLookupFailed = "lookup_failed"
4827 UploadSessionFinishErrorPath = "path"
4828 UploadSessionFinishErrorPropertiesError = "properties_error"
4829 UploadSessionFinishErrorTooManySharedFolderTargets = "too_many_shared_folder_targets"
4830 UploadSessionFinishErrorTooManyWriteOperations = "too_many_write_operations"
4831 UploadSessionFinishErrorConcurrentSessionDataNotAllowed = "concurrent_session_data_not_allowed"
4832 UploadSessionFinishErrorConcurrentSessionNotClosed = "concurrent_session_not_closed"
4833 UploadSessionFinishErrorConcurrentSessionMissingData = "concurrent_session_missing_data"
4834 UploadSessionFinishErrorOther = "other"
4835 )
4836
4837 // UnmarshalJSON deserializes into a UploadSessionFinishError instance
4838 func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error {
4839 type wrap struct {
4840 dropbox.Tagged
4841 // LookupFailed : The session arguments are incorrect; the value
4842 // explains the reason.
4843 LookupFailed *UploadSessionLookupError `json:"lookup_failed,omitempty"`
4844 // Path : Unable to save the uploaded contents to a file. Data has
4845 // already been appended to the upload session. Please retry with empty
4846 // data body and updated offset.
4847 Path *WriteError `json:"path,omitempty"`
4848 // PropertiesError : The supplied property group is invalid. The file
4849 // has uploaded without property groups.
4850 PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"`
4851 }
4852 var w wrap
4853 var err error
4854 if err = json.Unmarshal(body, &w); err != nil {
4855 return err
4856 }
4857 u.Tag = w.Tag
4858 switch u.Tag {
4859 case "lookup_failed":
4860 u.LookupFailed = w.LookupFailed
4861
4862 if err != nil {
4863 return err
4864 }
4865 case "path":
4866 u.Path = w.Path
4867
4868 if err != nil {
4869 return err
4870 }
4871 case "properties_error":
4872 u.PropertiesError = w.PropertiesError
4873
4874 if err != nil {
4875 return err
4876 }
4877 }
4878 return nil
4879 }
4880
4881 // UploadSessionLookupError : has no documentation (yet)
4882 type UploadSessionLookupError struct {
4883 dropbox.Tagged
4884 // IncorrectOffset : The specified offset was incorrect. See the value for
4885 // the correct offset. This error may occur when a previous request was
4886 // received and processed successfully but the client did not receive the
4887 // response, e.g. due to a network error.
4888 IncorrectOffset *UploadSessionOffsetError `json:"incorrect_offset,omitempty"`
4889 }
4890
4891 // Valid tag values for UploadSessionLookupError
4892 const (
4893 UploadSessionLookupErrorNotFound = "not_found"
4894 UploadSessionLookupErrorIncorrectOffset = "incorrect_offset"
4895 UploadSessionLookupErrorClosed = "closed"
4896 UploadSessionLookupErrorNotClosed = "not_closed"
4897 UploadSessionLookupErrorTooLarge = "too_large"
4898 UploadSessionLookupErrorConcurrentSessionInvalidOffset = "concurrent_session_invalid_offset"
4899 UploadSessionLookupErrorConcurrentSessionInvalidDataSize = "concurrent_session_invalid_data_size"
4900 UploadSessionLookupErrorOther = "other"
4901 )
4902
4903 // UnmarshalJSON deserializes into a UploadSessionLookupError instance
4904 func (u *UploadSessionLookupError) UnmarshalJSON(body []byte) error {
4905 type wrap struct {
4906 dropbox.Tagged
4907 }
4908 var w wrap
4909 var err error
4910 if err = json.Unmarshal(body, &w); err != nil {
4911 return err
4912 }
4913 u.Tag = w.Tag
4914 switch u.Tag {
4915 case "incorrect_offset":
4916 err = json.Unmarshal(body, &u.IncorrectOffset)
4917
4918 if err != nil {
4919 return err
4920 }
4921 }
4922 return nil
4923 }
4924
4925 // UploadSessionOffsetError : has no documentation (yet)
4926 type UploadSessionOffsetError struct {
4927 // CorrectOffset : The offset up to which data has been collected.
4928 CorrectOffset uint64 `json:"correct_offset"`
4929 }
4930
4931 // NewUploadSessionOffsetError returns a new UploadSessionOffsetError instance
4932 func NewUploadSessionOffsetError(CorrectOffset uint64) *UploadSessionOffsetError {
4933 s := new(UploadSessionOffsetError)
4934 s.CorrectOffset = CorrectOffset
4935 return s
4936 }
4937
4938 // UploadSessionStartArg : has no documentation (yet)
4939 type UploadSessionStartArg struct {
4940 // Close : If true, the current session will be closed, at which point you
4941 // won't be able to call `uploadSessionAppend` anymore with the current
4942 // session.
4943 Close bool `json:"close"`
4944 // SessionType : Type of upload session you want to start. If not specified,
4945 // default is `UploadSessionType.sequential`.
4946 SessionType *UploadSessionType `json:"session_type,omitempty"`
4947 }
4948
4949 // NewUploadSessionStartArg returns a new UploadSessionStartArg instance
4950 func NewUploadSessionStartArg() *UploadSessionStartArg {
4951 s := new(UploadSessionStartArg)
4952 s.Close = false
4953 return s
4954 }
4955
4956 // UploadSessionStartError : has no documentation (yet)
4957 type UploadSessionStartError struct {
4958 dropbox.Tagged
4959 }
4960
4961 // Valid tag values for UploadSessionStartError
4962 const (
4963 UploadSessionStartErrorConcurrentSessionDataNotAllowed = "concurrent_session_data_not_allowed"
4964 UploadSessionStartErrorConcurrentSessionCloseNotAllowed = "concurrent_session_close_not_allowed"
4965 UploadSessionStartErrorOther = "other"
4966 )
4967
4968 // UploadSessionStartResult : has no documentation (yet)
4969 type UploadSessionStartResult struct {
4970 // SessionId : A unique identifier for the upload session. Pass this to
4971 // `uploadSessionAppend` and `uploadSessionFinish`.
4972 SessionId string `json:"session_id"`
4973 }
4974
4975 // NewUploadSessionStartResult returns a new UploadSessionStartResult instance
4976 func NewUploadSessionStartResult(SessionId string) *UploadSessionStartResult {
4977 s := new(UploadSessionStartResult)
4978 s.SessionId = SessionId
4979 return s
4980 }
4981
4982 // UploadSessionType : has no documentation (yet)
4983 type UploadSessionType struct {
4984 dropbox.Tagged
4985 }
4986
4987 // Valid tag values for UploadSessionType
4988 const (
4989 UploadSessionTypeSequential = "sequential"
4990 UploadSessionTypeConcurrent = "concurrent"
4991 UploadSessionTypeOther = "other"
4992 )
4993
4994 // UploadWriteFailed : has no documentation (yet)
4995 type UploadWriteFailed struct {
4996 // Reason : The reason why the file couldn't be saved.
4997 Reason *WriteError `json:"reason"`
4998 // UploadSessionId : The upload session ID; data has already been uploaded
4999 // to the corresponding upload session and this ID may be used to retry the
5000 // commit with `uploadSessionFinish`.
5001 UploadSessionId string `json:"upload_session_id"`
5002 }
5003
5004 // NewUploadWriteFailed returns a new UploadWriteFailed instance
5005 func NewUploadWriteFailed(Reason *WriteError, UploadSessionId string) *UploadWriteFailed {
5006 s := new(UploadWriteFailed)
5007 s.Reason = Reason
5008 s.UploadSessionId = UploadSessionId
5009 return s
5010 }
5011
5012 // VideoMetadata : Metadata for a video.
5013 type VideoMetadata struct {
5014 MediaMetadata
5015 // Duration : The duration of the video in milliseconds.
5016 Duration uint64 `json:"duration,omitempty"`
5017 }
5018
5019 // NewVideoMetadata returns a new VideoMetadata instance
5020 func NewVideoMetadata() *VideoMetadata {
5021 s := new(VideoMetadata)
5022 return s
5023 }
5024
5025 // WriteConflictError : has no documentation (yet)
5026 type WriteConflictError struct {
5027 dropbox.Tagged
5028 }
5029
5030 // Valid tag values for WriteConflictError
5031 const (
5032 WriteConflictErrorFile = "file"
5033 WriteConflictErrorFolder = "folder"
5034 WriteConflictErrorFileAncestor = "file_ancestor"
5035 WriteConflictErrorOther = "other"
5036 )
5037
5038 // WriteError : has no documentation (yet)
5039 type WriteError struct {
5040 dropbox.Tagged
5041 // MalformedPath : The given path does not satisfy the required path format.
5042 // Please refer to the `Path formats documentation`
5043 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
5044 // for more information.
5045 MalformedPath string `json:"malformed_path,omitempty"`
5046 // Conflict : Couldn't write to the target path because there was something
5047 // in the way.
5048 Conflict *WriteConflictError `json:"conflict,omitempty"`
5049 }
5050
5051 // Valid tag values for WriteError
5052 const (
5053 WriteErrorMalformedPath = "malformed_path"
5054 WriteErrorConflict = "conflict"
5055 WriteErrorNoWritePermission = "no_write_permission"
5056 WriteErrorInsufficientSpace = "insufficient_space"
5057 WriteErrorDisallowedName = "disallowed_name"
5058 WriteErrorTeamFolder = "team_folder"
5059 WriteErrorOperationSuppressed = "operation_suppressed"
5060 WriteErrorTooManyWriteOperations = "too_many_write_operations"
5061 WriteErrorOther = "other"
5062 )
5063
5064 // UnmarshalJSON deserializes into a WriteError instance
5065 func (u *WriteError) UnmarshalJSON(body []byte) error {
5066 type wrap struct {
5067 dropbox.Tagged
5068 // MalformedPath : The given path does not satisfy the required path
5069 // format. Please refer to the `Path formats documentation`
5070 // <https://www.dropbox.com/developers/documentation/http/documentation#path-formats>
5071 // for more information.
5072 MalformedPath string `json:"malformed_path,omitempty"`
5073 // Conflict : Couldn't write to the target path because there was
5074 // something in the way.
5075 Conflict *WriteConflictError `json:"conflict,omitempty"`
5076 }
5077 var w wrap
5078 var err error
5079 if err = json.Unmarshal(body, &w); err != nil {
5080 return err
5081 }
5082 u.Tag = w.Tag
5083 switch u.Tag {
5084 case "malformed_path":
5085 u.MalformedPath = w.MalformedPath
5086
5087 if err != nil {
5088 return err
5089 }
5090 case "conflict":
5091 u.Conflict = w.Conflict
5092
5093 if err != nil {
5094 return err
5095 }
5096 }
5097 return nil
5098 }
5099
5100 // WriteMode : Your intent when writing a file to some path. This is used to
5101 // determine what constitutes a conflict and what the autorename strategy is. In
5102 // some situations, the conflict behavior is identical: (a) If the target path
5103 // doesn't refer to anything, the file is always written; no conflict. (b) If
5104 // the target path refers to a folder, it's always a conflict. (c) If the target
5105 // path refers to a file with identical contents, nothing gets written; no
5106 // conflict. The conflict checking differs in the case where there's a file at
5107 // the target path with contents different from the contents you're trying to
5108 // write.
5109 type WriteMode struct {
5110 dropbox.Tagged
5111 // Update : Overwrite if the given "rev" matches the existing file's "rev".
5112 // The autorename strategy is to append the string "conflicted copy" to the
5113 // file name. For example, "document.txt" might become "document (conflicted
5114 // copy).txt" or "document (Panda's conflicted copy).txt".
5115 Update string `json:"update,omitempty"`
5116 }
5117
5118 // Valid tag values for WriteMode
5119 const (
5120 WriteModeAdd = "add"
5121 WriteModeOverwrite = "overwrite"
5122 WriteModeUpdate = "update"
5123 )
5124
5125 // UnmarshalJSON deserializes into a WriteMode instance
5126 func (u *WriteMode) UnmarshalJSON(body []byte) error {
5127 type wrap struct {
5128 dropbox.Tagged
5129 // Update : Overwrite if the given "rev" matches the existing file's
5130 // "rev". The autorename strategy is to append the string "conflicted
5131 // copy" to the file name. For example, "document.txt" might become
5132 // "document (conflicted copy).txt" or "document (Panda's conflicted
5133 // copy).txt".
5134 Update string `json:"update,omitempty"`
5135 }
5136 var w wrap
5137 var err error
5138 if err = json.Unmarshal(body, &w); err != nil {
5139 return err
5140 }
5141 u.Tag = w.Tag
5142 switch u.Tag {
5143 case "update":
5144 u.Update = w.Update
5145
5146 if err != nil {
5147 return err
5148 }
5149 }
5150 return nil
5151 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package paper
21
22 import (
23 "encoding/json"
24 "io"
25 "log"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
29 )
30
31 // Client interface describes all routes in this namespace
32 type Client interface {
33 // DocsArchive : Marks the given Paper doc as archived. This action can be
34 // performed or undone by anyone with edit permissions to the doc. Note that
35 // this endpoint will continue to work for content created by users on the
36 // older version of Paper. To check which version of Paper a user is on, use
37 // /users/features/get_values. If the paper_as_files feature is enabled,
38 // then the user is running the new version of Paper. This endpoint will be
39 // retired in September 2020. Refer to the `Paper Migration Guide`
40 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
41 // for more information.
42 // Deprecated:
43 DocsArchive(arg *RefPaperDoc) (err error)
44 // DocsCreate : Creates a new Paper doc with the provided content. Note that
45 // this endpoint will continue to work for content created by users on the
46 // older version of Paper. To check which version of Paper a user is on, use
47 // /users/features/get_values. If the paper_as_files feature is enabled,
48 // then the user is running the new version of Paper. This endpoint will be
49 // retired in September 2020. Refer to the `Paper Migration Guide`
50 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
51 // for more information.
52 // Deprecated:
53 DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error)
54 // DocsDownload : Exports and downloads Paper doc either as HTML or
55 // markdown. Note that this endpoint will continue to work for content
56 // created by users on the older version of Paper. To check which version of
57 // Paper a user is on, use /users/features/get_values. If the paper_as_files
58 // feature is enabled, then the user is running the new version of Paper.
59 // Refer to the `Paper Migration Guide`
60 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
61 // for migration information.
62 // Deprecated:
63 DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error)
64 // DocsFolderUsersList : Lists the users who are explicitly invited to the
65 // Paper folder in which the Paper doc is contained. For private folders all
66 // users (including owner) shared on the folder are listed and for team
67 // folders all non-team users shared on the folder are returned. Note that
68 // this endpoint will continue to work for content created by users on the
69 // older version of Paper. To check which version of Paper a user is on, use
70 // /users/features/get_values. If the paper_as_files feature is enabled,
71 // then the user is running the new version of Paper. Refer to the `Paper
72 // Migration Guide`
73 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
74 // for migration information.
75 // Deprecated:
76 DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error)
77 // DocsFolderUsersListContinue : Once a cursor has been retrieved from
78 // `docsFolderUsersList`, use this to paginate through all users on the
79 // Paper folder. Note that this endpoint will continue to work for content
80 // created by users on the older version of Paper. To check which version of
81 // Paper a user is on, use /users/features/get_values. If the paper_as_files
82 // feature is enabled, then the user is running the new version of Paper.
83 // Refer to the `Paper Migration Guide`
84 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
85 // for migration information.
86 // Deprecated:
87 DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error)
88 // DocsGetFolderInfo : Retrieves folder information for the given Paper doc.
89 // This includes: - folder sharing policy; permissions for subfolders are
90 // set by the top-level folder. - full 'filepath', i.e. the list of
91 // folders (both folderId and folderName) from the root folder to the
92 // folder directly containing the Paper doc. If the Paper doc is not in any
93 // folder (aka unfiled) the response will be empty. Note that this endpoint
94 // will continue to work for content created by users on the older version
95 // of Paper. To check which version of Paper a user is on, use
96 // /users/features/get_values. If the paper_as_files feature is enabled,
97 // then the user is running the new version of Paper. Refer to the `Paper
98 // Migration Guide`
99 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
100 // for migration information.
101 // Deprecated:
102 DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error)
103 // DocsList : Return the list of all Paper docs according to the argument
104 // specifications. To iterate over through the full pagination, pass the
105 // cursor to `docsListContinue`. Note that this endpoint will continue to
106 // work for content created by users on the older version of Paper. To check
107 // which version of Paper a user is on, use /users/features/get_values. If
108 // the paper_as_files feature is enabled, then the user is running the new
109 // version of Paper. Refer to the `Paper Migration Guide`
110 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
111 // for migration information.
112 // Deprecated:
113 DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error)
114 // DocsListContinue : Once a cursor has been retrieved from `docsList`, use
115 // this to paginate through all Paper doc. Note that this endpoint will
116 // continue to work for content created by users on the older version of
117 // Paper. To check which version of Paper a user is on, use
118 // /users/features/get_values. If the paper_as_files feature is enabled,
119 // then the user is running the new version of Paper. Refer to the `Paper
120 // Migration Guide`
121 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
122 // for migration information.
123 // Deprecated:
124 DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error)
125 // DocsPermanentlyDelete : Permanently deletes the given Paper doc. This
126 // operation is final as the doc cannot be recovered. This action can be
127 // performed only by the doc owner. Note that this endpoint will continue to
128 // work for content created by users on the older version of Paper. To check
129 // which version of Paper a user is on, use /users/features/get_values. If
130 // the paper_as_files feature is enabled, then the user is running the new
131 // version of Paper. Refer to the `Paper Migration Guide`
132 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
133 // for migration information.
134 // Deprecated:
135 DocsPermanentlyDelete(arg *RefPaperDoc) (err error)
136 // DocsSharingPolicyGet : Gets the default sharing policy for the given
137 // Paper doc. Note that this endpoint will continue to work for content
138 // created by users on the older version of Paper. To check which version of
139 // Paper a user is on, use /users/features/get_values. If the paper_as_files
140 // feature is enabled, then the user is running the new version of Paper.
141 // Refer to the `Paper Migration Guide`
142 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
143 // for migration information.
144 // Deprecated:
145 DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error)
146 // DocsSharingPolicySet : Sets the default sharing policy for the given
147 // Paper doc. The default 'team_sharing_policy' can be changed only by
148 // teams, omit this field for personal accounts. The 'public_sharing_policy'
149 // policy can't be set to the value 'disabled' because this setting can be
150 // changed only via the team admin console. Note that this endpoint will
151 // continue to work for content created by users on the older version of
152 // Paper. To check which version of Paper a user is on, use
153 // /users/features/get_values. If the paper_as_files feature is enabled,
154 // then the user is running the new version of Paper. Refer to the `Paper
155 // Migration Guide`
156 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
157 // for migration information.
158 // Deprecated:
159 DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error)
160 // DocsUpdate : Updates an existing Paper doc with the provided content.
161 // Note that this endpoint will continue to work for content created by
162 // users on the older version of Paper. To check which version of Paper a
163 // user is on, use /users/features/get_values. If the paper_as_files feature
164 // is enabled, then the user is running the new version of Paper. This
165 // endpoint will be retired in September 2020. Refer to the `Paper Migration
166 // Guide`
167 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
168 // for more information.
169 // Deprecated:
170 DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error)
171 // DocsUsersAdd : Allows an owner or editor to add users to a Paper doc or
172 // change their permissions using their email address or Dropbox account ID.
173 // The doc owner's permissions cannot be changed. Note that this endpoint
174 // will continue to work for content created by users on the older version
175 // of Paper. To check which version of Paper a user is on, use
176 // /users/features/get_values. If the paper_as_files feature is enabled,
177 // then the user is running the new version of Paper. Refer to the `Paper
178 // Migration Guide`
179 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
180 // for migration information.
181 // Deprecated:
182 DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error)
183 // DocsUsersList : Lists all users who visited the Paper doc or users with
184 // explicit access. This call excludes users who have been removed. The list
185 // is sorted by the date of the visit or the share date. The list will
186 // include both users, the explicitly shared ones as well as those who came
187 // in using the Paper url link. Note that this endpoint will continue to
188 // work for content created by users on the older version of Paper. To check
189 // which version of Paper a user is on, use /users/features/get_values. If
190 // the paper_as_files feature is enabled, then the user is running the new
191 // version of Paper. Refer to the `Paper Migration Guide`
192 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
193 // for migration information.
194 // Deprecated:
195 DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error)
196 // DocsUsersListContinue : Once a cursor has been retrieved from
197 // `docsUsersList`, use this to paginate through all users on the Paper doc.
198 // Note that this endpoint will continue to work for content created by
199 // users on the older version of Paper. To check which version of Paper a
200 // user is on, use /users/features/get_values. If the paper_as_files feature
201 // is enabled, then the user is running the new version of Paper. Refer to
202 // the `Paper Migration Guide`
203 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
204 // for migration information.
205 // Deprecated:
206 DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error)
207 // DocsUsersRemove : Allows an owner or editor to remove users from a Paper
208 // doc using their email address or Dropbox account ID. The doc owner cannot
209 // be removed. Note that this endpoint will continue to work for content
210 // created by users on the older version of Paper. To check which version of
211 // Paper a user is on, use /users/features/get_values. If the paper_as_files
212 // feature is enabled, then the user is running the new version of Paper.
213 // Refer to the `Paper Migration Guide`
214 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
215 // for migration information.
216 // Deprecated:
217 DocsUsersRemove(arg *RemovePaperDocUser) (err error)
218 // FoldersCreate : Create a new Paper folder with the provided info. Note
219 // that this endpoint will continue to work for content created by users on
220 // the older version of Paper. To check which version of Paper a user is on,
221 // use /users/features/get_values. If the paper_as_files feature is enabled,
222 // then the user is running the new version of Paper. Refer to the `Paper
223 // Migration Guide`
224 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>
225 // for migration information.
226 // Deprecated:
227 FoldersCreate(arg *PaperFolderCreateArg) (res *PaperFolderCreateResult, err error)
228 }
229
230 type apiImpl dropbox.Context
231
232 //DocsArchiveAPIError is an error-wrapper for the docs/archive route
233 type DocsArchiveAPIError struct {
234 dropbox.APIError
235 EndpointError *DocLookupError `json:"error"`
236 }
237
238 func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) {
239 log.Printf("WARNING: API `DocsArchive` is deprecated")
240
241 req := dropbox.Request{
242 Host: "api",
243 Namespace: "paper",
244 Route: "docs/archive",
245 Auth: "user",
246 Style: "rpc",
247 Arg: arg,
248 ExtraHeaders: nil,
249 }
250
251 var resp []byte
252 var respBody io.ReadCloser
253 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
254 if err != nil {
255 var appErr DocsArchiveAPIError
256 err = auth.ParseError(err, &appErr)
257 if err == &appErr {
258 err = appErr
259 }
260 return
261 }
262
263 _ = resp
264 _ = respBody
265 return
266 }
267
268 //DocsCreateAPIError is an error-wrapper for the docs/create route
269 type DocsCreateAPIError struct {
270 dropbox.APIError
271 EndpointError *PaperDocCreateError `json:"error"`
272 }
273
274 func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
275 log.Printf("WARNING: API `DocsCreate` is deprecated")
276
277 req := dropbox.Request{
278 Host: "api",
279 Namespace: "paper",
280 Route: "docs/create",
281 Auth: "user",
282 Style: "upload",
283 Arg: arg,
284 ExtraHeaders: nil,
285 }
286
287 var resp []byte
288 var respBody io.ReadCloser
289 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
290 if err != nil {
291 var appErr DocsCreateAPIError
292 err = auth.ParseError(err, &appErr)
293 if err == &appErr {
294 err = appErr
295 }
296 return
297 }
298
299 err = json.Unmarshal(resp, &res)
300 if err != nil {
301 return
302 }
303
304 _ = respBody
305 return
306 }
307
308 //DocsDownloadAPIError is an error-wrapper for the docs/download route
309 type DocsDownloadAPIError struct {
310 dropbox.APIError
311 EndpointError *DocLookupError `json:"error"`
312 }
313
314 func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) {
315 log.Printf("WARNING: API `DocsDownload` is deprecated")
316
317 req := dropbox.Request{
318 Host: "api",
319 Namespace: "paper",
320 Route: "docs/download",
321 Auth: "user",
322 Style: "download",
323 Arg: arg,
324 ExtraHeaders: nil,
325 }
326
327 var resp []byte
328 var respBody io.ReadCloser
329 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
330 if err != nil {
331 var appErr DocsDownloadAPIError
332 err = auth.ParseError(err, &appErr)
333 if err == &appErr {
334 err = appErr
335 }
336 return
337 }
338
339 err = json.Unmarshal(resp, &res)
340 if err != nil {
341 return
342 }
343
344 content = respBody
345 return
346 }
347
348 //DocsFolderUsersListAPIError is an error-wrapper for the docs/folder_users/list route
349 type DocsFolderUsersListAPIError struct {
350 dropbox.APIError
351 EndpointError *DocLookupError `json:"error"`
352 }
353
354 func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) {
355 log.Printf("WARNING: API `DocsFolderUsersList` is deprecated")
356
357 req := dropbox.Request{
358 Host: "api",
359 Namespace: "paper",
360 Route: "docs/folder_users/list",
361 Auth: "user",
362 Style: "rpc",
363 Arg: arg,
364 ExtraHeaders: nil,
365 }
366
367 var resp []byte
368 var respBody io.ReadCloser
369 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
370 if err != nil {
371 var appErr DocsFolderUsersListAPIError
372 err = auth.ParseError(err, &appErr)
373 if err == &appErr {
374 err = appErr
375 }
376 return
377 }
378
379 err = json.Unmarshal(resp, &res)
380 if err != nil {
381 return
382 }
383
384 _ = respBody
385 return
386 }
387
388 //DocsFolderUsersListContinueAPIError is an error-wrapper for the docs/folder_users/list/continue route
389 type DocsFolderUsersListContinueAPIError struct {
390 dropbox.APIError
391 EndpointError *ListUsersCursorError `json:"error"`
392 }
393
394 func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) {
395 log.Printf("WARNING: API `DocsFolderUsersListContinue` is deprecated")
396
397 req := dropbox.Request{
398 Host: "api",
399 Namespace: "paper",
400 Route: "docs/folder_users/list/continue",
401 Auth: "user",
402 Style: "rpc",
403 Arg: arg,
404 ExtraHeaders: nil,
405 }
406
407 var resp []byte
408 var respBody io.ReadCloser
409 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
410 if err != nil {
411 var appErr DocsFolderUsersListContinueAPIError
412 err = auth.ParseError(err, &appErr)
413 if err == &appErr {
414 err = appErr
415 }
416 return
417 }
418
419 err = json.Unmarshal(resp, &res)
420 if err != nil {
421 return
422 }
423
424 _ = respBody
425 return
426 }
427
428 //DocsGetFolderInfoAPIError is an error-wrapper for the docs/get_folder_info route
429 type DocsGetFolderInfoAPIError struct {
430 dropbox.APIError
431 EndpointError *DocLookupError `json:"error"`
432 }
433
434 func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) {
435 log.Printf("WARNING: API `DocsGetFolderInfo` is deprecated")
436
437 req := dropbox.Request{
438 Host: "api",
439 Namespace: "paper",
440 Route: "docs/get_folder_info",
441 Auth: "user",
442 Style: "rpc",
443 Arg: arg,
444 ExtraHeaders: nil,
445 }
446
447 var resp []byte
448 var respBody io.ReadCloser
449 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
450 if err != nil {
451 var appErr DocsGetFolderInfoAPIError
452 err = auth.ParseError(err, &appErr)
453 if err == &appErr {
454 err = appErr
455 }
456 return
457 }
458
459 err = json.Unmarshal(resp, &res)
460 if err != nil {
461 return
462 }
463
464 _ = respBody
465 return
466 }
467
468 //DocsListAPIError is an error-wrapper for the docs/list route
469 type DocsListAPIError struct {
470 dropbox.APIError
471 EndpointError struct{} `json:"error"`
472 }
473
474 func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) {
475 log.Printf("WARNING: API `DocsList` is deprecated")
476
477 req := dropbox.Request{
478 Host: "api",
479 Namespace: "paper",
480 Route: "docs/list",
481 Auth: "user",
482 Style: "rpc",
483 Arg: arg,
484 ExtraHeaders: nil,
485 }
486
487 var resp []byte
488 var respBody io.ReadCloser
489 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
490 if err != nil {
491 var appErr DocsListAPIError
492 err = auth.ParseError(err, &appErr)
493 if err == &appErr {
494 err = appErr
495 }
496 return
497 }
498
499 err = json.Unmarshal(resp, &res)
500 if err != nil {
501 return
502 }
503
504 _ = respBody
505 return
506 }
507
508 //DocsListContinueAPIError is an error-wrapper for the docs/list/continue route
509 type DocsListContinueAPIError struct {
510 dropbox.APIError
511 EndpointError *ListDocsCursorError `json:"error"`
512 }
513
514 func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) {
515 log.Printf("WARNING: API `DocsListContinue` is deprecated")
516
517 req := dropbox.Request{
518 Host: "api",
519 Namespace: "paper",
520 Route: "docs/list/continue",
521 Auth: "user",
522 Style: "rpc",
523 Arg: arg,
524 ExtraHeaders: nil,
525 }
526
527 var resp []byte
528 var respBody io.ReadCloser
529 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
530 if err != nil {
531 var appErr DocsListContinueAPIError
532 err = auth.ParseError(err, &appErr)
533 if err == &appErr {
534 err = appErr
535 }
536 return
537 }
538
539 err = json.Unmarshal(resp, &res)
540 if err != nil {
541 return
542 }
543
544 _ = respBody
545 return
546 }
547
548 //DocsPermanentlyDeleteAPIError is an error-wrapper for the docs/permanently_delete route
549 type DocsPermanentlyDeleteAPIError struct {
550 dropbox.APIError
551 EndpointError *DocLookupError `json:"error"`
552 }
553
554 func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) {
555 log.Printf("WARNING: API `DocsPermanentlyDelete` is deprecated")
556
557 req := dropbox.Request{
558 Host: "api",
559 Namespace: "paper",
560 Route: "docs/permanently_delete",
561 Auth: "user",
562 Style: "rpc",
563 Arg: arg,
564 ExtraHeaders: nil,
565 }
566
567 var resp []byte
568 var respBody io.ReadCloser
569 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
570 if err != nil {
571 var appErr DocsPermanentlyDeleteAPIError
572 err = auth.ParseError(err, &appErr)
573 if err == &appErr {
574 err = appErr
575 }
576 return
577 }
578
579 _ = resp
580 _ = respBody
581 return
582 }
583
584 //DocsSharingPolicyGetAPIError is an error-wrapper for the docs/sharing_policy/get route
585 type DocsSharingPolicyGetAPIError struct {
586 dropbox.APIError
587 EndpointError *DocLookupError `json:"error"`
588 }
589
590 func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) {
591 log.Printf("WARNING: API `DocsSharingPolicyGet` is deprecated")
592
593 req := dropbox.Request{
594 Host: "api",
595 Namespace: "paper",
596 Route: "docs/sharing_policy/get",
597 Auth: "user",
598 Style: "rpc",
599 Arg: arg,
600 ExtraHeaders: nil,
601 }
602
603 var resp []byte
604 var respBody io.ReadCloser
605 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
606 if err != nil {
607 var appErr DocsSharingPolicyGetAPIError
608 err = auth.ParseError(err, &appErr)
609 if err == &appErr {
610 err = appErr
611 }
612 return
613 }
614
615 err = json.Unmarshal(resp, &res)
616 if err != nil {
617 return
618 }
619
620 _ = respBody
621 return
622 }
623
624 //DocsSharingPolicySetAPIError is an error-wrapper for the docs/sharing_policy/set route
625 type DocsSharingPolicySetAPIError struct {
626 dropbox.APIError
627 EndpointError *DocLookupError `json:"error"`
628 }
629
630 func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) {
631 log.Printf("WARNING: API `DocsSharingPolicySet` is deprecated")
632
633 req := dropbox.Request{
634 Host: "api",
635 Namespace: "paper",
636 Route: "docs/sharing_policy/set",
637 Auth: "user",
638 Style: "rpc",
639 Arg: arg,
640 ExtraHeaders: nil,
641 }
642
643 var resp []byte
644 var respBody io.ReadCloser
645 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
646 if err != nil {
647 var appErr DocsSharingPolicySetAPIError
648 err = auth.ParseError(err, &appErr)
649 if err == &appErr {
650 err = appErr
651 }
652 return
653 }
654
655 _ = resp
656 _ = respBody
657 return
658 }
659
660 //DocsUpdateAPIError is an error-wrapper for the docs/update route
661 type DocsUpdateAPIError struct {
662 dropbox.APIError
663 EndpointError *PaperDocUpdateError `json:"error"`
664 }
665
666 func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) {
667 log.Printf("WARNING: API `DocsUpdate` is deprecated")
668
669 req := dropbox.Request{
670 Host: "api",
671 Namespace: "paper",
672 Route: "docs/update",
673 Auth: "user",
674 Style: "upload",
675 Arg: arg,
676 ExtraHeaders: nil,
677 }
678
679 var resp []byte
680 var respBody io.ReadCloser
681 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, content)
682 if err != nil {
683 var appErr DocsUpdateAPIError
684 err = auth.ParseError(err, &appErr)
685 if err == &appErr {
686 err = appErr
687 }
688 return
689 }
690
691 err = json.Unmarshal(resp, &res)
692 if err != nil {
693 return
694 }
695
696 _ = respBody
697 return
698 }
699
700 //DocsUsersAddAPIError is an error-wrapper for the docs/users/add route
701 type DocsUsersAddAPIError struct {
702 dropbox.APIError
703 EndpointError *DocLookupError `json:"error"`
704 }
705
706 func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) {
707 log.Printf("WARNING: API `DocsUsersAdd` is deprecated")
708
709 req := dropbox.Request{
710 Host: "api",
711 Namespace: "paper",
712 Route: "docs/users/add",
713 Auth: "user",
714 Style: "rpc",
715 Arg: arg,
716 ExtraHeaders: nil,
717 }
718
719 var resp []byte
720 var respBody io.ReadCloser
721 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
722 if err != nil {
723 var appErr DocsUsersAddAPIError
724 err = auth.ParseError(err, &appErr)
725 if err == &appErr {
726 err = appErr
727 }
728 return
729 }
730
731 err = json.Unmarshal(resp, &res)
732 if err != nil {
733 return
734 }
735
736 _ = respBody
737 return
738 }
739
740 //DocsUsersListAPIError is an error-wrapper for the docs/users/list route
741 type DocsUsersListAPIError struct {
742 dropbox.APIError
743 EndpointError *DocLookupError `json:"error"`
744 }
745
746 func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) {
747 log.Printf("WARNING: API `DocsUsersList` is deprecated")
748
749 req := dropbox.Request{
750 Host: "api",
751 Namespace: "paper",
752 Route: "docs/users/list",
753 Auth: "user",
754 Style: "rpc",
755 Arg: arg,
756 ExtraHeaders: nil,
757 }
758
759 var resp []byte
760 var respBody io.ReadCloser
761 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
762 if err != nil {
763 var appErr DocsUsersListAPIError
764 err = auth.ParseError(err, &appErr)
765 if err == &appErr {
766 err = appErr
767 }
768 return
769 }
770
771 err = json.Unmarshal(resp, &res)
772 if err != nil {
773 return
774 }
775
776 _ = respBody
777 return
778 }
779
780 //DocsUsersListContinueAPIError is an error-wrapper for the docs/users/list/continue route
781 type DocsUsersListContinueAPIError struct {
782 dropbox.APIError
783 EndpointError *ListUsersCursorError `json:"error"`
784 }
785
786 func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) {
787 log.Printf("WARNING: API `DocsUsersListContinue` is deprecated")
788
789 req := dropbox.Request{
790 Host: "api",
791 Namespace: "paper",
792 Route: "docs/users/list/continue",
793 Auth: "user",
794 Style: "rpc",
795 Arg: arg,
796 ExtraHeaders: nil,
797 }
798
799 var resp []byte
800 var respBody io.ReadCloser
801 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
802 if err != nil {
803 var appErr DocsUsersListContinueAPIError
804 err = auth.ParseError(err, &appErr)
805 if err == &appErr {
806 err = appErr
807 }
808 return
809 }
810
811 err = json.Unmarshal(resp, &res)
812 if err != nil {
813 return
814 }
815
816 _ = respBody
817 return
818 }
819
820 //DocsUsersRemoveAPIError is an error-wrapper for the docs/users/remove route
821 type DocsUsersRemoveAPIError struct {
822 dropbox.APIError
823 EndpointError *DocLookupError `json:"error"`
824 }
825
826 func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) {
827 log.Printf("WARNING: API `DocsUsersRemove` is deprecated")
828
829 req := dropbox.Request{
830 Host: "api",
831 Namespace: "paper",
832 Route: "docs/users/remove",
833 Auth: "user",
834 Style: "rpc",
835 Arg: arg,
836 ExtraHeaders: nil,
837 }
838
839 var resp []byte
840 var respBody io.ReadCloser
841 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
842 if err != nil {
843 var appErr DocsUsersRemoveAPIError
844 err = auth.ParseError(err, &appErr)
845 if err == &appErr {
846 err = appErr
847 }
848 return
849 }
850
851 _ = resp
852 _ = respBody
853 return
854 }
855
856 //FoldersCreateAPIError is an error-wrapper for the folders/create route
857 type FoldersCreateAPIError struct {
858 dropbox.APIError
859 EndpointError *PaperFolderCreateError `json:"error"`
860 }
861
862 func (dbx *apiImpl) FoldersCreate(arg *PaperFolderCreateArg) (res *PaperFolderCreateResult, err error) {
863 log.Printf("WARNING: API `FoldersCreate` is deprecated")
864
865 req := dropbox.Request{
866 Host: "api",
867 Namespace: "paper",
868 Route: "folders/create",
869 Auth: "user",
870 Style: "rpc",
871 Arg: arg,
872 ExtraHeaders: nil,
873 }
874
875 var resp []byte
876 var respBody io.ReadCloser
877 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
878 if err != nil {
879 var appErr FoldersCreateAPIError
880 err = auth.ParseError(err, &appErr)
881 if err == &appErr {
882 err = appErr
883 }
884 return
885 }
886
887 err = json.Unmarshal(resp, &res)
888 if err != nil {
889 return
890 }
891
892 _ = respBody
893 return
894 }
895
896 // New returns a Client implementation for this namespace
897 func New(c dropbox.Config) Client {
898 ctx := apiImpl(dropbox.NewContext(c))
899 return &ctx
900 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package paper : This namespace contains endpoints and data types for managing
21 // docs and folders in Dropbox Paper. New Paper users will see docs they create
22 // in their filesystem as '.paper' files alongside their other Dropbox content.
23 // The /paper endpoints are being deprecated and you'll need to use /files and
24 // /sharing endpoints to interact with their Paper content. Read more in the
25 // `Paper Migration Guide`
26 // <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>.
27 package paper
28
29 import (
30 "encoding/json"
31 "time"
32
33 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
34 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing"
35 )
36
37 // AddMember : has no documentation (yet)
38 type AddMember struct {
39 // PermissionLevel : Permission for the user.
40 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
41 // Member : User which should be added to the Paper doc. Specify only email
42 // address or Dropbox account ID.
43 Member *sharing.MemberSelector `json:"member"`
44 }
45
46 // NewAddMember returns a new AddMember instance
47 func NewAddMember(Member *sharing.MemberSelector) *AddMember {
48 s := new(AddMember)
49 s.Member = Member
50 s.PermissionLevel = &PaperDocPermissionLevel{Tagged: dropbox.Tagged{Tag: "edit"}}
51 return s
52 }
53
54 // RefPaperDoc : has no documentation (yet)
55 type RefPaperDoc struct {
56 // DocId : The Paper doc ID.
57 DocId string `json:"doc_id"`
58 }
59
60 // NewRefPaperDoc returns a new RefPaperDoc instance
61 func NewRefPaperDoc(DocId string) *RefPaperDoc {
62 s := new(RefPaperDoc)
63 s.DocId = DocId
64 return s
65 }
66
67 // AddPaperDocUser : has no documentation (yet)
68 type AddPaperDocUser struct {
69 RefPaperDoc
70 // Members : User which should be added to the Paper doc. Specify only email
71 // address or Dropbox account ID.
72 Members []*AddMember `json:"members"`
73 // CustomMessage : A personal message that will be emailed to each
74 // successfully added member.
75 CustomMessage string `json:"custom_message,omitempty"`
76 // Quiet : Clients should set this to true if no email message shall be sent
77 // to added users.
78 Quiet bool `json:"quiet"`
79 }
80
81 // NewAddPaperDocUser returns a new AddPaperDocUser instance
82 func NewAddPaperDocUser(DocId string, Members []*AddMember) *AddPaperDocUser {
83 s := new(AddPaperDocUser)
84 s.DocId = DocId
85 s.Members = Members
86 s.Quiet = false
87 return s
88 }
89
90 // AddPaperDocUserMemberResult : Per-member result for `docsUsersAdd`.
91 type AddPaperDocUserMemberResult struct {
92 // Member : One of specified input members.
93 Member *sharing.MemberSelector `json:"member"`
94 // Result : The outcome of the action on this member.
95 Result *AddPaperDocUserResult `json:"result"`
96 }
97
98 // NewAddPaperDocUserMemberResult returns a new AddPaperDocUserMemberResult instance
99 func NewAddPaperDocUserMemberResult(Member *sharing.MemberSelector, Result *AddPaperDocUserResult) *AddPaperDocUserMemberResult {
100 s := new(AddPaperDocUserMemberResult)
101 s.Member = Member
102 s.Result = Result
103 return s
104 }
105
106 // AddPaperDocUserResult : has no documentation (yet)
107 type AddPaperDocUserResult struct {
108 dropbox.Tagged
109 }
110
111 // Valid tag values for AddPaperDocUserResult
112 const (
113 AddPaperDocUserResultSuccess = "success"
114 AddPaperDocUserResultUnknownError = "unknown_error"
115 AddPaperDocUserResultSharingOutsideTeamDisabled = "sharing_outside_team_disabled"
116 AddPaperDocUserResultDailyLimitReached = "daily_limit_reached"
117 AddPaperDocUserResultUserIsOwner = "user_is_owner"
118 AddPaperDocUserResultFailedUserDataRetrieval = "failed_user_data_retrieval"
119 AddPaperDocUserResultPermissionAlreadyGranted = "permission_already_granted"
120 AddPaperDocUserResultOther = "other"
121 )
122
123 // Cursor : has no documentation (yet)
124 type Cursor struct {
125 // Value : The actual cursor value.
126 Value string `json:"value"`
127 // Expiration : Expiration time of `value`. Some cursors might have
128 // expiration time assigned. This is a UTC value after which the cursor is
129 // no longer valid and the API starts returning an error. If cursor expires
130 // a new one needs to be obtained and pagination needs to be restarted. Some
131 // cursors might be short-lived some cursors might be long-lived. This
132 // really depends on the sorting type and order, e.g.: 1. on one hand,
133 // listing docs created by the user, sorted by the created time ascending
134 // will have undefinite expiration because the results cannot change while
135 // the iteration is happening. This cursor would be suitable for long term
136 // polling. 2. on the other hand, listing docs sorted by the last modified
137 // time will have a very short expiration as docs do get modified very often
138 // and the modified time can be changed while the iteration is happening
139 // thus altering the results.
140 Expiration *time.Time `json:"expiration,omitempty"`
141 }
142
143 // NewCursor returns a new Cursor instance
144 func NewCursor(Value string) *Cursor {
145 s := new(Cursor)
146 s.Value = Value
147 return s
148 }
149
150 // PaperApiBaseError : has no documentation (yet)
151 type PaperApiBaseError struct {
152 dropbox.Tagged
153 }
154
155 // Valid tag values for PaperApiBaseError
156 const (
157 PaperApiBaseErrorInsufficientPermissions = "insufficient_permissions"
158 PaperApiBaseErrorOther = "other"
159 )
160
161 // DocLookupError : has no documentation (yet)
162 type DocLookupError struct {
163 dropbox.Tagged
164 }
165
166 // Valid tag values for DocLookupError
167 const (
168 DocLookupErrorInsufficientPermissions = "insufficient_permissions"
169 DocLookupErrorOther = "other"
170 DocLookupErrorDocNotFound = "doc_not_found"
171 )
172
173 // DocSubscriptionLevel : The subscription level of a Paper doc.
174 type DocSubscriptionLevel struct {
175 dropbox.Tagged
176 }
177
178 // Valid tag values for DocSubscriptionLevel
179 const (
180 DocSubscriptionLevelDefault = "default"
181 DocSubscriptionLevelIgnore = "ignore"
182 DocSubscriptionLevelEvery = "every"
183 DocSubscriptionLevelNoEmail = "no_email"
184 )
185
186 // ExportFormat : The desired export format of the Paper doc.
187 type ExportFormat struct {
188 dropbox.Tagged
189 }
190
191 // Valid tag values for ExportFormat
192 const (
193 ExportFormatHtml = "html"
194 ExportFormatMarkdown = "markdown"
195 ExportFormatOther = "other"
196 )
197
198 // Folder : Data structure representing a Paper folder.
199 type Folder struct {
200 // Id : Paper folder ID. This ID uniquely identifies the folder.
201 Id string `json:"id"`
202 // Name : Paper folder name.
203 Name string `json:"name"`
204 }
205
206 // NewFolder returns a new Folder instance
207 func NewFolder(Id string, Name string) *Folder {
208 s := new(Folder)
209 s.Id = Id
210 s.Name = Name
211 return s
212 }
213
214 // FolderSharingPolicyType : The sharing policy of a Paper folder. The sharing
215 // policy of subfolders is inherited from the root folder.
216 type FolderSharingPolicyType struct {
217 dropbox.Tagged
218 }
219
220 // Valid tag values for FolderSharingPolicyType
221 const (
222 FolderSharingPolicyTypeTeam = "team"
223 FolderSharingPolicyTypeInviteOnly = "invite_only"
224 )
225
226 // FolderSubscriptionLevel : The subscription level of a Paper folder.
227 type FolderSubscriptionLevel struct {
228 dropbox.Tagged
229 }
230
231 // Valid tag values for FolderSubscriptionLevel
232 const (
233 FolderSubscriptionLevelNone = "none"
234 FolderSubscriptionLevelActivityOnly = "activity_only"
235 FolderSubscriptionLevelDailyEmails = "daily_emails"
236 FolderSubscriptionLevelWeeklyEmails = "weekly_emails"
237 )
238
239 // FoldersContainingPaperDoc : Metadata about Paper folders containing the
240 // specififed Paper doc.
241 type FoldersContainingPaperDoc struct {
242 // FolderSharingPolicyType : The sharing policy of the folder containing the
243 // Paper doc.
244 FolderSharingPolicyType *FolderSharingPolicyType `json:"folder_sharing_policy_type,omitempty"`
245 // Folders : The folder path. If present the first folder is the root
246 // folder.
247 Folders []*Folder `json:"folders,omitempty"`
248 }
249
250 // NewFoldersContainingPaperDoc returns a new FoldersContainingPaperDoc instance
251 func NewFoldersContainingPaperDoc() *FoldersContainingPaperDoc {
252 s := new(FoldersContainingPaperDoc)
253 return s
254 }
255
256 // ImportFormat : The import format of the incoming data.
257 type ImportFormat struct {
258 dropbox.Tagged
259 }
260
261 // Valid tag values for ImportFormat
262 const (
263 ImportFormatHtml = "html"
264 ImportFormatMarkdown = "markdown"
265 ImportFormatPlainText = "plain_text"
266 ImportFormatOther = "other"
267 )
268
269 // InviteeInfoWithPermissionLevel : has no documentation (yet)
270 type InviteeInfoWithPermissionLevel struct {
271 // Invitee : Email address invited to the Paper doc.
272 Invitee *sharing.InviteeInfo `json:"invitee"`
273 // PermissionLevel : Permission level for the invitee.
274 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
275 }
276
277 // NewInviteeInfoWithPermissionLevel returns a new InviteeInfoWithPermissionLevel instance
278 func NewInviteeInfoWithPermissionLevel(Invitee *sharing.InviteeInfo, PermissionLevel *PaperDocPermissionLevel) *InviteeInfoWithPermissionLevel {
279 s := new(InviteeInfoWithPermissionLevel)
280 s.Invitee = Invitee
281 s.PermissionLevel = PermissionLevel
282 return s
283 }
284
285 // ListDocsCursorError : has no documentation (yet)
286 type ListDocsCursorError struct {
287 dropbox.Tagged
288 // CursorError : has no documentation (yet)
289 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
290 }
291
292 // Valid tag values for ListDocsCursorError
293 const (
294 ListDocsCursorErrorCursorError = "cursor_error"
295 ListDocsCursorErrorOther = "other"
296 )
297
298 // UnmarshalJSON deserializes into a ListDocsCursorError instance
299 func (u *ListDocsCursorError) UnmarshalJSON(body []byte) error {
300 type wrap struct {
301 dropbox.Tagged
302 // CursorError : has no documentation (yet)
303 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
304 }
305 var w wrap
306 var err error
307 if err = json.Unmarshal(body, &w); err != nil {
308 return err
309 }
310 u.Tag = w.Tag
311 switch u.Tag {
312 case "cursor_error":
313 u.CursorError = w.CursorError
314
315 if err != nil {
316 return err
317 }
318 }
319 return nil
320 }
321
322 // ListPaperDocsArgs : has no documentation (yet)
323 type ListPaperDocsArgs struct {
324 // FilterBy : Allows user to specify how the Paper docs should be filtered.
325 FilterBy *ListPaperDocsFilterBy `json:"filter_by"`
326 // SortBy : Allows user to specify how the Paper docs should be sorted.
327 SortBy *ListPaperDocsSortBy `json:"sort_by"`
328 // SortOrder : Allows user to specify the sort order of the result.
329 SortOrder *ListPaperDocsSortOrder `json:"sort_order"`
330 // Limit : Size limit per batch. The maximum number of docs that can be
331 // retrieved per batch is 1000. Higher value results in invalid arguments
332 // error.
333 Limit int32 `json:"limit"`
334 }
335
336 // NewListPaperDocsArgs returns a new ListPaperDocsArgs instance
337 func NewListPaperDocsArgs() *ListPaperDocsArgs {
338 s := new(ListPaperDocsArgs)
339 s.FilterBy = &ListPaperDocsFilterBy{Tagged: dropbox.Tagged{Tag: "docs_accessed"}}
340 s.SortBy = &ListPaperDocsSortBy{Tagged: dropbox.Tagged{Tag: "accessed"}}
341 s.SortOrder = &ListPaperDocsSortOrder{Tagged: dropbox.Tagged{Tag: "ascending"}}
342 s.Limit = 1000
343 return s
344 }
345
346 // ListPaperDocsContinueArgs : has no documentation (yet)
347 type ListPaperDocsContinueArgs struct {
348 // Cursor : The cursor obtained from `docsList` or `docsListContinue`.
349 // Allows for pagination.
350 Cursor string `json:"cursor"`
351 }
352
353 // NewListPaperDocsContinueArgs returns a new ListPaperDocsContinueArgs instance
354 func NewListPaperDocsContinueArgs(Cursor string) *ListPaperDocsContinueArgs {
355 s := new(ListPaperDocsContinueArgs)
356 s.Cursor = Cursor
357 return s
358 }
359
360 // ListPaperDocsFilterBy : has no documentation (yet)
361 type ListPaperDocsFilterBy struct {
362 dropbox.Tagged
363 }
364
365 // Valid tag values for ListPaperDocsFilterBy
366 const (
367 ListPaperDocsFilterByDocsAccessed = "docs_accessed"
368 ListPaperDocsFilterByDocsCreated = "docs_created"
369 ListPaperDocsFilterByOther = "other"
370 )
371
372 // ListPaperDocsResponse : has no documentation (yet)
373 type ListPaperDocsResponse struct {
374 // DocIds : The list of Paper doc IDs that can be used to access the given
375 // Paper docs or supplied to other API methods. The list is sorted in the
376 // order specified by the initial call to `docsList`.
377 DocIds []string `json:"doc_ids"`
378 // Cursor : Pass the cursor into `docsListContinue` to paginate through all
379 // files. The cursor preserves all properties as specified in the original
380 // call to `docsList`.
381 Cursor *Cursor `json:"cursor"`
382 // HasMore : Will be set to True if a subsequent call with the provided
383 // cursor to `docsListContinue` returns immediately with some results. If
384 // set to False please allow some delay before making another call to
385 // `docsListContinue`.
386 HasMore bool `json:"has_more"`
387 }
388
389 // NewListPaperDocsResponse returns a new ListPaperDocsResponse instance
390 func NewListPaperDocsResponse(DocIds []string, Cursor *Cursor, HasMore bool) *ListPaperDocsResponse {
391 s := new(ListPaperDocsResponse)
392 s.DocIds = DocIds
393 s.Cursor = Cursor
394 s.HasMore = HasMore
395 return s
396 }
397
398 // ListPaperDocsSortBy : has no documentation (yet)
399 type ListPaperDocsSortBy struct {
400 dropbox.Tagged
401 }
402
403 // Valid tag values for ListPaperDocsSortBy
404 const (
405 ListPaperDocsSortByAccessed = "accessed"
406 ListPaperDocsSortByModified = "modified"
407 ListPaperDocsSortByCreated = "created"
408 ListPaperDocsSortByOther = "other"
409 )
410
411 // ListPaperDocsSortOrder : has no documentation (yet)
412 type ListPaperDocsSortOrder struct {
413 dropbox.Tagged
414 }
415
416 // Valid tag values for ListPaperDocsSortOrder
417 const (
418 ListPaperDocsSortOrderAscending = "ascending"
419 ListPaperDocsSortOrderDescending = "descending"
420 ListPaperDocsSortOrderOther = "other"
421 )
422
423 // ListUsersCursorError : has no documentation (yet)
424 type ListUsersCursorError struct {
425 dropbox.Tagged
426 // CursorError : has no documentation (yet)
427 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
428 }
429
430 // Valid tag values for ListUsersCursorError
431 const (
432 ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions"
433 ListUsersCursorErrorOther = "other"
434 ListUsersCursorErrorDocNotFound = "doc_not_found"
435 ListUsersCursorErrorCursorError = "cursor_error"
436 )
437
438 // UnmarshalJSON deserializes into a ListUsersCursorError instance
439 func (u *ListUsersCursorError) UnmarshalJSON(body []byte) error {
440 type wrap struct {
441 dropbox.Tagged
442 // CursorError : has no documentation (yet)
443 CursorError *PaperApiCursorError `json:"cursor_error,omitempty"`
444 }
445 var w wrap
446 var err error
447 if err = json.Unmarshal(body, &w); err != nil {
448 return err
449 }
450 u.Tag = w.Tag
451 switch u.Tag {
452 case "cursor_error":
453 u.CursorError = w.CursorError
454
455 if err != nil {
456 return err
457 }
458 }
459 return nil
460 }
461
462 // ListUsersOnFolderArgs : has no documentation (yet)
463 type ListUsersOnFolderArgs struct {
464 RefPaperDoc
465 // Limit : Size limit per batch. The maximum number of users that can be
466 // retrieved per batch is 1000. Higher value results in invalid arguments
467 // error.
468 Limit int32 `json:"limit"`
469 }
470
471 // NewListUsersOnFolderArgs returns a new ListUsersOnFolderArgs instance
472 func NewListUsersOnFolderArgs(DocId string) *ListUsersOnFolderArgs {
473 s := new(ListUsersOnFolderArgs)
474 s.DocId = DocId
475 s.Limit = 1000
476 return s
477 }
478
479 // ListUsersOnFolderContinueArgs : has no documentation (yet)
480 type ListUsersOnFolderContinueArgs struct {
481 RefPaperDoc
482 // Cursor : The cursor obtained from `docsFolderUsersList` or
483 // `docsFolderUsersListContinue`. Allows for pagination.
484 Cursor string `json:"cursor"`
485 }
486
487 // NewListUsersOnFolderContinueArgs returns a new ListUsersOnFolderContinueArgs instance
488 func NewListUsersOnFolderContinueArgs(DocId string, Cursor string) *ListUsersOnFolderContinueArgs {
489 s := new(ListUsersOnFolderContinueArgs)
490 s.DocId = DocId
491 s.Cursor = Cursor
492 return s
493 }
494
495 // ListUsersOnFolderResponse : has no documentation (yet)
496 type ListUsersOnFolderResponse struct {
497 // Invitees : List of email addresses that are invited on the Paper folder.
498 Invitees []*sharing.InviteeInfo `json:"invitees"`
499 // Users : List of users that are invited on the Paper folder.
500 Users []*sharing.UserInfo `json:"users"`
501 // Cursor : Pass the cursor into `docsFolderUsersListContinue` to paginate
502 // through all users. The cursor preserves all properties as specified in
503 // the original call to `docsFolderUsersList`.
504 Cursor *Cursor `json:"cursor"`
505 // HasMore : Will be set to True if a subsequent call with the provided
506 // cursor to `docsFolderUsersListContinue` returns immediately with some
507 // results. If set to False please allow some delay before making another
508 // call to `docsFolderUsersListContinue`.
509 HasMore bool `json:"has_more"`
510 }
511
512 // NewListUsersOnFolderResponse returns a new ListUsersOnFolderResponse instance
513 func NewListUsersOnFolderResponse(Invitees []*sharing.InviteeInfo, Users []*sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnFolderResponse {
514 s := new(ListUsersOnFolderResponse)
515 s.Invitees = Invitees
516 s.Users = Users
517 s.Cursor = Cursor
518 s.HasMore = HasMore
519 return s
520 }
521
522 // ListUsersOnPaperDocArgs : has no documentation (yet)
523 type ListUsersOnPaperDocArgs struct {
524 RefPaperDoc
525 // Limit : Size limit per batch. The maximum number of users that can be
526 // retrieved per batch is 1000. Higher value results in invalid arguments
527 // error.
528 Limit int32 `json:"limit"`
529 // FilterBy : Specify this attribute if you want to obtain users that have
530 // already accessed the Paper doc.
531 FilterBy *UserOnPaperDocFilter `json:"filter_by"`
532 }
533
534 // NewListUsersOnPaperDocArgs returns a new ListUsersOnPaperDocArgs instance
535 func NewListUsersOnPaperDocArgs(DocId string) *ListUsersOnPaperDocArgs {
536 s := new(ListUsersOnPaperDocArgs)
537 s.DocId = DocId
538 s.Limit = 1000
539 s.FilterBy = &UserOnPaperDocFilter{Tagged: dropbox.Tagged{Tag: "shared"}}
540 return s
541 }
542
543 // ListUsersOnPaperDocContinueArgs : has no documentation (yet)
544 type ListUsersOnPaperDocContinueArgs struct {
545 RefPaperDoc
546 // Cursor : The cursor obtained from `docsUsersList` or
547 // `docsUsersListContinue`. Allows for pagination.
548 Cursor string `json:"cursor"`
549 }
550
551 // NewListUsersOnPaperDocContinueArgs returns a new ListUsersOnPaperDocContinueArgs instance
552 func NewListUsersOnPaperDocContinueArgs(DocId string, Cursor string) *ListUsersOnPaperDocContinueArgs {
553 s := new(ListUsersOnPaperDocContinueArgs)
554 s.DocId = DocId
555 s.Cursor = Cursor
556 return s
557 }
558
559 // ListUsersOnPaperDocResponse : has no documentation (yet)
560 type ListUsersOnPaperDocResponse struct {
561 // Invitees : List of email addresses with their respective permission
562 // levels that are invited on the Paper doc.
563 Invitees []*InviteeInfoWithPermissionLevel `json:"invitees"`
564 // Users : List of users with their respective permission levels that are
565 // invited on the Paper folder.
566 Users []*UserInfoWithPermissionLevel `json:"users"`
567 // DocOwner : The Paper doc owner. This field is populated on every single
568 // response.
569 DocOwner *sharing.UserInfo `json:"doc_owner"`
570 // Cursor : Pass the cursor into `docsUsersListContinue` to paginate through
571 // all users. The cursor preserves all properties as specified in the
572 // original call to `docsUsersList`.
573 Cursor *Cursor `json:"cursor"`
574 // HasMore : Will be set to True if a subsequent call with the provided
575 // cursor to `docsUsersListContinue` returns immediately with some results.
576 // If set to False please allow some delay before making another call to
577 // `docsUsersListContinue`.
578 HasMore bool `json:"has_more"`
579 }
580
581 // NewListUsersOnPaperDocResponse returns a new ListUsersOnPaperDocResponse instance
582 func NewListUsersOnPaperDocResponse(Invitees []*InviteeInfoWithPermissionLevel, Users []*UserInfoWithPermissionLevel, DocOwner *sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnPaperDocResponse {
583 s := new(ListUsersOnPaperDocResponse)
584 s.Invitees = Invitees
585 s.Users = Users
586 s.DocOwner = DocOwner
587 s.Cursor = Cursor
588 s.HasMore = HasMore
589 return s
590 }
591
592 // PaperApiCursorError : has no documentation (yet)
593 type PaperApiCursorError struct {
594 dropbox.Tagged
595 }
596
597 // Valid tag values for PaperApiCursorError
598 const (
599 PaperApiCursorErrorExpiredCursor = "expired_cursor"
600 PaperApiCursorErrorInvalidCursor = "invalid_cursor"
601 PaperApiCursorErrorWrongUserInCursor = "wrong_user_in_cursor"
602 PaperApiCursorErrorReset = "reset"
603 PaperApiCursorErrorOther = "other"
604 )
605
606 // PaperDocCreateArgs : has no documentation (yet)
607 type PaperDocCreateArgs struct {
608 // ParentFolderId : The Paper folder ID where the Paper document should be
609 // created. The API user has to have write access to this folder or error is
610 // thrown.
611 ParentFolderId string `json:"parent_folder_id,omitempty"`
612 // ImportFormat : The format of provided data.
613 ImportFormat *ImportFormat `json:"import_format"`
614 }
615
616 // NewPaperDocCreateArgs returns a new PaperDocCreateArgs instance
617 func NewPaperDocCreateArgs(ImportFormat *ImportFormat) *PaperDocCreateArgs {
618 s := new(PaperDocCreateArgs)
619 s.ImportFormat = ImportFormat
620 return s
621 }
622
623 // PaperDocCreateError : has no documentation (yet)
624 type PaperDocCreateError struct {
625 dropbox.Tagged
626 }
627
628 // Valid tag values for PaperDocCreateError
629 const (
630 PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions"
631 PaperDocCreateErrorOther = "other"
632 PaperDocCreateErrorContentMalformed = "content_malformed"
633 PaperDocCreateErrorFolderNotFound = "folder_not_found"
634 PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded"
635 PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded"
636 )
637
638 // PaperDocCreateUpdateResult : has no documentation (yet)
639 type PaperDocCreateUpdateResult struct {
640 // DocId : Doc ID of the newly created doc.
641 DocId string `json:"doc_id"`
642 // Revision : The Paper doc revision. Simply an ever increasing number.
643 Revision int64 `json:"revision"`
644 // Title : The Paper doc title.
645 Title string `json:"title"`
646 }
647
648 // NewPaperDocCreateUpdateResult returns a new PaperDocCreateUpdateResult instance
649 func NewPaperDocCreateUpdateResult(DocId string, Revision int64, Title string) *PaperDocCreateUpdateResult {
650 s := new(PaperDocCreateUpdateResult)
651 s.DocId = DocId
652 s.Revision = Revision
653 s.Title = Title
654 return s
655 }
656
657 // PaperDocExport : has no documentation (yet)
658 type PaperDocExport struct {
659 RefPaperDoc
660 // ExportFormat : has no documentation (yet)
661 ExportFormat *ExportFormat `json:"export_format"`
662 }
663
664 // NewPaperDocExport returns a new PaperDocExport instance
665 func NewPaperDocExport(DocId string, ExportFormat *ExportFormat) *PaperDocExport {
666 s := new(PaperDocExport)
667 s.DocId = DocId
668 s.ExportFormat = ExportFormat
669 return s
670 }
671
672 // PaperDocExportResult : has no documentation (yet)
673 type PaperDocExportResult struct {
674 // Owner : The Paper doc owner's email address.
675 Owner string `json:"owner"`
676 // Title : The Paper doc title.
677 Title string `json:"title"`
678 // Revision : The Paper doc revision. Simply an ever increasing number.
679 Revision int64 `json:"revision"`
680 // MimeType : MIME type of the export. This corresponds to `ExportFormat`
681 // specified in the request.
682 MimeType string `json:"mime_type"`
683 }
684
685 // NewPaperDocExportResult returns a new PaperDocExportResult instance
686 func NewPaperDocExportResult(Owner string, Title string, Revision int64, MimeType string) *PaperDocExportResult {
687 s := new(PaperDocExportResult)
688 s.Owner = Owner
689 s.Title = Title
690 s.Revision = Revision
691 s.MimeType = MimeType
692 return s
693 }
694
695 // PaperDocPermissionLevel : has no documentation (yet)
696 type PaperDocPermissionLevel struct {
697 dropbox.Tagged
698 }
699
700 // Valid tag values for PaperDocPermissionLevel
701 const (
702 PaperDocPermissionLevelEdit = "edit"
703 PaperDocPermissionLevelViewAndComment = "view_and_comment"
704 PaperDocPermissionLevelOther = "other"
705 )
706
707 // PaperDocSharingPolicy : has no documentation (yet)
708 type PaperDocSharingPolicy struct {
709 RefPaperDoc
710 // SharingPolicy : The default sharing policy to be set for the Paper doc.
711 SharingPolicy *SharingPolicy `json:"sharing_policy"`
712 }
713
714 // NewPaperDocSharingPolicy returns a new PaperDocSharingPolicy instance
715 func NewPaperDocSharingPolicy(DocId string, SharingPolicy *SharingPolicy) *PaperDocSharingPolicy {
716 s := new(PaperDocSharingPolicy)
717 s.DocId = DocId
718 s.SharingPolicy = SharingPolicy
719 return s
720 }
721
722 // PaperDocUpdateArgs : has no documentation (yet)
723 type PaperDocUpdateArgs struct {
724 RefPaperDoc
725 // DocUpdatePolicy : The policy used for the current update call.
726 DocUpdatePolicy *PaperDocUpdatePolicy `json:"doc_update_policy"`
727 // Revision : The latest doc revision. This value must match the head
728 // revision or an error code will be returned. This is to prevent colliding
729 // writes.
730 Revision int64 `json:"revision"`
731 // ImportFormat : The format of provided data.
732 ImportFormat *ImportFormat `json:"import_format"`
733 }
734
735 // NewPaperDocUpdateArgs returns a new PaperDocUpdateArgs instance
736 func NewPaperDocUpdateArgs(DocId string, DocUpdatePolicy *PaperDocUpdatePolicy, Revision int64, ImportFormat *ImportFormat) *PaperDocUpdateArgs {
737 s := new(PaperDocUpdateArgs)
738 s.DocId = DocId
739 s.DocUpdatePolicy = DocUpdatePolicy
740 s.Revision = Revision
741 s.ImportFormat = ImportFormat
742 return s
743 }
744
745 // PaperDocUpdateError : has no documentation (yet)
746 type PaperDocUpdateError struct {
747 dropbox.Tagged
748 }
749
750 // Valid tag values for PaperDocUpdateError
751 const (
752 PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions"
753 PaperDocUpdateErrorOther = "other"
754 PaperDocUpdateErrorDocNotFound = "doc_not_found"
755 PaperDocUpdateErrorContentMalformed = "content_malformed"
756 PaperDocUpdateErrorRevisionMismatch = "revision_mismatch"
757 PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded"
758 PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded"
759 PaperDocUpdateErrorDocArchived = "doc_archived"
760 PaperDocUpdateErrorDocDeleted = "doc_deleted"
761 )
762
763 // PaperDocUpdatePolicy : has no documentation (yet)
764 type PaperDocUpdatePolicy struct {
765 dropbox.Tagged
766 }
767
768 // Valid tag values for PaperDocUpdatePolicy
769 const (
770 PaperDocUpdatePolicyAppend = "append"
771 PaperDocUpdatePolicyPrepend = "prepend"
772 PaperDocUpdatePolicyOverwriteAll = "overwrite_all"
773 PaperDocUpdatePolicyOther = "other"
774 )
775
776 // PaperFolderCreateArg : has no documentation (yet)
777 type PaperFolderCreateArg struct {
778 // Name : The name of the new Paper folder.
779 Name string `json:"name"`
780 // ParentFolderId : The encrypted Paper folder Id where the new Paper folder
781 // should be created. The API user has to have write access to this folder
782 // or error is thrown. If not supplied, the new folder will be created at
783 // top level.
784 ParentFolderId string `json:"parent_folder_id,omitempty"`
785 // IsTeamFolder : Whether the folder to be created should be a team folder.
786 // This value will be ignored if parent_folder_id is supplied, as the new
787 // folder will inherit the type (private or team folder) from its parent. We
788 // will by default create a top-level private folder if both
789 // parent_folder_id and is_team_folder are not supplied.
790 IsTeamFolder bool `json:"is_team_folder,omitempty"`
791 }
792
793 // NewPaperFolderCreateArg returns a new PaperFolderCreateArg instance
794 func NewPaperFolderCreateArg(Name string) *PaperFolderCreateArg {
795 s := new(PaperFolderCreateArg)
796 s.Name = Name
797 return s
798 }
799
800 // PaperFolderCreateError : has no documentation (yet)
801 type PaperFolderCreateError struct {
802 dropbox.Tagged
803 }
804
805 // Valid tag values for PaperFolderCreateError
806 const (
807 PaperFolderCreateErrorInsufficientPermissions = "insufficient_permissions"
808 PaperFolderCreateErrorOther = "other"
809 PaperFolderCreateErrorFolderNotFound = "folder_not_found"
810 PaperFolderCreateErrorInvalidFolderId = "invalid_folder_id"
811 )
812
813 // PaperFolderCreateResult : has no documentation (yet)
814 type PaperFolderCreateResult struct {
815 // FolderId : Folder ID of the newly created folder.
816 FolderId string `json:"folder_id"`
817 }
818
819 // NewPaperFolderCreateResult returns a new PaperFolderCreateResult instance
820 func NewPaperFolderCreateResult(FolderId string) *PaperFolderCreateResult {
821 s := new(PaperFolderCreateResult)
822 s.FolderId = FolderId
823 return s
824 }
825
826 // RemovePaperDocUser : has no documentation (yet)
827 type RemovePaperDocUser struct {
828 RefPaperDoc
829 // Member : User which should be removed from the Paper doc. Specify only
830 // email address or Dropbox account ID.
831 Member *sharing.MemberSelector `json:"member"`
832 }
833
834 // NewRemovePaperDocUser returns a new RemovePaperDocUser instance
835 func NewRemovePaperDocUser(DocId string, Member *sharing.MemberSelector) *RemovePaperDocUser {
836 s := new(RemovePaperDocUser)
837 s.DocId = DocId
838 s.Member = Member
839 return s
840 }
841
842 // SharingPolicy : Sharing policy of Paper doc.
843 type SharingPolicy struct {
844 // PublicSharingPolicy : This value applies to the non-team members.
845 PublicSharingPolicy *SharingPublicPolicyType `json:"public_sharing_policy,omitempty"`
846 // TeamSharingPolicy : This value applies to the team members only. The
847 // value is null for all personal accounts.
848 TeamSharingPolicy *SharingTeamPolicyType `json:"team_sharing_policy,omitempty"`
849 }
850
851 // NewSharingPolicy returns a new SharingPolicy instance
852 func NewSharingPolicy() *SharingPolicy {
853 s := new(SharingPolicy)
854 return s
855 }
856
857 // SharingTeamPolicyType : The sharing policy type of the Paper doc.
858 type SharingTeamPolicyType struct {
859 dropbox.Tagged
860 }
861
862 // Valid tag values for SharingTeamPolicyType
863 const (
864 SharingTeamPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit"
865 SharingTeamPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment"
866 SharingTeamPolicyTypeInviteOnly = "invite_only"
867 )
868
869 // SharingPublicPolicyType : has no documentation (yet)
870 type SharingPublicPolicyType struct {
871 dropbox.Tagged
872 }
873
874 // Valid tag values for SharingPublicPolicyType
875 const (
876 SharingPublicPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit"
877 SharingPublicPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment"
878 SharingPublicPolicyTypeInviteOnly = "invite_only"
879 SharingPublicPolicyTypeDisabled = "disabled"
880 )
881
882 // UserInfoWithPermissionLevel : has no documentation (yet)
883 type UserInfoWithPermissionLevel struct {
884 // User : User shared on the Paper doc.
885 User *sharing.UserInfo `json:"user"`
886 // PermissionLevel : Permission level for the user.
887 PermissionLevel *PaperDocPermissionLevel `json:"permission_level"`
888 }
889
890 // NewUserInfoWithPermissionLevel returns a new UserInfoWithPermissionLevel instance
891 func NewUserInfoWithPermissionLevel(User *sharing.UserInfo, PermissionLevel *PaperDocPermissionLevel) *UserInfoWithPermissionLevel {
892 s := new(UserInfoWithPermissionLevel)
893 s.User = User
894 s.PermissionLevel = PermissionLevel
895 return s
896 }
897
898 // UserOnPaperDocFilter : has no documentation (yet)
899 type UserOnPaperDocFilter struct {
900 dropbox.Tagged
901 }
902
903 // Valid tag values for UserOnPaperDocFilter
904 const (
905 UserOnPaperDocFilterVisited = "visited"
906 UserOnPaperDocFilterShared = "shared"
907 UserOnPaperDocFilterOther = "other"
908 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package dropbox
21
22 import (
23 "bytes"
24 "context"
25 "encoding/json"
26 "errors"
27 "fmt"
28 "io"
29 "io/ioutil"
30 "log"
31 "net/http"
32 "strings"
33
34 "golang.org/x/oauth2"
35 )
36
37 const (
38 apiVersion = 2
39 defaultDomain = ".dropboxapi.com"
40 hostAPI = "api"
41 hostContent = "content"
42 hostNotify = "notify"
43 sdkVersion = "6.0.2"
44 specVersion = "444efad"
45 )
46
47 // Version returns the current SDK version and API Spec version
48 func Version() (string, string) {
49 return sdkVersion, specVersion
50 }
51
52 // Tagged is used for tagged unions.
53 type Tagged struct {
54 Tag string `json:".tag"`
55 }
56
57 // APIError is the base type for endpoint-specific errors.
58 type APIError struct {
59 ErrorSummary string `json:"error_summary"`
60 }
61
62 func (e APIError) Error() string {
63 return e.ErrorSummary
64 }
65
66 type SDKInternalError struct {
67 StatusCode int
68 Content string
69 }
70
71 func (e SDKInternalError) Error() string {
72 return fmt.Sprintf("Unexpected error: %v (code: %v)", e.Content, e.StatusCode)
73 }
74
75 // Config contains parameters for configuring the SDK.
76 type Config struct {
77 // OAuth2 access token
78 Token string
79 // Logging level for SDK generated logs
80 LogLevel LogLevel
81 // Logging target for verbose SDK logging
82 Logger *log.Logger
83 // Used with APIs that support operations as another user
84 AsMemberID string
85 // Path relative to which action should be taken
86 PathRoot string
87 // No need to set -- for testing only
88 Domain string
89 // No need to set -- for testing only
90 Client *http.Client
91 // No need to set -- for testing only
92 HeaderGenerator func(hostType string, namespace string, route string) map[string]string
93 // No need to set -- for testing only
94 URLGenerator func(hostType string, namespace string, route string) string
95 }
96
97 // LogLevel defines a type that can set the desired level of logging the SDK will generate.
98 type LogLevel uint
99
100 const (
101 // LogOff will disable all SDK logging. This is the default log level
102 LogOff LogLevel = iota * (1 << 8)
103 // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments),
104 // response and body contents.
105 LogDebug
106 // LogInfo will log SDK request (not including arguments) and responses.
107 LogInfo
108 )
109
110 func (l LogLevel) shouldLog(v LogLevel) bool {
111 return l > v || l&v == v
112 }
113
114 func (c *Config) doLog(l LogLevel, format string, v ...interface{}) {
115 if !c.LogLevel.shouldLog(l) {
116 return
117 }
118
119 if c.Logger != nil {
120 c.Logger.Printf(format, v...)
121 } else {
122 log.Printf(format, v...)
123 }
124 }
125
126 // LogDebug emits a debug level SDK log if config's log level is at least LogDebug
127 func (c *Config) LogDebug(format string, v ...interface{}) {
128 c.doLog(LogDebug, format, v...)
129 }
130
131 // LogInfo emits an info level SDK log if config's log level is at least LogInfo
132 func (c *Config) LogInfo(format string, v ...interface{}) {
133 c.doLog(LogInfo, format, v...)
134 }
135
136 // Ergonomic methods to set namespace relative to which action should be taken
137 func (c Config) WithNamespaceID(nsID string) Config {
138 c.PathRoot = fmt.Sprintf(`{".tag": "namespace_id", "namespace_id": "%s"}`, nsID)
139 return c
140 }
141
142 func (c Config) WithRoot(nsID string) Config {
143 c.PathRoot = fmt.Sprintf(`{".tag": "root", "root": "%s"}`, nsID)
144 return c
145 }
146
147 // Context is the base client context used to implement per-namespace clients.
148 type Context struct {
149 Config Config
150 Client *http.Client
151 NoAuthClient *http.Client
152 HeaderGenerator func(hostType string, namespace string, route string) map[string]string
153 URLGenerator func(hostType string, namespace string, route string) string
154 }
155
156 type Request struct {
157 Host string
158 Namespace string
159 Route string
160 Style string
161 Auth string
162
163 Arg interface{}
164 ExtraHeaders map[string]string
165 }
166
167 func (c *Context) Execute(req Request, body io.Reader) ([]byte, io.ReadCloser, error) {
168 url := c.URLGenerator(req.Host, req.Namespace, req.Route)
169 httpReq, err := http.NewRequest("POST", url, body)
170 if err != nil {
171 return nil, nil, err
172 }
173
174 for k, v := range req.ExtraHeaders {
175 httpReq.Header.Add(k, v)
176 }
177
178 for k, v := range c.HeaderGenerator(req.Host, req.Namespace, req.Route) {
179 httpReq.Header.Add(k, v)
180 }
181
182 if httpReq.Header.Get("Host") != "" {
183 httpReq.Host = httpReq.Header.Get("Host")
184 }
185
186 if req.Auth == "noauth" {
187 httpReq.Header.Del("Authorization")
188 }
189 if req.Auth != "team" && c.Config.AsMemberID != "" {
190 httpReq.Header.Add("Dropbox-API-Select-User", c.Config.AsMemberID)
191 }
192 if c.Config.PathRoot != "" {
193 httpReq.Header.Add("Dropbox-API-Path-Root", c.Config.PathRoot)
194 }
195
196 if req.Arg != nil {
197 serializedArg, err := json.Marshal(req.Arg)
198 if err != nil {
199 return nil, nil, err
200 }
201
202 switch req.Style {
203 case "rpc":
204 if body != nil {
205 return nil, nil, errors.New("RPC style requests can not have body")
206 }
207
208 httpReq.Header.Set("Content-Type", "application/json")
209 httpReq.Body = ioutil.NopCloser(bytes.NewReader(serializedArg))
210 httpReq.ContentLength = int64(len(serializedArg))
211 case "upload", "download":
212 httpReq.Header.Set("Dropbox-API-Arg", string(serializedArg))
213 httpReq.Header.Set("Content-Type", "application/octet-stream")
214 }
215 }
216
217 client := c.Client
218 if req.Auth == "noauth" {
219 client = c.NoAuthClient
220 }
221
222 resp, err := client.Do(httpReq)
223 if err != nil {
224 return nil, nil, err
225 }
226
227 if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent {
228 switch req.Style {
229 case "rpc", "upload":
230 if resp.Body == nil {
231 return nil, nil, errors.New("Expected body in RPC response, got nil")
232 }
233
234 b, err := ioutil.ReadAll(resp.Body)
235 resp.Body.Close()
236 if err != nil {
237 return nil, nil, err
238 }
239
240 return b, nil, nil
241 case "download":
242 b := []byte(resp.Header.Get("Dropbox-API-Result"))
243 return b, resp.Body, nil
244 }
245 }
246
247 b, err := ioutil.ReadAll(resp.Body)
248 resp.Body.Close()
249 if err != nil {
250 return nil, nil, err
251 }
252
253 return nil, nil, SDKInternalError{
254 StatusCode: resp.StatusCode,
255 Content: string(b),
256 }
257 }
258
259 // NewContext returns a new Context with the given Config.
260 func NewContext(c Config) Context {
261 domain := c.Domain
262 if domain == "" {
263 domain = defaultDomain
264 }
265
266 client := c.Client
267 if client == nil {
268 var conf = &oauth2.Config{Endpoint: OAuthEndpoint(domain)}
269 tok := &oauth2.Token{AccessToken: c.Token}
270 client = conf.Client(context.Background(), tok)
271 }
272
273 noAuthClient := c.Client
274 if noAuthClient == nil {
275 noAuthClient = &http.Client{}
276 }
277
278 headerGenerator := c.HeaderGenerator
279 if headerGenerator == nil {
280 headerGenerator = func(hostType string, namespace string, route string) map[string]string {
281 return map[string]string{}
282 }
283 }
284
285 urlGenerator := c.URLGenerator
286 if urlGenerator == nil {
287 hostMap := map[string]string{
288 hostAPI: hostAPI + domain,
289 hostContent: hostContent + domain,
290 hostNotify: hostNotify + domain,
291 }
292 urlGenerator = func(hostType string, namespace string, route string) string {
293 fqHost := hostMap[hostType]
294 return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route)
295 }
296 }
297
298 return Context{c, client, noAuthClient, headerGenerator, urlGenerator}
299 }
300
301 // OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain
302 func OAuthEndpoint(domain string) oauth2.Endpoint {
303 if domain == "" {
304 domain = defaultDomain
305 }
306 authURL := fmt.Sprintf("https://meta%s/1/oauth2/authorize", domain)
307 tokenURL := fmt.Sprintf("https://api%s/1/oauth2/token", domain)
308 if domain == defaultDomain {
309 authURL = "https://www.dropbox.com/1/oauth2/authorize"
310 }
311 return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL}
312 }
313
314 // HTTPHeaderSafeJSON encode the JSON passed in b []byte passed in in
315 // a way that is suitable for HTTP headers.
316 //
317 // See: https://www.dropbox.com/developers/reference/json-encoding
318 func HTTPHeaderSafeJSON(b []byte) string {
319 var s strings.Builder
320 s.Grow(len(b))
321 for _, r := range string(b) {
322 if r >= 0x007f {
323 fmt.Fprintf(&s, "\\u%04x", r)
324 } else {
325 s.WriteRune(r)
326 }
327 }
328 return s.String()
329 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package dropbox_test
21
22 import (
23 "encoding/json"
24 "fmt"
25 "net/http"
26 "net/http/httptest"
27 "strings"
28 "testing"
29
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
33 )
34
35 func generateURL(base string, namespace string, route string) string {
36 return fmt.Sprintf("%s/%s/%s", base, namespace, route)
37 }
38
39 func TestInternalError(t *testing.T) {
40 eString := "internal server error"
41 ts := httptest.NewServer(http.HandlerFunc(
42 func(w http.ResponseWriter, r *http.Request) {
43 http.Error(w, eString, http.StatusInternalServerError)
44 }))
45 defer ts.Close()
46
47 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
48 URLGenerator: func(hostType string, namespace string, route string) string {
49 return generateURL(ts.URL, namespace, route)
50 }}
51 client := users.New(config)
52 v, e := client.GetCurrentAccount()
53 if v != nil || strings.Trim(e.Error(), "\n") != eString {
54 t.Errorf("v: %v e: '%s'\n", v, e.Error())
55 }
56 }
57
58 func TestRateLimitJSON(t *testing.T) {
59 eString := `{"error_summary": "too_many_requests/..", "error": {"reason": {".tag": "too_many_requests"}, "retry_after": 300}}`
60 ts := httptest.NewServer(http.HandlerFunc(
61 func(w http.ResponseWriter, r *http.Request) {
62 w.Header().Set("Content-Type", "application/json; charset=utf-8")
63 w.Header().Set("Retry-After", "10")
64 w.WriteHeader(http.StatusTooManyRequests)
65 _, _ = w.Write([]byte(eString))
66 }))
67 defer ts.Close()
68
69 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
70 URLGenerator: func(hostType string, namespace string, route string) string {
71 return generateURL(ts.URL, namespace, route)
72 }}
73 client := users.New(config)
74 _, e := client.GetCurrentAccount()
75 re, ok := e.(auth.RateLimitAPIError)
76 if !ok {
77 t.Errorf("Unexpected error type: %T\n", e)
78 }
79 if re.RateLimitError.RetryAfter != 300 {
80 t.Errorf("Unexpected retry-after value: %d\n", re.RateLimitError.RetryAfter)
81 }
82 if re.RateLimitError.Reason.Tag != auth.RateLimitReasonTooManyRequests {
83 t.Errorf("Unexpected reason: %v\n", re.RateLimitError.Reason)
84 }
85 }
86
87 func TestAuthError(t *testing.T) {
88 eString := `{"error_summary": "user_suspended/...", "error": {".tag": "user_suspended"}}`
89 ts := httptest.NewServer(http.HandlerFunc(
90 func(w http.ResponseWriter, r *http.Request) {
91 w.Header().Set("Content-Type", "application/json; charset=utf-8")
92 w.WriteHeader(http.StatusUnauthorized)
93 _, _ = w.Write([]byte(eString))
94 }))
95 defer ts.Close()
96
97 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
98 URLGenerator: func(hostType string, namespace string, route string) string {
99 return generateURL(ts.URL, namespace, route)
100 }}
101 client := users.New(config)
102 _, e := client.GetCurrentAccount()
103 re, ok := e.(auth.AuthAPIError)
104 if !ok {
105 t.Errorf("Unexpected error type: %T\n", e)
106 }
107 fmt.Printf("ERROR is %v\n", re)
108 if re.AuthError.Tag != auth.AuthErrorUserSuspended {
109 t.Errorf("Unexpected tag: %s\n", re.AuthError.Tag)
110 }
111 }
112
113 func TestAccessError(t *testing.T) {
114 eString := `{"error_summary": "access_error/...",
115 "error": {
116 ".tag": "paper_access_denied",
117 "paper_access_denied": {".tag": "not_paper_user"}
118 }}`
119 ts := httptest.NewServer(http.HandlerFunc(
120 func(w http.ResponseWriter, r *http.Request) {
121 w.Header().Set("Content-Type", "application/json; charset=utf-8")
122 w.WriteHeader(http.StatusForbidden)
123 _, _ = w.Write([]byte(eString))
124 }))
125 defer ts.Close()
126
127 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
128 URLGenerator: func(hostType string, namespace string, route string) string {
129 return generateURL(ts.URL, namespace, route)
130 }}
131 client := users.New(config)
132 _, e := client.GetCurrentAccount()
133 re, ok := e.(auth.AccessAPIError)
134 if !ok {
135 t.Errorf("Unexpected error type: %T\n", e)
136 }
137 if re.AccessError.Tag != auth.AccessErrorPaperAccessDenied {
138 t.Errorf("Unexpected tag: %s\n", re.AccessError.Tag)
139 }
140 if re.AccessError.PaperAccessDenied.Tag != auth.PaperAccessErrorNotPaperUser {
141 t.Errorf("Unexpected tag: %s\n", re.AccessError.PaperAccessDenied.Tag)
142 }
143 }
144
145 func TestAppError(t *testing.T) {
146 eString := `{"error_summary":"","error":{".tag":"app_id_mismatch"}}`
147 ts := httptest.NewServer(http.HandlerFunc(
148 func(w http.ResponseWriter, r *http.Request) {
149 w.Header().Set("Content-Type", "application/json; charset=utf-8")
150 w.WriteHeader(http.StatusConflict)
151 _, _ = w.Write([]byte(eString))
152 }))
153 defer ts.Close()
154
155 config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug,
156 URLGenerator: func(hostType string, namespace string, route string) string {
157 return generateURL(ts.URL, namespace, route)
158 }}
159 client := auth.New(config)
160 _, e := client.TokenFromOauth1(nil)
161 re, ok := e.(auth.TokenFromOauth1APIError)
162 if !ok {
163 t.Errorf("Unexpected error type: %T\n%v\n", e, e)
164 }
165 if re.EndpointError.Tag != auth.TokenFromOAuth1ErrorAppIdMismatch {
166 t.Errorf("Unexpected tag: %s\n", re.EndpointError.Tag)
167 }
168 }
169
170 func TestHTTPHeaderSafeJSON(t *testing.T) {
171 for _, test := range []struct {
172 name string
173 in interface{}
174 want string
175 }{
176 {
177 name: "empty string",
178 in: ``,
179 want: `""`,
180 },
181 {
182 name: "integer",
183 in: 123,
184 want: `123`,
185 },
186 {
187 name: "normal string",
188 in: `Normal string!`,
189 want: `"Normal string!"`,
190 },
191 {
192 name: "unicode",
193 in: `ÃŧÃąÃŽcødÊ`,
194 want: `"\u00fc\u00f1\u00eec\u00f8d\u00e9"`,
195 },
196 {
197 name: "7f",
198 in: "\x7f",
199 want: `"\u007f"`,
200 },
201 {
202 name: "example from the docs",
203 in: struct {
204 Field string `json:"field"`
205 }{
206 Field: "some_ÃŧÃąÃŽcødÊ_and_\x7F",
207 },
208 want: `{"field":"some_\u00fc\u00f1\u00eec\u00f8d\u00e9_and_\u007f"}`,
209 },
210 } {
211 t.Run(test.name, func(t *testing.T) {
212 b, err := json.Marshal(test.in)
213 if err != nil {
214 t.Fatal(err)
215 }
216 got := dropbox.HTTPHeaderSafeJSON(b)
217 if got != test.want {
218 t.Errorf("Want %q got %q", test.want, got)
219 }
220 })
221 }
222 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package secondary_emails : has no documentation (yet)
21 package secondary_emails
22
23 // SecondaryEmail : has no documentation (yet)
24 type SecondaryEmail struct {
25 // Email : Secondary email address.
26 Email string `json:"email"`
27 // IsVerified : Whether or not the secondary email address is verified to be
28 // owned by a user.
29 IsVerified bool `json:"is_verified"`
30 }
31
32 // NewSecondaryEmail returns a new SecondaryEmail instance
33 func NewSecondaryEmail(Email string, IsVerified bool) *SecondaryEmail {
34 s := new(SecondaryEmail)
35 s.Email = Email
36 s.IsVerified = IsVerified
37 return s
38 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package seen_state : has no documentation (yet)
21 package seen_state
22
23 import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
24
25 // PlatformType : Possible platforms on which a user may view content.
26 type PlatformType struct {
27 dropbox.Tagged
28 }
29
30 // Valid tag values for PlatformType
31 const (
32 PlatformTypeWeb = "web"
33 PlatformTypeDesktop = "desktop"
34 PlatformTypeMobileIos = "mobile_ios"
35 PlatformTypeMobileAndroid = "mobile_android"
36 PlatformTypeApi = "api"
37 PlatformTypeUnknown = "unknown"
38 PlatformTypeMobile = "mobile"
39 PlatformTypeOther = "other"
40 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package sharing
21
22 import (
23 "encoding/json"
24 "io"
25 "log"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
30 )
31
32 // Client interface describes all routes in this namespace
33 type Client interface {
34 // AddFileMember : Adds specified members to a file.
35 AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error)
36 // AddFolderMember : Allows an owner or editor (if the ACL update policy
37 // allows) of a shared folder to add another member. For the new member to
38 // get access to all the functionality for this folder, you will need to
39 // call `mountFolder` on their behalf.
40 AddFolderMember(arg *AddFolderMemberArg) (err error)
41 // ChangeFileMemberAccess : Identical to update_file_member but with less
42 // information returned.
43 // Deprecated: Use `UpdateFileMember` instead
44 ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error)
45 // CheckJobStatus : Returns the status of an asynchronous job.
46 CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error)
47 // CheckRemoveMemberJobStatus : Returns the status of an asynchronous job
48 // for sharing a folder.
49 CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error)
50 // CheckShareJobStatus : Returns the status of an asynchronous job for
51 // sharing a folder.
52 CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error)
53 // CreateSharedLink : Create a shared link. If a shared link already exists
54 // for the given path, that link is returned. Note that in the returned
55 // `PathLinkMetadata`, the `PathLinkMetadata.url` field is the shortened URL
56 // if `CreateSharedLinkArg.short_url` argument is set to true. Previously,
57 // it was technically possible to break a shared link by moving or renaming
58 // the corresponding file or folder. In the future, this will no longer be
59 // the case, so your app shouldn't rely on this behavior. Instead, if your
60 // app needs to revoke a shared link, use `revokeSharedLink`.
61 // Deprecated: Use `CreateSharedLinkWithSettings` instead
62 CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error)
63 // CreateSharedLinkWithSettings : Create a shared link with custom settings.
64 // If no settings are given then the default visibility is
65 // `RequestedVisibility.public` (The resolved visibility, though, may depend
66 // on other aspects such as team and shared folder settings).
67 CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error)
68 // GetFileMetadata : Returns shared file metadata.
69 GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error)
70 // GetFileMetadataBatch : Returns shared file metadata.
71 GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error)
72 // GetFolderMetadata : Returns shared folder metadata by its folder ID.
73 GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error)
74 // GetSharedLinkFile : Download the shared link's file from a user's
75 // Dropbox.
76 GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error)
77 // GetSharedLinkMetadata : Get the shared link's metadata.
78 GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error)
79 // GetSharedLinks : Returns a list of `LinkMetadata` objects for this user,
80 // including collection links. If no path is given, returns a list of all
81 // shared links for the current user, including collection links, up to a
82 // maximum of 1000 links. If a non-empty path is given, returns a list of
83 // all shared links that allow access to the given path. Collection links
84 // are never returned in this case. Note that the url field in the response
85 // is never the shortened URL.
86 // Deprecated: Use `ListSharedLinks` instead
87 GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error)
88 // ListFileMembers : Use to obtain the members who have been invited to a
89 // file, both inherited and uninherited members.
90 ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error)
91 // ListFileMembersBatch : Get members of multiple files at once. The
92 // arguments to this route are more limited, and the limit on query result
93 // size per file is more strict. To customize the results more, use the
94 // individual file endpoint. Inherited users and groups are not included in
95 // the result, and permissions are not returned for this endpoint.
96 ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error)
97 // ListFileMembersContinue : Once a cursor has been retrieved from
98 // `listFileMembers` or `listFileMembersBatch`, use this to paginate through
99 // all shared file members.
100 ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error)
101 // ListFolderMembers : Returns shared folder membership by its folder ID.
102 ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error)
103 // ListFolderMembersContinue : Once a cursor has been retrieved from
104 // `listFolderMembers`, use this to paginate through all shared folder
105 // members.
106 ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error)
107 // ListFolders : Return the list of all shared folders the current user has
108 // access to.
109 ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error)
110 // ListFoldersContinue : Once a cursor has been retrieved from
111 // `listFolders`, use this to paginate through all shared folders. The
112 // cursor must come from a previous call to `listFolders` or
113 // `listFoldersContinue`.
114 ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error)
115 // ListMountableFolders : Return the list of all shared folders the current
116 // user can mount or unmount.
117 ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error)
118 // ListMountableFoldersContinue : Once a cursor has been retrieved from
119 // `listMountableFolders`, use this to paginate through all mountable shared
120 // folders. The cursor must come from a previous call to
121 // `listMountableFolders` or `listMountableFoldersContinue`.
122 ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error)
123 // ListReceivedFiles : Returns a list of all files shared with current user.
124 // Does not include files the user has received via shared folders, and does
125 // not include unclaimed invitations.
126 ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error)
127 // ListReceivedFilesContinue : Get more results with a cursor from
128 // `listReceivedFiles`.
129 ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error)
130 // ListSharedLinks : List shared links of this user. If no path is given,
131 // returns a list of all shared links for the current user. For members of
132 // business teams using team space and member folders, returns all shared
133 // links in the team member's home folder unless the team space ID is
134 // specified in the request header. For more information, refer to the
135 // `Namespace Guide`
136 // <https://www.dropbox.com/developers/reference/namespace-guide>. If a
137 // non-empty path is given, returns a list of all shared links that allow
138 // access to the given path - direct links to the given path and links to
139 // parent folders of the given path. Links to parent folders can be
140 // suppressed by setting direct_only to true.
141 ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error)
142 // ModifySharedLinkSettings : Modify the shared link's settings. If the
143 // requested visibility conflict with the shared links policy of the team or
144 // the shared folder (in case the linked file is part of a shared folder)
145 // then the `LinkPermissions.resolved_visibility` of the returned
146 // `SharedLinkMetadata` will reflect the actual visibility of the shared
147 // link and the `LinkPermissions.requested_visibility` will reflect the
148 // requested visibility.
149 ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error)
150 // MountFolder : The current user mounts the designated folder. Mount a
151 // shared folder for a user after they have been added as a member. Once
152 // mounted, the shared folder will appear in their Dropbox.
153 MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error)
154 // RelinquishFileMembership : The current user relinquishes their membership
155 // in the designated file. Note that the current user may still have
156 // inherited access to this file through the parent folder.
157 RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error)
158 // RelinquishFolderMembership : The current user relinquishes their
159 // membership in the designated shared folder and will no longer have access
160 // to the folder. A folder owner cannot relinquish membership in their own
161 // folder. This will run synchronously if leave_a_copy is false, and
162 // asynchronously if leave_a_copy is true.
163 RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error)
164 // RemoveFileMember : Identical to remove_file_member_2 but with less
165 // information returned.
166 // Deprecated: Use `RemoveFileMember2` instead
167 RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error)
168 // RemoveFileMember2 : Removes a specified member from the file.
169 RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error)
170 // RemoveFolderMember : Allows an owner or editor (if the ACL update policy
171 // allows) of a shared folder to remove another member.
172 RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error)
173 // RevokeSharedLink : Revoke a shared link. Note that even after revoking a
174 // shared link to a file, the file may be accessible if there are shared
175 // links leading to any of the file parent folders. To list all shared links
176 // that enable access to a specific file, you can use the `listSharedLinks`
177 // with the file as the `ListSharedLinksArg.path` argument.
178 RevokeSharedLink(arg *RevokeSharedLinkArg) (err error)
179 // SetAccessInheritance : Change the inheritance policy of an existing
180 // Shared Folder. Only permitted for shared folders in a shared team root.
181 // If a `ShareFolderLaunch.async_job_id` is returned, you'll need to call
182 // `checkShareJobStatus` until the action completes to get the metadata for
183 // the folder.
184 SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error)
185 // ShareFolder : Share a folder with collaborators. Most sharing will be
186 // completed synchronously. Large folders will be completed asynchronously.
187 // To make testing the async case repeatable, set
188 // `ShareFolderArg.force_async`. If a `ShareFolderLaunch.async_job_id` is
189 // returned, you'll need to call `checkShareJobStatus` until the action
190 // completes to get the metadata for the folder.
191 ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error)
192 // TransferFolder : Transfer ownership of a shared folder to a member of the
193 // shared folder. User must have `AccessLevel.owner` access to the shared
194 // folder to perform a transfer.
195 TransferFolder(arg *TransferFolderArg) (err error)
196 // UnmountFolder : The current user unmounts the designated folder. They can
197 // re-mount the folder at a later time using `mountFolder`.
198 UnmountFolder(arg *UnmountFolderArg) (err error)
199 // UnshareFile : Remove all members from this file. Does not remove
200 // inherited members.
201 UnshareFile(arg *UnshareFileArg) (err error)
202 // UnshareFolder : Allows a shared folder owner to unshare the folder.
203 // You'll need to call `checkJobStatus` to determine if the action has
204 // completed successfully.
205 UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error)
206 // UpdateFileMember : Changes a member's access on a shared file.
207 UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error)
208 // UpdateFolderMember : Allows an owner or editor of a shared folder to
209 // update another member's permissions.
210 UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error)
211 // UpdateFolderPolicy : Update the sharing policies for a shared folder.
212 // User must have `AccessLevel.owner` access to the shared folder to update
213 // its policies.
214 UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error)
215 }
216
217 type apiImpl dropbox.Context
218
219 //AddFileMemberAPIError is an error-wrapper for the add_file_member route
220 type AddFileMemberAPIError struct {
221 dropbox.APIError
222 EndpointError *AddFileMemberError `json:"error"`
223 }
224
225 func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error) {
226 req := dropbox.Request{
227 Host: "api",
228 Namespace: "sharing",
229 Route: "add_file_member",
230 Auth: "user",
231 Style: "rpc",
232 Arg: arg,
233 ExtraHeaders: nil,
234 }
235
236 var resp []byte
237 var respBody io.ReadCloser
238 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
239 if err != nil {
240 var appErr AddFileMemberAPIError
241 err = auth.ParseError(err, &appErr)
242 if err == &appErr {
243 err = appErr
244 }
245 return
246 }
247
248 err = json.Unmarshal(resp, &res)
249 if err != nil {
250 return
251 }
252
253 _ = respBody
254 return
255 }
256
257 //AddFolderMemberAPIError is an error-wrapper for the add_folder_member route
258 type AddFolderMemberAPIError struct {
259 dropbox.APIError
260 EndpointError *AddFolderMemberError `json:"error"`
261 }
262
263 func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) {
264 req := dropbox.Request{
265 Host: "api",
266 Namespace: "sharing",
267 Route: "add_folder_member",
268 Auth: "user",
269 Style: "rpc",
270 Arg: arg,
271 ExtraHeaders: nil,
272 }
273
274 var resp []byte
275 var respBody io.ReadCloser
276 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
277 if err != nil {
278 var appErr AddFolderMemberAPIError
279 err = auth.ParseError(err, &appErr)
280 if err == &appErr {
281 err = appErr
282 }
283 return
284 }
285
286 _ = resp
287 _ = respBody
288 return
289 }
290
291 //ChangeFileMemberAccessAPIError is an error-wrapper for the change_file_member_access route
292 type ChangeFileMemberAccessAPIError struct {
293 dropbox.APIError
294 EndpointError *FileMemberActionError `json:"error"`
295 }
296
297 func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error) {
298 log.Printf("WARNING: API `ChangeFileMemberAccess` is deprecated")
299 log.Printf("Use API `UpdateFileMember` instead")
300
301 req := dropbox.Request{
302 Host: "api",
303 Namespace: "sharing",
304 Route: "change_file_member_access",
305 Auth: "user",
306 Style: "rpc",
307 Arg: arg,
308 ExtraHeaders: nil,
309 }
310
311 var resp []byte
312 var respBody io.ReadCloser
313 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
314 if err != nil {
315 var appErr ChangeFileMemberAccessAPIError
316 err = auth.ParseError(err, &appErr)
317 if err == &appErr {
318 err = appErr
319 }
320 return
321 }
322
323 err = json.Unmarshal(resp, &res)
324 if err != nil {
325 return
326 }
327
328 _ = respBody
329 return
330 }
331
332 //CheckJobStatusAPIError is an error-wrapper for the check_job_status route
333 type CheckJobStatusAPIError struct {
334 dropbox.APIError
335 EndpointError *async.PollError `json:"error"`
336 }
337
338 func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) {
339 req := dropbox.Request{
340 Host: "api",
341 Namespace: "sharing",
342 Route: "check_job_status",
343 Auth: "user",
344 Style: "rpc",
345 Arg: arg,
346 ExtraHeaders: nil,
347 }
348
349 var resp []byte
350 var respBody io.ReadCloser
351 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
352 if err != nil {
353 var appErr CheckJobStatusAPIError
354 err = auth.ParseError(err, &appErr)
355 if err == &appErr {
356 err = appErr
357 }
358 return
359 }
360
361 err = json.Unmarshal(resp, &res)
362 if err != nil {
363 return
364 }
365
366 _ = respBody
367 return
368 }
369
370 //CheckRemoveMemberJobStatusAPIError is an error-wrapper for the check_remove_member_job_status route
371 type CheckRemoveMemberJobStatusAPIError struct {
372 dropbox.APIError
373 EndpointError *async.PollError `json:"error"`
374 }
375
376 func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error) {
377 req := dropbox.Request{
378 Host: "api",
379 Namespace: "sharing",
380 Route: "check_remove_member_job_status",
381 Auth: "user",
382 Style: "rpc",
383 Arg: arg,
384 ExtraHeaders: nil,
385 }
386
387 var resp []byte
388 var respBody io.ReadCloser
389 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
390 if err != nil {
391 var appErr CheckRemoveMemberJobStatusAPIError
392 err = auth.ParseError(err, &appErr)
393 if err == &appErr {
394 err = appErr
395 }
396 return
397 }
398
399 err = json.Unmarshal(resp, &res)
400 if err != nil {
401 return
402 }
403
404 _ = respBody
405 return
406 }
407
408 //CheckShareJobStatusAPIError is an error-wrapper for the check_share_job_status route
409 type CheckShareJobStatusAPIError struct {
410 dropbox.APIError
411 EndpointError *async.PollError `json:"error"`
412 }
413
414 func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) {
415 req := dropbox.Request{
416 Host: "api",
417 Namespace: "sharing",
418 Route: "check_share_job_status",
419 Auth: "user",
420 Style: "rpc",
421 Arg: arg,
422 ExtraHeaders: nil,
423 }
424
425 var resp []byte
426 var respBody io.ReadCloser
427 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
428 if err != nil {
429 var appErr CheckShareJobStatusAPIError
430 err = auth.ParseError(err, &appErr)
431 if err == &appErr {
432 err = appErr
433 }
434 return
435 }
436
437 err = json.Unmarshal(resp, &res)
438 if err != nil {
439 return
440 }
441
442 _ = respBody
443 return
444 }
445
446 //CreateSharedLinkAPIError is an error-wrapper for the create_shared_link route
447 type CreateSharedLinkAPIError struct {
448 dropbox.APIError
449 EndpointError *CreateSharedLinkError `json:"error"`
450 }
451
452 func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error) {
453 log.Printf("WARNING: API `CreateSharedLink` is deprecated")
454 log.Printf("Use API `CreateSharedLinkWithSettings` instead")
455
456 req := dropbox.Request{
457 Host: "api",
458 Namespace: "sharing",
459 Route: "create_shared_link",
460 Auth: "user",
461 Style: "rpc",
462 Arg: arg,
463 ExtraHeaders: nil,
464 }
465
466 var resp []byte
467 var respBody io.ReadCloser
468 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
469 if err != nil {
470 var appErr CreateSharedLinkAPIError
471 err = auth.ParseError(err, &appErr)
472 if err == &appErr {
473 err = appErr
474 }
475 return
476 }
477
478 err = json.Unmarshal(resp, &res)
479 if err != nil {
480 return
481 }
482
483 _ = respBody
484 return
485 }
486
487 //CreateSharedLinkWithSettingsAPIError is an error-wrapper for the create_shared_link_with_settings route
488 type CreateSharedLinkWithSettingsAPIError struct {
489 dropbox.APIError
490 EndpointError *CreateSharedLinkWithSettingsError `json:"error"`
491 }
492
493 func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error) {
494 req := dropbox.Request{
495 Host: "api",
496 Namespace: "sharing",
497 Route: "create_shared_link_with_settings",
498 Auth: "user",
499 Style: "rpc",
500 Arg: arg,
501 ExtraHeaders: nil,
502 }
503
504 var resp []byte
505 var respBody io.ReadCloser
506 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
507 if err != nil {
508 var appErr CreateSharedLinkWithSettingsAPIError
509 err = auth.ParseError(err, &appErr)
510 if err == &appErr {
511 err = appErr
512 }
513 return
514 }
515
516 var tmp sharedLinkMetadataUnion
517 err = json.Unmarshal(resp, &tmp)
518 if err != nil {
519 return
520 }
521 switch tmp.Tag {
522 case "file":
523 res = tmp.File
524
525 case "folder":
526 res = tmp.Folder
527
528 }
529 _ = respBody
530 return
531 }
532
533 //GetFileMetadataAPIError is an error-wrapper for the get_file_metadata route
534 type GetFileMetadataAPIError struct {
535 dropbox.APIError
536 EndpointError *GetFileMetadataError `json:"error"`
537 }
538
539 func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error) {
540 req := dropbox.Request{
541 Host: "api",
542 Namespace: "sharing",
543 Route: "get_file_metadata",
544 Auth: "user",
545 Style: "rpc",
546 Arg: arg,
547 ExtraHeaders: nil,
548 }
549
550 var resp []byte
551 var respBody io.ReadCloser
552 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
553 if err != nil {
554 var appErr GetFileMetadataAPIError
555 err = auth.ParseError(err, &appErr)
556 if err == &appErr {
557 err = appErr
558 }
559 return
560 }
561
562 err = json.Unmarshal(resp, &res)
563 if err != nil {
564 return
565 }
566
567 _ = respBody
568 return
569 }
570
571 //GetFileMetadataBatchAPIError is an error-wrapper for the get_file_metadata/batch route
572 type GetFileMetadataBatchAPIError struct {
573 dropbox.APIError
574 EndpointError *SharingUserError `json:"error"`
575 }
576
577 func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error) {
578 req := dropbox.Request{
579 Host: "api",
580 Namespace: "sharing",
581 Route: "get_file_metadata/batch",
582 Auth: "user",
583 Style: "rpc",
584 Arg: arg,
585 ExtraHeaders: nil,
586 }
587
588 var resp []byte
589 var respBody io.ReadCloser
590 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
591 if err != nil {
592 var appErr GetFileMetadataBatchAPIError
593 err = auth.ParseError(err, &appErr)
594 if err == &appErr {
595 err = appErr
596 }
597 return
598 }
599
600 err = json.Unmarshal(resp, &res)
601 if err != nil {
602 return
603 }
604
605 _ = respBody
606 return
607 }
608
609 //GetFolderMetadataAPIError is an error-wrapper for the get_folder_metadata route
610 type GetFolderMetadataAPIError struct {
611 dropbox.APIError
612 EndpointError *SharedFolderAccessError `json:"error"`
613 }
614
615 func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) {
616 req := dropbox.Request{
617 Host: "api",
618 Namespace: "sharing",
619 Route: "get_folder_metadata",
620 Auth: "user",
621 Style: "rpc",
622 Arg: arg,
623 ExtraHeaders: nil,
624 }
625
626 var resp []byte
627 var respBody io.ReadCloser
628 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
629 if err != nil {
630 var appErr GetFolderMetadataAPIError
631 err = auth.ParseError(err, &appErr)
632 if err == &appErr {
633 err = appErr
634 }
635 return
636 }
637
638 err = json.Unmarshal(resp, &res)
639 if err != nil {
640 return
641 }
642
643 _ = respBody
644 return
645 }
646
647 //GetSharedLinkFileAPIError is an error-wrapper for the get_shared_link_file route
648 type GetSharedLinkFileAPIError struct {
649 dropbox.APIError
650 EndpointError *GetSharedLinkFileError `json:"error"`
651 }
652
653 func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error) {
654 req := dropbox.Request{
655 Host: "content",
656 Namespace: "sharing",
657 Route: "get_shared_link_file",
658 Auth: "user",
659 Style: "download",
660 Arg: arg,
661 ExtraHeaders: nil,
662 }
663
664 var resp []byte
665 var respBody io.ReadCloser
666 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
667 if err != nil {
668 var appErr GetSharedLinkFileAPIError
669 err = auth.ParseError(err, &appErr)
670 if err == &appErr {
671 err = appErr
672 }
673 return
674 }
675
676 var tmp sharedLinkMetadataUnion
677 err = json.Unmarshal(resp, &tmp)
678 if err != nil {
679 return
680 }
681 switch tmp.Tag {
682 case "file":
683 res = tmp.File
684
685 case "folder":
686 res = tmp.Folder
687
688 }
689 content = respBody
690 return
691 }
692
693 //GetSharedLinkMetadataAPIError is an error-wrapper for the get_shared_link_metadata route
694 type GetSharedLinkMetadataAPIError struct {
695 dropbox.APIError
696 EndpointError *SharedLinkError `json:"error"`
697 }
698
699 func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error) {
700 req := dropbox.Request{
701 Host: "api",
702 Namespace: "sharing",
703 Route: "get_shared_link_metadata",
704 Auth: "user",
705 Style: "rpc",
706 Arg: arg,
707 ExtraHeaders: nil,
708 }
709
710 var resp []byte
711 var respBody io.ReadCloser
712 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
713 if err != nil {
714 var appErr GetSharedLinkMetadataAPIError
715 err = auth.ParseError(err, &appErr)
716 if err == &appErr {
717 err = appErr
718 }
719 return
720 }
721
722 var tmp sharedLinkMetadataUnion
723 err = json.Unmarshal(resp, &tmp)
724 if err != nil {
725 return
726 }
727 switch tmp.Tag {
728 case "file":
729 res = tmp.File
730
731 case "folder":
732 res = tmp.Folder
733
734 }
735 _ = respBody
736 return
737 }
738
739 //GetSharedLinksAPIError is an error-wrapper for the get_shared_links route
740 type GetSharedLinksAPIError struct {
741 dropbox.APIError
742 EndpointError *GetSharedLinksError `json:"error"`
743 }
744
745 func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error) {
746 log.Printf("WARNING: API `GetSharedLinks` is deprecated")
747 log.Printf("Use API `ListSharedLinks` instead")
748
749 req := dropbox.Request{
750 Host: "api",
751 Namespace: "sharing",
752 Route: "get_shared_links",
753 Auth: "user",
754 Style: "rpc",
755 Arg: arg,
756 ExtraHeaders: nil,
757 }
758
759 var resp []byte
760 var respBody io.ReadCloser
761 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
762 if err != nil {
763 var appErr GetSharedLinksAPIError
764 err = auth.ParseError(err, &appErr)
765 if err == &appErr {
766 err = appErr
767 }
768 return
769 }
770
771 err = json.Unmarshal(resp, &res)
772 if err != nil {
773 return
774 }
775
776 _ = respBody
777 return
778 }
779
780 //ListFileMembersAPIError is an error-wrapper for the list_file_members route
781 type ListFileMembersAPIError struct {
782 dropbox.APIError
783 EndpointError *ListFileMembersError `json:"error"`
784 }
785
786 func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error) {
787 req := dropbox.Request{
788 Host: "api",
789 Namespace: "sharing",
790 Route: "list_file_members",
791 Auth: "user",
792 Style: "rpc",
793 Arg: arg,
794 ExtraHeaders: nil,
795 }
796
797 var resp []byte
798 var respBody io.ReadCloser
799 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
800 if err != nil {
801 var appErr ListFileMembersAPIError
802 err = auth.ParseError(err, &appErr)
803 if err == &appErr {
804 err = appErr
805 }
806 return
807 }
808
809 err = json.Unmarshal(resp, &res)
810 if err != nil {
811 return
812 }
813
814 _ = respBody
815 return
816 }
817
818 //ListFileMembersBatchAPIError is an error-wrapper for the list_file_members/batch route
819 type ListFileMembersBatchAPIError struct {
820 dropbox.APIError
821 EndpointError *SharingUserError `json:"error"`
822 }
823
824 func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error) {
825 req := dropbox.Request{
826 Host: "api",
827 Namespace: "sharing",
828 Route: "list_file_members/batch",
829 Auth: "user",
830 Style: "rpc",
831 Arg: arg,
832 ExtraHeaders: nil,
833 }
834
835 var resp []byte
836 var respBody io.ReadCloser
837 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
838 if err != nil {
839 var appErr ListFileMembersBatchAPIError
840 err = auth.ParseError(err, &appErr)
841 if err == &appErr {
842 err = appErr
843 }
844 return
845 }
846
847 err = json.Unmarshal(resp, &res)
848 if err != nil {
849 return
850 }
851
852 _ = respBody
853 return
854 }
855
856 //ListFileMembersContinueAPIError is an error-wrapper for the list_file_members/continue route
857 type ListFileMembersContinueAPIError struct {
858 dropbox.APIError
859 EndpointError *ListFileMembersContinueError `json:"error"`
860 }
861
862 func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error) {
863 req := dropbox.Request{
864 Host: "api",
865 Namespace: "sharing",
866 Route: "list_file_members/continue",
867 Auth: "user",
868 Style: "rpc",
869 Arg: arg,
870 ExtraHeaders: nil,
871 }
872
873 var resp []byte
874 var respBody io.ReadCloser
875 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
876 if err != nil {
877 var appErr ListFileMembersContinueAPIError
878 err = auth.ParseError(err, &appErr)
879 if err == &appErr {
880 err = appErr
881 }
882 return
883 }
884
885 err = json.Unmarshal(resp, &res)
886 if err != nil {
887 return
888 }
889
890 _ = respBody
891 return
892 }
893
894 //ListFolderMembersAPIError is an error-wrapper for the list_folder_members route
895 type ListFolderMembersAPIError struct {
896 dropbox.APIError
897 EndpointError *SharedFolderAccessError `json:"error"`
898 }
899
900 func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) {
901 req := dropbox.Request{
902 Host: "api",
903 Namespace: "sharing",
904 Route: "list_folder_members",
905 Auth: "user",
906 Style: "rpc",
907 Arg: arg,
908 ExtraHeaders: nil,
909 }
910
911 var resp []byte
912 var respBody io.ReadCloser
913 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
914 if err != nil {
915 var appErr ListFolderMembersAPIError
916 err = auth.ParseError(err, &appErr)
917 if err == &appErr {
918 err = appErr
919 }
920 return
921 }
922
923 err = json.Unmarshal(resp, &res)
924 if err != nil {
925 return
926 }
927
928 _ = respBody
929 return
930 }
931
932 //ListFolderMembersContinueAPIError is an error-wrapper for the list_folder_members/continue route
933 type ListFolderMembersContinueAPIError struct {
934 dropbox.APIError
935 EndpointError *ListFolderMembersContinueError `json:"error"`
936 }
937
938 func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) {
939 req := dropbox.Request{
940 Host: "api",
941 Namespace: "sharing",
942 Route: "list_folder_members/continue",
943 Auth: "user",
944 Style: "rpc",
945 Arg: arg,
946 ExtraHeaders: nil,
947 }
948
949 var resp []byte
950 var respBody io.ReadCloser
951 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
952 if err != nil {
953 var appErr ListFolderMembersContinueAPIError
954 err = auth.ParseError(err, &appErr)
955 if err == &appErr {
956 err = appErr
957 }
958 return
959 }
960
961 err = json.Unmarshal(resp, &res)
962 if err != nil {
963 return
964 }
965
966 _ = respBody
967 return
968 }
969
970 //ListFoldersAPIError is an error-wrapper for the list_folders route
971 type ListFoldersAPIError struct {
972 dropbox.APIError
973 EndpointError struct{} `json:"error"`
974 }
975
976 func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
977 req := dropbox.Request{
978 Host: "api",
979 Namespace: "sharing",
980 Route: "list_folders",
981 Auth: "user",
982 Style: "rpc",
983 Arg: arg,
984 ExtraHeaders: nil,
985 }
986
987 var resp []byte
988 var respBody io.ReadCloser
989 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
990 if err != nil {
991 var appErr ListFoldersAPIError
992 err = auth.ParseError(err, &appErr)
993 if err == &appErr {
994 err = appErr
995 }
996 return
997 }
998
999 err = json.Unmarshal(resp, &res)
1000 if err != nil {
1001 return
1002 }
1003
1004 _ = respBody
1005 return
1006 }
1007
1008 //ListFoldersContinueAPIError is an error-wrapper for the list_folders/continue route
1009 type ListFoldersContinueAPIError struct {
1010 dropbox.APIError
1011 EndpointError *ListFoldersContinueError `json:"error"`
1012 }
1013
1014 func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
1015 req := dropbox.Request{
1016 Host: "api",
1017 Namespace: "sharing",
1018 Route: "list_folders/continue",
1019 Auth: "user",
1020 Style: "rpc",
1021 Arg: arg,
1022 ExtraHeaders: nil,
1023 }
1024
1025 var resp []byte
1026 var respBody io.ReadCloser
1027 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1028 if err != nil {
1029 var appErr ListFoldersContinueAPIError
1030 err = auth.ParseError(err, &appErr)
1031 if err == &appErr {
1032 err = appErr
1033 }
1034 return
1035 }
1036
1037 err = json.Unmarshal(resp, &res)
1038 if err != nil {
1039 return
1040 }
1041
1042 _ = respBody
1043 return
1044 }
1045
1046 //ListMountableFoldersAPIError is an error-wrapper for the list_mountable_folders route
1047 type ListMountableFoldersAPIError struct {
1048 dropbox.APIError
1049 EndpointError struct{} `json:"error"`
1050 }
1051
1052 func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) {
1053 req := dropbox.Request{
1054 Host: "api",
1055 Namespace: "sharing",
1056 Route: "list_mountable_folders",
1057 Auth: "user",
1058 Style: "rpc",
1059 Arg: arg,
1060 ExtraHeaders: nil,
1061 }
1062
1063 var resp []byte
1064 var respBody io.ReadCloser
1065 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1066 if err != nil {
1067 var appErr ListMountableFoldersAPIError
1068 err = auth.ParseError(err, &appErr)
1069 if err == &appErr {
1070 err = appErr
1071 }
1072 return
1073 }
1074
1075 err = json.Unmarshal(resp, &res)
1076 if err != nil {
1077 return
1078 }
1079
1080 _ = respBody
1081 return
1082 }
1083
1084 //ListMountableFoldersContinueAPIError is an error-wrapper for the list_mountable_folders/continue route
1085 type ListMountableFoldersContinueAPIError struct {
1086 dropbox.APIError
1087 EndpointError *ListFoldersContinueError `json:"error"`
1088 }
1089
1090 func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) {
1091 req := dropbox.Request{
1092 Host: "api",
1093 Namespace: "sharing",
1094 Route: "list_mountable_folders/continue",
1095 Auth: "user",
1096 Style: "rpc",
1097 Arg: arg,
1098 ExtraHeaders: nil,
1099 }
1100
1101 var resp []byte
1102 var respBody io.ReadCloser
1103 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1104 if err != nil {
1105 var appErr ListMountableFoldersContinueAPIError
1106 err = auth.ParseError(err, &appErr)
1107 if err == &appErr {
1108 err = appErr
1109 }
1110 return
1111 }
1112
1113 err = json.Unmarshal(resp, &res)
1114 if err != nil {
1115 return
1116 }
1117
1118 _ = respBody
1119 return
1120 }
1121
1122 //ListReceivedFilesAPIError is an error-wrapper for the list_received_files route
1123 type ListReceivedFilesAPIError struct {
1124 dropbox.APIError
1125 EndpointError *SharingUserError `json:"error"`
1126 }
1127
1128 func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error) {
1129 req := dropbox.Request{
1130 Host: "api",
1131 Namespace: "sharing",
1132 Route: "list_received_files",
1133 Auth: "user",
1134 Style: "rpc",
1135 Arg: arg,
1136 ExtraHeaders: nil,
1137 }
1138
1139 var resp []byte
1140 var respBody io.ReadCloser
1141 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1142 if err != nil {
1143 var appErr ListReceivedFilesAPIError
1144 err = auth.ParseError(err, &appErr)
1145 if err == &appErr {
1146 err = appErr
1147 }
1148 return
1149 }
1150
1151 err = json.Unmarshal(resp, &res)
1152 if err != nil {
1153 return
1154 }
1155
1156 _ = respBody
1157 return
1158 }
1159
1160 //ListReceivedFilesContinueAPIError is an error-wrapper for the list_received_files/continue route
1161 type ListReceivedFilesContinueAPIError struct {
1162 dropbox.APIError
1163 EndpointError *ListFilesContinueError `json:"error"`
1164 }
1165
1166 func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error) {
1167 req := dropbox.Request{
1168 Host: "api",
1169 Namespace: "sharing",
1170 Route: "list_received_files/continue",
1171 Auth: "user",
1172 Style: "rpc",
1173 Arg: arg,
1174 ExtraHeaders: nil,
1175 }
1176
1177 var resp []byte
1178 var respBody io.ReadCloser
1179 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1180 if err != nil {
1181 var appErr ListReceivedFilesContinueAPIError
1182 err = auth.ParseError(err, &appErr)
1183 if err == &appErr {
1184 err = appErr
1185 }
1186 return
1187 }
1188
1189 err = json.Unmarshal(resp, &res)
1190 if err != nil {
1191 return
1192 }
1193
1194 _ = respBody
1195 return
1196 }
1197
1198 //ListSharedLinksAPIError is an error-wrapper for the list_shared_links route
1199 type ListSharedLinksAPIError struct {
1200 dropbox.APIError
1201 EndpointError *ListSharedLinksError `json:"error"`
1202 }
1203
1204 func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) {
1205 req := dropbox.Request{
1206 Host: "api",
1207 Namespace: "sharing",
1208 Route: "list_shared_links",
1209 Auth: "user",
1210 Style: "rpc",
1211 Arg: arg,
1212 ExtraHeaders: nil,
1213 }
1214
1215 var resp []byte
1216 var respBody io.ReadCloser
1217 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1218 if err != nil {
1219 var appErr ListSharedLinksAPIError
1220 err = auth.ParseError(err, &appErr)
1221 if err == &appErr {
1222 err = appErr
1223 }
1224 return
1225 }
1226
1227 err = json.Unmarshal(resp, &res)
1228 if err != nil {
1229 return
1230 }
1231
1232 _ = respBody
1233 return
1234 }
1235
1236 //ModifySharedLinkSettingsAPIError is an error-wrapper for the modify_shared_link_settings route
1237 type ModifySharedLinkSettingsAPIError struct {
1238 dropbox.APIError
1239 EndpointError *ModifySharedLinkSettingsError `json:"error"`
1240 }
1241
1242 func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error) {
1243 req := dropbox.Request{
1244 Host: "api",
1245 Namespace: "sharing",
1246 Route: "modify_shared_link_settings",
1247 Auth: "user",
1248 Style: "rpc",
1249 Arg: arg,
1250 ExtraHeaders: nil,
1251 }
1252
1253 var resp []byte
1254 var respBody io.ReadCloser
1255 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1256 if err != nil {
1257 var appErr ModifySharedLinkSettingsAPIError
1258 err = auth.ParseError(err, &appErr)
1259 if err == &appErr {
1260 err = appErr
1261 }
1262 return
1263 }
1264
1265 var tmp sharedLinkMetadataUnion
1266 err = json.Unmarshal(resp, &tmp)
1267 if err != nil {
1268 return
1269 }
1270 switch tmp.Tag {
1271 case "file":
1272 res = tmp.File
1273
1274 case "folder":
1275 res = tmp.Folder
1276
1277 }
1278 _ = respBody
1279 return
1280 }
1281
1282 //MountFolderAPIError is an error-wrapper for the mount_folder route
1283 type MountFolderAPIError struct {
1284 dropbox.APIError
1285 EndpointError *MountFolderError `json:"error"`
1286 }
1287
1288 func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) {
1289 req := dropbox.Request{
1290 Host: "api",
1291 Namespace: "sharing",
1292 Route: "mount_folder",
1293 Auth: "user",
1294 Style: "rpc",
1295 Arg: arg,
1296 ExtraHeaders: nil,
1297 }
1298
1299 var resp []byte
1300 var respBody io.ReadCloser
1301 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1302 if err != nil {
1303 var appErr MountFolderAPIError
1304 err = auth.ParseError(err, &appErr)
1305 if err == &appErr {
1306 err = appErr
1307 }
1308 return
1309 }
1310
1311 err = json.Unmarshal(resp, &res)
1312 if err != nil {
1313 return
1314 }
1315
1316 _ = respBody
1317 return
1318 }
1319
1320 //RelinquishFileMembershipAPIError is an error-wrapper for the relinquish_file_membership route
1321 type RelinquishFileMembershipAPIError struct {
1322 dropbox.APIError
1323 EndpointError *RelinquishFileMembershipError `json:"error"`
1324 }
1325
1326 func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error) {
1327 req := dropbox.Request{
1328 Host: "api",
1329 Namespace: "sharing",
1330 Route: "relinquish_file_membership",
1331 Auth: "user",
1332 Style: "rpc",
1333 Arg: arg,
1334 ExtraHeaders: nil,
1335 }
1336
1337 var resp []byte
1338 var respBody io.ReadCloser
1339 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1340 if err != nil {
1341 var appErr RelinquishFileMembershipAPIError
1342 err = auth.ParseError(err, &appErr)
1343 if err == &appErr {
1344 err = appErr
1345 }
1346 return
1347 }
1348
1349 _ = resp
1350 _ = respBody
1351 return
1352 }
1353
1354 //RelinquishFolderMembershipAPIError is an error-wrapper for the relinquish_folder_membership route
1355 type RelinquishFolderMembershipAPIError struct {
1356 dropbox.APIError
1357 EndpointError *RelinquishFolderMembershipError `json:"error"`
1358 }
1359
1360 func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error) {
1361 req := dropbox.Request{
1362 Host: "api",
1363 Namespace: "sharing",
1364 Route: "relinquish_folder_membership",
1365 Auth: "user",
1366 Style: "rpc",
1367 Arg: arg,
1368 ExtraHeaders: nil,
1369 }
1370
1371 var resp []byte
1372 var respBody io.ReadCloser
1373 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1374 if err != nil {
1375 var appErr RelinquishFolderMembershipAPIError
1376 err = auth.ParseError(err, &appErr)
1377 if err == &appErr {
1378 err = appErr
1379 }
1380 return
1381 }
1382
1383 err = json.Unmarshal(resp, &res)
1384 if err != nil {
1385 return
1386 }
1387
1388 _ = respBody
1389 return
1390 }
1391
1392 //RemoveFileMemberAPIError is an error-wrapper for the remove_file_member route
1393 type RemoveFileMemberAPIError struct {
1394 dropbox.APIError
1395 EndpointError *RemoveFileMemberError `json:"error"`
1396 }
1397
1398 func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error) {
1399 log.Printf("WARNING: API `RemoveFileMember` is deprecated")
1400 log.Printf("Use API `RemoveFileMember2` instead")
1401
1402 req := dropbox.Request{
1403 Host: "api",
1404 Namespace: "sharing",
1405 Route: "remove_file_member",
1406 Auth: "user",
1407 Style: "rpc",
1408 Arg: arg,
1409 ExtraHeaders: nil,
1410 }
1411
1412 var resp []byte
1413 var respBody io.ReadCloser
1414 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1415 if err != nil {
1416 var appErr RemoveFileMemberAPIError
1417 err = auth.ParseError(err, &appErr)
1418 if err == &appErr {
1419 err = appErr
1420 }
1421 return
1422 }
1423
1424 err = json.Unmarshal(resp, &res)
1425 if err != nil {
1426 return
1427 }
1428
1429 _ = respBody
1430 return
1431 }
1432
1433 //RemoveFileMember2APIError is an error-wrapper for the remove_file_member_2 route
1434 type RemoveFileMember2APIError struct {
1435 dropbox.APIError
1436 EndpointError *RemoveFileMemberError `json:"error"`
1437 }
1438
1439 func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error) {
1440 req := dropbox.Request{
1441 Host: "api",
1442 Namespace: "sharing",
1443 Route: "remove_file_member_2",
1444 Auth: "user",
1445 Style: "rpc",
1446 Arg: arg,
1447 ExtraHeaders: nil,
1448 }
1449
1450 var resp []byte
1451 var respBody io.ReadCloser
1452 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1453 if err != nil {
1454 var appErr RemoveFileMember2APIError
1455 err = auth.ParseError(err, &appErr)
1456 if err == &appErr {
1457 err = appErr
1458 }
1459 return
1460 }
1461
1462 err = json.Unmarshal(resp, &res)
1463 if err != nil {
1464 return
1465 }
1466
1467 _ = respBody
1468 return
1469 }
1470
1471 //RemoveFolderMemberAPIError is an error-wrapper for the remove_folder_member route
1472 type RemoveFolderMemberAPIError struct {
1473 dropbox.APIError
1474 EndpointError *RemoveFolderMemberError `json:"error"`
1475 }
1476
1477 func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error) {
1478 req := dropbox.Request{
1479 Host: "api",
1480 Namespace: "sharing",
1481 Route: "remove_folder_member",
1482 Auth: "user",
1483 Style: "rpc",
1484 Arg: arg,
1485 ExtraHeaders: nil,
1486 }
1487
1488 var resp []byte
1489 var respBody io.ReadCloser
1490 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1491 if err != nil {
1492 var appErr RemoveFolderMemberAPIError
1493 err = auth.ParseError(err, &appErr)
1494 if err == &appErr {
1495 err = appErr
1496 }
1497 return
1498 }
1499
1500 err = json.Unmarshal(resp, &res)
1501 if err != nil {
1502 return
1503 }
1504
1505 _ = respBody
1506 return
1507 }
1508
1509 //RevokeSharedLinkAPIError is an error-wrapper for the revoke_shared_link route
1510 type RevokeSharedLinkAPIError struct {
1511 dropbox.APIError
1512 EndpointError *RevokeSharedLinkError `json:"error"`
1513 }
1514
1515 func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) {
1516 req := dropbox.Request{
1517 Host: "api",
1518 Namespace: "sharing",
1519 Route: "revoke_shared_link",
1520 Auth: "user",
1521 Style: "rpc",
1522 Arg: arg,
1523 ExtraHeaders: nil,
1524 }
1525
1526 var resp []byte
1527 var respBody io.ReadCloser
1528 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1529 if err != nil {
1530 var appErr RevokeSharedLinkAPIError
1531 err = auth.ParseError(err, &appErr)
1532 if err == &appErr {
1533 err = appErr
1534 }
1535 return
1536 }
1537
1538 _ = resp
1539 _ = respBody
1540 return
1541 }
1542
1543 //SetAccessInheritanceAPIError is an error-wrapper for the set_access_inheritance route
1544 type SetAccessInheritanceAPIError struct {
1545 dropbox.APIError
1546 EndpointError *SetAccessInheritanceError `json:"error"`
1547 }
1548
1549 func (dbx *apiImpl) SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error) {
1550 req := dropbox.Request{
1551 Host: "api",
1552 Namespace: "sharing",
1553 Route: "set_access_inheritance",
1554 Auth: "user",
1555 Style: "rpc",
1556 Arg: arg,
1557 ExtraHeaders: nil,
1558 }
1559
1560 var resp []byte
1561 var respBody io.ReadCloser
1562 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1563 if err != nil {
1564 var appErr SetAccessInheritanceAPIError
1565 err = auth.ParseError(err, &appErr)
1566 if err == &appErr {
1567 err = appErr
1568 }
1569 return
1570 }
1571
1572 err = json.Unmarshal(resp, &res)
1573 if err != nil {
1574 return
1575 }
1576
1577 _ = respBody
1578 return
1579 }
1580
1581 //ShareFolderAPIError is an error-wrapper for the share_folder route
1582 type ShareFolderAPIError struct {
1583 dropbox.APIError
1584 EndpointError *ShareFolderError `json:"error"`
1585 }
1586
1587 func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) {
1588 req := dropbox.Request{
1589 Host: "api",
1590 Namespace: "sharing",
1591 Route: "share_folder",
1592 Auth: "user",
1593 Style: "rpc",
1594 Arg: arg,
1595 ExtraHeaders: nil,
1596 }
1597
1598 var resp []byte
1599 var respBody io.ReadCloser
1600 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1601 if err != nil {
1602 var appErr ShareFolderAPIError
1603 err = auth.ParseError(err, &appErr)
1604 if err == &appErr {
1605 err = appErr
1606 }
1607 return
1608 }
1609
1610 err = json.Unmarshal(resp, &res)
1611 if err != nil {
1612 return
1613 }
1614
1615 _ = respBody
1616 return
1617 }
1618
1619 //TransferFolderAPIError is an error-wrapper for the transfer_folder route
1620 type TransferFolderAPIError struct {
1621 dropbox.APIError
1622 EndpointError *TransferFolderError `json:"error"`
1623 }
1624
1625 func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) {
1626 req := dropbox.Request{
1627 Host: "api",
1628 Namespace: "sharing",
1629 Route: "transfer_folder",
1630 Auth: "user",
1631 Style: "rpc",
1632 Arg: arg,
1633 ExtraHeaders: nil,
1634 }
1635
1636 var resp []byte
1637 var respBody io.ReadCloser
1638 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1639 if err != nil {
1640 var appErr TransferFolderAPIError
1641 err = auth.ParseError(err, &appErr)
1642 if err == &appErr {
1643 err = appErr
1644 }
1645 return
1646 }
1647
1648 _ = resp
1649 _ = respBody
1650 return
1651 }
1652
1653 //UnmountFolderAPIError is an error-wrapper for the unmount_folder route
1654 type UnmountFolderAPIError struct {
1655 dropbox.APIError
1656 EndpointError *UnmountFolderError `json:"error"`
1657 }
1658
1659 func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) {
1660 req := dropbox.Request{
1661 Host: "api",
1662 Namespace: "sharing",
1663 Route: "unmount_folder",
1664 Auth: "user",
1665 Style: "rpc",
1666 Arg: arg,
1667 ExtraHeaders: nil,
1668 }
1669
1670 var resp []byte
1671 var respBody io.ReadCloser
1672 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1673 if err != nil {
1674 var appErr UnmountFolderAPIError
1675 err = auth.ParseError(err, &appErr)
1676 if err == &appErr {
1677 err = appErr
1678 }
1679 return
1680 }
1681
1682 _ = resp
1683 _ = respBody
1684 return
1685 }
1686
1687 //UnshareFileAPIError is an error-wrapper for the unshare_file route
1688 type UnshareFileAPIError struct {
1689 dropbox.APIError
1690 EndpointError *UnshareFileError `json:"error"`
1691 }
1692
1693 func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) {
1694 req := dropbox.Request{
1695 Host: "api",
1696 Namespace: "sharing",
1697 Route: "unshare_file",
1698 Auth: "user",
1699 Style: "rpc",
1700 Arg: arg,
1701 ExtraHeaders: nil,
1702 }
1703
1704 var resp []byte
1705 var respBody io.ReadCloser
1706 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1707 if err != nil {
1708 var appErr UnshareFileAPIError
1709 err = auth.ParseError(err, &appErr)
1710 if err == &appErr {
1711 err = appErr
1712 }
1713 return
1714 }
1715
1716 _ = resp
1717 _ = respBody
1718 return
1719 }
1720
1721 //UnshareFolderAPIError is an error-wrapper for the unshare_folder route
1722 type UnshareFolderAPIError struct {
1723 dropbox.APIError
1724 EndpointError *UnshareFolderError `json:"error"`
1725 }
1726
1727 func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) {
1728 req := dropbox.Request{
1729 Host: "api",
1730 Namespace: "sharing",
1731 Route: "unshare_folder",
1732 Auth: "user",
1733 Style: "rpc",
1734 Arg: arg,
1735 ExtraHeaders: nil,
1736 }
1737
1738 var resp []byte
1739 var respBody io.ReadCloser
1740 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1741 if err != nil {
1742 var appErr UnshareFolderAPIError
1743 err = auth.ParseError(err, &appErr)
1744 if err == &appErr {
1745 err = appErr
1746 }
1747 return
1748 }
1749
1750 err = json.Unmarshal(resp, &res)
1751 if err != nil {
1752 return
1753 }
1754
1755 _ = respBody
1756 return
1757 }
1758
1759 //UpdateFileMemberAPIError is an error-wrapper for the update_file_member route
1760 type UpdateFileMemberAPIError struct {
1761 dropbox.APIError
1762 EndpointError *FileMemberActionError `json:"error"`
1763 }
1764
1765 func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error) {
1766 req := dropbox.Request{
1767 Host: "api",
1768 Namespace: "sharing",
1769 Route: "update_file_member",
1770 Auth: "user",
1771 Style: "rpc",
1772 Arg: arg,
1773 ExtraHeaders: nil,
1774 }
1775
1776 var resp []byte
1777 var respBody io.ReadCloser
1778 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1779 if err != nil {
1780 var appErr UpdateFileMemberAPIError
1781 err = auth.ParseError(err, &appErr)
1782 if err == &appErr {
1783 err = appErr
1784 }
1785 return
1786 }
1787
1788 err = json.Unmarshal(resp, &res)
1789 if err != nil {
1790 return
1791 }
1792
1793 _ = respBody
1794 return
1795 }
1796
1797 //UpdateFolderMemberAPIError is an error-wrapper for the update_folder_member route
1798 type UpdateFolderMemberAPIError struct {
1799 dropbox.APIError
1800 EndpointError *UpdateFolderMemberError `json:"error"`
1801 }
1802
1803 func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error) {
1804 req := dropbox.Request{
1805 Host: "api",
1806 Namespace: "sharing",
1807 Route: "update_folder_member",
1808 Auth: "user",
1809 Style: "rpc",
1810 Arg: arg,
1811 ExtraHeaders: nil,
1812 }
1813
1814 var resp []byte
1815 var respBody io.ReadCloser
1816 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1817 if err != nil {
1818 var appErr UpdateFolderMemberAPIError
1819 err = auth.ParseError(err, &appErr)
1820 if err == &appErr {
1821 err = appErr
1822 }
1823 return
1824 }
1825
1826 err = json.Unmarshal(resp, &res)
1827 if err != nil {
1828 return
1829 }
1830
1831 _ = respBody
1832 return
1833 }
1834
1835 //UpdateFolderPolicyAPIError is an error-wrapper for the update_folder_policy route
1836 type UpdateFolderPolicyAPIError struct {
1837 dropbox.APIError
1838 EndpointError *UpdateFolderPolicyError `json:"error"`
1839 }
1840
1841 func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) {
1842 req := dropbox.Request{
1843 Host: "api",
1844 Namespace: "sharing",
1845 Route: "update_folder_policy",
1846 Auth: "user",
1847 Style: "rpc",
1848 Arg: arg,
1849 ExtraHeaders: nil,
1850 }
1851
1852 var resp []byte
1853 var respBody io.ReadCloser
1854 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1855 if err != nil {
1856 var appErr UpdateFolderPolicyAPIError
1857 err = auth.ParseError(err, &appErr)
1858 if err == &appErr {
1859 err = appErr
1860 }
1861 return
1862 }
1863
1864 err = json.Unmarshal(resp, &res)
1865 if err != nil {
1866 return
1867 }
1868
1869 _ = respBody
1870 return
1871 }
1872
1873 // New returns a Client implementation for this namespace
1874 func New(c dropbox.Config) Client {
1875 ctx := apiImpl(dropbox.NewContext(c))
1876 return &ctx
1877 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package sharing : This namespace contains endpoints and data types for
21 // creating and managing shared links and shared folders.
22 package sharing
23
24 import (
25 "encoding/json"
26 "time"
27
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/seen_state"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
33 )
34
35 // AccessInheritance : Information about the inheritance policy of a shared
36 // folder.
37 type AccessInheritance struct {
38 dropbox.Tagged
39 }
40
41 // Valid tag values for AccessInheritance
42 const (
43 AccessInheritanceInherit = "inherit"
44 AccessInheritanceNoInherit = "no_inherit"
45 AccessInheritanceOther = "other"
46 )
47
48 // AccessLevel : Defines the access levels for collaborators.
49 type AccessLevel struct {
50 dropbox.Tagged
51 }
52
53 // Valid tag values for AccessLevel
54 const (
55 AccessLevelOwner = "owner"
56 AccessLevelEditor = "editor"
57 AccessLevelViewer = "viewer"
58 AccessLevelViewerNoComment = "viewer_no_comment"
59 AccessLevelOther = "other"
60 )
61
62 // AclUpdatePolicy : Who can change a shared folder's access control list (ACL).
63 // In other words, who can add, remove, or change the privileges of members.
64 type AclUpdatePolicy struct {
65 dropbox.Tagged
66 }
67
68 // Valid tag values for AclUpdatePolicy
69 const (
70 AclUpdatePolicyOwner = "owner"
71 AclUpdatePolicyEditors = "editors"
72 AclUpdatePolicyOther = "other"
73 )
74
75 // AddFileMemberArgs : Arguments for `addFileMember`.
76 type AddFileMemberArgs struct {
77 // File : File to which to add members.
78 File string `json:"file"`
79 // Members : Members to add. Note that even an email address is given, this
80 // may result in a user being directly added to the membership if that email
81 // is the user's main account email.
82 Members []*MemberSelector `json:"members"`
83 // CustomMessage : Message to send to added members in their invitation.
84 CustomMessage string `json:"custom_message,omitempty"`
85 // Quiet : Whether added members should be notified via device notifications
86 // of their invitation.
87 Quiet bool `json:"quiet"`
88 // AccessLevel : AccessLevel union object, describing what access level we
89 // want to give new members.
90 AccessLevel *AccessLevel `json:"access_level"`
91 // AddMessageAsComment : If the custom message should be added as a comment
92 // on the file.
93 AddMessageAsComment bool `json:"add_message_as_comment"`
94 }
95
96 // NewAddFileMemberArgs returns a new AddFileMemberArgs instance
97 func NewAddFileMemberArgs(File string, Members []*MemberSelector) *AddFileMemberArgs {
98 s := new(AddFileMemberArgs)
99 s.File = File
100 s.Members = Members
101 s.Quiet = false
102 s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{Tag: "viewer"}}
103 s.AddMessageAsComment = false
104 return s
105 }
106
107 // AddFileMemberError : Errors for `addFileMember`.
108 type AddFileMemberError struct {
109 dropbox.Tagged
110 // UserError : has no documentation (yet)
111 UserError *SharingUserError `json:"user_error,omitempty"`
112 // AccessError : has no documentation (yet)
113 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
114 }
115
116 // Valid tag values for AddFileMemberError
117 const (
118 AddFileMemberErrorUserError = "user_error"
119 AddFileMemberErrorAccessError = "access_error"
120 AddFileMemberErrorRateLimit = "rate_limit"
121 AddFileMemberErrorInvalidComment = "invalid_comment"
122 AddFileMemberErrorOther = "other"
123 )
124
125 // UnmarshalJSON deserializes into a AddFileMemberError instance
126 func (u *AddFileMemberError) UnmarshalJSON(body []byte) error {
127 type wrap struct {
128 dropbox.Tagged
129 // UserError : has no documentation (yet)
130 UserError *SharingUserError `json:"user_error,omitempty"`
131 // AccessError : has no documentation (yet)
132 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
133 }
134 var w wrap
135 var err error
136 if err = json.Unmarshal(body, &w); err != nil {
137 return err
138 }
139 u.Tag = w.Tag
140 switch u.Tag {
141 case "user_error":
142 u.UserError = w.UserError
143
144 if err != nil {
145 return err
146 }
147 case "access_error":
148 u.AccessError = w.AccessError
149
150 if err != nil {
151 return err
152 }
153 }
154 return nil
155 }
156
157 // AddFolderMemberArg : has no documentation (yet)
158 type AddFolderMemberArg struct {
159 // SharedFolderId : The ID for the shared folder.
160 SharedFolderId string `json:"shared_folder_id"`
161 // Members : The intended list of members to add. Added members will
162 // receive invites to join the shared folder.
163 Members []*AddMember `json:"members"`
164 // Quiet : Whether added members should be notified via email and device
165 // notifications of their invite.
166 Quiet bool `json:"quiet"`
167 // CustomMessage : Optional message to display to added members in their
168 // invitation.
169 CustomMessage string `json:"custom_message,omitempty"`
170 }
171
172 // NewAddFolderMemberArg returns a new AddFolderMemberArg instance
173 func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) *AddFolderMemberArg {
174 s := new(AddFolderMemberArg)
175 s.SharedFolderId = SharedFolderId
176 s.Members = Members
177 s.Quiet = false
178 return s
179 }
180
181 // AddFolderMemberError : has no documentation (yet)
182 type AddFolderMemberError struct {
183 dropbox.Tagged
184 // AccessError : Unable to access shared folder.
185 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
186 // BadMember : `AddFolderMemberArg.members` contains a bad invitation
187 // recipient.
188 BadMember *AddMemberSelectorError `json:"bad_member,omitempty"`
189 // TooManyMembers : The value is the member limit that was reached.
190 TooManyMembers uint64 `json:"too_many_members,omitempty"`
191 // TooManyPendingInvites : The value is the pending invite limit that was
192 // reached.
193 TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"`
194 }
195
196 // Valid tag values for AddFolderMemberError
197 const (
198 AddFolderMemberErrorAccessError = "access_error"
199 AddFolderMemberErrorEmailUnverified = "email_unverified"
200 AddFolderMemberErrorBannedMember = "banned_member"
201 AddFolderMemberErrorBadMember = "bad_member"
202 AddFolderMemberErrorCantShareOutsideTeam = "cant_share_outside_team"
203 AddFolderMemberErrorTooManyMembers = "too_many_members"
204 AddFolderMemberErrorTooManyPendingInvites = "too_many_pending_invites"
205 AddFolderMemberErrorRateLimit = "rate_limit"
206 AddFolderMemberErrorTooManyInvitees = "too_many_invitees"
207 AddFolderMemberErrorInsufficientPlan = "insufficient_plan"
208 AddFolderMemberErrorTeamFolder = "team_folder"
209 AddFolderMemberErrorNoPermission = "no_permission"
210 AddFolderMemberErrorInvalidSharedFolder = "invalid_shared_folder"
211 AddFolderMemberErrorOther = "other"
212 )
213
214 // UnmarshalJSON deserializes into a AddFolderMemberError instance
215 func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error {
216 type wrap struct {
217 dropbox.Tagged
218 // AccessError : Unable to access shared folder.
219 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
220 // BadMember : `AddFolderMemberArg.members` contains a bad invitation
221 // recipient.
222 BadMember *AddMemberSelectorError `json:"bad_member,omitempty"`
223 // TooManyMembers : The value is the member limit that was reached.
224 TooManyMembers uint64 `json:"too_many_members,omitempty"`
225 // TooManyPendingInvites : The value is the pending invite limit that
226 // was reached.
227 TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"`
228 }
229 var w wrap
230 var err error
231 if err = json.Unmarshal(body, &w); err != nil {
232 return err
233 }
234 u.Tag = w.Tag
235 switch u.Tag {
236 case "access_error":
237 u.AccessError = w.AccessError
238
239 if err != nil {
240 return err
241 }
242 case "bad_member":
243 u.BadMember = w.BadMember
244
245 if err != nil {
246 return err
247 }
248 case "too_many_members":
249 u.TooManyMembers = w.TooManyMembers
250
251 if err != nil {
252 return err
253 }
254 case "too_many_pending_invites":
255 u.TooManyPendingInvites = w.TooManyPendingInvites
256
257 if err != nil {
258 return err
259 }
260 }
261 return nil
262 }
263
264 // AddMember : The member and type of access the member should have when added
265 // to a shared folder.
266 type AddMember struct {
267 // Member : The member to add to the shared folder.
268 Member *MemberSelector `json:"member"`
269 // AccessLevel : The access level to grant `member` to the shared folder.
270 // `AccessLevel.owner` is disallowed.
271 AccessLevel *AccessLevel `json:"access_level"`
272 }
273
274 // NewAddMember returns a new AddMember instance
275 func NewAddMember(Member *MemberSelector) *AddMember {
276 s := new(AddMember)
277 s.Member = Member
278 s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{Tag: "viewer"}}
279 return s
280 }
281
282 // AddMemberSelectorError : has no documentation (yet)
283 type AddMemberSelectorError struct {
284 dropbox.Tagged
285 // InvalidDropboxId : The value is the ID that could not be identified.
286 InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"`
287 // InvalidEmail : The value is the e-email address that is malformed.
288 InvalidEmail string `json:"invalid_email,omitempty"`
289 // UnverifiedDropboxId : The value is the ID of the Dropbox user with an
290 // unverified email address. Invite unverified users by email address
291 // instead of by their Dropbox ID.
292 UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"`
293 }
294
295 // Valid tag values for AddMemberSelectorError
296 const (
297 AddMemberSelectorErrorAutomaticGroup = "automatic_group"
298 AddMemberSelectorErrorInvalidDropboxId = "invalid_dropbox_id"
299 AddMemberSelectorErrorInvalidEmail = "invalid_email"
300 AddMemberSelectorErrorUnverifiedDropboxId = "unverified_dropbox_id"
301 AddMemberSelectorErrorGroupDeleted = "group_deleted"
302 AddMemberSelectorErrorGroupNotOnTeam = "group_not_on_team"
303 AddMemberSelectorErrorOther = "other"
304 )
305
306 // UnmarshalJSON deserializes into a AddMemberSelectorError instance
307 func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error {
308 type wrap struct {
309 dropbox.Tagged
310 // InvalidDropboxId : The value is the ID that could not be identified.
311 InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"`
312 // InvalidEmail : The value is the e-email address that is malformed.
313 InvalidEmail string `json:"invalid_email,omitempty"`
314 // UnverifiedDropboxId : The value is the ID of the Dropbox user with an
315 // unverified email address. Invite unverified users by email address
316 // instead of by their Dropbox ID.
317 UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"`
318 }
319 var w wrap
320 var err error
321 if err = json.Unmarshal(body, &w); err != nil {
322 return err
323 }
324 u.Tag = w.Tag
325 switch u.Tag {
326 case "invalid_dropbox_id":
327 u.InvalidDropboxId = w.InvalidDropboxId
328
329 if err != nil {
330 return err
331 }
332 case "invalid_email":
333 u.InvalidEmail = w.InvalidEmail
334
335 if err != nil {
336 return err
337 }
338 case "unverified_dropbox_id":
339 u.UnverifiedDropboxId = w.UnverifiedDropboxId
340
341 if err != nil {
342 return err
343 }
344 }
345 return nil
346 }
347
348 // AudienceExceptionContentInfo : Information about the content that has a link
349 // audience different than that of this folder.
350 type AudienceExceptionContentInfo struct {
351 // Name : The name of the content, which is either a file or a folder.
352 Name string `json:"name"`
353 }
354
355 // NewAudienceExceptionContentInfo returns a new AudienceExceptionContentInfo instance
356 func NewAudienceExceptionContentInfo(Name string) *AudienceExceptionContentInfo {
357 s := new(AudienceExceptionContentInfo)
358 s.Name = Name
359 return s
360 }
361
362 // AudienceExceptions : The total count and truncated list of information of
363 // content inside this folder that has a different audience than the link on
364 // this folder. This is only returned for folders.
365 type AudienceExceptions struct {
366 // Count : has no documentation (yet)
367 Count uint32 `json:"count"`
368 // Exceptions : A truncated list of some of the content that is an
369 // exception. The length of this list could be smaller than the count since
370 // it is only a sample but will not be empty as long as count is not 0.
371 Exceptions []*AudienceExceptionContentInfo `json:"exceptions"`
372 }
373
374 // NewAudienceExceptions returns a new AudienceExceptions instance
375 func NewAudienceExceptions(Count uint32, Exceptions []*AudienceExceptionContentInfo) *AudienceExceptions {
376 s := new(AudienceExceptions)
377 s.Count = Count
378 s.Exceptions = Exceptions
379 return s
380 }
381
382 // AudienceRestrictingSharedFolder : Information about the shared folder that
383 // prevents the link audience for this link from being more restrictive.
384 type AudienceRestrictingSharedFolder struct {
385 // SharedFolderId : The ID of the shared folder.
386 SharedFolderId string `json:"shared_folder_id"`
387 // Name : The name of the shared folder.
388 Name string `json:"name"`
389 // Audience : The link audience of the shared folder.
390 Audience *LinkAudience `json:"audience"`
391 }
392
393 // NewAudienceRestrictingSharedFolder returns a new AudienceRestrictingSharedFolder instance
394 func NewAudienceRestrictingSharedFolder(SharedFolderId string, Name string, Audience *LinkAudience) *AudienceRestrictingSharedFolder {
395 s := new(AudienceRestrictingSharedFolder)
396 s.SharedFolderId = SharedFolderId
397 s.Name = Name
398 s.Audience = Audience
399 return s
400 }
401
402 // ChangeFileMemberAccessArgs : Arguments for `changeFileMemberAccess`.
403 type ChangeFileMemberAccessArgs struct {
404 // File : File for which we are changing a member's access.
405 File string `json:"file"`
406 // Member : The member whose access we are changing.
407 Member *MemberSelector `json:"member"`
408 // AccessLevel : The new access level for the member.
409 AccessLevel *AccessLevel `json:"access_level"`
410 }
411
412 // NewChangeFileMemberAccessArgs returns a new ChangeFileMemberAccessArgs instance
413 func NewChangeFileMemberAccessArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *ChangeFileMemberAccessArgs {
414 s := new(ChangeFileMemberAccessArgs)
415 s.File = File
416 s.Member = Member
417 s.AccessLevel = AccessLevel
418 return s
419 }
420
421 // LinkMetadata : Metadata for a shared link. This can be either a
422 // `PathLinkMetadata` or `CollectionLinkMetadata`.
423 type LinkMetadata struct {
424 // Url : URL of the shared link.
425 Url string `json:"url"`
426 // Visibility : Who can access the link.
427 Visibility *Visibility `json:"visibility"`
428 // Expires : Expiration time, if set. By default the link won't expire.
429 Expires *time.Time `json:"expires,omitempty"`
430 }
431
432 // NewLinkMetadata returns a new LinkMetadata instance
433 func NewLinkMetadata(Url string, Visibility *Visibility) *LinkMetadata {
434 s := new(LinkMetadata)
435 s.Url = Url
436 s.Visibility = Visibility
437 return s
438 }
439
440 // IsLinkMetadata is the interface type for LinkMetadata and its subtypes
441 type IsLinkMetadata interface {
442 IsLinkMetadata()
443 }
444
445 // IsLinkMetadata implements the IsLinkMetadata interface
446 func (u *LinkMetadata) IsLinkMetadata() {}
447
448 type linkMetadataUnion struct {
449 dropbox.Tagged
450 // Path : has no documentation (yet)
451 Path *PathLinkMetadata `json:"path,omitempty"`
452 // Collection : has no documentation (yet)
453 Collection *CollectionLinkMetadata `json:"collection,omitempty"`
454 }
455
456 // Valid tag values for LinkMetadata
457 const (
458 LinkMetadataPath = "path"
459 LinkMetadataCollection = "collection"
460 )
461
462 // UnmarshalJSON deserializes into a linkMetadataUnion instance
463 func (u *linkMetadataUnion) UnmarshalJSON(body []byte) error {
464 type wrap struct {
465 dropbox.Tagged
466 }
467 var w wrap
468 var err error
469 if err = json.Unmarshal(body, &w); err != nil {
470 return err
471 }
472 u.Tag = w.Tag
473 switch u.Tag {
474 case "path":
475 err = json.Unmarshal(body, &u.Path)
476
477 if err != nil {
478 return err
479 }
480 case "collection":
481 err = json.Unmarshal(body, &u.Collection)
482
483 if err != nil {
484 return err
485 }
486 }
487 return nil
488 }
489
490 // IsLinkMetadataFromJSON converts JSON to a concrete IsLinkMetadata instance
491 func IsLinkMetadataFromJSON(data []byte) (IsLinkMetadata, error) {
492 var t linkMetadataUnion
493 if err := json.Unmarshal(data, &t); err != nil {
494 return nil, err
495 }
496 switch t.Tag {
497 case "path":
498 return t.Path, nil
499
500 case "collection":
501 return t.Collection, nil
502
503 }
504 return nil, nil
505 }
506
507 // CollectionLinkMetadata : Metadata for a collection-based shared link.
508 type CollectionLinkMetadata struct {
509 LinkMetadata
510 }
511
512 // NewCollectionLinkMetadata returns a new CollectionLinkMetadata instance
513 func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *CollectionLinkMetadata {
514 s := new(CollectionLinkMetadata)
515 s.Url = Url
516 s.Visibility = Visibility
517 return s
518 }
519
520 // CreateSharedLinkArg : has no documentation (yet)
521 type CreateSharedLinkArg struct {
522 // Path : The path to share.
523 Path string `json:"path"`
524 // ShortUrl : Whether to return a shortened URL.
525 ShortUrl bool `json:"short_url"`
526 // PendingUpload : If it's okay to share a path that does not yet exist, set
527 // this to either `PendingUploadMode.file` or `PendingUploadMode.folder` to
528 // indicate whether to assume it's a file or folder.
529 PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"`
530 }
531
532 // NewCreateSharedLinkArg returns a new CreateSharedLinkArg instance
533 func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg {
534 s := new(CreateSharedLinkArg)
535 s.Path = Path
536 s.ShortUrl = false
537 return s
538 }
539
540 // CreateSharedLinkError : has no documentation (yet)
541 type CreateSharedLinkError struct {
542 dropbox.Tagged
543 // Path : has no documentation (yet)
544 Path *files.LookupError `json:"path,omitempty"`
545 }
546
547 // Valid tag values for CreateSharedLinkError
548 const (
549 CreateSharedLinkErrorPath = "path"
550 CreateSharedLinkErrorOther = "other"
551 )
552
553 // UnmarshalJSON deserializes into a CreateSharedLinkError instance
554 func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error {
555 type wrap struct {
556 dropbox.Tagged
557 // Path : has no documentation (yet)
558 Path *files.LookupError `json:"path,omitempty"`
559 }
560 var w wrap
561 var err error
562 if err = json.Unmarshal(body, &w); err != nil {
563 return err
564 }
565 u.Tag = w.Tag
566 switch u.Tag {
567 case "path":
568 u.Path = w.Path
569
570 if err != nil {
571 return err
572 }
573 }
574 return nil
575 }
576
577 // CreateSharedLinkWithSettingsArg : has no documentation (yet)
578 type CreateSharedLinkWithSettingsArg struct {
579 // Path : The path to be shared by the shared link.
580 Path string `json:"path"`
581 // Settings : The requested settings for the newly created shared link.
582 Settings *SharedLinkSettings `json:"settings,omitempty"`
583 }
584
585 // NewCreateSharedLinkWithSettingsArg returns a new CreateSharedLinkWithSettingsArg instance
586 func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg {
587 s := new(CreateSharedLinkWithSettingsArg)
588 s.Path = Path
589 return s
590 }
591
592 // CreateSharedLinkWithSettingsError : has no documentation (yet)
593 type CreateSharedLinkWithSettingsError struct {
594 dropbox.Tagged
595 // Path : has no documentation (yet)
596 Path *files.LookupError `json:"path,omitempty"`
597 // SharedLinkAlreadyExists : The shared link already exists. You can call
598 // `listSharedLinks` to get the existing link, or use the provided metadata
599 // if it is returned.
600 SharedLinkAlreadyExists *SharedLinkAlreadyExistsMetadata `json:"shared_link_already_exists,omitempty"`
601 // SettingsError : There is an error with the given settings.
602 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
603 }
604
605 // Valid tag values for CreateSharedLinkWithSettingsError
606 const (
607 CreateSharedLinkWithSettingsErrorPath = "path"
608 CreateSharedLinkWithSettingsErrorEmailNotVerified = "email_not_verified"
609 CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists = "shared_link_already_exists"
610 CreateSharedLinkWithSettingsErrorSettingsError = "settings_error"
611 CreateSharedLinkWithSettingsErrorAccessDenied = "access_denied"
612 )
613
614 // UnmarshalJSON deserializes into a CreateSharedLinkWithSettingsError instance
615 func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte) error {
616 type wrap struct {
617 dropbox.Tagged
618 // Path : has no documentation (yet)
619 Path *files.LookupError `json:"path,omitempty"`
620 // SharedLinkAlreadyExists : The shared link already exists. You can
621 // call `listSharedLinks` to get the existing link, or use the provided
622 // metadata if it is returned.
623 SharedLinkAlreadyExists *SharedLinkAlreadyExistsMetadata `json:"shared_link_already_exists,omitempty"`
624 // SettingsError : There is an error with the given settings.
625 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
626 }
627 var w wrap
628 var err error
629 if err = json.Unmarshal(body, &w); err != nil {
630 return err
631 }
632 u.Tag = w.Tag
633 switch u.Tag {
634 case "path":
635 u.Path = w.Path
636
637 if err != nil {
638 return err
639 }
640 case "shared_link_already_exists":
641 u.SharedLinkAlreadyExists = w.SharedLinkAlreadyExists
642
643 if err != nil {
644 return err
645 }
646 case "settings_error":
647 u.SettingsError = w.SettingsError
648
649 if err != nil {
650 return err
651 }
652 }
653 return nil
654 }
655
656 // SharedContentLinkMetadataBase : has no documentation (yet)
657 type SharedContentLinkMetadataBase struct {
658 // AccessLevel : The access level on the link for this file.
659 AccessLevel *AccessLevel `json:"access_level,omitempty"`
660 // AudienceOptions : The audience options that are available for the
661 // content. Some audience options may be unavailable. For example, team_only
662 // may be unavailable if the content is not owned by a user on a team. The
663 // 'default' audience option is always available if the user can modify link
664 // settings.
665 AudienceOptions []*LinkAudience `json:"audience_options"`
666 // AudienceRestrictingSharedFolder : The shared folder that prevents the
667 // link audience for this link from being more restrictive.
668 AudienceRestrictingSharedFolder *AudienceRestrictingSharedFolder `json:"audience_restricting_shared_folder,omitempty"`
669 // CurrentAudience : The current audience of the link.
670 CurrentAudience *LinkAudience `json:"current_audience"`
671 // Expiry : Whether the link has an expiry set on it. A link with an expiry
672 // will have its audience changed to members when the expiry is reached.
673 Expiry *time.Time `json:"expiry,omitempty"`
674 // LinkPermissions : A list of permissions for actions you can perform on
675 // the link.
676 LinkPermissions []*LinkPermission `json:"link_permissions"`
677 // PasswordProtected : Whether the link is protected by a password.
678 PasswordProtected bool `json:"password_protected"`
679 }
680
681 // NewSharedContentLinkMetadataBase returns a new SharedContentLinkMetadataBase instance
682 func NewSharedContentLinkMetadataBase(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *SharedContentLinkMetadataBase {
683 s := new(SharedContentLinkMetadataBase)
684 s.AudienceOptions = AudienceOptions
685 s.CurrentAudience = CurrentAudience
686 s.LinkPermissions = LinkPermissions
687 s.PasswordProtected = PasswordProtected
688 return s
689 }
690
691 // ExpectedSharedContentLinkMetadata : The expected metadata of a shared link
692 // for a file or folder when a link is first created for the content. Absent if
693 // the link already exists.
694 type ExpectedSharedContentLinkMetadata struct {
695 SharedContentLinkMetadataBase
696 }
697
698 // NewExpectedSharedContentLinkMetadata returns a new ExpectedSharedContentLinkMetadata instance
699 func NewExpectedSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *ExpectedSharedContentLinkMetadata {
700 s := new(ExpectedSharedContentLinkMetadata)
701 s.AudienceOptions = AudienceOptions
702 s.CurrentAudience = CurrentAudience
703 s.LinkPermissions = LinkPermissions
704 s.PasswordProtected = PasswordProtected
705 return s
706 }
707
708 // FileAction : Sharing actions that may be taken on files.
709 type FileAction struct {
710 dropbox.Tagged
711 }
712
713 // Valid tag values for FileAction
714 const (
715 FileActionDisableViewerInfo = "disable_viewer_info"
716 FileActionEditContents = "edit_contents"
717 FileActionEnableViewerInfo = "enable_viewer_info"
718 FileActionInviteViewer = "invite_viewer"
719 FileActionInviteViewerNoComment = "invite_viewer_no_comment"
720 FileActionInviteEditor = "invite_editor"
721 FileActionUnshare = "unshare"
722 FileActionRelinquishMembership = "relinquish_membership"
723 FileActionShareLink = "share_link"
724 FileActionCreateLink = "create_link"
725 FileActionCreateViewLink = "create_view_link"
726 FileActionCreateEditLink = "create_edit_link"
727 FileActionOther = "other"
728 )
729
730 // FileErrorResult : has no documentation (yet)
731 type FileErrorResult struct {
732 dropbox.Tagged
733 // FileNotFoundError : File specified by id was not found.
734 FileNotFoundError string `json:"file_not_found_error,omitempty"`
735 // InvalidFileActionError : User does not have permission to take the
736 // specified action on the file.
737 InvalidFileActionError string `json:"invalid_file_action_error,omitempty"`
738 // PermissionDeniedError : User does not have permission to access file
739 // specified by file.Id.
740 PermissionDeniedError string `json:"permission_denied_error,omitempty"`
741 }
742
743 // Valid tag values for FileErrorResult
744 const (
745 FileErrorResultFileNotFoundError = "file_not_found_error"
746 FileErrorResultInvalidFileActionError = "invalid_file_action_error"
747 FileErrorResultPermissionDeniedError = "permission_denied_error"
748 FileErrorResultOther = "other"
749 )
750
751 // UnmarshalJSON deserializes into a FileErrorResult instance
752 func (u *FileErrorResult) UnmarshalJSON(body []byte) error {
753 type wrap struct {
754 dropbox.Tagged
755 // FileNotFoundError : File specified by id was not found.
756 FileNotFoundError string `json:"file_not_found_error,omitempty"`
757 // InvalidFileActionError : User does not have permission to take the
758 // specified action on the file.
759 InvalidFileActionError string `json:"invalid_file_action_error,omitempty"`
760 // PermissionDeniedError : User does not have permission to access file
761 // specified by file.Id.
762 PermissionDeniedError string `json:"permission_denied_error,omitempty"`
763 }
764 var w wrap
765 var err error
766 if err = json.Unmarshal(body, &w); err != nil {
767 return err
768 }
769 u.Tag = w.Tag
770 switch u.Tag {
771 case "file_not_found_error":
772 u.FileNotFoundError = w.FileNotFoundError
773
774 if err != nil {
775 return err
776 }
777 case "invalid_file_action_error":
778 u.InvalidFileActionError = w.InvalidFileActionError
779
780 if err != nil {
781 return err
782 }
783 case "permission_denied_error":
784 u.PermissionDeniedError = w.PermissionDeniedError
785
786 if err != nil {
787 return err
788 }
789 }
790 return nil
791 }
792
793 // SharedLinkMetadata : The metadata of a shared link.
794 type SharedLinkMetadata struct {
795 // Url : URL of the shared link.
796 Url string `json:"url"`
797 // Id : A unique identifier for the linked file.
798 Id string `json:"id,omitempty"`
799 // Name : The linked file name (including extension). This never contains a
800 // slash.
801 Name string `json:"name"`
802 // Expires : Expiration time, if set. By default the link won't expire.
803 Expires *time.Time `json:"expires,omitempty"`
804 // PathLower : The lowercased full path in the user's Dropbox. This always
805 // starts with a slash. This field will only be present only if the linked
806 // file is in the authenticated user's dropbox.
807 PathLower string `json:"path_lower,omitempty"`
808 // LinkPermissions : The link's access permissions.
809 LinkPermissions *LinkPermissions `json:"link_permissions"`
810 // TeamMemberInfo : The team membership information of the link's owner.
811 // This field will only be present if the link's owner is a team member.
812 TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"`
813 // ContentOwnerTeamInfo : The team information of the content's owner. This
814 // field will only be present if the content's owner is a team member and
815 // the content's owner team is different from the link's owner team.
816 ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"`
817 }
818
819 // NewSharedLinkMetadata returns a new SharedLinkMetadata instance
820 func NewSharedLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *SharedLinkMetadata {
821 s := new(SharedLinkMetadata)
822 s.Url = Url
823 s.Name = Name
824 s.LinkPermissions = LinkPermissions
825 return s
826 }
827
828 // IsSharedLinkMetadata is the interface type for SharedLinkMetadata and its subtypes
829 type IsSharedLinkMetadata interface {
830 IsSharedLinkMetadata()
831 }
832
833 // IsSharedLinkMetadata implements the IsSharedLinkMetadata interface
834 func (u *SharedLinkMetadata) IsSharedLinkMetadata() {}
835
836 type sharedLinkMetadataUnion struct {
837 dropbox.Tagged
838 // File : has no documentation (yet)
839 File *FileLinkMetadata `json:"file,omitempty"`
840 // Folder : has no documentation (yet)
841 Folder *FolderLinkMetadata `json:"folder,omitempty"`
842 }
843
844 // Valid tag values for SharedLinkMetadata
845 const (
846 SharedLinkMetadataFile = "file"
847 SharedLinkMetadataFolder = "folder"
848 )
849
850 // UnmarshalJSON deserializes into a sharedLinkMetadataUnion instance
851 func (u *sharedLinkMetadataUnion) UnmarshalJSON(body []byte) error {
852 type wrap struct {
853 dropbox.Tagged
854 }
855 var w wrap
856 var err error
857 if err = json.Unmarshal(body, &w); err != nil {
858 return err
859 }
860 u.Tag = w.Tag
861 switch u.Tag {
862 case "file":
863 err = json.Unmarshal(body, &u.File)
864
865 if err != nil {
866 return err
867 }
868 case "folder":
869 err = json.Unmarshal(body, &u.Folder)
870
871 if err != nil {
872 return err
873 }
874 }
875 return nil
876 }
877
878 // IsSharedLinkMetadataFromJSON converts JSON to a concrete IsSharedLinkMetadata instance
879 func IsSharedLinkMetadataFromJSON(data []byte) (IsSharedLinkMetadata, error) {
880 var t sharedLinkMetadataUnion
881 if err := json.Unmarshal(data, &t); err != nil {
882 return nil, err
883 }
884 switch t.Tag {
885 case "file":
886 return t.File, nil
887
888 case "folder":
889 return t.Folder, nil
890
891 }
892 return nil, nil
893 }
894
895 // FileLinkMetadata : The metadata of a file shared link.
896 type FileLinkMetadata struct {
897 SharedLinkMetadata
898 // ClientModified : The modification time set by the desktop client when the
899 // file was added to Dropbox. Since this time is not verified (the Dropbox
900 // server stores whatever the desktop client sends up), this should only be
901 // used for display purposes (such as sorting) and not, for example, to
902 // determine if a file has changed or not.
903 ClientModified time.Time `json:"client_modified"`
904 // ServerModified : The last time the file was modified on Dropbox.
905 ServerModified time.Time `json:"server_modified"`
906 // Rev : A unique identifier for the current revision of a file. This field
907 // is the same rev as elsewhere in the API and can be used to detect changes
908 // and avoid conflicts.
909 Rev string `json:"rev"`
910 // Size : The file size in bytes.
911 Size uint64 `json:"size"`
912 }
913
914 // NewFileLinkMetadata returns a new FileLinkMetadata instance
915 func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileLinkMetadata {
916 s := new(FileLinkMetadata)
917 s.Url = Url
918 s.Name = Name
919 s.LinkPermissions = LinkPermissions
920 s.ClientModified = ClientModified
921 s.ServerModified = ServerModified
922 s.Rev = Rev
923 s.Size = Size
924 return s
925 }
926
927 // FileMemberActionError : has no documentation (yet)
928 type FileMemberActionError struct {
929 dropbox.Tagged
930 // AccessError : Specified file was invalid or user does not have access.
931 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
932 // NoExplicitAccess : The action cannot be completed because the target
933 // member does not have explicit access to the file. The return value is the
934 // access that the member has to the file from a parent folder.
935 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
936 }
937
938 // Valid tag values for FileMemberActionError
939 const (
940 FileMemberActionErrorInvalidMember = "invalid_member"
941 FileMemberActionErrorNoPermission = "no_permission"
942 FileMemberActionErrorAccessError = "access_error"
943 FileMemberActionErrorNoExplicitAccess = "no_explicit_access"
944 FileMemberActionErrorOther = "other"
945 )
946
947 // UnmarshalJSON deserializes into a FileMemberActionError instance
948 func (u *FileMemberActionError) UnmarshalJSON(body []byte) error {
949 type wrap struct {
950 dropbox.Tagged
951 // AccessError : Specified file was invalid or user does not have
952 // access.
953 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
954 }
955 var w wrap
956 var err error
957 if err = json.Unmarshal(body, &w); err != nil {
958 return err
959 }
960 u.Tag = w.Tag
961 switch u.Tag {
962 case "access_error":
963 u.AccessError = w.AccessError
964
965 if err != nil {
966 return err
967 }
968 case "no_explicit_access":
969 err = json.Unmarshal(body, &u.NoExplicitAccess)
970
971 if err != nil {
972 return err
973 }
974 }
975 return nil
976 }
977
978 // FileMemberActionIndividualResult : has no documentation (yet)
979 type FileMemberActionIndividualResult struct {
980 dropbox.Tagged
981 // Success : Member was successfully removed from this file. If AccessLevel
982 // is given, the member still has access via a parent shared folder.
983 Success *AccessLevel `json:"success,omitempty"`
984 // MemberError : User was not able to perform this action.
985 MemberError *FileMemberActionError `json:"member_error,omitempty"`
986 }
987
988 // Valid tag values for FileMemberActionIndividualResult
989 const (
990 FileMemberActionIndividualResultSuccess = "success"
991 FileMemberActionIndividualResultMemberError = "member_error"
992 )
993
994 // UnmarshalJSON deserializes into a FileMemberActionIndividualResult instance
995 func (u *FileMemberActionIndividualResult) UnmarshalJSON(body []byte) error {
996 type wrap struct {
997 dropbox.Tagged
998 // Success : Member was successfully removed from this file. If
999 // AccessLevel is given, the member still has access via a parent shared
1000 // folder.
1001 Success *AccessLevel `json:"success,omitempty"`
1002 // MemberError : User was not able to perform this action.
1003 MemberError *FileMemberActionError `json:"member_error,omitempty"`
1004 }
1005 var w wrap
1006 var err error
1007 if err = json.Unmarshal(body, &w); err != nil {
1008 return err
1009 }
1010 u.Tag = w.Tag
1011 switch u.Tag {
1012 case "success":
1013 u.Success = w.Success
1014
1015 if err != nil {
1016 return err
1017 }
1018 case "member_error":
1019 u.MemberError = w.MemberError
1020
1021 if err != nil {
1022 return err
1023 }
1024 }
1025 return nil
1026 }
1027
1028 // FileMemberActionResult : Per-member result for `addFileMember` or
1029 // `changeFileMemberAccess`.
1030 type FileMemberActionResult struct {
1031 // Member : One of specified input members.
1032 Member *MemberSelector `json:"member"`
1033 // Result : The outcome of the action on this member.
1034 Result *FileMemberActionIndividualResult `json:"result"`
1035 }
1036
1037 // NewFileMemberActionResult returns a new FileMemberActionResult instance
1038 func NewFileMemberActionResult(Member *MemberSelector, Result *FileMemberActionIndividualResult) *FileMemberActionResult {
1039 s := new(FileMemberActionResult)
1040 s.Member = Member
1041 s.Result = Result
1042 return s
1043 }
1044
1045 // FileMemberRemoveActionResult : has no documentation (yet)
1046 type FileMemberRemoveActionResult struct {
1047 dropbox.Tagged
1048 // Success : Member was successfully removed from this file.
1049 Success *MemberAccessLevelResult `json:"success,omitempty"`
1050 // MemberError : User was not able to remove this member.
1051 MemberError *FileMemberActionError `json:"member_error,omitempty"`
1052 }
1053
1054 // Valid tag values for FileMemberRemoveActionResult
1055 const (
1056 FileMemberRemoveActionResultSuccess = "success"
1057 FileMemberRemoveActionResultMemberError = "member_error"
1058 FileMemberRemoveActionResultOther = "other"
1059 )
1060
1061 // UnmarshalJSON deserializes into a FileMemberRemoveActionResult instance
1062 func (u *FileMemberRemoveActionResult) UnmarshalJSON(body []byte) error {
1063 type wrap struct {
1064 dropbox.Tagged
1065 // MemberError : User was not able to remove this member.
1066 MemberError *FileMemberActionError `json:"member_error,omitempty"`
1067 }
1068 var w wrap
1069 var err error
1070 if err = json.Unmarshal(body, &w); err != nil {
1071 return err
1072 }
1073 u.Tag = w.Tag
1074 switch u.Tag {
1075 case "success":
1076 err = json.Unmarshal(body, &u.Success)
1077
1078 if err != nil {
1079 return err
1080 }
1081 case "member_error":
1082 u.MemberError = w.MemberError
1083
1084 if err != nil {
1085 return err
1086 }
1087 }
1088 return nil
1089 }
1090
1091 // FilePermission : Whether the user is allowed to take the sharing action on
1092 // the file.
1093 type FilePermission struct {
1094 // Action : The action that the user may wish to take on the file.
1095 Action *FileAction `json:"action"`
1096 // Allow : True if the user is allowed to take the action.
1097 Allow bool `json:"allow"`
1098 // Reason : The reason why the user is denied the permission. Not present if
1099 // the action is allowed.
1100 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1101 }
1102
1103 // NewFilePermission returns a new FilePermission instance
1104 func NewFilePermission(Action *FileAction, Allow bool) *FilePermission {
1105 s := new(FilePermission)
1106 s.Action = Action
1107 s.Allow = Allow
1108 return s
1109 }
1110
1111 // FolderAction : Actions that may be taken on shared folders.
1112 type FolderAction struct {
1113 dropbox.Tagged
1114 }
1115
1116 // Valid tag values for FolderAction
1117 const (
1118 FolderActionChangeOptions = "change_options"
1119 FolderActionDisableViewerInfo = "disable_viewer_info"
1120 FolderActionEditContents = "edit_contents"
1121 FolderActionEnableViewerInfo = "enable_viewer_info"
1122 FolderActionInviteEditor = "invite_editor"
1123 FolderActionInviteViewer = "invite_viewer"
1124 FolderActionInviteViewerNoComment = "invite_viewer_no_comment"
1125 FolderActionRelinquishMembership = "relinquish_membership"
1126 FolderActionUnmount = "unmount"
1127 FolderActionUnshare = "unshare"
1128 FolderActionLeaveACopy = "leave_a_copy"
1129 FolderActionShareLink = "share_link"
1130 FolderActionCreateLink = "create_link"
1131 FolderActionSetAccessInheritance = "set_access_inheritance"
1132 FolderActionOther = "other"
1133 )
1134
1135 // FolderLinkMetadata : The metadata of a folder shared link.
1136 type FolderLinkMetadata struct {
1137 SharedLinkMetadata
1138 }
1139
1140 // NewFolderLinkMetadata returns a new FolderLinkMetadata instance
1141 func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *FolderLinkMetadata {
1142 s := new(FolderLinkMetadata)
1143 s.Url = Url
1144 s.Name = Name
1145 s.LinkPermissions = LinkPermissions
1146 return s
1147 }
1148
1149 // FolderPermission : Whether the user is allowed to take the action on the
1150 // shared folder.
1151 type FolderPermission struct {
1152 // Action : The action that the user may wish to take on the folder.
1153 Action *FolderAction `json:"action"`
1154 // Allow : True if the user is allowed to take the action.
1155 Allow bool `json:"allow"`
1156 // Reason : The reason why the user is denied the permission. Not present if
1157 // the action is allowed, or if no reason is available.
1158 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1159 }
1160
1161 // NewFolderPermission returns a new FolderPermission instance
1162 func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermission {
1163 s := new(FolderPermission)
1164 s.Action = Action
1165 s.Allow = Allow
1166 return s
1167 }
1168
1169 // FolderPolicy : A set of policies governing membership and privileges for a
1170 // shared folder.
1171 type FolderPolicy struct {
1172 // MemberPolicy : Who can be a member of this shared folder, as set on the
1173 // folder itself. The effective policy may differ from this value if the
1174 // team-wide policy is more restrictive. Present only if the folder is owned
1175 // by a team.
1176 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
1177 // ResolvedMemberPolicy : Who can be a member of this shared folder, taking
1178 // into account both the folder and the team-wide policy. This value may
1179 // differ from that of member_policy if the team-wide policy is more
1180 // restrictive than the folder policy. Present only if the folder is owned
1181 // by a team.
1182 ResolvedMemberPolicy *MemberPolicy `json:"resolved_member_policy,omitempty"`
1183 // AclUpdatePolicy : Who can add and remove members from this shared folder.
1184 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"`
1185 // SharedLinkPolicy : Who links can be shared with.
1186 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"`
1187 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
1188 // folder.
1189 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
1190 }
1191
1192 // NewFolderPolicy returns a new FolderPolicy instance
1193 func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy *SharedLinkPolicy) *FolderPolicy {
1194 s := new(FolderPolicy)
1195 s.AclUpdatePolicy = AclUpdatePolicy
1196 s.SharedLinkPolicy = SharedLinkPolicy
1197 return s
1198 }
1199
1200 // GetFileMetadataArg : Arguments of `getFileMetadata`.
1201 type GetFileMetadataArg struct {
1202 // File : The file to query.
1203 File string `json:"file"`
1204 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
1205 // should appear in the response's `SharedFileMetadata.permissions` field
1206 // describing the actions the authenticated user can perform on the file.
1207 Actions []*FileAction `json:"actions,omitempty"`
1208 }
1209
1210 // NewGetFileMetadataArg returns a new GetFileMetadataArg instance
1211 func NewGetFileMetadataArg(File string) *GetFileMetadataArg {
1212 s := new(GetFileMetadataArg)
1213 s.File = File
1214 return s
1215 }
1216
1217 // GetFileMetadataBatchArg : Arguments of `getFileMetadataBatch`.
1218 type GetFileMetadataBatchArg struct {
1219 // Files : The files to query.
1220 Files []string `json:"files"`
1221 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
1222 // should appear in the response's `SharedFileMetadata.permissions` field
1223 // describing the actions the authenticated user can perform on the file.
1224 Actions []*FileAction `json:"actions,omitempty"`
1225 }
1226
1227 // NewGetFileMetadataBatchArg returns a new GetFileMetadataBatchArg instance
1228 func NewGetFileMetadataBatchArg(Files []string) *GetFileMetadataBatchArg {
1229 s := new(GetFileMetadataBatchArg)
1230 s.Files = Files
1231 return s
1232 }
1233
1234 // GetFileMetadataBatchResult : Per file results of `getFileMetadataBatch`.
1235 type GetFileMetadataBatchResult struct {
1236 // File : This is the input file identifier corresponding to one of
1237 // `GetFileMetadataBatchArg.files`.
1238 File string `json:"file"`
1239 // Result : The result for this particular file.
1240 Result *GetFileMetadataIndividualResult `json:"result"`
1241 }
1242
1243 // NewGetFileMetadataBatchResult returns a new GetFileMetadataBatchResult instance
1244 func NewGetFileMetadataBatchResult(File string, Result *GetFileMetadataIndividualResult) *GetFileMetadataBatchResult {
1245 s := new(GetFileMetadataBatchResult)
1246 s.File = File
1247 s.Result = Result
1248 return s
1249 }
1250
1251 // GetFileMetadataError : Error result for `getFileMetadata`.
1252 type GetFileMetadataError struct {
1253 dropbox.Tagged
1254 // UserError : has no documentation (yet)
1255 UserError *SharingUserError `json:"user_error,omitempty"`
1256 // AccessError : has no documentation (yet)
1257 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1258 }
1259
1260 // Valid tag values for GetFileMetadataError
1261 const (
1262 GetFileMetadataErrorUserError = "user_error"
1263 GetFileMetadataErrorAccessError = "access_error"
1264 GetFileMetadataErrorOther = "other"
1265 )
1266
1267 // UnmarshalJSON deserializes into a GetFileMetadataError instance
1268 func (u *GetFileMetadataError) UnmarshalJSON(body []byte) error {
1269 type wrap struct {
1270 dropbox.Tagged
1271 // UserError : has no documentation (yet)
1272 UserError *SharingUserError `json:"user_error,omitempty"`
1273 // AccessError : has no documentation (yet)
1274 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1275 }
1276 var w wrap
1277 var err error
1278 if err = json.Unmarshal(body, &w); err != nil {
1279 return err
1280 }
1281 u.Tag = w.Tag
1282 switch u.Tag {
1283 case "user_error":
1284 u.UserError = w.UserError
1285
1286 if err != nil {
1287 return err
1288 }
1289 case "access_error":
1290 u.AccessError = w.AccessError
1291
1292 if err != nil {
1293 return err
1294 }
1295 }
1296 return nil
1297 }
1298
1299 // GetFileMetadataIndividualResult : has no documentation (yet)
1300 type GetFileMetadataIndividualResult struct {
1301 dropbox.Tagged
1302 // Metadata : The result for this file if it was successful.
1303 Metadata *SharedFileMetadata `json:"metadata,omitempty"`
1304 // AccessError : The result for this file if it was an error.
1305 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1306 }
1307
1308 // Valid tag values for GetFileMetadataIndividualResult
1309 const (
1310 GetFileMetadataIndividualResultMetadata = "metadata"
1311 GetFileMetadataIndividualResultAccessError = "access_error"
1312 GetFileMetadataIndividualResultOther = "other"
1313 )
1314
1315 // UnmarshalJSON deserializes into a GetFileMetadataIndividualResult instance
1316 func (u *GetFileMetadataIndividualResult) UnmarshalJSON(body []byte) error {
1317 type wrap struct {
1318 dropbox.Tagged
1319 // AccessError : The result for this file if it was an error.
1320 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
1321 }
1322 var w wrap
1323 var err error
1324 if err = json.Unmarshal(body, &w); err != nil {
1325 return err
1326 }
1327 u.Tag = w.Tag
1328 switch u.Tag {
1329 case "metadata":
1330 err = json.Unmarshal(body, &u.Metadata)
1331
1332 if err != nil {
1333 return err
1334 }
1335 case "access_error":
1336 u.AccessError = w.AccessError
1337
1338 if err != nil {
1339 return err
1340 }
1341 }
1342 return nil
1343 }
1344
1345 // GetMetadataArgs : has no documentation (yet)
1346 type GetMetadataArgs struct {
1347 // SharedFolderId : The ID for the shared folder.
1348 SharedFolderId string `json:"shared_folder_id"`
1349 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
1350 // that should appear in the response's `SharedFolderMetadata.permissions`
1351 // field describing the actions the authenticated user can perform on the
1352 // folder.
1353 Actions []*FolderAction `json:"actions,omitempty"`
1354 }
1355
1356 // NewGetMetadataArgs returns a new GetMetadataArgs instance
1357 func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs {
1358 s := new(GetMetadataArgs)
1359 s.SharedFolderId = SharedFolderId
1360 return s
1361 }
1362
1363 // SharedLinkError : has no documentation (yet)
1364 type SharedLinkError struct {
1365 dropbox.Tagged
1366 }
1367
1368 // Valid tag values for SharedLinkError
1369 const (
1370 SharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
1371 SharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
1372 SharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
1373 SharedLinkErrorOther = "other"
1374 )
1375
1376 // GetSharedLinkFileError : has no documentation (yet)
1377 type GetSharedLinkFileError struct {
1378 dropbox.Tagged
1379 }
1380
1381 // Valid tag values for GetSharedLinkFileError
1382 const (
1383 GetSharedLinkFileErrorSharedLinkNotFound = "shared_link_not_found"
1384 GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied"
1385 GetSharedLinkFileErrorUnsupportedLinkType = "unsupported_link_type"
1386 GetSharedLinkFileErrorOther = "other"
1387 GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory"
1388 )
1389
1390 // GetSharedLinkMetadataArg : has no documentation (yet)
1391 type GetSharedLinkMetadataArg struct {
1392 // Url : URL of the shared link.
1393 Url string `json:"url"`
1394 // Path : If the shared link is to a folder, this parameter can be used to
1395 // retrieve the metadata for a specific file or sub-folder in this folder. A
1396 // relative path should be used.
1397 Path string `json:"path,omitempty"`
1398 // LinkPassword : If the shared link has a password, this parameter can be
1399 // used.
1400 LinkPassword string `json:"link_password,omitempty"`
1401 }
1402
1403 // NewGetSharedLinkMetadataArg returns a new GetSharedLinkMetadataArg instance
1404 func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg {
1405 s := new(GetSharedLinkMetadataArg)
1406 s.Url = Url
1407 return s
1408 }
1409
1410 // GetSharedLinksArg : has no documentation (yet)
1411 type GetSharedLinksArg struct {
1412 // Path : See `getSharedLinks` description.
1413 Path string `json:"path,omitempty"`
1414 }
1415
1416 // NewGetSharedLinksArg returns a new GetSharedLinksArg instance
1417 func NewGetSharedLinksArg() *GetSharedLinksArg {
1418 s := new(GetSharedLinksArg)
1419 return s
1420 }
1421
1422 // GetSharedLinksError : has no documentation (yet)
1423 type GetSharedLinksError struct {
1424 dropbox.Tagged
1425 // Path : has no documentation (yet)
1426 Path string `json:"path,omitempty"`
1427 }
1428
1429 // Valid tag values for GetSharedLinksError
1430 const (
1431 GetSharedLinksErrorPath = "path"
1432 GetSharedLinksErrorOther = "other"
1433 )
1434
1435 // UnmarshalJSON deserializes into a GetSharedLinksError instance
1436 func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error {
1437 type wrap struct {
1438 dropbox.Tagged
1439 // Path : has no documentation (yet)
1440 Path string `json:"path,omitempty"`
1441 }
1442 var w wrap
1443 var err error
1444 if err = json.Unmarshal(body, &w); err != nil {
1445 return err
1446 }
1447 u.Tag = w.Tag
1448 switch u.Tag {
1449 case "path":
1450 u.Path = w.Path
1451
1452 if err != nil {
1453 return err
1454 }
1455 }
1456 return nil
1457 }
1458
1459 // GetSharedLinksResult : has no documentation (yet)
1460 type GetSharedLinksResult struct {
1461 // Links : Shared links applicable to the path argument.
1462 Links []IsLinkMetadata `json:"links"`
1463 }
1464
1465 // NewGetSharedLinksResult returns a new GetSharedLinksResult instance
1466 func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResult {
1467 s := new(GetSharedLinksResult)
1468 s.Links = Links
1469 return s
1470 }
1471
1472 // UnmarshalJSON deserializes into a GetSharedLinksResult instance
1473 func (u *GetSharedLinksResult) UnmarshalJSON(b []byte) error {
1474 type wrap struct {
1475 // Links : Shared links applicable to the path argument.
1476 Links []json.RawMessage `json:"links"`
1477 }
1478 var w wrap
1479 if err := json.Unmarshal(b, &w); err != nil {
1480 return err
1481 }
1482 u.Links = make([]IsLinkMetadata, len(w.Links))
1483 for i, e := range w.Links {
1484 v, err := IsLinkMetadataFromJSON(e)
1485 if err != nil {
1486 return err
1487 }
1488 u.Links[i] = v
1489 }
1490 return nil
1491 }
1492
1493 // GroupInfo : The information about a group. Groups is a way to manage a list
1494 // of users who need same access permission to the shared folder.
1495 type GroupInfo struct {
1496 team_common.GroupSummary
1497 // GroupType : The type of group.
1498 GroupType *team_common.GroupType `json:"group_type"`
1499 // IsMember : If the current user is a member of the group.
1500 IsMember bool `json:"is_member"`
1501 // IsOwner : If the current user is an owner of the group.
1502 IsOwner bool `json:"is_owner"`
1503 // SameTeam : If the group is owned by the current user's team.
1504 SameTeam bool `json:"same_team"`
1505 }
1506
1507 // NewGroupInfo returns a new GroupInfo instance
1508 func NewGroupInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, GroupType *team_common.GroupType, IsMember bool, IsOwner bool, SameTeam bool) *GroupInfo {
1509 s := new(GroupInfo)
1510 s.GroupName = GroupName
1511 s.GroupId = GroupId
1512 s.GroupManagementType = GroupManagementType
1513 s.GroupType = GroupType
1514 s.IsMember = IsMember
1515 s.IsOwner = IsOwner
1516 s.SameTeam = SameTeam
1517 return s
1518 }
1519
1520 // MembershipInfo : The information about a member of the shared content.
1521 type MembershipInfo struct {
1522 // AccessType : The access type for this member. It contains inherited
1523 // access type from parent folder, and acquired access type from this
1524 // folder.
1525 AccessType *AccessLevel `json:"access_type"`
1526 // Permissions : The permissions that requesting user has on this member.
1527 // The set of permissions corresponds to the MemberActions in the request.
1528 Permissions []*MemberPermission `json:"permissions,omitempty"`
1529 // Initials : Never set.
1530 Initials string `json:"initials,omitempty"`
1531 // IsInherited : True if the member has access from a parent folder.
1532 IsInherited bool `json:"is_inherited"`
1533 }
1534
1535 // NewMembershipInfo returns a new MembershipInfo instance
1536 func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo {
1537 s := new(MembershipInfo)
1538 s.AccessType = AccessType
1539 s.IsInherited = false
1540 return s
1541 }
1542
1543 // GroupMembershipInfo : The information about a group member of the shared
1544 // content.
1545 type GroupMembershipInfo struct {
1546 MembershipInfo
1547 // Group : The information about the membership group.
1548 Group *GroupInfo `json:"group"`
1549 }
1550
1551 // NewGroupMembershipInfo returns a new GroupMembershipInfo instance
1552 func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *GroupMembershipInfo {
1553 s := new(GroupMembershipInfo)
1554 s.AccessType = AccessType
1555 s.Group = Group
1556 s.IsInherited = false
1557 return s
1558 }
1559
1560 // InsufficientPlan : has no documentation (yet)
1561 type InsufficientPlan struct {
1562 // Message : A message to tell the user to upgrade in order to support
1563 // expected action.
1564 Message string `json:"message"`
1565 // UpsellUrl : A URL to send the user to in order to obtain the account type
1566 // they need, e.g. upgrading. Absent if there is no action the user can take
1567 // to upgrade.
1568 UpsellUrl string `json:"upsell_url,omitempty"`
1569 }
1570
1571 // NewInsufficientPlan returns a new InsufficientPlan instance
1572 func NewInsufficientPlan(Message string) *InsufficientPlan {
1573 s := new(InsufficientPlan)
1574 s.Message = Message
1575 return s
1576 }
1577
1578 // InsufficientQuotaAmounts : has no documentation (yet)
1579 type InsufficientQuotaAmounts struct {
1580 // SpaceNeeded : The amount of space needed to add the item (the size of the
1581 // item).
1582 SpaceNeeded uint64 `json:"space_needed"`
1583 // SpaceShortage : The amount of extra space needed to add the item.
1584 SpaceShortage uint64 `json:"space_shortage"`
1585 // SpaceLeft : The amount of space left in the user's Dropbox, less than
1586 // space_needed.
1587 SpaceLeft uint64 `json:"space_left"`
1588 }
1589
1590 // NewInsufficientQuotaAmounts returns a new InsufficientQuotaAmounts instance
1591 func NewInsufficientQuotaAmounts(SpaceNeeded uint64, SpaceShortage uint64, SpaceLeft uint64) *InsufficientQuotaAmounts {
1592 s := new(InsufficientQuotaAmounts)
1593 s.SpaceNeeded = SpaceNeeded
1594 s.SpaceShortage = SpaceShortage
1595 s.SpaceLeft = SpaceLeft
1596 return s
1597 }
1598
1599 // InviteeInfo : Information about the recipient of a shared content invitation.
1600 type InviteeInfo struct {
1601 dropbox.Tagged
1602 // Email : Email address of invited user.
1603 Email string `json:"email,omitempty"`
1604 }
1605
1606 // Valid tag values for InviteeInfo
1607 const (
1608 InviteeInfoEmail = "email"
1609 InviteeInfoOther = "other"
1610 )
1611
1612 // UnmarshalJSON deserializes into a InviteeInfo instance
1613 func (u *InviteeInfo) UnmarshalJSON(body []byte) error {
1614 type wrap struct {
1615 dropbox.Tagged
1616 // Email : Email address of invited user.
1617 Email string `json:"email,omitempty"`
1618 }
1619 var w wrap
1620 var err error
1621 if err = json.Unmarshal(body, &w); err != nil {
1622 return err
1623 }
1624 u.Tag = w.Tag
1625 switch u.Tag {
1626 case "email":
1627 u.Email = w.Email
1628
1629 if err != nil {
1630 return err
1631 }
1632 }
1633 return nil
1634 }
1635
1636 // InviteeMembershipInfo : Information about an invited member of a shared
1637 // content.
1638 type InviteeMembershipInfo struct {
1639 MembershipInfo
1640 // Invitee : Recipient of the invitation.
1641 Invitee *InviteeInfo `json:"invitee"`
1642 // User : The user this invitation is tied to, if available.
1643 User *UserInfo `json:"user,omitempty"`
1644 }
1645
1646 // NewInviteeMembershipInfo returns a new InviteeMembershipInfo instance
1647 func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeInfo) *InviteeMembershipInfo {
1648 s := new(InviteeMembershipInfo)
1649 s.AccessType = AccessType
1650 s.Invitee = Invitee
1651 s.IsInherited = false
1652 return s
1653 }
1654
1655 // JobError : Error occurred while performing an asynchronous job from
1656 // `unshareFolder` or `removeFolderMember`.
1657 type JobError struct {
1658 dropbox.Tagged
1659 // UnshareFolderError : Error occurred while performing `unshareFolder`
1660 // action.
1661 UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"`
1662 // RemoveFolderMemberError : Error occurred while performing
1663 // `removeFolderMember` action.
1664 RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"`
1665 // RelinquishFolderMembershipError : Error occurred while performing
1666 // `relinquishFolderMembership` action.
1667 RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"`
1668 }
1669
1670 // Valid tag values for JobError
1671 const (
1672 JobErrorUnshareFolderError = "unshare_folder_error"
1673 JobErrorRemoveFolderMemberError = "remove_folder_member_error"
1674 JobErrorRelinquishFolderMembershipError = "relinquish_folder_membership_error"
1675 JobErrorOther = "other"
1676 )
1677
1678 // UnmarshalJSON deserializes into a JobError instance
1679 func (u *JobError) UnmarshalJSON(body []byte) error {
1680 type wrap struct {
1681 dropbox.Tagged
1682 // UnshareFolderError : Error occurred while performing `unshareFolder`
1683 // action.
1684 UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"`
1685 // RemoveFolderMemberError : Error occurred while performing
1686 // `removeFolderMember` action.
1687 RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"`
1688 // RelinquishFolderMembershipError : Error occurred while performing
1689 // `relinquishFolderMembership` action.
1690 RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"`
1691 }
1692 var w wrap
1693 var err error
1694 if err = json.Unmarshal(body, &w); err != nil {
1695 return err
1696 }
1697 u.Tag = w.Tag
1698 switch u.Tag {
1699 case "unshare_folder_error":
1700 u.UnshareFolderError = w.UnshareFolderError
1701
1702 if err != nil {
1703 return err
1704 }
1705 case "remove_folder_member_error":
1706 u.RemoveFolderMemberError = w.RemoveFolderMemberError
1707
1708 if err != nil {
1709 return err
1710 }
1711 case "relinquish_folder_membership_error":
1712 u.RelinquishFolderMembershipError = w.RelinquishFolderMembershipError
1713
1714 if err != nil {
1715 return err
1716 }
1717 }
1718 return nil
1719 }
1720
1721 // JobStatus : has no documentation (yet)
1722 type JobStatus struct {
1723 dropbox.Tagged
1724 // Failed : The asynchronous job returned an error.
1725 Failed *JobError `json:"failed,omitempty"`
1726 }
1727
1728 // Valid tag values for JobStatus
1729 const (
1730 JobStatusInProgress = "in_progress"
1731 JobStatusComplete = "complete"
1732 JobStatusFailed = "failed"
1733 )
1734
1735 // UnmarshalJSON deserializes into a JobStatus instance
1736 func (u *JobStatus) UnmarshalJSON(body []byte) error {
1737 type wrap struct {
1738 dropbox.Tagged
1739 // Failed : The asynchronous job returned an error.
1740 Failed *JobError `json:"failed,omitempty"`
1741 }
1742 var w wrap
1743 var err error
1744 if err = json.Unmarshal(body, &w); err != nil {
1745 return err
1746 }
1747 u.Tag = w.Tag
1748 switch u.Tag {
1749 case "failed":
1750 u.Failed = w.Failed
1751
1752 if err != nil {
1753 return err
1754 }
1755 }
1756 return nil
1757 }
1758
1759 // LinkAccessLevel : has no documentation (yet)
1760 type LinkAccessLevel struct {
1761 dropbox.Tagged
1762 }
1763
1764 // Valid tag values for LinkAccessLevel
1765 const (
1766 LinkAccessLevelViewer = "viewer"
1767 LinkAccessLevelEditor = "editor"
1768 LinkAccessLevelOther = "other"
1769 )
1770
1771 // LinkAction : Actions that can be performed on a link.
1772 type LinkAction struct {
1773 dropbox.Tagged
1774 }
1775
1776 // Valid tag values for LinkAction
1777 const (
1778 LinkActionChangeAccessLevel = "change_access_level"
1779 LinkActionChangeAudience = "change_audience"
1780 LinkActionRemoveExpiry = "remove_expiry"
1781 LinkActionRemovePassword = "remove_password"
1782 LinkActionSetExpiry = "set_expiry"
1783 LinkActionSetPassword = "set_password"
1784 LinkActionOther = "other"
1785 )
1786
1787 // LinkAudience : has no documentation (yet)
1788 type LinkAudience struct {
1789 dropbox.Tagged
1790 }
1791
1792 // Valid tag values for LinkAudience
1793 const (
1794 LinkAudiencePublic = "public"
1795 LinkAudienceTeam = "team"
1796 LinkAudienceNoOne = "no_one"
1797 LinkAudiencePassword = "password"
1798 LinkAudienceMembers = "members"
1799 LinkAudienceOther = "other"
1800 )
1801
1802 // LinkExpiry : has no documentation (yet)
1803 type LinkExpiry struct {
1804 dropbox.Tagged
1805 // SetExpiry : Set a new expiry or change an existing expiry.
1806 SetExpiry time.Time `json:"set_expiry,omitempty"`
1807 }
1808
1809 // Valid tag values for LinkExpiry
1810 const (
1811 LinkExpiryRemoveExpiry = "remove_expiry"
1812 LinkExpirySetExpiry = "set_expiry"
1813 LinkExpiryOther = "other"
1814 )
1815
1816 // UnmarshalJSON deserializes into a LinkExpiry instance
1817 func (u *LinkExpiry) UnmarshalJSON(body []byte) error {
1818 type wrap struct {
1819 dropbox.Tagged
1820 // SetExpiry : Set a new expiry or change an existing expiry.
1821 SetExpiry time.Time `json:"set_expiry,omitempty"`
1822 }
1823 var w wrap
1824 var err error
1825 if err = json.Unmarshal(body, &w); err != nil {
1826 return err
1827 }
1828 u.Tag = w.Tag
1829 switch u.Tag {
1830 case "set_expiry":
1831 u.SetExpiry = w.SetExpiry
1832
1833 if err != nil {
1834 return err
1835 }
1836 }
1837 return nil
1838 }
1839
1840 // LinkPassword : has no documentation (yet)
1841 type LinkPassword struct {
1842 dropbox.Tagged
1843 // SetPassword : Set a new password or change an existing password.
1844 SetPassword string `json:"set_password,omitempty"`
1845 }
1846
1847 // Valid tag values for LinkPassword
1848 const (
1849 LinkPasswordRemovePassword = "remove_password"
1850 LinkPasswordSetPassword = "set_password"
1851 LinkPasswordOther = "other"
1852 )
1853
1854 // UnmarshalJSON deserializes into a LinkPassword instance
1855 func (u *LinkPassword) UnmarshalJSON(body []byte) error {
1856 type wrap struct {
1857 dropbox.Tagged
1858 // SetPassword : Set a new password or change an existing password.
1859 SetPassword string `json:"set_password,omitempty"`
1860 }
1861 var w wrap
1862 var err error
1863 if err = json.Unmarshal(body, &w); err != nil {
1864 return err
1865 }
1866 u.Tag = w.Tag
1867 switch u.Tag {
1868 case "set_password":
1869 u.SetPassword = w.SetPassword
1870
1871 if err != nil {
1872 return err
1873 }
1874 }
1875 return nil
1876 }
1877
1878 // LinkPermission : Permissions for actions that can be performed on a link.
1879 type LinkPermission struct {
1880 // Action : has no documentation (yet)
1881 Action *LinkAction `json:"action"`
1882 // Allow : has no documentation (yet)
1883 Allow bool `json:"allow"`
1884 // Reason : has no documentation (yet)
1885 Reason *PermissionDeniedReason `json:"reason,omitempty"`
1886 }
1887
1888 // NewLinkPermission returns a new LinkPermission instance
1889 func NewLinkPermission(Action *LinkAction, Allow bool) *LinkPermission {
1890 s := new(LinkPermission)
1891 s.Action = Action
1892 s.Allow = Allow
1893 return s
1894 }
1895
1896 // LinkPermissions : has no documentation (yet)
1897 type LinkPermissions struct {
1898 // ResolvedVisibility : The current visibility of the link after considering
1899 // the shared links policies of the the team (in case the link's owner is
1900 // part of a team) and the shared folder (in case the linked file is part of
1901 // a shared folder). This field is shown only if the caller has access to
1902 // this info (the link's owner always has access to this data). For some
1903 // links, an effective_audience value is returned instead.
1904 ResolvedVisibility *ResolvedVisibility `json:"resolved_visibility,omitempty"`
1905 // RequestedVisibility : The shared link's requested visibility. This can be
1906 // overridden by the team and shared folder policies. The final visibility,
1907 // after considering these policies, can be found in `resolved_visibility`.
1908 // This is shown only if the caller is the link's owner and
1909 // resolved_visibility is returned instead of effective_audience.
1910 RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
1911 // CanRevoke : Whether the caller can revoke the shared link.
1912 CanRevoke bool `json:"can_revoke"`
1913 // RevokeFailureReason : The failure reason for revoking the link. This
1914 // field will only be present if the `can_revoke` is false.
1915 RevokeFailureReason *SharedLinkAccessFailureReason `json:"revoke_failure_reason,omitempty"`
1916 // EffectiveAudience : The type of audience who can benefit from the access
1917 // level specified by the `link_access_level` field.
1918 EffectiveAudience *LinkAudience `json:"effective_audience,omitempty"`
1919 // LinkAccessLevel : The access level that the link will grant to its users.
1920 // A link can grant additional rights to a user beyond their current access
1921 // level. For example, if a user was invited as a viewer to a file, and then
1922 // opens a link with `link_access_level` set to `editor`, then they will
1923 // gain editor privileges. The `link_access_level` is a property of the
1924 // link, and does not depend on who is calling this API. In particular,
1925 // `link_access_level` does not take into account the API caller's current
1926 // permissions to the content.
1927 LinkAccessLevel *LinkAccessLevel `json:"link_access_level,omitempty"`
1928 }
1929
1930 // NewLinkPermissions returns a new LinkPermissions instance
1931 func NewLinkPermissions(CanRevoke bool) *LinkPermissions {
1932 s := new(LinkPermissions)
1933 s.CanRevoke = CanRevoke
1934 return s
1935 }
1936
1937 // LinkSettings : Settings that apply to a link.
1938 type LinkSettings struct {
1939 // AccessLevel : The access level on the link for this file. Currently, it
1940 // only accepts 'viewer' and 'viewer_no_comment'.
1941 AccessLevel *AccessLevel `json:"access_level,omitempty"`
1942 // Audience : The type of audience on the link for this file.
1943 Audience *LinkAudience `json:"audience,omitempty"`
1944 // Expiry : An expiry timestamp to set on a link.
1945 Expiry *LinkExpiry `json:"expiry,omitempty"`
1946 // Password : The password for the link.
1947 Password *LinkPassword `json:"password,omitempty"`
1948 }
1949
1950 // NewLinkSettings returns a new LinkSettings instance
1951 func NewLinkSettings() *LinkSettings {
1952 s := new(LinkSettings)
1953 return s
1954 }
1955
1956 // ListFileMembersArg : Arguments for `listFileMembers`.
1957 type ListFileMembersArg struct {
1958 // File : The file for which you want to see members.
1959 File string `json:"file"`
1960 // Actions : The actions for which to return permissions on a member.
1961 Actions []*MemberAction `json:"actions,omitempty"`
1962 // IncludeInherited : Whether to include members who only have access from a
1963 // parent shared folder.
1964 IncludeInherited bool `json:"include_inherited"`
1965 // Limit : Number of members to return max per query. Defaults to 100 if no
1966 // limit is specified.
1967 Limit uint32 `json:"limit"`
1968 }
1969
1970 // NewListFileMembersArg returns a new ListFileMembersArg instance
1971 func NewListFileMembersArg(File string) *ListFileMembersArg {
1972 s := new(ListFileMembersArg)
1973 s.File = File
1974 s.IncludeInherited = true
1975 s.Limit = 100
1976 return s
1977 }
1978
1979 // ListFileMembersBatchArg : Arguments for `listFileMembersBatch`.
1980 type ListFileMembersBatchArg struct {
1981 // Files : Files for which to return members.
1982 Files []string `json:"files"`
1983 // Limit : Number of members to return max per query. Defaults to 10 if no
1984 // limit is specified.
1985 Limit uint32 `json:"limit"`
1986 }
1987
1988 // NewListFileMembersBatchArg returns a new ListFileMembersBatchArg instance
1989 func NewListFileMembersBatchArg(Files []string) *ListFileMembersBatchArg {
1990 s := new(ListFileMembersBatchArg)
1991 s.Files = Files
1992 s.Limit = 10
1993 return s
1994 }
1995
1996 // ListFileMembersBatchResult : Per-file result for `listFileMembersBatch`.
1997 type ListFileMembersBatchResult struct {
1998 // File : This is the input file identifier, whether an ID or a path.
1999 File string `json:"file"`
2000 // Result : The result for this particular file.
2001 Result *ListFileMembersIndividualResult `json:"result"`
2002 }
2003
2004 // NewListFileMembersBatchResult returns a new ListFileMembersBatchResult instance
2005 func NewListFileMembersBatchResult(File string, Result *ListFileMembersIndividualResult) *ListFileMembersBatchResult {
2006 s := new(ListFileMembersBatchResult)
2007 s.File = File
2008 s.Result = Result
2009 return s
2010 }
2011
2012 // ListFileMembersContinueArg : Arguments for `listFileMembersContinue`.
2013 type ListFileMembersContinueArg struct {
2014 // Cursor : The cursor returned by your last call to `listFileMembers`,
2015 // `listFileMembersContinue`, or `listFileMembersBatch`.
2016 Cursor string `json:"cursor"`
2017 }
2018
2019 // NewListFileMembersContinueArg returns a new ListFileMembersContinueArg instance
2020 func NewListFileMembersContinueArg(Cursor string) *ListFileMembersContinueArg {
2021 s := new(ListFileMembersContinueArg)
2022 s.Cursor = Cursor
2023 return s
2024 }
2025
2026 // ListFileMembersContinueError : Error for `listFileMembersContinue`.
2027 type ListFileMembersContinueError struct {
2028 dropbox.Tagged
2029 // UserError : has no documentation (yet)
2030 UserError *SharingUserError `json:"user_error,omitempty"`
2031 // AccessError : has no documentation (yet)
2032 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2033 }
2034
2035 // Valid tag values for ListFileMembersContinueError
2036 const (
2037 ListFileMembersContinueErrorUserError = "user_error"
2038 ListFileMembersContinueErrorAccessError = "access_error"
2039 ListFileMembersContinueErrorInvalidCursor = "invalid_cursor"
2040 ListFileMembersContinueErrorOther = "other"
2041 )
2042
2043 // UnmarshalJSON deserializes into a ListFileMembersContinueError instance
2044 func (u *ListFileMembersContinueError) UnmarshalJSON(body []byte) error {
2045 type wrap struct {
2046 dropbox.Tagged
2047 // UserError : has no documentation (yet)
2048 UserError *SharingUserError `json:"user_error,omitempty"`
2049 // AccessError : has no documentation (yet)
2050 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2051 }
2052 var w wrap
2053 var err error
2054 if err = json.Unmarshal(body, &w); err != nil {
2055 return err
2056 }
2057 u.Tag = w.Tag
2058 switch u.Tag {
2059 case "user_error":
2060 u.UserError = w.UserError
2061
2062 if err != nil {
2063 return err
2064 }
2065 case "access_error":
2066 u.AccessError = w.AccessError
2067
2068 if err != nil {
2069 return err
2070 }
2071 }
2072 return nil
2073 }
2074
2075 // ListFileMembersCountResult : has no documentation (yet)
2076 type ListFileMembersCountResult struct {
2077 // Members : A list of members on this file.
2078 Members *SharedFileMembers `json:"members"`
2079 // MemberCount : The number of members on this file. This does not include
2080 // inherited members.
2081 MemberCount uint32 `json:"member_count"`
2082 }
2083
2084 // NewListFileMembersCountResult returns a new ListFileMembersCountResult instance
2085 func NewListFileMembersCountResult(Members *SharedFileMembers, MemberCount uint32) *ListFileMembersCountResult {
2086 s := new(ListFileMembersCountResult)
2087 s.Members = Members
2088 s.MemberCount = MemberCount
2089 return s
2090 }
2091
2092 // ListFileMembersError : Error for `listFileMembers`.
2093 type ListFileMembersError struct {
2094 dropbox.Tagged
2095 // UserError : has no documentation (yet)
2096 UserError *SharingUserError `json:"user_error,omitempty"`
2097 // AccessError : has no documentation (yet)
2098 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2099 }
2100
2101 // Valid tag values for ListFileMembersError
2102 const (
2103 ListFileMembersErrorUserError = "user_error"
2104 ListFileMembersErrorAccessError = "access_error"
2105 ListFileMembersErrorOther = "other"
2106 )
2107
2108 // UnmarshalJSON deserializes into a ListFileMembersError instance
2109 func (u *ListFileMembersError) UnmarshalJSON(body []byte) error {
2110 type wrap struct {
2111 dropbox.Tagged
2112 // UserError : has no documentation (yet)
2113 UserError *SharingUserError `json:"user_error,omitempty"`
2114 // AccessError : has no documentation (yet)
2115 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2116 }
2117 var w wrap
2118 var err error
2119 if err = json.Unmarshal(body, &w); err != nil {
2120 return err
2121 }
2122 u.Tag = w.Tag
2123 switch u.Tag {
2124 case "user_error":
2125 u.UserError = w.UserError
2126
2127 if err != nil {
2128 return err
2129 }
2130 case "access_error":
2131 u.AccessError = w.AccessError
2132
2133 if err != nil {
2134 return err
2135 }
2136 }
2137 return nil
2138 }
2139
2140 // ListFileMembersIndividualResult : has no documentation (yet)
2141 type ListFileMembersIndividualResult struct {
2142 dropbox.Tagged
2143 // Result : The results of the query for this file if it was successful.
2144 Result *ListFileMembersCountResult `json:"result,omitempty"`
2145 // AccessError : The result of the query for this file if it was an error.
2146 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2147 }
2148
2149 // Valid tag values for ListFileMembersIndividualResult
2150 const (
2151 ListFileMembersIndividualResultResult = "result"
2152 ListFileMembersIndividualResultAccessError = "access_error"
2153 ListFileMembersIndividualResultOther = "other"
2154 )
2155
2156 // UnmarshalJSON deserializes into a ListFileMembersIndividualResult instance
2157 func (u *ListFileMembersIndividualResult) UnmarshalJSON(body []byte) error {
2158 type wrap struct {
2159 dropbox.Tagged
2160 // AccessError : The result of the query for this file if it was an
2161 // error.
2162 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2163 }
2164 var w wrap
2165 var err error
2166 if err = json.Unmarshal(body, &w); err != nil {
2167 return err
2168 }
2169 u.Tag = w.Tag
2170 switch u.Tag {
2171 case "result":
2172 err = json.Unmarshal(body, &u.Result)
2173
2174 if err != nil {
2175 return err
2176 }
2177 case "access_error":
2178 u.AccessError = w.AccessError
2179
2180 if err != nil {
2181 return err
2182 }
2183 }
2184 return nil
2185 }
2186
2187 // ListFilesArg : Arguments for `listReceivedFiles`.
2188 type ListFilesArg struct {
2189 // Limit : Number of files to return max per query. Defaults to 100 if no
2190 // limit is specified.
2191 Limit uint32 `json:"limit"`
2192 // Actions : A list of `FileAction`s corresponding to `FilePermission`s that
2193 // should appear in the response's `SharedFileMetadata.permissions` field
2194 // describing the actions the authenticated user can perform on the file.
2195 Actions []*FileAction `json:"actions,omitempty"`
2196 }
2197
2198 // NewListFilesArg returns a new ListFilesArg instance
2199 func NewListFilesArg() *ListFilesArg {
2200 s := new(ListFilesArg)
2201 s.Limit = 100
2202 return s
2203 }
2204
2205 // ListFilesContinueArg : Arguments for `listReceivedFilesContinue`.
2206 type ListFilesContinueArg struct {
2207 // Cursor : Cursor in `ListFilesResult.cursor`.
2208 Cursor string `json:"cursor"`
2209 }
2210
2211 // NewListFilesContinueArg returns a new ListFilesContinueArg instance
2212 func NewListFilesContinueArg(Cursor string) *ListFilesContinueArg {
2213 s := new(ListFilesContinueArg)
2214 s.Cursor = Cursor
2215 return s
2216 }
2217
2218 // ListFilesContinueError : Error results for `listReceivedFilesContinue`.
2219 type ListFilesContinueError struct {
2220 dropbox.Tagged
2221 // UserError : User account had a problem.
2222 UserError *SharingUserError `json:"user_error,omitempty"`
2223 }
2224
2225 // Valid tag values for ListFilesContinueError
2226 const (
2227 ListFilesContinueErrorUserError = "user_error"
2228 ListFilesContinueErrorInvalidCursor = "invalid_cursor"
2229 ListFilesContinueErrorOther = "other"
2230 )
2231
2232 // UnmarshalJSON deserializes into a ListFilesContinueError instance
2233 func (u *ListFilesContinueError) UnmarshalJSON(body []byte) error {
2234 type wrap struct {
2235 dropbox.Tagged
2236 // UserError : User account had a problem.
2237 UserError *SharingUserError `json:"user_error,omitempty"`
2238 }
2239 var w wrap
2240 var err error
2241 if err = json.Unmarshal(body, &w); err != nil {
2242 return err
2243 }
2244 u.Tag = w.Tag
2245 switch u.Tag {
2246 case "user_error":
2247 u.UserError = w.UserError
2248
2249 if err != nil {
2250 return err
2251 }
2252 }
2253 return nil
2254 }
2255
2256 // ListFilesResult : Success results for `listReceivedFiles`.
2257 type ListFilesResult struct {
2258 // Entries : Information about the files shared with current user.
2259 Entries []*SharedFileMetadata `json:"entries"`
2260 // Cursor : Cursor used to obtain additional shared files.
2261 Cursor string `json:"cursor,omitempty"`
2262 }
2263
2264 // NewListFilesResult returns a new ListFilesResult instance
2265 func NewListFilesResult(Entries []*SharedFileMetadata) *ListFilesResult {
2266 s := new(ListFilesResult)
2267 s.Entries = Entries
2268 return s
2269 }
2270
2271 // ListFolderMembersCursorArg : has no documentation (yet)
2272 type ListFolderMembersCursorArg struct {
2273 // Actions : This is a list indicating whether each returned member will
2274 // include a boolean value `MemberPermission.allow` that describes whether
2275 // the current user can perform the MemberAction on the member.
2276 Actions []*MemberAction `json:"actions,omitempty"`
2277 // Limit : The maximum number of results that include members, groups and
2278 // invitees to return per request.
2279 Limit uint32 `json:"limit"`
2280 }
2281
2282 // NewListFolderMembersCursorArg returns a new ListFolderMembersCursorArg instance
2283 func NewListFolderMembersCursorArg() *ListFolderMembersCursorArg {
2284 s := new(ListFolderMembersCursorArg)
2285 s.Limit = 1000
2286 return s
2287 }
2288
2289 // ListFolderMembersArgs : has no documentation (yet)
2290 type ListFolderMembersArgs struct {
2291 ListFolderMembersCursorArg
2292 // SharedFolderId : The ID for the shared folder.
2293 SharedFolderId string `json:"shared_folder_id"`
2294 }
2295
2296 // NewListFolderMembersArgs returns a new ListFolderMembersArgs instance
2297 func NewListFolderMembersArgs(SharedFolderId string) *ListFolderMembersArgs {
2298 s := new(ListFolderMembersArgs)
2299 s.SharedFolderId = SharedFolderId
2300 s.Limit = 1000
2301 return s
2302 }
2303
2304 // ListFolderMembersContinueArg : has no documentation (yet)
2305 type ListFolderMembersContinueArg struct {
2306 // Cursor : The cursor returned by your last call to `listFolderMembers` or
2307 // `listFolderMembersContinue`.
2308 Cursor string `json:"cursor"`
2309 }
2310
2311 // NewListFolderMembersContinueArg returns a new ListFolderMembersContinueArg instance
2312 func NewListFolderMembersContinueArg(Cursor string) *ListFolderMembersContinueArg {
2313 s := new(ListFolderMembersContinueArg)
2314 s.Cursor = Cursor
2315 return s
2316 }
2317
2318 // ListFolderMembersContinueError : has no documentation (yet)
2319 type ListFolderMembersContinueError struct {
2320 dropbox.Tagged
2321 // AccessError : has no documentation (yet)
2322 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2323 }
2324
2325 // Valid tag values for ListFolderMembersContinueError
2326 const (
2327 ListFolderMembersContinueErrorAccessError = "access_error"
2328 ListFolderMembersContinueErrorInvalidCursor = "invalid_cursor"
2329 ListFolderMembersContinueErrorOther = "other"
2330 )
2331
2332 // UnmarshalJSON deserializes into a ListFolderMembersContinueError instance
2333 func (u *ListFolderMembersContinueError) UnmarshalJSON(body []byte) error {
2334 type wrap struct {
2335 dropbox.Tagged
2336 // AccessError : has no documentation (yet)
2337 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2338 }
2339 var w wrap
2340 var err error
2341 if err = json.Unmarshal(body, &w); err != nil {
2342 return err
2343 }
2344 u.Tag = w.Tag
2345 switch u.Tag {
2346 case "access_error":
2347 u.AccessError = w.AccessError
2348
2349 if err != nil {
2350 return err
2351 }
2352 }
2353 return nil
2354 }
2355
2356 // ListFoldersArgs : has no documentation (yet)
2357 type ListFoldersArgs struct {
2358 // Limit : The maximum number of results to return per request.
2359 Limit uint32 `json:"limit"`
2360 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
2361 // that should appear in the response's `SharedFolderMetadata.permissions`
2362 // field describing the actions the authenticated user can perform on the
2363 // folder.
2364 Actions []*FolderAction `json:"actions,omitempty"`
2365 }
2366
2367 // NewListFoldersArgs returns a new ListFoldersArgs instance
2368 func NewListFoldersArgs() *ListFoldersArgs {
2369 s := new(ListFoldersArgs)
2370 s.Limit = 1000
2371 return s
2372 }
2373
2374 // ListFoldersContinueArg : has no documentation (yet)
2375 type ListFoldersContinueArg struct {
2376 // Cursor : The cursor returned by the previous API call specified in the
2377 // endpoint description.
2378 Cursor string `json:"cursor"`
2379 }
2380
2381 // NewListFoldersContinueArg returns a new ListFoldersContinueArg instance
2382 func NewListFoldersContinueArg(Cursor string) *ListFoldersContinueArg {
2383 s := new(ListFoldersContinueArg)
2384 s.Cursor = Cursor
2385 return s
2386 }
2387
2388 // ListFoldersContinueError : has no documentation (yet)
2389 type ListFoldersContinueError struct {
2390 dropbox.Tagged
2391 }
2392
2393 // Valid tag values for ListFoldersContinueError
2394 const (
2395 ListFoldersContinueErrorInvalidCursor = "invalid_cursor"
2396 ListFoldersContinueErrorOther = "other"
2397 )
2398
2399 // ListFoldersResult : Result for `listFolders` or `listMountableFolders`,
2400 // depending on which endpoint was requested. Unmounted shared folders can be
2401 // identified by the absence of `SharedFolderMetadata.path_lower`.
2402 type ListFoldersResult struct {
2403 // Entries : List of all shared folders the authenticated user has access
2404 // to.
2405 Entries []*SharedFolderMetadata `json:"entries"`
2406 // Cursor : Present if there are additional shared folders that have not
2407 // been returned yet. Pass the cursor into the corresponding continue
2408 // endpoint (either `listFoldersContinue` or `listMountableFoldersContinue`)
2409 // to list additional folders.
2410 Cursor string `json:"cursor,omitempty"`
2411 }
2412
2413 // NewListFoldersResult returns a new ListFoldersResult instance
2414 func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult {
2415 s := new(ListFoldersResult)
2416 s.Entries = Entries
2417 return s
2418 }
2419
2420 // ListSharedLinksArg : has no documentation (yet)
2421 type ListSharedLinksArg struct {
2422 // Path : See `listSharedLinks` description.
2423 Path string `json:"path,omitempty"`
2424 // Cursor : The cursor returned by your last call to `listSharedLinks`.
2425 Cursor string `json:"cursor,omitempty"`
2426 // DirectOnly : See `listSharedLinks` description.
2427 DirectOnly bool `json:"direct_only,omitempty"`
2428 }
2429
2430 // NewListSharedLinksArg returns a new ListSharedLinksArg instance
2431 func NewListSharedLinksArg() *ListSharedLinksArg {
2432 s := new(ListSharedLinksArg)
2433 return s
2434 }
2435
2436 // ListSharedLinksError : has no documentation (yet)
2437 type ListSharedLinksError struct {
2438 dropbox.Tagged
2439 // Path : has no documentation (yet)
2440 Path *files.LookupError `json:"path,omitempty"`
2441 }
2442
2443 // Valid tag values for ListSharedLinksError
2444 const (
2445 ListSharedLinksErrorPath = "path"
2446 ListSharedLinksErrorReset = "reset"
2447 ListSharedLinksErrorOther = "other"
2448 )
2449
2450 // UnmarshalJSON deserializes into a ListSharedLinksError instance
2451 func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error {
2452 type wrap struct {
2453 dropbox.Tagged
2454 // Path : has no documentation (yet)
2455 Path *files.LookupError `json:"path,omitempty"`
2456 }
2457 var w wrap
2458 var err error
2459 if err = json.Unmarshal(body, &w); err != nil {
2460 return err
2461 }
2462 u.Tag = w.Tag
2463 switch u.Tag {
2464 case "path":
2465 u.Path = w.Path
2466
2467 if err != nil {
2468 return err
2469 }
2470 }
2471 return nil
2472 }
2473
2474 // ListSharedLinksResult : has no documentation (yet)
2475 type ListSharedLinksResult struct {
2476 // Links : Shared links applicable to the path argument.
2477 Links []IsSharedLinkMetadata `json:"links"`
2478 // HasMore : Is true if there are additional shared links that have not been
2479 // returned yet. Pass the cursor into `listSharedLinks` to retrieve them.
2480 HasMore bool `json:"has_more"`
2481 // Cursor : Pass the cursor into `listSharedLinks` to obtain the additional
2482 // links. Cursor is returned only if no path is given.
2483 Cursor string `json:"cursor,omitempty"`
2484 }
2485
2486 // NewListSharedLinksResult returns a new ListSharedLinksResult instance
2487 func NewListSharedLinksResult(Links []IsSharedLinkMetadata, HasMore bool) *ListSharedLinksResult {
2488 s := new(ListSharedLinksResult)
2489 s.Links = Links
2490 s.HasMore = HasMore
2491 return s
2492 }
2493
2494 // UnmarshalJSON deserializes into a ListSharedLinksResult instance
2495 func (u *ListSharedLinksResult) UnmarshalJSON(b []byte) error {
2496 type wrap struct {
2497 // Links : Shared links applicable to the path argument.
2498 Links []json.RawMessage `json:"links"`
2499 // HasMore : Is true if there are additional shared links that have not
2500 // been returned yet. Pass the cursor into `listSharedLinks` to retrieve
2501 // them.
2502 HasMore bool `json:"has_more"`
2503 // Cursor : Pass the cursor into `listSharedLinks` to obtain the
2504 // additional links. Cursor is returned only if no path is given.
2505 Cursor string `json:"cursor,omitempty"`
2506 }
2507 var w wrap
2508 if err := json.Unmarshal(b, &w); err != nil {
2509 return err
2510 }
2511 u.Links = make([]IsSharedLinkMetadata, len(w.Links))
2512 for i, e := range w.Links {
2513 v, err := IsSharedLinkMetadataFromJSON(e)
2514 if err != nil {
2515 return err
2516 }
2517 u.Links[i] = v
2518 }
2519 u.HasMore = w.HasMore
2520 u.Cursor = w.Cursor
2521 return nil
2522 }
2523
2524 // MemberAccessLevelResult : Contains information about a member's access level
2525 // to content after an operation.
2526 type MemberAccessLevelResult struct {
2527 // AccessLevel : The member still has this level of access to the content
2528 // through a parent folder.
2529 AccessLevel *AccessLevel `json:"access_level,omitempty"`
2530 // Warning : A localized string with additional information about why the
2531 // user has this access level to the content.
2532 Warning string `json:"warning,omitempty"`
2533 // AccessDetails : The parent folders that a member has access to. The field
2534 // is present if the user has access to the first parent folder where the
2535 // member gains access.
2536 AccessDetails []*ParentFolderAccessInfo `json:"access_details,omitempty"`
2537 }
2538
2539 // NewMemberAccessLevelResult returns a new MemberAccessLevelResult instance
2540 func NewMemberAccessLevelResult() *MemberAccessLevelResult {
2541 s := new(MemberAccessLevelResult)
2542 return s
2543 }
2544
2545 // MemberAction : Actions that may be taken on members of a shared folder.
2546 type MemberAction struct {
2547 dropbox.Tagged
2548 }
2549
2550 // Valid tag values for MemberAction
2551 const (
2552 MemberActionLeaveACopy = "leave_a_copy"
2553 MemberActionMakeEditor = "make_editor"
2554 MemberActionMakeOwner = "make_owner"
2555 MemberActionMakeViewer = "make_viewer"
2556 MemberActionMakeViewerNoComment = "make_viewer_no_comment"
2557 MemberActionRemove = "remove"
2558 MemberActionOther = "other"
2559 )
2560
2561 // MemberPermission : Whether the user is allowed to take the action on the
2562 // associated member.
2563 type MemberPermission struct {
2564 // Action : The action that the user may wish to take on the member.
2565 Action *MemberAction `json:"action"`
2566 // Allow : True if the user is allowed to take the action.
2567 Allow bool `json:"allow"`
2568 // Reason : The reason why the user is denied the permission. Not present if
2569 // the action is allowed.
2570 Reason *PermissionDeniedReason `json:"reason,omitempty"`
2571 }
2572
2573 // NewMemberPermission returns a new MemberPermission instance
2574 func NewMemberPermission(Action *MemberAction, Allow bool) *MemberPermission {
2575 s := new(MemberPermission)
2576 s.Action = Action
2577 s.Allow = Allow
2578 return s
2579 }
2580
2581 // MemberPolicy : Policy governing who can be a member of a shared folder. Only
2582 // applicable to folders owned by a user on a team.
2583 type MemberPolicy struct {
2584 dropbox.Tagged
2585 }
2586
2587 // Valid tag values for MemberPolicy
2588 const (
2589 MemberPolicyTeam = "team"
2590 MemberPolicyAnyone = "anyone"
2591 MemberPolicyOther = "other"
2592 )
2593
2594 // MemberSelector : Includes different ways to identify a member of a shared
2595 // folder.
2596 type MemberSelector struct {
2597 dropbox.Tagged
2598 // DropboxId : Dropbox account, team member, or group ID of member.
2599 DropboxId string `json:"dropbox_id,omitempty"`
2600 // Email : Email address of member.
2601 Email string `json:"email,omitempty"`
2602 }
2603
2604 // Valid tag values for MemberSelector
2605 const (
2606 MemberSelectorDropboxId = "dropbox_id"
2607 MemberSelectorEmail = "email"
2608 MemberSelectorOther = "other"
2609 )
2610
2611 // UnmarshalJSON deserializes into a MemberSelector instance
2612 func (u *MemberSelector) UnmarshalJSON(body []byte) error {
2613 type wrap struct {
2614 dropbox.Tagged
2615 // DropboxId : Dropbox account, team member, or group ID of member.
2616 DropboxId string `json:"dropbox_id,omitempty"`
2617 // Email : Email address of member.
2618 Email string `json:"email,omitempty"`
2619 }
2620 var w wrap
2621 var err error
2622 if err = json.Unmarshal(body, &w); err != nil {
2623 return err
2624 }
2625 u.Tag = w.Tag
2626 switch u.Tag {
2627 case "dropbox_id":
2628 u.DropboxId = w.DropboxId
2629
2630 if err != nil {
2631 return err
2632 }
2633 case "email":
2634 u.Email = w.Email
2635
2636 if err != nil {
2637 return err
2638 }
2639 }
2640 return nil
2641 }
2642
2643 // ModifySharedLinkSettingsArgs : has no documentation (yet)
2644 type ModifySharedLinkSettingsArgs struct {
2645 // Url : URL of the shared link to change its settings.
2646 Url string `json:"url"`
2647 // Settings : Set of settings for the shared link.
2648 Settings *SharedLinkSettings `json:"settings"`
2649 // RemoveExpiration : If set to true, removes the expiration of the shared
2650 // link.
2651 RemoveExpiration bool `json:"remove_expiration"`
2652 }
2653
2654 // NewModifySharedLinkSettingsArgs returns a new ModifySharedLinkSettingsArgs instance
2655 func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs {
2656 s := new(ModifySharedLinkSettingsArgs)
2657 s.Url = Url
2658 s.Settings = Settings
2659 s.RemoveExpiration = false
2660 return s
2661 }
2662
2663 // ModifySharedLinkSettingsError : has no documentation (yet)
2664 type ModifySharedLinkSettingsError struct {
2665 dropbox.Tagged
2666 // SettingsError : There is an error with the given settings.
2667 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
2668 }
2669
2670 // Valid tag values for ModifySharedLinkSettingsError
2671 const (
2672 ModifySharedLinkSettingsErrorSharedLinkNotFound = "shared_link_not_found"
2673 ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied"
2674 ModifySharedLinkSettingsErrorUnsupportedLinkType = "unsupported_link_type"
2675 ModifySharedLinkSettingsErrorOther = "other"
2676 ModifySharedLinkSettingsErrorSettingsError = "settings_error"
2677 ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified"
2678 )
2679
2680 // UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance
2681 func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error {
2682 type wrap struct {
2683 dropbox.Tagged
2684 // SettingsError : There is an error with the given settings.
2685 SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"`
2686 }
2687 var w wrap
2688 var err error
2689 if err = json.Unmarshal(body, &w); err != nil {
2690 return err
2691 }
2692 u.Tag = w.Tag
2693 switch u.Tag {
2694 case "settings_error":
2695 u.SettingsError = w.SettingsError
2696
2697 if err != nil {
2698 return err
2699 }
2700 }
2701 return nil
2702 }
2703
2704 // MountFolderArg : has no documentation (yet)
2705 type MountFolderArg struct {
2706 // SharedFolderId : The ID of the shared folder to mount.
2707 SharedFolderId string `json:"shared_folder_id"`
2708 }
2709
2710 // NewMountFolderArg returns a new MountFolderArg instance
2711 func NewMountFolderArg(SharedFolderId string) *MountFolderArg {
2712 s := new(MountFolderArg)
2713 s.SharedFolderId = SharedFolderId
2714 return s
2715 }
2716
2717 // MountFolderError : has no documentation (yet)
2718 type MountFolderError struct {
2719 dropbox.Tagged
2720 // AccessError : has no documentation (yet)
2721 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2722 // InsufficientQuota : The current user does not have enough space to mount
2723 // the shared folder.
2724 InsufficientQuota *InsufficientQuotaAmounts `json:"insufficient_quota,omitempty"`
2725 }
2726
2727 // Valid tag values for MountFolderError
2728 const (
2729 MountFolderErrorAccessError = "access_error"
2730 MountFolderErrorInsideSharedFolder = "inside_shared_folder"
2731 MountFolderErrorInsufficientQuota = "insufficient_quota"
2732 MountFolderErrorAlreadyMounted = "already_mounted"
2733 MountFolderErrorNoPermission = "no_permission"
2734 MountFolderErrorNotMountable = "not_mountable"
2735 MountFolderErrorOther = "other"
2736 )
2737
2738 // UnmarshalJSON deserializes into a MountFolderError instance
2739 func (u *MountFolderError) UnmarshalJSON(body []byte) error {
2740 type wrap struct {
2741 dropbox.Tagged
2742 // AccessError : has no documentation (yet)
2743 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2744 }
2745 var w wrap
2746 var err error
2747 if err = json.Unmarshal(body, &w); err != nil {
2748 return err
2749 }
2750 u.Tag = w.Tag
2751 switch u.Tag {
2752 case "access_error":
2753 u.AccessError = w.AccessError
2754
2755 if err != nil {
2756 return err
2757 }
2758 case "insufficient_quota":
2759 err = json.Unmarshal(body, &u.InsufficientQuota)
2760
2761 if err != nil {
2762 return err
2763 }
2764 }
2765 return nil
2766 }
2767
2768 // ParentFolderAccessInfo : Contains information about a parent folder that a
2769 // member has access to.
2770 type ParentFolderAccessInfo struct {
2771 // FolderName : Display name for the folder.
2772 FolderName string `json:"folder_name"`
2773 // SharedFolderId : The identifier of the parent shared folder.
2774 SharedFolderId string `json:"shared_folder_id"`
2775 // Permissions : The user's permissions for the parent shared folder.
2776 Permissions []*MemberPermission `json:"permissions"`
2777 // Path : The full path to the parent shared folder relative to the acting
2778 // user's root.
2779 Path string `json:"path"`
2780 }
2781
2782 // NewParentFolderAccessInfo returns a new ParentFolderAccessInfo instance
2783 func NewParentFolderAccessInfo(FolderName string, SharedFolderId string, Permissions []*MemberPermission, Path string) *ParentFolderAccessInfo {
2784 s := new(ParentFolderAccessInfo)
2785 s.FolderName = FolderName
2786 s.SharedFolderId = SharedFolderId
2787 s.Permissions = Permissions
2788 s.Path = Path
2789 return s
2790 }
2791
2792 // PathLinkMetadata : Metadata for a path-based shared link.
2793 type PathLinkMetadata struct {
2794 LinkMetadata
2795 // Path : Path in user's Dropbox.
2796 Path string `json:"path"`
2797 }
2798
2799 // NewPathLinkMetadata returns a new PathLinkMetadata instance
2800 func NewPathLinkMetadata(Url string, Visibility *Visibility, Path string) *PathLinkMetadata {
2801 s := new(PathLinkMetadata)
2802 s.Url = Url
2803 s.Visibility = Visibility
2804 s.Path = Path
2805 return s
2806 }
2807
2808 // PendingUploadMode : Flag to indicate pending upload default (for linking to
2809 // not-yet-existing paths).
2810 type PendingUploadMode struct {
2811 dropbox.Tagged
2812 }
2813
2814 // Valid tag values for PendingUploadMode
2815 const (
2816 PendingUploadModeFile = "file"
2817 PendingUploadModeFolder = "folder"
2818 )
2819
2820 // PermissionDeniedReason : Possible reasons the user is denied a permission.
2821 type PermissionDeniedReason struct {
2822 dropbox.Tagged
2823 // InsufficientPlan : has no documentation (yet)
2824 InsufficientPlan *InsufficientPlan `json:"insufficient_plan,omitempty"`
2825 }
2826
2827 // Valid tag values for PermissionDeniedReason
2828 const (
2829 PermissionDeniedReasonUserNotSameTeamAsOwner = "user_not_same_team_as_owner"
2830 PermissionDeniedReasonUserNotAllowedByOwner = "user_not_allowed_by_owner"
2831 PermissionDeniedReasonTargetIsIndirectMember = "target_is_indirect_member"
2832 PermissionDeniedReasonTargetIsOwner = "target_is_owner"
2833 PermissionDeniedReasonTargetIsSelf = "target_is_self"
2834 PermissionDeniedReasonTargetNotActive = "target_not_active"
2835 PermissionDeniedReasonFolderIsLimitedTeamFolder = "folder_is_limited_team_folder"
2836 PermissionDeniedReasonOwnerNotOnTeam = "owner_not_on_team"
2837 PermissionDeniedReasonPermissionDenied = "permission_denied"
2838 PermissionDeniedReasonRestrictedByTeam = "restricted_by_team"
2839 PermissionDeniedReasonUserAccountType = "user_account_type"
2840 PermissionDeniedReasonUserNotOnTeam = "user_not_on_team"
2841 PermissionDeniedReasonFolderIsInsideSharedFolder = "folder_is_inside_shared_folder"
2842 PermissionDeniedReasonRestrictedByParentFolder = "restricted_by_parent_folder"
2843 PermissionDeniedReasonInsufficientPlan = "insufficient_plan"
2844 PermissionDeniedReasonOther = "other"
2845 )
2846
2847 // UnmarshalJSON deserializes into a PermissionDeniedReason instance
2848 func (u *PermissionDeniedReason) UnmarshalJSON(body []byte) error {
2849 type wrap struct {
2850 dropbox.Tagged
2851 }
2852 var w wrap
2853 var err error
2854 if err = json.Unmarshal(body, &w); err != nil {
2855 return err
2856 }
2857 u.Tag = w.Tag
2858 switch u.Tag {
2859 case "insufficient_plan":
2860 err = json.Unmarshal(body, &u.InsufficientPlan)
2861
2862 if err != nil {
2863 return err
2864 }
2865 }
2866 return nil
2867 }
2868
2869 // RelinquishFileMembershipArg : has no documentation (yet)
2870 type RelinquishFileMembershipArg struct {
2871 // File : The path or id for the file.
2872 File string `json:"file"`
2873 }
2874
2875 // NewRelinquishFileMembershipArg returns a new RelinquishFileMembershipArg instance
2876 func NewRelinquishFileMembershipArg(File string) *RelinquishFileMembershipArg {
2877 s := new(RelinquishFileMembershipArg)
2878 s.File = File
2879 return s
2880 }
2881
2882 // RelinquishFileMembershipError : has no documentation (yet)
2883 type RelinquishFileMembershipError struct {
2884 dropbox.Tagged
2885 // AccessError : has no documentation (yet)
2886 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2887 }
2888
2889 // Valid tag values for RelinquishFileMembershipError
2890 const (
2891 RelinquishFileMembershipErrorAccessError = "access_error"
2892 RelinquishFileMembershipErrorGroupAccess = "group_access"
2893 RelinquishFileMembershipErrorNoPermission = "no_permission"
2894 RelinquishFileMembershipErrorOther = "other"
2895 )
2896
2897 // UnmarshalJSON deserializes into a RelinquishFileMembershipError instance
2898 func (u *RelinquishFileMembershipError) UnmarshalJSON(body []byte) error {
2899 type wrap struct {
2900 dropbox.Tagged
2901 // AccessError : has no documentation (yet)
2902 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
2903 }
2904 var w wrap
2905 var err error
2906 if err = json.Unmarshal(body, &w); err != nil {
2907 return err
2908 }
2909 u.Tag = w.Tag
2910 switch u.Tag {
2911 case "access_error":
2912 u.AccessError = w.AccessError
2913
2914 if err != nil {
2915 return err
2916 }
2917 }
2918 return nil
2919 }
2920
2921 // RelinquishFolderMembershipArg : has no documentation (yet)
2922 type RelinquishFolderMembershipArg struct {
2923 // SharedFolderId : The ID for the shared folder.
2924 SharedFolderId string `json:"shared_folder_id"`
2925 // LeaveACopy : Keep a copy of the folder's contents upon relinquishing
2926 // membership.
2927 LeaveACopy bool `json:"leave_a_copy"`
2928 }
2929
2930 // NewRelinquishFolderMembershipArg returns a new RelinquishFolderMembershipArg instance
2931 func NewRelinquishFolderMembershipArg(SharedFolderId string) *RelinquishFolderMembershipArg {
2932 s := new(RelinquishFolderMembershipArg)
2933 s.SharedFolderId = SharedFolderId
2934 s.LeaveACopy = false
2935 return s
2936 }
2937
2938 // RelinquishFolderMembershipError : has no documentation (yet)
2939 type RelinquishFolderMembershipError struct {
2940 dropbox.Tagged
2941 // AccessError : has no documentation (yet)
2942 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2943 }
2944
2945 // Valid tag values for RelinquishFolderMembershipError
2946 const (
2947 RelinquishFolderMembershipErrorAccessError = "access_error"
2948 RelinquishFolderMembershipErrorFolderOwner = "folder_owner"
2949 RelinquishFolderMembershipErrorMounted = "mounted"
2950 RelinquishFolderMembershipErrorGroupAccess = "group_access"
2951 RelinquishFolderMembershipErrorTeamFolder = "team_folder"
2952 RelinquishFolderMembershipErrorNoPermission = "no_permission"
2953 RelinquishFolderMembershipErrorNoExplicitAccess = "no_explicit_access"
2954 RelinquishFolderMembershipErrorOther = "other"
2955 )
2956
2957 // UnmarshalJSON deserializes into a RelinquishFolderMembershipError instance
2958 func (u *RelinquishFolderMembershipError) UnmarshalJSON(body []byte) error {
2959 type wrap struct {
2960 dropbox.Tagged
2961 // AccessError : has no documentation (yet)
2962 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
2963 }
2964 var w wrap
2965 var err error
2966 if err = json.Unmarshal(body, &w); err != nil {
2967 return err
2968 }
2969 u.Tag = w.Tag
2970 switch u.Tag {
2971 case "access_error":
2972 u.AccessError = w.AccessError
2973
2974 if err != nil {
2975 return err
2976 }
2977 }
2978 return nil
2979 }
2980
2981 // RemoveFileMemberArg : Arguments for `removeFileMember2`.
2982 type RemoveFileMemberArg struct {
2983 // File : File from which to remove members.
2984 File string `json:"file"`
2985 // Member : Member to remove from this file. Note that even if an email is
2986 // specified, it may result in the removal of a user (not an invitee) if the
2987 // user's main account corresponds to that email address.
2988 Member *MemberSelector `json:"member"`
2989 }
2990
2991 // NewRemoveFileMemberArg returns a new RemoveFileMemberArg instance
2992 func NewRemoveFileMemberArg(File string, Member *MemberSelector) *RemoveFileMemberArg {
2993 s := new(RemoveFileMemberArg)
2994 s.File = File
2995 s.Member = Member
2996 return s
2997 }
2998
2999 // RemoveFileMemberError : Errors for `removeFileMember2`.
3000 type RemoveFileMemberError struct {
3001 dropbox.Tagged
3002 // UserError : has no documentation (yet)
3003 UserError *SharingUserError `json:"user_error,omitempty"`
3004 // AccessError : has no documentation (yet)
3005 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
3006 // NoExplicitAccess : This member does not have explicit access to the file
3007 // and therefore cannot be removed. The return value is the access that a
3008 // user might have to the file from a parent folder.
3009 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
3010 }
3011
3012 // Valid tag values for RemoveFileMemberError
3013 const (
3014 RemoveFileMemberErrorUserError = "user_error"
3015 RemoveFileMemberErrorAccessError = "access_error"
3016 RemoveFileMemberErrorNoExplicitAccess = "no_explicit_access"
3017 RemoveFileMemberErrorOther = "other"
3018 )
3019
3020 // UnmarshalJSON deserializes into a RemoveFileMemberError instance
3021 func (u *RemoveFileMemberError) UnmarshalJSON(body []byte) error {
3022 type wrap struct {
3023 dropbox.Tagged
3024 // UserError : has no documentation (yet)
3025 UserError *SharingUserError `json:"user_error,omitempty"`
3026 // AccessError : has no documentation (yet)
3027 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
3028 }
3029 var w wrap
3030 var err error
3031 if err = json.Unmarshal(body, &w); err != nil {
3032 return err
3033 }
3034 u.Tag = w.Tag
3035 switch u.Tag {
3036 case "user_error":
3037 u.UserError = w.UserError
3038
3039 if err != nil {
3040 return err
3041 }
3042 case "access_error":
3043 u.AccessError = w.AccessError
3044
3045 if err != nil {
3046 return err
3047 }
3048 case "no_explicit_access":
3049 err = json.Unmarshal(body, &u.NoExplicitAccess)
3050
3051 if err != nil {
3052 return err
3053 }
3054 }
3055 return nil
3056 }
3057
3058 // RemoveFolderMemberArg : has no documentation (yet)
3059 type RemoveFolderMemberArg struct {
3060 // SharedFolderId : The ID for the shared folder.
3061 SharedFolderId string `json:"shared_folder_id"`
3062 // Member : The member to remove from the folder.
3063 Member *MemberSelector `json:"member"`
3064 // LeaveACopy : If true, the removed user will keep their copy of the folder
3065 // after it's unshared, assuming it was mounted. Otherwise, it will be
3066 // removed from their Dropbox. Also, this must be set to false when kicking
3067 // a group.
3068 LeaveACopy bool `json:"leave_a_copy"`
3069 }
3070
3071 // NewRemoveFolderMemberArg returns a new RemoveFolderMemberArg instance
3072 func NewRemoveFolderMemberArg(SharedFolderId string, Member *MemberSelector, LeaveACopy bool) *RemoveFolderMemberArg {
3073 s := new(RemoveFolderMemberArg)
3074 s.SharedFolderId = SharedFolderId
3075 s.Member = Member
3076 s.LeaveACopy = LeaveACopy
3077 return s
3078 }
3079
3080 // RemoveFolderMemberError : has no documentation (yet)
3081 type RemoveFolderMemberError struct {
3082 dropbox.Tagged
3083 // AccessError : has no documentation (yet)
3084 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3085 // MemberError : has no documentation (yet)
3086 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
3087 }
3088
3089 // Valid tag values for RemoveFolderMemberError
3090 const (
3091 RemoveFolderMemberErrorAccessError = "access_error"
3092 RemoveFolderMemberErrorMemberError = "member_error"
3093 RemoveFolderMemberErrorFolderOwner = "folder_owner"
3094 RemoveFolderMemberErrorGroupAccess = "group_access"
3095 RemoveFolderMemberErrorTeamFolder = "team_folder"
3096 RemoveFolderMemberErrorNoPermission = "no_permission"
3097 RemoveFolderMemberErrorTooManyFiles = "too_many_files"
3098 RemoveFolderMemberErrorOther = "other"
3099 )
3100
3101 // UnmarshalJSON deserializes into a RemoveFolderMemberError instance
3102 func (u *RemoveFolderMemberError) UnmarshalJSON(body []byte) error {
3103 type wrap struct {
3104 dropbox.Tagged
3105 // AccessError : has no documentation (yet)
3106 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3107 // MemberError : has no documentation (yet)
3108 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
3109 }
3110 var w wrap
3111 var err error
3112 if err = json.Unmarshal(body, &w); err != nil {
3113 return err
3114 }
3115 u.Tag = w.Tag
3116 switch u.Tag {
3117 case "access_error":
3118 u.AccessError = w.AccessError
3119
3120 if err != nil {
3121 return err
3122 }
3123 case "member_error":
3124 u.MemberError = w.MemberError
3125
3126 if err != nil {
3127 return err
3128 }
3129 }
3130 return nil
3131 }
3132
3133 // RemoveMemberJobStatus : has no documentation (yet)
3134 type RemoveMemberJobStatus struct {
3135 dropbox.Tagged
3136 // Complete : Removing the folder member has finished. The value is
3137 // information about whether the member has another form of access.
3138 Complete *MemberAccessLevelResult `json:"complete,omitempty"`
3139 // Failed : has no documentation (yet)
3140 Failed *RemoveFolderMemberError `json:"failed,omitempty"`
3141 }
3142
3143 // Valid tag values for RemoveMemberJobStatus
3144 const (
3145 RemoveMemberJobStatusInProgress = "in_progress"
3146 RemoveMemberJobStatusComplete = "complete"
3147 RemoveMemberJobStatusFailed = "failed"
3148 )
3149
3150 // UnmarshalJSON deserializes into a RemoveMemberJobStatus instance
3151 func (u *RemoveMemberJobStatus) UnmarshalJSON(body []byte) error {
3152 type wrap struct {
3153 dropbox.Tagged
3154 // Failed : has no documentation (yet)
3155 Failed *RemoveFolderMemberError `json:"failed,omitempty"`
3156 }
3157 var w wrap
3158 var err error
3159 if err = json.Unmarshal(body, &w); err != nil {
3160 return err
3161 }
3162 u.Tag = w.Tag
3163 switch u.Tag {
3164 case "complete":
3165 err = json.Unmarshal(body, &u.Complete)
3166
3167 if err != nil {
3168 return err
3169 }
3170 case "failed":
3171 u.Failed = w.Failed
3172
3173 if err != nil {
3174 return err
3175 }
3176 }
3177 return nil
3178 }
3179
3180 // RequestedLinkAccessLevel : has no documentation (yet)
3181 type RequestedLinkAccessLevel struct {
3182 dropbox.Tagged
3183 }
3184
3185 // Valid tag values for RequestedLinkAccessLevel
3186 const (
3187 RequestedLinkAccessLevelViewer = "viewer"
3188 RequestedLinkAccessLevelEditor = "editor"
3189 RequestedLinkAccessLevelMax = "max"
3190 RequestedLinkAccessLevelOther = "other"
3191 )
3192
3193 // RequestedVisibility : The access permission that can be requested by the
3194 // caller for the shared link. Note that the final resolved visibility of the
3195 // shared link takes into account other aspects, such as team and shared folder
3196 // settings. Check the `ResolvedVisibility` for more info on the possible
3197 // resolved visibility values of shared links.
3198 type RequestedVisibility struct {
3199 dropbox.Tagged
3200 }
3201
3202 // Valid tag values for RequestedVisibility
3203 const (
3204 RequestedVisibilityPublic = "public"
3205 RequestedVisibilityTeamOnly = "team_only"
3206 RequestedVisibilityPassword = "password"
3207 )
3208
3209 // ResolvedVisibility : The actual access permissions values of shared links
3210 // after taking into account user preferences and the team and shared folder
3211 // settings. Check the `RequestedVisibility` for more info on the possible
3212 // visibility values that can be set by the shared link's owner.
3213 type ResolvedVisibility struct {
3214 dropbox.Tagged
3215 }
3216
3217 // Valid tag values for ResolvedVisibility
3218 const (
3219 ResolvedVisibilityPublic = "public"
3220 ResolvedVisibilityTeamOnly = "team_only"
3221 ResolvedVisibilityPassword = "password"
3222 ResolvedVisibilityTeamAndPassword = "team_and_password"
3223 ResolvedVisibilitySharedFolderOnly = "shared_folder_only"
3224 ResolvedVisibilityOther = "other"
3225 )
3226
3227 // RevokeSharedLinkArg : has no documentation (yet)
3228 type RevokeSharedLinkArg struct {
3229 // Url : URL of the shared link.
3230 Url string `json:"url"`
3231 }
3232
3233 // NewRevokeSharedLinkArg returns a new RevokeSharedLinkArg instance
3234 func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg {
3235 s := new(RevokeSharedLinkArg)
3236 s.Url = Url
3237 return s
3238 }
3239
3240 // RevokeSharedLinkError : has no documentation (yet)
3241 type RevokeSharedLinkError struct {
3242 dropbox.Tagged
3243 }
3244
3245 // Valid tag values for RevokeSharedLinkError
3246 const (
3247 RevokeSharedLinkErrorSharedLinkNotFound = "shared_link_not_found"
3248 RevokeSharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied"
3249 RevokeSharedLinkErrorUnsupportedLinkType = "unsupported_link_type"
3250 RevokeSharedLinkErrorOther = "other"
3251 RevokeSharedLinkErrorSharedLinkMalformed = "shared_link_malformed"
3252 )
3253
3254 // SetAccessInheritanceArg : has no documentation (yet)
3255 type SetAccessInheritanceArg struct {
3256 // AccessInheritance : The access inheritance settings for the folder.
3257 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3258 // SharedFolderId : The ID for the shared folder.
3259 SharedFolderId string `json:"shared_folder_id"`
3260 }
3261
3262 // NewSetAccessInheritanceArg returns a new SetAccessInheritanceArg instance
3263 func NewSetAccessInheritanceArg(SharedFolderId string) *SetAccessInheritanceArg {
3264 s := new(SetAccessInheritanceArg)
3265 s.SharedFolderId = SharedFolderId
3266 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
3267 return s
3268 }
3269
3270 // SetAccessInheritanceError : has no documentation (yet)
3271 type SetAccessInheritanceError struct {
3272 dropbox.Tagged
3273 // AccessError : Unable to access shared folder.
3274 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3275 }
3276
3277 // Valid tag values for SetAccessInheritanceError
3278 const (
3279 SetAccessInheritanceErrorAccessError = "access_error"
3280 SetAccessInheritanceErrorNoPermission = "no_permission"
3281 SetAccessInheritanceErrorOther = "other"
3282 )
3283
3284 // UnmarshalJSON deserializes into a SetAccessInheritanceError instance
3285 func (u *SetAccessInheritanceError) UnmarshalJSON(body []byte) error {
3286 type wrap struct {
3287 dropbox.Tagged
3288 // AccessError : Unable to access shared folder.
3289 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
3290 }
3291 var w wrap
3292 var err error
3293 if err = json.Unmarshal(body, &w); err != nil {
3294 return err
3295 }
3296 u.Tag = w.Tag
3297 switch u.Tag {
3298 case "access_error":
3299 u.AccessError = w.AccessError
3300
3301 if err != nil {
3302 return err
3303 }
3304 }
3305 return nil
3306 }
3307
3308 // ShareFolderArgBase : has no documentation (yet)
3309 type ShareFolderArgBase struct {
3310 // AclUpdatePolicy : Who can add and remove members of this shared folder.
3311 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
3312 // ForceAsync : Whether to force the share to happen asynchronously.
3313 ForceAsync bool `json:"force_async"`
3314 // MemberPolicy : Who can be a member of this shared folder. Only applicable
3315 // if the current user is on a team.
3316 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
3317 // Path : The path to the folder to share. If it does not exist, then a new
3318 // one is created.
3319 Path string `json:"path"`
3320 // SharedLinkPolicy : The policy to apply to shared links created for
3321 // content inside this shared folder. The current user must be on a team to
3322 // set this policy to `SharedLinkPolicy.members`.
3323 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
3324 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
3325 // folder.
3326 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
3327 // AccessInheritance : The access inheritance settings for the folder.
3328 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3329 }
3330
3331 // NewShareFolderArgBase returns a new ShareFolderArgBase instance
3332 func NewShareFolderArgBase(Path string) *ShareFolderArgBase {
3333 s := new(ShareFolderArgBase)
3334 s.Path = Path
3335 s.ForceAsync = false
3336 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
3337 return s
3338 }
3339
3340 // ShareFolderArg : has no documentation (yet)
3341 type ShareFolderArg struct {
3342 ShareFolderArgBase
3343 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
3344 // that should appear in the response's `SharedFolderMetadata.permissions`
3345 // field describing the actions the authenticated user can perform on the
3346 // folder.
3347 Actions []*FolderAction `json:"actions,omitempty"`
3348 // LinkSettings : Settings on the link for this folder.
3349 LinkSettings *LinkSettings `json:"link_settings,omitempty"`
3350 }
3351
3352 // NewShareFolderArg returns a new ShareFolderArg instance
3353 func NewShareFolderArg(Path string) *ShareFolderArg {
3354 s := new(ShareFolderArg)
3355 s.Path = Path
3356 s.ForceAsync = false
3357 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
3358 return s
3359 }
3360
3361 // ShareFolderErrorBase : has no documentation (yet)
3362 type ShareFolderErrorBase struct {
3363 dropbox.Tagged
3364 // BadPath : `ShareFolderArg.path` is invalid.
3365 BadPath *SharePathError `json:"bad_path,omitempty"`
3366 }
3367
3368 // Valid tag values for ShareFolderErrorBase
3369 const (
3370 ShareFolderErrorBaseEmailUnverified = "email_unverified"
3371 ShareFolderErrorBaseBadPath = "bad_path"
3372 ShareFolderErrorBaseTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
3373 ShareFolderErrorBaseDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
3374 ShareFolderErrorBaseOther = "other"
3375 )
3376
3377 // UnmarshalJSON deserializes into a ShareFolderErrorBase instance
3378 func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error {
3379 type wrap struct {
3380 dropbox.Tagged
3381 // BadPath : `ShareFolderArg.path` is invalid.
3382 BadPath *SharePathError `json:"bad_path,omitempty"`
3383 }
3384 var w wrap
3385 var err error
3386 if err = json.Unmarshal(body, &w); err != nil {
3387 return err
3388 }
3389 u.Tag = w.Tag
3390 switch u.Tag {
3391 case "bad_path":
3392 u.BadPath = w.BadPath
3393
3394 if err != nil {
3395 return err
3396 }
3397 }
3398 return nil
3399 }
3400
3401 // ShareFolderError : has no documentation (yet)
3402 type ShareFolderError struct {
3403 dropbox.Tagged
3404 // BadPath : `ShareFolderArg.path` is invalid.
3405 BadPath *SharePathError `json:"bad_path,omitempty"`
3406 }
3407
3408 // Valid tag values for ShareFolderError
3409 const (
3410 ShareFolderErrorEmailUnverified = "email_unverified"
3411 ShareFolderErrorBadPath = "bad_path"
3412 ShareFolderErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
3413 ShareFolderErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
3414 ShareFolderErrorOther = "other"
3415 ShareFolderErrorNoPermission = "no_permission"
3416 )
3417
3418 // UnmarshalJSON deserializes into a ShareFolderError instance
3419 func (u *ShareFolderError) UnmarshalJSON(body []byte) error {
3420 type wrap struct {
3421 dropbox.Tagged
3422 // BadPath : `ShareFolderArg.path` is invalid.
3423 BadPath *SharePathError `json:"bad_path,omitempty"`
3424 }
3425 var w wrap
3426 var err error
3427 if err = json.Unmarshal(body, &w); err != nil {
3428 return err
3429 }
3430 u.Tag = w.Tag
3431 switch u.Tag {
3432 case "bad_path":
3433 u.BadPath = w.BadPath
3434
3435 if err != nil {
3436 return err
3437 }
3438 }
3439 return nil
3440 }
3441
3442 // ShareFolderJobStatus : has no documentation (yet)
3443 type ShareFolderJobStatus struct {
3444 dropbox.Tagged
3445 // Complete : The share job has finished. The value is the metadata for the
3446 // folder.
3447 Complete *SharedFolderMetadata `json:"complete,omitempty"`
3448 // Failed : has no documentation (yet)
3449 Failed *ShareFolderError `json:"failed,omitempty"`
3450 }
3451
3452 // Valid tag values for ShareFolderJobStatus
3453 const (
3454 ShareFolderJobStatusInProgress = "in_progress"
3455 ShareFolderJobStatusComplete = "complete"
3456 ShareFolderJobStatusFailed = "failed"
3457 )
3458
3459 // UnmarshalJSON deserializes into a ShareFolderJobStatus instance
3460 func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error {
3461 type wrap struct {
3462 dropbox.Tagged
3463 // Failed : has no documentation (yet)
3464 Failed *ShareFolderError `json:"failed,omitempty"`
3465 }
3466 var w wrap
3467 var err error
3468 if err = json.Unmarshal(body, &w); err != nil {
3469 return err
3470 }
3471 u.Tag = w.Tag
3472 switch u.Tag {
3473 case "complete":
3474 err = json.Unmarshal(body, &u.Complete)
3475
3476 if err != nil {
3477 return err
3478 }
3479 case "failed":
3480 u.Failed = w.Failed
3481
3482 if err != nil {
3483 return err
3484 }
3485 }
3486 return nil
3487 }
3488
3489 // ShareFolderLaunch : has no documentation (yet)
3490 type ShareFolderLaunch struct {
3491 dropbox.Tagged
3492 // AsyncJobId : This response indicates that the processing is asynchronous.
3493 // The string is an id that can be used to obtain the status of the
3494 // asynchronous job.
3495 AsyncJobId string `json:"async_job_id,omitempty"`
3496 // Complete : has no documentation (yet)
3497 Complete *SharedFolderMetadata `json:"complete,omitempty"`
3498 }
3499
3500 // Valid tag values for ShareFolderLaunch
3501 const (
3502 ShareFolderLaunchAsyncJobId = "async_job_id"
3503 ShareFolderLaunchComplete = "complete"
3504 )
3505
3506 // UnmarshalJSON deserializes into a ShareFolderLaunch instance
3507 func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error {
3508 type wrap struct {
3509 dropbox.Tagged
3510 // AsyncJobId : This response indicates that the processing is
3511 // asynchronous. The string is an id that can be used to obtain the
3512 // status of the asynchronous job.
3513 AsyncJobId string `json:"async_job_id,omitempty"`
3514 }
3515 var w wrap
3516 var err error
3517 if err = json.Unmarshal(body, &w); err != nil {
3518 return err
3519 }
3520 u.Tag = w.Tag
3521 switch u.Tag {
3522 case "async_job_id":
3523 u.AsyncJobId = w.AsyncJobId
3524
3525 if err != nil {
3526 return err
3527 }
3528 case "complete":
3529 err = json.Unmarshal(body, &u.Complete)
3530
3531 if err != nil {
3532 return err
3533 }
3534 }
3535 return nil
3536 }
3537
3538 // SharePathError : has no documentation (yet)
3539 type SharePathError struct {
3540 dropbox.Tagged
3541 // AlreadyShared : Folder is already shared. Contains metadata about the
3542 // existing shared folder.
3543 AlreadyShared *SharedFolderMetadata `json:"already_shared,omitempty"`
3544 }
3545
3546 // Valid tag values for SharePathError
3547 const (
3548 SharePathErrorIsFile = "is_file"
3549 SharePathErrorInsideSharedFolder = "inside_shared_folder"
3550 SharePathErrorContainsSharedFolder = "contains_shared_folder"
3551 SharePathErrorContainsAppFolder = "contains_app_folder"
3552 SharePathErrorContainsTeamFolder = "contains_team_folder"
3553 SharePathErrorIsAppFolder = "is_app_folder"
3554 SharePathErrorInsideAppFolder = "inside_app_folder"
3555 SharePathErrorIsPublicFolder = "is_public_folder"
3556 SharePathErrorInsidePublicFolder = "inside_public_folder"
3557 SharePathErrorAlreadyShared = "already_shared"
3558 SharePathErrorInvalidPath = "invalid_path"
3559 SharePathErrorIsOsxPackage = "is_osx_package"
3560 SharePathErrorInsideOsxPackage = "inside_osx_package"
3561 SharePathErrorIsVault = "is_vault"
3562 SharePathErrorIsFamily = "is_family"
3563 SharePathErrorOther = "other"
3564 )
3565
3566 // UnmarshalJSON deserializes into a SharePathError instance
3567 func (u *SharePathError) UnmarshalJSON(body []byte) error {
3568 type wrap struct {
3569 dropbox.Tagged
3570 }
3571 var w wrap
3572 var err error
3573 if err = json.Unmarshal(body, &w); err != nil {
3574 return err
3575 }
3576 u.Tag = w.Tag
3577 switch u.Tag {
3578 case "already_shared":
3579 err = json.Unmarshal(body, &u.AlreadyShared)
3580
3581 if err != nil {
3582 return err
3583 }
3584 }
3585 return nil
3586 }
3587
3588 // SharedContentLinkMetadata : Metadata of a shared link for a file or folder.
3589 type SharedContentLinkMetadata struct {
3590 SharedContentLinkMetadataBase
3591 // AudienceExceptions : The content inside this folder with link audience
3592 // different than this folder's. This is only returned when an endpoint that
3593 // returns metadata for a single shared folder is called, e.g.
3594 // /get_folder_metadata.
3595 AudienceExceptions *AudienceExceptions `json:"audience_exceptions,omitempty"`
3596 // Url : The URL of the link.
3597 Url string `json:"url"`
3598 }
3599
3600 // NewSharedContentLinkMetadata returns a new SharedContentLinkMetadata instance
3601 func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool, Url string) *SharedContentLinkMetadata {
3602 s := new(SharedContentLinkMetadata)
3603 s.AudienceOptions = AudienceOptions
3604 s.CurrentAudience = CurrentAudience
3605 s.LinkPermissions = LinkPermissions
3606 s.PasswordProtected = PasswordProtected
3607 s.Url = Url
3608 return s
3609 }
3610
3611 // SharedFileMembers : Shared file user, group, and invitee membership. Used for
3612 // the results of `listFileMembers` and `listFileMembersContinue`, and used as
3613 // part of the results for `listFileMembersBatch`.
3614 type SharedFileMembers struct {
3615 // Users : The list of user members of the shared file.
3616 Users []*UserFileMembershipInfo `json:"users"`
3617 // Groups : The list of group members of the shared file.
3618 Groups []*GroupMembershipInfo `json:"groups"`
3619 // Invitees : The list of invited members of a file, but have not logged in
3620 // and claimed this.
3621 Invitees []*InviteeMembershipInfo `json:"invitees"`
3622 // Cursor : Present if there are additional shared file members that have
3623 // not been returned yet. Pass the cursor into `listFileMembersContinue` to
3624 // list additional members.
3625 Cursor string `json:"cursor,omitempty"`
3626 }
3627
3628 // NewSharedFileMembers returns a new SharedFileMembers instance
3629 func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers {
3630 s := new(SharedFileMembers)
3631 s.Users = Users
3632 s.Groups = Groups
3633 s.Invitees = Invitees
3634 return s
3635 }
3636
3637 // SharedFileMetadata : Properties of the shared file.
3638 type SharedFileMetadata struct {
3639 // AccessType : The current user's access level for this shared file.
3640 AccessType *AccessLevel `json:"access_type,omitempty"`
3641 // Id : The ID of the file.
3642 Id string `json:"id"`
3643 // ExpectedLinkMetadata : The expected metadata of the link associated for
3644 // the file when it is first shared. Absent if the link already exists. This
3645 // is for an unreleased feature so it may not be returned yet.
3646 ExpectedLinkMetadata *ExpectedSharedContentLinkMetadata `json:"expected_link_metadata,omitempty"`
3647 // LinkMetadata : The metadata of the link associated for the file. This is
3648 // for an unreleased feature so it may not be returned yet.
3649 LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
3650 // Name : The name of this file.
3651 Name string `json:"name"`
3652 // OwnerDisplayNames : The display names of the users that own the file. If
3653 // the file is part of a team folder, the display names of the team admins
3654 // are also included. Absent if the owner display names cannot be fetched.
3655 OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
3656 // OwnerTeam : The team that owns the file. This field is not present if the
3657 // file is not owned by a team.
3658 OwnerTeam *users.Team `json:"owner_team,omitempty"`
3659 // ParentSharedFolderId : The ID of the parent shared folder. This field is
3660 // present only if the file is contained within a shared folder.
3661 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
3662 // PathDisplay : The cased path to be used for display purposes only. In
3663 // rare instances the casing will not correctly match the user's filesystem,
3664 // but this behavior will match the path provided in the Core API v1. Absent
3665 // for unmounted files.
3666 PathDisplay string `json:"path_display,omitempty"`
3667 // PathLower : The lower-case full path of this file. Absent for unmounted
3668 // files.
3669 PathLower string `json:"path_lower,omitempty"`
3670 // Permissions : The sharing permissions that requesting user has on this
3671 // file. This corresponds to the entries given in
3672 // `GetFileMetadataBatchArg.actions` or `GetFileMetadataArg.actions`.
3673 Permissions []*FilePermission `json:"permissions,omitempty"`
3674 // Policy : Policies governing this shared file.
3675 Policy *FolderPolicy `json:"policy"`
3676 // PreviewUrl : URL for displaying a web preview of the shared file.
3677 PreviewUrl string `json:"preview_url"`
3678 // TimeInvited : Timestamp indicating when the current user was invited to
3679 // this shared file. If the user was not invited to the shared file, the
3680 // timestamp will indicate when the user was invited to the parent shared
3681 // folder. This value may be absent.
3682 TimeInvited *time.Time `json:"time_invited,omitempty"`
3683 }
3684
3685 // NewSharedFileMetadata returns a new SharedFileMetadata instance
3686 func NewSharedFileMetadata(Id string, Name string, Policy *FolderPolicy, PreviewUrl string) *SharedFileMetadata {
3687 s := new(SharedFileMetadata)
3688 s.Id = Id
3689 s.Name = Name
3690 s.Policy = Policy
3691 s.PreviewUrl = PreviewUrl
3692 return s
3693 }
3694
3695 // SharedFolderAccessError : There is an error accessing the shared folder.
3696 type SharedFolderAccessError struct {
3697 dropbox.Tagged
3698 }
3699
3700 // Valid tag values for SharedFolderAccessError
3701 const (
3702 SharedFolderAccessErrorInvalidId = "invalid_id"
3703 SharedFolderAccessErrorNotAMember = "not_a_member"
3704 SharedFolderAccessErrorEmailUnverified = "email_unverified"
3705 SharedFolderAccessErrorUnmounted = "unmounted"
3706 SharedFolderAccessErrorOther = "other"
3707 )
3708
3709 // SharedFolderMemberError : has no documentation (yet)
3710 type SharedFolderMemberError struct {
3711 dropbox.Tagged
3712 // NoExplicitAccess : The target member only has inherited access to the
3713 // shared folder.
3714 NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"`
3715 }
3716
3717 // Valid tag values for SharedFolderMemberError
3718 const (
3719 SharedFolderMemberErrorInvalidDropboxId = "invalid_dropbox_id"
3720 SharedFolderMemberErrorNotAMember = "not_a_member"
3721 SharedFolderMemberErrorNoExplicitAccess = "no_explicit_access"
3722 SharedFolderMemberErrorOther = "other"
3723 )
3724
3725 // UnmarshalJSON deserializes into a SharedFolderMemberError instance
3726 func (u *SharedFolderMemberError) UnmarshalJSON(body []byte) error {
3727 type wrap struct {
3728 dropbox.Tagged
3729 }
3730 var w wrap
3731 var err error
3732 if err = json.Unmarshal(body, &w); err != nil {
3733 return err
3734 }
3735 u.Tag = w.Tag
3736 switch u.Tag {
3737 case "no_explicit_access":
3738 err = json.Unmarshal(body, &u.NoExplicitAccess)
3739
3740 if err != nil {
3741 return err
3742 }
3743 }
3744 return nil
3745 }
3746
3747 // SharedFolderMembers : Shared folder user and group membership.
3748 type SharedFolderMembers struct {
3749 // Users : The list of user members of the shared folder.
3750 Users []*UserMembershipInfo `json:"users"`
3751 // Groups : The list of group members of the shared folder.
3752 Groups []*GroupMembershipInfo `json:"groups"`
3753 // Invitees : The list of invitees to the shared folder.
3754 Invitees []*InviteeMembershipInfo `json:"invitees"`
3755 // Cursor : Present if there are additional shared folder members that have
3756 // not been returned yet. Pass the cursor into `listFolderMembersContinue`
3757 // to list additional members.
3758 Cursor string `json:"cursor,omitempty"`
3759 }
3760
3761 // NewSharedFolderMembers returns a new SharedFolderMembers instance
3762 func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers {
3763 s := new(SharedFolderMembers)
3764 s.Users = Users
3765 s.Groups = Groups
3766 s.Invitees = Invitees
3767 return s
3768 }
3769
3770 // SharedFolderMetadataBase : Properties of the shared folder.
3771 type SharedFolderMetadataBase struct {
3772 // AccessType : The current user's access level for this shared folder.
3773 AccessType *AccessLevel `json:"access_type"`
3774 // IsInsideTeamFolder : Whether this folder is inside of a team folder.
3775 IsInsideTeamFolder bool `json:"is_inside_team_folder"`
3776 // IsTeamFolder : Whether this folder is a `team folder`
3777 // <https://www.dropbox.com/en/help/986>.
3778 IsTeamFolder bool `json:"is_team_folder"`
3779 // OwnerDisplayNames : The display names of the users that own the folder.
3780 // If the folder is part of a team folder, the display names of the team
3781 // admins are also included. Absent if the owner display names cannot be
3782 // fetched.
3783 OwnerDisplayNames []string `json:"owner_display_names,omitempty"`
3784 // OwnerTeam : The team that owns the folder. This field is not present if
3785 // the folder is not owned by a team.
3786 OwnerTeam *users.Team `json:"owner_team,omitempty"`
3787 // ParentSharedFolderId : The ID of the parent shared folder. This field is
3788 // present only if the folder is contained within another shared folder.
3789 ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"`
3790 // PathLower : The lower-cased full path of this shared folder. Absent for
3791 // unmounted folders.
3792 PathLower string `json:"path_lower,omitempty"`
3793 // ParentFolderName : Display name for the parent folder.
3794 ParentFolderName string `json:"parent_folder_name,omitempty"`
3795 }
3796
3797 // NewSharedFolderMetadataBase returns a new SharedFolderMetadataBase instance
3798 func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool) *SharedFolderMetadataBase {
3799 s := new(SharedFolderMetadataBase)
3800 s.AccessType = AccessType
3801 s.IsInsideTeamFolder = IsInsideTeamFolder
3802 s.IsTeamFolder = IsTeamFolder
3803 return s
3804 }
3805
3806 // SharedFolderMetadata : The metadata which includes basic information about
3807 // the shared folder.
3808 type SharedFolderMetadata struct {
3809 SharedFolderMetadataBase
3810 // LinkMetadata : The metadata of the shared content link to this shared
3811 // folder. Absent if there is no link on the folder. This is for an
3812 // unreleased feature so it may not be returned yet.
3813 LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"`
3814 // Name : The name of the this shared folder.
3815 Name string `json:"name"`
3816 // Permissions : Actions the current user may perform on the folder and its
3817 // contents. The set of permissions corresponds to the FolderActions in the
3818 // request.
3819 Permissions []*FolderPermission `json:"permissions,omitempty"`
3820 // Policy : Policies governing this shared folder.
3821 Policy *FolderPolicy `json:"policy"`
3822 // PreviewUrl : URL for displaying a web preview of the shared folder.
3823 PreviewUrl string `json:"preview_url"`
3824 // SharedFolderId : The ID of the shared folder.
3825 SharedFolderId string `json:"shared_folder_id"`
3826 // TimeInvited : Timestamp indicating when the current user was invited to
3827 // this shared folder.
3828 TimeInvited time.Time `json:"time_invited"`
3829 // AccessInheritance : Whether the folder inherits its members from its
3830 // parent.
3831 AccessInheritance *AccessInheritance `json:"access_inheritance"`
3832 }
3833
3834 // NewSharedFolderMetadata returns a new SharedFolderMetadata instance
3835 func NewSharedFolderMetadata(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool, Name string, Policy *FolderPolicy, PreviewUrl string, SharedFolderId string, TimeInvited time.Time) *SharedFolderMetadata {
3836 s := new(SharedFolderMetadata)
3837 s.AccessType = AccessType
3838 s.IsInsideTeamFolder = IsInsideTeamFolder
3839 s.IsTeamFolder = IsTeamFolder
3840 s.Name = Name
3841 s.Policy = Policy
3842 s.PreviewUrl = PreviewUrl
3843 s.SharedFolderId = SharedFolderId
3844 s.TimeInvited = TimeInvited
3845 s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{Tag: "inherit"}}
3846 return s
3847 }
3848
3849 // SharedLinkAccessFailureReason : has no documentation (yet)
3850 type SharedLinkAccessFailureReason struct {
3851 dropbox.Tagged
3852 }
3853
3854 // Valid tag values for SharedLinkAccessFailureReason
3855 const (
3856 SharedLinkAccessFailureReasonLoginRequired = "login_required"
3857 SharedLinkAccessFailureReasonEmailVerifyRequired = "email_verify_required"
3858 SharedLinkAccessFailureReasonPasswordRequired = "password_required"
3859 SharedLinkAccessFailureReasonTeamOnly = "team_only"
3860 SharedLinkAccessFailureReasonOwnerOnly = "owner_only"
3861 SharedLinkAccessFailureReasonOther = "other"
3862 )
3863
3864 // SharedLinkAlreadyExistsMetadata : has no documentation (yet)
3865 type SharedLinkAlreadyExistsMetadata struct {
3866 dropbox.Tagged
3867 // Metadata : Metadata of the shared link that already exists.
3868 Metadata IsSharedLinkMetadata `json:"metadata,omitempty"`
3869 }
3870
3871 // Valid tag values for SharedLinkAlreadyExistsMetadata
3872 const (
3873 SharedLinkAlreadyExistsMetadataMetadata = "metadata"
3874 SharedLinkAlreadyExistsMetadataOther = "other"
3875 )
3876
3877 // UnmarshalJSON deserializes into a SharedLinkAlreadyExistsMetadata instance
3878 func (u *SharedLinkAlreadyExistsMetadata) UnmarshalJSON(body []byte) error {
3879 type wrap struct {
3880 dropbox.Tagged
3881 // Metadata : Metadata of the shared link that already exists.
3882 Metadata json.RawMessage `json:"metadata,omitempty"`
3883 }
3884 var w wrap
3885 var err error
3886 if err = json.Unmarshal(body, &w); err != nil {
3887 return err
3888 }
3889 u.Tag = w.Tag
3890 switch u.Tag {
3891 case "metadata":
3892 u.Metadata, err = IsSharedLinkMetadataFromJSON(w.Metadata)
3893
3894 if err != nil {
3895 return err
3896 }
3897 }
3898 return nil
3899 }
3900
3901 // SharedLinkPolicy : Who can view shared links in this folder.
3902 type SharedLinkPolicy struct {
3903 dropbox.Tagged
3904 }
3905
3906 // Valid tag values for SharedLinkPolicy
3907 const (
3908 SharedLinkPolicyAnyone = "anyone"
3909 SharedLinkPolicyTeam = "team"
3910 SharedLinkPolicyMembers = "members"
3911 SharedLinkPolicyOther = "other"
3912 )
3913
3914 // SharedLinkSettings : has no documentation (yet)
3915 type SharedLinkSettings struct {
3916 // RequirePassword : Boolean flag to enable or disable password protection.
3917 RequirePassword bool `json:"require_password,omitempty"`
3918 // LinkPassword : If `require_password` is true, this is needed to specify
3919 // the password to access the link.
3920 LinkPassword string `json:"link_password,omitempty"`
3921 // Expires : Expiration time of the shared link. By default the link won't
3922 // expire.
3923 Expires *time.Time `json:"expires,omitempty"`
3924 // Audience : The new audience who can benefit from the access level
3925 // specified by the link's access level specified in the `link_access_level`
3926 // field of `LinkPermissions`. This is used in conjunction with team
3927 // policies and shared folder policies to determine the final effective
3928 // audience type in the `effective_audience` field of `LinkPermissions.
3929 Audience *LinkAudience `json:"audience,omitempty"`
3930 // Access : Requested access level you want the audience to gain from this
3931 // link. Note, modifying access level for an existing link is not supported.
3932 Access *RequestedLinkAccessLevel `json:"access,omitempty"`
3933 // RequestedVisibility : Use `audience` instead. The requested access for
3934 // this shared link.
3935 RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"`
3936 }
3937
3938 // NewSharedLinkSettings returns a new SharedLinkSettings instance
3939 func NewSharedLinkSettings() *SharedLinkSettings {
3940 s := new(SharedLinkSettings)
3941 return s
3942 }
3943
3944 // SharedLinkSettingsError : has no documentation (yet)
3945 type SharedLinkSettingsError struct {
3946 dropbox.Tagged
3947 }
3948
3949 // Valid tag values for SharedLinkSettingsError
3950 const (
3951 SharedLinkSettingsErrorInvalidSettings = "invalid_settings"
3952 SharedLinkSettingsErrorNotAuthorized = "not_authorized"
3953 )
3954
3955 // SharingFileAccessError : User could not access this file.
3956 type SharingFileAccessError struct {
3957 dropbox.Tagged
3958 }
3959
3960 // Valid tag values for SharingFileAccessError
3961 const (
3962 SharingFileAccessErrorNoPermission = "no_permission"
3963 SharingFileAccessErrorInvalidFile = "invalid_file"
3964 SharingFileAccessErrorIsFolder = "is_folder"
3965 SharingFileAccessErrorInsidePublicFolder = "inside_public_folder"
3966 SharingFileAccessErrorInsideOsxPackage = "inside_osx_package"
3967 SharingFileAccessErrorOther = "other"
3968 )
3969
3970 // SharingUserError : User account had a problem preventing this action.
3971 type SharingUserError struct {
3972 dropbox.Tagged
3973 }
3974
3975 // Valid tag values for SharingUserError
3976 const (
3977 SharingUserErrorEmailUnverified = "email_unverified"
3978 SharingUserErrorOther = "other"
3979 )
3980
3981 // TeamMemberInfo : Information about a team member.
3982 type TeamMemberInfo struct {
3983 // TeamInfo : Information about the member's team.
3984 TeamInfo *users.Team `json:"team_info"`
3985 // DisplayName : The display name of the user.
3986 DisplayName string `json:"display_name"`
3987 // MemberId : ID of user as a member of a team. This field will only be
3988 // present if the member is in the same team as current user.
3989 MemberId string `json:"member_id,omitempty"`
3990 }
3991
3992 // NewTeamMemberInfo returns a new TeamMemberInfo instance
3993 func NewTeamMemberInfo(TeamInfo *users.Team, DisplayName string) *TeamMemberInfo {
3994 s := new(TeamMemberInfo)
3995 s.TeamInfo = TeamInfo
3996 s.DisplayName = DisplayName
3997 return s
3998 }
3999
4000 // TransferFolderArg : has no documentation (yet)
4001 type TransferFolderArg struct {
4002 // SharedFolderId : The ID for the shared folder.
4003 SharedFolderId string `json:"shared_folder_id"`
4004 // ToDropboxId : A account or team member ID to transfer ownership to.
4005 ToDropboxId string `json:"to_dropbox_id"`
4006 }
4007
4008 // NewTransferFolderArg returns a new TransferFolderArg instance
4009 func NewTransferFolderArg(SharedFolderId string, ToDropboxId string) *TransferFolderArg {
4010 s := new(TransferFolderArg)
4011 s.SharedFolderId = SharedFolderId
4012 s.ToDropboxId = ToDropboxId
4013 return s
4014 }
4015
4016 // TransferFolderError : has no documentation (yet)
4017 type TransferFolderError struct {
4018 dropbox.Tagged
4019 // AccessError : has no documentation (yet)
4020 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4021 }
4022
4023 // Valid tag values for TransferFolderError
4024 const (
4025 TransferFolderErrorAccessError = "access_error"
4026 TransferFolderErrorInvalidDropboxId = "invalid_dropbox_id"
4027 TransferFolderErrorNewOwnerNotAMember = "new_owner_not_a_member"
4028 TransferFolderErrorNewOwnerUnmounted = "new_owner_unmounted"
4029 TransferFolderErrorNewOwnerEmailUnverified = "new_owner_email_unverified"
4030 TransferFolderErrorTeamFolder = "team_folder"
4031 TransferFolderErrorNoPermission = "no_permission"
4032 TransferFolderErrorOther = "other"
4033 )
4034
4035 // UnmarshalJSON deserializes into a TransferFolderError instance
4036 func (u *TransferFolderError) UnmarshalJSON(body []byte) error {
4037 type wrap struct {
4038 dropbox.Tagged
4039 // AccessError : has no documentation (yet)
4040 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4041 }
4042 var w wrap
4043 var err error
4044 if err = json.Unmarshal(body, &w); err != nil {
4045 return err
4046 }
4047 u.Tag = w.Tag
4048 switch u.Tag {
4049 case "access_error":
4050 u.AccessError = w.AccessError
4051
4052 if err != nil {
4053 return err
4054 }
4055 }
4056 return nil
4057 }
4058
4059 // UnmountFolderArg : has no documentation (yet)
4060 type UnmountFolderArg struct {
4061 // SharedFolderId : The ID for the shared folder.
4062 SharedFolderId string `json:"shared_folder_id"`
4063 }
4064
4065 // NewUnmountFolderArg returns a new UnmountFolderArg instance
4066 func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg {
4067 s := new(UnmountFolderArg)
4068 s.SharedFolderId = SharedFolderId
4069 return s
4070 }
4071
4072 // UnmountFolderError : has no documentation (yet)
4073 type UnmountFolderError struct {
4074 dropbox.Tagged
4075 // AccessError : has no documentation (yet)
4076 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4077 }
4078
4079 // Valid tag values for UnmountFolderError
4080 const (
4081 UnmountFolderErrorAccessError = "access_error"
4082 UnmountFolderErrorNoPermission = "no_permission"
4083 UnmountFolderErrorNotUnmountable = "not_unmountable"
4084 UnmountFolderErrorOther = "other"
4085 )
4086
4087 // UnmarshalJSON deserializes into a UnmountFolderError instance
4088 func (u *UnmountFolderError) UnmarshalJSON(body []byte) error {
4089 type wrap struct {
4090 dropbox.Tagged
4091 // AccessError : has no documentation (yet)
4092 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4093 }
4094 var w wrap
4095 var err error
4096 if err = json.Unmarshal(body, &w); err != nil {
4097 return err
4098 }
4099 u.Tag = w.Tag
4100 switch u.Tag {
4101 case "access_error":
4102 u.AccessError = w.AccessError
4103
4104 if err != nil {
4105 return err
4106 }
4107 }
4108 return nil
4109 }
4110
4111 // UnshareFileArg : Arguments for `unshareFile`.
4112 type UnshareFileArg struct {
4113 // File : The file to unshare.
4114 File string `json:"file"`
4115 }
4116
4117 // NewUnshareFileArg returns a new UnshareFileArg instance
4118 func NewUnshareFileArg(File string) *UnshareFileArg {
4119 s := new(UnshareFileArg)
4120 s.File = File
4121 return s
4122 }
4123
4124 // UnshareFileError : Error result for `unshareFile`.
4125 type UnshareFileError struct {
4126 dropbox.Tagged
4127 // UserError : has no documentation (yet)
4128 UserError *SharingUserError `json:"user_error,omitempty"`
4129 // AccessError : has no documentation (yet)
4130 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
4131 }
4132
4133 // Valid tag values for UnshareFileError
4134 const (
4135 UnshareFileErrorUserError = "user_error"
4136 UnshareFileErrorAccessError = "access_error"
4137 UnshareFileErrorOther = "other"
4138 )
4139
4140 // UnmarshalJSON deserializes into a UnshareFileError instance
4141 func (u *UnshareFileError) UnmarshalJSON(body []byte) error {
4142 type wrap struct {
4143 dropbox.Tagged
4144 // UserError : has no documentation (yet)
4145 UserError *SharingUserError `json:"user_error,omitempty"`
4146 // AccessError : has no documentation (yet)
4147 AccessError *SharingFileAccessError `json:"access_error,omitempty"`
4148 }
4149 var w wrap
4150 var err error
4151 if err = json.Unmarshal(body, &w); err != nil {
4152 return err
4153 }
4154 u.Tag = w.Tag
4155 switch u.Tag {
4156 case "user_error":
4157 u.UserError = w.UserError
4158
4159 if err != nil {
4160 return err
4161 }
4162 case "access_error":
4163 u.AccessError = w.AccessError
4164
4165 if err != nil {
4166 return err
4167 }
4168 }
4169 return nil
4170 }
4171
4172 // UnshareFolderArg : has no documentation (yet)
4173 type UnshareFolderArg struct {
4174 // SharedFolderId : The ID for the shared folder.
4175 SharedFolderId string `json:"shared_folder_id"`
4176 // LeaveACopy : If true, members of this shared folder will get a copy of
4177 // this folder after it's unshared. Otherwise, it will be removed from their
4178 // Dropbox. The current user, who is an owner, will always retain their
4179 // copy.
4180 LeaveACopy bool `json:"leave_a_copy"`
4181 }
4182
4183 // NewUnshareFolderArg returns a new UnshareFolderArg instance
4184 func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg {
4185 s := new(UnshareFolderArg)
4186 s.SharedFolderId = SharedFolderId
4187 s.LeaveACopy = false
4188 return s
4189 }
4190
4191 // UnshareFolderError : has no documentation (yet)
4192 type UnshareFolderError struct {
4193 dropbox.Tagged
4194 // AccessError : has no documentation (yet)
4195 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4196 }
4197
4198 // Valid tag values for UnshareFolderError
4199 const (
4200 UnshareFolderErrorAccessError = "access_error"
4201 UnshareFolderErrorTeamFolder = "team_folder"
4202 UnshareFolderErrorNoPermission = "no_permission"
4203 UnshareFolderErrorTooManyFiles = "too_many_files"
4204 UnshareFolderErrorOther = "other"
4205 )
4206
4207 // UnmarshalJSON deserializes into a UnshareFolderError instance
4208 func (u *UnshareFolderError) UnmarshalJSON(body []byte) error {
4209 type wrap struct {
4210 dropbox.Tagged
4211 // AccessError : has no documentation (yet)
4212 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4213 }
4214 var w wrap
4215 var err error
4216 if err = json.Unmarshal(body, &w); err != nil {
4217 return err
4218 }
4219 u.Tag = w.Tag
4220 switch u.Tag {
4221 case "access_error":
4222 u.AccessError = w.AccessError
4223
4224 if err != nil {
4225 return err
4226 }
4227 }
4228 return nil
4229 }
4230
4231 // UpdateFileMemberArgs : Arguments for `updateFileMember`.
4232 type UpdateFileMemberArgs struct {
4233 ChangeFileMemberAccessArgs
4234 }
4235
4236 // NewUpdateFileMemberArgs returns a new UpdateFileMemberArgs instance
4237 func NewUpdateFileMemberArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFileMemberArgs {
4238 s := new(UpdateFileMemberArgs)
4239 s.File = File
4240 s.Member = Member
4241 s.AccessLevel = AccessLevel
4242 return s
4243 }
4244
4245 // UpdateFolderMemberArg : has no documentation (yet)
4246 type UpdateFolderMemberArg struct {
4247 // SharedFolderId : The ID for the shared folder.
4248 SharedFolderId string `json:"shared_folder_id"`
4249 // Member : The member of the shared folder to update. Only the
4250 // `MemberSelector.dropbox_id` may be set at this time.
4251 Member *MemberSelector `json:"member"`
4252 // AccessLevel : The new access level for `member`. `AccessLevel.owner` is
4253 // disallowed.
4254 AccessLevel *AccessLevel `json:"access_level"`
4255 }
4256
4257 // NewUpdateFolderMemberArg returns a new UpdateFolderMemberArg instance
4258 func NewUpdateFolderMemberArg(SharedFolderId string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFolderMemberArg {
4259 s := new(UpdateFolderMemberArg)
4260 s.SharedFolderId = SharedFolderId
4261 s.Member = Member
4262 s.AccessLevel = AccessLevel
4263 return s
4264 }
4265
4266 // UpdateFolderMemberError : has no documentation (yet)
4267 type UpdateFolderMemberError struct {
4268 dropbox.Tagged
4269 // AccessError : has no documentation (yet)
4270 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4271 // MemberError : has no documentation (yet)
4272 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
4273 // NoExplicitAccess : If updating the access type required the member to be
4274 // added to the shared folder and there was an error when adding the member.
4275 NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"`
4276 }
4277
4278 // Valid tag values for UpdateFolderMemberError
4279 const (
4280 UpdateFolderMemberErrorAccessError = "access_error"
4281 UpdateFolderMemberErrorMemberError = "member_error"
4282 UpdateFolderMemberErrorNoExplicitAccess = "no_explicit_access"
4283 UpdateFolderMemberErrorInsufficientPlan = "insufficient_plan"
4284 UpdateFolderMemberErrorNoPermission = "no_permission"
4285 UpdateFolderMemberErrorOther = "other"
4286 )
4287
4288 // UnmarshalJSON deserializes into a UpdateFolderMemberError instance
4289 func (u *UpdateFolderMemberError) UnmarshalJSON(body []byte) error {
4290 type wrap struct {
4291 dropbox.Tagged
4292 // AccessError : has no documentation (yet)
4293 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4294 // MemberError : has no documentation (yet)
4295 MemberError *SharedFolderMemberError `json:"member_error,omitempty"`
4296 // NoExplicitAccess : If updating the access type required the member to
4297 // be added to the shared folder and there was an error when adding the
4298 // member.
4299 NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"`
4300 }
4301 var w wrap
4302 var err error
4303 if err = json.Unmarshal(body, &w); err != nil {
4304 return err
4305 }
4306 u.Tag = w.Tag
4307 switch u.Tag {
4308 case "access_error":
4309 u.AccessError = w.AccessError
4310
4311 if err != nil {
4312 return err
4313 }
4314 case "member_error":
4315 u.MemberError = w.MemberError
4316
4317 if err != nil {
4318 return err
4319 }
4320 case "no_explicit_access":
4321 u.NoExplicitAccess = w.NoExplicitAccess
4322
4323 if err != nil {
4324 return err
4325 }
4326 }
4327 return nil
4328 }
4329
4330 // UpdateFolderPolicyArg : If any of the policies are unset, then they retain
4331 // their current setting.
4332 type UpdateFolderPolicyArg struct {
4333 // SharedFolderId : The ID for the shared folder.
4334 SharedFolderId string `json:"shared_folder_id"`
4335 // MemberPolicy : Who can be a member of this shared folder. Only applicable
4336 // if the current user is on a team.
4337 MemberPolicy *MemberPolicy `json:"member_policy,omitempty"`
4338 // AclUpdatePolicy : Who can add and remove members of this shared folder.
4339 AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"`
4340 // ViewerInfoPolicy : Who can enable/disable viewer info for this shared
4341 // folder.
4342 ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"`
4343 // SharedLinkPolicy : The policy to apply to shared links created for
4344 // content inside this shared folder. The current user must be on a team to
4345 // set this policy to `SharedLinkPolicy.members`.
4346 SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"`
4347 // LinkSettings : Settings on the link for this folder.
4348 LinkSettings *LinkSettings `json:"link_settings,omitempty"`
4349 // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s
4350 // that should appear in the response's `SharedFolderMetadata.permissions`
4351 // field describing the actions the authenticated user can perform on the
4352 // folder.
4353 Actions []*FolderAction `json:"actions,omitempty"`
4354 }
4355
4356 // NewUpdateFolderPolicyArg returns a new UpdateFolderPolicyArg instance
4357 func NewUpdateFolderPolicyArg(SharedFolderId string) *UpdateFolderPolicyArg {
4358 s := new(UpdateFolderPolicyArg)
4359 s.SharedFolderId = SharedFolderId
4360 return s
4361 }
4362
4363 // UpdateFolderPolicyError : has no documentation (yet)
4364 type UpdateFolderPolicyError struct {
4365 dropbox.Tagged
4366 // AccessError : has no documentation (yet)
4367 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4368 }
4369
4370 // Valid tag values for UpdateFolderPolicyError
4371 const (
4372 UpdateFolderPolicyErrorAccessError = "access_error"
4373 UpdateFolderPolicyErrorNotOnTeam = "not_on_team"
4374 UpdateFolderPolicyErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy"
4375 UpdateFolderPolicyErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy"
4376 UpdateFolderPolicyErrorNoPermission = "no_permission"
4377 UpdateFolderPolicyErrorTeamFolder = "team_folder"
4378 UpdateFolderPolicyErrorOther = "other"
4379 )
4380
4381 // UnmarshalJSON deserializes into a UpdateFolderPolicyError instance
4382 func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error {
4383 type wrap struct {
4384 dropbox.Tagged
4385 // AccessError : has no documentation (yet)
4386 AccessError *SharedFolderAccessError `json:"access_error,omitempty"`
4387 }
4388 var w wrap
4389 var err error
4390 if err = json.Unmarshal(body, &w); err != nil {
4391 return err
4392 }
4393 u.Tag = w.Tag
4394 switch u.Tag {
4395 case "access_error":
4396 u.AccessError = w.AccessError
4397
4398 if err != nil {
4399 return err
4400 }
4401 }
4402 return nil
4403 }
4404
4405 // UserMembershipInfo : The information about a user member of the shared
4406 // content.
4407 type UserMembershipInfo struct {
4408 MembershipInfo
4409 // User : The account information for the membership user.
4410 User *UserInfo `json:"user"`
4411 }
4412
4413 // NewUserMembershipInfo returns a new UserMembershipInfo instance
4414 func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo {
4415 s := new(UserMembershipInfo)
4416 s.AccessType = AccessType
4417 s.User = User
4418 s.IsInherited = false
4419 return s
4420 }
4421
4422 // UserFileMembershipInfo : The information about a user member of the shared
4423 // content with an appended last seen timestamp.
4424 type UserFileMembershipInfo struct {
4425 UserMembershipInfo
4426 // TimeLastSeen : The UTC timestamp of when the user has last seen the
4427 // content, if they have.
4428 TimeLastSeen *time.Time `json:"time_last_seen,omitempty"`
4429 // PlatformType : The platform on which the user has last seen the content,
4430 // or unknown.
4431 PlatformType *seen_state.PlatformType `json:"platform_type,omitempty"`
4432 }
4433
4434 // NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance
4435 func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo {
4436 s := new(UserFileMembershipInfo)
4437 s.AccessType = AccessType
4438 s.User = User
4439 s.IsInherited = false
4440 return s
4441 }
4442
4443 // UserInfo : Basic information about a user. Use `usersAccount` and
4444 // `usersAccountBatch` to obtain more detailed information.
4445 type UserInfo struct {
4446 // AccountId : The account ID of the user.
4447 AccountId string `json:"account_id"`
4448 // Email : Email address of user.
4449 Email string `json:"email"`
4450 // DisplayName : The display name of the user.
4451 DisplayName string `json:"display_name"`
4452 // SameTeam : If the user is in the same team as current user.
4453 SameTeam bool `json:"same_team"`
4454 // TeamMemberId : The team member ID of the shared folder member. Only
4455 // present if `same_team` is true.
4456 TeamMemberId string `json:"team_member_id,omitempty"`
4457 }
4458
4459 // NewUserInfo returns a new UserInfo instance
4460 func NewUserInfo(AccountId string, Email string, DisplayName string, SameTeam bool) *UserInfo {
4461 s := new(UserInfo)
4462 s.AccountId = AccountId
4463 s.Email = Email
4464 s.DisplayName = DisplayName
4465 s.SameTeam = SameTeam
4466 return s
4467 }
4468
4469 // ViewerInfoPolicy : has no documentation (yet)
4470 type ViewerInfoPolicy struct {
4471 dropbox.Tagged
4472 }
4473
4474 // Valid tag values for ViewerInfoPolicy
4475 const (
4476 ViewerInfoPolicyEnabled = "enabled"
4477 ViewerInfoPolicyDisabled = "disabled"
4478 ViewerInfoPolicyOther = "other"
4479 )
4480
4481 // Visibility : Who can access a shared link. The most open visibility is
4482 // `public`. The default depends on many aspects, such as team and user
4483 // preferences and shared folder settings.
4484 type Visibility struct {
4485 dropbox.Tagged
4486 }
4487
4488 // Valid tag values for Visibility
4489 const (
4490 VisibilityPublic = "public"
4491 VisibilityTeamOnly = "team_only"
4492 VisibilityPassword = "password"
4493 VisibilityTeamAndPassword = "team_and_password"
4494 VisibilitySharedFolderOnly = "shared_folder_only"
4495 VisibilityOther = "other"
4496 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package team
21
22 import (
23 "encoding/json"
24 "io"
25 "log"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/file_properties"
31 )
32
33 // Client interface describes all routes in this namespace
34 type Client interface {
35 // DevicesListMemberDevices : List all device sessions of a team's member.
36 DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error)
37 // DevicesListMembersDevices : List all device sessions of a team.
38 // Permission : Team member file access.
39 DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error)
40 // DevicesListTeamDevices : List all device sessions of a team. Permission :
41 // Team member file access.
42 // Deprecated: Use `DevicesListMembersDevices` instead
43 DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error)
44 // DevicesRevokeDeviceSession : Revoke a device session of a team's member.
45 DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error)
46 // DevicesRevokeDeviceSessionBatch : Revoke a list of device sessions of
47 // team members.
48 DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error)
49 // FeaturesGetValues : Get the values for one or more featues. This route
50 // allows you to check your account's capability for what feature you can
51 // access or what value you have for certain features. Permission : Team
52 // information.
53 FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error)
54 // GetInfo : Retrieves information about a team.
55 GetInfo() (res *TeamGetInfoResult, err error)
56 // GroupsCreate : Creates a new, empty group, with a requested name.
57 // Permission : Team member management.
58 GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error)
59 // GroupsDelete : Deletes a group. The group is deleted immediately. However
60 // the revoking of group-owned resources may take additional time. Use the
61 // `groupsJobStatusGet` to determine whether this process has completed.
62 // Permission : Team member management.
63 GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error)
64 // GroupsGetInfo : Retrieves information about one or more groups. Note that
65 // the optional field `GroupFullInfo.members` is not returned for
66 // system-managed groups. Permission : Team Information.
67 GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error)
68 // GroupsJobStatusGet : Once an async_job_id is returned from
69 // `groupsDelete`, `groupsMembersAdd` , or `groupsMembersRemove` use this
70 // method to poll the status of granting/revoking group members' access to
71 // group-owned resources. Permission : Team member management.
72 GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error)
73 // GroupsList : Lists groups on a team. Permission : Team Information.
74 GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error)
75 // GroupsListContinue : Once a cursor has been retrieved from `groupsList`,
76 // use this to paginate through all groups. Permission : Team Information.
77 GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error)
78 // GroupsMembersAdd : Adds members to a group. The members are added
79 // immediately. However the granting of group-owned resources may take
80 // additional time. Use the `groupsJobStatusGet` to determine whether this
81 // process has completed. Permission : Team member management.
82 GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error)
83 // GroupsMembersList : Lists members of a group. Permission : Team
84 // Information.
85 GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error)
86 // GroupsMembersListContinue : Once a cursor has been retrieved from
87 // `groupsMembersList`, use this to paginate through all members of the
88 // group. Permission : Team information.
89 GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error)
90 // GroupsMembersRemove : Removes members from a group. The members are
91 // removed immediately. However the revoking of group-owned resources may
92 // take additional time. Use the `groupsJobStatusGet` to determine whether
93 // this process has completed. This method permits removing the only owner
94 // of a group, even in cases where this is not possible via the web client.
95 // Permission : Team member management.
96 GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error)
97 // GroupsMembersSetAccessType : Sets a member's access type in a group.
98 // Permission : Team member management.
99 GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error)
100 // GroupsUpdate : Updates a group's name and/or external ID. Permission :
101 // Team member management.
102 GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error)
103 // LegalHoldsCreatePolicy : Creates new legal hold policy. Note: Legal Holds
104 // is a paid add-on. Not all teams have the feature. Permission : Team
105 // member file access.
106 LegalHoldsCreatePolicy(arg *LegalHoldsPolicyCreateArg) (res *LegalHoldPolicy, err error)
107 // LegalHoldsGetPolicy : Gets a legal hold by Id. Note: Legal Holds is a
108 // paid add-on. Not all teams have the feature. Permission : Team member
109 // file access.
110 LegalHoldsGetPolicy(arg *LegalHoldsGetPolicyArg) (res *LegalHoldPolicy, err error)
111 // LegalHoldsListHeldRevisions : List the file metadata that's under the
112 // hold. Note: Legal Holds is a paid add-on. Not all teams have the feature.
113 // Permission : Team member file access.
114 LegalHoldsListHeldRevisions(arg *LegalHoldsListHeldRevisionsArg) (res *LegalHoldsListHeldRevisionResult, err error)
115 // LegalHoldsListHeldRevisionsContinue : Continue listing the file metadata
116 // that's under the hold. Note: Legal Holds is a paid add-on. Not all teams
117 // have the feature. Permission : Team member file access.
118 LegalHoldsListHeldRevisionsContinue(arg *LegalHoldsListHeldRevisionsContinueArg) (res *LegalHoldsListHeldRevisionResult, err error)
119 // LegalHoldsListPolicies : Lists legal holds on a team. Note: Legal Holds
120 // is a paid add-on. Not all teams have the feature. Permission : Team
121 // member file access.
122 LegalHoldsListPolicies(arg *LegalHoldsListPoliciesArg) (res *LegalHoldsListPoliciesResult, err error)
123 // LegalHoldsReleasePolicy : Releases a legal hold by Id. Note: Legal Holds
124 // is a paid add-on. Not all teams have the feature. Permission : Team
125 // member file access.
126 LegalHoldsReleasePolicy(arg *LegalHoldsPolicyReleaseArg) (err error)
127 // LegalHoldsUpdatePolicy : Updates a legal hold. Note: Legal Holds is a
128 // paid add-on. Not all teams have the feature. Permission : Team member
129 // file access.
130 LegalHoldsUpdatePolicy(arg *LegalHoldsPolicyUpdateArg) (res *LegalHoldPolicy, err error)
131 // LinkedAppsListMemberLinkedApps : List all linked applications of the team
132 // member. Note, this endpoint does not list any team-linked applications.
133 LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error)
134 // LinkedAppsListMembersLinkedApps : List all applications linked to the
135 // team members' accounts. Note, this endpoint does not list any team-linked
136 // applications.
137 LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error)
138 // LinkedAppsListTeamLinkedApps : List all applications linked to the team
139 // members' accounts. Note, this endpoint doesn't list any team-linked
140 // applications.
141 // Deprecated: Use `LinkedAppsListMembersLinkedApps` instead
142 LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error)
143 // LinkedAppsRevokeLinkedApp : Revoke a linked application of the team
144 // member.
145 LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error)
146 // LinkedAppsRevokeLinkedAppBatch : Revoke a list of linked applications of
147 // the team members.
148 LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error)
149 // MemberSpaceLimitsExcludedUsersAdd : Add users to member space limits
150 // excluded users list.
151 MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
152 // MemberSpaceLimitsExcludedUsersList : List member space limits excluded
153 // users.
154 MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error)
155 // MemberSpaceLimitsExcludedUsersListContinue : Continue listing member
156 // space limits excluded users.
157 MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error)
158 // MemberSpaceLimitsExcludedUsersRemove : Remove users from member space
159 // limits excluded users list.
160 MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error)
161 // MemberSpaceLimitsGetCustomQuota : Get users custom quota. Returns none as
162 // the custom quota if none was set. A maximum of 1000 members can be
163 // specified in a single call.
164 MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error)
165 // MemberSpaceLimitsRemoveCustomQuota : Remove users custom quota. A maximum
166 // of 1000 members can be specified in a single call.
167 MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error)
168 // MemberSpaceLimitsSetCustomQuota : Set users custom quota. Custom quota
169 // has to be at least 15GB. A maximum of 1000 members can be specified in a
170 // single call.
171 MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error)
172 // MembersAdd : Adds members to a team. Permission : Team member management
173 // A maximum of 20 members can be specified in a single call. If no Dropbox
174 // account exists with the email address specified, a new Dropbox account
175 // will be created with the given email address, and that account will be
176 // invited to the team. If a personal Dropbox account exists with the email
177 // address specified in the call, this call will create a placeholder
178 // Dropbox account for the user on the team and send an email inviting the
179 // user to migrate their existing personal account onto the team. Team
180 // member management apps are required to set an initial given_name and
181 // surname for a user to use in the team invitation and for 'Perform as team
182 // member' actions taken on the user before they become 'active'.
183 MembersAddV2(arg *MembersAddV2Arg) (res *MembersAddLaunchV2Result, err error)
184 // MembersAdd : Adds members to a team. Permission : Team member management
185 // A maximum of 20 members can be specified in a single call. If no Dropbox
186 // account exists with the email address specified, a new Dropbox account
187 // will be created with the given email address, and that account will be
188 // invited to the team. If a personal Dropbox account exists with the email
189 // address specified in the call, this call will create a placeholder
190 // Dropbox account for the user on the team and send an email inviting the
191 // user to migrate their existing personal account onto the team. Team
192 // member management apps are required to set an initial given_name and
193 // surname for a user to use in the team invitation and for 'Perform as team
194 // member' actions taken on the user before they become 'active'.
195 MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error)
196 // MembersAddJobStatusGet : Once an async_job_id is returned from
197 // `membersAdd` , use this to poll the status of the asynchronous request.
198 // Permission : Team member management.
199 MembersAddJobStatusGetV2(arg *async.PollArg) (res *MembersAddJobStatusV2Result, err error)
200 // MembersAddJobStatusGet : Once an async_job_id is returned from
201 // `membersAdd` , use this to poll the status of the asynchronous request.
202 // Permission : Team member management.
203 MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error)
204 // MembersDeleteProfilePhoto : Deletes a team member's profile photo.
205 // Permission : Team member management.
206 MembersDeleteProfilePhotoV2(arg *MembersDeleteProfilePhotoArg) (res *TeamMemberInfoV2Result, err error)
207 // MembersDeleteProfilePhoto : Deletes a team member's profile photo.
208 // Permission : Team member management.
209 MembersDeleteProfilePhoto(arg *MembersDeleteProfilePhotoArg) (res *TeamMemberInfo, err error)
210 // MembersGetAvailableTeamMemberRoles : Get available TeamMemberRoles for
211 // the connected team. To be used with `membersSetAdminPermissions`.
212 // Permission : Team member management.
213 MembersGetAvailableTeamMemberRoles() (res *MembersGetAvailableTeamMemberRolesResult, err error)
214 // MembersGetInfo : Returns information about multiple team members.
215 // Permission : Team information This endpoint will return
216 // `MembersGetInfoItem.id_not_found`, for IDs (or emails) that cannot be
217 // matched to a valid team member.
218 MembersGetInfoV2(arg *MembersGetInfoV2Arg) (res *MembersGetInfoV2Result, err error)
219 // MembersGetInfo : Returns information about multiple team members.
220 // Permission : Team information This endpoint will return
221 // `MembersGetInfoItem.id_not_found`, for IDs (or emails) that cannot be
222 // matched to a valid team member.
223 MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error)
224 // MembersList : Lists members of a team. Permission : Team information.
225 MembersListV2(arg *MembersListArg) (res *MembersListV2Result, err error)
226 // MembersList : Lists members of a team. Permission : Team information.
227 MembersList(arg *MembersListArg) (res *MembersListResult, err error)
228 // MembersListContinue : Once a cursor has been retrieved from
229 // `membersList`, use this to paginate through all team members. Permission
230 // : Team information.
231 MembersListContinueV2(arg *MembersListContinueArg) (res *MembersListV2Result, err error)
232 // MembersListContinue : Once a cursor has been retrieved from
233 // `membersList`, use this to paginate through all team members. Permission
234 // : Team information.
235 MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error)
236 // MembersMoveFormerMemberFiles : Moves removed member's files to a
237 // different member. This endpoint initiates an asynchronous job. To obtain
238 // the final result of the job, the client should periodically poll
239 // `membersMoveFormerMemberFilesJobStatusCheck`. Permission : Team member
240 // management.
241 MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error)
242 // MembersMoveFormerMemberFilesJobStatusCheck : Once an async_job_id is
243 // returned from `membersMoveFormerMemberFiles` , use this to poll the
244 // status of the asynchronous request. Permission : Team member management.
245 MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error)
246 // MembersRecover : Recover a deleted member. Permission : Team member
247 // management Exactly one of team_member_id, email, or external_id must be
248 // provided to identify the user account.
249 MembersRecover(arg *MembersRecoverArg) (err error)
250 // MembersRemove : Removes a member from a team. Permission : Team member
251 // management Exactly one of team_member_id, email, or external_id must be
252 // provided to identify the user account. Accounts can be recovered via
253 // `membersRecover` for a 7 day period or until the account has been
254 // permanently deleted or transferred to another account (whichever comes
255 // first). Calling `membersAdd` while a user is still recoverable on your
256 // team will return with `MemberAddResult.user_already_on_team`. Accounts
257 // can have their files transferred via the admin console for a limited
258 // time, based on the version history length associated with the team (180
259 // days for most teams). This endpoint may initiate an asynchronous job. To
260 // obtain the final result of the job, the client should periodically poll
261 // `membersRemoveJobStatusGet`.
262 MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error)
263 // MembersRemoveJobStatusGet : Once an async_job_id is returned from
264 // `membersRemove` , use this to poll the status of the asynchronous
265 // request. Permission : Team member management.
266 MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error)
267 // MembersSecondaryEmailsAdd : Add secondary emails to users. Permission :
268 // Team member management. Emails that are on verified domains will be
269 // verified automatically. For each email address not on a verified domain a
270 // verification email will be sent.
271 MembersSecondaryEmailsAdd(arg *AddSecondaryEmailsArg) (res *AddSecondaryEmailsResult, err error)
272 // MembersSecondaryEmailsDelete : Delete secondary emails from users
273 // Permission : Team member management. Users will be notified of deletions
274 // of verified secondary emails at both the secondary email and their
275 // primary email.
276 MembersSecondaryEmailsDelete(arg *DeleteSecondaryEmailsArg) (res *DeleteSecondaryEmailsResult, err error)
277 // MembersSecondaryEmailsResendVerificationEmails : Resend secondary email
278 // verification emails. Permission : Team member management.
279 MembersSecondaryEmailsResendVerificationEmails(arg *ResendVerificationEmailArg) (res *ResendVerificationEmailResult, err error)
280 // MembersSendWelcomeEmail : Sends welcome email to pending team member.
281 // Permission : Team member management Exactly one of team_member_id, email,
282 // or external_id must be provided to identify the user account. No-op if
283 // team member is not pending.
284 MembersSendWelcomeEmail(arg *UserSelectorArg) (err error)
285 // MembersSetAdminPermissions : Updates a team member's permissions.
286 // Permission : Team member management.
287 MembersSetAdminPermissionsV2(arg *MembersSetPermissions2Arg) (res *MembersSetPermissions2Result, err error)
288 // MembersSetAdminPermissions : Updates a team member's permissions.
289 // Permission : Team member management.
290 MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error)
291 // MembersSetProfile : Updates a team member's profile. Permission : Team
292 // member management.
293 MembersSetProfileV2(arg *MembersSetProfileArg) (res *TeamMemberInfoV2Result, err error)
294 // MembersSetProfile : Updates a team member's profile. Permission : Team
295 // member management.
296 MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error)
297 // MembersSetProfilePhoto : Updates a team member's profile photo.
298 // Permission : Team member management.
299 MembersSetProfilePhotoV2(arg *MembersSetProfilePhotoArg) (res *TeamMemberInfoV2Result, err error)
300 // MembersSetProfilePhoto : Updates a team member's profile photo.
301 // Permission : Team member management.
302 MembersSetProfilePhoto(arg *MembersSetProfilePhotoArg) (res *TeamMemberInfo, err error)
303 // MembersSuspend : Suspend a member from a team. Permission : Team member
304 // management Exactly one of team_member_id, email, or external_id must be
305 // provided to identify the user account.
306 MembersSuspend(arg *MembersDeactivateArg) (err error)
307 // MembersUnsuspend : Unsuspend a member from a team. Permission : Team
308 // member management Exactly one of team_member_id, email, or external_id
309 // must be provided to identify the user account.
310 MembersUnsuspend(arg *MembersUnsuspendArg) (err error)
311 // NamespacesList : Returns a list of all team-accessible namespaces. This
312 // list includes team folders, shared folders containing team members, team
313 // members' home namespaces, and team members' app folders. Home namespaces
314 // and app folders are always owned by this team or members of the team, but
315 // shared folders may be owned by other users or other teams. Duplicates may
316 // occur in the list.
317 NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error)
318 // NamespacesListContinue : Once a cursor has been retrieved from
319 // `namespacesList`, use this to paginate through all team-accessible
320 // namespaces. Duplicates may occur in the list.
321 NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error)
322 // PropertiesTemplateAdd : Permission : Team member file access.
323 // Deprecated:
324 PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error)
325 // PropertiesTemplateGet : Permission : Team member file access. The scope
326 // for the route is files.team_metadata.write.
327 // Deprecated:
328 PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error)
329 // PropertiesTemplateList : Permission : Team member file access. The scope
330 // for the route is files.team_metadata.write.
331 // Deprecated:
332 PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error)
333 // PropertiesTemplateUpdate : Permission : Team member file access.
334 // Deprecated:
335 PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error)
336 // ReportsGetActivity : Retrieves reporting data about a team's user
337 // activity. Deprecated: Will be removed on July 1st 2021.
338 // Deprecated:
339 ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error)
340 // ReportsGetDevices : Retrieves reporting data about a team's linked
341 // devices. Deprecated: Will be removed on July 1st 2021.
342 // Deprecated:
343 ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error)
344 // ReportsGetMembership : Retrieves reporting data about a team's
345 // membership. Deprecated: Will be removed on July 1st 2021.
346 // Deprecated:
347 ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error)
348 // ReportsGetStorage : Retrieves reporting data about a team's storage
349 // usage. Deprecated: Will be removed on July 1st 2021.
350 // Deprecated:
351 ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error)
352 // TeamFolderActivate : Sets an archived team folder's status to active.
353 // Permission : Team member file access.
354 TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error)
355 // TeamFolderArchive : Sets an active team folder's status to archived and
356 // removes all folder and file members. Permission : Team member file
357 // access.
358 TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error)
359 // TeamFolderArchiveCheck : Returns the status of an asynchronous job for
360 // archiving a team folder. Permission : Team member file access.
361 TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error)
362 // TeamFolderCreate : Creates a new, active, team folder with no members.
363 // Permission : Team member file access.
364 TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error)
365 // TeamFolderGetInfo : Retrieves metadata for team folders. Permission :
366 // Team member file access.
367 TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error)
368 // TeamFolderList : Lists all team folders. Permission : Team member file
369 // access.
370 TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error)
371 // TeamFolderListContinue : Once a cursor has been retrieved from
372 // `teamFolderList`, use this to paginate through all team folders.
373 // Permission : Team member file access.
374 TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error)
375 // TeamFolderPermanentlyDelete : Permanently deletes an archived team
376 // folder. Permission : Team member file access.
377 TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error)
378 // TeamFolderRename : Changes an active team folder's name. Permission :
379 // Team member file access.
380 TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error)
381 // TeamFolderUpdateSyncSettings : Updates the sync settings on a team folder
382 // or its contents. Use of this endpoint requires that the team has team
383 // selective sync enabled.
384 TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error)
385 // TokenGetAuthenticatedAdmin : Returns the member profile of the admin who
386 // generated the team access token used to make the call.
387 TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error)
388 }
389
390 type apiImpl dropbox.Context
391
392 //DevicesListMemberDevicesAPIError is an error-wrapper for the devices/list_member_devices route
393 type DevicesListMemberDevicesAPIError struct {
394 dropbox.APIError
395 EndpointError *ListMemberDevicesError `json:"error"`
396 }
397
398 func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error) {
399 req := dropbox.Request{
400 Host: "api",
401 Namespace: "team",
402 Route: "devices/list_member_devices",
403 Auth: "team",
404 Style: "rpc",
405 Arg: arg,
406 ExtraHeaders: nil,
407 }
408
409 var resp []byte
410 var respBody io.ReadCloser
411 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
412 if err != nil {
413 var appErr DevicesListMemberDevicesAPIError
414 err = auth.ParseError(err, &appErr)
415 if err == &appErr {
416 err = appErr
417 }
418 return
419 }
420
421 err = json.Unmarshal(resp, &res)
422 if err != nil {
423 return
424 }
425
426 _ = respBody
427 return
428 }
429
430 //DevicesListMembersDevicesAPIError is an error-wrapper for the devices/list_members_devices route
431 type DevicesListMembersDevicesAPIError struct {
432 dropbox.APIError
433 EndpointError *ListMembersDevicesError `json:"error"`
434 }
435
436 func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error) {
437 req := dropbox.Request{
438 Host: "api",
439 Namespace: "team",
440 Route: "devices/list_members_devices",
441 Auth: "team",
442 Style: "rpc",
443 Arg: arg,
444 ExtraHeaders: nil,
445 }
446
447 var resp []byte
448 var respBody io.ReadCloser
449 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
450 if err != nil {
451 var appErr DevicesListMembersDevicesAPIError
452 err = auth.ParseError(err, &appErr)
453 if err == &appErr {
454 err = appErr
455 }
456 return
457 }
458
459 err = json.Unmarshal(resp, &res)
460 if err != nil {
461 return
462 }
463
464 _ = respBody
465 return
466 }
467
468 //DevicesListTeamDevicesAPIError is an error-wrapper for the devices/list_team_devices route
469 type DevicesListTeamDevicesAPIError struct {
470 dropbox.APIError
471 EndpointError *ListTeamDevicesError `json:"error"`
472 }
473
474 func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error) {
475 log.Printf("WARNING: API `DevicesListTeamDevices` is deprecated")
476 log.Printf("Use API `DevicesListMembersDevices` instead")
477
478 req := dropbox.Request{
479 Host: "api",
480 Namespace: "team",
481 Route: "devices/list_team_devices",
482 Auth: "team",
483 Style: "rpc",
484 Arg: arg,
485 ExtraHeaders: nil,
486 }
487
488 var resp []byte
489 var respBody io.ReadCloser
490 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
491 if err != nil {
492 var appErr DevicesListTeamDevicesAPIError
493 err = auth.ParseError(err, &appErr)
494 if err == &appErr {
495 err = appErr
496 }
497 return
498 }
499
500 err = json.Unmarshal(resp, &res)
501 if err != nil {
502 return
503 }
504
505 _ = respBody
506 return
507 }
508
509 //DevicesRevokeDeviceSessionAPIError is an error-wrapper for the devices/revoke_device_session route
510 type DevicesRevokeDeviceSessionAPIError struct {
511 dropbox.APIError
512 EndpointError *RevokeDeviceSessionError `json:"error"`
513 }
514
515 func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error) {
516 req := dropbox.Request{
517 Host: "api",
518 Namespace: "team",
519 Route: "devices/revoke_device_session",
520 Auth: "team",
521 Style: "rpc",
522 Arg: arg,
523 ExtraHeaders: nil,
524 }
525
526 var resp []byte
527 var respBody io.ReadCloser
528 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
529 if err != nil {
530 var appErr DevicesRevokeDeviceSessionAPIError
531 err = auth.ParseError(err, &appErr)
532 if err == &appErr {
533 err = appErr
534 }
535 return
536 }
537
538 _ = resp
539 _ = respBody
540 return
541 }
542
543 //DevicesRevokeDeviceSessionBatchAPIError is an error-wrapper for the devices/revoke_device_session_batch route
544 type DevicesRevokeDeviceSessionBatchAPIError struct {
545 dropbox.APIError
546 EndpointError *RevokeDeviceSessionBatchError `json:"error"`
547 }
548
549 func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error) {
550 req := dropbox.Request{
551 Host: "api",
552 Namespace: "team",
553 Route: "devices/revoke_device_session_batch",
554 Auth: "team",
555 Style: "rpc",
556 Arg: arg,
557 ExtraHeaders: nil,
558 }
559
560 var resp []byte
561 var respBody io.ReadCloser
562 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
563 if err != nil {
564 var appErr DevicesRevokeDeviceSessionBatchAPIError
565 err = auth.ParseError(err, &appErr)
566 if err == &appErr {
567 err = appErr
568 }
569 return
570 }
571
572 err = json.Unmarshal(resp, &res)
573 if err != nil {
574 return
575 }
576
577 _ = respBody
578 return
579 }
580
581 //FeaturesGetValuesAPIError is an error-wrapper for the features/get_values route
582 type FeaturesGetValuesAPIError struct {
583 dropbox.APIError
584 EndpointError *FeaturesGetValuesBatchError `json:"error"`
585 }
586
587 func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error) {
588 req := dropbox.Request{
589 Host: "api",
590 Namespace: "team",
591 Route: "features/get_values",
592 Auth: "team",
593 Style: "rpc",
594 Arg: arg,
595 ExtraHeaders: nil,
596 }
597
598 var resp []byte
599 var respBody io.ReadCloser
600 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
601 if err != nil {
602 var appErr FeaturesGetValuesAPIError
603 err = auth.ParseError(err, &appErr)
604 if err == &appErr {
605 err = appErr
606 }
607 return
608 }
609
610 err = json.Unmarshal(resp, &res)
611 if err != nil {
612 return
613 }
614
615 _ = respBody
616 return
617 }
618
619 //GetInfoAPIError is an error-wrapper for the get_info route
620 type GetInfoAPIError struct {
621 dropbox.APIError
622 EndpointError struct{} `json:"error"`
623 }
624
625 func (dbx *apiImpl) GetInfo() (res *TeamGetInfoResult, err error) {
626 req := dropbox.Request{
627 Host: "api",
628 Namespace: "team",
629 Route: "get_info",
630 Auth: "team",
631 Style: "rpc",
632 Arg: nil,
633 ExtraHeaders: nil,
634 }
635
636 var resp []byte
637 var respBody io.ReadCloser
638 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
639 if err != nil {
640 var appErr GetInfoAPIError
641 err = auth.ParseError(err, &appErr)
642 if err == &appErr {
643 err = appErr
644 }
645 return
646 }
647
648 err = json.Unmarshal(resp, &res)
649 if err != nil {
650 return
651 }
652
653 _ = respBody
654 return
655 }
656
657 //GroupsCreateAPIError is an error-wrapper for the groups/create route
658 type GroupsCreateAPIError struct {
659 dropbox.APIError
660 EndpointError *GroupCreateError `json:"error"`
661 }
662
663 func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error) {
664 req := dropbox.Request{
665 Host: "api",
666 Namespace: "team",
667 Route: "groups/create",
668 Auth: "team",
669 Style: "rpc",
670 Arg: arg,
671 ExtraHeaders: nil,
672 }
673
674 var resp []byte
675 var respBody io.ReadCloser
676 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
677 if err != nil {
678 var appErr GroupsCreateAPIError
679 err = auth.ParseError(err, &appErr)
680 if err == &appErr {
681 err = appErr
682 }
683 return
684 }
685
686 err = json.Unmarshal(resp, &res)
687 if err != nil {
688 return
689 }
690
691 _ = respBody
692 return
693 }
694
695 //GroupsDeleteAPIError is an error-wrapper for the groups/delete route
696 type GroupsDeleteAPIError struct {
697 dropbox.APIError
698 EndpointError *GroupDeleteError `json:"error"`
699 }
700
701 func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error) {
702 req := dropbox.Request{
703 Host: "api",
704 Namespace: "team",
705 Route: "groups/delete",
706 Auth: "team",
707 Style: "rpc",
708 Arg: arg,
709 ExtraHeaders: nil,
710 }
711
712 var resp []byte
713 var respBody io.ReadCloser
714 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
715 if err != nil {
716 var appErr GroupsDeleteAPIError
717 err = auth.ParseError(err, &appErr)
718 if err == &appErr {
719 err = appErr
720 }
721 return
722 }
723
724 err = json.Unmarshal(resp, &res)
725 if err != nil {
726 return
727 }
728
729 _ = respBody
730 return
731 }
732
733 //GroupsGetInfoAPIError is an error-wrapper for the groups/get_info route
734 type GroupsGetInfoAPIError struct {
735 dropbox.APIError
736 EndpointError *GroupsGetInfoError `json:"error"`
737 }
738
739 func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error) {
740 req := dropbox.Request{
741 Host: "api",
742 Namespace: "team",
743 Route: "groups/get_info",
744 Auth: "team",
745 Style: "rpc",
746 Arg: arg,
747 ExtraHeaders: nil,
748 }
749
750 var resp []byte
751 var respBody io.ReadCloser
752 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
753 if err != nil {
754 var appErr GroupsGetInfoAPIError
755 err = auth.ParseError(err, &appErr)
756 if err == &appErr {
757 err = appErr
758 }
759 return
760 }
761
762 err = json.Unmarshal(resp, &res)
763 if err != nil {
764 return
765 }
766
767 _ = respBody
768 return
769 }
770
771 //GroupsJobStatusGetAPIError is an error-wrapper for the groups/job_status/get route
772 type GroupsJobStatusGetAPIError struct {
773 dropbox.APIError
774 EndpointError *GroupsPollError `json:"error"`
775 }
776
777 func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
778 req := dropbox.Request{
779 Host: "api",
780 Namespace: "team",
781 Route: "groups/job_status/get",
782 Auth: "team",
783 Style: "rpc",
784 Arg: arg,
785 ExtraHeaders: nil,
786 }
787
788 var resp []byte
789 var respBody io.ReadCloser
790 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
791 if err != nil {
792 var appErr GroupsJobStatusGetAPIError
793 err = auth.ParseError(err, &appErr)
794 if err == &appErr {
795 err = appErr
796 }
797 return
798 }
799
800 err = json.Unmarshal(resp, &res)
801 if err != nil {
802 return
803 }
804
805 _ = respBody
806 return
807 }
808
809 //GroupsListAPIError is an error-wrapper for the groups/list route
810 type GroupsListAPIError struct {
811 dropbox.APIError
812 EndpointError struct{} `json:"error"`
813 }
814
815 func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error) {
816 req := dropbox.Request{
817 Host: "api",
818 Namespace: "team",
819 Route: "groups/list",
820 Auth: "team",
821 Style: "rpc",
822 Arg: arg,
823 ExtraHeaders: nil,
824 }
825
826 var resp []byte
827 var respBody io.ReadCloser
828 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
829 if err != nil {
830 var appErr GroupsListAPIError
831 err = auth.ParseError(err, &appErr)
832 if err == &appErr {
833 err = appErr
834 }
835 return
836 }
837
838 err = json.Unmarshal(resp, &res)
839 if err != nil {
840 return
841 }
842
843 _ = respBody
844 return
845 }
846
847 //GroupsListContinueAPIError is an error-wrapper for the groups/list/continue route
848 type GroupsListContinueAPIError struct {
849 dropbox.APIError
850 EndpointError *GroupsListContinueError `json:"error"`
851 }
852
853 func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error) {
854 req := dropbox.Request{
855 Host: "api",
856 Namespace: "team",
857 Route: "groups/list/continue",
858 Auth: "team",
859 Style: "rpc",
860 Arg: arg,
861 ExtraHeaders: nil,
862 }
863
864 var resp []byte
865 var respBody io.ReadCloser
866 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
867 if err != nil {
868 var appErr GroupsListContinueAPIError
869 err = auth.ParseError(err, &appErr)
870 if err == &appErr {
871 err = appErr
872 }
873 return
874 }
875
876 err = json.Unmarshal(resp, &res)
877 if err != nil {
878 return
879 }
880
881 _ = respBody
882 return
883 }
884
885 //GroupsMembersAddAPIError is an error-wrapper for the groups/members/add route
886 type GroupsMembersAddAPIError struct {
887 dropbox.APIError
888 EndpointError *GroupMembersAddError `json:"error"`
889 }
890
891 func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error) {
892 req := dropbox.Request{
893 Host: "api",
894 Namespace: "team",
895 Route: "groups/members/add",
896 Auth: "team",
897 Style: "rpc",
898 Arg: arg,
899 ExtraHeaders: nil,
900 }
901
902 var resp []byte
903 var respBody io.ReadCloser
904 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
905 if err != nil {
906 var appErr GroupsMembersAddAPIError
907 err = auth.ParseError(err, &appErr)
908 if err == &appErr {
909 err = appErr
910 }
911 return
912 }
913
914 err = json.Unmarshal(resp, &res)
915 if err != nil {
916 return
917 }
918
919 _ = respBody
920 return
921 }
922
923 //GroupsMembersListAPIError is an error-wrapper for the groups/members/list route
924 type GroupsMembersListAPIError struct {
925 dropbox.APIError
926 EndpointError *GroupSelectorError `json:"error"`
927 }
928
929 func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error) {
930 req := dropbox.Request{
931 Host: "api",
932 Namespace: "team",
933 Route: "groups/members/list",
934 Auth: "team",
935 Style: "rpc",
936 Arg: arg,
937 ExtraHeaders: nil,
938 }
939
940 var resp []byte
941 var respBody io.ReadCloser
942 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
943 if err != nil {
944 var appErr GroupsMembersListAPIError
945 err = auth.ParseError(err, &appErr)
946 if err == &appErr {
947 err = appErr
948 }
949 return
950 }
951
952 err = json.Unmarshal(resp, &res)
953 if err != nil {
954 return
955 }
956
957 _ = respBody
958 return
959 }
960
961 //GroupsMembersListContinueAPIError is an error-wrapper for the groups/members/list/continue route
962 type GroupsMembersListContinueAPIError struct {
963 dropbox.APIError
964 EndpointError *GroupsMembersListContinueError `json:"error"`
965 }
966
967 func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error) {
968 req := dropbox.Request{
969 Host: "api",
970 Namespace: "team",
971 Route: "groups/members/list/continue",
972 Auth: "team",
973 Style: "rpc",
974 Arg: arg,
975 ExtraHeaders: nil,
976 }
977
978 var resp []byte
979 var respBody io.ReadCloser
980 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
981 if err != nil {
982 var appErr GroupsMembersListContinueAPIError
983 err = auth.ParseError(err, &appErr)
984 if err == &appErr {
985 err = appErr
986 }
987 return
988 }
989
990 err = json.Unmarshal(resp, &res)
991 if err != nil {
992 return
993 }
994
995 _ = respBody
996 return
997 }
998
999 //GroupsMembersRemoveAPIError is an error-wrapper for the groups/members/remove route
1000 type GroupsMembersRemoveAPIError struct {
1001 dropbox.APIError
1002 EndpointError *GroupMembersRemoveError `json:"error"`
1003 }
1004
1005 func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error) {
1006 req := dropbox.Request{
1007 Host: "api",
1008 Namespace: "team",
1009 Route: "groups/members/remove",
1010 Auth: "team",
1011 Style: "rpc",
1012 Arg: arg,
1013 ExtraHeaders: nil,
1014 }
1015
1016 var resp []byte
1017 var respBody io.ReadCloser
1018 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1019 if err != nil {
1020 var appErr GroupsMembersRemoveAPIError
1021 err = auth.ParseError(err, &appErr)
1022 if err == &appErr {
1023 err = appErr
1024 }
1025 return
1026 }
1027
1028 err = json.Unmarshal(resp, &res)
1029 if err != nil {
1030 return
1031 }
1032
1033 _ = respBody
1034 return
1035 }
1036
1037 //GroupsMembersSetAccessTypeAPIError is an error-wrapper for the groups/members/set_access_type route
1038 type GroupsMembersSetAccessTypeAPIError struct {
1039 dropbox.APIError
1040 EndpointError *GroupMemberSetAccessTypeError `json:"error"`
1041 }
1042
1043 func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error) {
1044 req := dropbox.Request{
1045 Host: "api",
1046 Namespace: "team",
1047 Route: "groups/members/set_access_type",
1048 Auth: "team",
1049 Style: "rpc",
1050 Arg: arg,
1051 ExtraHeaders: nil,
1052 }
1053
1054 var resp []byte
1055 var respBody io.ReadCloser
1056 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1057 if err != nil {
1058 var appErr GroupsMembersSetAccessTypeAPIError
1059 err = auth.ParseError(err, &appErr)
1060 if err == &appErr {
1061 err = appErr
1062 }
1063 return
1064 }
1065
1066 err = json.Unmarshal(resp, &res)
1067 if err != nil {
1068 return
1069 }
1070
1071 _ = respBody
1072 return
1073 }
1074
1075 //GroupsUpdateAPIError is an error-wrapper for the groups/update route
1076 type GroupsUpdateAPIError struct {
1077 dropbox.APIError
1078 EndpointError *GroupUpdateError `json:"error"`
1079 }
1080
1081 func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error) {
1082 req := dropbox.Request{
1083 Host: "api",
1084 Namespace: "team",
1085 Route: "groups/update",
1086 Auth: "team",
1087 Style: "rpc",
1088 Arg: arg,
1089 ExtraHeaders: nil,
1090 }
1091
1092 var resp []byte
1093 var respBody io.ReadCloser
1094 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1095 if err != nil {
1096 var appErr GroupsUpdateAPIError
1097 err = auth.ParseError(err, &appErr)
1098 if err == &appErr {
1099 err = appErr
1100 }
1101 return
1102 }
1103
1104 err = json.Unmarshal(resp, &res)
1105 if err != nil {
1106 return
1107 }
1108
1109 _ = respBody
1110 return
1111 }
1112
1113 //LegalHoldsCreatePolicyAPIError is an error-wrapper for the legal_holds/create_policy route
1114 type LegalHoldsCreatePolicyAPIError struct {
1115 dropbox.APIError
1116 EndpointError *LegalHoldsPolicyCreateError `json:"error"`
1117 }
1118
1119 func (dbx *apiImpl) LegalHoldsCreatePolicy(arg *LegalHoldsPolicyCreateArg) (res *LegalHoldPolicy, err error) {
1120 req := dropbox.Request{
1121 Host: "api",
1122 Namespace: "team",
1123 Route: "legal_holds/create_policy",
1124 Auth: "team",
1125 Style: "rpc",
1126 Arg: arg,
1127 ExtraHeaders: nil,
1128 }
1129
1130 var resp []byte
1131 var respBody io.ReadCloser
1132 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1133 if err != nil {
1134 var appErr LegalHoldsCreatePolicyAPIError
1135 err = auth.ParseError(err, &appErr)
1136 if err == &appErr {
1137 err = appErr
1138 }
1139 return
1140 }
1141
1142 err = json.Unmarshal(resp, &res)
1143 if err != nil {
1144 return
1145 }
1146
1147 _ = respBody
1148 return
1149 }
1150
1151 //LegalHoldsGetPolicyAPIError is an error-wrapper for the legal_holds/get_policy route
1152 type LegalHoldsGetPolicyAPIError struct {
1153 dropbox.APIError
1154 EndpointError *LegalHoldsGetPolicyError `json:"error"`
1155 }
1156
1157 func (dbx *apiImpl) LegalHoldsGetPolicy(arg *LegalHoldsGetPolicyArg) (res *LegalHoldPolicy, err error) {
1158 req := dropbox.Request{
1159 Host: "api",
1160 Namespace: "team",
1161 Route: "legal_holds/get_policy",
1162 Auth: "team",
1163 Style: "rpc",
1164 Arg: arg,
1165 ExtraHeaders: nil,
1166 }
1167
1168 var resp []byte
1169 var respBody io.ReadCloser
1170 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1171 if err != nil {
1172 var appErr LegalHoldsGetPolicyAPIError
1173 err = auth.ParseError(err, &appErr)
1174 if err == &appErr {
1175 err = appErr
1176 }
1177 return
1178 }
1179
1180 err = json.Unmarshal(resp, &res)
1181 if err != nil {
1182 return
1183 }
1184
1185 _ = respBody
1186 return
1187 }
1188
1189 //LegalHoldsListHeldRevisionsAPIError is an error-wrapper for the legal_holds/list_held_revisions route
1190 type LegalHoldsListHeldRevisionsAPIError struct {
1191 dropbox.APIError
1192 EndpointError *LegalHoldsListHeldRevisionsError `json:"error"`
1193 }
1194
1195 func (dbx *apiImpl) LegalHoldsListHeldRevisions(arg *LegalHoldsListHeldRevisionsArg) (res *LegalHoldsListHeldRevisionResult, err error) {
1196 req := dropbox.Request{
1197 Host: "api",
1198 Namespace: "team",
1199 Route: "legal_holds/list_held_revisions",
1200 Auth: "team",
1201 Style: "rpc",
1202 Arg: arg,
1203 ExtraHeaders: nil,
1204 }
1205
1206 var resp []byte
1207 var respBody io.ReadCloser
1208 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1209 if err != nil {
1210 var appErr LegalHoldsListHeldRevisionsAPIError
1211 err = auth.ParseError(err, &appErr)
1212 if err == &appErr {
1213 err = appErr
1214 }
1215 return
1216 }
1217
1218 err = json.Unmarshal(resp, &res)
1219 if err != nil {
1220 return
1221 }
1222
1223 _ = respBody
1224 return
1225 }
1226
1227 //LegalHoldsListHeldRevisionsContinueAPIError is an error-wrapper for the legal_holds/list_held_revisions_continue route
1228 type LegalHoldsListHeldRevisionsContinueAPIError struct {
1229 dropbox.APIError
1230 EndpointError *LegalHoldsListHeldRevisionsError `json:"error"`
1231 }
1232
1233 func (dbx *apiImpl) LegalHoldsListHeldRevisionsContinue(arg *LegalHoldsListHeldRevisionsContinueArg) (res *LegalHoldsListHeldRevisionResult, err error) {
1234 req := dropbox.Request{
1235 Host: "api",
1236 Namespace: "team",
1237 Route: "legal_holds/list_held_revisions_continue",
1238 Auth: "team",
1239 Style: "rpc",
1240 Arg: arg,
1241 ExtraHeaders: nil,
1242 }
1243
1244 var resp []byte
1245 var respBody io.ReadCloser
1246 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1247 if err != nil {
1248 var appErr LegalHoldsListHeldRevisionsContinueAPIError
1249 err = auth.ParseError(err, &appErr)
1250 if err == &appErr {
1251 err = appErr
1252 }
1253 return
1254 }
1255
1256 err = json.Unmarshal(resp, &res)
1257 if err != nil {
1258 return
1259 }
1260
1261 _ = respBody
1262 return
1263 }
1264
1265 //LegalHoldsListPoliciesAPIError is an error-wrapper for the legal_holds/list_policies route
1266 type LegalHoldsListPoliciesAPIError struct {
1267 dropbox.APIError
1268 EndpointError *LegalHoldsListPoliciesError `json:"error"`
1269 }
1270
1271 func (dbx *apiImpl) LegalHoldsListPolicies(arg *LegalHoldsListPoliciesArg) (res *LegalHoldsListPoliciesResult, err error) {
1272 req := dropbox.Request{
1273 Host: "api",
1274 Namespace: "team",
1275 Route: "legal_holds/list_policies",
1276 Auth: "team",
1277 Style: "rpc",
1278 Arg: arg,
1279 ExtraHeaders: nil,
1280 }
1281
1282 var resp []byte
1283 var respBody io.ReadCloser
1284 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1285 if err != nil {
1286 var appErr LegalHoldsListPoliciesAPIError
1287 err = auth.ParseError(err, &appErr)
1288 if err == &appErr {
1289 err = appErr
1290 }
1291 return
1292 }
1293
1294 err = json.Unmarshal(resp, &res)
1295 if err != nil {
1296 return
1297 }
1298
1299 _ = respBody
1300 return
1301 }
1302
1303 //LegalHoldsReleasePolicyAPIError is an error-wrapper for the legal_holds/release_policy route
1304 type LegalHoldsReleasePolicyAPIError struct {
1305 dropbox.APIError
1306 EndpointError *LegalHoldsPolicyReleaseError `json:"error"`
1307 }
1308
1309 func (dbx *apiImpl) LegalHoldsReleasePolicy(arg *LegalHoldsPolicyReleaseArg) (err error) {
1310 req := dropbox.Request{
1311 Host: "api",
1312 Namespace: "team",
1313 Route: "legal_holds/release_policy",
1314 Auth: "team",
1315 Style: "rpc",
1316 Arg: arg,
1317 ExtraHeaders: nil,
1318 }
1319
1320 var resp []byte
1321 var respBody io.ReadCloser
1322 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1323 if err != nil {
1324 var appErr LegalHoldsReleasePolicyAPIError
1325 err = auth.ParseError(err, &appErr)
1326 if err == &appErr {
1327 err = appErr
1328 }
1329 return
1330 }
1331
1332 _ = resp
1333 _ = respBody
1334 return
1335 }
1336
1337 //LegalHoldsUpdatePolicyAPIError is an error-wrapper for the legal_holds/update_policy route
1338 type LegalHoldsUpdatePolicyAPIError struct {
1339 dropbox.APIError
1340 EndpointError *LegalHoldsPolicyUpdateError `json:"error"`
1341 }
1342
1343 func (dbx *apiImpl) LegalHoldsUpdatePolicy(arg *LegalHoldsPolicyUpdateArg) (res *LegalHoldPolicy, err error) {
1344 req := dropbox.Request{
1345 Host: "api",
1346 Namespace: "team",
1347 Route: "legal_holds/update_policy",
1348 Auth: "team",
1349 Style: "rpc",
1350 Arg: arg,
1351 ExtraHeaders: nil,
1352 }
1353
1354 var resp []byte
1355 var respBody io.ReadCloser
1356 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1357 if err != nil {
1358 var appErr LegalHoldsUpdatePolicyAPIError
1359 err = auth.ParseError(err, &appErr)
1360 if err == &appErr {
1361 err = appErr
1362 }
1363 return
1364 }
1365
1366 err = json.Unmarshal(resp, &res)
1367 if err != nil {
1368 return
1369 }
1370
1371 _ = respBody
1372 return
1373 }
1374
1375 //LinkedAppsListMemberLinkedAppsAPIError is an error-wrapper for the linked_apps/list_member_linked_apps route
1376 type LinkedAppsListMemberLinkedAppsAPIError struct {
1377 dropbox.APIError
1378 EndpointError *ListMemberAppsError `json:"error"`
1379 }
1380
1381 func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error) {
1382 req := dropbox.Request{
1383 Host: "api",
1384 Namespace: "team",
1385 Route: "linked_apps/list_member_linked_apps",
1386 Auth: "team",
1387 Style: "rpc",
1388 Arg: arg,
1389 ExtraHeaders: nil,
1390 }
1391
1392 var resp []byte
1393 var respBody io.ReadCloser
1394 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1395 if err != nil {
1396 var appErr LinkedAppsListMemberLinkedAppsAPIError
1397 err = auth.ParseError(err, &appErr)
1398 if err == &appErr {
1399 err = appErr
1400 }
1401 return
1402 }
1403
1404 err = json.Unmarshal(resp, &res)
1405 if err != nil {
1406 return
1407 }
1408
1409 _ = respBody
1410 return
1411 }
1412
1413 //LinkedAppsListMembersLinkedAppsAPIError is an error-wrapper for the linked_apps/list_members_linked_apps route
1414 type LinkedAppsListMembersLinkedAppsAPIError struct {
1415 dropbox.APIError
1416 EndpointError *ListMembersAppsError `json:"error"`
1417 }
1418
1419 func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error) {
1420 req := dropbox.Request{
1421 Host: "api",
1422 Namespace: "team",
1423 Route: "linked_apps/list_members_linked_apps",
1424 Auth: "team",
1425 Style: "rpc",
1426 Arg: arg,
1427 ExtraHeaders: nil,
1428 }
1429
1430 var resp []byte
1431 var respBody io.ReadCloser
1432 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1433 if err != nil {
1434 var appErr LinkedAppsListMembersLinkedAppsAPIError
1435 err = auth.ParseError(err, &appErr)
1436 if err == &appErr {
1437 err = appErr
1438 }
1439 return
1440 }
1441
1442 err = json.Unmarshal(resp, &res)
1443 if err != nil {
1444 return
1445 }
1446
1447 _ = respBody
1448 return
1449 }
1450
1451 //LinkedAppsListTeamLinkedAppsAPIError is an error-wrapper for the linked_apps/list_team_linked_apps route
1452 type LinkedAppsListTeamLinkedAppsAPIError struct {
1453 dropbox.APIError
1454 EndpointError *ListTeamAppsError `json:"error"`
1455 }
1456
1457 func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error) {
1458 log.Printf("WARNING: API `LinkedAppsListTeamLinkedApps` is deprecated")
1459 log.Printf("Use API `LinkedAppsListMembersLinkedApps` instead")
1460
1461 req := dropbox.Request{
1462 Host: "api",
1463 Namespace: "team",
1464 Route: "linked_apps/list_team_linked_apps",
1465 Auth: "team",
1466 Style: "rpc",
1467 Arg: arg,
1468 ExtraHeaders: nil,
1469 }
1470
1471 var resp []byte
1472 var respBody io.ReadCloser
1473 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1474 if err != nil {
1475 var appErr LinkedAppsListTeamLinkedAppsAPIError
1476 err = auth.ParseError(err, &appErr)
1477 if err == &appErr {
1478 err = appErr
1479 }
1480 return
1481 }
1482
1483 err = json.Unmarshal(resp, &res)
1484 if err != nil {
1485 return
1486 }
1487
1488 _ = respBody
1489 return
1490 }
1491
1492 //LinkedAppsRevokeLinkedAppAPIError is an error-wrapper for the linked_apps/revoke_linked_app route
1493 type LinkedAppsRevokeLinkedAppAPIError struct {
1494 dropbox.APIError
1495 EndpointError *RevokeLinkedAppError `json:"error"`
1496 }
1497
1498 func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error) {
1499 req := dropbox.Request{
1500 Host: "api",
1501 Namespace: "team",
1502 Route: "linked_apps/revoke_linked_app",
1503 Auth: "team",
1504 Style: "rpc",
1505 Arg: arg,
1506 ExtraHeaders: nil,
1507 }
1508
1509 var resp []byte
1510 var respBody io.ReadCloser
1511 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1512 if err != nil {
1513 var appErr LinkedAppsRevokeLinkedAppAPIError
1514 err = auth.ParseError(err, &appErr)
1515 if err == &appErr {
1516 err = appErr
1517 }
1518 return
1519 }
1520
1521 _ = resp
1522 _ = respBody
1523 return
1524 }
1525
1526 //LinkedAppsRevokeLinkedAppBatchAPIError is an error-wrapper for the linked_apps/revoke_linked_app_batch route
1527 type LinkedAppsRevokeLinkedAppBatchAPIError struct {
1528 dropbox.APIError
1529 EndpointError *RevokeLinkedAppBatchError `json:"error"`
1530 }
1531
1532 func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error) {
1533 req := dropbox.Request{
1534 Host: "api",
1535 Namespace: "team",
1536 Route: "linked_apps/revoke_linked_app_batch",
1537 Auth: "team",
1538 Style: "rpc",
1539 Arg: arg,
1540 ExtraHeaders: nil,
1541 }
1542
1543 var resp []byte
1544 var respBody io.ReadCloser
1545 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1546 if err != nil {
1547 var appErr LinkedAppsRevokeLinkedAppBatchAPIError
1548 err = auth.ParseError(err, &appErr)
1549 if err == &appErr {
1550 err = appErr
1551 }
1552 return
1553 }
1554
1555 err = json.Unmarshal(resp, &res)
1556 if err != nil {
1557 return
1558 }
1559
1560 _ = respBody
1561 return
1562 }
1563
1564 //MemberSpaceLimitsExcludedUsersAddAPIError is an error-wrapper for the member_space_limits/excluded_users/add route
1565 type MemberSpaceLimitsExcludedUsersAddAPIError struct {
1566 dropbox.APIError
1567 EndpointError *ExcludedUsersUpdateError `json:"error"`
1568 }
1569
1570 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
1571 req := dropbox.Request{
1572 Host: "api",
1573 Namespace: "team",
1574 Route: "member_space_limits/excluded_users/add",
1575 Auth: "team",
1576 Style: "rpc",
1577 Arg: arg,
1578 ExtraHeaders: nil,
1579 }
1580
1581 var resp []byte
1582 var respBody io.ReadCloser
1583 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1584 if err != nil {
1585 var appErr MemberSpaceLimitsExcludedUsersAddAPIError
1586 err = auth.ParseError(err, &appErr)
1587 if err == &appErr {
1588 err = appErr
1589 }
1590 return
1591 }
1592
1593 err = json.Unmarshal(resp, &res)
1594 if err != nil {
1595 return
1596 }
1597
1598 _ = respBody
1599 return
1600 }
1601
1602 //MemberSpaceLimitsExcludedUsersListAPIError is an error-wrapper for the member_space_limits/excluded_users/list route
1603 type MemberSpaceLimitsExcludedUsersListAPIError struct {
1604 dropbox.APIError
1605 EndpointError *ExcludedUsersListError `json:"error"`
1606 }
1607
1608 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error) {
1609 req := dropbox.Request{
1610 Host: "api",
1611 Namespace: "team",
1612 Route: "member_space_limits/excluded_users/list",
1613 Auth: "team",
1614 Style: "rpc",
1615 Arg: arg,
1616 ExtraHeaders: nil,
1617 }
1618
1619 var resp []byte
1620 var respBody io.ReadCloser
1621 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1622 if err != nil {
1623 var appErr MemberSpaceLimitsExcludedUsersListAPIError
1624 err = auth.ParseError(err, &appErr)
1625 if err == &appErr {
1626 err = appErr
1627 }
1628 return
1629 }
1630
1631 err = json.Unmarshal(resp, &res)
1632 if err != nil {
1633 return
1634 }
1635
1636 _ = respBody
1637 return
1638 }
1639
1640 //MemberSpaceLimitsExcludedUsersListContinueAPIError is an error-wrapper for the member_space_limits/excluded_users/list/continue route
1641 type MemberSpaceLimitsExcludedUsersListContinueAPIError struct {
1642 dropbox.APIError
1643 EndpointError *ExcludedUsersListContinueError `json:"error"`
1644 }
1645
1646 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error) {
1647 req := dropbox.Request{
1648 Host: "api",
1649 Namespace: "team",
1650 Route: "member_space_limits/excluded_users/list/continue",
1651 Auth: "team",
1652 Style: "rpc",
1653 Arg: arg,
1654 ExtraHeaders: nil,
1655 }
1656
1657 var resp []byte
1658 var respBody io.ReadCloser
1659 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1660 if err != nil {
1661 var appErr MemberSpaceLimitsExcludedUsersListContinueAPIError
1662 err = auth.ParseError(err, &appErr)
1663 if err == &appErr {
1664 err = appErr
1665 }
1666 return
1667 }
1668
1669 err = json.Unmarshal(resp, &res)
1670 if err != nil {
1671 return
1672 }
1673
1674 _ = respBody
1675 return
1676 }
1677
1678 //MemberSpaceLimitsExcludedUsersRemoveAPIError is an error-wrapper for the member_space_limits/excluded_users/remove route
1679 type MemberSpaceLimitsExcludedUsersRemoveAPIError struct {
1680 dropbox.APIError
1681 EndpointError *ExcludedUsersUpdateError `json:"error"`
1682 }
1683
1684 func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) {
1685 req := dropbox.Request{
1686 Host: "api",
1687 Namespace: "team",
1688 Route: "member_space_limits/excluded_users/remove",
1689 Auth: "team",
1690 Style: "rpc",
1691 Arg: arg,
1692 ExtraHeaders: nil,
1693 }
1694
1695 var resp []byte
1696 var respBody io.ReadCloser
1697 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1698 if err != nil {
1699 var appErr MemberSpaceLimitsExcludedUsersRemoveAPIError
1700 err = auth.ParseError(err, &appErr)
1701 if err == &appErr {
1702 err = appErr
1703 }
1704 return
1705 }
1706
1707 err = json.Unmarshal(resp, &res)
1708 if err != nil {
1709 return
1710 }
1711
1712 _ = respBody
1713 return
1714 }
1715
1716 //MemberSpaceLimitsGetCustomQuotaAPIError is an error-wrapper for the member_space_limits/get_custom_quota route
1717 type MemberSpaceLimitsGetCustomQuotaAPIError struct {
1718 dropbox.APIError
1719 EndpointError *CustomQuotaError `json:"error"`
1720 }
1721
1722 func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error) {
1723 req := dropbox.Request{
1724 Host: "api",
1725 Namespace: "team",
1726 Route: "member_space_limits/get_custom_quota",
1727 Auth: "team",
1728 Style: "rpc",
1729 Arg: arg,
1730 ExtraHeaders: nil,
1731 }
1732
1733 var resp []byte
1734 var respBody io.ReadCloser
1735 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1736 if err != nil {
1737 var appErr MemberSpaceLimitsGetCustomQuotaAPIError
1738 err = auth.ParseError(err, &appErr)
1739 if err == &appErr {
1740 err = appErr
1741 }
1742 return
1743 }
1744
1745 err = json.Unmarshal(resp, &res)
1746 if err != nil {
1747 return
1748 }
1749
1750 _ = respBody
1751 return
1752 }
1753
1754 //MemberSpaceLimitsRemoveCustomQuotaAPIError is an error-wrapper for the member_space_limits/remove_custom_quota route
1755 type MemberSpaceLimitsRemoveCustomQuotaAPIError struct {
1756 dropbox.APIError
1757 EndpointError *CustomQuotaError `json:"error"`
1758 }
1759
1760 func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error) {
1761 req := dropbox.Request{
1762 Host: "api",
1763 Namespace: "team",
1764 Route: "member_space_limits/remove_custom_quota",
1765 Auth: "team",
1766 Style: "rpc",
1767 Arg: arg,
1768 ExtraHeaders: nil,
1769 }
1770
1771 var resp []byte
1772 var respBody io.ReadCloser
1773 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1774 if err != nil {
1775 var appErr MemberSpaceLimitsRemoveCustomQuotaAPIError
1776 err = auth.ParseError(err, &appErr)
1777 if err == &appErr {
1778 err = appErr
1779 }
1780 return
1781 }
1782
1783 err = json.Unmarshal(resp, &res)
1784 if err != nil {
1785 return
1786 }
1787
1788 _ = respBody
1789 return
1790 }
1791
1792 //MemberSpaceLimitsSetCustomQuotaAPIError is an error-wrapper for the member_space_limits/set_custom_quota route
1793 type MemberSpaceLimitsSetCustomQuotaAPIError struct {
1794 dropbox.APIError
1795 EndpointError *SetCustomQuotaError `json:"error"`
1796 }
1797
1798 func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) {
1799 req := dropbox.Request{
1800 Host: "api",
1801 Namespace: "team",
1802 Route: "member_space_limits/set_custom_quota",
1803 Auth: "team",
1804 Style: "rpc",
1805 Arg: arg,
1806 ExtraHeaders: nil,
1807 }
1808
1809 var resp []byte
1810 var respBody io.ReadCloser
1811 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1812 if err != nil {
1813 var appErr MemberSpaceLimitsSetCustomQuotaAPIError
1814 err = auth.ParseError(err, &appErr)
1815 if err == &appErr {
1816 err = appErr
1817 }
1818 return
1819 }
1820
1821 err = json.Unmarshal(resp, &res)
1822 if err != nil {
1823 return
1824 }
1825
1826 _ = respBody
1827 return
1828 }
1829
1830 //MembersAddV2APIError is an error-wrapper for the members/add_v2 route
1831 type MembersAddV2APIError struct {
1832 dropbox.APIError
1833 EndpointError struct{} `json:"error"`
1834 }
1835
1836 func (dbx *apiImpl) MembersAddV2(arg *MembersAddV2Arg) (res *MembersAddLaunchV2Result, err error) {
1837 req := dropbox.Request{
1838 Host: "api",
1839 Namespace: "team",
1840 Route: "members/add_v2",
1841 Auth: "team",
1842 Style: "rpc",
1843 Arg: arg,
1844 ExtraHeaders: nil,
1845 }
1846
1847 var resp []byte
1848 var respBody io.ReadCloser
1849 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1850 if err != nil {
1851 var appErr MembersAddV2APIError
1852 err = auth.ParseError(err, &appErr)
1853 if err == &appErr {
1854 err = appErr
1855 }
1856 return
1857 }
1858
1859 err = json.Unmarshal(resp, &res)
1860 if err != nil {
1861 return
1862 }
1863
1864 _ = respBody
1865 return
1866 }
1867
1868 //MembersAddAPIError is an error-wrapper for the members/add route
1869 type MembersAddAPIError struct {
1870 dropbox.APIError
1871 EndpointError struct{} `json:"error"`
1872 }
1873
1874 func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error) {
1875 req := dropbox.Request{
1876 Host: "api",
1877 Namespace: "team",
1878 Route: "members/add",
1879 Auth: "team",
1880 Style: "rpc",
1881 Arg: arg,
1882 ExtraHeaders: nil,
1883 }
1884
1885 var resp []byte
1886 var respBody io.ReadCloser
1887 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1888 if err != nil {
1889 var appErr MembersAddAPIError
1890 err = auth.ParseError(err, &appErr)
1891 if err == &appErr {
1892 err = appErr
1893 }
1894 return
1895 }
1896
1897 err = json.Unmarshal(resp, &res)
1898 if err != nil {
1899 return
1900 }
1901
1902 _ = respBody
1903 return
1904 }
1905
1906 //MembersAddJobStatusGetV2APIError is an error-wrapper for the members/add/job_status/get_v2 route
1907 type MembersAddJobStatusGetV2APIError struct {
1908 dropbox.APIError
1909 EndpointError *async.PollError `json:"error"`
1910 }
1911
1912 func (dbx *apiImpl) MembersAddJobStatusGetV2(arg *async.PollArg) (res *MembersAddJobStatusV2Result, err error) {
1913 req := dropbox.Request{
1914 Host: "api",
1915 Namespace: "team",
1916 Route: "members/add/job_status/get_v2",
1917 Auth: "team",
1918 Style: "rpc",
1919 Arg: arg,
1920 ExtraHeaders: nil,
1921 }
1922
1923 var resp []byte
1924 var respBody io.ReadCloser
1925 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1926 if err != nil {
1927 var appErr MembersAddJobStatusGetV2APIError
1928 err = auth.ParseError(err, &appErr)
1929 if err == &appErr {
1930 err = appErr
1931 }
1932 return
1933 }
1934
1935 err = json.Unmarshal(resp, &res)
1936 if err != nil {
1937 return
1938 }
1939
1940 _ = respBody
1941 return
1942 }
1943
1944 //MembersAddJobStatusGetAPIError is an error-wrapper for the members/add/job_status/get route
1945 type MembersAddJobStatusGetAPIError struct {
1946 dropbox.APIError
1947 EndpointError *async.PollError `json:"error"`
1948 }
1949
1950 func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error) {
1951 req := dropbox.Request{
1952 Host: "api",
1953 Namespace: "team",
1954 Route: "members/add/job_status/get",
1955 Auth: "team",
1956 Style: "rpc",
1957 Arg: arg,
1958 ExtraHeaders: nil,
1959 }
1960
1961 var resp []byte
1962 var respBody io.ReadCloser
1963 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
1964 if err != nil {
1965 var appErr MembersAddJobStatusGetAPIError
1966 err = auth.ParseError(err, &appErr)
1967 if err == &appErr {
1968 err = appErr
1969 }
1970 return
1971 }
1972
1973 err = json.Unmarshal(resp, &res)
1974 if err != nil {
1975 return
1976 }
1977
1978 _ = respBody
1979 return
1980 }
1981
1982 //MembersDeleteProfilePhotoV2APIError is an error-wrapper for the members/delete_profile_photo_v2 route
1983 type MembersDeleteProfilePhotoV2APIError struct {
1984 dropbox.APIError
1985 EndpointError *MembersDeleteProfilePhotoError `json:"error"`
1986 }
1987
1988 func (dbx *apiImpl) MembersDeleteProfilePhotoV2(arg *MembersDeleteProfilePhotoArg) (res *TeamMemberInfoV2Result, err error) {
1989 req := dropbox.Request{
1990 Host: "api",
1991 Namespace: "team",
1992 Route: "members/delete_profile_photo_v2",
1993 Auth: "team",
1994 Style: "rpc",
1995 Arg: arg,
1996 ExtraHeaders: nil,
1997 }
1998
1999 var resp []byte
2000 var respBody io.ReadCloser
2001 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2002 if err != nil {
2003 var appErr MembersDeleteProfilePhotoV2APIError
2004 err = auth.ParseError(err, &appErr)
2005 if err == &appErr {
2006 err = appErr
2007 }
2008 return
2009 }
2010
2011 err = json.Unmarshal(resp, &res)
2012 if err != nil {
2013 return
2014 }
2015
2016 _ = respBody
2017 return
2018 }
2019
2020 //MembersDeleteProfilePhotoAPIError is an error-wrapper for the members/delete_profile_photo route
2021 type MembersDeleteProfilePhotoAPIError struct {
2022 dropbox.APIError
2023 EndpointError *MembersDeleteProfilePhotoError `json:"error"`
2024 }
2025
2026 func (dbx *apiImpl) MembersDeleteProfilePhoto(arg *MembersDeleteProfilePhotoArg) (res *TeamMemberInfo, err error) {
2027 req := dropbox.Request{
2028 Host: "api",
2029 Namespace: "team",
2030 Route: "members/delete_profile_photo",
2031 Auth: "team",
2032 Style: "rpc",
2033 Arg: arg,
2034 ExtraHeaders: nil,
2035 }
2036
2037 var resp []byte
2038 var respBody io.ReadCloser
2039 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2040 if err != nil {
2041 var appErr MembersDeleteProfilePhotoAPIError
2042 err = auth.ParseError(err, &appErr)
2043 if err == &appErr {
2044 err = appErr
2045 }
2046 return
2047 }
2048
2049 err = json.Unmarshal(resp, &res)
2050 if err != nil {
2051 return
2052 }
2053
2054 _ = respBody
2055 return
2056 }
2057
2058 //MembersGetAvailableTeamMemberRolesAPIError is an error-wrapper for the members/get_available_team_member_roles route
2059 type MembersGetAvailableTeamMemberRolesAPIError struct {
2060 dropbox.APIError
2061 EndpointError struct{} `json:"error"`
2062 }
2063
2064 func (dbx *apiImpl) MembersGetAvailableTeamMemberRoles() (res *MembersGetAvailableTeamMemberRolesResult, err error) {
2065 req := dropbox.Request{
2066 Host: "api",
2067 Namespace: "team",
2068 Route: "members/get_available_team_member_roles",
2069 Auth: "team",
2070 Style: "rpc",
2071 Arg: nil,
2072 ExtraHeaders: nil,
2073 }
2074
2075 var resp []byte
2076 var respBody io.ReadCloser
2077 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2078 if err != nil {
2079 var appErr MembersGetAvailableTeamMemberRolesAPIError
2080 err = auth.ParseError(err, &appErr)
2081 if err == &appErr {
2082 err = appErr
2083 }
2084 return
2085 }
2086
2087 err = json.Unmarshal(resp, &res)
2088 if err != nil {
2089 return
2090 }
2091
2092 _ = respBody
2093 return
2094 }
2095
2096 //MembersGetInfoV2APIError is an error-wrapper for the members/get_info_v2 route
2097 type MembersGetInfoV2APIError struct {
2098 dropbox.APIError
2099 EndpointError *MembersGetInfoError `json:"error"`
2100 }
2101
2102 func (dbx *apiImpl) MembersGetInfoV2(arg *MembersGetInfoV2Arg) (res *MembersGetInfoV2Result, err error) {
2103 req := dropbox.Request{
2104 Host: "api",
2105 Namespace: "team",
2106 Route: "members/get_info_v2",
2107 Auth: "team",
2108 Style: "rpc",
2109 Arg: arg,
2110 ExtraHeaders: nil,
2111 }
2112
2113 var resp []byte
2114 var respBody io.ReadCloser
2115 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2116 if err != nil {
2117 var appErr MembersGetInfoV2APIError
2118 err = auth.ParseError(err, &appErr)
2119 if err == &appErr {
2120 err = appErr
2121 }
2122 return
2123 }
2124
2125 err = json.Unmarshal(resp, &res)
2126 if err != nil {
2127 return
2128 }
2129
2130 _ = respBody
2131 return
2132 }
2133
2134 //MembersGetInfoAPIError is an error-wrapper for the members/get_info route
2135 type MembersGetInfoAPIError struct {
2136 dropbox.APIError
2137 EndpointError *MembersGetInfoError `json:"error"`
2138 }
2139
2140 func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error) {
2141 req := dropbox.Request{
2142 Host: "api",
2143 Namespace: "team",
2144 Route: "members/get_info",
2145 Auth: "team",
2146 Style: "rpc",
2147 Arg: arg,
2148 ExtraHeaders: nil,
2149 }
2150
2151 var resp []byte
2152 var respBody io.ReadCloser
2153 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2154 if err != nil {
2155 var appErr MembersGetInfoAPIError
2156 err = auth.ParseError(err, &appErr)
2157 if err == &appErr {
2158 err = appErr
2159 }
2160 return
2161 }
2162
2163 err = json.Unmarshal(resp, &res)
2164 if err != nil {
2165 return
2166 }
2167
2168 _ = respBody
2169 return
2170 }
2171
2172 //MembersListV2APIError is an error-wrapper for the members/list_v2 route
2173 type MembersListV2APIError struct {
2174 dropbox.APIError
2175 EndpointError *MembersListError `json:"error"`
2176 }
2177
2178 func (dbx *apiImpl) MembersListV2(arg *MembersListArg) (res *MembersListV2Result, err error) {
2179 req := dropbox.Request{
2180 Host: "api",
2181 Namespace: "team",
2182 Route: "members/list_v2",
2183 Auth: "team",
2184 Style: "rpc",
2185 Arg: arg,
2186 ExtraHeaders: nil,
2187 }
2188
2189 var resp []byte
2190 var respBody io.ReadCloser
2191 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2192 if err != nil {
2193 var appErr MembersListV2APIError
2194 err = auth.ParseError(err, &appErr)
2195 if err == &appErr {
2196 err = appErr
2197 }
2198 return
2199 }
2200
2201 err = json.Unmarshal(resp, &res)
2202 if err != nil {
2203 return
2204 }
2205
2206 _ = respBody
2207 return
2208 }
2209
2210 //MembersListAPIError is an error-wrapper for the members/list route
2211 type MembersListAPIError struct {
2212 dropbox.APIError
2213 EndpointError *MembersListError `json:"error"`
2214 }
2215
2216 func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, err error) {
2217 req := dropbox.Request{
2218 Host: "api",
2219 Namespace: "team",
2220 Route: "members/list",
2221 Auth: "team",
2222 Style: "rpc",
2223 Arg: arg,
2224 ExtraHeaders: nil,
2225 }
2226
2227 var resp []byte
2228 var respBody io.ReadCloser
2229 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2230 if err != nil {
2231 var appErr MembersListAPIError
2232 err = auth.ParseError(err, &appErr)
2233 if err == &appErr {
2234 err = appErr
2235 }
2236 return
2237 }
2238
2239 err = json.Unmarshal(resp, &res)
2240 if err != nil {
2241 return
2242 }
2243
2244 _ = respBody
2245 return
2246 }
2247
2248 //MembersListContinueV2APIError is an error-wrapper for the members/list/continue_v2 route
2249 type MembersListContinueV2APIError struct {
2250 dropbox.APIError
2251 EndpointError *MembersListContinueError `json:"error"`
2252 }
2253
2254 func (dbx *apiImpl) MembersListContinueV2(arg *MembersListContinueArg) (res *MembersListV2Result, err error) {
2255 req := dropbox.Request{
2256 Host: "api",
2257 Namespace: "team",
2258 Route: "members/list/continue_v2",
2259 Auth: "team",
2260 Style: "rpc",
2261 Arg: arg,
2262 ExtraHeaders: nil,
2263 }
2264
2265 var resp []byte
2266 var respBody io.ReadCloser
2267 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2268 if err != nil {
2269 var appErr MembersListContinueV2APIError
2270 err = auth.ParseError(err, &appErr)
2271 if err == &appErr {
2272 err = appErr
2273 }
2274 return
2275 }
2276
2277 err = json.Unmarshal(resp, &res)
2278 if err != nil {
2279 return
2280 }
2281
2282 _ = respBody
2283 return
2284 }
2285
2286 //MembersListContinueAPIError is an error-wrapper for the members/list/continue route
2287 type MembersListContinueAPIError struct {
2288 dropbox.APIError
2289 EndpointError *MembersListContinueError `json:"error"`
2290 }
2291
2292 func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error) {
2293 req := dropbox.Request{
2294 Host: "api",
2295 Namespace: "team",
2296 Route: "members/list/continue",
2297 Auth: "team",
2298 Style: "rpc",
2299 Arg: arg,
2300 ExtraHeaders: nil,
2301 }
2302
2303 var resp []byte
2304 var respBody io.ReadCloser
2305 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2306 if err != nil {
2307 var appErr MembersListContinueAPIError
2308 err = auth.ParseError(err, &appErr)
2309 if err == &appErr {
2310 err = appErr
2311 }
2312 return
2313 }
2314
2315 err = json.Unmarshal(resp, &res)
2316 if err != nil {
2317 return
2318 }
2319
2320 _ = respBody
2321 return
2322 }
2323
2324 //MembersMoveFormerMemberFilesAPIError is an error-wrapper for the members/move_former_member_files route
2325 type MembersMoveFormerMemberFilesAPIError struct {
2326 dropbox.APIError
2327 EndpointError *MembersTransferFormerMembersFilesError `json:"error"`
2328 }
2329
2330 func (dbx *apiImpl) MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error) {
2331 req := dropbox.Request{
2332 Host: "api",
2333 Namespace: "team",
2334 Route: "members/move_former_member_files",
2335 Auth: "team",
2336 Style: "rpc",
2337 Arg: arg,
2338 ExtraHeaders: nil,
2339 }
2340
2341 var resp []byte
2342 var respBody io.ReadCloser
2343 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2344 if err != nil {
2345 var appErr MembersMoveFormerMemberFilesAPIError
2346 err = auth.ParseError(err, &appErr)
2347 if err == &appErr {
2348 err = appErr
2349 }
2350 return
2351 }
2352
2353 err = json.Unmarshal(resp, &res)
2354 if err != nil {
2355 return
2356 }
2357
2358 _ = respBody
2359 return
2360 }
2361
2362 //MembersMoveFormerMemberFilesJobStatusCheckAPIError is an error-wrapper for the members/move_former_member_files/job_status/check route
2363 type MembersMoveFormerMemberFilesJobStatusCheckAPIError struct {
2364 dropbox.APIError
2365 EndpointError *async.PollError `json:"error"`
2366 }
2367
2368 func (dbx *apiImpl) MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
2369 req := dropbox.Request{
2370 Host: "api",
2371 Namespace: "team",
2372 Route: "members/move_former_member_files/job_status/check",
2373 Auth: "team",
2374 Style: "rpc",
2375 Arg: arg,
2376 ExtraHeaders: nil,
2377 }
2378
2379 var resp []byte
2380 var respBody io.ReadCloser
2381 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2382 if err != nil {
2383 var appErr MembersMoveFormerMemberFilesJobStatusCheckAPIError
2384 err = auth.ParseError(err, &appErr)
2385 if err == &appErr {
2386 err = appErr
2387 }
2388 return
2389 }
2390
2391 err = json.Unmarshal(resp, &res)
2392 if err != nil {
2393 return
2394 }
2395
2396 _ = respBody
2397 return
2398 }
2399
2400 //MembersRecoverAPIError is an error-wrapper for the members/recover route
2401 type MembersRecoverAPIError struct {
2402 dropbox.APIError
2403 EndpointError *MembersRecoverError `json:"error"`
2404 }
2405
2406 func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) {
2407 req := dropbox.Request{
2408 Host: "api",
2409 Namespace: "team",
2410 Route: "members/recover",
2411 Auth: "team",
2412 Style: "rpc",
2413 Arg: arg,
2414 ExtraHeaders: nil,
2415 }
2416
2417 var resp []byte
2418 var respBody io.ReadCloser
2419 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2420 if err != nil {
2421 var appErr MembersRecoverAPIError
2422 err = auth.ParseError(err, &appErr)
2423 if err == &appErr {
2424 err = appErr
2425 }
2426 return
2427 }
2428
2429 _ = resp
2430 _ = respBody
2431 return
2432 }
2433
2434 //MembersRemoveAPIError is an error-wrapper for the members/remove route
2435 type MembersRemoveAPIError struct {
2436 dropbox.APIError
2437 EndpointError *MembersRemoveError `json:"error"`
2438 }
2439
2440 func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error) {
2441 req := dropbox.Request{
2442 Host: "api",
2443 Namespace: "team",
2444 Route: "members/remove",
2445 Auth: "team",
2446 Style: "rpc",
2447 Arg: arg,
2448 ExtraHeaders: nil,
2449 }
2450
2451 var resp []byte
2452 var respBody io.ReadCloser
2453 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2454 if err != nil {
2455 var appErr MembersRemoveAPIError
2456 err = auth.ParseError(err, &appErr)
2457 if err == &appErr {
2458 err = appErr
2459 }
2460 return
2461 }
2462
2463 err = json.Unmarshal(resp, &res)
2464 if err != nil {
2465 return
2466 }
2467
2468 _ = respBody
2469 return
2470 }
2471
2472 //MembersRemoveJobStatusGetAPIError is an error-wrapper for the members/remove/job_status/get route
2473 type MembersRemoveJobStatusGetAPIError struct {
2474 dropbox.APIError
2475 EndpointError *async.PollError `json:"error"`
2476 }
2477
2478 func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) {
2479 req := dropbox.Request{
2480 Host: "api",
2481 Namespace: "team",
2482 Route: "members/remove/job_status/get",
2483 Auth: "team",
2484 Style: "rpc",
2485 Arg: arg,
2486 ExtraHeaders: nil,
2487 }
2488
2489 var resp []byte
2490 var respBody io.ReadCloser
2491 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2492 if err != nil {
2493 var appErr MembersRemoveJobStatusGetAPIError
2494 err = auth.ParseError(err, &appErr)
2495 if err == &appErr {
2496 err = appErr
2497 }
2498 return
2499 }
2500
2501 err = json.Unmarshal(resp, &res)
2502 if err != nil {
2503 return
2504 }
2505
2506 _ = respBody
2507 return
2508 }
2509
2510 //MembersSecondaryEmailsAddAPIError is an error-wrapper for the members/secondary_emails/add route
2511 type MembersSecondaryEmailsAddAPIError struct {
2512 dropbox.APIError
2513 EndpointError *AddSecondaryEmailsError `json:"error"`
2514 }
2515
2516 func (dbx *apiImpl) MembersSecondaryEmailsAdd(arg *AddSecondaryEmailsArg) (res *AddSecondaryEmailsResult, err error) {
2517 req := dropbox.Request{
2518 Host: "api",
2519 Namespace: "team",
2520 Route: "members/secondary_emails/add",
2521 Auth: "team",
2522 Style: "rpc",
2523 Arg: arg,
2524 ExtraHeaders: nil,
2525 }
2526
2527 var resp []byte
2528 var respBody io.ReadCloser
2529 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2530 if err != nil {
2531 var appErr MembersSecondaryEmailsAddAPIError
2532 err = auth.ParseError(err, &appErr)
2533 if err == &appErr {
2534 err = appErr
2535 }
2536 return
2537 }
2538
2539 err = json.Unmarshal(resp, &res)
2540 if err != nil {
2541 return
2542 }
2543
2544 _ = respBody
2545 return
2546 }
2547
2548 //MembersSecondaryEmailsDeleteAPIError is an error-wrapper for the members/secondary_emails/delete route
2549 type MembersSecondaryEmailsDeleteAPIError struct {
2550 dropbox.APIError
2551 EndpointError struct{} `json:"error"`
2552 }
2553
2554 func (dbx *apiImpl) MembersSecondaryEmailsDelete(arg *DeleteSecondaryEmailsArg) (res *DeleteSecondaryEmailsResult, err error) {
2555 req := dropbox.Request{
2556 Host: "api",
2557 Namespace: "team",
2558 Route: "members/secondary_emails/delete",
2559 Auth: "team",
2560 Style: "rpc",
2561 Arg: arg,
2562 ExtraHeaders: nil,
2563 }
2564
2565 var resp []byte
2566 var respBody io.ReadCloser
2567 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2568 if err != nil {
2569 var appErr MembersSecondaryEmailsDeleteAPIError
2570 err = auth.ParseError(err, &appErr)
2571 if err == &appErr {
2572 err = appErr
2573 }
2574 return
2575 }
2576
2577 err = json.Unmarshal(resp, &res)
2578 if err != nil {
2579 return
2580 }
2581
2582 _ = respBody
2583 return
2584 }
2585
2586 //MembersSecondaryEmailsResendVerificationEmailsAPIError is an error-wrapper for the members/secondary_emails/resend_verification_emails route
2587 type MembersSecondaryEmailsResendVerificationEmailsAPIError struct {
2588 dropbox.APIError
2589 EndpointError struct{} `json:"error"`
2590 }
2591
2592 func (dbx *apiImpl) MembersSecondaryEmailsResendVerificationEmails(arg *ResendVerificationEmailArg) (res *ResendVerificationEmailResult, err error) {
2593 req := dropbox.Request{
2594 Host: "api",
2595 Namespace: "team",
2596 Route: "members/secondary_emails/resend_verification_emails",
2597 Auth: "team",
2598 Style: "rpc",
2599 Arg: arg,
2600 ExtraHeaders: nil,
2601 }
2602
2603 var resp []byte
2604 var respBody io.ReadCloser
2605 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2606 if err != nil {
2607 var appErr MembersSecondaryEmailsResendVerificationEmailsAPIError
2608 err = auth.ParseError(err, &appErr)
2609 if err == &appErr {
2610 err = appErr
2611 }
2612 return
2613 }
2614
2615 err = json.Unmarshal(resp, &res)
2616 if err != nil {
2617 return
2618 }
2619
2620 _ = respBody
2621 return
2622 }
2623
2624 //MembersSendWelcomeEmailAPIError is an error-wrapper for the members/send_welcome_email route
2625 type MembersSendWelcomeEmailAPIError struct {
2626 dropbox.APIError
2627 EndpointError *MembersSendWelcomeError `json:"error"`
2628 }
2629
2630 func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) {
2631 req := dropbox.Request{
2632 Host: "api",
2633 Namespace: "team",
2634 Route: "members/send_welcome_email",
2635 Auth: "team",
2636 Style: "rpc",
2637 Arg: arg,
2638 ExtraHeaders: nil,
2639 }
2640
2641 var resp []byte
2642 var respBody io.ReadCloser
2643 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2644 if err != nil {
2645 var appErr MembersSendWelcomeEmailAPIError
2646 err = auth.ParseError(err, &appErr)
2647 if err == &appErr {
2648 err = appErr
2649 }
2650 return
2651 }
2652
2653 _ = resp
2654 _ = respBody
2655 return
2656 }
2657
2658 //MembersSetAdminPermissionsV2APIError is an error-wrapper for the members/set_admin_permissions_v2 route
2659 type MembersSetAdminPermissionsV2APIError struct {
2660 dropbox.APIError
2661 EndpointError *MembersSetPermissions2Error `json:"error"`
2662 }
2663
2664 func (dbx *apiImpl) MembersSetAdminPermissionsV2(arg *MembersSetPermissions2Arg) (res *MembersSetPermissions2Result, err error) {
2665 req := dropbox.Request{
2666 Host: "api",
2667 Namespace: "team",
2668 Route: "members/set_admin_permissions_v2",
2669 Auth: "team",
2670 Style: "rpc",
2671 Arg: arg,
2672 ExtraHeaders: nil,
2673 }
2674
2675 var resp []byte
2676 var respBody io.ReadCloser
2677 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2678 if err != nil {
2679 var appErr MembersSetAdminPermissionsV2APIError
2680 err = auth.ParseError(err, &appErr)
2681 if err == &appErr {
2682 err = appErr
2683 }
2684 return
2685 }
2686
2687 err = json.Unmarshal(resp, &res)
2688 if err != nil {
2689 return
2690 }
2691
2692 _ = respBody
2693 return
2694 }
2695
2696 //MembersSetAdminPermissionsAPIError is an error-wrapper for the members/set_admin_permissions route
2697 type MembersSetAdminPermissionsAPIError struct {
2698 dropbox.APIError
2699 EndpointError *MembersSetPermissionsError `json:"error"`
2700 }
2701
2702 func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error) {
2703 req := dropbox.Request{
2704 Host: "api",
2705 Namespace: "team",
2706 Route: "members/set_admin_permissions",
2707 Auth: "team",
2708 Style: "rpc",
2709 Arg: arg,
2710 ExtraHeaders: nil,
2711 }
2712
2713 var resp []byte
2714 var respBody io.ReadCloser
2715 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2716 if err != nil {
2717 var appErr MembersSetAdminPermissionsAPIError
2718 err = auth.ParseError(err, &appErr)
2719 if err == &appErr {
2720 err = appErr
2721 }
2722 return
2723 }
2724
2725 err = json.Unmarshal(resp, &res)
2726 if err != nil {
2727 return
2728 }
2729
2730 _ = respBody
2731 return
2732 }
2733
2734 //MembersSetProfileV2APIError is an error-wrapper for the members/set_profile_v2 route
2735 type MembersSetProfileV2APIError struct {
2736 dropbox.APIError
2737 EndpointError *MembersSetProfileError `json:"error"`
2738 }
2739
2740 func (dbx *apiImpl) MembersSetProfileV2(arg *MembersSetProfileArg) (res *TeamMemberInfoV2Result, err error) {
2741 req := dropbox.Request{
2742 Host: "api",
2743 Namespace: "team",
2744 Route: "members/set_profile_v2",
2745 Auth: "team",
2746 Style: "rpc",
2747 Arg: arg,
2748 ExtraHeaders: nil,
2749 }
2750
2751 var resp []byte
2752 var respBody io.ReadCloser
2753 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2754 if err != nil {
2755 var appErr MembersSetProfileV2APIError
2756 err = auth.ParseError(err, &appErr)
2757 if err == &appErr {
2758 err = appErr
2759 }
2760 return
2761 }
2762
2763 err = json.Unmarshal(resp, &res)
2764 if err != nil {
2765 return
2766 }
2767
2768 _ = respBody
2769 return
2770 }
2771
2772 //MembersSetProfileAPIError is an error-wrapper for the members/set_profile route
2773 type MembersSetProfileAPIError struct {
2774 dropbox.APIError
2775 EndpointError *MembersSetProfileError `json:"error"`
2776 }
2777
2778 func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error) {
2779 req := dropbox.Request{
2780 Host: "api",
2781 Namespace: "team",
2782 Route: "members/set_profile",
2783 Auth: "team",
2784 Style: "rpc",
2785 Arg: arg,
2786 ExtraHeaders: nil,
2787 }
2788
2789 var resp []byte
2790 var respBody io.ReadCloser
2791 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2792 if err != nil {
2793 var appErr MembersSetProfileAPIError
2794 err = auth.ParseError(err, &appErr)
2795 if err == &appErr {
2796 err = appErr
2797 }
2798 return
2799 }
2800
2801 err = json.Unmarshal(resp, &res)
2802 if err != nil {
2803 return
2804 }
2805
2806 _ = respBody
2807 return
2808 }
2809
2810 //MembersSetProfilePhotoV2APIError is an error-wrapper for the members/set_profile_photo_v2 route
2811 type MembersSetProfilePhotoV2APIError struct {
2812 dropbox.APIError
2813 EndpointError *MembersSetProfilePhotoError `json:"error"`
2814 }
2815
2816 func (dbx *apiImpl) MembersSetProfilePhotoV2(arg *MembersSetProfilePhotoArg) (res *TeamMemberInfoV2Result, err error) {
2817 req := dropbox.Request{
2818 Host: "api",
2819 Namespace: "team",
2820 Route: "members/set_profile_photo_v2",
2821 Auth: "team",
2822 Style: "rpc",
2823 Arg: arg,
2824 ExtraHeaders: nil,
2825 }
2826
2827 var resp []byte
2828 var respBody io.ReadCloser
2829 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2830 if err != nil {
2831 var appErr MembersSetProfilePhotoV2APIError
2832 err = auth.ParseError(err, &appErr)
2833 if err == &appErr {
2834 err = appErr
2835 }
2836 return
2837 }
2838
2839 err = json.Unmarshal(resp, &res)
2840 if err != nil {
2841 return
2842 }
2843
2844 _ = respBody
2845 return
2846 }
2847
2848 //MembersSetProfilePhotoAPIError is an error-wrapper for the members/set_profile_photo route
2849 type MembersSetProfilePhotoAPIError struct {
2850 dropbox.APIError
2851 EndpointError *MembersSetProfilePhotoError `json:"error"`
2852 }
2853
2854 func (dbx *apiImpl) MembersSetProfilePhoto(arg *MembersSetProfilePhotoArg) (res *TeamMemberInfo, err error) {
2855 req := dropbox.Request{
2856 Host: "api",
2857 Namespace: "team",
2858 Route: "members/set_profile_photo",
2859 Auth: "team",
2860 Style: "rpc",
2861 Arg: arg,
2862 ExtraHeaders: nil,
2863 }
2864
2865 var resp []byte
2866 var respBody io.ReadCloser
2867 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2868 if err != nil {
2869 var appErr MembersSetProfilePhotoAPIError
2870 err = auth.ParseError(err, &appErr)
2871 if err == &appErr {
2872 err = appErr
2873 }
2874 return
2875 }
2876
2877 err = json.Unmarshal(resp, &res)
2878 if err != nil {
2879 return
2880 }
2881
2882 _ = respBody
2883 return
2884 }
2885
2886 //MembersSuspendAPIError is an error-wrapper for the members/suspend route
2887 type MembersSuspendAPIError struct {
2888 dropbox.APIError
2889 EndpointError *MembersSuspendError `json:"error"`
2890 }
2891
2892 func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) {
2893 req := dropbox.Request{
2894 Host: "api",
2895 Namespace: "team",
2896 Route: "members/suspend",
2897 Auth: "team",
2898 Style: "rpc",
2899 Arg: arg,
2900 ExtraHeaders: nil,
2901 }
2902
2903 var resp []byte
2904 var respBody io.ReadCloser
2905 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2906 if err != nil {
2907 var appErr MembersSuspendAPIError
2908 err = auth.ParseError(err, &appErr)
2909 if err == &appErr {
2910 err = appErr
2911 }
2912 return
2913 }
2914
2915 _ = resp
2916 _ = respBody
2917 return
2918 }
2919
2920 //MembersUnsuspendAPIError is an error-wrapper for the members/unsuspend route
2921 type MembersUnsuspendAPIError struct {
2922 dropbox.APIError
2923 EndpointError *MembersUnsuspendError `json:"error"`
2924 }
2925
2926 func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) {
2927 req := dropbox.Request{
2928 Host: "api",
2929 Namespace: "team",
2930 Route: "members/unsuspend",
2931 Auth: "team",
2932 Style: "rpc",
2933 Arg: arg,
2934 ExtraHeaders: nil,
2935 }
2936
2937 var resp []byte
2938 var respBody io.ReadCloser
2939 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2940 if err != nil {
2941 var appErr MembersUnsuspendAPIError
2942 err = auth.ParseError(err, &appErr)
2943 if err == &appErr {
2944 err = appErr
2945 }
2946 return
2947 }
2948
2949 _ = resp
2950 _ = respBody
2951 return
2952 }
2953
2954 //NamespacesListAPIError is an error-wrapper for the namespaces/list route
2955 type NamespacesListAPIError struct {
2956 dropbox.APIError
2957 EndpointError *TeamNamespacesListError `json:"error"`
2958 }
2959
2960 func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error) {
2961 req := dropbox.Request{
2962 Host: "api",
2963 Namespace: "team",
2964 Route: "namespaces/list",
2965 Auth: "team",
2966 Style: "rpc",
2967 Arg: arg,
2968 ExtraHeaders: nil,
2969 }
2970
2971 var resp []byte
2972 var respBody io.ReadCloser
2973 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
2974 if err != nil {
2975 var appErr NamespacesListAPIError
2976 err = auth.ParseError(err, &appErr)
2977 if err == &appErr {
2978 err = appErr
2979 }
2980 return
2981 }
2982
2983 err = json.Unmarshal(resp, &res)
2984 if err != nil {
2985 return
2986 }
2987
2988 _ = respBody
2989 return
2990 }
2991
2992 //NamespacesListContinueAPIError is an error-wrapper for the namespaces/list/continue route
2993 type NamespacesListContinueAPIError struct {
2994 dropbox.APIError
2995 EndpointError *TeamNamespacesListContinueError `json:"error"`
2996 }
2997
2998 func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error) {
2999 req := dropbox.Request{
3000 Host: "api",
3001 Namespace: "team",
3002 Route: "namespaces/list/continue",
3003 Auth: "team",
3004 Style: "rpc",
3005 Arg: arg,
3006 ExtraHeaders: nil,
3007 }
3008
3009 var resp []byte
3010 var respBody io.ReadCloser
3011 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3012 if err != nil {
3013 var appErr NamespacesListContinueAPIError
3014 err = auth.ParseError(err, &appErr)
3015 if err == &appErr {
3016 err = appErr
3017 }
3018 return
3019 }
3020
3021 err = json.Unmarshal(resp, &res)
3022 if err != nil {
3023 return
3024 }
3025
3026 _ = respBody
3027 return
3028 }
3029
3030 //PropertiesTemplateAddAPIError is an error-wrapper for the properties/template/add route
3031 type PropertiesTemplateAddAPIError struct {
3032 dropbox.APIError
3033 EndpointError *file_properties.ModifyTemplateError `json:"error"`
3034 }
3035
3036 func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error) {
3037 log.Printf("WARNING: API `PropertiesTemplateAdd` is deprecated")
3038
3039 req := dropbox.Request{
3040 Host: "api",
3041 Namespace: "team",
3042 Route: "properties/template/add",
3043 Auth: "team",
3044 Style: "rpc",
3045 Arg: arg,
3046 ExtraHeaders: nil,
3047 }
3048
3049 var resp []byte
3050 var respBody io.ReadCloser
3051 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3052 if err != nil {
3053 var appErr PropertiesTemplateAddAPIError
3054 err = auth.ParseError(err, &appErr)
3055 if err == &appErr {
3056 err = appErr
3057 }
3058 return
3059 }
3060
3061 err = json.Unmarshal(resp, &res)
3062 if err != nil {
3063 return
3064 }
3065
3066 _ = respBody
3067 return
3068 }
3069
3070 //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route
3071 type PropertiesTemplateGetAPIError struct {
3072 dropbox.APIError
3073 EndpointError *file_properties.TemplateError `json:"error"`
3074 }
3075
3076 func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) {
3077 log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated")
3078
3079 req := dropbox.Request{
3080 Host: "api",
3081 Namespace: "team",
3082 Route: "properties/template/get",
3083 Auth: "team",
3084 Style: "rpc",
3085 Arg: arg,
3086 ExtraHeaders: nil,
3087 }
3088
3089 var resp []byte
3090 var respBody io.ReadCloser
3091 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3092 if err != nil {
3093 var appErr PropertiesTemplateGetAPIError
3094 err = auth.ParseError(err, &appErr)
3095 if err == &appErr {
3096 err = appErr
3097 }
3098 return
3099 }
3100
3101 err = json.Unmarshal(resp, &res)
3102 if err != nil {
3103 return
3104 }
3105
3106 _ = respBody
3107 return
3108 }
3109
3110 //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route
3111 type PropertiesTemplateListAPIError struct {
3112 dropbox.APIError
3113 EndpointError *file_properties.TemplateError `json:"error"`
3114 }
3115
3116 func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) {
3117 log.Printf("WARNING: API `PropertiesTemplateList` is deprecated")
3118
3119 req := dropbox.Request{
3120 Host: "api",
3121 Namespace: "team",
3122 Route: "properties/template/list",
3123 Auth: "team",
3124 Style: "rpc",
3125 Arg: nil,
3126 ExtraHeaders: nil,
3127 }
3128
3129 var resp []byte
3130 var respBody io.ReadCloser
3131 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3132 if err != nil {
3133 var appErr PropertiesTemplateListAPIError
3134 err = auth.ParseError(err, &appErr)
3135 if err == &appErr {
3136 err = appErr
3137 }
3138 return
3139 }
3140
3141 err = json.Unmarshal(resp, &res)
3142 if err != nil {
3143 return
3144 }
3145
3146 _ = respBody
3147 return
3148 }
3149
3150 //PropertiesTemplateUpdateAPIError is an error-wrapper for the properties/template/update route
3151 type PropertiesTemplateUpdateAPIError struct {
3152 dropbox.APIError
3153 EndpointError *file_properties.ModifyTemplateError `json:"error"`
3154 }
3155
3156 func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error) {
3157 log.Printf("WARNING: API `PropertiesTemplateUpdate` is deprecated")
3158
3159 req := dropbox.Request{
3160 Host: "api",
3161 Namespace: "team",
3162 Route: "properties/template/update",
3163 Auth: "team",
3164 Style: "rpc",
3165 Arg: arg,
3166 ExtraHeaders: nil,
3167 }
3168
3169 var resp []byte
3170 var respBody io.ReadCloser
3171 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3172 if err != nil {
3173 var appErr PropertiesTemplateUpdateAPIError
3174 err = auth.ParseError(err, &appErr)
3175 if err == &appErr {
3176 err = appErr
3177 }
3178 return
3179 }
3180
3181 err = json.Unmarshal(resp, &res)
3182 if err != nil {
3183 return
3184 }
3185
3186 _ = respBody
3187 return
3188 }
3189
3190 //ReportsGetActivityAPIError is an error-wrapper for the reports/get_activity route
3191 type ReportsGetActivityAPIError struct {
3192 dropbox.APIError
3193 EndpointError *DateRangeError `json:"error"`
3194 }
3195
3196 func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error) {
3197 log.Printf("WARNING: API `ReportsGetActivity` is deprecated")
3198
3199 req := dropbox.Request{
3200 Host: "api",
3201 Namespace: "team",
3202 Route: "reports/get_activity",
3203 Auth: "team",
3204 Style: "rpc",
3205 Arg: arg,
3206 ExtraHeaders: nil,
3207 }
3208
3209 var resp []byte
3210 var respBody io.ReadCloser
3211 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3212 if err != nil {
3213 var appErr ReportsGetActivityAPIError
3214 err = auth.ParseError(err, &appErr)
3215 if err == &appErr {
3216 err = appErr
3217 }
3218 return
3219 }
3220
3221 err = json.Unmarshal(resp, &res)
3222 if err != nil {
3223 return
3224 }
3225
3226 _ = respBody
3227 return
3228 }
3229
3230 //ReportsGetDevicesAPIError is an error-wrapper for the reports/get_devices route
3231 type ReportsGetDevicesAPIError struct {
3232 dropbox.APIError
3233 EndpointError *DateRangeError `json:"error"`
3234 }
3235
3236 func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error) {
3237 log.Printf("WARNING: API `ReportsGetDevices` is deprecated")
3238
3239 req := dropbox.Request{
3240 Host: "api",
3241 Namespace: "team",
3242 Route: "reports/get_devices",
3243 Auth: "team",
3244 Style: "rpc",
3245 Arg: arg,
3246 ExtraHeaders: nil,
3247 }
3248
3249 var resp []byte
3250 var respBody io.ReadCloser
3251 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3252 if err != nil {
3253 var appErr ReportsGetDevicesAPIError
3254 err = auth.ParseError(err, &appErr)
3255 if err == &appErr {
3256 err = appErr
3257 }
3258 return
3259 }
3260
3261 err = json.Unmarshal(resp, &res)
3262 if err != nil {
3263 return
3264 }
3265
3266 _ = respBody
3267 return
3268 }
3269
3270 //ReportsGetMembershipAPIError is an error-wrapper for the reports/get_membership route
3271 type ReportsGetMembershipAPIError struct {
3272 dropbox.APIError
3273 EndpointError *DateRangeError `json:"error"`
3274 }
3275
3276 func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error) {
3277 log.Printf("WARNING: API `ReportsGetMembership` is deprecated")
3278
3279 req := dropbox.Request{
3280 Host: "api",
3281 Namespace: "team",
3282 Route: "reports/get_membership",
3283 Auth: "team",
3284 Style: "rpc",
3285 Arg: arg,
3286 ExtraHeaders: nil,
3287 }
3288
3289 var resp []byte
3290 var respBody io.ReadCloser
3291 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3292 if err != nil {
3293 var appErr ReportsGetMembershipAPIError
3294 err = auth.ParseError(err, &appErr)
3295 if err == &appErr {
3296 err = appErr
3297 }
3298 return
3299 }
3300
3301 err = json.Unmarshal(resp, &res)
3302 if err != nil {
3303 return
3304 }
3305
3306 _ = respBody
3307 return
3308 }
3309
3310 //ReportsGetStorageAPIError is an error-wrapper for the reports/get_storage route
3311 type ReportsGetStorageAPIError struct {
3312 dropbox.APIError
3313 EndpointError *DateRangeError `json:"error"`
3314 }
3315
3316 func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error) {
3317 log.Printf("WARNING: API `ReportsGetStorage` is deprecated")
3318
3319 req := dropbox.Request{
3320 Host: "api",
3321 Namespace: "team",
3322 Route: "reports/get_storage",
3323 Auth: "team",
3324 Style: "rpc",
3325 Arg: arg,
3326 ExtraHeaders: nil,
3327 }
3328
3329 var resp []byte
3330 var respBody io.ReadCloser
3331 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3332 if err != nil {
3333 var appErr ReportsGetStorageAPIError
3334 err = auth.ParseError(err, &appErr)
3335 if err == &appErr {
3336 err = appErr
3337 }
3338 return
3339 }
3340
3341 err = json.Unmarshal(resp, &res)
3342 if err != nil {
3343 return
3344 }
3345
3346 _ = respBody
3347 return
3348 }
3349
3350 //TeamFolderActivateAPIError is an error-wrapper for the team_folder/activate route
3351 type TeamFolderActivateAPIError struct {
3352 dropbox.APIError
3353 EndpointError *TeamFolderActivateError `json:"error"`
3354 }
3355
3356 func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error) {
3357 req := dropbox.Request{
3358 Host: "api",
3359 Namespace: "team",
3360 Route: "team_folder/activate",
3361 Auth: "team",
3362 Style: "rpc",
3363 Arg: arg,
3364 ExtraHeaders: nil,
3365 }
3366
3367 var resp []byte
3368 var respBody io.ReadCloser
3369 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3370 if err != nil {
3371 var appErr TeamFolderActivateAPIError
3372 err = auth.ParseError(err, &appErr)
3373 if err == &appErr {
3374 err = appErr
3375 }
3376 return
3377 }
3378
3379 err = json.Unmarshal(resp, &res)
3380 if err != nil {
3381 return
3382 }
3383
3384 _ = respBody
3385 return
3386 }
3387
3388 //TeamFolderArchiveAPIError is an error-wrapper for the team_folder/archive route
3389 type TeamFolderArchiveAPIError struct {
3390 dropbox.APIError
3391 EndpointError *TeamFolderArchiveError `json:"error"`
3392 }
3393
3394 func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error) {
3395 req := dropbox.Request{
3396 Host: "api",
3397 Namespace: "team",
3398 Route: "team_folder/archive",
3399 Auth: "team",
3400 Style: "rpc",
3401 Arg: arg,
3402 ExtraHeaders: nil,
3403 }
3404
3405 var resp []byte
3406 var respBody io.ReadCloser
3407 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3408 if err != nil {
3409 var appErr TeamFolderArchiveAPIError
3410 err = auth.ParseError(err, &appErr)
3411 if err == &appErr {
3412 err = appErr
3413 }
3414 return
3415 }
3416
3417 err = json.Unmarshal(resp, &res)
3418 if err != nil {
3419 return
3420 }
3421
3422 _ = respBody
3423 return
3424 }
3425
3426 //TeamFolderArchiveCheckAPIError is an error-wrapper for the team_folder/archive/check route
3427 type TeamFolderArchiveCheckAPIError struct {
3428 dropbox.APIError
3429 EndpointError *async.PollError `json:"error"`
3430 }
3431
3432 func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error) {
3433 req := dropbox.Request{
3434 Host: "api",
3435 Namespace: "team",
3436 Route: "team_folder/archive/check",
3437 Auth: "team",
3438 Style: "rpc",
3439 Arg: arg,
3440 ExtraHeaders: nil,
3441 }
3442
3443 var resp []byte
3444 var respBody io.ReadCloser
3445 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3446 if err != nil {
3447 var appErr TeamFolderArchiveCheckAPIError
3448 err = auth.ParseError(err, &appErr)
3449 if err == &appErr {
3450 err = appErr
3451 }
3452 return
3453 }
3454
3455 err = json.Unmarshal(resp, &res)
3456 if err != nil {
3457 return
3458 }
3459
3460 _ = respBody
3461 return
3462 }
3463
3464 //TeamFolderCreateAPIError is an error-wrapper for the team_folder/create route
3465 type TeamFolderCreateAPIError struct {
3466 dropbox.APIError
3467 EndpointError *TeamFolderCreateError `json:"error"`
3468 }
3469
3470 func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error) {
3471 req := dropbox.Request{
3472 Host: "api",
3473 Namespace: "team",
3474 Route: "team_folder/create",
3475 Auth: "team",
3476 Style: "rpc",
3477 Arg: arg,
3478 ExtraHeaders: nil,
3479 }
3480
3481 var resp []byte
3482 var respBody io.ReadCloser
3483 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3484 if err != nil {
3485 var appErr TeamFolderCreateAPIError
3486 err = auth.ParseError(err, &appErr)
3487 if err == &appErr {
3488 err = appErr
3489 }
3490 return
3491 }
3492
3493 err = json.Unmarshal(resp, &res)
3494 if err != nil {
3495 return
3496 }
3497
3498 _ = respBody
3499 return
3500 }
3501
3502 //TeamFolderGetInfoAPIError is an error-wrapper for the team_folder/get_info route
3503 type TeamFolderGetInfoAPIError struct {
3504 dropbox.APIError
3505 EndpointError struct{} `json:"error"`
3506 }
3507
3508 func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error) {
3509 req := dropbox.Request{
3510 Host: "api",
3511 Namespace: "team",
3512 Route: "team_folder/get_info",
3513 Auth: "team",
3514 Style: "rpc",
3515 Arg: arg,
3516 ExtraHeaders: nil,
3517 }
3518
3519 var resp []byte
3520 var respBody io.ReadCloser
3521 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3522 if err != nil {
3523 var appErr TeamFolderGetInfoAPIError
3524 err = auth.ParseError(err, &appErr)
3525 if err == &appErr {
3526 err = appErr
3527 }
3528 return
3529 }
3530
3531 err = json.Unmarshal(resp, &res)
3532 if err != nil {
3533 return
3534 }
3535
3536 _ = respBody
3537 return
3538 }
3539
3540 //TeamFolderListAPIError is an error-wrapper for the team_folder/list route
3541 type TeamFolderListAPIError struct {
3542 dropbox.APIError
3543 EndpointError *TeamFolderListError `json:"error"`
3544 }
3545
3546 func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error) {
3547 req := dropbox.Request{
3548 Host: "api",
3549 Namespace: "team",
3550 Route: "team_folder/list",
3551 Auth: "team",
3552 Style: "rpc",
3553 Arg: arg,
3554 ExtraHeaders: nil,
3555 }
3556
3557 var resp []byte
3558 var respBody io.ReadCloser
3559 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3560 if err != nil {
3561 var appErr TeamFolderListAPIError
3562 err = auth.ParseError(err, &appErr)
3563 if err == &appErr {
3564 err = appErr
3565 }
3566 return
3567 }
3568
3569 err = json.Unmarshal(resp, &res)
3570 if err != nil {
3571 return
3572 }
3573
3574 _ = respBody
3575 return
3576 }
3577
3578 //TeamFolderListContinueAPIError is an error-wrapper for the team_folder/list/continue route
3579 type TeamFolderListContinueAPIError struct {
3580 dropbox.APIError
3581 EndpointError *TeamFolderListContinueError `json:"error"`
3582 }
3583
3584 func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error) {
3585 req := dropbox.Request{
3586 Host: "api",
3587 Namespace: "team",
3588 Route: "team_folder/list/continue",
3589 Auth: "team",
3590 Style: "rpc",
3591 Arg: arg,
3592 ExtraHeaders: nil,
3593 }
3594
3595 var resp []byte
3596 var respBody io.ReadCloser
3597 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3598 if err != nil {
3599 var appErr TeamFolderListContinueAPIError
3600 err = auth.ParseError(err, &appErr)
3601 if err == &appErr {
3602 err = appErr
3603 }
3604 return
3605 }
3606
3607 err = json.Unmarshal(resp, &res)
3608 if err != nil {
3609 return
3610 }
3611
3612 _ = respBody
3613 return
3614 }
3615
3616 //TeamFolderPermanentlyDeleteAPIError is an error-wrapper for the team_folder/permanently_delete route
3617 type TeamFolderPermanentlyDeleteAPIError struct {
3618 dropbox.APIError
3619 EndpointError *TeamFolderPermanentlyDeleteError `json:"error"`
3620 }
3621
3622 func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error) {
3623 req := dropbox.Request{
3624 Host: "api",
3625 Namespace: "team",
3626 Route: "team_folder/permanently_delete",
3627 Auth: "team",
3628 Style: "rpc",
3629 Arg: arg,
3630 ExtraHeaders: nil,
3631 }
3632
3633 var resp []byte
3634 var respBody io.ReadCloser
3635 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3636 if err != nil {
3637 var appErr TeamFolderPermanentlyDeleteAPIError
3638 err = auth.ParseError(err, &appErr)
3639 if err == &appErr {
3640 err = appErr
3641 }
3642 return
3643 }
3644
3645 _ = resp
3646 _ = respBody
3647 return
3648 }
3649
3650 //TeamFolderRenameAPIError is an error-wrapper for the team_folder/rename route
3651 type TeamFolderRenameAPIError struct {
3652 dropbox.APIError
3653 EndpointError *TeamFolderRenameError `json:"error"`
3654 }
3655
3656 func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error) {
3657 req := dropbox.Request{
3658 Host: "api",
3659 Namespace: "team",
3660 Route: "team_folder/rename",
3661 Auth: "team",
3662 Style: "rpc",
3663 Arg: arg,
3664 ExtraHeaders: nil,
3665 }
3666
3667 var resp []byte
3668 var respBody io.ReadCloser
3669 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3670 if err != nil {
3671 var appErr TeamFolderRenameAPIError
3672 err = auth.ParseError(err, &appErr)
3673 if err == &appErr {
3674 err = appErr
3675 }
3676 return
3677 }
3678
3679 err = json.Unmarshal(resp, &res)
3680 if err != nil {
3681 return
3682 }
3683
3684 _ = respBody
3685 return
3686 }
3687
3688 //TeamFolderUpdateSyncSettingsAPIError is an error-wrapper for the team_folder/update_sync_settings route
3689 type TeamFolderUpdateSyncSettingsAPIError struct {
3690 dropbox.APIError
3691 EndpointError *TeamFolderUpdateSyncSettingsError `json:"error"`
3692 }
3693
3694 func (dbx *apiImpl) TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error) {
3695 req := dropbox.Request{
3696 Host: "api",
3697 Namespace: "team",
3698 Route: "team_folder/update_sync_settings",
3699 Auth: "team",
3700 Style: "rpc",
3701 Arg: arg,
3702 ExtraHeaders: nil,
3703 }
3704
3705 var resp []byte
3706 var respBody io.ReadCloser
3707 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3708 if err != nil {
3709 var appErr TeamFolderUpdateSyncSettingsAPIError
3710 err = auth.ParseError(err, &appErr)
3711 if err == &appErr {
3712 err = appErr
3713 }
3714 return
3715 }
3716
3717 err = json.Unmarshal(resp, &res)
3718 if err != nil {
3719 return
3720 }
3721
3722 _ = respBody
3723 return
3724 }
3725
3726 //TokenGetAuthenticatedAdminAPIError is an error-wrapper for the token/get_authenticated_admin route
3727 type TokenGetAuthenticatedAdminAPIError struct {
3728 dropbox.APIError
3729 EndpointError *TokenGetAuthenticatedAdminError `json:"error"`
3730 }
3731
3732 func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error) {
3733 req := dropbox.Request{
3734 Host: "api",
3735 Namespace: "team",
3736 Route: "token/get_authenticated_admin",
3737 Auth: "team",
3738 Style: "rpc",
3739 Arg: nil,
3740 ExtraHeaders: nil,
3741 }
3742
3743 var resp []byte
3744 var respBody io.ReadCloser
3745 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
3746 if err != nil {
3747 var appErr TokenGetAuthenticatedAdminAPIError
3748 err = auth.ParseError(err, &appErr)
3749 if err == &appErr {
3750 err = appErr
3751 }
3752 return
3753 }
3754
3755 err = json.Unmarshal(resp, &res)
3756 if err != nil {
3757 return
3758 }
3759
3760 _ = respBody
3761 return
3762 }
3763
3764 // New returns a Client implementation for this namespace
3765 func New(c dropbox.Config) Client {
3766 ctx := apiImpl(dropbox.NewContext(c))
3767 return &ctx
3768 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team : has no documentation (yet)
21 package team
22
23 import (
24 "encoding/json"
25 "time"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/account"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/secondary_emails"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
33 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users"
34 )
35
36 // DeviceSession : has no documentation (yet)
37 type DeviceSession struct {
38 // SessionId : The session id.
39 SessionId string `json:"session_id"`
40 // IpAddress : The IP address of the last activity from this session.
41 IpAddress string `json:"ip_address,omitempty"`
42 // Country : The country from which the last activity from this session was
43 // made.
44 Country string `json:"country,omitempty"`
45 // Created : The time this session was created.
46 Created *time.Time `json:"created,omitempty"`
47 // Updated : The time of the last activity from this session.
48 Updated *time.Time `json:"updated,omitempty"`
49 }
50
51 // NewDeviceSession returns a new DeviceSession instance
52 func NewDeviceSession(SessionId string) *DeviceSession {
53 s := new(DeviceSession)
54 s.SessionId = SessionId
55 return s
56 }
57
58 // ActiveWebSession : Information on active web sessions.
59 type ActiveWebSession struct {
60 DeviceSession
61 // UserAgent : Information on the hosting device.
62 UserAgent string `json:"user_agent"`
63 // Os : Information on the hosting operating system.
64 Os string `json:"os"`
65 // Browser : Information on the browser used for this web session.
66 Browser string `json:"browser"`
67 // Expires : The time this session expires.
68 Expires *time.Time `json:"expires,omitempty"`
69 }
70
71 // NewActiveWebSession returns a new ActiveWebSession instance
72 func NewActiveWebSession(SessionId string, UserAgent string, Os string, Browser string) *ActiveWebSession {
73 s := new(ActiveWebSession)
74 s.SessionId = SessionId
75 s.UserAgent = UserAgent
76 s.Os = Os
77 s.Browser = Browser
78 return s
79 }
80
81 // AddSecondaryEmailResult : Result of trying to add a secondary email to a
82 // user. 'success' is the only value indicating that a secondary email was
83 // successfully added to a user. The other values explain the type of error that
84 // occurred, and include the email for which the error occurred.
85 type AddSecondaryEmailResult struct {
86 dropbox.Tagged
87 // Success : Describes a secondary email that was successfully added to a
88 // user.
89 Success *secondary_emails.SecondaryEmail `json:"success,omitempty"`
90 // Unavailable : Secondary email is not available to be claimed by the user.
91 Unavailable string `json:"unavailable,omitempty"`
92 // AlreadyPending : Secondary email is already a pending email for the user.
93 AlreadyPending string `json:"already_pending,omitempty"`
94 // AlreadyOwnedByUser : Secondary email is already a verified email for the
95 // user.
96 AlreadyOwnedByUser string `json:"already_owned_by_user,omitempty"`
97 // ReachedLimit : User already has the maximum number of secondary emails
98 // allowed.
99 ReachedLimit string `json:"reached_limit,omitempty"`
100 // TransientError : A transient error occurred. Please try again later.
101 TransientError string `json:"transient_error,omitempty"`
102 // TooManyUpdates : An error occurred due to conflicting updates. Please try
103 // again later.
104 TooManyUpdates string `json:"too_many_updates,omitempty"`
105 // UnknownError : An unknown error occurred.
106 UnknownError string `json:"unknown_error,omitempty"`
107 // RateLimited : Too many emails are being sent to this email address.
108 // Please try again later.
109 RateLimited string `json:"rate_limited,omitempty"`
110 }
111
112 // Valid tag values for AddSecondaryEmailResult
113 const (
114 AddSecondaryEmailResultSuccess = "success"
115 AddSecondaryEmailResultUnavailable = "unavailable"
116 AddSecondaryEmailResultAlreadyPending = "already_pending"
117 AddSecondaryEmailResultAlreadyOwnedByUser = "already_owned_by_user"
118 AddSecondaryEmailResultReachedLimit = "reached_limit"
119 AddSecondaryEmailResultTransientError = "transient_error"
120 AddSecondaryEmailResultTooManyUpdates = "too_many_updates"
121 AddSecondaryEmailResultUnknownError = "unknown_error"
122 AddSecondaryEmailResultRateLimited = "rate_limited"
123 AddSecondaryEmailResultOther = "other"
124 )
125
126 // UnmarshalJSON deserializes into a AddSecondaryEmailResult instance
127 func (u *AddSecondaryEmailResult) UnmarshalJSON(body []byte) error {
128 type wrap struct {
129 dropbox.Tagged
130 // Unavailable : Secondary email is not available to be claimed by the
131 // user.
132 Unavailable string `json:"unavailable,omitempty"`
133 // AlreadyPending : Secondary email is already a pending email for the
134 // user.
135 AlreadyPending string `json:"already_pending,omitempty"`
136 // AlreadyOwnedByUser : Secondary email is already a verified email for
137 // the user.
138 AlreadyOwnedByUser string `json:"already_owned_by_user,omitempty"`
139 // ReachedLimit : User already has the maximum number of secondary
140 // emails allowed.
141 ReachedLimit string `json:"reached_limit,omitempty"`
142 // TransientError : A transient error occurred. Please try again later.
143 TransientError string `json:"transient_error,omitempty"`
144 // TooManyUpdates : An error occurred due to conflicting updates. Please
145 // try again later.
146 TooManyUpdates string `json:"too_many_updates,omitempty"`
147 // UnknownError : An unknown error occurred.
148 UnknownError string `json:"unknown_error,omitempty"`
149 // RateLimited : Too many emails are being sent to this email address.
150 // Please try again later.
151 RateLimited string `json:"rate_limited,omitempty"`
152 }
153 var w wrap
154 var err error
155 if err = json.Unmarshal(body, &w); err != nil {
156 return err
157 }
158 u.Tag = w.Tag
159 switch u.Tag {
160 case "success":
161 err = json.Unmarshal(body, &u.Success)
162
163 if err != nil {
164 return err
165 }
166 case "unavailable":
167 u.Unavailable = w.Unavailable
168
169 if err != nil {
170 return err
171 }
172 case "already_pending":
173 u.AlreadyPending = w.AlreadyPending
174
175 if err != nil {
176 return err
177 }
178 case "already_owned_by_user":
179 u.AlreadyOwnedByUser = w.AlreadyOwnedByUser
180
181 if err != nil {
182 return err
183 }
184 case "reached_limit":
185 u.ReachedLimit = w.ReachedLimit
186
187 if err != nil {
188 return err
189 }
190 case "transient_error":
191 u.TransientError = w.TransientError
192
193 if err != nil {
194 return err
195 }
196 case "too_many_updates":
197 u.TooManyUpdates = w.TooManyUpdates
198
199 if err != nil {
200 return err
201 }
202 case "unknown_error":
203 u.UnknownError = w.UnknownError
204
205 if err != nil {
206 return err
207 }
208 case "rate_limited":
209 u.RateLimited = w.RateLimited
210
211 if err != nil {
212 return err
213 }
214 }
215 return nil
216 }
217
218 // AddSecondaryEmailsArg : has no documentation (yet)
219 type AddSecondaryEmailsArg struct {
220 // NewSecondaryEmails : List of users and secondary emails to add.
221 NewSecondaryEmails []*UserSecondaryEmailsArg `json:"new_secondary_emails"`
222 }
223
224 // NewAddSecondaryEmailsArg returns a new AddSecondaryEmailsArg instance
225 func NewAddSecondaryEmailsArg(NewSecondaryEmails []*UserSecondaryEmailsArg) *AddSecondaryEmailsArg {
226 s := new(AddSecondaryEmailsArg)
227 s.NewSecondaryEmails = NewSecondaryEmails
228 return s
229 }
230
231 // AddSecondaryEmailsError : Error returned when adding secondary emails fails.
232 type AddSecondaryEmailsError struct {
233 dropbox.Tagged
234 }
235
236 // Valid tag values for AddSecondaryEmailsError
237 const (
238 AddSecondaryEmailsErrorSecondaryEmailsDisabled = "secondary_emails_disabled"
239 AddSecondaryEmailsErrorTooManyEmails = "too_many_emails"
240 AddSecondaryEmailsErrorOther = "other"
241 )
242
243 // AddSecondaryEmailsResult : has no documentation (yet)
244 type AddSecondaryEmailsResult struct {
245 // Results : List of users and secondary email results.
246 Results []*UserAddResult `json:"results"`
247 }
248
249 // NewAddSecondaryEmailsResult returns a new AddSecondaryEmailsResult instance
250 func NewAddSecondaryEmailsResult(Results []*UserAddResult) *AddSecondaryEmailsResult {
251 s := new(AddSecondaryEmailsResult)
252 s.Results = Results
253 return s
254 }
255
256 // AdminTier : Describes which team-related admin permissions a user has.
257 type AdminTier struct {
258 dropbox.Tagged
259 }
260
261 // Valid tag values for AdminTier
262 const (
263 AdminTierTeamAdmin = "team_admin"
264 AdminTierUserManagementAdmin = "user_management_admin"
265 AdminTierSupportAdmin = "support_admin"
266 AdminTierMemberOnly = "member_only"
267 )
268
269 // ApiApp : Information on linked third party applications.
270 type ApiApp struct {
271 // AppId : The application unique id.
272 AppId string `json:"app_id"`
273 // AppName : The application name.
274 AppName string `json:"app_name"`
275 // Publisher : The application publisher name.
276 Publisher string `json:"publisher,omitempty"`
277 // PublisherUrl : The publisher's URL.
278 PublisherUrl string `json:"publisher_url,omitempty"`
279 // Linked : The time this application was linked.
280 Linked *time.Time `json:"linked,omitempty"`
281 // IsAppFolder : Whether the linked application uses a dedicated folder.
282 IsAppFolder bool `json:"is_app_folder"`
283 }
284
285 // NewApiApp returns a new ApiApp instance
286 func NewApiApp(AppId string, AppName string, IsAppFolder bool) *ApiApp {
287 s := new(ApiApp)
288 s.AppId = AppId
289 s.AppName = AppName
290 s.IsAppFolder = IsAppFolder
291 return s
292 }
293
294 // BaseDfbReport : Base report structure.
295 type BaseDfbReport struct {
296 // StartDate : First date present in the results as 'YYYY-MM-DD' or None.
297 StartDate string `json:"start_date"`
298 }
299
300 // NewBaseDfbReport returns a new BaseDfbReport instance
301 func NewBaseDfbReport(StartDate string) *BaseDfbReport {
302 s := new(BaseDfbReport)
303 s.StartDate = StartDate
304 return s
305 }
306
307 // BaseTeamFolderError : Base error that all errors for existing team folders
308 // should extend.
309 type BaseTeamFolderError struct {
310 dropbox.Tagged
311 // AccessError : has no documentation (yet)
312 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
313 // StatusError : has no documentation (yet)
314 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
315 // TeamSharedDropboxError : has no documentation (yet)
316 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
317 }
318
319 // Valid tag values for BaseTeamFolderError
320 const (
321 BaseTeamFolderErrorAccessError = "access_error"
322 BaseTeamFolderErrorStatusError = "status_error"
323 BaseTeamFolderErrorTeamSharedDropboxError = "team_shared_dropbox_error"
324 BaseTeamFolderErrorOther = "other"
325 )
326
327 // UnmarshalJSON deserializes into a BaseTeamFolderError instance
328 func (u *BaseTeamFolderError) UnmarshalJSON(body []byte) error {
329 type wrap struct {
330 dropbox.Tagged
331 // AccessError : has no documentation (yet)
332 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
333 // StatusError : has no documentation (yet)
334 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
335 // TeamSharedDropboxError : has no documentation (yet)
336 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
337 }
338 var w wrap
339 var err error
340 if err = json.Unmarshal(body, &w); err != nil {
341 return err
342 }
343 u.Tag = w.Tag
344 switch u.Tag {
345 case "access_error":
346 u.AccessError = w.AccessError
347
348 if err != nil {
349 return err
350 }
351 case "status_error":
352 u.StatusError = w.StatusError
353
354 if err != nil {
355 return err
356 }
357 case "team_shared_dropbox_error":
358 u.TeamSharedDropboxError = w.TeamSharedDropboxError
359
360 if err != nil {
361 return err
362 }
363 }
364 return nil
365 }
366
367 // CustomQuotaError : Error returned when getting member custom quota.
368 type CustomQuotaError struct {
369 dropbox.Tagged
370 }
371
372 // Valid tag values for CustomQuotaError
373 const (
374 CustomQuotaErrorTooManyUsers = "too_many_users"
375 CustomQuotaErrorOther = "other"
376 )
377
378 // CustomQuotaResult : User custom quota.
379 type CustomQuotaResult struct {
380 dropbox.Tagged
381 // Success : User's custom quota.
382 Success *UserCustomQuotaResult `json:"success,omitempty"`
383 // InvalidUser : Invalid user (not in team).
384 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
385 }
386
387 // Valid tag values for CustomQuotaResult
388 const (
389 CustomQuotaResultSuccess = "success"
390 CustomQuotaResultInvalidUser = "invalid_user"
391 CustomQuotaResultOther = "other"
392 )
393
394 // UnmarshalJSON deserializes into a CustomQuotaResult instance
395 func (u *CustomQuotaResult) UnmarshalJSON(body []byte) error {
396 type wrap struct {
397 dropbox.Tagged
398 // InvalidUser : Invalid user (not in team).
399 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
400 }
401 var w wrap
402 var err error
403 if err = json.Unmarshal(body, &w); err != nil {
404 return err
405 }
406 u.Tag = w.Tag
407 switch u.Tag {
408 case "success":
409 err = json.Unmarshal(body, &u.Success)
410
411 if err != nil {
412 return err
413 }
414 case "invalid_user":
415 u.InvalidUser = w.InvalidUser
416
417 if err != nil {
418 return err
419 }
420 }
421 return nil
422 }
423
424 // CustomQuotaUsersArg : has no documentation (yet)
425 type CustomQuotaUsersArg struct {
426 // Users : List of users.
427 Users []*UserSelectorArg `json:"users"`
428 }
429
430 // NewCustomQuotaUsersArg returns a new CustomQuotaUsersArg instance
431 func NewCustomQuotaUsersArg(Users []*UserSelectorArg) *CustomQuotaUsersArg {
432 s := new(CustomQuotaUsersArg)
433 s.Users = Users
434 return s
435 }
436
437 // DateRange : Input arguments that can be provided for most reports.
438 type DateRange struct {
439 // StartDate : Optional starting date (inclusive). If start_date is None or
440 // too long ago, this field will be set to 6 months ago.
441 StartDate *time.Time `json:"start_date,omitempty"`
442 // EndDate : Optional ending date (exclusive).
443 EndDate *time.Time `json:"end_date,omitempty"`
444 }
445
446 // NewDateRange returns a new DateRange instance
447 func NewDateRange() *DateRange {
448 s := new(DateRange)
449 return s
450 }
451
452 // DateRangeError : Errors that can originate from problems in input arguments
453 // to reports.
454 type DateRangeError struct {
455 dropbox.Tagged
456 }
457
458 // Valid tag values for DateRangeError
459 const (
460 DateRangeErrorOther = "other"
461 )
462
463 // DeleteSecondaryEmailResult : Result of trying to delete a secondary email
464 // address. 'success' is the only value indicating that a secondary email was
465 // successfully deleted. The other values explain the type of error that
466 // occurred, and include the email for which the error occurred.
467 type DeleteSecondaryEmailResult struct {
468 dropbox.Tagged
469 // Success : The secondary email was successfully deleted.
470 Success string `json:"success,omitempty"`
471 // NotFound : The email address was not found for the user.
472 NotFound string `json:"not_found,omitempty"`
473 // CannotRemovePrimary : The email address is the primary email address of
474 // the user, and cannot be removed.
475 CannotRemovePrimary string `json:"cannot_remove_primary,omitempty"`
476 }
477
478 // Valid tag values for DeleteSecondaryEmailResult
479 const (
480 DeleteSecondaryEmailResultSuccess = "success"
481 DeleteSecondaryEmailResultNotFound = "not_found"
482 DeleteSecondaryEmailResultCannotRemovePrimary = "cannot_remove_primary"
483 DeleteSecondaryEmailResultOther = "other"
484 )
485
486 // UnmarshalJSON deserializes into a DeleteSecondaryEmailResult instance
487 func (u *DeleteSecondaryEmailResult) UnmarshalJSON(body []byte) error {
488 type wrap struct {
489 dropbox.Tagged
490 // Success : The secondary email was successfully deleted.
491 Success string `json:"success,omitempty"`
492 // NotFound : The email address was not found for the user.
493 NotFound string `json:"not_found,omitempty"`
494 // CannotRemovePrimary : The email address is the primary email address
495 // of the user, and cannot be removed.
496 CannotRemovePrimary string `json:"cannot_remove_primary,omitempty"`
497 }
498 var w wrap
499 var err error
500 if err = json.Unmarshal(body, &w); err != nil {
501 return err
502 }
503 u.Tag = w.Tag
504 switch u.Tag {
505 case "success":
506 u.Success = w.Success
507
508 if err != nil {
509 return err
510 }
511 case "not_found":
512 u.NotFound = w.NotFound
513
514 if err != nil {
515 return err
516 }
517 case "cannot_remove_primary":
518 u.CannotRemovePrimary = w.CannotRemovePrimary
519
520 if err != nil {
521 return err
522 }
523 }
524 return nil
525 }
526
527 // DeleteSecondaryEmailsArg : has no documentation (yet)
528 type DeleteSecondaryEmailsArg struct {
529 // EmailsToDelete : List of users and their secondary emails to delete.
530 EmailsToDelete []*UserSecondaryEmailsArg `json:"emails_to_delete"`
531 }
532
533 // NewDeleteSecondaryEmailsArg returns a new DeleteSecondaryEmailsArg instance
534 func NewDeleteSecondaryEmailsArg(EmailsToDelete []*UserSecondaryEmailsArg) *DeleteSecondaryEmailsArg {
535 s := new(DeleteSecondaryEmailsArg)
536 s.EmailsToDelete = EmailsToDelete
537 return s
538 }
539
540 // DeleteSecondaryEmailsResult : has no documentation (yet)
541 type DeleteSecondaryEmailsResult struct {
542 // Results : has no documentation (yet)
543 Results []*UserDeleteResult `json:"results"`
544 }
545
546 // NewDeleteSecondaryEmailsResult returns a new DeleteSecondaryEmailsResult instance
547 func NewDeleteSecondaryEmailsResult(Results []*UserDeleteResult) *DeleteSecondaryEmailsResult {
548 s := new(DeleteSecondaryEmailsResult)
549 s.Results = Results
550 return s
551 }
552
553 // DesktopClientSession : Information about linked Dropbox desktop client
554 // sessions.
555 type DesktopClientSession struct {
556 DeviceSession
557 // HostName : Name of the hosting desktop.
558 HostName string `json:"host_name"`
559 // ClientType : The Dropbox desktop client type.
560 ClientType *DesktopPlatform `json:"client_type"`
561 // ClientVersion : The Dropbox client version.
562 ClientVersion string `json:"client_version"`
563 // Platform : Information on the hosting platform.
564 Platform string `json:"platform"`
565 // IsDeleteOnUnlinkSupported : Whether it's possible to delete all of the
566 // account files upon unlinking.
567 IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"`
568 }
569
570 // NewDesktopClientSession returns a new DesktopClientSession instance
571 func NewDesktopClientSession(SessionId string, HostName string, ClientType *DesktopPlatform, ClientVersion string, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopClientSession {
572 s := new(DesktopClientSession)
573 s.SessionId = SessionId
574 s.HostName = HostName
575 s.ClientType = ClientType
576 s.ClientVersion = ClientVersion
577 s.Platform = Platform
578 s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported
579 return s
580 }
581
582 // DesktopPlatform : has no documentation (yet)
583 type DesktopPlatform struct {
584 dropbox.Tagged
585 }
586
587 // Valid tag values for DesktopPlatform
588 const (
589 DesktopPlatformWindows = "windows"
590 DesktopPlatformMac = "mac"
591 DesktopPlatformLinux = "linux"
592 DesktopPlatformOther = "other"
593 )
594
595 // DeviceSessionArg : has no documentation (yet)
596 type DeviceSessionArg struct {
597 // SessionId : The session id.
598 SessionId string `json:"session_id"`
599 // TeamMemberId : The unique id of the member owning the device.
600 TeamMemberId string `json:"team_member_id"`
601 }
602
603 // NewDeviceSessionArg returns a new DeviceSessionArg instance
604 func NewDeviceSessionArg(SessionId string, TeamMemberId string) *DeviceSessionArg {
605 s := new(DeviceSessionArg)
606 s.SessionId = SessionId
607 s.TeamMemberId = TeamMemberId
608 return s
609 }
610
611 // DevicesActive : Each of the items is an array of values, one value per day.
612 // The value is the number of devices active within a time window, ending with
613 // that day. If there is no data for a day, then the value will be None.
614 type DevicesActive struct {
615 // Windows : Array of number of linked windows (desktop) clients with
616 // activity.
617 Windows []uint64 `json:"windows"`
618 // Macos : Array of number of linked mac (desktop) clients with activity.
619 Macos []uint64 `json:"macos"`
620 // Linux : Array of number of linked linus (desktop) clients with activity.
621 Linux []uint64 `json:"linux"`
622 // Ios : Array of number of linked ios devices with activity.
623 Ios []uint64 `json:"ios"`
624 // Android : Array of number of linked android devices with activity.
625 Android []uint64 `json:"android"`
626 // Other : Array of number of other linked devices (blackberry, windows
627 // phone, etc) with activity.
628 Other []uint64 `json:"other"`
629 // Total : Array of total number of linked clients with activity.
630 Total []uint64 `json:"total"`
631 }
632
633 // NewDevicesActive returns a new DevicesActive instance
634 func NewDevicesActive(Windows []uint64, Macos []uint64, Linux []uint64, Ios []uint64, Android []uint64, Other []uint64, Total []uint64) *DevicesActive {
635 s := new(DevicesActive)
636 s.Windows = Windows
637 s.Macos = Macos
638 s.Linux = Linux
639 s.Ios = Ios
640 s.Android = Android
641 s.Other = Other
642 s.Total = Total
643 return s
644 }
645
646 // ExcludedUsersListArg : Excluded users list argument.
647 type ExcludedUsersListArg struct {
648 // Limit : Number of results to return per call.
649 Limit uint32 `json:"limit"`
650 }
651
652 // NewExcludedUsersListArg returns a new ExcludedUsersListArg instance
653 func NewExcludedUsersListArg() *ExcludedUsersListArg {
654 s := new(ExcludedUsersListArg)
655 s.Limit = 1000
656 return s
657 }
658
659 // ExcludedUsersListContinueArg : Excluded users list continue argument.
660 type ExcludedUsersListContinueArg struct {
661 // Cursor : Indicates from what point to get the next set of users.
662 Cursor string `json:"cursor"`
663 }
664
665 // NewExcludedUsersListContinueArg returns a new ExcludedUsersListContinueArg instance
666 func NewExcludedUsersListContinueArg(Cursor string) *ExcludedUsersListContinueArg {
667 s := new(ExcludedUsersListContinueArg)
668 s.Cursor = Cursor
669 return s
670 }
671
672 // ExcludedUsersListContinueError : Excluded users list continue error.
673 type ExcludedUsersListContinueError struct {
674 dropbox.Tagged
675 }
676
677 // Valid tag values for ExcludedUsersListContinueError
678 const (
679 ExcludedUsersListContinueErrorInvalidCursor = "invalid_cursor"
680 ExcludedUsersListContinueErrorOther = "other"
681 )
682
683 // ExcludedUsersListError : Excluded users list error.
684 type ExcludedUsersListError struct {
685 dropbox.Tagged
686 }
687
688 // Valid tag values for ExcludedUsersListError
689 const (
690 ExcludedUsersListErrorListError = "list_error"
691 ExcludedUsersListErrorOther = "other"
692 )
693
694 // ExcludedUsersListResult : Excluded users list result.
695 type ExcludedUsersListResult struct {
696 // Users : has no documentation (yet)
697 Users []*MemberProfile `json:"users"`
698 // Cursor : Pass the cursor into
699 // `memberSpaceLimitsExcludedUsersListContinue` to obtain additional
700 // excluded users.
701 Cursor string `json:"cursor,omitempty"`
702 // HasMore : Is true if there are additional excluded users that have not
703 // been returned yet. An additional call to
704 // `memberSpaceLimitsExcludedUsersListContinue` can retrieve them.
705 HasMore bool `json:"has_more"`
706 }
707
708 // NewExcludedUsersListResult returns a new ExcludedUsersListResult instance
709 func NewExcludedUsersListResult(Users []*MemberProfile, HasMore bool) *ExcludedUsersListResult {
710 s := new(ExcludedUsersListResult)
711 s.Users = Users
712 s.HasMore = HasMore
713 return s
714 }
715
716 // ExcludedUsersUpdateArg : Argument of excluded users update operation. Should
717 // include a list of users to add/remove (according to endpoint), Maximum size
718 // of the list is 1000 users.
719 type ExcludedUsersUpdateArg struct {
720 // Users : List of users to be added/removed.
721 Users []*UserSelectorArg `json:"users,omitempty"`
722 }
723
724 // NewExcludedUsersUpdateArg returns a new ExcludedUsersUpdateArg instance
725 func NewExcludedUsersUpdateArg() *ExcludedUsersUpdateArg {
726 s := new(ExcludedUsersUpdateArg)
727 return s
728 }
729
730 // ExcludedUsersUpdateError : Excluded users update error.
731 type ExcludedUsersUpdateError struct {
732 dropbox.Tagged
733 }
734
735 // Valid tag values for ExcludedUsersUpdateError
736 const (
737 ExcludedUsersUpdateErrorUsersNotInTeam = "users_not_in_team"
738 ExcludedUsersUpdateErrorTooManyUsers = "too_many_users"
739 ExcludedUsersUpdateErrorOther = "other"
740 )
741
742 // ExcludedUsersUpdateResult : Excluded users update result.
743 type ExcludedUsersUpdateResult struct {
744 // Status : Update status.
745 Status *ExcludedUsersUpdateStatus `json:"status"`
746 }
747
748 // NewExcludedUsersUpdateResult returns a new ExcludedUsersUpdateResult instance
749 func NewExcludedUsersUpdateResult(Status *ExcludedUsersUpdateStatus) *ExcludedUsersUpdateResult {
750 s := new(ExcludedUsersUpdateResult)
751 s.Status = Status
752 return s
753 }
754
755 // ExcludedUsersUpdateStatus : Excluded users update operation status.
756 type ExcludedUsersUpdateStatus struct {
757 dropbox.Tagged
758 }
759
760 // Valid tag values for ExcludedUsersUpdateStatus
761 const (
762 ExcludedUsersUpdateStatusSuccess = "success"
763 ExcludedUsersUpdateStatusOther = "other"
764 )
765
766 // Feature : A set of features that a Dropbox Business account may support.
767 type Feature struct {
768 dropbox.Tagged
769 }
770
771 // Valid tag values for Feature
772 const (
773 FeatureUploadApiRateLimit = "upload_api_rate_limit"
774 FeatureHasTeamSharedDropbox = "has_team_shared_dropbox"
775 FeatureHasTeamFileEvents = "has_team_file_events"
776 FeatureHasTeamSelectiveSync = "has_team_selective_sync"
777 FeatureOther = "other"
778 )
779
780 // FeatureValue : The values correspond to entries in `Feature`. You may get
781 // different value according to your Dropbox Business plan.
782 type FeatureValue struct {
783 dropbox.Tagged
784 // UploadApiRateLimit : has no documentation (yet)
785 UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"`
786 // HasTeamSharedDropbox : has no documentation (yet)
787 HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"`
788 // HasTeamFileEvents : has no documentation (yet)
789 HasTeamFileEvents *HasTeamFileEventsValue `json:"has_team_file_events,omitempty"`
790 // HasTeamSelectiveSync : has no documentation (yet)
791 HasTeamSelectiveSync *HasTeamSelectiveSyncValue `json:"has_team_selective_sync,omitempty"`
792 }
793
794 // Valid tag values for FeatureValue
795 const (
796 FeatureValueUploadApiRateLimit = "upload_api_rate_limit"
797 FeatureValueHasTeamSharedDropbox = "has_team_shared_dropbox"
798 FeatureValueHasTeamFileEvents = "has_team_file_events"
799 FeatureValueHasTeamSelectiveSync = "has_team_selective_sync"
800 FeatureValueOther = "other"
801 )
802
803 // UnmarshalJSON deserializes into a FeatureValue instance
804 func (u *FeatureValue) UnmarshalJSON(body []byte) error {
805 type wrap struct {
806 dropbox.Tagged
807 // UploadApiRateLimit : has no documentation (yet)
808 UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"`
809 // HasTeamSharedDropbox : has no documentation (yet)
810 HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"`
811 // HasTeamFileEvents : has no documentation (yet)
812 HasTeamFileEvents *HasTeamFileEventsValue `json:"has_team_file_events,omitempty"`
813 // HasTeamSelectiveSync : has no documentation (yet)
814 HasTeamSelectiveSync *HasTeamSelectiveSyncValue `json:"has_team_selective_sync,omitempty"`
815 }
816 var w wrap
817 var err error
818 if err = json.Unmarshal(body, &w); err != nil {
819 return err
820 }
821 u.Tag = w.Tag
822 switch u.Tag {
823 case "upload_api_rate_limit":
824 u.UploadApiRateLimit = w.UploadApiRateLimit
825
826 if err != nil {
827 return err
828 }
829 case "has_team_shared_dropbox":
830 u.HasTeamSharedDropbox = w.HasTeamSharedDropbox
831
832 if err != nil {
833 return err
834 }
835 case "has_team_file_events":
836 u.HasTeamFileEvents = w.HasTeamFileEvents
837
838 if err != nil {
839 return err
840 }
841 case "has_team_selective_sync":
842 u.HasTeamSelectiveSync = w.HasTeamSelectiveSync
843
844 if err != nil {
845 return err
846 }
847 }
848 return nil
849 }
850
851 // FeaturesGetValuesBatchArg : has no documentation (yet)
852 type FeaturesGetValuesBatchArg struct {
853 // Features : A list of features in `Feature`. If the list is empty, this
854 // route will return `FeaturesGetValuesBatchError`.
855 Features []*Feature `json:"features"`
856 }
857
858 // NewFeaturesGetValuesBatchArg returns a new FeaturesGetValuesBatchArg instance
859 func NewFeaturesGetValuesBatchArg(Features []*Feature) *FeaturesGetValuesBatchArg {
860 s := new(FeaturesGetValuesBatchArg)
861 s.Features = Features
862 return s
863 }
864
865 // FeaturesGetValuesBatchError : has no documentation (yet)
866 type FeaturesGetValuesBatchError struct {
867 dropbox.Tagged
868 }
869
870 // Valid tag values for FeaturesGetValuesBatchError
871 const (
872 FeaturesGetValuesBatchErrorEmptyFeaturesList = "empty_features_list"
873 FeaturesGetValuesBatchErrorOther = "other"
874 )
875
876 // FeaturesGetValuesBatchResult : has no documentation (yet)
877 type FeaturesGetValuesBatchResult struct {
878 // Values : has no documentation (yet)
879 Values []*FeatureValue `json:"values"`
880 }
881
882 // NewFeaturesGetValuesBatchResult returns a new FeaturesGetValuesBatchResult instance
883 func NewFeaturesGetValuesBatchResult(Values []*FeatureValue) *FeaturesGetValuesBatchResult {
884 s := new(FeaturesGetValuesBatchResult)
885 s.Values = Values
886 return s
887 }
888
889 // GetActivityReport : Activity Report Result. Each of the items in the storage
890 // report is an array of values, one value per day. If there is no data for a
891 // day, then the value will be None.
892 type GetActivityReport struct {
893 BaseDfbReport
894 // Adds : Array of total number of adds by team members.
895 Adds []uint64 `json:"adds"`
896 // Edits : Array of number of edits by team members. If the same user edits
897 // the same file multiple times this is counted as a single edit.
898 Edits []uint64 `json:"edits"`
899 // Deletes : Array of total number of deletes by team members.
900 Deletes []uint64 `json:"deletes"`
901 // ActiveUsers28Day : Array of the number of users who have been active in
902 // the last 28 days.
903 ActiveUsers28Day []uint64 `json:"active_users_28_day"`
904 // ActiveUsers7Day : Array of the number of users who have been active in
905 // the last week.
906 ActiveUsers7Day []uint64 `json:"active_users_7_day"`
907 // ActiveUsers1Day : Array of the number of users who have been active in
908 // the last day.
909 ActiveUsers1Day []uint64 `json:"active_users_1_day"`
910 // ActiveSharedFolders28Day : Array of the number of shared folders with
911 // some activity in the last 28 days.
912 ActiveSharedFolders28Day []uint64 `json:"active_shared_folders_28_day"`
913 // ActiveSharedFolders7Day : Array of the number of shared folders with some
914 // activity in the last week.
915 ActiveSharedFolders7Day []uint64 `json:"active_shared_folders_7_day"`
916 // ActiveSharedFolders1Day : Array of the number of shared folders with some
917 // activity in the last day.
918 ActiveSharedFolders1Day []uint64 `json:"active_shared_folders_1_day"`
919 // SharedLinksCreated : Array of the number of shared links created.
920 SharedLinksCreated []uint64 `json:"shared_links_created"`
921 // SharedLinksViewedByTeam : Array of the number of views by team users to
922 // shared links created by the team.
923 SharedLinksViewedByTeam []uint64 `json:"shared_links_viewed_by_team"`
924 // SharedLinksViewedByOutsideUser : Array of the number of views by users
925 // outside of the team to shared links created by the team.
926 SharedLinksViewedByOutsideUser []uint64 `json:"shared_links_viewed_by_outside_user"`
927 // SharedLinksViewedByNotLoggedIn : Array of the number of views by
928 // non-logged-in users to shared links created by the team.
929 SharedLinksViewedByNotLoggedIn []uint64 `json:"shared_links_viewed_by_not_logged_in"`
930 // SharedLinksViewedTotal : Array of the total number of views to shared
931 // links created by the team.
932 SharedLinksViewedTotal []uint64 `json:"shared_links_viewed_total"`
933 }
934
935 // NewGetActivityReport returns a new GetActivityReport instance
936 func NewGetActivityReport(StartDate string, Adds []uint64, Edits []uint64, Deletes []uint64, ActiveUsers28Day []uint64, ActiveUsers7Day []uint64, ActiveUsers1Day []uint64, ActiveSharedFolders28Day []uint64, ActiveSharedFolders7Day []uint64, ActiveSharedFolders1Day []uint64, SharedLinksCreated []uint64, SharedLinksViewedByTeam []uint64, SharedLinksViewedByOutsideUser []uint64, SharedLinksViewedByNotLoggedIn []uint64, SharedLinksViewedTotal []uint64) *GetActivityReport {
937 s := new(GetActivityReport)
938 s.StartDate = StartDate
939 s.Adds = Adds
940 s.Edits = Edits
941 s.Deletes = Deletes
942 s.ActiveUsers28Day = ActiveUsers28Day
943 s.ActiveUsers7Day = ActiveUsers7Day
944 s.ActiveUsers1Day = ActiveUsers1Day
945 s.ActiveSharedFolders28Day = ActiveSharedFolders28Day
946 s.ActiveSharedFolders7Day = ActiveSharedFolders7Day
947 s.ActiveSharedFolders1Day = ActiveSharedFolders1Day
948 s.SharedLinksCreated = SharedLinksCreated
949 s.SharedLinksViewedByTeam = SharedLinksViewedByTeam
950 s.SharedLinksViewedByOutsideUser = SharedLinksViewedByOutsideUser
951 s.SharedLinksViewedByNotLoggedIn = SharedLinksViewedByNotLoggedIn
952 s.SharedLinksViewedTotal = SharedLinksViewedTotal
953 return s
954 }
955
956 // GetDevicesReport : Devices Report Result. Contains subsections for different
957 // time ranges of activity. Each of the items in each subsection of the storage
958 // report is an array of values, one value per day. If there is no data for a
959 // day, then the value will be None.
960 type GetDevicesReport struct {
961 BaseDfbReport
962 // Active1Day : Report of the number of devices active in the last day.
963 Active1Day *DevicesActive `json:"active_1_day"`
964 // Active7Day : Report of the number of devices active in the last 7 days.
965 Active7Day *DevicesActive `json:"active_7_day"`
966 // Active28Day : Report of the number of devices active in the last 28 days.
967 Active28Day *DevicesActive `json:"active_28_day"`
968 }
969
970 // NewGetDevicesReport returns a new GetDevicesReport instance
971 func NewGetDevicesReport(StartDate string, Active1Day *DevicesActive, Active7Day *DevicesActive, Active28Day *DevicesActive) *GetDevicesReport {
972 s := new(GetDevicesReport)
973 s.StartDate = StartDate
974 s.Active1Day = Active1Day
975 s.Active7Day = Active7Day
976 s.Active28Day = Active28Day
977 return s
978 }
979
980 // GetMembershipReport : Membership Report Result. Each of the items in the
981 // storage report is an array of values, one value per day. If there is no data
982 // for a day, then the value will be None.
983 type GetMembershipReport struct {
984 BaseDfbReport
985 // TeamSize : Team size, for each day.
986 TeamSize []uint64 `json:"team_size"`
987 // PendingInvites : The number of pending invites to the team, for each day.
988 PendingInvites []uint64 `json:"pending_invites"`
989 // MembersJoined : The number of members that joined the team, for each day.
990 MembersJoined []uint64 `json:"members_joined"`
991 // SuspendedMembers : The number of suspended team members, for each day.
992 SuspendedMembers []uint64 `json:"suspended_members"`
993 // Licenses : The total number of licenses the team has, for each day.
994 Licenses []uint64 `json:"licenses"`
995 }
996
997 // NewGetMembershipReport returns a new GetMembershipReport instance
998 func NewGetMembershipReport(StartDate string, TeamSize []uint64, PendingInvites []uint64, MembersJoined []uint64, SuspendedMembers []uint64, Licenses []uint64) *GetMembershipReport {
999 s := new(GetMembershipReport)
1000 s.StartDate = StartDate
1001 s.TeamSize = TeamSize
1002 s.PendingInvites = PendingInvites
1003 s.MembersJoined = MembersJoined
1004 s.SuspendedMembers = SuspendedMembers
1005 s.Licenses = Licenses
1006 return s
1007 }
1008
1009 // GetStorageReport : Storage Report Result. Each of the items in the storage
1010 // report is an array of values, one value per day. If there is no data for a
1011 // day, then the value will be None.
1012 type GetStorageReport struct {
1013 BaseDfbReport
1014 // TotalUsage : Sum of the shared, unshared, and datastore usages, for each
1015 // day.
1016 TotalUsage []uint64 `json:"total_usage"`
1017 // SharedUsage : Array of the combined size (bytes) of team members' shared
1018 // folders, for each day.
1019 SharedUsage []uint64 `json:"shared_usage"`
1020 // UnsharedUsage : Array of the combined size (bytes) of team members' root
1021 // namespaces, for each day.
1022 UnsharedUsage []uint64 `json:"unshared_usage"`
1023 // SharedFolders : Array of the number of shared folders owned by team
1024 // members, for each day.
1025 SharedFolders []uint64 `json:"shared_folders"`
1026 // MemberStorageMap : Array of storage summaries of team members' account
1027 // sizes. Each storage summary is an array of key, value pairs, where each
1028 // pair describes a storage bucket. The key indicates the upper bound of the
1029 // bucket and the value is the number of users in that bucket. There is one
1030 // such summary per day. If there is no data for a day, the storage summary
1031 // will be empty.
1032 MemberStorageMap [][]*StorageBucket `json:"member_storage_map"`
1033 }
1034
1035 // NewGetStorageReport returns a new GetStorageReport instance
1036 func NewGetStorageReport(StartDate string, TotalUsage []uint64, SharedUsage []uint64, UnsharedUsage []uint64, SharedFolders []uint64, MemberStorageMap [][]*StorageBucket) *GetStorageReport {
1037 s := new(GetStorageReport)
1038 s.StartDate = StartDate
1039 s.TotalUsage = TotalUsage
1040 s.SharedUsage = SharedUsage
1041 s.UnsharedUsage = UnsharedUsage
1042 s.SharedFolders = SharedFolders
1043 s.MemberStorageMap = MemberStorageMap
1044 return s
1045 }
1046
1047 // GroupAccessType : Role of a user in group.
1048 type GroupAccessType struct {
1049 dropbox.Tagged
1050 }
1051
1052 // Valid tag values for GroupAccessType
1053 const (
1054 GroupAccessTypeMember = "member"
1055 GroupAccessTypeOwner = "owner"
1056 )
1057
1058 // GroupCreateArg : has no documentation (yet)
1059 type GroupCreateArg struct {
1060 // GroupName : Group name.
1061 GroupName string `json:"group_name"`
1062 // AddCreatorAsOwner : Automatically add the creator of the group.
1063 AddCreatorAsOwner bool `json:"add_creator_as_owner"`
1064 // GroupExternalId : The creator of a team can associate an arbitrary
1065 // external ID to the group.
1066 GroupExternalId string `json:"group_external_id,omitempty"`
1067 // GroupManagementType : Whether the team can be managed by selected users,
1068 // or only by team admins.
1069 GroupManagementType *team_common.GroupManagementType `json:"group_management_type,omitempty"`
1070 }
1071
1072 // NewGroupCreateArg returns a new GroupCreateArg instance
1073 func NewGroupCreateArg(GroupName string) *GroupCreateArg {
1074 s := new(GroupCreateArg)
1075 s.GroupName = GroupName
1076 s.AddCreatorAsOwner = false
1077 return s
1078 }
1079
1080 // GroupCreateError : has no documentation (yet)
1081 type GroupCreateError struct {
1082 dropbox.Tagged
1083 }
1084
1085 // Valid tag values for GroupCreateError
1086 const (
1087 GroupCreateErrorGroupNameAlreadyUsed = "group_name_already_used"
1088 GroupCreateErrorGroupNameInvalid = "group_name_invalid"
1089 GroupCreateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
1090 GroupCreateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1091 GroupCreateErrorOther = "other"
1092 )
1093
1094 // GroupSelectorError : Error that can be raised when `GroupSelector` is used.
1095 type GroupSelectorError struct {
1096 dropbox.Tagged
1097 }
1098
1099 // Valid tag values for GroupSelectorError
1100 const (
1101 GroupSelectorErrorGroupNotFound = "group_not_found"
1102 GroupSelectorErrorOther = "other"
1103 )
1104
1105 // GroupSelectorWithTeamGroupError : Error that can be raised when
1106 // `GroupSelector` is used and team groups are disallowed from being used.
1107 type GroupSelectorWithTeamGroupError struct {
1108 dropbox.Tagged
1109 }
1110
1111 // Valid tag values for GroupSelectorWithTeamGroupError
1112 const (
1113 GroupSelectorWithTeamGroupErrorGroupNotFound = "group_not_found"
1114 GroupSelectorWithTeamGroupErrorOther = "other"
1115 GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1116 )
1117
1118 // GroupDeleteError : has no documentation (yet)
1119 type GroupDeleteError struct {
1120 dropbox.Tagged
1121 }
1122
1123 // Valid tag values for GroupDeleteError
1124 const (
1125 GroupDeleteErrorGroupNotFound = "group_not_found"
1126 GroupDeleteErrorOther = "other"
1127 GroupDeleteErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1128 GroupDeleteErrorGroupAlreadyDeleted = "group_already_deleted"
1129 )
1130
1131 // GroupFullInfo : Full description of a group.
1132 type GroupFullInfo struct {
1133 team_common.GroupSummary
1134 // Members : List of group members.
1135 Members []*GroupMemberInfo `json:"members,omitempty"`
1136 // Created : The group creation time as a UTC timestamp in milliseconds
1137 // since the Unix epoch.
1138 Created uint64 `json:"created"`
1139 }
1140
1141 // NewGroupFullInfo returns a new GroupFullInfo instance
1142 func NewGroupFullInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, Created uint64) *GroupFullInfo {
1143 s := new(GroupFullInfo)
1144 s.GroupName = GroupName
1145 s.GroupId = GroupId
1146 s.GroupManagementType = GroupManagementType
1147 s.Created = Created
1148 return s
1149 }
1150
1151 // GroupMemberInfo : Profile of group member, and role in group.
1152 type GroupMemberInfo struct {
1153 // Profile : Profile of group member.
1154 Profile *MemberProfile `json:"profile"`
1155 // AccessType : The role that the user has in the group.
1156 AccessType *GroupAccessType `json:"access_type"`
1157 }
1158
1159 // NewGroupMemberInfo returns a new GroupMemberInfo instance
1160 func NewGroupMemberInfo(Profile *MemberProfile, AccessType *GroupAccessType) *GroupMemberInfo {
1161 s := new(GroupMemberInfo)
1162 s.Profile = Profile
1163 s.AccessType = AccessType
1164 return s
1165 }
1166
1167 // GroupMemberSelector : Argument for selecting a group and a single user.
1168 type GroupMemberSelector struct {
1169 // Group : Specify a group.
1170 Group *GroupSelector `json:"group"`
1171 // User : Identity of a user that is a member of `group`.
1172 User *UserSelectorArg `json:"user"`
1173 }
1174
1175 // NewGroupMemberSelector returns a new GroupMemberSelector instance
1176 func NewGroupMemberSelector(Group *GroupSelector, User *UserSelectorArg) *GroupMemberSelector {
1177 s := new(GroupMemberSelector)
1178 s.Group = Group
1179 s.User = User
1180 return s
1181 }
1182
1183 // GroupMemberSelectorError : Error that can be raised when
1184 // `GroupMemberSelector` is used, and the user is required to be a member of the
1185 // specified group.
1186 type GroupMemberSelectorError struct {
1187 dropbox.Tagged
1188 }
1189
1190 // Valid tag values for GroupMemberSelectorError
1191 const (
1192 GroupMemberSelectorErrorGroupNotFound = "group_not_found"
1193 GroupMemberSelectorErrorOther = "other"
1194 GroupMemberSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1195 GroupMemberSelectorErrorMemberNotInGroup = "member_not_in_group"
1196 )
1197
1198 // GroupMemberSetAccessTypeError : has no documentation (yet)
1199 type GroupMemberSetAccessTypeError struct {
1200 dropbox.Tagged
1201 }
1202
1203 // Valid tag values for GroupMemberSetAccessTypeError
1204 const (
1205 GroupMemberSetAccessTypeErrorGroupNotFound = "group_not_found"
1206 GroupMemberSetAccessTypeErrorOther = "other"
1207 GroupMemberSetAccessTypeErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1208 GroupMemberSetAccessTypeErrorMemberNotInGroup = "member_not_in_group"
1209 GroupMemberSetAccessTypeErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
1210 )
1211
1212 // IncludeMembersArg : has no documentation (yet)
1213 type IncludeMembersArg struct {
1214 // ReturnMembers : Whether to return the list of members in the group. Note
1215 // that the default value will cause all the group members to be returned
1216 // in the response. This may take a long time for large groups.
1217 ReturnMembers bool `json:"return_members"`
1218 }
1219
1220 // NewIncludeMembersArg returns a new IncludeMembersArg instance
1221 func NewIncludeMembersArg() *IncludeMembersArg {
1222 s := new(IncludeMembersArg)
1223 s.ReturnMembers = true
1224 return s
1225 }
1226
1227 // GroupMembersAddArg : has no documentation (yet)
1228 type GroupMembersAddArg struct {
1229 IncludeMembersArg
1230 // Group : Group to which users will be added.
1231 Group *GroupSelector `json:"group"`
1232 // Members : List of users to be added to the group.
1233 Members []*MemberAccess `json:"members"`
1234 }
1235
1236 // NewGroupMembersAddArg returns a new GroupMembersAddArg instance
1237 func NewGroupMembersAddArg(Group *GroupSelector, Members []*MemberAccess) *GroupMembersAddArg {
1238 s := new(GroupMembersAddArg)
1239 s.Group = Group
1240 s.Members = Members
1241 s.ReturnMembers = true
1242 return s
1243 }
1244
1245 // GroupMembersAddError : has no documentation (yet)
1246 type GroupMembersAddError struct {
1247 dropbox.Tagged
1248 // MembersNotInTeam : These members are not part of your team. Currently,
1249 // you cannot add members to a group if they are not part of your team,
1250 // though this may change in a subsequent version. To add new members to
1251 // your Dropbox Business team, use the `membersAdd` endpoint.
1252 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
1253 // UsersNotFound : These users were not found in Dropbox.
1254 UsersNotFound []string `json:"users_not_found,omitempty"`
1255 // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group cannot
1256 // be managed by a user.
1257 UserCannotBeManagerOfCompanyManagedGroup []string `json:"user_cannot_be_manager_of_company_managed_group,omitempty"`
1258 }
1259
1260 // Valid tag values for GroupMembersAddError
1261 const (
1262 GroupMembersAddErrorGroupNotFound = "group_not_found"
1263 GroupMembersAddErrorOther = "other"
1264 GroupMembersAddErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1265 GroupMembersAddErrorDuplicateUser = "duplicate_user"
1266 GroupMembersAddErrorGroupNotInTeam = "group_not_in_team"
1267 GroupMembersAddErrorMembersNotInTeam = "members_not_in_team"
1268 GroupMembersAddErrorUsersNotFound = "users_not_found"
1269 GroupMembersAddErrorUserMustBeActiveToBeOwner = "user_must_be_active_to_be_owner"
1270 GroupMembersAddErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group"
1271 )
1272
1273 // UnmarshalJSON deserializes into a GroupMembersAddError instance
1274 func (u *GroupMembersAddError) UnmarshalJSON(body []byte) error {
1275 type wrap struct {
1276 dropbox.Tagged
1277 // MembersNotInTeam : These members are not part of your team.
1278 // Currently, you cannot add members to a group if they are not part of
1279 // your team, though this may change in a subsequent version. To add new
1280 // members to your Dropbox Business team, use the `membersAdd` endpoint.
1281 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
1282 // UsersNotFound : These users were not found in Dropbox.
1283 UsersNotFound []string `json:"users_not_found,omitempty"`
1284 // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group
1285 // cannot be managed by a user.
1286 UserCannotBeManagerOfCompanyManagedGroup []string `json:"user_cannot_be_manager_of_company_managed_group,omitempty"`
1287 }
1288 var w wrap
1289 var err error
1290 if err = json.Unmarshal(body, &w); err != nil {
1291 return err
1292 }
1293 u.Tag = w.Tag
1294 switch u.Tag {
1295 case "members_not_in_team":
1296 u.MembersNotInTeam = w.MembersNotInTeam
1297
1298 if err != nil {
1299 return err
1300 }
1301 case "users_not_found":
1302 u.UsersNotFound = w.UsersNotFound
1303
1304 if err != nil {
1305 return err
1306 }
1307 case "user_cannot_be_manager_of_company_managed_group":
1308 u.UserCannotBeManagerOfCompanyManagedGroup = w.UserCannotBeManagerOfCompanyManagedGroup
1309
1310 if err != nil {
1311 return err
1312 }
1313 }
1314 return nil
1315 }
1316
1317 // GroupMembersChangeResult : Result returned by `groupsMembersAdd` and
1318 // `groupsMembersRemove`.
1319 type GroupMembersChangeResult struct {
1320 // GroupInfo : The group info after member change operation has been
1321 // performed.
1322 GroupInfo *GroupFullInfo `json:"group_info"`
1323 // AsyncJobId : For legacy purposes async_job_id will always return one
1324 // space ' '. Formerly, it was an ID that was used to obtain the status of
1325 // granting/revoking group-owned resources. It's no longer necessary because
1326 // the async processing now happens automatically.
1327 AsyncJobId string `json:"async_job_id"`
1328 }
1329
1330 // NewGroupMembersChangeResult returns a new GroupMembersChangeResult instance
1331 func NewGroupMembersChangeResult(GroupInfo *GroupFullInfo, AsyncJobId string) *GroupMembersChangeResult {
1332 s := new(GroupMembersChangeResult)
1333 s.GroupInfo = GroupInfo
1334 s.AsyncJobId = AsyncJobId
1335 return s
1336 }
1337
1338 // GroupMembersRemoveArg : has no documentation (yet)
1339 type GroupMembersRemoveArg struct {
1340 IncludeMembersArg
1341 // Group : Group from which users will be removed.
1342 Group *GroupSelector `json:"group"`
1343 // Users : List of users to be removed from the group.
1344 Users []*UserSelectorArg `json:"users"`
1345 }
1346
1347 // NewGroupMembersRemoveArg returns a new GroupMembersRemoveArg instance
1348 func NewGroupMembersRemoveArg(Group *GroupSelector, Users []*UserSelectorArg) *GroupMembersRemoveArg {
1349 s := new(GroupMembersRemoveArg)
1350 s.Group = Group
1351 s.Users = Users
1352 s.ReturnMembers = true
1353 return s
1354 }
1355
1356 // GroupMembersSelectorError : Error that can be raised when
1357 // `GroupMembersSelector` is used, and the users are required to be members of
1358 // the specified group.
1359 type GroupMembersSelectorError struct {
1360 dropbox.Tagged
1361 }
1362
1363 // Valid tag values for GroupMembersSelectorError
1364 const (
1365 GroupMembersSelectorErrorGroupNotFound = "group_not_found"
1366 GroupMembersSelectorErrorOther = "other"
1367 GroupMembersSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1368 GroupMembersSelectorErrorMemberNotInGroup = "member_not_in_group"
1369 )
1370
1371 // GroupMembersRemoveError : has no documentation (yet)
1372 type GroupMembersRemoveError struct {
1373 dropbox.Tagged
1374 // MembersNotInTeam : These members are not part of your team.
1375 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
1376 // UsersNotFound : These users were not found in Dropbox.
1377 UsersNotFound []string `json:"users_not_found,omitempty"`
1378 }
1379
1380 // Valid tag values for GroupMembersRemoveError
1381 const (
1382 GroupMembersRemoveErrorGroupNotFound = "group_not_found"
1383 GroupMembersRemoveErrorOther = "other"
1384 GroupMembersRemoveErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1385 GroupMembersRemoveErrorMemberNotInGroup = "member_not_in_group"
1386 GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team"
1387 GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team"
1388 GroupMembersRemoveErrorUsersNotFound = "users_not_found"
1389 )
1390
1391 // UnmarshalJSON deserializes into a GroupMembersRemoveError instance
1392 func (u *GroupMembersRemoveError) UnmarshalJSON(body []byte) error {
1393 type wrap struct {
1394 dropbox.Tagged
1395 // MembersNotInTeam : These members are not part of your team.
1396 MembersNotInTeam []string `json:"members_not_in_team,omitempty"`
1397 // UsersNotFound : These users were not found in Dropbox.
1398 UsersNotFound []string `json:"users_not_found,omitempty"`
1399 }
1400 var w wrap
1401 var err error
1402 if err = json.Unmarshal(body, &w); err != nil {
1403 return err
1404 }
1405 u.Tag = w.Tag
1406 switch u.Tag {
1407 case "members_not_in_team":
1408 u.MembersNotInTeam = w.MembersNotInTeam
1409
1410 if err != nil {
1411 return err
1412 }
1413 case "users_not_found":
1414 u.UsersNotFound = w.UsersNotFound
1415
1416 if err != nil {
1417 return err
1418 }
1419 }
1420 return nil
1421 }
1422
1423 // GroupMembersSelector : Argument for selecting a group and a list of users.
1424 type GroupMembersSelector struct {
1425 // Group : Specify a group.
1426 Group *GroupSelector `json:"group"`
1427 // Users : A list of users that are members of `group`.
1428 Users *UsersSelectorArg `json:"users"`
1429 }
1430
1431 // NewGroupMembersSelector returns a new GroupMembersSelector instance
1432 func NewGroupMembersSelector(Group *GroupSelector, Users *UsersSelectorArg) *GroupMembersSelector {
1433 s := new(GroupMembersSelector)
1434 s.Group = Group
1435 s.Users = Users
1436 return s
1437 }
1438
1439 // GroupMembersSetAccessTypeArg : has no documentation (yet)
1440 type GroupMembersSetAccessTypeArg struct {
1441 GroupMemberSelector
1442 // AccessType : New group access type the user will have.
1443 AccessType *GroupAccessType `json:"access_type"`
1444 // ReturnMembers : Whether to return the list of members in the group. Note
1445 // that the default value will cause all the group members to be returned
1446 // in the response. This may take a long time for large groups.
1447 ReturnMembers bool `json:"return_members"`
1448 }
1449
1450 // NewGroupMembersSetAccessTypeArg returns a new GroupMembersSetAccessTypeArg instance
1451 func NewGroupMembersSetAccessTypeArg(Group *GroupSelector, User *UserSelectorArg, AccessType *GroupAccessType) *GroupMembersSetAccessTypeArg {
1452 s := new(GroupMembersSetAccessTypeArg)
1453 s.Group = Group
1454 s.User = User
1455 s.AccessType = AccessType
1456 s.ReturnMembers = true
1457 return s
1458 }
1459
1460 // GroupSelector : Argument for selecting a single group, either by group_id or
1461 // by external group ID.
1462 type GroupSelector struct {
1463 dropbox.Tagged
1464 // GroupId : Group ID.
1465 GroupId string `json:"group_id,omitempty"`
1466 // GroupExternalId : External ID of the group.
1467 GroupExternalId string `json:"group_external_id,omitempty"`
1468 }
1469
1470 // Valid tag values for GroupSelector
1471 const (
1472 GroupSelectorGroupId = "group_id"
1473 GroupSelectorGroupExternalId = "group_external_id"
1474 )
1475
1476 // UnmarshalJSON deserializes into a GroupSelector instance
1477 func (u *GroupSelector) UnmarshalJSON(body []byte) error {
1478 type wrap struct {
1479 dropbox.Tagged
1480 // GroupId : Group ID.
1481 GroupId string `json:"group_id,omitempty"`
1482 // GroupExternalId : External ID of the group.
1483 GroupExternalId string `json:"group_external_id,omitempty"`
1484 }
1485 var w wrap
1486 var err error
1487 if err = json.Unmarshal(body, &w); err != nil {
1488 return err
1489 }
1490 u.Tag = w.Tag
1491 switch u.Tag {
1492 case "group_id":
1493 u.GroupId = w.GroupId
1494
1495 if err != nil {
1496 return err
1497 }
1498 case "group_external_id":
1499 u.GroupExternalId = w.GroupExternalId
1500
1501 if err != nil {
1502 return err
1503 }
1504 }
1505 return nil
1506 }
1507
1508 // GroupUpdateArgs : has no documentation (yet)
1509 type GroupUpdateArgs struct {
1510 IncludeMembersArg
1511 // Group : Specify a group.
1512 Group *GroupSelector `json:"group"`
1513 // NewGroupName : Optional argument. Set group name to this if provided.
1514 NewGroupName string `json:"new_group_name,omitempty"`
1515 // NewGroupExternalId : Optional argument. New group external ID. If the
1516 // argument is None, the group's external_id won't be updated. If the
1517 // argument is empty string, the group's external id will be cleared.
1518 NewGroupExternalId string `json:"new_group_external_id,omitempty"`
1519 // NewGroupManagementType : Set new group management type, if provided.
1520 NewGroupManagementType *team_common.GroupManagementType `json:"new_group_management_type,omitempty"`
1521 }
1522
1523 // NewGroupUpdateArgs returns a new GroupUpdateArgs instance
1524 func NewGroupUpdateArgs(Group *GroupSelector) *GroupUpdateArgs {
1525 s := new(GroupUpdateArgs)
1526 s.Group = Group
1527 s.ReturnMembers = true
1528 return s
1529 }
1530
1531 // GroupUpdateError : has no documentation (yet)
1532 type GroupUpdateError struct {
1533 dropbox.Tagged
1534 }
1535
1536 // Valid tag values for GroupUpdateError
1537 const (
1538 GroupUpdateErrorGroupNotFound = "group_not_found"
1539 GroupUpdateErrorOther = "other"
1540 GroupUpdateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed"
1541 GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used"
1542 GroupUpdateErrorGroupNameInvalid = "group_name_invalid"
1543 GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use"
1544 )
1545
1546 // GroupsGetInfoError : has no documentation (yet)
1547 type GroupsGetInfoError struct {
1548 dropbox.Tagged
1549 }
1550
1551 // Valid tag values for GroupsGetInfoError
1552 const (
1553 GroupsGetInfoErrorGroupNotOnTeam = "group_not_on_team"
1554 GroupsGetInfoErrorOther = "other"
1555 )
1556
1557 // GroupsGetInfoItem : has no documentation (yet)
1558 type GroupsGetInfoItem struct {
1559 dropbox.Tagged
1560 // IdNotFound : An ID that was provided as a parameter to `groupsGetInfo`,
1561 // and did not match a corresponding group. The ID can be a group ID, or an
1562 // external ID, depending on how the method was called.
1563 IdNotFound string `json:"id_not_found,omitempty"`
1564 // GroupInfo : Info about a group.
1565 GroupInfo *GroupFullInfo `json:"group_info,omitempty"`
1566 }
1567
1568 // Valid tag values for GroupsGetInfoItem
1569 const (
1570 GroupsGetInfoItemIdNotFound = "id_not_found"
1571 GroupsGetInfoItemGroupInfo = "group_info"
1572 )
1573
1574 // UnmarshalJSON deserializes into a GroupsGetInfoItem instance
1575 func (u *GroupsGetInfoItem) UnmarshalJSON(body []byte) error {
1576 type wrap struct {
1577 dropbox.Tagged
1578 // IdNotFound : An ID that was provided as a parameter to
1579 // `groupsGetInfo`, and did not match a corresponding group. The ID can
1580 // be a group ID, or an external ID, depending on how the method was
1581 // called.
1582 IdNotFound string `json:"id_not_found,omitempty"`
1583 }
1584 var w wrap
1585 var err error
1586 if err = json.Unmarshal(body, &w); err != nil {
1587 return err
1588 }
1589 u.Tag = w.Tag
1590 switch u.Tag {
1591 case "id_not_found":
1592 u.IdNotFound = w.IdNotFound
1593
1594 if err != nil {
1595 return err
1596 }
1597 case "group_info":
1598 err = json.Unmarshal(body, &u.GroupInfo)
1599
1600 if err != nil {
1601 return err
1602 }
1603 }
1604 return nil
1605 }
1606
1607 // GroupsListArg : has no documentation (yet)
1608 type GroupsListArg struct {
1609 // Limit : Number of results to return per call.
1610 Limit uint32 `json:"limit"`
1611 }
1612
1613 // NewGroupsListArg returns a new GroupsListArg instance
1614 func NewGroupsListArg() *GroupsListArg {
1615 s := new(GroupsListArg)
1616 s.Limit = 1000
1617 return s
1618 }
1619
1620 // GroupsListContinueArg : has no documentation (yet)
1621 type GroupsListContinueArg struct {
1622 // Cursor : Indicates from what point to get the next set of groups.
1623 Cursor string `json:"cursor"`
1624 }
1625
1626 // NewGroupsListContinueArg returns a new GroupsListContinueArg instance
1627 func NewGroupsListContinueArg(Cursor string) *GroupsListContinueArg {
1628 s := new(GroupsListContinueArg)
1629 s.Cursor = Cursor
1630 return s
1631 }
1632
1633 // GroupsListContinueError : has no documentation (yet)
1634 type GroupsListContinueError struct {
1635 dropbox.Tagged
1636 }
1637
1638 // Valid tag values for GroupsListContinueError
1639 const (
1640 GroupsListContinueErrorInvalidCursor = "invalid_cursor"
1641 GroupsListContinueErrorOther = "other"
1642 )
1643
1644 // GroupsListResult : has no documentation (yet)
1645 type GroupsListResult struct {
1646 // Groups : has no documentation (yet)
1647 Groups []*team_common.GroupSummary `json:"groups"`
1648 // Cursor : Pass the cursor into `groupsListContinue` to obtain the
1649 // additional groups.
1650 Cursor string `json:"cursor"`
1651 // HasMore : Is true if there are additional groups that have not been
1652 // returned yet. An additional call to `groupsListContinue` can retrieve
1653 // them.
1654 HasMore bool `json:"has_more"`
1655 }
1656
1657 // NewGroupsListResult returns a new GroupsListResult instance
1658 func NewGroupsListResult(Groups []*team_common.GroupSummary, Cursor string, HasMore bool) *GroupsListResult {
1659 s := new(GroupsListResult)
1660 s.Groups = Groups
1661 s.Cursor = Cursor
1662 s.HasMore = HasMore
1663 return s
1664 }
1665
1666 // GroupsMembersListArg : has no documentation (yet)
1667 type GroupsMembersListArg struct {
1668 // Group : The group whose members are to be listed.
1669 Group *GroupSelector `json:"group"`
1670 // Limit : Number of results to return per call.
1671 Limit uint32 `json:"limit"`
1672 }
1673
1674 // NewGroupsMembersListArg returns a new GroupsMembersListArg instance
1675 func NewGroupsMembersListArg(Group *GroupSelector) *GroupsMembersListArg {
1676 s := new(GroupsMembersListArg)
1677 s.Group = Group
1678 s.Limit = 1000
1679 return s
1680 }
1681
1682 // GroupsMembersListContinueArg : has no documentation (yet)
1683 type GroupsMembersListContinueArg struct {
1684 // Cursor : Indicates from what point to get the next set of groups.
1685 Cursor string `json:"cursor"`
1686 }
1687
1688 // NewGroupsMembersListContinueArg returns a new GroupsMembersListContinueArg instance
1689 func NewGroupsMembersListContinueArg(Cursor string) *GroupsMembersListContinueArg {
1690 s := new(GroupsMembersListContinueArg)
1691 s.Cursor = Cursor
1692 return s
1693 }
1694
1695 // GroupsMembersListContinueError : has no documentation (yet)
1696 type GroupsMembersListContinueError struct {
1697 dropbox.Tagged
1698 }
1699
1700 // Valid tag values for GroupsMembersListContinueError
1701 const (
1702 GroupsMembersListContinueErrorInvalidCursor = "invalid_cursor"
1703 GroupsMembersListContinueErrorOther = "other"
1704 )
1705
1706 // GroupsMembersListResult : has no documentation (yet)
1707 type GroupsMembersListResult struct {
1708 // Members : has no documentation (yet)
1709 Members []*GroupMemberInfo `json:"members"`
1710 // Cursor : Pass the cursor into `groupsMembersListContinue` to obtain
1711 // additional group members.
1712 Cursor string `json:"cursor"`
1713 // HasMore : Is true if there are additional group members that have not
1714 // been returned yet. An additional call to `groupsMembersListContinue` can
1715 // retrieve them.
1716 HasMore bool `json:"has_more"`
1717 }
1718
1719 // NewGroupsMembersListResult returns a new GroupsMembersListResult instance
1720 func NewGroupsMembersListResult(Members []*GroupMemberInfo, Cursor string, HasMore bool) *GroupsMembersListResult {
1721 s := new(GroupsMembersListResult)
1722 s.Members = Members
1723 s.Cursor = Cursor
1724 s.HasMore = HasMore
1725 return s
1726 }
1727
1728 // GroupsPollError : has no documentation (yet)
1729 type GroupsPollError struct {
1730 dropbox.Tagged
1731 }
1732
1733 // Valid tag values for GroupsPollError
1734 const (
1735 GroupsPollErrorInvalidAsyncJobId = "invalid_async_job_id"
1736 GroupsPollErrorInternalError = "internal_error"
1737 GroupsPollErrorOther = "other"
1738 GroupsPollErrorAccessDenied = "access_denied"
1739 )
1740
1741 // GroupsSelector : Argument for selecting a list of groups, either by
1742 // group_ids, or external group IDs.
1743 type GroupsSelector struct {
1744 dropbox.Tagged
1745 // GroupIds : List of group IDs.
1746 GroupIds []string `json:"group_ids,omitempty"`
1747 // GroupExternalIds : List of external IDs of groups.
1748 GroupExternalIds []string `json:"group_external_ids,omitempty"`
1749 }
1750
1751 // Valid tag values for GroupsSelector
1752 const (
1753 GroupsSelectorGroupIds = "group_ids"
1754 GroupsSelectorGroupExternalIds = "group_external_ids"
1755 )
1756
1757 // UnmarshalJSON deserializes into a GroupsSelector instance
1758 func (u *GroupsSelector) UnmarshalJSON(body []byte) error {
1759 type wrap struct {
1760 dropbox.Tagged
1761 // GroupIds : List of group IDs.
1762 GroupIds []string `json:"group_ids,omitempty"`
1763 // GroupExternalIds : List of external IDs of groups.
1764 GroupExternalIds []string `json:"group_external_ids,omitempty"`
1765 }
1766 var w wrap
1767 var err error
1768 if err = json.Unmarshal(body, &w); err != nil {
1769 return err
1770 }
1771 u.Tag = w.Tag
1772 switch u.Tag {
1773 case "group_ids":
1774 u.GroupIds = w.GroupIds
1775
1776 if err != nil {
1777 return err
1778 }
1779 case "group_external_ids":
1780 u.GroupExternalIds = w.GroupExternalIds
1781
1782 if err != nil {
1783 return err
1784 }
1785 }
1786 return nil
1787 }
1788
1789 // HasTeamFileEventsValue : The value for `Feature.has_team_file_events`.
1790 type HasTeamFileEventsValue struct {
1791 dropbox.Tagged
1792 // Enabled : Does this team have file events.
1793 Enabled bool `json:"enabled,omitempty"`
1794 }
1795
1796 // Valid tag values for HasTeamFileEventsValue
1797 const (
1798 HasTeamFileEventsValueEnabled = "enabled"
1799 HasTeamFileEventsValueOther = "other"
1800 )
1801
1802 // UnmarshalJSON deserializes into a HasTeamFileEventsValue instance
1803 func (u *HasTeamFileEventsValue) UnmarshalJSON(body []byte) error {
1804 type wrap struct {
1805 dropbox.Tagged
1806 // Enabled : Does this team have file events.
1807 Enabled bool `json:"enabled,omitempty"`
1808 }
1809 var w wrap
1810 var err error
1811 if err = json.Unmarshal(body, &w); err != nil {
1812 return err
1813 }
1814 u.Tag = w.Tag
1815 switch u.Tag {
1816 case "enabled":
1817 u.Enabled = w.Enabled
1818
1819 if err != nil {
1820 return err
1821 }
1822 }
1823 return nil
1824 }
1825
1826 // HasTeamSelectiveSyncValue : The value for `Feature.has_team_selective_sync`.
1827 type HasTeamSelectiveSyncValue struct {
1828 dropbox.Tagged
1829 // HasTeamSelectiveSync : Does this team have team selective sync enabled.
1830 HasTeamSelectiveSync bool `json:"has_team_selective_sync,omitempty"`
1831 }
1832
1833 // Valid tag values for HasTeamSelectiveSyncValue
1834 const (
1835 HasTeamSelectiveSyncValueHasTeamSelectiveSync = "has_team_selective_sync"
1836 HasTeamSelectiveSyncValueOther = "other"
1837 )
1838
1839 // UnmarshalJSON deserializes into a HasTeamSelectiveSyncValue instance
1840 func (u *HasTeamSelectiveSyncValue) UnmarshalJSON(body []byte) error {
1841 type wrap struct {
1842 dropbox.Tagged
1843 // HasTeamSelectiveSync : Does this team have team selective sync
1844 // enabled.
1845 HasTeamSelectiveSync bool `json:"has_team_selective_sync,omitempty"`
1846 }
1847 var w wrap
1848 var err error
1849 if err = json.Unmarshal(body, &w); err != nil {
1850 return err
1851 }
1852 u.Tag = w.Tag
1853 switch u.Tag {
1854 case "has_team_selective_sync":
1855 u.HasTeamSelectiveSync = w.HasTeamSelectiveSync
1856
1857 if err != nil {
1858 return err
1859 }
1860 }
1861 return nil
1862 }
1863
1864 // HasTeamSharedDropboxValue : The value for `Feature.has_team_shared_dropbox`.
1865 type HasTeamSharedDropboxValue struct {
1866 dropbox.Tagged
1867 // HasTeamSharedDropbox : Does this team have a shared team root.
1868 HasTeamSharedDropbox bool `json:"has_team_shared_dropbox,omitempty"`
1869 }
1870
1871 // Valid tag values for HasTeamSharedDropboxValue
1872 const (
1873 HasTeamSharedDropboxValueHasTeamSharedDropbox = "has_team_shared_dropbox"
1874 HasTeamSharedDropboxValueOther = "other"
1875 )
1876
1877 // UnmarshalJSON deserializes into a HasTeamSharedDropboxValue instance
1878 func (u *HasTeamSharedDropboxValue) UnmarshalJSON(body []byte) error {
1879 type wrap struct {
1880 dropbox.Tagged
1881 // HasTeamSharedDropbox : Does this team have a shared team root.
1882 HasTeamSharedDropbox bool `json:"has_team_shared_dropbox,omitempty"`
1883 }
1884 var w wrap
1885 var err error
1886 if err = json.Unmarshal(body, &w); err != nil {
1887 return err
1888 }
1889 u.Tag = w.Tag
1890 switch u.Tag {
1891 case "has_team_shared_dropbox":
1892 u.HasTeamSharedDropbox = w.HasTeamSharedDropbox
1893
1894 if err != nil {
1895 return err
1896 }
1897 }
1898 return nil
1899 }
1900
1901 // LegalHoldHeldRevisionMetadata : has no documentation (yet)
1902 type LegalHoldHeldRevisionMetadata struct {
1903 // NewFilename : The held revision filename.
1904 NewFilename string `json:"new_filename"`
1905 // OriginalRevisionId : The id of the held revision.
1906 OriginalRevisionId string `json:"original_revision_id"`
1907 // OriginalFilePath : The original path of the held revision.
1908 OriginalFilePath string `json:"original_file_path"`
1909 // ServerModified : The last time the file was modified on Dropbox.
1910 ServerModified time.Time `json:"server_modified"`
1911 // AuthorMemberId : The member id of the revision's author.
1912 AuthorMemberId string `json:"author_member_id"`
1913 // AuthorMemberStatus : The member status of the revision's author.
1914 AuthorMemberStatus *TeamMemberStatus `json:"author_member_status"`
1915 // AuthorEmail : The email address of the held revision author.
1916 AuthorEmail string `json:"author_email"`
1917 // FileType : The type of the held revision's file.
1918 FileType string `json:"file_type"`
1919 // Size : The file size in bytes.
1920 Size uint64 `json:"size"`
1921 // ContentHash : A hash of the file content. This field can be used to
1922 // verify data integrity. For more information see our `Content hash`
1923 // <https://www.dropbox.com/developers/reference/content-hash> page.
1924 ContentHash string `json:"content_hash"`
1925 }
1926
1927 // NewLegalHoldHeldRevisionMetadata returns a new LegalHoldHeldRevisionMetadata instance
1928 func NewLegalHoldHeldRevisionMetadata(NewFilename string, OriginalRevisionId string, OriginalFilePath string, ServerModified time.Time, AuthorMemberId string, AuthorMemberStatus *TeamMemberStatus, AuthorEmail string, FileType string, Size uint64, ContentHash string) *LegalHoldHeldRevisionMetadata {
1929 s := new(LegalHoldHeldRevisionMetadata)
1930 s.NewFilename = NewFilename
1931 s.OriginalRevisionId = OriginalRevisionId
1932 s.OriginalFilePath = OriginalFilePath
1933 s.ServerModified = ServerModified
1934 s.AuthorMemberId = AuthorMemberId
1935 s.AuthorMemberStatus = AuthorMemberStatus
1936 s.AuthorEmail = AuthorEmail
1937 s.FileType = FileType
1938 s.Size = Size
1939 s.ContentHash = ContentHash
1940 return s
1941 }
1942
1943 // LegalHoldPolicy : has no documentation (yet)
1944 type LegalHoldPolicy struct {
1945 // Id : The legal hold id.
1946 Id string `json:"id"`
1947 // Name : Policy name.
1948 Name string `json:"name"`
1949 // Description : A description of the legal hold policy.
1950 Description string `json:"description,omitempty"`
1951 // ActivationTime : The time at which the legal hold was activated.
1952 ActivationTime *time.Time `json:"activation_time,omitempty"`
1953 // Members : Team members IDs and number of permanently deleted members
1954 // under hold.
1955 Members *MembersInfo `json:"members"`
1956 // Status : The current state of the hold.
1957 Status *LegalHoldStatus `json:"status"`
1958 // StartDate : Start date of the legal hold policy.
1959 StartDate time.Time `json:"start_date"`
1960 // EndDate : End date of the legal hold policy.
1961 EndDate *time.Time `json:"end_date,omitempty"`
1962 }
1963
1964 // NewLegalHoldPolicy returns a new LegalHoldPolicy instance
1965 func NewLegalHoldPolicy(Id string, Name string, Members *MembersInfo, Status *LegalHoldStatus, StartDate time.Time) *LegalHoldPolicy {
1966 s := new(LegalHoldPolicy)
1967 s.Id = Id
1968 s.Name = Name
1969 s.Members = Members
1970 s.Status = Status
1971 s.StartDate = StartDate
1972 return s
1973 }
1974
1975 // LegalHoldStatus : has no documentation (yet)
1976 type LegalHoldStatus struct {
1977 dropbox.Tagged
1978 }
1979
1980 // Valid tag values for LegalHoldStatus
1981 const (
1982 LegalHoldStatusActive = "active"
1983 LegalHoldStatusReleased = "released"
1984 LegalHoldStatusActivating = "activating"
1985 LegalHoldStatusUpdating = "updating"
1986 LegalHoldStatusExporting = "exporting"
1987 LegalHoldStatusReleasing = "releasing"
1988 LegalHoldStatusOther = "other"
1989 )
1990
1991 // LegalHoldsError : has no documentation (yet)
1992 type LegalHoldsError struct {
1993 dropbox.Tagged
1994 }
1995
1996 // Valid tag values for LegalHoldsError
1997 const (
1998 LegalHoldsErrorUnknownLegalHoldError = "unknown_legal_hold_error"
1999 LegalHoldsErrorInsufficientPermissions = "insufficient_permissions"
2000 LegalHoldsErrorOther = "other"
2001 )
2002
2003 // LegalHoldsGetPolicyArg : has no documentation (yet)
2004 type LegalHoldsGetPolicyArg struct {
2005 // Id : The legal hold Id.
2006 Id string `json:"id"`
2007 }
2008
2009 // NewLegalHoldsGetPolicyArg returns a new LegalHoldsGetPolicyArg instance
2010 func NewLegalHoldsGetPolicyArg(Id string) *LegalHoldsGetPolicyArg {
2011 s := new(LegalHoldsGetPolicyArg)
2012 s.Id = Id
2013 return s
2014 }
2015
2016 // LegalHoldsGetPolicyError : has no documentation (yet)
2017 type LegalHoldsGetPolicyError struct {
2018 dropbox.Tagged
2019 }
2020
2021 // Valid tag values for LegalHoldsGetPolicyError
2022 const (
2023 LegalHoldsGetPolicyErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2024 LegalHoldsGetPolicyErrorInsufficientPermissions = "insufficient_permissions"
2025 LegalHoldsGetPolicyErrorOther = "other"
2026 LegalHoldsGetPolicyErrorLegalHoldPolicyNotFound = "legal_hold_policy_not_found"
2027 )
2028
2029 // LegalHoldsListHeldRevisionResult : has no documentation (yet)
2030 type LegalHoldsListHeldRevisionResult struct {
2031 // Entries : List of file entries that under the hold.
2032 Entries []*LegalHoldHeldRevisionMetadata `json:"entries"`
2033 // Cursor : The cursor idicates where to continue reading file metadata
2034 // entries for the next API call. When there are no more entries, the cursor
2035 // will return none. Pass the cursor into
2036 // /2/team/legal_holds/list_held_revisions/continue.
2037 Cursor string `json:"cursor,omitempty"`
2038 // HasMore : True if there are more file entries that haven't been returned.
2039 // You can retrieve them with a call to
2040 // /legal_holds/list_held_revisions_continue.
2041 HasMore bool `json:"has_more"`
2042 }
2043
2044 // NewLegalHoldsListHeldRevisionResult returns a new LegalHoldsListHeldRevisionResult instance
2045 func NewLegalHoldsListHeldRevisionResult(Entries []*LegalHoldHeldRevisionMetadata, HasMore bool) *LegalHoldsListHeldRevisionResult {
2046 s := new(LegalHoldsListHeldRevisionResult)
2047 s.Entries = Entries
2048 s.HasMore = HasMore
2049 return s
2050 }
2051
2052 // LegalHoldsListHeldRevisionsArg : has no documentation (yet)
2053 type LegalHoldsListHeldRevisionsArg struct {
2054 // Id : The legal hold Id.
2055 Id string `json:"id"`
2056 }
2057
2058 // NewLegalHoldsListHeldRevisionsArg returns a new LegalHoldsListHeldRevisionsArg instance
2059 func NewLegalHoldsListHeldRevisionsArg(Id string) *LegalHoldsListHeldRevisionsArg {
2060 s := new(LegalHoldsListHeldRevisionsArg)
2061 s.Id = Id
2062 return s
2063 }
2064
2065 // LegalHoldsListHeldRevisionsContinueArg : has no documentation (yet)
2066 type LegalHoldsListHeldRevisionsContinueArg struct {
2067 // Id : The legal hold Id.
2068 Id string `json:"id"`
2069 // Cursor : The cursor idicates where to continue reading file metadata
2070 // entries for the next API call. When there are no more entries, the cursor
2071 // will return none.
2072 Cursor string `json:"cursor,omitempty"`
2073 }
2074
2075 // NewLegalHoldsListHeldRevisionsContinueArg returns a new LegalHoldsListHeldRevisionsContinueArg instance
2076 func NewLegalHoldsListHeldRevisionsContinueArg(Id string) *LegalHoldsListHeldRevisionsContinueArg {
2077 s := new(LegalHoldsListHeldRevisionsContinueArg)
2078 s.Id = Id
2079 return s
2080 }
2081
2082 // LegalHoldsListHeldRevisionsContinueError : has no documentation (yet)
2083 type LegalHoldsListHeldRevisionsContinueError struct {
2084 dropbox.Tagged
2085 }
2086
2087 // Valid tag values for LegalHoldsListHeldRevisionsContinueError
2088 const (
2089 LegalHoldsListHeldRevisionsContinueErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2090 LegalHoldsListHeldRevisionsContinueErrorTransientError = "transient_error"
2091 LegalHoldsListHeldRevisionsContinueErrorReset = "reset"
2092 LegalHoldsListHeldRevisionsContinueErrorOther = "other"
2093 )
2094
2095 // LegalHoldsListHeldRevisionsError : has no documentation (yet)
2096 type LegalHoldsListHeldRevisionsError struct {
2097 dropbox.Tagged
2098 }
2099
2100 // Valid tag values for LegalHoldsListHeldRevisionsError
2101 const (
2102 LegalHoldsListHeldRevisionsErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2103 LegalHoldsListHeldRevisionsErrorInsufficientPermissions = "insufficient_permissions"
2104 LegalHoldsListHeldRevisionsErrorOther = "other"
2105 LegalHoldsListHeldRevisionsErrorTransientError = "transient_error"
2106 LegalHoldsListHeldRevisionsErrorLegalHoldStillEmpty = "legal_hold_still_empty"
2107 LegalHoldsListHeldRevisionsErrorInactiveLegalHold = "inactive_legal_hold"
2108 )
2109
2110 // LegalHoldsListPoliciesArg : has no documentation (yet)
2111 type LegalHoldsListPoliciesArg struct {
2112 // IncludeReleased : Whether to return holds that were released.
2113 IncludeReleased bool `json:"include_released"`
2114 }
2115
2116 // NewLegalHoldsListPoliciesArg returns a new LegalHoldsListPoliciesArg instance
2117 func NewLegalHoldsListPoliciesArg() *LegalHoldsListPoliciesArg {
2118 s := new(LegalHoldsListPoliciesArg)
2119 s.IncludeReleased = false
2120 return s
2121 }
2122
2123 // LegalHoldsListPoliciesError : has no documentation (yet)
2124 type LegalHoldsListPoliciesError struct {
2125 dropbox.Tagged
2126 }
2127
2128 // Valid tag values for LegalHoldsListPoliciesError
2129 const (
2130 LegalHoldsListPoliciesErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2131 LegalHoldsListPoliciesErrorInsufficientPermissions = "insufficient_permissions"
2132 LegalHoldsListPoliciesErrorOther = "other"
2133 LegalHoldsListPoliciesErrorTransientError = "transient_error"
2134 )
2135
2136 // LegalHoldsListPoliciesResult : has no documentation (yet)
2137 type LegalHoldsListPoliciesResult struct {
2138 // Policies : has no documentation (yet)
2139 Policies []*LegalHoldPolicy `json:"policies"`
2140 }
2141
2142 // NewLegalHoldsListPoliciesResult returns a new LegalHoldsListPoliciesResult instance
2143 func NewLegalHoldsListPoliciesResult(Policies []*LegalHoldPolicy) *LegalHoldsListPoliciesResult {
2144 s := new(LegalHoldsListPoliciesResult)
2145 s.Policies = Policies
2146 return s
2147 }
2148
2149 // LegalHoldsPolicyCreateArg : has no documentation (yet)
2150 type LegalHoldsPolicyCreateArg struct {
2151 // Name : Policy name.
2152 Name string `json:"name"`
2153 // Description : A description of the legal hold policy.
2154 Description string `json:"description,omitempty"`
2155 // Members : List of team member IDs added to the hold.
2156 Members []string `json:"members"`
2157 // StartDate : start date of the legal hold policy.
2158 StartDate *time.Time `json:"start_date,omitempty"`
2159 // EndDate : end date of the legal hold policy.
2160 EndDate *time.Time `json:"end_date,omitempty"`
2161 }
2162
2163 // NewLegalHoldsPolicyCreateArg returns a new LegalHoldsPolicyCreateArg instance
2164 func NewLegalHoldsPolicyCreateArg(Name string, Members []string) *LegalHoldsPolicyCreateArg {
2165 s := new(LegalHoldsPolicyCreateArg)
2166 s.Name = Name
2167 s.Members = Members
2168 return s
2169 }
2170
2171 // LegalHoldsPolicyCreateError : has no documentation (yet)
2172 type LegalHoldsPolicyCreateError struct {
2173 dropbox.Tagged
2174 }
2175
2176 // Valid tag values for LegalHoldsPolicyCreateError
2177 const (
2178 LegalHoldsPolicyCreateErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2179 LegalHoldsPolicyCreateErrorInsufficientPermissions = "insufficient_permissions"
2180 LegalHoldsPolicyCreateErrorOther = "other"
2181 LegalHoldsPolicyCreateErrorStartDateIsLaterThanEndDate = "start_date_is_later_than_end_date"
2182 LegalHoldsPolicyCreateErrorEmptyMembersList = "empty_members_list"
2183 LegalHoldsPolicyCreateErrorInvalidMembers = "invalid_members"
2184 LegalHoldsPolicyCreateErrorNumberOfUsersOnHoldIsGreaterThanHoldLimitation = "number_of_users_on_hold_is_greater_than_hold_limitation"
2185 LegalHoldsPolicyCreateErrorTransientError = "transient_error"
2186 LegalHoldsPolicyCreateErrorNameMustBeUnique = "name_must_be_unique"
2187 LegalHoldsPolicyCreateErrorTeamExceededLegalHoldQuota = "team_exceeded_legal_hold_quota"
2188 LegalHoldsPolicyCreateErrorInvalidDate = "invalid_date"
2189 )
2190
2191 // LegalHoldsPolicyReleaseArg : has no documentation (yet)
2192 type LegalHoldsPolicyReleaseArg struct {
2193 // Id : The legal hold Id.
2194 Id string `json:"id"`
2195 }
2196
2197 // NewLegalHoldsPolicyReleaseArg returns a new LegalHoldsPolicyReleaseArg instance
2198 func NewLegalHoldsPolicyReleaseArg(Id string) *LegalHoldsPolicyReleaseArg {
2199 s := new(LegalHoldsPolicyReleaseArg)
2200 s.Id = Id
2201 return s
2202 }
2203
2204 // LegalHoldsPolicyReleaseError : has no documentation (yet)
2205 type LegalHoldsPolicyReleaseError struct {
2206 dropbox.Tagged
2207 }
2208
2209 // Valid tag values for LegalHoldsPolicyReleaseError
2210 const (
2211 LegalHoldsPolicyReleaseErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2212 LegalHoldsPolicyReleaseErrorInsufficientPermissions = "insufficient_permissions"
2213 LegalHoldsPolicyReleaseErrorOther = "other"
2214 LegalHoldsPolicyReleaseErrorLegalHoldPerformingAnotherOperation = "legal_hold_performing_another_operation"
2215 LegalHoldsPolicyReleaseErrorLegalHoldAlreadyReleasing = "legal_hold_already_releasing"
2216 LegalHoldsPolicyReleaseErrorLegalHoldPolicyNotFound = "legal_hold_policy_not_found"
2217 )
2218
2219 // LegalHoldsPolicyUpdateArg : has no documentation (yet)
2220 type LegalHoldsPolicyUpdateArg struct {
2221 // Id : The legal hold Id.
2222 Id string `json:"id"`
2223 // Name : Policy new name.
2224 Name string `json:"name,omitempty"`
2225 // Description : Policy new description.
2226 Description string `json:"description,omitempty"`
2227 // Members : List of team member IDs to apply the policy on.
2228 Members []string `json:"members,omitempty"`
2229 }
2230
2231 // NewLegalHoldsPolicyUpdateArg returns a new LegalHoldsPolicyUpdateArg instance
2232 func NewLegalHoldsPolicyUpdateArg(Id string) *LegalHoldsPolicyUpdateArg {
2233 s := new(LegalHoldsPolicyUpdateArg)
2234 s.Id = Id
2235 return s
2236 }
2237
2238 // LegalHoldsPolicyUpdateError : has no documentation (yet)
2239 type LegalHoldsPolicyUpdateError struct {
2240 dropbox.Tagged
2241 }
2242
2243 // Valid tag values for LegalHoldsPolicyUpdateError
2244 const (
2245 LegalHoldsPolicyUpdateErrorUnknownLegalHoldError = "unknown_legal_hold_error"
2246 LegalHoldsPolicyUpdateErrorInsufficientPermissions = "insufficient_permissions"
2247 LegalHoldsPolicyUpdateErrorOther = "other"
2248 LegalHoldsPolicyUpdateErrorTransientError = "transient_error"
2249 LegalHoldsPolicyUpdateErrorInactiveLegalHold = "inactive_legal_hold"
2250 LegalHoldsPolicyUpdateErrorLegalHoldPerformingAnotherOperation = "legal_hold_performing_another_operation"
2251 LegalHoldsPolicyUpdateErrorInvalidMembers = "invalid_members"
2252 LegalHoldsPolicyUpdateErrorNumberOfUsersOnHoldIsGreaterThanHoldLimitation = "number_of_users_on_hold_is_greater_than_hold_limitation"
2253 LegalHoldsPolicyUpdateErrorEmptyMembersList = "empty_members_list"
2254 LegalHoldsPolicyUpdateErrorNameMustBeUnique = "name_must_be_unique"
2255 LegalHoldsPolicyUpdateErrorLegalHoldPolicyNotFound = "legal_hold_policy_not_found"
2256 )
2257
2258 // ListMemberAppsArg : has no documentation (yet)
2259 type ListMemberAppsArg struct {
2260 // TeamMemberId : The team member id.
2261 TeamMemberId string `json:"team_member_id"`
2262 }
2263
2264 // NewListMemberAppsArg returns a new ListMemberAppsArg instance
2265 func NewListMemberAppsArg(TeamMemberId string) *ListMemberAppsArg {
2266 s := new(ListMemberAppsArg)
2267 s.TeamMemberId = TeamMemberId
2268 return s
2269 }
2270
2271 // ListMemberAppsError : Error returned by `linkedAppsListMemberLinkedApps`.
2272 type ListMemberAppsError struct {
2273 dropbox.Tagged
2274 }
2275
2276 // Valid tag values for ListMemberAppsError
2277 const (
2278 ListMemberAppsErrorMemberNotFound = "member_not_found"
2279 ListMemberAppsErrorOther = "other"
2280 )
2281
2282 // ListMemberAppsResult : has no documentation (yet)
2283 type ListMemberAppsResult struct {
2284 // LinkedApiApps : List of third party applications linked by this team
2285 // member.
2286 LinkedApiApps []*ApiApp `json:"linked_api_apps"`
2287 }
2288
2289 // NewListMemberAppsResult returns a new ListMemberAppsResult instance
2290 func NewListMemberAppsResult(LinkedApiApps []*ApiApp) *ListMemberAppsResult {
2291 s := new(ListMemberAppsResult)
2292 s.LinkedApiApps = LinkedApiApps
2293 return s
2294 }
2295
2296 // ListMemberDevicesArg : has no documentation (yet)
2297 type ListMemberDevicesArg struct {
2298 // TeamMemberId : The team's member id.
2299 TeamMemberId string `json:"team_member_id"`
2300 // IncludeWebSessions : Whether to list web sessions of the team's member.
2301 IncludeWebSessions bool `json:"include_web_sessions"`
2302 // IncludeDesktopClients : Whether to list linked desktop devices of the
2303 // team's member.
2304 IncludeDesktopClients bool `json:"include_desktop_clients"`
2305 // IncludeMobileClients : Whether to list linked mobile devices of the
2306 // team's member.
2307 IncludeMobileClients bool `json:"include_mobile_clients"`
2308 }
2309
2310 // NewListMemberDevicesArg returns a new ListMemberDevicesArg instance
2311 func NewListMemberDevicesArg(TeamMemberId string) *ListMemberDevicesArg {
2312 s := new(ListMemberDevicesArg)
2313 s.TeamMemberId = TeamMemberId
2314 s.IncludeWebSessions = true
2315 s.IncludeDesktopClients = true
2316 s.IncludeMobileClients = true
2317 return s
2318 }
2319
2320 // ListMemberDevicesError : has no documentation (yet)
2321 type ListMemberDevicesError struct {
2322 dropbox.Tagged
2323 }
2324
2325 // Valid tag values for ListMemberDevicesError
2326 const (
2327 ListMemberDevicesErrorMemberNotFound = "member_not_found"
2328 ListMemberDevicesErrorOther = "other"
2329 )
2330
2331 // ListMemberDevicesResult : has no documentation (yet)
2332 type ListMemberDevicesResult struct {
2333 // ActiveWebSessions : List of web sessions made by this team member.
2334 ActiveWebSessions []*ActiveWebSession `json:"active_web_sessions,omitempty"`
2335 // DesktopClientSessions : List of desktop clients used by this team member.
2336 DesktopClientSessions []*DesktopClientSession `json:"desktop_client_sessions,omitempty"`
2337 // MobileClientSessions : List of mobile client used by this team member.
2338 MobileClientSessions []*MobileClientSession `json:"mobile_client_sessions,omitempty"`
2339 }
2340
2341 // NewListMemberDevicesResult returns a new ListMemberDevicesResult instance
2342 func NewListMemberDevicesResult() *ListMemberDevicesResult {
2343 s := new(ListMemberDevicesResult)
2344 return s
2345 }
2346
2347 // ListMembersAppsArg : Arguments for `linkedAppsListMembersLinkedApps`.
2348 type ListMembersAppsArg struct {
2349 // Cursor : At the first call to the `linkedAppsListMembersLinkedApps` the
2350 // cursor shouldn't be passed. Then, if the result of the call includes a
2351 // cursor, the following requests should include the received cursors in
2352 // order to receive the next sub list of the team applications.
2353 Cursor string `json:"cursor,omitempty"`
2354 }
2355
2356 // NewListMembersAppsArg returns a new ListMembersAppsArg instance
2357 func NewListMembersAppsArg() *ListMembersAppsArg {
2358 s := new(ListMembersAppsArg)
2359 return s
2360 }
2361
2362 // ListMembersAppsError : Error returned by `linkedAppsListMembersLinkedApps`.
2363 type ListMembersAppsError struct {
2364 dropbox.Tagged
2365 }
2366
2367 // Valid tag values for ListMembersAppsError
2368 const (
2369 ListMembersAppsErrorReset = "reset"
2370 ListMembersAppsErrorOther = "other"
2371 )
2372
2373 // ListMembersAppsResult : Information returned by
2374 // `linkedAppsListMembersLinkedApps`.
2375 type ListMembersAppsResult struct {
2376 // Apps : The linked applications of each member of the team.
2377 Apps []*MemberLinkedApps `json:"apps"`
2378 // HasMore : If true, then there are more apps available. Pass the cursor to
2379 // `linkedAppsListMembersLinkedApps` to retrieve the rest.
2380 HasMore bool `json:"has_more"`
2381 // Cursor : Pass the cursor into `linkedAppsListMembersLinkedApps` to
2382 // receive the next sub list of team's applications.
2383 Cursor string `json:"cursor,omitempty"`
2384 }
2385
2386 // NewListMembersAppsResult returns a new ListMembersAppsResult instance
2387 func NewListMembersAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListMembersAppsResult {
2388 s := new(ListMembersAppsResult)
2389 s.Apps = Apps
2390 s.HasMore = HasMore
2391 return s
2392 }
2393
2394 // ListMembersDevicesArg : has no documentation (yet)
2395 type ListMembersDevicesArg struct {
2396 // Cursor : At the first call to the `devicesListMembersDevices` the cursor
2397 // shouldn't be passed. Then, if the result of the call includes a cursor,
2398 // the following requests should include the received cursors in order to
2399 // receive the next sub list of team devices.
2400 Cursor string `json:"cursor,omitempty"`
2401 // IncludeWebSessions : Whether to list web sessions of the team members.
2402 IncludeWebSessions bool `json:"include_web_sessions"`
2403 // IncludeDesktopClients : Whether to list desktop clients of the team
2404 // members.
2405 IncludeDesktopClients bool `json:"include_desktop_clients"`
2406 // IncludeMobileClients : Whether to list mobile clients of the team
2407 // members.
2408 IncludeMobileClients bool `json:"include_mobile_clients"`
2409 }
2410
2411 // NewListMembersDevicesArg returns a new ListMembersDevicesArg instance
2412 func NewListMembersDevicesArg() *ListMembersDevicesArg {
2413 s := new(ListMembersDevicesArg)
2414 s.IncludeWebSessions = true
2415 s.IncludeDesktopClients = true
2416 s.IncludeMobileClients = true
2417 return s
2418 }
2419
2420 // ListMembersDevicesError : has no documentation (yet)
2421 type ListMembersDevicesError struct {
2422 dropbox.Tagged
2423 }
2424
2425 // Valid tag values for ListMembersDevicesError
2426 const (
2427 ListMembersDevicesErrorReset = "reset"
2428 ListMembersDevicesErrorOther = "other"
2429 )
2430
2431 // ListMembersDevicesResult : has no documentation (yet)
2432 type ListMembersDevicesResult struct {
2433 // Devices : The devices of each member of the team.
2434 Devices []*MemberDevices `json:"devices"`
2435 // HasMore : If true, then there are more devices available. Pass the cursor
2436 // to `devicesListMembersDevices` to retrieve the rest.
2437 HasMore bool `json:"has_more"`
2438 // Cursor : Pass the cursor into `devicesListMembersDevices` to receive the
2439 // next sub list of team's devices.
2440 Cursor string `json:"cursor,omitempty"`
2441 }
2442
2443 // NewListMembersDevicesResult returns a new ListMembersDevicesResult instance
2444 func NewListMembersDevicesResult(Devices []*MemberDevices, HasMore bool) *ListMembersDevicesResult {
2445 s := new(ListMembersDevicesResult)
2446 s.Devices = Devices
2447 s.HasMore = HasMore
2448 return s
2449 }
2450
2451 // ListTeamAppsArg : Arguments for `linkedAppsListTeamLinkedApps`.
2452 type ListTeamAppsArg struct {
2453 // Cursor : At the first call to the `linkedAppsListTeamLinkedApps` the
2454 // cursor shouldn't be passed. Then, if the result of the call includes a
2455 // cursor, the following requests should include the received cursors in
2456 // order to receive the next sub list of the team applications.
2457 Cursor string `json:"cursor,omitempty"`
2458 }
2459
2460 // NewListTeamAppsArg returns a new ListTeamAppsArg instance
2461 func NewListTeamAppsArg() *ListTeamAppsArg {
2462 s := new(ListTeamAppsArg)
2463 return s
2464 }
2465
2466 // ListTeamAppsError : Error returned by `linkedAppsListTeamLinkedApps`.
2467 type ListTeamAppsError struct {
2468 dropbox.Tagged
2469 }
2470
2471 // Valid tag values for ListTeamAppsError
2472 const (
2473 ListTeamAppsErrorReset = "reset"
2474 ListTeamAppsErrorOther = "other"
2475 )
2476
2477 // ListTeamAppsResult : Information returned by `linkedAppsListTeamLinkedApps`.
2478 type ListTeamAppsResult struct {
2479 // Apps : The linked applications of each member of the team.
2480 Apps []*MemberLinkedApps `json:"apps"`
2481 // HasMore : If true, then there are more apps available. Pass the cursor to
2482 // `linkedAppsListTeamLinkedApps` to retrieve the rest.
2483 HasMore bool `json:"has_more"`
2484 // Cursor : Pass the cursor into `linkedAppsListTeamLinkedApps` to receive
2485 // the next sub list of team's applications.
2486 Cursor string `json:"cursor,omitempty"`
2487 }
2488
2489 // NewListTeamAppsResult returns a new ListTeamAppsResult instance
2490 func NewListTeamAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListTeamAppsResult {
2491 s := new(ListTeamAppsResult)
2492 s.Apps = Apps
2493 s.HasMore = HasMore
2494 return s
2495 }
2496
2497 // ListTeamDevicesArg : has no documentation (yet)
2498 type ListTeamDevicesArg struct {
2499 // Cursor : At the first call to the `devicesListTeamDevices` the cursor
2500 // shouldn't be passed. Then, if the result of the call includes a cursor,
2501 // the following requests should include the received cursors in order to
2502 // receive the next sub list of team devices.
2503 Cursor string `json:"cursor,omitempty"`
2504 // IncludeWebSessions : Whether to list web sessions of the team members.
2505 IncludeWebSessions bool `json:"include_web_sessions"`
2506 // IncludeDesktopClients : Whether to list desktop clients of the team
2507 // members.
2508 IncludeDesktopClients bool `json:"include_desktop_clients"`
2509 // IncludeMobileClients : Whether to list mobile clients of the team
2510 // members.
2511 IncludeMobileClients bool `json:"include_mobile_clients"`
2512 }
2513
2514 // NewListTeamDevicesArg returns a new ListTeamDevicesArg instance
2515 func NewListTeamDevicesArg() *ListTeamDevicesArg {
2516 s := new(ListTeamDevicesArg)
2517 s.IncludeWebSessions = true
2518 s.IncludeDesktopClients = true
2519 s.IncludeMobileClients = true
2520 return s
2521 }
2522
2523 // ListTeamDevicesError : has no documentation (yet)
2524 type ListTeamDevicesError struct {
2525 dropbox.Tagged
2526 }
2527
2528 // Valid tag values for ListTeamDevicesError
2529 const (
2530 ListTeamDevicesErrorReset = "reset"
2531 ListTeamDevicesErrorOther = "other"
2532 )
2533
2534 // ListTeamDevicesResult : has no documentation (yet)
2535 type ListTeamDevicesResult struct {
2536 // Devices : The devices of each member of the team.
2537 Devices []*MemberDevices `json:"devices"`
2538 // HasMore : If true, then there are more devices available. Pass the cursor
2539 // to `devicesListTeamDevices` to retrieve the rest.
2540 HasMore bool `json:"has_more"`
2541 // Cursor : Pass the cursor into `devicesListTeamDevices` to receive the
2542 // next sub list of team's devices.
2543 Cursor string `json:"cursor,omitempty"`
2544 }
2545
2546 // NewListTeamDevicesResult returns a new ListTeamDevicesResult instance
2547 func NewListTeamDevicesResult(Devices []*MemberDevices, HasMore bool) *ListTeamDevicesResult {
2548 s := new(ListTeamDevicesResult)
2549 s.Devices = Devices
2550 s.HasMore = HasMore
2551 return s
2552 }
2553
2554 // MemberAccess : Specify access type a member should have when joined to a
2555 // group.
2556 type MemberAccess struct {
2557 // User : Identity of a user.
2558 User *UserSelectorArg `json:"user"`
2559 // AccessType : Access type.
2560 AccessType *GroupAccessType `json:"access_type"`
2561 }
2562
2563 // NewMemberAccess returns a new MemberAccess instance
2564 func NewMemberAccess(User *UserSelectorArg, AccessType *GroupAccessType) *MemberAccess {
2565 s := new(MemberAccess)
2566 s.User = User
2567 s.AccessType = AccessType
2568 return s
2569 }
2570
2571 // MemberAddArgBase : has no documentation (yet)
2572 type MemberAddArgBase struct {
2573 // MemberEmail : has no documentation (yet)
2574 MemberEmail string `json:"member_email"`
2575 // MemberGivenName : Member's first name.
2576 MemberGivenName string `json:"member_given_name,omitempty"`
2577 // MemberSurname : Member's last name.
2578 MemberSurname string `json:"member_surname,omitempty"`
2579 // MemberExternalId : External ID for member.
2580 MemberExternalId string `json:"member_external_id,omitempty"`
2581 // MemberPersistentId : Persistent ID for member. This field is only
2582 // available to teams using persistent ID SAML configuration.
2583 MemberPersistentId string `json:"member_persistent_id,omitempty"`
2584 // SendWelcomeEmail : Whether to send a welcome email to the member. If
2585 // send_welcome_email is false, no email invitation will be sent to the
2586 // user. This may be useful for apps using single sign-on (SSO) flows for
2587 // onboarding that want to handle announcements themselves.
2588 SendWelcomeEmail bool `json:"send_welcome_email"`
2589 // IsDirectoryRestricted : Whether a user is directory restricted.
2590 IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
2591 }
2592
2593 // NewMemberAddArgBase returns a new MemberAddArgBase instance
2594 func NewMemberAddArgBase(MemberEmail string) *MemberAddArgBase {
2595 s := new(MemberAddArgBase)
2596 s.MemberEmail = MemberEmail
2597 s.SendWelcomeEmail = true
2598 return s
2599 }
2600
2601 // MemberAddArg : has no documentation (yet)
2602 type MemberAddArg struct {
2603 MemberAddArgBase
2604 // Role : has no documentation (yet)
2605 Role *AdminTier `json:"role"`
2606 }
2607
2608 // NewMemberAddArg returns a new MemberAddArg instance
2609 func NewMemberAddArg(MemberEmail string) *MemberAddArg {
2610 s := new(MemberAddArg)
2611 s.MemberEmail = MemberEmail
2612 s.SendWelcomeEmail = true
2613 s.Role = &AdminTier{Tagged: dropbox.Tagged{Tag: "member_only"}}
2614 return s
2615 }
2616
2617 // MemberAddResultBase : has no documentation (yet)
2618 type MemberAddResultBase struct {
2619 dropbox.Tagged
2620 // TeamLicenseLimit : Team is already full. The organization has no
2621 // available licenses.
2622 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
2623 // FreeTeamMemberLimitReached : Team is already full. The free team member
2624 // limit has been reached.
2625 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
2626 // UserAlreadyOnTeam : User is already on this team. The provided email
2627 // address is associated with a user who is already a member of (including
2628 // in recoverable state) or invited to the team.
2629 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
2630 // UserOnAnotherTeam : User is already on another team. The provided email
2631 // address is associated with a user that is already a member or invited to
2632 // another team.
2633 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
2634 // UserAlreadyPaired : User is already paired.
2635 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
2636 // UserMigrationFailed : User migration has failed.
2637 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
2638 // DuplicateExternalMemberId : A user with the given external member ID
2639 // already exists on the team (including in recoverable state).
2640 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
2641 // DuplicateMemberPersistentId : A user with the given persistent ID already
2642 // exists on the team (including in recoverable state).
2643 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
2644 // PersistentIdDisabled : Persistent ID is only available to teams with
2645 // persistent ID SAML configuration. Please contact Dropbox for more
2646 // information.
2647 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
2648 // UserCreationFailed : User creation has failed.
2649 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2650 }
2651
2652 // Valid tag values for MemberAddResultBase
2653 const (
2654 MemberAddResultBaseTeamLicenseLimit = "team_license_limit"
2655 MemberAddResultBaseFreeTeamMemberLimitReached = "free_team_member_limit_reached"
2656 MemberAddResultBaseUserAlreadyOnTeam = "user_already_on_team"
2657 MemberAddResultBaseUserOnAnotherTeam = "user_on_another_team"
2658 MemberAddResultBaseUserAlreadyPaired = "user_already_paired"
2659 MemberAddResultBaseUserMigrationFailed = "user_migration_failed"
2660 MemberAddResultBaseDuplicateExternalMemberId = "duplicate_external_member_id"
2661 MemberAddResultBaseDuplicateMemberPersistentId = "duplicate_member_persistent_id"
2662 MemberAddResultBasePersistentIdDisabled = "persistent_id_disabled"
2663 MemberAddResultBaseUserCreationFailed = "user_creation_failed"
2664 )
2665
2666 // UnmarshalJSON deserializes into a MemberAddResultBase instance
2667 func (u *MemberAddResultBase) UnmarshalJSON(body []byte) error {
2668 type wrap struct {
2669 dropbox.Tagged
2670 // TeamLicenseLimit : Team is already full. The organization has no
2671 // available licenses.
2672 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
2673 // FreeTeamMemberLimitReached : Team is already full. The free team
2674 // member limit has been reached.
2675 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
2676 // UserAlreadyOnTeam : User is already on this team. The provided email
2677 // address is associated with a user who is already a member of
2678 // (including in recoverable state) or invited to the team.
2679 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
2680 // UserOnAnotherTeam : User is already on another team. The provided
2681 // email address is associated with a user that is already a member or
2682 // invited to another team.
2683 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
2684 // UserAlreadyPaired : User is already paired.
2685 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
2686 // UserMigrationFailed : User migration has failed.
2687 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
2688 // DuplicateExternalMemberId : A user with the given external member ID
2689 // already exists on the team (including in recoverable state).
2690 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
2691 // DuplicateMemberPersistentId : A user with the given persistent ID
2692 // already exists on the team (including in recoverable state).
2693 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
2694 // PersistentIdDisabled : Persistent ID is only available to teams with
2695 // persistent ID SAML configuration. Please contact Dropbox for more
2696 // information.
2697 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
2698 // UserCreationFailed : User creation has failed.
2699 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2700 }
2701 var w wrap
2702 var err error
2703 if err = json.Unmarshal(body, &w); err != nil {
2704 return err
2705 }
2706 u.Tag = w.Tag
2707 switch u.Tag {
2708 case "team_license_limit":
2709 u.TeamLicenseLimit = w.TeamLicenseLimit
2710
2711 if err != nil {
2712 return err
2713 }
2714 case "free_team_member_limit_reached":
2715 u.FreeTeamMemberLimitReached = w.FreeTeamMemberLimitReached
2716
2717 if err != nil {
2718 return err
2719 }
2720 case "user_already_on_team":
2721 u.UserAlreadyOnTeam = w.UserAlreadyOnTeam
2722
2723 if err != nil {
2724 return err
2725 }
2726 case "user_on_another_team":
2727 u.UserOnAnotherTeam = w.UserOnAnotherTeam
2728
2729 if err != nil {
2730 return err
2731 }
2732 case "user_already_paired":
2733 u.UserAlreadyPaired = w.UserAlreadyPaired
2734
2735 if err != nil {
2736 return err
2737 }
2738 case "user_migration_failed":
2739 u.UserMigrationFailed = w.UserMigrationFailed
2740
2741 if err != nil {
2742 return err
2743 }
2744 case "duplicate_external_member_id":
2745 u.DuplicateExternalMemberId = w.DuplicateExternalMemberId
2746
2747 if err != nil {
2748 return err
2749 }
2750 case "duplicate_member_persistent_id":
2751 u.DuplicateMemberPersistentId = w.DuplicateMemberPersistentId
2752
2753 if err != nil {
2754 return err
2755 }
2756 case "persistent_id_disabled":
2757 u.PersistentIdDisabled = w.PersistentIdDisabled
2758
2759 if err != nil {
2760 return err
2761 }
2762 case "user_creation_failed":
2763 u.UserCreationFailed = w.UserCreationFailed
2764
2765 if err != nil {
2766 return err
2767 }
2768 }
2769 return nil
2770 }
2771
2772 // MemberAddResult : Describes the result of attempting to add a single user to
2773 // the team. 'success' is the only value indicating that a user was indeed added
2774 // to the team - the other values explain the type of failure that occurred, and
2775 // include the email of the user for which the operation has failed.
2776 type MemberAddResult struct {
2777 dropbox.Tagged
2778 // TeamLicenseLimit : Team is already full. The organization has no
2779 // available licenses.
2780 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
2781 // FreeTeamMemberLimitReached : Team is already full. The free team member
2782 // limit has been reached.
2783 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
2784 // UserAlreadyOnTeam : User is already on this team. The provided email
2785 // address is associated with a user who is already a member of (including
2786 // in recoverable state) or invited to the team.
2787 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
2788 // UserOnAnotherTeam : User is already on another team. The provided email
2789 // address is associated with a user that is already a member or invited to
2790 // another team.
2791 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
2792 // UserAlreadyPaired : User is already paired.
2793 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
2794 // UserMigrationFailed : User migration has failed.
2795 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
2796 // DuplicateExternalMemberId : A user with the given external member ID
2797 // already exists on the team (including in recoverable state).
2798 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
2799 // DuplicateMemberPersistentId : A user with the given persistent ID already
2800 // exists on the team (including in recoverable state).
2801 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
2802 // PersistentIdDisabled : Persistent ID is only available to teams with
2803 // persistent ID SAML configuration. Please contact Dropbox for more
2804 // information.
2805 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
2806 // UserCreationFailed : User creation has failed.
2807 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2808 // Success : Describes a user that was successfully added to the team.
2809 Success *TeamMemberInfo `json:"success,omitempty"`
2810 }
2811
2812 // Valid tag values for MemberAddResult
2813 const (
2814 MemberAddResultTeamLicenseLimit = "team_license_limit"
2815 MemberAddResultFreeTeamMemberLimitReached = "free_team_member_limit_reached"
2816 MemberAddResultUserAlreadyOnTeam = "user_already_on_team"
2817 MemberAddResultUserOnAnotherTeam = "user_on_another_team"
2818 MemberAddResultUserAlreadyPaired = "user_already_paired"
2819 MemberAddResultUserMigrationFailed = "user_migration_failed"
2820 MemberAddResultDuplicateExternalMemberId = "duplicate_external_member_id"
2821 MemberAddResultDuplicateMemberPersistentId = "duplicate_member_persistent_id"
2822 MemberAddResultPersistentIdDisabled = "persistent_id_disabled"
2823 MemberAddResultUserCreationFailed = "user_creation_failed"
2824 MemberAddResultSuccess = "success"
2825 )
2826
2827 // UnmarshalJSON deserializes into a MemberAddResult instance
2828 func (u *MemberAddResult) UnmarshalJSON(body []byte) error {
2829 type wrap struct {
2830 dropbox.Tagged
2831 // TeamLicenseLimit : Team is already full. The organization has no
2832 // available licenses.
2833 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
2834 // FreeTeamMemberLimitReached : Team is already full. The free team
2835 // member limit has been reached.
2836 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
2837 // UserAlreadyOnTeam : User is already on this team. The provided email
2838 // address is associated with a user who is already a member of
2839 // (including in recoverable state) or invited to the team.
2840 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
2841 // UserOnAnotherTeam : User is already on another team. The provided
2842 // email address is associated with a user that is already a member or
2843 // invited to another team.
2844 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
2845 // UserAlreadyPaired : User is already paired.
2846 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
2847 // UserMigrationFailed : User migration has failed.
2848 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
2849 // DuplicateExternalMemberId : A user with the given external member ID
2850 // already exists on the team (including in recoverable state).
2851 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
2852 // DuplicateMemberPersistentId : A user with the given persistent ID
2853 // already exists on the team (including in recoverable state).
2854 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
2855 // PersistentIdDisabled : Persistent ID is only available to teams with
2856 // persistent ID SAML configuration. Please contact Dropbox for more
2857 // information.
2858 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
2859 // UserCreationFailed : User creation has failed.
2860 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2861 }
2862 var w wrap
2863 var err error
2864 if err = json.Unmarshal(body, &w); err != nil {
2865 return err
2866 }
2867 u.Tag = w.Tag
2868 switch u.Tag {
2869 case "team_license_limit":
2870 u.TeamLicenseLimit = w.TeamLicenseLimit
2871
2872 if err != nil {
2873 return err
2874 }
2875 case "free_team_member_limit_reached":
2876 u.FreeTeamMemberLimitReached = w.FreeTeamMemberLimitReached
2877
2878 if err != nil {
2879 return err
2880 }
2881 case "user_already_on_team":
2882 u.UserAlreadyOnTeam = w.UserAlreadyOnTeam
2883
2884 if err != nil {
2885 return err
2886 }
2887 case "user_on_another_team":
2888 u.UserOnAnotherTeam = w.UserOnAnotherTeam
2889
2890 if err != nil {
2891 return err
2892 }
2893 case "user_already_paired":
2894 u.UserAlreadyPaired = w.UserAlreadyPaired
2895
2896 if err != nil {
2897 return err
2898 }
2899 case "user_migration_failed":
2900 u.UserMigrationFailed = w.UserMigrationFailed
2901
2902 if err != nil {
2903 return err
2904 }
2905 case "duplicate_external_member_id":
2906 u.DuplicateExternalMemberId = w.DuplicateExternalMemberId
2907
2908 if err != nil {
2909 return err
2910 }
2911 case "duplicate_member_persistent_id":
2912 u.DuplicateMemberPersistentId = w.DuplicateMemberPersistentId
2913
2914 if err != nil {
2915 return err
2916 }
2917 case "persistent_id_disabled":
2918 u.PersistentIdDisabled = w.PersistentIdDisabled
2919
2920 if err != nil {
2921 return err
2922 }
2923 case "user_creation_failed":
2924 u.UserCreationFailed = w.UserCreationFailed
2925
2926 if err != nil {
2927 return err
2928 }
2929 case "success":
2930 err = json.Unmarshal(body, &u.Success)
2931
2932 if err != nil {
2933 return err
2934 }
2935 }
2936 return nil
2937 }
2938
2939 // MemberAddV2Arg : has no documentation (yet)
2940 type MemberAddV2Arg struct {
2941 MemberAddArgBase
2942 // RoleIds : has no documentation (yet)
2943 RoleIds []string `json:"role_ids,omitempty"`
2944 }
2945
2946 // NewMemberAddV2Arg returns a new MemberAddV2Arg instance
2947 func NewMemberAddV2Arg(MemberEmail string) *MemberAddV2Arg {
2948 s := new(MemberAddV2Arg)
2949 s.MemberEmail = MemberEmail
2950 s.SendWelcomeEmail = true
2951 return s
2952 }
2953
2954 // MemberAddV2Result : Describes the result of attempting to add a single user
2955 // to the team. 'success' is the only value indicating that a user was indeed
2956 // added to the team - the other values explain the type of failure that
2957 // occurred, and include the email of the user for which the operation has
2958 // failed.
2959 type MemberAddV2Result struct {
2960 dropbox.Tagged
2961 // TeamLicenseLimit : Team is already full. The organization has no
2962 // available licenses.
2963 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
2964 // FreeTeamMemberLimitReached : Team is already full. The free team member
2965 // limit has been reached.
2966 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
2967 // UserAlreadyOnTeam : User is already on this team. The provided email
2968 // address is associated with a user who is already a member of (including
2969 // in recoverable state) or invited to the team.
2970 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
2971 // UserOnAnotherTeam : User is already on another team. The provided email
2972 // address is associated with a user that is already a member or invited to
2973 // another team.
2974 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
2975 // UserAlreadyPaired : User is already paired.
2976 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
2977 // UserMigrationFailed : User migration has failed.
2978 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
2979 // DuplicateExternalMemberId : A user with the given external member ID
2980 // already exists on the team (including in recoverable state).
2981 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
2982 // DuplicateMemberPersistentId : A user with the given persistent ID already
2983 // exists on the team (including in recoverable state).
2984 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
2985 // PersistentIdDisabled : Persistent ID is only available to teams with
2986 // persistent ID SAML configuration. Please contact Dropbox for more
2987 // information.
2988 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
2989 // UserCreationFailed : User creation has failed.
2990 UserCreationFailed string `json:"user_creation_failed,omitempty"`
2991 // Success : Describes a user that was successfully added to the team.
2992 Success *TeamMemberInfoV2 `json:"success,omitempty"`
2993 }
2994
2995 // Valid tag values for MemberAddV2Result
2996 const (
2997 MemberAddV2ResultTeamLicenseLimit = "team_license_limit"
2998 MemberAddV2ResultFreeTeamMemberLimitReached = "free_team_member_limit_reached"
2999 MemberAddV2ResultUserAlreadyOnTeam = "user_already_on_team"
3000 MemberAddV2ResultUserOnAnotherTeam = "user_on_another_team"
3001 MemberAddV2ResultUserAlreadyPaired = "user_already_paired"
3002 MemberAddV2ResultUserMigrationFailed = "user_migration_failed"
3003 MemberAddV2ResultDuplicateExternalMemberId = "duplicate_external_member_id"
3004 MemberAddV2ResultDuplicateMemberPersistentId = "duplicate_member_persistent_id"
3005 MemberAddV2ResultPersistentIdDisabled = "persistent_id_disabled"
3006 MemberAddV2ResultUserCreationFailed = "user_creation_failed"
3007 MemberAddV2ResultSuccess = "success"
3008 MemberAddV2ResultOther = "other"
3009 )
3010
3011 // UnmarshalJSON deserializes into a MemberAddV2Result instance
3012 func (u *MemberAddV2Result) UnmarshalJSON(body []byte) error {
3013 type wrap struct {
3014 dropbox.Tagged
3015 // TeamLicenseLimit : Team is already full. The organization has no
3016 // available licenses.
3017 TeamLicenseLimit string `json:"team_license_limit,omitempty"`
3018 // FreeTeamMemberLimitReached : Team is already full. The free team
3019 // member limit has been reached.
3020 FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"`
3021 // UserAlreadyOnTeam : User is already on this team. The provided email
3022 // address is associated with a user who is already a member of
3023 // (including in recoverable state) or invited to the team.
3024 UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"`
3025 // UserOnAnotherTeam : User is already on another team. The provided
3026 // email address is associated with a user that is already a member or
3027 // invited to another team.
3028 UserOnAnotherTeam string `json:"user_on_another_team,omitempty"`
3029 // UserAlreadyPaired : User is already paired.
3030 UserAlreadyPaired string `json:"user_already_paired,omitempty"`
3031 // UserMigrationFailed : User migration has failed.
3032 UserMigrationFailed string `json:"user_migration_failed,omitempty"`
3033 // DuplicateExternalMemberId : A user with the given external member ID
3034 // already exists on the team (including in recoverable state).
3035 DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"`
3036 // DuplicateMemberPersistentId : A user with the given persistent ID
3037 // already exists on the team (including in recoverable state).
3038 DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"`
3039 // PersistentIdDisabled : Persistent ID is only available to teams with
3040 // persistent ID SAML configuration. Please contact Dropbox for more
3041 // information.
3042 PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"`
3043 // UserCreationFailed : User creation has failed.
3044 UserCreationFailed string `json:"user_creation_failed,omitempty"`
3045 }
3046 var w wrap
3047 var err error
3048 if err = json.Unmarshal(body, &w); err != nil {
3049 return err
3050 }
3051 u.Tag = w.Tag
3052 switch u.Tag {
3053 case "team_license_limit":
3054 u.TeamLicenseLimit = w.TeamLicenseLimit
3055
3056 if err != nil {
3057 return err
3058 }
3059 case "free_team_member_limit_reached":
3060 u.FreeTeamMemberLimitReached = w.FreeTeamMemberLimitReached
3061
3062 if err != nil {
3063 return err
3064 }
3065 case "user_already_on_team":
3066 u.UserAlreadyOnTeam = w.UserAlreadyOnTeam
3067
3068 if err != nil {
3069 return err
3070 }
3071 case "user_on_another_team":
3072 u.UserOnAnotherTeam = w.UserOnAnotherTeam
3073
3074 if err != nil {
3075 return err
3076 }
3077 case "user_already_paired":
3078 u.UserAlreadyPaired = w.UserAlreadyPaired
3079
3080 if err != nil {
3081 return err
3082 }
3083 case "user_migration_failed":
3084 u.UserMigrationFailed = w.UserMigrationFailed
3085
3086 if err != nil {
3087 return err
3088 }
3089 case "duplicate_external_member_id":
3090 u.DuplicateExternalMemberId = w.DuplicateExternalMemberId
3091
3092 if err != nil {
3093 return err
3094 }
3095 case "duplicate_member_persistent_id":
3096 u.DuplicateMemberPersistentId = w.DuplicateMemberPersistentId
3097
3098 if err != nil {
3099 return err
3100 }
3101 case "persistent_id_disabled":
3102 u.PersistentIdDisabled = w.PersistentIdDisabled
3103
3104 if err != nil {
3105 return err
3106 }
3107 case "user_creation_failed":
3108 u.UserCreationFailed = w.UserCreationFailed
3109
3110 if err != nil {
3111 return err
3112 }
3113 case "success":
3114 err = json.Unmarshal(body, &u.Success)
3115
3116 if err != nil {
3117 return err
3118 }
3119 }
3120 return nil
3121 }
3122
3123 // MemberDevices : Information on devices of a team's member.
3124 type MemberDevices struct {
3125 // TeamMemberId : The member unique Id.
3126 TeamMemberId string `json:"team_member_id"`
3127 // WebSessions : List of web sessions made by this team member.
3128 WebSessions []*ActiveWebSession `json:"web_sessions,omitempty"`
3129 // DesktopClients : List of desktop clients by this team member.
3130 DesktopClients []*DesktopClientSession `json:"desktop_clients,omitempty"`
3131 // MobileClients : List of mobile clients by this team member.
3132 MobileClients []*MobileClientSession `json:"mobile_clients,omitempty"`
3133 }
3134
3135 // NewMemberDevices returns a new MemberDevices instance
3136 func NewMemberDevices(TeamMemberId string) *MemberDevices {
3137 s := new(MemberDevices)
3138 s.TeamMemberId = TeamMemberId
3139 return s
3140 }
3141
3142 // MemberLinkedApps : Information on linked applications of a team member.
3143 type MemberLinkedApps struct {
3144 // TeamMemberId : The member unique Id.
3145 TeamMemberId string `json:"team_member_id"`
3146 // LinkedApiApps : List of third party applications linked by this team
3147 // member.
3148 LinkedApiApps []*ApiApp `json:"linked_api_apps"`
3149 }
3150
3151 // NewMemberLinkedApps returns a new MemberLinkedApps instance
3152 func NewMemberLinkedApps(TeamMemberId string, LinkedApiApps []*ApiApp) *MemberLinkedApps {
3153 s := new(MemberLinkedApps)
3154 s.TeamMemberId = TeamMemberId
3155 s.LinkedApiApps = LinkedApiApps
3156 return s
3157 }
3158
3159 // MemberProfile : Basic member profile.
3160 type MemberProfile struct {
3161 // TeamMemberId : ID of user as a member of a team.
3162 TeamMemberId string `json:"team_member_id"`
3163 // ExternalId : External ID that a team can attach to the user. An
3164 // application using the API may find it easier to use their own IDs instead
3165 // of Dropbox IDs like account_id or team_member_id.
3166 ExternalId string `json:"external_id,omitempty"`
3167 // AccountId : A user's account identifier.
3168 AccountId string `json:"account_id,omitempty"`
3169 // Email : Email address of user.
3170 Email string `json:"email"`
3171 // EmailVerified : Is true if the user's email is verified to be owned by
3172 // the user.
3173 EmailVerified bool `json:"email_verified"`
3174 // SecondaryEmails : Secondary emails of a user.
3175 SecondaryEmails []*secondary_emails.SecondaryEmail `json:"secondary_emails,omitempty"`
3176 // Status : The user's status as a member of a specific team.
3177 Status *TeamMemberStatus `json:"status"`
3178 // Name : Representations for a person's name.
3179 Name *users.Name `json:"name"`
3180 // MembershipType : The user's membership type: full (normal team member) vs
3181 // limited (does not use a license; no access to the team's shared quota).
3182 MembershipType *TeamMembershipType `json:"membership_type"`
3183 // InvitedOn : The date and time the user was invited to the team (contains
3184 // value only when the member's status matches `TeamMemberStatus.invited`).
3185 InvitedOn *time.Time `json:"invited_on,omitempty"`
3186 // JoinedOn : The date and time the user joined as a member of a specific
3187 // team.
3188 JoinedOn *time.Time `json:"joined_on,omitempty"`
3189 // SuspendedOn : The date and time the user was suspended from the team
3190 // (contains value only when the member's status matches
3191 // `TeamMemberStatus.suspended`).
3192 SuspendedOn *time.Time `json:"suspended_on,omitempty"`
3193 // PersistentId : Persistent ID that a team can attach to the user. The
3194 // persistent ID is unique ID to be used for SAML authentication.
3195 PersistentId string `json:"persistent_id,omitempty"`
3196 // IsDirectoryRestricted : Whether the user is a directory restricted user.
3197 IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"`
3198 // ProfilePhotoUrl : URL for the photo representing the user, if one is set.
3199 ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
3200 }
3201
3202 // NewMemberProfile returns a new MemberProfile instance
3203 func NewMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType) *MemberProfile {
3204 s := new(MemberProfile)
3205 s.TeamMemberId = TeamMemberId
3206 s.Email = Email
3207 s.EmailVerified = EmailVerified
3208 s.Status = Status
3209 s.Name = Name
3210 s.MembershipType = MembershipType
3211 return s
3212 }
3213
3214 // UserSelectorError : Error that can be returned whenever a struct derived from
3215 // `UserSelectorArg` is used.
3216 type UserSelectorError struct {
3217 dropbox.Tagged
3218 }
3219
3220 // Valid tag values for UserSelectorError
3221 const (
3222 UserSelectorErrorUserNotFound = "user_not_found"
3223 )
3224
3225 // MemberSelectorError : has no documentation (yet)
3226 type MemberSelectorError struct {
3227 dropbox.Tagged
3228 }
3229
3230 // Valid tag values for MemberSelectorError
3231 const (
3232 MemberSelectorErrorUserNotFound = "user_not_found"
3233 MemberSelectorErrorUserNotInTeam = "user_not_in_team"
3234 )
3235
3236 // MembersAddArgBase : has no documentation (yet)
3237 type MembersAddArgBase struct {
3238 // ForceAsync : Whether to force the add to happen asynchronously.
3239 ForceAsync bool `json:"force_async"`
3240 }
3241
3242 // NewMembersAddArgBase returns a new MembersAddArgBase instance
3243 func NewMembersAddArgBase() *MembersAddArgBase {
3244 s := new(MembersAddArgBase)
3245 s.ForceAsync = false
3246 return s
3247 }
3248
3249 // MembersAddArg : has no documentation (yet)
3250 type MembersAddArg struct {
3251 MembersAddArgBase
3252 // NewMembers : Details of new members to be added to the team.
3253 NewMembers []*MemberAddArg `json:"new_members"`
3254 }
3255
3256 // NewMembersAddArg returns a new MembersAddArg instance
3257 func NewMembersAddArg(NewMembers []*MemberAddArg) *MembersAddArg {
3258 s := new(MembersAddArg)
3259 s.NewMembers = NewMembers
3260 s.ForceAsync = false
3261 return s
3262 }
3263
3264 // MembersAddJobStatus : has no documentation (yet)
3265 type MembersAddJobStatus struct {
3266 dropbox.Tagged
3267 // Complete : The asynchronous job has finished. For each member that was
3268 // specified in the parameter `MembersAddArg` that was provided to
3269 // `membersAdd`, a corresponding item is returned in this list.
3270 Complete []*MemberAddResult `json:"complete,omitempty"`
3271 // Failed : The asynchronous job returned an error. The string contains an
3272 // error message.
3273 Failed string `json:"failed,omitempty"`
3274 }
3275
3276 // Valid tag values for MembersAddJobStatus
3277 const (
3278 MembersAddJobStatusInProgress = "in_progress"
3279 MembersAddJobStatusComplete = "complete"
3280 MembersAddJobStatusFailed = "failed"
3281 )
3282
3283 // UnmarshalJSON deserializes into a MembersAddJobStatus instance
3284 func (u *MembersAddJobStatus) UnmarshalJSON(body []byte) error {
3285 type wrap struct {
3286 dropbox.Tagged
3287 // Complete : The asynchronous job has finished. For each member that
3288 // was specified in the parameter `MembersAddArg` that was provided to
3289 // `membersAdd`, a corresponding item is returned in this list.
3290 Complete []*MemberAddResult `json:"complete,omitempty"`
3291 // Failed : The asynchronous job returned an error. The string contains
3292 // an error message.
3293 Failed string `json:"failed,omitempty"`
3294 }
3295 var w wrap
3296 var err error
3297 if err = json.Unmarshal(body, &w); err != nil {
3298 return err
3299 }
3300 u.Tag = w.Tag
3301 switch u.Tag {
3302 case "complete":
3303 u.Complete = w.Complete
3304
3305 if err != nil {
3306 return err
3307 }
3308 case "failed":
3309 u.Failed = w.Failed
3310
3311 if err != nil {
3312 return err
3313 }
3314 }
3315 return nil
3316 }
3317
3318 // MembersAddJobStatusV2Result : has no documentation (yet)
3319 type MembersAddJobStatusV2Result struct {
3320 dropbox.Tagged
3321 // Complete : The asynchronous job has finished. For each member that was
3322 // specified in the parameter `MembersAddArg` that was provided to
3323 // `membersAdd`, a corresponding item is returned in this list.
3324 Complete []*MemberAddV2Result `json:"complete,omitempty"`
3325 // Failed : The asynchronous job returned an error. The string contains an
3326 // error message.
3327 Failed string `json:"failed,omitempty"`
3328 }
3329
3330 // Valid tag values for MembersAddJobStatusV2Result
3331 const (
3332 MembersAddJobStatusV2ResultInProgress = "in_progress"
3333 MembersAddJobStatusV2ResultComplete = "complete"
3334 MembersAddJobStatusV2ResultFailed = "failed"
3335 MembersAddJobStatusV2ResultOther = "other"
3336 )
3337
3338 // UnmarshalJSON deserializes into a MembersAddJobStatusV2Result instance
3339 func (u *MembersAddJobStatusV2Result) UnmarshalJSON(body []byte) error {
3340 type wrap struct {
3341 dropbox.Tagged
3342 // Complete : The asynchronous job has finished. For each member that
3343 // was specified in the parameter `MembersAddArg` that was provided to
3344 // `membersAdd`, a corresponding item is returned in this list.
3345 Complete []*MemberAddV2Result `json:"complete,omitempty"`
3346 // Failed : The asynchronous job returned an error. The string contains
3347 // an error message.
3348 Failed string `json:"failed,omitempty"`
3349 }
3350 var w wrap
3351 var err error
3352 if err = json.Unmarshal(body, &w); err != nil {
3353 return err
3354 }
3355 u.Tag = w.Tag
3356 switch u.Tag {
3357 case "complete":
3358 u.Complete = w.Complete
3359
3360 if err != nil {
3361 return err
3362 }
3363 case "failed":
3364 u.Failed = w.Failed
3365
3366 if err != nil {
3367 return err
3368 }
3369 }
3370 return nil
3371 }
3372
3373 // MembersAddLaunch : has no documentation (yet)
3374 type MembersAddLaunch struct {
3375 dropbox.Tagged
3376 // AsyncJobId : This response indicates that the processing is asynchronous.
3377 // The string is an id that can be used to obtain the status of the
3378 // asynchronous job.
3379 AsyncJobId string `json:"async_job_id,omitempty"`
3380 // Complete : has no documentation (yet)
3381 Complete []*MemberAddResult `json:"complete,omitempty"`
3382 }
3383
3384 // Valid tag values for MembersAddLaunch
3385 const (
3386 MembersAddLaunchAsyncJobId = "async_job_id"
3387 MembersAddLaunchComplete = "complete"
3388 )
3389
3390 // UnmarshalJSON deserializes into a MembersAddLaunch instance
3391 func (u *MembersAddLaunch) UnmarshalJSON(body []byte) error {
3392 type wrap struct {
3393 dropbox.Tagged
3394 // AsyncJobId : This response indicates that the processing is
3395 // asynchronous. The string is an id that can be used to obtain the
3396 // status of the asynchronous job.
3397 AsyncJobId string `json:"async_job_id,omitempty"`
3398 // Complete : has no documentation (yet)
3399 Complete []*MemberAddResult `json:"complete,omitempty"`
3400 }
3401 var w wrap
3402 var err error
3403 if err = json.Unmarshal(body, &w); err != nil {
3404 return err
3405 }
3406 u.Tag = w.Tag
3407 switch u.Tag {
3408 case "async_job_id":
3409 u.AsyncJobId = w.AsyncJobId
3410
3411 if err != nil {
3412 return err
3413 }
3414 case "complete":
3415 u.Complete = w.Complete
3416
3417 if err != nil {
3418 return err
3419 }
3420 }
3421 return nil
3422 }
3423
3424 // MembersAddLaunchV2Result : has no documentation (yet)
3425 type MembersAddLaunchV2Result struct {
3426 dropbox.Tagged
3427 // AsyncJobId : This response indicates that the processing is asynchronous.
3428 // The string is an id that can be used to obtain the status of the
3429 // asynchronous job.
3430 AsyncJobId string `json:"async_job_id,omitempty"`
3431 // Complete : has no documentation (yet)
3432 Complete []*MemberAddV2Result `json:"complete,omitempty"`
3433 }
3434
3435 // Valid tag values for MembersAddLaunchV2Result
3436 const (
3437 MembersAddLaunchV2ResultAsyncJobId = "async_job_id"
3438 MembersAddLaunchV2ResultComplete = "complete"
3439 MembersAddLaunchV2ResultOther = "other"
3440 )
3441
3442 // UnmarshalJSON deserializes into a MembersAddLaunchV2Result instance
3443 func (u *MembersAddLaunchV2Result) UnmarshalJSON(body []byte) error {
3444 type wrap struct {
3445 dropbox.Tagged
3446 // AsyncJobId : This response indicates that the processing is
3447 // asynchronous. The string is an id that can be used to obtain the
3448 // status of the asynchronous job.
3449 AsyncJobId string `json:"async_job_id,omitempty"`
3450 // Complete : has no documentation (yet)
3451 Complete []*MemberAddV2Result `json:"complete,omitempty"`
3452 }
3453 var w wrap
3454 var err error
3455 if err = json.Unmarshal(body, &w); err != nil {
3456 return err
3457 }
3458 u.Tag = w.Tag
3459 switch u.Tag {
3460 case "async_job_id":
3461 u.AsyncJobId = w.AsyncJobId
3462
3463 if err != nil {
3464 return err
3465 }
3466 case "complete":
3467 u.Complete = w.Complete
3468
3469 if err != nil {
3470 return err
3471 }
3472 }
3473 return nil
3474 }
3475
3476 // MembersAddV2Arg : has no documentation (yet)
3477 type MembersAddV2Arg struct {
3478 MembersAddArgBase
3479 // NewMembers : Details of new members to be added to the team.
3480 NewMembers []*MemberAddV2Arg `json:"new_members"`
3481 }
3482
3483 // NewMembersAddV2Arg returns a new MembersAddV2Arg instance
3484 func NewMembersAddV2Arg(NewMembers []*MemberAddV2Arg) *MembersAddV2Arg {
3485 s := new(MembersAddV2Arg)
3486 s.NewMembers = NewMembers
3487 s.ForceAsync = false
3488 return s
3489 }
3490
3491 // MembersDeactivateBaseArg : Exactly one of team_member_id, email, or
3492 // external_id must be provided to identify the user account.
3493 type MembersDeactivateBaseArg struct {
3494 // User : Identity of user to remove/suspend/have their files moved.
3495 User *UserSelectorArg `json:"user"`
3496 }
3497
3498 // NewMembersDeactivateBaseArg returns a new MembersDeactivateBaseArg instance
3499 func NewMembersDeactivateBaseArg(User *UserSelectorArg) *MembersDeactivateBaseArg {
3500 s := new(MembersDeactivateBaseArg)
3501 s.User = User
3502 return s
3503 }
3504
3505 // MembersDataTransferArg : has no documentation (yet)
3506 type MembersDataTransferArg struct {
3507 MembersDeactivateBaseArg
3508 // TransferDestId : Files from the deleted member account will be
3509 // transferred to this user.
3510 TransferDestId *UserSelectorArg `json:"transfer_dest_id"`
3511 // TransferAdminId : Errors during the transfer process will be sent via
3512 // email to this user.
3513 TransferAdminId *UserSelectorArg `json:"transfer_admin_id"`
3514 }
3515
3516 // NewMembersDataTransferArg returns a new MembersDataTransferArg instance
3517 func NewMembersDataTransferArg(User *UserSelectorArg, TransferDestId *UserSelectorArg, TransferAdminId *UserSelectorArg) *MembersDataTransferArg {
3518 s := new(MembersDataTransferArg)
3519 s.User = User
3520 s.TransferDestId = TransferDestId
3521 s.TransferAdminId = TransferAdminId
3522 return s
3523 }
3524
3525 // MembersDeactivateArg : has no documentation (yet)
3526 type MembersDeactivateArg struct {
3527 MembersDeactivateBaseArg
3528 // WipeData : If provided, controls if the user's data will be deleted on
3529 // their linked devices.
3530 WipeData bool `json:"wipe_data"`
3531 }
3532
3533 // NewMembersDeactivateArg returns a new MembersDeactivateArg instance
3534 func NewMembersDeactivateArg(User *UserSelectorArg) *MembersDeactivateArg {
3535 s := new(MembersDeactivateArg)
3536 s.User = User
3537 s.WipeData = true
3538 return s
3539 }
3540
3541 // MembersDeactivateError : has no documentation (yet)
3542 type MembersDeactivateError struct {
3543 dropbox.Tagged
3544 }
3545
3546 // Valid tag values for MembersDeactivateError
3547 const (
3548 MembersDeactivateErrorUserNotFound = "user_not_found"
3549 MembersDeactivateErrorUserNotInTeam = "user_not_in_team"
3550 MembersDeactivateErrorOther = "other"
3551 )
3552
3553 // MembersDeleteProfilePhotoArg : has no documentation (yet)
3554 type MembersDeleteProfilePhotoArg struct {
3555 // User : Identity of the user whose profile photo will be deleted.
3556 User *UserSelectorArg `json:"user"`
3557 }
3558
3559 // NewMembersDeleteProfilePhotoArg returns a new MembersDeleteProfilePhotoArg instance
3560 func NewMembersDeleteProfilePhotoArg(User *UserSelectorArg) *MembersDeleteProfilePhotoArg {
3561 s := new(MembersDeleteProfilePhotoArg)
3562 s.User = User
3563 return s
3564 }
3565
3566 // MembersDeleteProfilePhotoError : has no documentation (yet)
3567 type MembersDeleteProfilePhotoError struct {
3568 dropbox.Tagged
3569 }
3570
3571 // Valid tag values for MembersDeleteProfilePhotoError
3572 const (
3573 MembersDeleteProfilePhotoErrorUserNotFound = "user_not_found"
3574 MembersDeleteProfilePhotoErrorUserNotInTeam = "user_not_in_team"
3575 MembersDeleteProfilePhotoErrorSetProfileDisallowed = "set_profile_disallowed"
3576 MembersDeleteProfilePhotoErrorOther = "other"
3577 )
3578
3579 // MembersGetAvailableTeamMemberRolesResult : Available TeamMemberRole for the
3580 // connected team. To be used with `membersSetAdminPermissions`.
3581 type MembersGetAvailableTeamMemberRolesResult struct {
3582 // Roles : Available roles.
3583 Roles []*TeamMemberRole `json:"roles"`
3584 }
3585
3586 // NewMembersGetAvailableTeamMemberRolesResult returns a new MembersGetAvailableTeamMemberRolesResult instance
3587 func NewMembersGetAvailableTeamMemberRolesResult(Roles []*TeamMemberRole) *MembersGetAvailableTeamMemberRolesResult {
3588 s := new(MembersGetAvailableTeamMemberRolesResult)
3589 s.Roles = Roles
3590 return s
3591 }
3592
3593 // MembersGetInfoArgs : has no documentation (yet)
3594 type MembersGetInfoArgs struct {
3595 // Members : List of team members.
3596 Members []*UserSelectorArg `json:"members"`
3597 }
3598
3599 // NewMembersGetInfoArgs returns a new MembersGetInfoArgs instance
3600 func NewMembersGetInfoArgs(Members []*UserSelectorArg) *MembersGetInfoArgs {
3601 s := new(MembersGetInfoArgs)
3602 s.Members = Members
3603 return s
3604 }
3605
3606 // MembersGetInfoError :
3607 type MembersGetInfoError struct {
3608 dropbox.Tagged
3609 }
3610
3611 // Valid tag values for MembersGetInfoError
3612 const (
3613 MembersGetInfoErrorOther = "other"
3614 )
3615
3616 // MembersGetInfoItemBase : has no documentation (yet)
3617 type MembersGetInfoItemBase struct {
3618 dropbox.Tagged
3619 // IdNotFound : An ID that was provided as a parameter to `membersGetInfo`
3620 // or `membersGetInfo`, and did not match a corresponding user. This might
3621 // be a team_member_id, an email, or an external ID, depending on how the
3622 // method was called.
3623 IdNotFound string `json:"id_not_found,omitempty"`
3624 }
3625
3626 // Valid tag values for MembersGetInfoItemBase
3627 const (
3628 MembersGetInfoItemBaseIdNotFound = "id_not_found"
3629 )
3630
3631 // UnmarshalJSON deserializes into a MembersGetInfoItemBase instance
3632 func (u *MembersGetInfoItemBase) UnmarshalJSON(body []byte) error {
3633 type wrap struct {
3634 dropbox.Tagged
3635 // IdNotFound : An ID that was provided as a parameter to
3636 // `membersGetInfo` or `membersGetInfo`, and did not match a
3637 // corresponding user. This might be a team_member_id, an email, or an
3638 // external ID, depending on how the method was called.
3639 IdNotFound string `json:"id_not_found,omitempty"`
3640 }
3641 var w wrap
3642 var err error
3643 if err = json.Unmarshal(body, &w); err != nil {
3644 return err
3645 }
3646 u.Tag = w.Tag
3647 switch u.Tag {
3648 case "id_not_found":
3649 u.IdNotFound = w.IdNotFound
3650
3651 if err != nil {
3652 return err
3653 }
3654 }
3655 return nil
3656 }
3657
3658 // MembersGetInfoItem : Describes a result obtained for a single user whose id
3659 // was specified in the parameter of `membersGetInfo`.
3660 type MembersGetInfoItem struct {
3661 dropbox.Tagged
3662 // IdNotFound : An ID that was provided as a parameter to `membersGetInfo`
3663 // or `membersGetInfo`, and did not match a corresponding user. This might
3664 // be a team_member_id, an email, or an external ID, depending on how the
3665 // method was called.
3666 IdNotFound string `json:"id_not_found,omitempty"`
3667 // MemberInfo : Info about a team member.
3668 MemberInfo *TeamMemberInfo `json:"member_info,omitempty"`
3669 }
3670
3671 // Valid tag values for MembersGetInfoItem
3672 const (
3673 MembersGetInfoItemIdNotFound = "id_not_found"
3674 MembersGetInfoItemMemberInfo = "member_info"
3675 )
3676
3677 // UnmarshalJSON deserializes into a MembersGetInfoItem instance
3678 func (u *MembersGetInfoItem) UnmarshalJSON(body []byte) error {
3679 type wrap struct {
3680 dropbox.Tagged
3681 // IdNotFound : An ID that was provided as a parameter to
3682 // `membersGetInfo` or `membersGetInfo`, and did not match a
3683 // corresponding user. This might be a team_member_id, an email, or an
3684 // external ID, depending on how the method was called.
3685 IdNotFound string `json:"id_not_found,omitempty"`
3686 }
3687 var w wrap
3688 var err error
3689 if err = json.Unmarshal(body, &w); err != nil {
3690 return err
3691 }
3692 u.Tag = w.Tag
3693 switch u.Tag {
3694 case "id_not_found":
3695 u.IdNotFound = w.IdNotFound
3696
3697 if err != nil {
3698 return err
3699 }
3700 case "member_info":
3701 err = json.Unmarshal(body, &u.MemberInfo)
3702
3703 if err != nil {
3704 return err
3705 }
3706 }
3707 return nil
3708 }
3709
3710 // MembersGetInfoItemV2 : Describes a result obtained for a single user whose id
3711 // was specified in the parameter of `membersGetInfo`.
3712 type MembersGetInfoItemV2 struct {
3713 dropbox.Tagged
3714 // IdNotFound : An ID that was provided as a parameter to `membersGetInfo`
3715 // or `membersGetInfo`, and did not match a corresponding user. This might
3716 // be a team_member_id, an email, or an external ID, depending on how the
3717 // method was called.
3718 IdNotFound string `json:"id_not_found,omitempty"`
3719 // MemberInfo : Info about a team member.
3720 MemberInfo *TeamMemberInfoV2 `json:"member_info,omitempty"`
3721 }
3722
3723 // Valid tag values for MembersGetInfoItemV2
3724 const (
3725 MembersGetInfoItemV2IdNotFound = "id_not_found"
3726 MembersGetInfoItemV2MemberInfo = "member_info"
3727 MembersGetInfoItemV2Other = "other"
3728 )
3729
3730 // UnmarshalJSON deserializes into a MembersGetInfoItemV2 instance
3731 func (u *MembersGetInfoItemV2) UnmarshalJSON(body []byte) error {
3732 type wrap struct {
3733 dropbox.Tagged
3734 // IdNotFound : An ID that was provided as a parameter to
3735 // `membersGetInfo` or `membersGetInfo`, and did not match a
3736 // corresponding user. This might be a team_member_id, an email, or an
3737 // external ID, depending on how the method was called.
3738 IdNotFound string `json:"id_not_found,omitempty"`
3739 }
3740 var w wrap
3741 var err error
3742 if err = json.Unmarshal(body, &w); err != nil {
3743 return err
3744 }
3745 u.Tag = w.Tag
3746 switch u.Tag {
3747 case "id_not_found":
3748 u.IdNotFound = w.IdNotFound
3749
3750 if err != nil {
3751 return err
3752 }
3753 case "member_info":
3754 err = json.Unmarshal(body, &u.MemberInfo)
3755
3756 if err != nil {
3757 return err
3758 }
3759 }
3760 return nil
3761 }
3762
3763 // MembersGetInfoV2Arg : has no documentation (yet)
3764 type MembersGetInfoV2Arg struct {
3765 // Members : List of team members.
3766 Members []*UserSelectorArg `json:"members"`
3767 }
3768
3769 // NewMembersGetInfoV2Arg returns a new MembersGetInfoV2Arg instance
3770 func NewMembersGetInfoV2Arg(Members []*UserSelectorArg) *MembersGetInfoV2Arg {
3771 s := new(MembersGetInfoV2Arg)
3772 s.Members = Members
3773 return s
3774 }
3775
3776 // MembersGetInfoV2Result : has no documentation (yet)
3777 type MembersGetInfoV2Result struct {
3778 // MembersInfo : List of team members info.
3779 MembersInfo []*MembersGetInfoItemV2 `json:"members_info"`
3780 }
3781
3782 // NewMembersGetInfoV2Result returns a new MembersGetInfoV2Result instance
3783 func NewMembersGetInfoV2Result(MembersInfo []*MembersGetInfoItemV2) *MembersGetInfoV2Result {
3784 s := new(MembersGetInfoV2Result)
3785 s.MembersInfo = MembersInfo
3786 return s
3787 }
3788
3789 // MembersInfo : has no documentation (yet)
3790 type MembersInfo struct {
3791 // TeamMemberIds : Team member IDs of the users under this hold.
3792 TeamMemberIds []string `json:"team_member_ids"`
3793 // PermanentlyDeletedUsers : The number of permanently deleted users that
3794 // were under this hold.
3795 PermanentlyDeletedUsers uint64 `json:"permanently_deleted_users"`
3796 }
3797
3798 // NewMembersInfo returns a new MembersInfo instance
3799 func NewMembersInfo(TeamMemberIds []string, PermanentlyDeletedUsers uint64) *MembersInfo {
3800 s := new(MembersInfo)
3801 s.TeamMemberIds = TeamMemberIds
3802 s.PermanentlyDeletedUsers = PermanentlyDeletedUsers
3803 return s
3804 }
3805
3806 // MembersListArg : has no documentation (yet)
3807 type MembersListArg struct {
3808 // Limit : Number of results to return per call.
3809 Limit uint32 `json:"limit"`
3810 // IncludeRemoved : Whether to return removed members.
3811 IncludeRemoved bool `json:"include_removed"`
3812 }
3813
3814 // NewMembersListArg returns a new MembersListArg instance
3815 func NewMembersListArg() *MembersListArg {
3816 s := new(MembersListArg)
3817 s.Limit = 1000
3818 s.IncludeRemoved = false
3819 return s
3820 }
3821
3822 // MembersListContinueArg : has no documentation (yet)
3823 type MembersListContinueArg struct {
3824 // Cursor : Indicates from what point to get the next set of members.
3825 Cursor string `json:"cursor"`
3826 }
3827
3828 // NewMembersListContinueArg returns a new MembersListContinueArg instance
3829 func NewMembersListContinueArg(Cursor string) *MembersListContinueArg {
3830 s := new(MembersListContinueArg)
3831 s.Cursor = Cursor
3832 return s
3833 }
3834
3835 // MembersListContinueError : has no documentation (yet)
3836 type MembersListContinueError struct {
3837 dropbox.Tagged
3838 }
3839
3840 // Valid tag values for MembersListContinueError
3841 const (
3842 MembersListContinueErrorInvalidCursor = "invalid_cursor"
3843 MembersListContinueErrorOther = "other"
3844 )
3845
3846 // MembersListError :
3847 type MembersListError struct {
3848 dropbox.Tagged
3849 }
3850
3851 // Valid tag values for MembersListError
3852 const (
3853 MembersListErrorOther = "other"
3854 )
3855
3856 // MembersListResult : has no documentation (yet)
3857 type MembersListResult struct {
3858 // Members : List of team members.
3859 Members []*TeamMemberInfo `json:"members"`
3860 // Cursor : Pass the cursor into `membersListContinue` to obtain the
3861 // additional members.
3862 Cursor string `json:"cursor"`
3863 // HasMore : Is true if there are additional team members that have not been
3864 // returned yet. An additional call to `membersListContinue` can retrieve
3865 // them.
3866 HasMore bool `json:"has_more"`
3867 }
3868
3869 // NewMembersListResult returns a new MembersListResult instance
3870 func NewMembersListResult(Members []*TeamMemberInfo, Cursor string, HasMore bool) *MembersListResult {
3871 s := new(MembersListResult)
3872 s.Members = Members
3873 s.Cursor = Cursor
3874 s.HasMore = HasMore
3875 return s
3876 }
3877
3878 // MembersListV2Result : has no documentation (yet)
3879 type MembersListV2Result struct {
3880 // Members : List of team members.
3881 Members []*TeamMemberInfoV2 `json:"members"`
3882 // Cursor : Pass the cursor into `membersListContinue` to obtain the
3883 // additional members.
3884 Cursor string `json:"cursor"`
3885 // HasMore : Is true if there are additional team members that have not been
3886 // returned yet. An additional call to `membersListContinue` can retrieve
3887 // them.
3888 HasMore bool `json:"has_more"`
3889 }
3890
3891 // NewMembersListV2Result returns a new MembersListV2Result instance
3892 func NewMembersListV2Result(Members []*TeamMemberInfoV2, Cursor string, HasMore bool) *MembersListV2Result {
3893 s := new(MembersListV2Result)
3894 s.Members = Members
3895 s.Cursor = Cursor
3896 s.HasMore = HasMore
3897 return s
3898 }
3899
3900 // MembersRecoverArg : Exactly one of team_member_id, email, or external_id must
3901 // be provided to identify the user account.
3902 type MembersRecoverArg struct {
3903 // User : Identity of user to recover.
3904 User *UserSelectorArg `json:"user"`
3905 }
3906
3907 // NewMembersRecoverArg returns a new MembersRecoverArg instance
3908 func NewMembersRecoverArg(User *UserSelectorArg) *MembersRecoverArg {
3909 s := new(MembersRecoverArg)
3910 s.User = User
3911 return s
3912 }
3913
3914 // MembersRecoverError : has no documentation (yet)
3915 type MembersRecoverError struct {
3916 dropbox.Tagged
3917 }
3918
3919 // Valid tag values for MembersRecoverError
3920 const (
3921 MembersRecoverErrorUserNotFound = "user_not_found"
3922 MembersRecoverErrorUserUnrecoverable = "user_unrecoverable"
3923 MembersRecoverErrorUserNotInTeam = "user_not_in_team"
3924 MembersRecoverErrorTeamLicenseLimit = "team_license_limit"
3925 MembersRecoverErrorOther = "other"
3926 )
3927
3928 // MembersRemoveArg : has no documentation (yet)
3929 type MembersRemoveArg struct {
3930 MembersDeactivateArg
3931 // TransferDestId : If provided, files from the deleted member account will
3932 // be transferred to this user.
3933 TransferDestId *UserSelectorArg `json:"transfer_dest_id,omitempty"`
3934 // TransferAdminId : If provided, errors during the transfer process will be
3935 // sent via email to this user. If the transfer_dest_id argument was
3936 // provided, then this argument must be provided as well.
3937 TransferAdminId *UserSelectorArg `json:"transfer_admin_id,omitempty"`
3938 // KeepAccount : Downgrade the member to a Basic account. The user will
3939 // retain the email address associated with their Dropbox account and data
3940 // in their account that is not restricted to team members. In order to keep
3941 // the account the argument `wipe_data` should be set to false.
3942 KeepAccount bool `json:"keep_account"`
3943 // RetainTeamShares : If provided, allows removed users to keep access to
3944 // Dropbox folders (not Dropbox Paper folders) already explicitly shared
3945 // with them (not via a group) when they are downgraded to a Basic account.
3946 // Users will not retain access to folders that do not allow external
3947 // sharing. In order to keep the sharing relationships, the arguments
3948 // `wipe_data` should be set to false and `keep_account` should be set to
3949 // true.
3950 RetainTeamShares bool `json:"retain_team_shares"`
3951 }
3952
3953 // NewMembersRemoveArg returns a new MembersRemoveArg instance
3954 func NewMembersRemoveArg(User *UserSelectorArg) *MembersRemoveArg {
3955 s := new(MembersRemoveArg)
3956 s.User = User
3957 s.WipeData = true
3958 s.KeepAccount = false
3959 s.RetainTeamShares = false
3960 return s
3961 }
3962
3963 // MembersTransferFilesError : has no documentation (yet)
3964 type MembersTransferFilesError struct {
3965 dropbox.Tagged
3966 }
3967
3968 // Valid tag values for MembersTransferFilesError
3969 const (
3970 MembersTransferFilesErrorUserNotFound = "user_not_found"
3971 MembersTransferFilesErrorUserNotInTeam = "user_not_in_team"
3972 MembersTransferFilesErrorOther = "other"
3973 MembersTransferFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
3974 MembersTransferFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
3975 MembersTransferFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
3976 MembersTransferFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
3977 MembersTransferFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
3978 MembersTransferFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
3979 MembersTransferFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
3980 MembersTransferFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
3981 MembersTransferFilesErrorRecipientNotVerified = "recipient_not_verified"
3982 )
3983
3984 // MembersRemoveError : has no documentation (yet)
3985 type MembersRemoveError struct {
3986 dropbox.Tagged
3987 }
3988
3989 // Valid tag values for MembersRemoveError
3990 const (
3991 MembersRemoveErrorUserNotFound = "user_not_found"
3992 MembersRemoveErrorUserNotInTeam = "user_not_in_team"
3993 MembersRemoveErrorOther = "other"
3994 MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
3995 MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
3996 MembersRemoveErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
3997 MembersRemoveErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
3998 MembersRemoveErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
3999 MembersRemoveErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
4000 MembersRemoveErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
4001 MembersRemoveErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
4002 MembersRemoveErrorRecipientNotVerified = "recipient_not_verified"
4003 MembersRemoveErrorRemoveLastAdmin = "remove_last_admin"
4004 MembersRemoveErrorCannotKeepAccountAndTransfer = "cannot_keep_account_and_transfer"
4005 MembersRemoveErrorCannotKeepAccountAndDeleteData = "cannot_keep_account_and_delete_data"
4006 MembersRemoveErrorEmailAddressTooLongToBeDisabled = "email_address_too_long_to_be_disabled"
4007 MembersRemoveErrorCannotKeepInvitedUserAccount = "cannot_keep_invited_user_account"
4008 MembersRemoveErrorCannotRetainSharesWhenDataWiped = "cannot_retain_shares_when_data_wiped"
4009 MembersRemoveErrorCannotRetainSharesWhenNoAccountKept = "cannot_retain_shares_when_no_account_kept"
4010 MembersRemoveErrorCannotRetainSharesWhenTeamExternalSharingOff = "cannot_retain_shares_when_team_external_sharing_off"
4011 MembersRemoveErrorCannotKeepAccount = "cannot_keep_account"
4012 MembersRemoveErrorCannotKeepAccountUnderLegalHold = "cannot_keep_account_under_legal_hold"
4013 MembersRemoveErrorCannotKeepAccountRequiredToSignTos = "cannot_keep_account_required_to_sign_tos"
4014 )
4015
4016 // MembersSendWelcomeError :
4017 type MembersSendWelcomeError struct {
4018 dropbox.Tagged
4019 }
4020
4021 // Valid tag values for MembersSendWelcomeError
4022 const (
4023 MembersSendWelcomeErrorUserNotFound = "user_not_found"
4024 MembersSendWelcomeErrorUserNotInTeam = "user_not_in_team"
4025 MembersSendWelcomeErrorOther = "other"
4026 )
4027
4028 // MembersSetPermissions2Arg : Exactly one of team_member_id, email, or
4029 // external_id must be provided to identify the user account.
4030 type MembersSetPermissions2Arg struct {
4031 // User : Identity of user whose role will be set.
4032 User *UserSelectorArg `json:"user"`
4033 // NewRoles : The new roles for the member. Send empty list to make user
4034 // member only. For now, only up to one role is allowed.
4035 NewRoles []string `json:"new_roles,omitempty"`
4036 }
4037
4038 // NewMembersSetPermissions2Arg returns a new MembersSetPermissions2Arg instance
4039 func NewMembersSetPermissions2Arg(User *UserSelectorArg) *MembersSetPermissions2Arg {
4040 s := new(MembersSetPermissions2Arg)
4041 s.User = User
4042 return s
4043 }
4044
4045 // MembersSetPermissions2Error : has no documentation (yet)
4046 type MembersSetPermissions2Error struct {
4047 dropbox.Tagged
4048 }
4049
4050 // Valid tag values for MembersSetPermissions2Error
4051 const (
4052 MembersSetPermissions2ErrorUserNotFound = "user_not_found"
4053 MembersSetPermissions2ErrorLastAdmin = "last_admin"
4054 MembersSetPermissions2ErrorUserNotInTeam = "user_not_in_team"
4055 MembersSetPermissions2ErrorCannotSetPermissions = "cannot_set_permissions"
4056 MembersSetPermissions2ErrorRoleNotFound = "role_not_found"
4057 MembersSetPermissions2ErrorOther = "other"
4058 )
4059
4060 // MembersSetPermissions2Result : has no documentation (yet)
4061 type MembersSetPermissions2Result struct {
4062 // TeamMemberId : The member ID of the user to which the change was applied.
4063 TeamMemberId string `json:"team_member_id"`
4064 // Roles : The roles after the change. Empty in case the user become a
4065 // non-admin.
4066 Roles []*TeamMemberRole `json:"roles,omitempty"`
4067 }
4068
4069 // NewMembersSetPermissions2Result returns a new MembersSetPermissions2Result instance
4070 func NewMembersSetPermissions2Result(TeamMemberId string) *MembersSetPermissions2Result {
4071 s := new(MembersSetPermissions2Result)
4072 s.TeamMemberId = TeamMemberId
4073 return s
4074 }
4075
4076 // MembersSetPermissionsArg : Exactly one of team_member_id, email, or
4077 // external_id must be provided to identify the user account.
4078 type MembersSetPermissionsArg struct {
4079 // User : Identity of user whose role will be set.
4080 User *UserSelectorArg `json:"user"`
4081 // NewRole : The new role of the member.
4082 NewRole *AdminTier `json:"new_role"`
4083 }
4084
4085 // NewMembersSetPermissionsArg returns a new MembersSetPermissionsArg instance
4086 func NewMembersSetPermissionsArg(User *UserSelectorArg, NewRole *AdminTier) *MembersSetPermissionsArg {
4087 s := new(MembersSetPermissionsArg)
4088 s.User = User
4089 s.NewRole = NewRole
4090 return s
4091 }
4092
4093 // MembersSetPermissionsError : has no documentation (yet)
4094 type MembersSetPermissionsError struct {
4095 dropbox.Tagged
4096 }
4097
4098 // Valid tag values for MembersSetPermissionsError
4099 const (
4100 MembersSetPermissionsErrorUserNotFound = "user_not_found"
4101 MembersSetPermissionsErrorLastAdmin = "last_admin"
4102 MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team"
4103 MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions"
4104 MembersSetPermissionsErrorTeamLicenseLimit = "team_license_limit"
4105 MembersSetPermissionsErrorOther = "other"
4106 )
4107
4108 // MembersSetPermissionsResult : has no documentation (yet)
4109 type MembersSetPermissionsResult struct {
4110 // TeamMemberId : The member ID of the user to which the change was applied.
4111 TeamMemberId string `json:"team_member_id"`
4112 // Role : The role after the change.
4113 Role *AdminTier `json:"role"`
4114 }
4115
4116 // NewMembersSetPermissionsResult returns a new MembersSetPermissionsResult instance
4117 func NewMembersSetPermissionsResult(TeamMemberId string, Role *AdminTier) *MembersSetPermissionsResult {
4118 s := new(MembersSetPermissionsResult)
4119 s.TeamMemberId = TeamMemberId
4120 s.Role = Role
4121 return s
4122 }
4123
4124 // MembersSetProfileArg : Exactly one of team_member_id, email, or external_id
4125 // must be provided to identify the user account. At least one of new_email,
4126 // new_external_id, new_given_name, and/or new_surname must be provided.
4127 type MembersSetProfileArg struct {
4128 // User : Identity of user whose profile will be set.
4129 User *UserSelectorArg `json:"user"`
4130 // NewEmail : New email for member.
4131 NewEmail string `json:"new_email,omitempty"`
4132 // NewExternalId : New external ID for member.
4133 NewExternalId string `json:"new_external_id,omitempty"`
4134 // NewGivenName : New given name for member.
4135 NewGivenName string `json:"new_given_name,omitempty"`
4136 // NewSurname : New surname for member.
4137 NewSurname string `json:"new_surname,omitempty"`
4138 // NewPersistentId : New persistent ID. This field only available to teams
4139 // using persistent ID SAML configuration.
4140 NewPersistentId string `json:"new_persistent_id,omitempty"`
4141 // NewIsDirectoryRestricted : New value for whether the user is a directory
4142 // restricted user.
4143 NewIsDirectoryRestricted bool `json:"new_is_directory_restricted,omitempty"`
4144 }
4145
4146 // NewMembersSetProfileArg returns a new MembersSetProfileArg instance
4147 func NewMembersSetProfileArg(User *UserSelectorArg) *MembersSetProfileArg {
4148 s := new(MembersSetProfileArg)
4149 s.User = User
4150 return s
4151 }
4152
4153 // MembersSetProfileError : has no documentation (yet)
4154 type MembersSetProfileError struct {
4155 dropbox.Tagged
4156 }
4157
4158 // Valid tag values for MembersSetProfileError
4159 const (
4160 MembersSetProfileErrorUserNotFound = "user_not_found"
4161 MembersSetProfileErrorUserNotInTeam = "user_not_in_team"
4162 MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe"
4163 MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified"
4164 MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user"
4165 MembersSetProfileErrorExternalIdUsedByOtherUser = "external_id_used_by_other_user"
4166 MembersSetProfileErrorSetProfileDisallowed = "set_profile_disallowed"
4167 MembersSetProfileErrorParamCannotBeEmpty = "param_cannot_be_empty"
4168 MembersSetProfileErrorPersistentIdDisabled = "persistent_id_disabled"
4169 MembersSetProfileErrorPersistentIdUsedByOtherUser = "persistent_id_used_by_other_user"
4170 MembersSetProfileErrorDirectoryRestrictedOff = "directory_restricted_off"
4171 MembersSetProfileErrorOther = "other"
4172 )
4173
4174 // MembersSetProfilePhotoArg : has no documentation (yet)
4175 type MembersSetProfilePhotoArg struct {
4176 // User : Identity of the user whose profile photo will be set.
4177 User *UserSelectorArg `json:"user"`
4178 // Photo : Image to set as the member's new profile photo.
4179 Photo *account.PhotoSourceArg `json:"photo"`
4180 }
4181
4182 // NewMembersSetProfilePhotoArg returns a new MembersSetProfilePhotoArg instance
4183 func NewMembersSetProfilePhotoArg(User *UserSelectorArg, Photo *account.PhotoSourceArg) *MembersSetProfilePhotoArg {
4184 s := new(MembersSetProfilePhotoArg)
4185 s.User = User
4186 s.Photo = Photo
4187 return s
4188 }
4189
4190 // MembersSetProfilePhotoError : has no documentation (yet)
4191 type MembersSetProfilePhotoError struct {
4192 dropbox.Tagged
4193 // PhotoError : has no documentation (yet)
4194 PhotoError *account.SetProfilePhotoError `json:"photo_error,omitempty"`
4195 }
4196
4197 // Valid tag values for MembersSetProfilePhotoError
4198 const (
4199 MembersSetProfilePhotoErrorUserNotFound = "user_not_found"
4200 MembersSetProfilePhotoErrorUserNotInTeam = "user_not_in_team"
4201 MembersSetProfilePhotoErrorSetProfileDisallowed = "set_profile_disallowed"
4202 MembersSetProfilePhotoErrorPhotoError = "photo_error"
4203 MembersSetProfilePhotoErrorOther = "other"
4204 )
4205
4206 // UnmarshalJSON deserializes into a MembersSetProfilePhotoError instance
4207 func (u *MembersSetProfilePhotoError) UnmarshalJSON(body []byte) error {
4208 type wrap struct {
4209 dropbox.Tagged
4210 // PhotoError : has no documentation (yet)
4211 PhotoError *account.SetProfilePhotoError `json:"photo_error,omitempty"`
4212 }
4213 var w wrap
4214 var err error
4215 if err = json.Unmarshal(body, &w); err != nil {
4216 return err
4217 }
4218 u.Tag = w.Tag
4219 switch u.Tag {
4220 case "photo_error":
4221 u.PhotoError = w.PhotoError
4222
4223 if err != nil {
4224 return err
4225 }
4226 }
4227 return nil
4228 }
4229
4230 // MembersSuspendError : has no documentation (yet)
4231 type MembersSuspendError struct {
4232 dropbox.Tagged
4233 }
4234
4235 // Valid tag values for MembersSuspendError
4236 const (
4237 MembersSuspendErrorUserNotFound = "user_not_found"
4238 MembersSuspendErrorUserNotInTeam = "user_not_in_team"
4239 MembersSuspendErrorOther = "other"
4240 MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user"
4241 MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin"
4242 MembersSuspendErrorTeamLicenseLimit = "team_license_limit"
4243 )
4244
4245 // MembersTransferFormerMembersFilesError : has no documentation (yet)
4246 type MembersTransferFormerMembersFilesError struct {
4247 dropbox.Tagged
4248 }
4249
4250 // Valid tag values for MembersTransferFormerMembersFilesError
4251 const (
4252 MembersTransferFormerMembersFilesErrorUserNotFound = "user_not_found"
4253 MembersTransferFormerMembersFilesErrorUserNotInTeam = "user_not_in_team"
4254 MembersTransferFormerMembersFilesErrorOther = "other"
4255 MembersTransferFormerMembersFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ"
4256 MembersTransferFormerMembersFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ"
4257 MembersTransferFormerMembersFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found"
4258 MembersTransferFormerMembersFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team"
4259 MembersTransferFormerMembersFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team"
4260 MembersTransferFormerMembersFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found"
4261 MembersTransferFormerMembersFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id"
4262 MembersTransferFormerMembersFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin"
4263 MembersTransferFormerMembersFilesErrorRecipientNotVerified = "recipient_not_verified"
4264 MembersTransferFormerMembersFilesErrorUserDataIsBeingTransferred = "user_data_is_being_transferred"
4265 MembersTransferFormerMembersFilesErrorUserNotRemoved = "user_not_removed"
4266 MembersTransferFormerMembersFilesErrorUserDataCannotBeTransferred = "user_data_cannot_be_transferred"
4267 MembersTransferFormerMembersFilesErrorUserDataAlreadyTransferred = "user_data_already_transferred"
4268 )
4269
4270 // MembersUnsuspendArg : Exactly one of team_member_id, email, or external_id
4271 // must be provided to identify the user account.
4272 type MembersUnsuspendArg struct {
4273 // User : Identity of user to unsuspend.
4274 User *UserSelectorArg `json:"user"`
4275 }
4276
4277 // NewMembersUnsuspendArg returns a new MembersUnsuspendArg instance
4278 func NewMembersUnsuspendArg(User *UserSelectorArg) *MembersUnsuspendArg {
4279 s := new(MembersUnsuspendArg)
4280 s.User = User
4281 return s
4282 }
4283
4284 // MembersUnsuspendError : has no documentation (yet)
4285 type MembersUnsuspendError struct {
4286 dropbox.Tagged
4287 }
4288
4289 // Valid tag values for MembersUnsuspendError
4290 const (
4291 MembersUnsuspendErrorUserNotFound = "user_not_found"
4292 MembersUnsuspendErrorUserNotInTeam = "user_not_in_team"
4293 MembersUnsuspendErrorOther = "other"
4294 MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member"
4295 MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit"
4296 )
4297
4298 // MobileClientPlatform : has no documentation (yet)
4299 type MobileClientPlatform struct {
4300 dropbox.Tagged
4301 }
4302
4303 // Valid tag values for MobileClientPlatform
4304 const (
4305 MobileClientPlatformIphone = "iphone"
4306 MobileClientPlatformIpad = "ipad"
4307 MobileClientPlatformAndroid = "android"
4308 MobileClientPlatformWindowsPhone = "windows_phone"
4309 MobileClientPlatformBlackberry = "blackberry"
4310 MobileClientPlatformOther = "other"
4311 )
4312
4313 // MobileClientSession : Information about linked Dropbox mobile client
4314 // sessions.
4315 type MobileClientSession struct {
4316 DeviceSession
4317 // DeviceName : The device name.
4318 DeviceName string `json:"device_name"`
4319 // ClientType : The mobile application type.
4320 ClientType *MobileClientPlatform `json:"client_type"`
4321 // ClientVersion : The dropbox client version.
4322 ClientVersion string `json:"client_version,omitempty"`
4323 // OsVersion : The hosting OS version.
4324 OsVersion string `json:"os_version,omitempty"`
4325 // LastCarrier : last carrier used by the device.
4326 LastCarrier string `json:"last_carrier,omitempty"`
4327 }
4328
4329 // NewMobileClientSession returns a new MobileClientSession instance
4330 func NewMobileClientSession(SessionId string, DeviceName string, ClientType *MobileClientPlatform) *MobileClientSession {
4331 s := new(MobileClientSession)
4332 s.SessionId = SessionId
4333 s.DeviceName = DeviceName
4334 s.ClientType = ClientType
4335 return s
4336 }
4337
4338 // NamespaceMetadata : Properties of a namespace.
4339 type NamespaceMetadata struct {
4340 // Name : The name of this namespace.
4341 Name string `json:"name"`
4342 // NamespaceId : The ID of this namespace.
4343 NamespaceId string `json:"namespace_id"`
4344 // NamespaceType : The type of this namespace.
4345 NamespaceType *NamespaceType `json:"namespace_type"`
4346 // TeamMemberId : If this is a team member or app folder, the ID of the
4347 // owning team member. Otherwise, this field is not present.
4348 TeamMemberId string `json:"team_member_id,omitempty"`
4349 }
4350
4351 // NewNamespaceMetadata returns a new NamespaceMetadata instance
4352 func NewNamespaceMetadata(Name string, NamespaceId string, NamespaceType *NamespaceType) *NamespaceMetadata {
4353 s := new(NamespaceMetadata)
4354 s.Name = Name
4355 s.NamespaceId = NamespaceId
4356 s.NamespaceType = NamespaceType
4357 return s
4358 }
4359
4360 // NamespaceType : has no documentation (yet)
4361 type NamespaceType struct {
4362 dropbox.Tagged
4363 }
4364
4365 // Valid tag values for NamespaceType
4366 const (
4367 NamespaceTypeAppFolder = "app_folder"
4368 NamespaceTypeSharedFolder = "shared_folder"
4369 NamespaceTypeTeamFolder = "team_folder"
4370 NamespaceTypeTeamMemberFolder = "team_member_folder"
4371 NamespaceTypeOther = "other"
4372 )
4373
4374 // RemoveCustomQuotaResult : User result for setting member custom quota.
4375 type RemoveCustomQuotaResult struct {
4376 dropbox.Tagged
4377 // Success : Successfully removed user.
4378 Success *UserSelectorArg `json:"success,omitempty"`
4379 // InvalidUser : Invalid user (not in team).
4380 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
4381 }
4382
4383 // Valid tag values for RemoveCustomQuotaResult
4384 const (
4385 RemoveCustomQuotaResultSuccess = "success"
4386 RemoveCustomQuotaResultInvalidUser = "invalid_user"
4387 RemoveCustomQuotaResultOther = "other"
4388 )
4389
4390 // UnmarshalJSON deserializes into a RemoveCustomQuotaResult instance
4391 func (u *RemoveCustomQuotaResult) UnmarshalJSON(body []byte) error {
4392 type wrap struct {
4393 dropbox.Tagged
4394 // Success : Successfully removed user.
4395 Success *UserSelectorArg `json:"success,omitempty"`
4396 // InvalidUser : Invalid user (not in team).
4397 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
4398 }
4399 var w wrap
4400 var err error
4401 if err = json.Unmarshal(body, &w); err != nil {
4402 return err
4403 }
4404 u.Tag = w.Tag
4405 switch u.Tag {
4406 case "success":
4407 u.Success = w.Success
4408
4409 if err != nil {
4410 return err
4411 }
4412 case "invalid_user":
4413 u.InvalidUser = w.InvalidUser
4414
4415 if err != nil {
4416 return err
4417 }
4418 }
4419 return nil
4420 }
4421
4422 // RemovedStatus : has no documentation (yet)
4423 type RemovedStatus struct {
4424 // IsRecoverable : True if the removed team member is recoverable.
4425 IsRecoverable bool `json:"is_recoverable"`
4426 // IsDisconnected : True if the team member's account was converted to
4427 // individual account.
4428 IsDisconnected bool `json:"is_disconnected"`
4429 }
4430
4431 // NewRemovedStatus returns a new RemovedStatus instance
4432 func NewRemovedStatus(IsRecoverable bool, IsDisconnected bool) *RemovedStatus {
4433 s := new(RemovedStatus)
4434 s.IsRecoverable = IsRecoverable
4435 s.IsDisconnected = IsDisconnected
4436 return s
4437 }
4438
4439 // ResendSecondaryEmailResult : Result of trying to resend verification email to
4440 // a secondary email address. 'success' is the only value indicating that a
4441 // verification email was successfully sent. The other values explain the type
4442 // of error that occurred, and include the email for which the error occurred.
4443 type ResendSecondaryEmailResult struct {
4444 dropbox.Tagged
4445 // Success : A verification email was successfully sent to the secondary
4446 // email address.
4447 Success string `json:"success,omitempty"`
4448 // NotPending : This secondary email address is not pending for the user.
4449 NotPending string `json:"not_pending,omitempty"`
4450 // RateLimited : Too many emails are being sent to this email address.
4451 // Please try again later.
4452 RateLimited string `json:"rate_limited,omitempty"`
4453 }
4454
4455 // Valid tag values for ResendSecondaryEmailResult
4456 const (
4457 ResendSecondaryEmailResultSuccess = "success"
4458 ResendSecondaryEmailResultNotPending = "not_pending"
4459 ResendSecondaryEmailResultRateLimited = "rate_limited"
4460 ResendSecondaryEmailResultOther = "other"
4461 )
4462
4463 // UnmarshalJSON deserializes into a ResendSecondaryEmailResult instance
4464 func (u *ResendSecondaryEmailResult) UnmarshalJSON(body []byte) error {
4465 type wrap struct {
4466 dropbox.Tagged
4467 // Success : A verification email was successfully sent to the secondary
4468 // email address.
4469 Success string `json:"success,omitempty"`
4470 // NotPending : This secondary email address is not pending for the
4471 // user.
4472 NotPending string `json:"not_pending,omitempty"`
4473 // RateLimited : Too many emails are being sent to this email address.
4474 // Please try again later.
4475 RateLimited string `json:"rate_limited,omitempty"`
4476 }
4477 var w wrap
4478 var err error
4479 if err = json.Unmarshal(body, &w); err != nil {
4480 return err
4481 }
4482 u.Tag = w.Tag
4483 switch u.Tag {
4484 case "success":
4485 u.Success = w.Success
4486
4487 if err != nil {
4488 return err
4489 }
4490 case "not_pending":
4491 u.NotPending = w.NotPending
4492
4493 if err != nil {
4494 return err
4495 }
4496 case "rate_limited":
4497 u.RateLimited = w.RateLimited
4498
4499 if err != nil {
4500 return err
4501 }
4502 }
4503 return nil
4504 }
4505
4506 // ResendVerificationEmailArg : has no documentation (yet)
4507 type ResendVerificationEmailArg struct {
4508 // EmailsToResend : List of users and secondary emails to resend
4509 // verification emails to.
4510 EmailsToResend []*UserSecondaryEmailsArg `json:"emails_to_resend"`
4511 }
4512
4513 // NewResendVerificationEmailArg returns a new ResendVerificationEmailArg instance
4514 func NewResendVerificationEmailArg(EmailsToResend []*UserSecondaryEmailsArg) *ResendVerificationEmailArg {
4515 s := new(ResendVerificationEmailArg)
4516 s.EmailsToResend = EmailsToResend
4517 return s
4518 }
4519
4520 // ResendVerificationEmailResult : List of users and resend results.
4521 type ResendVerificationEmailResult struct {
4522 // Results : has no documentation (yet)
4523 Results []*UserResendResult `json:"results"`
4524 }
4525
4526 // NewResendVerificationEmailResult returns a new ResendVerificationEmailResult instance
4527 func NewResendVerificationEmailResult(Results []*UserResendResult) *ResendVerificationEmailResult {
4528 s := new(ResendVerificationEmailResult)
4529 s.Results = Results
4530 return s
4531 }
4532
4533 // RevokeDesktopClientArg : has no documentation (yet)
4534 type RevokeDesktopClientArg struct {
4535 DeviceSessionArg
4536 // DeleteOnUnlink : Whether to delete all files of the account (this is
4537 // possible only if supported by the desktop client and will be made the
4538 // next time the client access the account).
4539 DeleteOnUnlink bool `json:"delete_on_unlink"`
4540 }
4541
4542 // NewRevokeDesktopClientArg returns a new RevokeDesktopClientArg instance
4543 func NewRevokeDesktopClientArg(SessionId string, TeamMemberId string) *RevokeDesktopClientArg {
4544 s := new(RevokeDesktopClientArg)
4545 s.SessionId = SessionId
4546 s.TeamMemberId = TeamMemberId
4547 s.DeleteOnUnlink = false
4548 return s
4549 }
4550
4551 // RevokeDeviceSessionArg : has no documentation (yet)
4552 type RevokeDeviceSessionArg struct {
4553 dropbox.Tagged
4554 // WebSession : End an active session.
4555 WebSession *DeviceSessionArg `json:"web_session,omitempty"`
4556 // DesktopClient : Unlink a linked desktop device.
4557 DesktopClient *RevokeDesktopClientArg `json:"desktop_client,omitempty"`
4558 // MobileClient : Unlink a linked mobile device.
4559 MobileClient *DeviceSessionArg `json:"mobile_client,omitempty"`
4560 }
4561
4562 // Valid tag values for RevokeDeviceSessionArg
4563 const (
4564 RevokeDeviceSessionArgWebSession = "web_session"
4565 RevokeDeviceSessionArgDesktopClient = "desktop_client"
4566 RevokeDeviceSessionArgMobileClient = "mobile_client"
4567 )
4568
4569 // UnmarshalJSON deserializes into a RevokeDeviceSessionArg instance
4570 func (u *RevokeDeviceSessionArg) UnmarshalJSON(body []byte) error {
4571 type wrap struct {
4572 dropbox.Tagged
4573 }
4574 var w wrap
4575 var err error
4576 if err = json.Unmarshal(body, &w); err != nil {
4577 return err
4578 }
4579 u.Tag = w.Tag
4580 switch u.Tag {
4581 case "web_session":
4582 err = json.Unmarshal(body, &u.WebSession)
4583
4584 if err != nil {
4585 return err
4586 }
4587 case "desktop_client":
4588 err = json.Unmarshal(body, &u.DesktopClient)
4589
4590 if err != nil {
4591 return err
4592 }
4593 case "mobile_client":
4594 err = json.Unmarshal(body, &u.MobileClient)
4595
4596 if err != nil {
4597 return err
4598 }
4599 }
4600 return nil
4601 }
4602
4603 // RevokeDeviceSessionBatchArg : has no documentation (yet)
4604 type RevokeDeviceSessionBatchArg struct {
4605 // RevokeDevices : has no documentation (yet)
4606 RevokeDevices []*RevokeDeviceSessionArg `json:"revoke_devices"`
4607 }
4608
4609 // NewRevokeDeviceSessionBatchArg returns a new RevokeDeviceSessionBatchArg instance
4610 func NewRevokeDeviceSessionBatchArg(RevokeDevices []*RevokeDeviceSessionArg) *RevokeDeviceSessionBatchArg {
4611 s := new(RevokeDeviceSessionBatchArg)
4612 s.RevokeDevices = RevokeDevices
4613 return s
4614 }
4615
4616 // RevokeDeviceSessionBatchError :
4617 type RevokeDeviceSessionBatchError struct {
4618 dropbox.Tagged
4619 }
4620
4621 // Valid tag values for RevokeDeviceSessionBatchError
4622 const (
4623 RevokeDeviceSessionBatchErrorOther = "other"
4624 )
4625
4626 // RevokeDeviceSessionBatchResult : has no documentation (yet)
4627 type RevokeDeviceSessionBatchResult struct {
4628 // RevokeDevicesStatus : has no documentation (yet)
4629 RevokeDevicesStatus []*RevokeDeviceSessionStatus `json:"revoke_devices_status"`
4630 }
4631
4632 // NewRevokeDeviceSessionBatchResult returns a new RevokeDeviceSessionBatchResult instance
4633 func NewRevokeDeviceSessionBatchResult(RevokeDevicesStatus []*RevokeDeviceSessionStatus) *RevokeDeviceSessionBatchResult {
4634 s := new(RevokeDeviceSessionBatchResult)
4635 s.RevokeDevicesStatus = RevokeDevicesStatus
4636 return s
4637 }
4638
4639 // RevokeDeviceSessionError : has no documentation (yet)
4640 type RevokeDeviceSessionError struct {
4641 dropbox.Tagged
4642 }
4643
4644 // Valid tag values for RevokeDeviceSessionError
4645 const (
4646 RevokeDeviceSessionErrorDeviceSessionNotFound = "device_session_not_found"
4647 RevokeDeviceSessionErrorMemberNotFound = "member_not_found"
4648 RevokeDeviceSessionErrorOther = "other"
4649 )
4650
4651 // RevokeDeviceSessionStatus : has no documentation (yet)
4652 type RevokeDeviceSessionStatus struct {
4653 // Success : Result of the revoking request.
4654 Success bool `json:"success"`
4655 // ErrorType : The error cause in case of a failure.
4656 ErrorType *RevokeDeviceSessionError `json:"error_type,omitempty"`
4657 }
4658
4659 // NewRevokeDeviceSessionStatus returns a new RevokeDeviceSessionStatus instance
4660 func NewRevokeDeviceSessionStatus(Success bool) *RevokeDeviceSessionStatus {
4661 s := new(RevokeDeviceSessionStatus)
4662 s.Success = Success
4663 return s
4664 }
4665
4666 // RevokeLinkedApiAppArg : has no documentation (yet)
4667 type RevokeLinkedApiAppArg struct {
4668 // AppId : The application's unique id.
4669 AppId string `json:"app_id"`
4670 // TeamMemberId : The unique id of the member owning the device.
4671 TeamMemberId string `json:"team_member_id"`
4672 // KeepAppFolder : This flag is not longer supported, the application
4673 // dedicated folder (in case the application uses one) will be kept.
4674 KeepAppFolder bool `json:"keep_app_folder"`
4675 }
4676
4677 // NewRevokeLinkedApiAppArg returns a new RevokeLinkedApiAppArg instance
4678 func NewRevokeLinkedApiAppArg(AppId string, TeamMemberId string) *RevokeLinkedApiAppArg {
4679 s := new(RevokeLinkedApiAppArg)
4680 s.AppId = AppId
4681 s.TeamMemberId = TeamMemberId
4682 s.KeepAppFolder = true
4683 return s
4684 }
4685
4686 // RevokeLinkedApiAppBatchArg : has no documentation (yet)
4687 type RevokeLinkedApiAppBatchArg struct {
4688 // RevokeLinkedApp : has no documentation (yet)
4689 RevokeLinkedApp []*RevokeLinkedApiAppArg `json:"revoke_linked_app"`
4690 }
4691
4692 // NewRevokeLinkedApiAppBatchArg returns a new RevokeLinkedApiAppBatchArg instance
4693 func NewRevokeLinkedApiAppBatchArg(RevokeLinkedApp []*RevokeLinkedApiAppArg) *RevokeLinkedApiAppBatchArg {
4694 s := new(RevokeLinkedApiAppBatchArg)
4695 s.RevokeLinkedApp = RevokeLinkedApp
4696 return s
4697 }
4698
4699 // RevokeLinkedAppBatchError : Error returned by
4700 // `linkedAppsRevokeLinkedAppBatch`.
4701 type RevokeLinkedAppBatchError struct {
4702 dropbox.Tagged
4703 }
4704
4705 // Valid tag values for RevokeLinkedAppBatchError
4706 const (
4707 RevokeLinkedAppBatchErrorOther = "other"
4708 )
4709
4710 // RevokeLinkedAppBatchResult : has no documentation (yet)
4711 type RevokeLinkedAppBatchResult struct {
4712 // RevokeLinkedAppStatus : has no documentation (yet)
4713 RevokeLinkedAppStatus []*RevokeLinkedAppStatus `json:"revoke_linked_app_status"`
4714 }
4715
4716 // NewRevokeLinkedAppBatchResult returns a new RevokeLinkedAppBatchResult instance
4717 func NewRevokeLinkedAppBatchResult(RevokeLinkedAppStatus []*RevokeLinkedAppStatus) *RevokeLinkedAppBatchResult {
4718 s := new(RevokeLinkedAppBatchResult)
4719 s.RevokeLinkedAppStatus = RevokeLinkedAppStatus
4720 return s
4721 }
4722
4723 // RevokeLinkedAppError : Error returned by `linkedAppsRevokeLinkedApp`.
4724 type RevokeLinkedAppError struct {
4725 dropbox.Tagged
4726 }
4727
4728 // Valid tag values for RevokeLinkedAppError
4729 const (
4730 RevokeLinkedAppErrorAppNotFound = "app_not_found"
4731 RevokeLinkedAppErrorMemberNotFound = "member_not_found"
4732 RevokeLinkedAppErrorAppFolderRemovalNotSupported = "app_folder_removal_not_supported"
4733 RevokeLinkedAppErrorOther = "other"
4734 )
4735
4736 // RevokeLinkedAppStatus : has no documentation (yet)
4737 type RevokeLinkedAppStatus struct {
4738 // Success : Result of the revoking request.
4739 Success bool `json:"success"`
4740 // ErrorType : The error cause in case of a failure.
4741 ErrorType *RevokeLinkedAppError `json:"error_type,omitempty"`
4742 }
4743
4744 // NewRevokeLinkedAppStatus returns a new RevokeLinkedAppStatus instance
4745 func NewRevokeLinkedAppStatus(Success bool) *RevokeLinkedAppStatus {
4746 s := new(RevokeLinkedAppStatus)
4747 s.Success = Success
4748 return s
4749 }
4750
4751 // SetCustomQuotaArg : has no documentation (yet)
4752 type SetCustomQuotaArg struct {
4753 // UsersAndQuotas : List of users and their custom quotas.
4754 UsersAndQuotas []*UserCustomQuotaArg `json:"users_and_quotas"`
4755 }
4756
4757 // NewSetCustomQuotaArg returns a new SetCustomQuotaArg instance
4758 func NewSetCustomQuotaArg(UsersAndQuotas []*UserCustomQuotaArg) *SetCustomQuotaArg {
4759 s := new(SetCustomQuotaArg)
4760 s.UsersAndQuotas = UsersAndQuotas
4761 return s
4762 }
4763
4764 // SetCustomQuotaError : Error returned when setting member custom quota.
4765 type SetCustomQuotaError struct {
4766 dropbox.Tagged
4767 }
4768
4769 // Valid tag values for SetCustomQuotaError
4770 const (
4771 SetCustomQuotaErrorTooManyUsers = "too_many_users"
4772 SetCustomQuotaErrorOther = "other"
4773 SetCustomQuotaErrorSomeUsersAreExcluded = "some_users_are_excluded"
4774 )
4775
4776 // StorageBucket : Describes the number of users in a specific storage bucket.
4777 type StorageBucket struct {
4778 // Bucket : The name of the storage bucket. For example, '1G' is a bucket of
4779 // users with storage size up to 1 Giga.
4780 Bucket string `json:"bucket"`
4781 // Users : The number of people whose storage is in the range of this
4782 // storage bucket.
4783 Users uint64 `json:"users"`
4784 }
4785
4786 // NewStorageBucket returns a new StorageBucket instance
4787 func NewStorageBucket(Bucket string, Users uint64) *StorageBucket {
4788 s := new(StorageBucket)
4789 s.Bucket = Bucket
4790 s.Users = Users
4791 return s
4792 }
4793
4794 // TeamFolderAccessError : has no documentation (yet)
4795 type TeamFolderAccessError struct {
4796 dropbox.Tagged
4797 }
4798
4799 // Valid tag values for TeamFolderAccessError
4800 const (
4801 TeamFolderAccessErrorInvalidTeamFolderId = "invalid_team_folder_id"
4802 TeamFolderAccessErrorNoAccess = "no_access"
4803 TeamFolderAccessErrorOther = "other"
4804 )
4805
4806 // TeamFolderActivateError :
4807 type TeamFolderActivateError struct {
4808 dropbox.Tagged
4809 // AccessError : has no documentation (yet)
4810 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
4811 // StatusError : has no documentation (yet)
4812 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
4813 // TeamSharedDropboxError : has no documentation (yet)
4814 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
4815 }
4816
4817 // Valid tag values for TeamFolderActivateError
4818 const (
4819 TeamFolderActivateErrorAccessError = "access_error"
4820 TeamFolderActivateErrorStatusError = "status_error"
4821 TeamFolderActivateErrorTeamSharedDropboxError = "team_shared_dropbox_error"
4822 TeamFolderActivateErrorOther = "other"
4823 )
4824
4825 // UnmarshalJSON deserializes into a TeamFolderActivateError instance
4826 func (u *TeamFolderActivateError) UnmarshalJSON(body []byte) error {
4827 type wrap struct {
4828 dropbox.Tagged
4829 // AccessError : has no documentation (yet)
4830 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
4831 // StatusError : has no documentation (yet)
4832 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
4833 // TeamSharedDropboxError : has no documentation (yet)
4834 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
4835 }
4836 var w wrap
4837 var err error
4838 if err = json.Unmarshal(body, &w); err != nil {
4839 return err
4840 }
4841 u.Tag = w.Tag
4842 switch u.Tag {
4843 case "access_error":
4844 u.AccessError = w.AccessError
4845
4846 if err != nil {
4847 return err
4848 }
4849 case "status_error":
4850 u.StatusError = w.StatusError
4851
4852 if err != nil {
4853 return err
4854 }
4855 case "team_shared_dropbox_error":
4856 u.TeamSharedDropboxError = w.TeamSharedDropboxError
4857
4858 if err != nil {
4859 return err
4860 }
4861 }
4862 return nil
4863 }
4864
4865 // TeamFolderIdArg : has no documentation (yet)
4866 type TeamFolderIdArg struct {
4867 // TeamFolderId : The ID of the team folder.
4868 TeamFolderId string `json:"team_folder_id"`
4869 }
4870
4871 // NewTeamFolderIdArg returns a new TeamFolderIdArg instance
4872 func NewTeamFolderIdArg(TeamFolderId string) *TeamFolderIdArg {
4873 s := new(TeamFolderIdArg)
4874 s.TeamFolderId = TeamFolderId
4875 return s
4876 }
4877
4878 // TeamFolderArchiveArg : has no documentation (yet)
4879 type TeamFolderArchiveArg struct {
4880 TeamFolderIdArg
4881 // ForceAsyncOff : Whether to force the archive to happen synchronously.
4882 ForceAsyncOff bool `json:"force_async_off"`
4883 }
4884
4885 // NewTeamFolderArchiveArg returns a new TeamFolderArchiveArg instance
4886 func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg {
4887 s := new(TeamFolderArchiveArg)
4888 s.TeamFolderId = TeamFolderId
4889 s.ForceAsyncOff = false
4890 return s
4891 }
4892
4893 // TeamFolderArchiveError :
4894 type TeamFolderArchiveError struct {
4895 dropbox.Tagged
4896 // AccessError : has no documentation (yet)
4897 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
4898 // StatusError : has no documentation (yet)
4899 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
4900 // TeamSharedDropboxError : has no documentation (yet)
4901 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
4902 }
4903
4904 // Valid tag values for TeamFolderArchiveError
4905 const (
4906 TeamFolderArchiveErrorAccessError = "access_error"
4907 TeamFolderArchiveErrorStatusError = "status_error"
4908 TeamFolderArchiveErrorTeamSharedDropboxError = "team_shared_dropbox_error"
4909 TeamFolderArchiveErrorOther = "other"
4910 )
4911
4912 // UnmarshalJSON deserializes into a TeamFolderArchiveError instance
4913 func (u *TeamFolderArchiveError) UnmarshalJSON(body []byte) error {
4914 type wrap struct {
4915 dropbox.Tagged
4916 // AccessError : has no documentation (yet)
4917 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
4918 // StatusError : has no documentation (yet)
4919 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
4920 // TeamSharedDropboxError : has no documentation (yet)
4921 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
4922 }
4923 var w wrap
4924 var err error
4925 if err = json.Unmarshal(body, &w); err != nil {
4926 return err
4927 }
4928 u.Tag = w.Tag
4929 switch u.Tag {
4930 case "access_error":
4931 u.AccessError = w.AccessError
4932
4933 if err != nil {
4934 return err
4935 }
4936 case "status_error":
4937 u.StatusError = w.StatusError
4938
4939 if err != nil {
4940 return err
4941 }
4942 case "team_shared_dropbox_error":
4943 u.TeamSharedDropboxError = w.TeamSharedDropboxError
4944
4945 if err != nil {
4946 return err
4947 }
4948 }
4949 return nil
4950 }
4951
4952 // TeamFolderArchiveJobStatus : has no documentation (yet)
4953 type TeamFolderArchiveJobStatus struct {
4954 dropbox.Tagged
4955 // Complete : The archive job has finished. The value is the metadata for
4956 // the resulting team folder.
4957 Complete *TeamFolderMetadata `json:"complete,omitempty"`
4958 // Failed : Error occurred while performing an asynchronous job from
4959 // `teamFolderArchive`.
4960 Failed *TeamFolderArchiveError `json:"failed,omitempty"`
4961 }
4962
4963 // Valid tag values for TeamFolderArchiveJobStatus
4964 const (
4965 TeamFolderArchiveJobStatusInProgress = "in_progress"
4966 TeamFolderArchiveJobStatusComplete = "complete"
4967 TeamFolderArchiveJobStatusFailed = "failed"
4968 )
4969
4970 // UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance
4971 func (u *TeamFolderArchiveJobStatus) UnmarshalJSON(body []byte) error {
4972 type wrap struct {
4973 dropbox.Tagged
4974 // Failed : Error occurred while performing an asynchronous job from
4975 // `teamFolderArchive`.
4976 Failed *TeamFolderArchiveError `json:"failed,omitempty"`
4977 }
4978 var w wrap
4979 var err error
4980 if err = json.Unmarshal(body, &w); err != nil {
4981 return err
4982 }
4983 u.Tag = w.Tag
4984 switch u.Tag {
4985 case "complete":
4986 err = json.Unmarshal(body, &u.Complete)
4987
4988 if err != nil {
4989 return err
4990 }
4991 case "failed":
4992 u.Failed = w.Failed
4993
4994 if err != nil {
4995 return err
4996 }
4997 }
4998 return nil
4999 }
5000
5001 // TeamFolderArchiveLaunch : has no documentation (yet)
5002 type TeamFolderArchiveLaunch struct {
5003 dropbox.Tagged
5004 // AsyncJobId : This response indicates that the processing is asynchronous.
5005 // The string is an id that can be used to obtain the status of the
5006 // asynchronous job.
5007 AsyncJobId string `json:"async_job_id,omitempty"`
5008 // Complete : has no documentation (yet)
5009 Complete *TeamFolderMetadata `json:"complete,omitempty"`
5010 }
5011
5012 // Valid tag values for TeamFolderArchiveLaunch
5013 const (
5014 TeamFolderArchiveLaunchAsyncJobId = "async_job_id"
5015 TeamFolderArchiveLaunchComplete = "complete"
5016 )
5017
5018 // UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance
5019 func (u *TeamFolderArchiveLaunch) UnmarshalJSON(body []byte) error {
5020 type wrap struct {
5021 dropbox.Tagged
5022 // AsyncJobId : This response indicates that the processing is
5023 // asynchronous. The string is an id that can be used to obtain the
5024 // status of the asynchronous job.
5025 AsyncJobId string `json:"async_job_id,omitempty"`
5026 }
5027 var w wrap
5028 var err error
5029 if err = json.Unmarshal(body, &w); err != nil {
5030 return err
5031 }
5032 u.Tag = w.Tag
5033 switch u.Tag {
5034 case "async_job_id":
5035 u.AsyncJobId = w.AsyncJobId
5036
5037 if err != nil {
5038 return err
5039 }
5040 case "complete":
5041 err = json.Unmarshal(body, &u.Complete)
5042
5043 if err != nil {
5044 return err
5045 }
5046 }
5047 return nil
5048 }
5049
5050 // TeamFolderCreateArg : has no documentation (yet)
5051 type TeamFolderCreateArg struct {
5052 // Name : Name for the new team folder.
5053 Name string `json:"name"`
5054 // SyncSetting : The sync setting to apply to this team folder. Only
5055 // permitted if the team has team selective sync enabled.
5056 SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"`
5057 }
5058
5059 // NewTeamFolderCreateArg returns a new TeamFolderCreateArg instance
5060 func NewTeamFolderCreateArg(Name string) *TeamFolderCreateArg {
5061 s := new(TeamFolderCreateArg)
5062 s.Name = Name
5063 return s
5064 }
5065
5066 // TeamFolderCreateError : has no documentation (yet)
5067 type TeamFolderCreateError struct {
5068 dropbox.Tagged
5069 // SyncSettingsError : An error occurred setting the sync settings.
5070 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
5071 }
5072
5073 // Valid tag values for TeamFolderCreateError
5074 const (
5075 TeamFolderCreateErrorInvalidFolderName = "invalid_folder_name"
5076 TeamFolderCreateErrorFolderNameAlreadyUsed = "folder_name_already_used"
5077 TeamFolderCreateErrorFolderNameReserved = "folder_name_reserved"
5078 TeamFolderCreateErrorSyncSettingsError = "sync_settings_error"
5079 TeamFolderCreateErrorOther = "other"
5080 )
5081
5082 // UnmarshalJSON deserializes into a TeamFolderCreateError instance
5083 func (u *TeamFolderCreateError) UnmarshalJSON(body []byte) error {
5084 type wrap struct {
5085 dropbox.Tagged
5086 // SyncSettingsError : An error occurred setting the sync settings.
5087 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
5088 }
5089 var w wrap
5090 var err error
5091 if err = json.Unmarshal(body, &w); err != nil {
5092 return err
5093 }
5094 u.Tag = w.Tag
5095 switch u.Tag {
5096 case "sync_settings_error":
5097 u.SyncSettingsError = w.SyncSettingsError
5098
5099 if err != nil {
5100 return err
5101 }
5102 }
5103 return nil
5104 }
5105
5106 // TeamFolderGetInfoItem : has no documentation (yet)
5107 type TeamFolderGetInfoItem struct {
5108 dropbox.Tagged
5109 // IdNotFound : An ID that was provided as a parameter to
5110 // `teamFolderGetInfo` did not match any of the team's team folders.
5111 IdNotFound string `json:"id_not_found,omitempty"`
5112 // TeamFolderMetadata : Properties of a team folder.
5113 TeamFolderMetadata *TeamFolderMetadata `json:"team_folder_metadata,omitempty"`
5114 }
5115
5116 // Valid tag values for TeamFolderGetInfoItem
5117 const (
5118 TeamFolderGetInfoItemIdNotFound = "id_not_found"
5119 TeamFolderGetInfoItemTeamFolderMetadata = "team_folder_metadata"
5120 )
5121
5122 // UnmarshalJSON deserializes into a TeamFolderGetInfoItem instance
5123 func (u *TeamFolderGetInfoItem) UnmarshalJSON(body []byte) error {
5124 type wrap struct {
5125 dropbox.Tagged
5126 // IdNotFound : An ID that was provided as a parameter to
5127 // `teamFolderGetInfo` did not match any of the team's team folders.
5128 IdNotFound string `json:"id_not_found,omitempty"`
5129 }
5130 var w wrap
5131 var err error
5132 if err = json.Unmarshal(body, &w); err != nil {
5133 return err
5134 }
5135 u.Tag = w.Tag
5136 switch u.Tag {
5137 case "id_not_found":
5138 u.IdNotFound = w.IdNotFound
5139
5140 if err != nil {
5141 return err
5142 }
5143 case "team_folder_metadata":
5144 err = json.Unmarshal(body, &u.TeamFolderMetadata)
5145
5146 if err != nil {
5147 return err
5148 }
5149 }
5150 return nil
5151 }
5152
5153 // TeamFolderIdListArg : has no documentation (yet)
5154 type TeamFolderIdListArg struct {
5155 // TeamFolderIds : The list of team folder IDs.
5156 TeamFolderIds []string `json:"team_folder_ids"`
5157 }
5158
5159 // NewTeamFolderIdListArg returns a new TeamFolderIdListArg instance
5160 func NewTeamFolderIdListArg(TeamFolderIds []string) *TeamFolderIdListArg {
5161 s := new(TeamFolderIdListArg)
5162 s.TeamFolderIds = TeamFolderIds
5163 return s
5164 }
5165
5166 // TeamFolderInvalidStatusError : has no documentation (yet)
5167 type TeamFolderInvalidStatusError struct {
5168 dropbox.Tagged
5169 }
5170
5171 // Valid tag values for TeamFolderInvalidStatusError
5172 const (
5173 TeamFolderInvalidStatusErrorActive = "active"
5174 TeamFolderInvalidStatusErrorArchived = "archived"
5175 TeamFolderInvalidStatusErrorArchiveInProgress = "archive_in_progress"
5176 TeamFolderInvalidStatusErrorOther = "other"
5177 )
5178
5179 // TeamFolderListArg : has no documentation (yet)
5180 type TeamFolderListArg struct {
5181 // Limit : The maximum number of results to return per request.
5182 Limit uint32 `json:"limit"`
5183 }
5184
5185 // NewTeamFolderListArg returns a new TeamFolderListArg instance
5186 func NewTeamFolderListArg() *TeamFolderListArg {
5187 s := new(TeamFolderListArg)
5188 s.Limit = 1000
5189 return s
5190 }
5191
5192 // TeamFolderListContinueArg : has no documentation (yet)
5193 type TeamFolderListContinueArg struct {
5194 // Cursor : Indicates from what point to get the next set of team folders.
5195 Cursor string `json:"cursor"`
5196 }
5197
5198 // NewTeamFolderListContinueArg returns a new TeamFolderListContinueArg instance
5199 func NewTeamFolderListContinueArg(Cursor string) *TeamFolderListContinueArg {
5200 s := new(TeamFolderListContinueArg)
5201 s.Cursor = Cursor
5202 return s
5203 }
5204
5205 // TeamFolderListContinueError : has no documentation (yet)
5206 type TeamFolderListContinueError struct {
5207 dropbox.Tagged
5208 }
5209
5210 // Valid tag values for TeamFolderListContinueError
5211 const (
5212 TeamFolderListContinueErrorInvalidCursor = "invalid_cursor"
5213 TeamFolderListContinueErrorOther = "other"
5214 )
5215
5216 // TeamFolderListError : has no documentation (yet)
5217 type TeamFolderListError struct {
5218 // AccessError : has no documentation (yet)
5219 AccessError *TeamFolderAccessError `json:"access_error"`
5220 }
5221
5222 // NewTeamFolderListError returns a new TeamFolderListError instance
5223 func NewTeamFolderListError(AccessError *TeamFolderAccessError) *TeamFolderListError {
5224 s := new(TeamFolderListError)
5225 s.AccessError = AccessError
5226 return s
5227 }
5228
5229 // TeamFolderListResult : Result for `teamFolderList` and
5230 // `teamFolderListContinue`.
5231 type TeamFolderListResult struct {
5232 // TeamFolders : List of all team folders in the authenticated team.
5233 TeamFolders []*TeamFolderMetadata `json:"team_folders"`
5234 // Cursor : Pass the cursor into `teamFolderListContinue` to obtain
5235 // additional team folders.
5236 Cursor string `json:"cursor"`
5237 // HasMore : Is true if there are additional team folders that have not been
5238 // returned yet. An additional call to `teamFolderListContinue` can retrieve
5239 // them.
5240 HasMore bool `json:"has_more"`
5241 }
5242
5243 // NewTeamFolderListResult returns a new TeamFolderListResult instance
5244 func NewTeamFolderListResult(TeamFolders []*TeamFolderMetadata, Cursor string, HasMore bool) *TeamFolderListResult {
5245 s := new(TeamFolderListResult)
5246 s.TeamFolders = TeamFolders
5247 s.Cursor = Cursor
5248 s.HasMore = HasMore
5249 return s
5250 }
5251
5252 // TeamFolderMetadata : Properties of a team folder.
5253 type TeamFolderMetadata struct {
5254 // TeamFolderId : The ID of the team folder.
5255 TeamFolderId string `json:"team_folder_id"`
5256 // Name : The name of the team folder.
5257 Name string `json:"name"`
5258 // Status : The status of the team folder.
5259 Status *TeamFolderStatus `json:"status"`
5260 // IsTeamSharedDropbox : True if this team folder is a shared team root.
5261 IsTeamSharedDropbox bool `json:"is_team_shared_dropbox"`
5262 // SyncSetting : The sync setting applied to this team folder.
5263 SyncSetting *files.SyncSetting `json:"sync_setting"`
5264 // ContentSyncSettings : Sync settings applied to contents of this team
5265 // folder.
5266 ContentSyncSettings []*files.ContentSyncSetting `json:"content_sync_settings"`
5267 }
5268
5269 // NewTeamFolderMetadata returns a new TeamFolderMetadata instance
5270 func NewTeamFolderMetadata(TeamFolderId string, Name string, Status *TeamFolderStatus, IsTeamSharedDropbox bool, SyncSetting *files.SyncSetting, ContentSyncSettings []*files.ContentSyncSetting) *TeamFolderMetadata {
5271 s := new(TeamFolderMetadata)
5272 s.TeamFolderId = TeamFolderId
5273 s.Name = Name
5274 s.Status = Status
5275 s.IsTeamSharedDropbox = IsTeamSharedDropbox
5276 s.SyncSetting = SyncSetting
5277 s.ContentSyncSettings = ContentSyncSettings
5278 return s
5279 }
5280
5281 // TeamFolderPermanentlyDeleteError :
5282 type TeamFolderPermanentlyDeleteError struct {
5283 dropbox.Tagged
5284 // AccessError : has no documentation (yet)
5285 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5286 // StatusError : has no documentation (yet)
5287 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5288 // TeamSharedDropboxError : has no documentation (yet)
5289 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5290 }
5291
5292 // Valid tag values for TeamFolderPermanentlyDeleteError
5293 const (
5294 TeamFolderPermanentlyDeleteErrorAccessError = "access_error"
5295 TeamFolderPermanentlyDeleteErrorStatusError = "status_error"
5296 TeamFolderPermanentlyDeleteErrorTeamSharedDropboxError = "team_shared_dropbox_error"
5297 TeamFolderPermanentlyDeleteErrorOther = "other"
5298 )
5299
5300 // UnmarshalJSON deserializes into a TeamFolderPermanentlyDeleteError instance
5301 func (u *TeamFolderPermanentlyDeleteError) UnmarshalJSON(body []byte) error {
5302 type wrap struct {
5303 dropbox.Tagged
5304 // AccessError : has no documentation (yet)
5305 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5306 // StatusError : has no documentation (yet)
5307 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5308 // TeamSharedDropboxError : has no documentation (yet)
5309 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5310 }
5311 var w wrap
5312 var err error
5313 if err = json.Unmarshal(body, &w); err != nil {
5314 return err
5315 }
5316 u.Tag = w.Tag
5317 switch u.Tag {
5318 case "access_error":
5319 u.AccessError = w.AccessError
5320
5321 if err != nil {
5322 return err
5323 }
5324 case "status_error":
5325 u.StatusError = w.StatusError
5326
5327 if err != nil {
5328 return err
5329 }
5330 case "team_shared_dropbox_error":
5331 u.TeamSharedDropboxError = w.TeamSharedDropboxError
5332
5333 if err != nil {
5334 return err
5335 }
5336 }
5337 return nil
5338 }
5339
5340 // TeamFolderRenameArg : has no documentation (yet)
5341 type TeamFolderRenameArg struct {
5342 TeamFolderIdArg
5343 // Name : New team folder name.
5344 Name string `json:"name"`
5345 }
5346
5347 // NewTeamFolderRenameArg returns a new TeamFolderRenameArg instance
5348 func NewTeamFolderRenameArg(TeamFolderId string, Name string) *TeamFolderRenameArg {
5349 s := new(TeamFolderRenameArg)
5350 s.TeamFolderId = TeamFolderId
5351 s.Name = Name
5352 return s
5353 }
5354
5355 // TeamFolderRenameError : has no documentation (yet)
5356 type TeamFolderRenameError struct {
5357 dropbox.Tagged
5358 // AccessError : has no documentation (yet)
5359 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5360 // StatusError : has no documentation (yet)
5361 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5362 // TeamSharedDropboxError : has no documentation (yet)
5363 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5364 }
5365
5366 // Valid tag values for TeamFolderRenameError
5367 const (
5368 TeamFolderRenameErrorAccessError = "access_error"
5369 TeamFolderRenameErrorStatusError = "status_error"
5370 TeamFolderRenameErrorTeamSharedDropboxError = "team_shared_dropbox_error"
5371 TeamFolderRenameErrorOther = "other"
5372 TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name"
5373 TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used"
5374 TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved"
5375 )
5376
5377 // UnmarshalJSON deserializes into a TeamFolderRenameError instance
5378 func (u *TeamFolderRenameError) UnmarshalJSON(body []byte) error {
5379 type wrap struct {
5380 dropbox.Tagged
5381 // AccessError : has no documentation (yet)
5382 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5383 // StatusError : has no documentation (yet)
5384 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5385 // TeamSharedDropboxError : has no documentation (yet)
5386 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5387 }
5388 var w wrap
5389 var err error
5390 if err = json.Unmarshal(body, &w); err != nil {
5391 return err
5392 }
5393 u.Tag = w.Tag
5394 switch u.Tag {
5395 case "access_error":
5396 u.AccessError = w.AccessError
5397
5398 if err != nil {
5399 return err
5400 }
5401 case "status_error":
5402 u.StatusError = w.StatusError
5403
5404 if err != nil {
5405 return err
5406 }
5407 case "team_shared_dropbox_error":
5408 u.TeamSharedDropboxError = w.TeamSharedDropboxError
5409
5410 if err != nil {
5411 return err
5412 }
5413 }
5414 return nil
5415 }
5416
5417 // TeamFolderStatus : has no documentation (yet)
5418 type TeamFolderStatus struct {
5419 dropbox.Tagged
5420 }
5421
5422 // Valid tag values for TeamFolderStatus
5423 const (
5424 TeamFolderStatusActive = "active"
5425 TeamFolderStatusArchived = "archived"
5426 TeamFolderStatusArchiveInProgress = "archive_in_progress"
5427 TeamFolderStatusOther = "other"
5428 )
5429
5430 // TeamFolderTeamSharedDropboxError : has no documentation (yet)
5431 type TeamFolderTeamSharedDropboxError struct {
5432 dropbox.Tagged
5433 }
5434
5435 // Valid tag values for TeamFolderTeamSharedDropboxError
5436 const (
5437 TeamFolderTeamSharedDropboxErrorDisallowed = "disallowed"
5438 TeamFolderTeamSharedDropboxErrorOther = "other"
5439 )
5440
5441 // TeamFolderUpdateSyncSettingsArg : has no documentation (yet)
5442 type TeamFolderUpdateSyncSettingsArg struct {
5443 TeamFolderIdArg
5444 // SyncSetting : Sync setting to apply to the team folder itself. Only
5445 // meaningful if the team folder is not a shared team root.
5446 SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"`
5447 // ContentSyncSettings : Sync settings to apply to contents of this team
5448 // folder.
5449 ContentSyncSettings []*files.ContentSyncSettingArg `json:"content_sync_settings,omitempty"`
5450 }
5451
5452 // NewTeamFolderUpdateSyncSettingsArg returns a new TeamFolderUpdateSyncSettingsArg instance
5453 func NewTeamFolderUpdateSyncSettingsArg(TeamFolderId string) *TeamFolderUpdateSyncSettingsArg {
5454 s := new(TeamFolderUpdateSyncSettingsArg)
5455 s.TeamFolderId = TeamFolderId
5456 return s
5457 }
5458
5459 // TeamFolderUpdateSyncSettingsError : has no documentation (yet)
5460 type TeamFolderUpdateSyncSettingsError struct {
5461 dropbox.Tagged
5462 // AccessError : has no documentation (yet)
5463 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5464 // StatusError : has no documentation (yet)
5465 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5466 // TeamSharedDropboxError : has no documentation (yet)
5467 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5468 // SyncSettingsError : An error occurred setting the sync settings.
5469 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
5470 }
5471
5472 // Valid tag values for TeamFolderUpdateSyncSettingsError
5473 const (
5474 TeamFolderUpdateSyncSettingsErrorAccessError = "access_error"
5475 TeamFolderUpdateSyncSettingsErrorStatusError = "status_error"
5476 TeamFolderUpdateSyncSettingsErrorTeamSharedDropboxError = "team_shared_dropbox_error"
5477 TeamFolderUpdateSyncSettingsErrorOther = "other"
5478 TeamFolderUpdateSyncSettingsErrorSyncSettingsError = "sync_settings_error"
5479 )
5480
5481 // UnmarshalJSON deserializes into a TeamFolderUpdateSyncSettingsError instance
5482 func (u *TeamFolderUpdateSyncSettingsError) UnmarshalJSON(body []byte) error {
5483 type wrap struct {
5484 dropbox.Tagged
5485 // AccessError : has no documentation (yet)
5486 AccessError *TeamFolderAccessError `json:"access_error,omitempty"`
5487 // StatusError : has no documentation (yet)
5488 StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"`
5489 // TeamSharedDropboxError : has no documentation (yet)
5490 TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"`
5491 // SyncSettingsError : An error occurred setting the sync settings.
5492 SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"`
5493 }
5494 var w wrap
5495 var err error
5496 if err = json.Unmarshal(body, &w); err != nil {
5497 return err
5498 }
5499 u.Tag = w.Tag
5500 switch u.Tag {
5501 case "access_error":
5502 u.AccessError = w.AccessError
5503
5504 if err != nil {
5505 return err
5506 }
5507 case "status_error":
5508 u.StatusError = w.StatusError
5509
5510 if err != nil {
5511 return err
5512 }
5513 case "team_shared_dropbox_error":
5514 u.TeamSharedDropboxError = w.TeamSharedDropboxError
5515
5516 if err != nil {
5517 return err
5518 }
5519 case "sync_settings_error":
5520 u.SyncSettingsError = w.SyncSettingsError
5521
5522 if err != nil {
5523 return err
5524 }
5525 }
5526 return nil
5527 }
5528
5529 // TeamGetInfoResult : has no documentation (yet)
5530 type TeamGetInfoResult struct {
5531 // Name : The name of the team.
5532 Name string `json:"name"`
5533 // TeamId : The ID of the team.
5534 TeamId string `json:"team_id"`
5535 // NumLicensedUsers : The number of licenses available to the team.
5536 NumLicensedUsers uint32 `json:"num_licensed_users"`
5537 // NumProvisionedUsers : The number of accounts that have been invited or
5538 // are already active members of the team.
5539 NumProvisionedUsers uint32 `json:"num_provisioned_users"`
5540 // Policies : has no documentation (yet)
5541 Policies *team_policies.TeamMemberPolicies `json:"policies"`
5542 }
5543
5544 // NewTeamGetInfoResult returns a new TeamGetInfoResult instance
5545 func NewTeamGetInfoResult(Name string, TeamId string, NumLicensedUsers uint32, NumProvisionedUsers uint32, Policies *team_policies.TeamMemberPolicies) *TeamGetInfoResult {
5546 s := new(TeamGetInfoResult)
5547 s.Name = Name
5548 s.TeamId = TeamId
5549 s.NumLicensedUsers = NumLicensedUsers
5550 s.NumProvisionedUsers = NumProvisionedUsers
5551 s.Policies = Policies
5552 return s
5553 }
5554
5555 // TeamMemberInfo : Information about a team member.
5556 type TeamMemberInfo struct {
5557 // Profile : Profile of a user as a member of a team.
5558 Profile *TeamMemberProfile `json:"profile"`
5559 // Role : The user's role in the team.
5560 Role *AdminTier `json:"role"`
5561 }
5562
5563 // NewTeamMemberInfo returns a new TeamMemberInfo instance
5564 func NewTeamMemberInfo(Profile *TeamMemberProfile, Role *AdminTier) *TeamMemberInfo {
5565 s := new(TeamMemberInfo)
5566 s.Profile = Profile
5567 s.Role = Role
5568 return s
5569 }
5570
5571 // TeamMemberInfoV2 : Information about a team member.
5572 type TeamMemberInfoV2 struct {
5573 // Profile : Profile of a user as a member of a team.
5574 Profile *TeamMemberProfile `json:"profile"`
5575 // Roles : The user's roles in the team.
5576 Roles []*TeamMemberRole `json:"roles,omitempty"`
5577 }
5578
5579 // NewTeamMemberInfoV2 returns a new TeamMemberInfoV2 instance
5580 func NewTeamMemberInfoV2(Profile *TeamMemberProfile) *TeamMemberInfoV2 {
5581 s := new(TeamMemberInfoV2)
5582 s.Profile = Profile
5583 return s
5584 }
5585
5586 // TeamMemberInfoV2Result : Information about a team member, after the change,
5587 // like at `membersSetProfile`.
5588 type TeamMemberInfoV2Result struct {
5589 // MemberInfo : Member info, after the change.
5590 MemberInfo *TeamMemberInfoV2 `json:"member_info"`
5591 }
5592
5593 // NewTeamMemberInfoV2Result returns a new TeamMemberInfoV2Result instance
5594 func NewTeamMemberInfoV2Result(MemberInfo *TeamMemberInfoV2) *TeamMemberInfoV2Result {
5595 s := new(TeamMemberInfoV2Result)
5596 s.MemberInfo = MemberInfo
5597 return s
5598 }
5599
5600 // TeamMemberProfile : Profile of a user as a member of a team.
5601 type TeamMemberProfile struct {
5602 MemberProfile
5603 // Groups : List of group IDs of groups that the user belongs to.
5604 Groups []string `json:"groups"`
5605 // MemberFolderId : The namespace id of the user's root folder.
5606 MemberFolderId string `json:"member_folder_id"`
5607 }
5608
5609 // NewTeamMemberProfile returns a new TeamMemberProfile instance
5610 func NewTeamMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType, Groups []string, MemberFolderId string) *TeamMemberProfile {
5611 s := new(TeamMemberProfile)
5612 s.TeamMemberId = TeamMemberId
5613 s.Email = Email
5614 s.EmailVerified = EmailVerified
5615 s.Status = Status
5616 s.Name = Name
5617 s.MembershipType = MembershipType
5618 s.Groups = Groups
5619 s.MemberFolderId = MemberFolderId
5620 return s
5621 }
5622
5623 // TeamMemberRole : A role which can be attached to a team member. This replaces
5624 // AdminTier; each AdminTier corresponds to a new TeamMemberRole with a matching
5625 // name.
5626 type TeamMemberRole struct {
5627 // RoleId : A string containing encoded role ID. For roles defined by
5628 // Dropbox, this is the same across all teams.
5629 RoleId string `json:"role_id"`
5630 // Name : The role display name.
5631 Name string `json:"name"`
5632 // Description : Role description. Describes which permissions come with
5633 // this role.
5634 Description string `json:"description"`
5635 }
5636
5637 // NewTeamMemberRole returns a new TeamMemberRole instance
5638 func NewTeamMemberRole(RoleId string, Name string, Description string) *TeamMemberRole {
5639 s := new(TeamMemberRole)
5640 s.RoleId = RoleId
5641 s.Name = Name
5642 s.Description = Description
5643 return s
5644 }
5645
5646 // TeamMemberStatus : The user's status as a member of a specific team.
5647 type TeamMemberStatus struct {
5648 dropbox.Tagged
5649 // Removed : User is no longer a member of the team. Removed users are only
5650 // listed when include_removed is true in members/list.
5651 Removed *RemovedStatus `json:"removed,omitempty"`
5652 }
5653
5654 // Valid tag values for TeamMemberStatus
5655 const (
5656 TeamMemberStatusActive = "active"
5657 TeamMemberStatusInvited = "invited"
5658 TeamMemberStatusSuspended = "suspended"
5659 TeamMemberStatusRemoved = "removed"
5660 )
5661
5662 // UnmarshalJSON deserializes into a TeamMemberStatus instance
5663 func (u *TeamMemberStatus) UnmarshalJSON(body []byte) error {
5664 type wrap struct {
5665 dropbox.Tagged
5666 }
5667 var w wrap
5668 var err error
5669 if err = json.Unmarshal(body, &w); err != nil {
5670 return err
5671 }
5672 u.Tag = w.Tag
5673 switch u.Tag {
5674 case "removed":
5675 err = json.Unmarshal(body, &u.Removed)
5676
5677 if err != nil {
5678 return err
5679 }
5680 }
5681 return nil
5682 }
5683
5684 // TeamMembershipType : has no documentation (yet)
5685 type TeamMembershipType struct {
5686 dropbox.Tagged
5687 }
5688
5689 // Valid tag values for TeamMembershipType
5690 const (
5691 TeamMembershipTypeFull = "full"
5692 TeamMembershipTypeLimited = "limited"
5693 )
5694
5695 // TeamNamespacesListArg : has no documentation (yet)
5696 type TeamNamespacesListArg struct {
5697 // Limit : Specifying a value here has no effect.
5698 Limit uint32 `json:"limit"`
5699 }
5700
5701 // NewTeamNamespacesListArg returns a new TeamNamespacesListArg instance
5702 func NewTeamNamespacesListArg() *TeamNamespacesListArg {
5703 s := new(TeamNamespacesListArg)
5704 s.Limit = 1000
5705 return s
5706 }
5707
5708 // TeamNamespacesListContinueArg : has no documentation (yet)
5709 type TeamNamespacesListContinueArg struct {
5710 // Cursor : Indicates from what point to get the next set of team-accessible
5711 // namespaces.
5712 Cursor string `json:"cursor"`
5713 }
5714
5715 // NewTeamNamespacesListContinueArg returns a new TeamNamespacesListContinueArg instance
5716 func NewTeamNamespacesListContinueArg(Cursor string) *TeamNamespacesListContinueArg {
5717 s := new(TeamNamespacesListContinueArg)
5718 s.Cursor = Cursor
5719 return s
5720 }
5721
5722 // TeamNamespacesListError : has no documentation (yet)
5723 type TeamNamespacesListError struct {
5724 dropbox.Tagged
5725 }
5726
5727 // Valid tag values for TeamNamespacesListError
5728 const (
5729 TeamNamespacesListErrorInvalidArg = "invalid_arg"
5730 TeamNamespacesListErrorOther = "other"
5731 )
5732
5733 // TeamNamespacesListContinueError : has no documentation (yet)
5734 type TeamNamespacesListContinueError struct {
5735 dropbox.Tagged
5736 }
5737
5738 // Valid tag values for TeamNamespacesListContinueError
5739 const (
5740 TeamNamespacesListContinueErrorInvalidArg = "invalid_arg"
5741 TeamNamespacesListContinueErrorOther = "other"
5742 TeamNamespacesListContinueErrorInvalidCursor = "invalid_cursor"
5743 )
5744
5745 // TeamNamespacesListResult : Result for `namespacesList`.
5746 type TeamNamespacesListResult struct {
5747 // Namespaces : List of all namespaces the team can access.
5748 Namespaces []*NamespaceMetadata `json:"namespaces"`
5749 // Cursor : Pass the cursor into `namespacesListContinue` to obtain
5750 // additional namespaces. Note that duplicate namespaces may be returned.
5751 Cursor string `json:"cursor"`
5752 // HasMore : Is true if there are additional namespaces that have not been
5753 // returned yet.
5754 HasMore bool `json:"has_more"`
5755 }
5756
5757 // NewTeamNamespacesListResult returns a new TeamNamespacesListResult instance
5758 func NewTeamNamespacesListResult(Namespaces []*NamespaceMetadata, Cursor string, HasMore bool) *TeamNamespacesListResult {
5759 s := new(TeamNamespacesListResult)
5760 s.Namespaces = Namespaces
5761 s.Cursor = Cursor
5762 s.HasMore = HasMore
5763 return s
5764 }
5765
5766 // TeamReportFailureReason : has no documentation (yet)
5767 type TeamReportFailureReason struct {
5768 dropbox.Tagged
5769 }
5770
5771 // Valid tag values for TeamReportFailureReason
5772 const (
5773 TeamReportFailureReasonTemporaryError = "temporary_error"
5774 TeamReportFailureReasonManyReportsAtOnce = "many_reports_at_once"
5775 TeamReportFailureReasonTooMuchData = "too_much_data"
5776 TeamReportFailureReasonOther = "other"
5777 )
5778
5779 // TokenGetAuthenticatedAdminError : Error returned by
5780 // `tokenGetAuthenticatedAdmin`.
5781 type TokenGetAuthenticatedAdminError struct {
5782 dropbox.Tagged
5783 }
5784
5785 // Valid tag values for TokenGetAuthenticatedAdminError
5786 const (
5787 TokenGetAuthenticatedAdminErrorMappingNotFound = "mapping_not_found"
5788 TokenGetAuthenticatedAdminErrorAdminNotActive = "admin_not_active"
5789 TokenGetAuthenticatedAdminErrorOther = "other"
5790 )
5791
5792 // TokenGetAuthenticatedAdminResult : Results for `tokenGetAuthenticatedAdmin`.
5793 type TokenGetAuthenticatedAdminResult struct {
5794 // AdminProfile : The admin who authorized the token.
5795 AdminProfile *TeamMemberProfile `json:"admin_profile"`
5796 }
5797
5798 // NewTokenGetAuthenticatedAdminResult returns a new TokenGetAuthenticatedAdminResult instance
5799 func NewTokenGetAuthenticatedAdminResult(AdminProfile *TeamMemberProfile) *TokenGetAuthenticatedAdminResult {
5800 s := new(TokenGetAuthenticatedAdminResult)
5801 s.AdminProfile = AdminProfile
5802 return s
5803 }
5804
5805 // UploadApiRateLimitValue : The value for `Feature.upload_api_rate_limit`.
5806 type UploadApiRateLimitValue struct {
5807 dropbox.Tagged
5808 // Limit : The number of upload API calls allowed per month.
5809 Limit uint32 `json:"limit,omitempty"`
5810 }
5811
5812 // Valid tag values for UploadApiRateLimitValue
5813 const (
5814 UploadApiRateLimitValueUnlimited = "unlimited"
5815 UploadApiRateLimitValueLimit = "limit"
5816 UploadApiRateLimitValueOther = "other"
5817 )
5818
5819 // UnmarshalJSON deserializes into a UploadApiRateLimitValue instance
5820 func (u *UploadApiRateLimitValue) UnmarshalJSON(body []byte) error {
5821 type wrap struct {
5822 dropbox.Tagged
5823 // Limit : The number of upload API calls allowed per month.
5824 Limit uint32 `json:"limit,omitempty"`
5825 }
5826 var w wrap
5827 var err error
5828 if err = json.Unmarshal(body, &w); err != nil {
5829 return err
5830 }
5831 u.Tag = w.Tag
5832 switch u.Tag {
5833 case "limit":
5834 u.Limit = w.Limit
5835
5836 if err != nil {
5837 return err
5838 }
5839 }
5840 return nil
5841 }
5842
5843 // UserAddResult : Result of trying to add secondary emails to a user. 'success'
5844 // is the only value indicating that a user was successfully retrieved for
5845 // adding secondary emails. The other values explain the type of error that
5846 // occurred, and include the user for which the error occurred.
5847 type UserAddResult struct {
5848 dropbox.Tagged
5849 // Success : Describes a user and the results for each attempt to add a
5850 // secondary email.
5851 Success *UserSecondaryEmailsResult `json:"success,omitempty"`
5852 // InvalidUser : Specified user is not a valid target for adding secondary
5853 // emails.
5854 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
5855 // Unverified : Secondary emails can only be added to verified users.
5856 Unverified *UserSelectorArg `json:"unverified,omitempty"`
5857 // PlaceholderUser : Secondary emails cannot be added to placeholder users.
5858 PlaceholderUser *UserSelectorArg `json:"placeholder_user,omitempty"`
5859 }
5860
5861 // Valid tag values for UserAddResult
5862 const (
5863 UserAddResultSuccess = "success"
5864 UserAddResultInvalidUser = "invalid_user"
5865 UserAddResultUnverified = "unverified"
5866 UserAddResultPlaceholderUser = "placeholder_user"
5867 UserAddResultOther = "other"
5868 )
5869
5870 // UnmarshalJSON deserializes into a UserAddResult instance
5871 func (u *UserAddResult) UnmarshalJSON(body []byte) error {
5872 type wrap struct {
5873 dropbox.Tagged
5874 // InvalidUser : Specified user is not a valid target for adding
5875 // secondary emails.
5876 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
5877 // Unverified : Secondary emails can only be added to verified users.
5878 Unverified *UserSelectorArg `json:"unverified,omitempty"`
5879 // PlaceholderUser : Secondary emails cannot be added to placeholder
5880 // users.
5881 PlaceholderUser *UserSelectorArg `json:"placeholder_user,omitempty"`
5882 }
5883 var w wrap
5884 var err error
5885 if err = json.Unmarshal(body, &w); err != nil {
5886 return err
5887 }
5888 u.Tag = w.Tag
5889 switch u.Tag {
5890 case "success":
5891 err = json.Unmarshal(body, &u.Success)
5892
5893 if err != nil {
5894 return err
5895 }
5896 case "invalid_user":
5897 u.InvalidUser = w.InvalidUser
5898
5899 if err != nil {
5900 return err
5901 }
5902 case "unverified":
5903 u.Unverified = w.Unverified
5904
5905 if err != nil {
5906 return err
5907 }
5908 case "placeholder_user":
5909 u.PlaceholderUser = w.PlaceholderUser
5910
5911 if err != nil {
5912 return err
5913 }
5914 }
5915 return nil
5916 }
5917
5918 // UserCustomQuotaArg : User and their required custom quota in GB (1 TB = 1024
5919 // GB).
5920 type UserCustomQuotaArg struct {
5921 // User : has no documentation (yet)
5922 User *UserSelectorArg `json:"user"`
5923 // QuotaGb : has no documentation (yet)
5924 QuotaGb uint32 `json:"quota_gb"`
5925 }
5926
5927 // NewUserCustomQuotaArg returns a new UserCustomQuotaArg instance
5928 func NewUserCustomQuotaArg(User *UserSelectorArg, QuotaGb uint32) *UserCustomQuotaArg {
5929 s := new(UserCustomQuotaArg)
5930 s.User = User
5931 s.QuotaGb = QuotaGb
5932 return s
5933 }
5934
5935 // UserCustomQuotaResult : User and their custom quota in GB (1 TB = 1024 GB).
5936 // No quota returns if the user has no custom quota set.
5937 type UserCustomQuotaResult struct {
5938 // User : has no documentation (yet)
5939 User *UserSelectorArg `json:"user"`
5940 // QuotaGb : has no documentation (yet)
5941 QuotaGb uint32 `json:"quota_gb,omitempty"`
5942 }
5943
5944 // NewUserCustomQuotaResult returns a new UserCustomQuotaResult instance
5945 func NewUserCustomQuotaResult(User *UserSelectorArg) *UserCustomQuotaResult {
5946 s := new(UserCustomQuotaResult)
5947 s.User = User
5948 return s
5949 }
5950
5951 // UserDeleteEmailsResult : has no documentation (yet)
5952 type UserDeleteEmailsResult struct {
5953 // User : has no documentation (yet)
5954 User *UserSelectorArg `json:"user"`
5955 // Results : has no documentation (yet)
5956 Results []*DeleteSecondaryEmailResult `json:"results"`
5957 }
5958
5959 // NewUserDeleteEmailsResult returns a new UserDeleteEmailsResult instance
5960 func NewUserDeleteEmailsResult(User *UserSelectorArg, Results []*DeleteSecondaryEmailResult) *UserDeleteEmailsResult {
5961 s := new(UserDeleteEmailsResult)
5962 s.User = User
5963 s.Results = Results
5964 return s
5965 }
5966
5967 // UserDeleteResult : Result of trying to delete a user's secondary emails.
5968 // 'success' is the only value indicating that a user was successfully retrieved
5969 // for deleting secondary emails. The other values explain the type of error
5970 // that occurred, and include the user for which the error occurred.
5971 type UserDeleteResult struct {
5972 dropbox.Tagged
5973 // Success : Describes a user and the results for each attempt to delete a
5974 // secondary email.
5975 Success *UserDeleteEmailsResult `json:"success,omitempty"`
5976 // InvalidUser : Specified user is not a valid target for deleting secondary
5977 // emails.
5978 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
5979 }
5980
5981 // Valid tag values for UserDeleteResult
5982 const (
5983 UserDeleteResultSuccess = "success"
5984 UserDeleteResultInvalidUser = "invalid_user"
5985 UserDeleteResultOther = "other"
5986 )
5987
5988 // UnmarshalJSON deserializes into a UserDeleteResult instance
5989 func (u *UserDeleteResult) UnmarshalJSON(body []byte) error {
5990 type wrap struct {
5991 dropbox.Tagged
5992 // InvalidUser : Specified user is not a valid target for deleting
5993 // secondary emails.
5994 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
5995 }
5996 var w wrap
5997 var err error
5998 if err = json.Unmarshal(body, &w); err != nil {
5999 return err
6000 }
6001 u.Tag = w.Tag
6002 switch u.Tag {
6003 case "success":
6004 err = json.Unmarshal(body, &u.Success)
6005
6006 if err != nil {
6007 return err
6008 }
6009 case "invalid_user":
6010 u.InvalidUser = w.InvalidUser
6011
6012 if err != nil {
6013 return err
6014 }
6015 }
6016 return nil
6017 }
6018
6019 // UserResendEmailsResult : has no documentation (yet)
6020 type UserResendEmailsResult struct {
6021 // User : has no documentation (yet)
6022 User *UserSelectorArg `json:"user"`
6023 // Results : has no documentation (yet)
6024 Results []*ResendSecondaryEmailResult `json:"results"`
6025 }
6026
6027 // NewUserResendEmailsResult returns a new UserResendEmailsResult instance
6028 func NewUserResendEmailsResult(User *UserSelectorArg, Results []*ResendSecondaryEmailResult) *UserResendEmailsResult {
6029 s := new(UserResendEmailsResult)
6030 s.User = User
6031 s.Results = Results
6032 return s
6033 }
6034
6035 // UserResendResult : Result of trying to resend verification emails to a user.
6036 // 'success' is the only value indicating that a user was successfully retrieved
6037 // for sending verification emails. The other values explain the type of error
6038 // that occurred, and include the user for which the error occurred.
6039 type UserResendResult struct {
6040 dropbox.Tagged
6041 // Success : Describes a user and the results for each attempt to resend
6042 // verification emails.
6043 Success *UserResendEmailsResult `json:"success,omitempty"`
6044 // InvalidUser : Specified user is not a valid target for resending
6045 // verification emails.
6046 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
6047 }
6048
6049 // Valid tag values for UserResendResult
6050 const (
6051 UserResendResultSuccess = "success"
6052 UserResendResultInvalidUser = "invalid_user"
6053 UserResendResultOther = "other"
6054 )
6055
6056 // UnmarshalJSON deserializes into a UserResendResult instance
6057 func (u *UserResendResult) UnmarshalJSON(body []byte) error {
6058 type wrap struct {
6059 dropbox.Tagged
6060 // InvalidUser : Specified user is not a valid target for resending
6061 // verification emails.
6062 InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"`
6063 }
6064 var w wrap
6065 var err error
6066 if err = json.Unmarshal(body, &w); err != nil {
6067 return err
6068 }
6069 u.Tag = w.Tag
6070 switch u.Tag {
6071 case "success":
6072 err = json.Unmarshal(body, &u.Success)
6073
6074 if err != nil {
6075 return err
6076 }
6077 case "invalid_user":
6078 u.InvalidUser = w.InvalidUser
6079
6080 if err != nil {
6081 return err
6082 }
6083 }
6084 return nil
6085 }
6086
6087 // UserSecondaryEmailsArg : User and a list of secondary emails.
6088 type UserSecondaryEmailsArg struct {
6089 // User : has no documentation (yet)
6090 User *UserSelectorArg `json:"user"`
6091 // SecondaryEmails : has no documentation (yet)
6092 SecondaryEmails []string `json:"secondary_emails"`
6093 }
6094
6095 // NewUserSecondaryEmailsArg returns a new UserSecondaryEmailsArg instance
6096 func NewUserSecondaryEmailsArg(User *UserSelectorArg, SecondaryEmails []string) *UserSecondaryEmailsArg {
6097 s := new(UserSecondaryEmailsArg)
6098 s.User = User
6099 s.SecondaryEmails = SecondaryEmails
6100 return s
6101 }
6102
6103 // UserSecondaryEmailsResult : has no documentation (yet)
6104 type UserSecondaryEmailsResult struct {
6105 // User : has no documentation (yet)
6106 User *UserSelectorArg `json:"user"`
6107 // Results : has no documentation (yet)
6108 Results []*AddSecondaryEmailResult `json:"results"`
6109 }
6110
6111 // NewUserSecondaryEmailsResult returns a new UserSecondaryEmailsResult instance
6112 func NewUserSecondaryEmailsResult(User *UserSelectorArg, Results []*AddSecondaryEmailResult) *UserSecondaryEmailsResult {
6113 s := new(UserSecondaryEmailsResult)
6114 s.User = User
6115 s.Results = Results
6116 return s
6117 }
6118
6119 // UserSelectorArg : Argument for selecting a single user, either by
6120 // team_member_id, external_id or email.
6121 type UserSelectorArg struct {
6122 dropbox.Tagged
6123 // TeamMemberId : has no documentation (yet)
6124 TeamMemberId string `json:"team_member_id,omitempty"`
6125 // ExternalId : has no documentation (yet)
6126 ExternalId string `json:"external_id,omitempty"`
6127 // Email : has no documentation (yet)
6128 Email string `json:"email,omitempty"`
6129 }
6130
6131 // Valid tag values for UserSelectorArg
6132 const (
6133 UserSelectorArgTeamMemberId = "team_member_id"
6134 UserSelectorArgExternalId = "external_id"
6135 UserSelectorArgEmail = "email"
6136 )
6137
6138 // UnmarshalJSON deserializes into a UserSelectorArg instance
6139 func (u *UserSelectorArg) UnmarshalJSON(body []byte) error {
6140 type wrap struct {
6141 dropbox.Tagged
6142 // TeamMemberId : has no documentation (yet)
6143 TeamMemberId string `json:"team_member_id,omitempty"`
6144 // ExternalId : has no documentation (yet)
6145 ExternalId string `json:"external_id,omitempty"`
6146 // Email : has no documentation (yet)
6147 Email string `json:"email,omitempty"`
6148 }
6149 var w wrap
6150 var err error
6151 if err = json.Unmarshal(body, &w); err != nil {
6152 return err
6153 }
6154 u.Tag = w.Tag
6155 switch u.Tag {
6156 case "team_member_id":
6157 u.TeamMemberId = w.TeamMemberId
6158
6159 if err != nil {
6160 return err
6161 }
6162 case "external_id":
6163 u.ExternalId = w.ExternalId
6164
6165 if err != nil {
6166 return err
6167 }
6168 case "email":
6169 u.Email = w.Email
6170
6171 if err != nil {
6172 return err
6173 }
6174 }
6175 return nil
6176 }
6177
6178 // UsersSelectorArg : Argument for selecting a list of users, either by
6179 // team_member_ids, external_ids or emails.
6180 type UsersSelectorArg struct {
6181 dropbox.Tagged
6182 // TeamMemberIds : List of member IDs.
6183 TeamMemberIds []string `json:"team_member_ids,omitempty"`
6184 // ExternalIds : List of external user IDs.
6185 ExternalIds []string `json:"external_ids,omitempty"`
6186 // Emails : List of email addresses.
6187 Emails []string `json:"emails,omitempty"`
6188 }
6189
6190 // Valid tag values for UsersSelectorArg
6191 const (
6192 UsersSelectorArgTeamMemberIds = "team_member_ids"
6193 UsersSelectorArgExternalIds = "external_ids"
6194 UsersSelectorArgEmails = "emails"
6195 )
6196
6197 // UnmarshalJSON deserializes into a UsersSelectorArg instance
6198 func (u *UsersSelectorArg) UnmarshalJSON(body []byte) error {
6199 type wrap struct {
6200 dropbox.Tagged
6201 // TeamMemberIds : List of member IDs.
6202 TeamMemberIds []string `json:"team_member_ids,omitempty"`
6203 // ExternalIds : List of external user IDs.
6204 ExternalIds []string `json:"external_ids,omitempty"`
6205 // Emails : List of email addresses.
6206 Emails []string `json:"emails,omitempty"`
6207 }
6208 var w wrap
6209 var err error
6210 if err = json.Unmarshal(body, &w); err != nil {
6211 return err
6212 }
6213 u.Tag = w.Tag
6214 switch u.Tag {
6215 case "team_member_ids":
6216 u.TeamMemberIds = w.TeamMemberIds
6217
6218 if err != nil {
6219 return err
6220 }
6221 case "external_ids":
6222 u.ExternalIds = w.ExternalIds
6223
6224 if err != nil {
6225 return err
6226 }
6227 case "emails":
6228 u.Emails = w.Emails
6229
6230 if err != nil {
6231 return err
6232 }
6233 }
6234 return nil
6235 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_common : has no documentation (yet)
21 package team_common
22
23 import (
24 "time"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 )
28
29 // GroupManagementType : The group type determines how a group is managed.
30 type GroupManagementType struct {
31 dropbox.Tagged
32 }
33
34 // Valid tag values for GroupManagementType
35 const (
36 GroupManagementTypeUserManaged = "user_managed"
37 GroupManagementTypeCompanyManaged = "company_managed"
38 GroupManagementTypeSystemManaged = "system_managed"
39 GroupManagementTypeOther = "other"
40 )
41
42 // GroupSummary : Information about a group.
43 type GroupSummary struct {
44 // GroupName : has no documentation (yet)
45 GroupName string `json:"group_name"`
46 // GroupId : has no documentation (yet)
47 GroupId string `json:"group_id"`
48 // GroupExternalId : External ID of group. This is an arbitrary ID that an
49 // admin can attach to a group.
50 GroupExternalId string `json:"group_external_id,omitempty"`
51 // MemberCount : The number of members in the group.
52 MemberCount uint32 `json:"member_count,omitempty"`
53 // GroupManagementType : Who is allowed to manage the group.
54 GroupManagementType *GroupManagementType `json:"group_management_type"`
55 }
56
57 // NewGroupSummary returns a new GroupSummary instance
58 func NewGroupSummary(GroupName string, GroupId string, GroupManagementType *GroupManagementType) *GroupSummary {
59 s := new(GroupSummary)
60 s.GroupName = GroupName
61 s.GroupId = GroupId
62 s.GroupManagementType = GroupManagementType
63 return s
64 }
65
66 // GroupType : The group type determines how a group is created and managed.
67 type GroupType struct {
68 dropbox.Tagged
69 }
70
71 // Valid tag values for GroupType
72 const (
73 GroupTypeTeam = "team"
74 GroupTypeUserManaged = "user_managed"
75 GroupTypeOther = "other"
76 )
77
78 // MemberSpaceLimitType : The type of the space limit imposed on a team member.
79 type MemberSpaceLimitType struct {
80 dropbox.Tagged
81 }
82
83 // Valid tag values for MemberSpaceLimitType
84 const (
85 MemberSpaceLimitTypeOff = "off"
86 MemberSpaceLimitTypeAlertOnly = "alert_only"
87 MemberSpaceLimitTypeStopSync = "stop_sync"
88 MemberSpaceLimitTypeOther = "other"
89 )
90
91 // TimeRange : Time range.
92 type TimeRange struct {
93 // StartTime : Optional starting time (inclusive).
94 StartTime *time.Time `json:"start_time,omitempty"`
95 // EndTime : Optional ending time (exclusive).
96 EndTime *time.Time `json:"end_time,omitempty"`
97 }
98
99 // NewTimeRange returns a new TimeRange instance
100 func NewTimeRange() *TimeRange {
101 s := new(TimeRange)
102 return s
103 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package team_log
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // GetEvents : Retrieves team events. If the result's
33 // `GetTeamEventsResult.has_more` field is true, call `getEventsContinue`
34 // with the returned cursor to retrieve more entries. If end_time is not
35 // specified in your request, you may use the returned cursor to poll
36 // `getEventsContinue` for new events. Many attributes note 'may be missing
37 // due to historical data gap'. Note that the file_operations category and &
38 // analogous paper events are not available on all Dropbox Business `plans`
39 // </business/plans-comparison>. Use `features/get_values`
40 // </developers/documentation/http/teams#team-features-get_values> to check
41 // for this feature. Permission : Team Auditing.
42 GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error)
43 // GetEventsContinue : Once a cursor has been retrieved from `getEvents`,
44 // use this to paginate through all events. Permission : Team Auditing.
45 GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error)
46 }
47
48 type apiImpl dropbox.Context
49
50 //GetEventsAPIError is an error-wrapper for the get_events route
51 type GetEventsAPIError struct {
52 dropbox.APIError
53 EndpointError *GetTeamEventsError `json:"error"`
54 }
55
56 func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) {
57 req := dropbox.Request{
58 Host: "api",
59 Namespace: "team_log",
60 Route: "get_events",
61 Auth: "team",
62 Style: "rpc",
63 Arg: arg,
64 ExtraHeaders: nil,
65 }
66
67 var resp []byte
68 var respBody io.ReadCloser
69 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
70 if err != nil {
71 var appErr GetEventsAPIError
72 err = auth.ParseError(err, &appErr)
73 if err == &appErr {
74 err = appErr
75 }
76 return
77 }
78
79 err = json.Unmarshal(resp, &res)
80 if err != nil {
81 return
82 }
83
84 _ = respBody
85 return
86 }
87
88 //GetEventsContinueAPIError is an error-wrapper for the get_events/continue route
89 type GetEventsContinueAPIError struct {
90 dropbox.APIError
91 EndpointError *GetTeamEventsContinueError `json:"error"`
92 }
93
94 func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) {
95 req := dropbox.Request{
96 Host: "api",
97 Namespace: "team_log",
98 Route: "get_events/continue",
99 Auth: "team",
100 Style: "rpc",
101 Arg: arg,
102 ExtraHeaders: nil,
103 }
104
105 var resp []byte
106 var respBody io.ReadCloser
107 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
108 if err != nil {
109 var appErr GetEventsContinueAPIError
110 err = auth.ParseError(err, &appErr)
111 if err == &appErr {
112 err = appErr
113 }
114 return
115 }
116
117 err = json.Unmarshal(resp, &res)
118 if err != nil {
119 return
120 }
121
122 _ = respBody
123 return
124 }
125
126 // New returns a Client implementation for this namespace
127 func New(c dropbox.Config) Client {
128 ctx := apiImpl(dropbox.NewContext(c))
129 return &ctx
130 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_log : has no documentation (yet)
21 package team_log
22
23 import (
24 "encoding/json"
25 "time"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
32 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
33 )
34
35 // AccessMethodLogInfo : Indicates the method in which the action was performed.
36 type AccessMethodLogInfo struct {
37 dropbox.Tagged
38 // AdminConsole : Admin console session details.
39 AdminConsole *WebSessionLogInfo `json:"admin_console,omitempty"`
40 // Api : Api session details.
41 Api *ApiSessionLogInfo `json:"api,omitempty"`
42 // ContentManager : Content manager session details.
43 ContentManager *WebSessionLogInfo `json:"content_manager,omitempty"`
44 // EndUser : End user session details.
45 EndUser IsSessionLogInfo `json:"end_user,omitempty"`
46 // EnterpriseConsole : Enterprise console session details.
47 EnterpriseConsole *WebSessionLogInfo `json:"enterprise_console,omitempty"`
48 // SignInAs : Sign in as session details.
49 SignInAs *WebSessionLogInfo `json:"sign_in_as,omitempty"`
50 }
51
52 // Valid tag values for AccessMethodLogInfo
53 const (
54 AccessMethodLogInfoAdminConsole = "admin_console"
55 AccessMethodLogInfoApi = "api"
56 AccessMethodLogInfoContentManager = "content_manager"
57 AccessMethodLogInfoEndUser = "end_user"
58 AccessMethodLogInfoEnterpriseConsole = "enterprise_console"
59 AccessMethodLogInfoSignInAs = "sign_in_as"
60 AccessMethodLogInfoOther = "other"
61 )
62
63 // UnmarshalJSON deserializes into a AccessMethodLogInfo instance
64 func (u *AccessMethodLogInfo) UnmarshalJSON(body []byte) error {
65 type wrap struct {
66 dropbox.Tagged
67 // EndUser : End user session details.
68 EndUser json.RawMessage `json:"end_user,omitempty"`
69 }
70 var w wrap
71 var err error
72 if err = json.Unmarshal(body, &w); err != nil {
73 return err
74 }
75 u.Tag = w.Tag
76 switch u.Tag {
77 case "admin_console":
78 err = json.Unmarshal(body, &u.AdminConsole)
79
80 if err != nil {
81 return err
82 }
83 case "api":
84 err = json.Unmarshal(body, &u.Api)
85
86 if err != nil {
87 return err
88 }
89 case "content_manager":
90 err = json.Unmarshal(body, &u.ContentManager)
91
92 if err != nil {
93 return err
94 }
95 case "end_user":
96 u.EndUser, err = IsSessionLogInfoFromJSON(w.EndUser)
97
98 if err != nil {
99 return err
100 }
101 case "enterprise_console":
102 err = json.Unmarshal(body, &u.EnterpriseConsole)
103
104 if err != nil {
105 return err
106 }
107 case "sign_in_as":
108 err = json.Unmarshal(body, &u.SignInAs)
109
110 if err != nil {
111 return err
112 }
113 }
114 return nil
115 }
116
117 // AccountCaptureAvailability : has no documentation (yet)
118 type AccountCaptureAvailability struct {
119 dropbox.Tagged
120 }
121
122 // Valid tag values for AccountCaptureAvailability
123 const (
124 AccountCaptureAvailabilityAvailable = "available"
125 AccountCaptureAvailabilityUnavailable = "unavailable"
126 AccountCaptureAvailabilityOther = "other"
127 )
128
129 // AccountCaptureChangeAvailabilityDetails : Granted/revoked option to enable
130 // account capture on team domains.
131 type AccountCaptureChangeAvailabilityDetails struct {
132 // NewValue : New account capture availabilty value.
133 NewValue *AccountCaptureAvailability `json:"new_value"`
134 // PreviousValue : Previous account capture availabilty value. Might be
135 // missing due to historical data gap.
136 PreviousValue *AccountCaptureAvailability `json:"previous_value,omitempty"`
137 }
138
139 // NewAccountCaptureChangeAvailabilityDetails returns a new AccountCaptureChangeAvailabilityDetails instance
140 func NewAccountCaptureChangeAvailabilityDetails(NewValue *AccountCaptureAvailability) *AccountCaptureChangeAvailabilityDetails {
141 s := new(AccountCaptureChangeAvailabilityDetails)
142 s.NewValue = NewValue
143 return s
144 }
145
146 // AccountCaptureChangeAvailabilityType : has no documentation (yet)
147 type AccountCaptureChangeAvailabilityType struct {
148 // Description : has no documentation (yet)
149 Description string `json:"description"`
150 }
151
152 // NewAccountCaptureChangeAvailabilityType returns a new AccountCaptureChangeAvailabilityType instance
153 func NewAccountCaptureChangeAvailabilityType(Description string) *AccountCaptureChangeAvailabilityType {
154 s := new(AccountCaptureChangeAvailabilityType)
155 s.Description = Description
156 return s
157 }
158
159 // AccountCaptureChangePolicyDetails : Changed account capture setting on team
160 // domain.
161 type AccountCaptureChangePolicyDetails struct {
162 // NewValue : New account capture policy.
163 NewValue *AccountCapturePolicy `json:"new_value"`
164 // PreviousValue : Previous account capture policy. Might be missing due to
165 // historical data gap.
166 PreviousValue *AccountCapturePolicy `json:"previous_value,omitempty"`
167 }
168
169 // NewAccountCaptureChangePolicyDetails returns a new AccountCaptureChangePolicyDetails instance
170 func NewAccountCaptureChangePolicyDetails(NewValue *AccountCapturePolicy) *AccountCaptureChangePolicyDetails {
171 s := new(AccountCaptureChangePolicyDetails)
172 s.NewValue = NewValue
173 return s
174 }
175
176 // AccountCaptureChangePolicyType : has no documentation (yet)
177 type AccountCaptureChangePolicyType struct {
178 // Description : has no documentation (yet)
179 Description string `json:"description"`
180 }
181
182 // NewAccountCaptureChangePolicyType returns a new AccountCaptureChangePolicyType instance
183 func NewAccountCaptureChangePolicyType(Description string) *AccountCaptureChangePolicyType {
184 s := new(AccountCaptureChangePolicyType)
185 s.Description = Description
186 return s
187 }
188
189 // AccountCaptureMigrateAccountDetails : Account-captured user migrated account
190 // to team.
191 type AccountCaptureMigrateAccountDetails struct {
192 // DomainName : Domain name.
193 DomainName string `json:"domain_name"`
194 }
195
196 // NewAccountCaptureMigrateAccountDetails returns a new AccountCaptureMigrateAccountDetails instance
197 func NewAccountCaptureMigrateAccountDetails(DomainName string) *AccountCaptureMigrateAccountDetails {
198 s := new(AccountCaptureMigrateAccountDetails)
199 s.DomainName = DomainName
200 return s
201 }
202
203 // AccountCaptureMigrateAccountType : has no documentation (yet)
204 type AccountCaptureMigrateAccountType struct {
205 // Description : has no documentation (yet)
206 Description string `json:"description"`
207 }
208
209 // NewAccountCaptureMigrateAccountType returns a new AccountCaptureMigrateAccountType instance
210 func NewAccountCaptureMigrateAccountType(Description string) *AccountCaptureMigrateAccountType {
211 s := new(AccountCaptureMigrateAccountType)
212 s.Description = Description
213 return s
214 }
215
216 // AccountCaptureNotificationEmailsSentDetails : Sent account capture email to
217 // all unmanaged members.
218 type AccountCaptureNotificationEmailsSentDetails struct {
219 // DomainName : Domain name.
220 DomainName string `json:"domain_name"`
221 // NotificationType : Account-capture email notification type.
222 NotificationType *AccountCaptureNotificationType `json:"notification_type,omitempty"`
223 }
224
225 // NewAccountCaptureNotificationEmailsSentDetails returns a new AccountCaptureNotificationEmailsSentDetails instance
226 func NewAccountCaptureNotificationEmailsSentDetails(DomainName string) *AccountCaptureNotificationEmailsSentDetails {
227 s := new(AccountCaptureNotificationEmailsSentDetails)
228 s.DomainName = DomainName
229 return s
230 }
231
232 // AccountCaptureNotificationEmailsSentType : has no documentation (yet)
233 type AccountCaptureNotificationEmailsSentType struct {
234 // Description : has no documentation (yet)
235 Description string `json:"description"`
236 }
237
238 // NewAccountCaptureNotificationEmailsSentType returns a new AccountCaptureNotificationEmailsSentType instance
239 func NewAccountCaptureNotificationEmailsSentType(Description string) *AccountCaptureNotificationEmailsSentType {
240 s := new(AccountCaptureNotificationEmailsSentType)
241 s.Description = Description
242 return s
243 }
244
245 // AccountCaptureNotificationType : has no documentation (yet)
246 type AccountCaptureNotificationType struct {
247 dropbox.Tagged
248 }
249
250 // Valid tag values for AccountCaptureNotificationType
251 const (
252 AccountCaptureNotificationTypeActionableNotification = "actionable_notification"
253 AccountCaptureNotificationTypeProactiveWarningNotification = "proactive_warning_notification"
254 AccountCaptureNotificationTypeOther = "other"
255 )
256
257 // AccountCapturePolicy : has no documentation (yet)
258 type AccountCapturePolicy struct {
259 dropbox.Tagged
260 }
261
262 // Valid tag values for AccountCapturePolicy
263 const (
264 AccountCapturePolicyAllUsers = "all_users"
265 AccountCapturePolicyDisabled = "disabled"
266 AccountCapturePolicyInvitedUsers = "invited_users"
267 AccountCapturePolicyOther = "other"
268 )
269
270 // AccountCaptureRelinquishAccountDetails : Account-captured user changed
271 // account email to personal email.
272 type AccountCaptureRelinquishAccountDetails struct {
273 // DomainName : Domain name.
274 DomainName string `json:"domain_name"`
275 }
276
277 // NewAccountCaptureRelinquishAccountDetails returns a new AccountCaptureRelinquishAccountDetails instance
278 func NewAccountCaptureRelinquishAccountDetails(DomainName string) *AccountCaptureRelinquishAccountDetails {
279 s := new(AccountCaptureRelinquishAccountDetails)
280 s.DomainName = DomainName
281 return s
282 }
283
284 // AccountCaptureRelinquishAccountType : has no documentation (yet)
285 type AccountCaptureRelinquishAccountType struct {
286 // Description : has no documentation (yet)
287 Description string `json:"description"`
288 }
289
290 // NewAccountCaptureRelinquishAccountType returns a new AccountCaptureRelinquishAccountType instance
291 func NewAccountCaptureRelinquishAccountType(Description string) *AccountCaptureRelinquishAccountType {
292 s := new(AccountCaptureRelinquishAccountType)
293 s.Description = Description
294 return s
295 }
296
297 // AccountLockOrUnlockedDetails : Unlocked/locked account after failed sign in
298 // attempts.
299 type AccountLockOrUnlockedDetails struct {
300 // PreviousValue : The previous account status.
301 PreviousValue *AccountState `json:"previous_value"`
302 // NewValue : The new account status.
303 NewValue *AccountState `json:"new_value"`
304 }
305
306 // NewAccountLockOrUnlockedDetails returns a new AccountLockOrUnlockedDetails instance
307 func NewAccountLockOrUnlockedDetails(PreviousValue *AccountState, NewValue *AccountState) *AccountLockOrUnlockedDetails {
308 s := new(AccountLockOrUnlockedDetails)
309 s.PreviousValue = PreviousValue
310 s.NewValue = NewValue
311 return s
312 }
313
314 // AccountLockOrUnlockedType : has no documentation (yet)
315 type AccountLockOrUnlockedType struct {
316 // Description : has no documentation (yet)
317 Description string `json:"description"`
318 }
319
320 // NewAccountLockOrUnlockedType returns a new AccountLockOrUnlockedType instance
321 func NewAccountLockOrUnlockedType(Description string) *AccountLockOrUnlockedType {
322 s := new(AccountLockOrUnlockedType)
323 s.Description = Description
324 return s
325 }
326
327 // AccountState : has no documentation (yet)
328 type AccountState struct {
329 dropbox.Tagged
330 }
331
332 // Valid tag values for AccountState
333 const (
334 AccountStateLocked = "locked"
335 AccountStateUnlocked = "unlocked"
336 AccountStateOther = "other"
337 )
338
339 // ActionDetails : Additional information indicating the action taken that
340 // caused status change.
341 type ActionDetails struct {
342 dropbox.Tagged
343 // RemoveAction : Define how the user was removed from the team.
344 RemoveAction *MemberRemoveActionType `json:"remove_action,omitempty"`
345 // TeamInviteDetails : Additional information relevant when someone is
346 // invited to the team.
347 TeamInviteDetails *TeamInviteDetails `json:"team_invite_details,omitempty"`
348 // TeamJoinDetails : Additional information relevant when a new member joins
349 // the team.
350 TeamJoinDetails *JoinTeamDetails `json:"team_join_details,omitempty"`
351 }
352
353 // Valid tag values for ActionDetails
354 const (
355 ActionDetailsRemoveAction = "remove_action"
356 ActionDetailsTeamInviteDetails = "team_invite_details"
357 ActionDetailsTeamJoinDetails = "team_join_details"
358 ActionDetailsOther = "other"
359 )
360
361 // UnmarshalJSON deserializes into a ActionDetails instance
362 func (u *ActionDetails) UnmarshalJSON(body []byte) error {
363 type wrap struct {
364 dropbox.Tagged
365 // RemoveAction : Define how the user was removed from the team.
366 RemoveAction *MemberRemoveActionType `json:"remove_action,omitempty"`
367 }
368 var w wrap
369 var err error
370 if err = json.Unmarshal(body, &w); err != nil {
371 return err
372 }
373 u.Tag = w.Tag
374 switch u.Tag {
375 case "remove_action":
376 u.RemoveAction = w.RemoveAction
377
378 if err != nil {
379 return err
380 }
381 case "team_invite_details":
382 err = json.Unmarshal(body, &u.TeamInviteDetails)
383
384 if err != nil {
385 return err
386 }
387 case "team_join_details":
388 err = json.Unmarshal(body, &u.TeamJoinDetails)
389
390 if err != nil {
391 return err
392 }
393 }
394 return nil
395 }
396
397 // ActorLogInfo : The entity who performed the action.
398 type ActorLogInfo struct {
399 dropbox.Tagged
400 // Admin : The admin who did the action.
401 Admin IsUserLogInfo `json:"admin,omitempty"`
402 // App : The application who did the action.
403 App IsAppLogInfo `json:"app,omitempty"`
404 // Reseller : Action done by reseller.
405 Reseller *ResellerLogInfo `json:"reseller,omitempty"`
406 // User : The user who did the action.
407 User IsUserLogInfo `json:"user,omitempty"`
408 }
409
410 // Valid tag values for ActorLogInfo
411 const (
412 ActorLogInfoAdmin = "admin"
413 ActorLogInfoAnonymous = "anonymous"
414 ActorLogInfoApp = "app"
415 ActorLogInfoDropbox = "dropbox"
416 ActorLogInfoReseller = "reseller"
417 ActorLogInfoUser = "user"
418 ActorLogInfoOther = "other"
419 )
420
421 // UnmarshalJSON deserializes into a ActorLogInfo instance
422 func (u *ActorLogInfo) UnmarshalJSON(body []byte) error {
423 type wrap struct {
424 dropbox.Tagged
425 // Admin : The admin who did the action.
426 Admin json.RawMessage `json:"admin,omitempty"`
427 // App : The application who did the action.
428 App json.RawMessage `json:"app,omitempty"`
429 // User : The user who did the action.
430 User json.RawMessage `json:"user,omitempty"`
431 }
432 var w wrap
433 var err error
434 if err = json.Unmarshal(body, &w); err != nil {
435 return err
436 }
437 u.Tag = w.Tag
438 switch u.Tag {
439 case "admin":
440 u.Admin, err = IsUserLogInfoFromJSON(w.Admin)
441
442 if err != nil {
443 return err
444 }
445 case "app":
446 u.App, err = IsAppLogInfoFromJSON(w.App)
447
448 if err != nil {
449 return err
450 }
451 case "reseller":
452 err = json.Unmarshal(body, &u.Reseller)
453
454 if err != nil {
455 return err
456 }
457 case "user":
458 u.User, err = IsUserLogInfoFromJSON(w.User)
459
460 if err != nil {
461 return err
462 }
463 }
464 return nil
465 }
466
467 // AdminAlertCategoryEnum : Alert category
468 type AdminAlertCategoryEnum struct {
469 dropbox.Tagged
470 }
471
472 // Valid tag values for AdminAlertCategoryEnum
473 const (
474 AdminAlertCategoryEnumAccountTakeover = "account_takeover"
475 AdminAlertCategoryEnumDataLossProtection = "data_loss_protection"
476 AdminAlertCategoryEnumInformationGovernance = "information_governance"
477 AdminAlertCategoryEnumMalwareSharing = "malware_sharing"
478 AdminAlertCategoryEnumMassiveFileOperation = "massive_file_operation"
479 AdminAlertCategoryEnumNa = "na"
480 AdminAlertCategoryEnumThreatManagement = "threat_management"
481 AdminAlertCategoryEnumOther = "other"
482 )
483
484 // AdminAlertGeneralStateEnum : Alert state
485 type AdminAlertGeneralStateEnum struct {
486 dropbox.Tagged
487 }
488
489 // Valid tag values for AdminAlertGeneralStateEnum
490 const (
491 AdminAlertGeneralStateEnumActive = "active"
492 AdminAlertGeneralStateEnumDismissed = "dismissed"
493 AdminAlertGeneralStateEnumInProgress = "in_progress"
494 AdminAlertGeneralStateEnumNa = "na"
495 AdminAlertGeneralStateEnumResolved = "resolved"
496 AdminAlertGeneralStateEnumOther = "other"
497 )
498
499 // AdminAlertSeverityEnum : Alert severity
500 type AdminAlertSeverityEnum struct {
501 dropbox.Tagged
502 }
503
504 // Valid tag values for AdminAlertSeverityEnum
505 const (
506 AdminAlertSeverityEnumHigh = "high"
507 AdminAlertSeverityEnumInfo = "info"
508 AdminAlertSeverityEnumLow = "low"
509 AdminAlertSeverityEnumMedium = "medium"
510 AdminAlertSeverityEnumNa = "na"
511 AdminAlertSeverityEnumOther = "other"
512 )
513
514 // AdminAlertingAlertConfiguration : Alert configurations
515 type AdminAlertingAlertConfiguration struct {
516 // AlertState : Alert state.
517 AlertState *AdminAlertingAlertStatePolicy `json:"alert_state,omitempty"`
518 // SensitivityLevel : Sensitivity level.
519 SensitivityLevel *AdminAlertingAlertSensitivity `json:"sensitivity_level,omitempty"`
520 // RecipientsSettings : Recipient settings.
521 RecipientsSettings *RecipientsConfiguration `json:"recipients_settings,omitempty"`
522 }
523
524 // NewAdminAlertingAlertConfiguration returns a new AdminAlertingAlertConfiguration instance
525 func NewAdminAlertingAlertConfiguration() *AdminAlertingAlertConfiguration {
526 s := new(AdminAlertingAlertConfiguration)
527 return s
528 }
529
530 // AdminAlertingAlertSensitivity : Alert sensitivity
531 type AdminAlertingAlertSensitivity struct {
532 dropbox.Tagged
533 }
534
535 // Valid tag values for AdminAlertingAlertSensitivity
536 const (
537 AdminAlertingAlertSensitivityHigh = "high"
538 AdminAlertingAlertSensitivityHighest = "highest"
539 AdminAlertingAlertSensitivityInvalid = "invalid"
540 AdminAlertingAlertSensitivityLow = "low"
541 AdminAlertingAlertSensitivityLowest = "lowest"
542 AdminAlertingAlertSensitivityMedium = "medium"
543 AdminAlertingAlertSensitivityOther = "other"
544 )
545
546 // AdminAlertingAlertStateChangedDetails : Changed an alert state.
547 type AdminAlertingAlertStateChangedDetails struct {
548 // AlertName : Alert name.
549 AlertName string `json:"alert_name"`
550 // AlertSeverity : Alert severity.
551 AlertSeverity *AdminAlertSeverityEnum `json:"alert_severity"`
552 // AlertCategory : Alert category.
553 AlertCategory *AdminAlertCategoryEnum `json:"alert_category"`
554 // AlertInstanceId : Alert ID.
555 AlertInstanceId string `json:"alert_instance_id"`
556 // PreviousValue : Alert state before the change.
557 PreviousValue *AdminAlertGeneralStateEnum `json:"previous_value"`
558 // NewValue : Alert state after the change.
559 NewValue *AdminAlertGeneralStateEnum `json:"new_value"`
560 }
561
562 // NewAdminAlertingAlertStateChangedDetails returns a new AdminAlertingAlertStateChangedDetails instance
563 func NewAdminAlertingAlertStateChangedDetails(AlertName string, AlertSeverity *AdminAlertSeverityEnum, AlertCategory *AdminAlertCategoryEnum, AlertInstanceId string, PreviousValue *AdminAlertGeneralStateEnum, NewValue *AdminAlertGeneralStateEnum) *AdminAlertingAlertStateChangedDetails {
564 s := new(AdminAlertingAlertStateChangedDetails)
565 s.AlertName = AlertName
566 s.AlertSeverity = AlertSeverity
567 s.AlertCategory = AlertCategory
568 s.AlertInstanceId = AlertInstanceId
569 s.PreviousValue = PreviousValue
570 s.NewValue = NewValue
571 return s
572 }
573
574 // AdminAlertingAlertStateChangedType : has no documentation (yet)
575 type AdminAlertingAlertStateChangedType struct {
576 // Description : has no documentation (yet)
577 Description string `json:"description"`
578 }
579
580 // NewAdminAlertingAlertStateChangedType returns a new AdminAlertingAlertStateChangedType instance
581 func NewAdminAlertingAlertStateChangedType(Description string) *AdminAlertingAlertStateChangedType {
582 s := new(AdminAlertingAlertStateChangedType)
583 s.Description = Description
584 return s
585 }
586
587 // AdminAlertingAlertStatePolicy : Policy for controlling whether an alert can
588 // be triggered or not
589 type AdminAlertingAlertStatePolicy struct {
590 dropbox.Tagged
591 }
592
593 // Valid tag values for AdminAlertingAlertStatePolicy
594 const (
595 AdminAlertingAlertStatePolicyOff = "off"
596 AdminAlertingAlertStatePolicyOn = "on"
597 AdminAlertingAlertStatePolicyOther = "other"
598 )
599
600 // AdminAlertingChangedAlertConfigDetails : Changed an alert setting.
601 type AdminAlertingChangedAlertConfigDetails struct {
602 // AlertName : Alert Name.
603 AlertName string `json:"alert_name"`
604 // PreviousAlertConfig : Previous alert configuration.
605 PreviousAlertConfig *AdminAlertingAlertConfiguration `json:"previous_alert_config"`
606 // NewAlertConfig : New alert configuration.
607 NewAlertConfig *AdminAlertingAlertConfiguration `json:"new_alert_config"`
608 }
609
610 // NewAdminAlertingChangedAlertConfigDetails returns a new AdminAlertingChangedAlertConfigDetails instance
611 func NewAdminAlertingChangedAlertConfigDetails(AlertName string, PreviousAlertConfig *AdminAlertingAlertConfiguration, NewAlertConfig *AdminAlertingAlertConfiguration) *AdminAlertingChangedAlertConfigDetails {
612 s := new(AdminAlertingChangedAlertConfigDetails)
613 s.AlertName = AlertName
614 s.PreviousAlertConfig = PreviousAlertConfig
615 s.NewAlertConfig = NewAlertConfig
616 return s
617 }
618
619 // AdminAlertingChangedAlertConfigType : has no documentation (yet)
620 type AdminAlertingChangedAlertConfigType struct {
621 // Description : has no documentation (yet)
622 Description string `json:"description"`
623 }
624
625 // NewAdminAlertingChangedAlertConfigType returns a new AdminAlertingChangedAlertConfigType instance
626 func NewAdminAlertingChangedAlertConfigType(Description string) *AdminAlertingChangedAlertConfigType {
627 s := new(AdminAlertingChangedAlertConfigType)
628 s.Description = Description
629 return s
630 }
631
632 // AdminAlertingTriggeredAlertDetails : Triggered security alert.
633 type AdminAlertingTriggeredAlertDetails struct {
634 // AlertName : Alert name.
635 AlertName string `json:"alert_name"`
636 // AlertSeverity : Alert severity.
637 AlertSeverity *AdminAlertSeverityEnum `json:"alert_severity"`
638 // AlertCategory : Alert category.
639 AlertCategory *AdminAlertCategoryEnum `json:"alert_category"`
640 // AlertInstanceId : Alert ID.
641 AlertInstanceId string `json:"alert_instance_id"`
642 }
643
644 // NewAdminAlertingTriggeredAlertDetails returns a new AdminAlertingTriggeredAlertDetails instance
645 func NewAdminAlertingTriggeredAlertDetails(AlertName string, AlertSeverity *AdminAlertSeverityEnum, AlertCategory *AdminAlertCategoryEnum, AlertInstanceId string) *AdminAlertingTriggeredAlertDetails {
646 s := new(AdminAlertingTriggeredAlertDetails)
647 s.AlertName = AlertName
648 s.AlertSeverity = AlertSeverity
649 s.AlertCategory = AlertCategory
650 s.AlertInstanceId = AlertInstanceId
651 return s
652 }
653
654 // AdminAlertingTriggeredAlertType : has no documentation (yet)
655 type AdminAlertingTriggeredAlertType struct {
656 // Description : has no documentation (yet)
657 Description string `json:"description"`
658 }
659
660 // NewAdminAlertingTriggeredAlertType returns a new AdminAlertingTriggeredAlertType instance
661 func NewAdminAlertingTriggeredAlertType(Description string) *AdminAlertingTriggeredAlertType {
662 s := new(AdminAlertingTriggeredAlertType)
663 s.Description = Description
664 return s
665 }
666
667 // AdminConsoleAppPermission : has no documentation (yet)
668 type AdminConsoleAppPermission struct {
669 dropbox.Tagged
670 }
671
672 // Valid tag values for AdminConsoleAppPermission
673 const (
674 AdminConsoleAppPermissionDefaultForListedApps = "default_for_listed_apps"
675 AdminConsoleAppPermissionDefaultForUnlistedApps = "default_for_unlisted_apps"
676 AdminConsoleAppPermissionOther = "other"
677 )
678
679 // AdminConsoleAppPolicy : has no documentation (yet)
680 type AdminConsoleAppPolicy struct {
681 dropbox.Tagged
682 }
683
684 // Valid tag values for AdminConsoleAppPolicy
685 const (
686 AdminConsoleAppPolicyAllow = "allow"
687 AdminConsoleAppPolicyBlock = "block"
688 AdminConsoleAppPolicyDefault = "default"
689 AdminConsoleAppPolicyOther = "other"
690 )
691
692 // AdminRole : has no documentation (yet)
693 type AdminRole struct {
694 dropbox.Tagged
695 }
696
697 // Valid tag values for AdminRole
698 const (
699 AdminRoleBillingAdmin = "billing_admin"
700 AdminRoleComplianceAdmin = "compliance_admin"
701 AdminRoleContentAdmin = "content_admin"
702 AdminRoleLimitedAdmin = "limited_admin"
703 AdminRoleMemberOnly = "member_only"
704 AdminRoleReportingAdmin = "reporting_admin"
705 AdminRoleSecurityAdmin = "security_admin"
706 AdminRoleSupportAdmin = "support_admin"
707 AdminRoleTeamAdmin = "team_admin"
708 AdminRoleUserManagementAdmin = "user_management_admin"
709 AdminRoleOther = "other"
710 )
711
712 // AlertRecipientsSettingType : Alert recipients setting type
713 type AlertRecipientsSettingType struct {
714 dropbox.Tagged
715 }
716
717 // Valid tag values for AlertRecipientsSettingType
718 const (
719 AlertRecipientsSettingTypeCustomList = "custom_list"
720 AlertRecipientsSettingTypeInvalid = "invalid"
721 AlertRecipientsSettingTypeNone = "none"
722 AlertRecipientsSettingTypeTeamAdmins = "team_admins"
723 AlertRecipientsSettingTypeOther = "other"
724 )
725
726 // AllowDownloadDisabledDetails : Disabled downloads.
727 type AllowDownloadDisabledDetails struct {
728 }
729
730 // NewAllowDownloadDisabledDetails returns a new AllowDownloadDisabledDetails instance
731 func NewAllowDownloadDisabledDetails() *AllowDownloadDisabledDetails {
732 s := new(AllowDownloadDisabledDetails)
733 return s
734 }
735
736 // AllowDownloadDisabledType : has no documentation (yet)
737 type AllowDownloadDisabledType struct {
738 // Description : has no documentation (yet)
739 Description string `json:"description"`
740 }
741
742 // NewAllowDownloadDisabledType returns a new AllowDownloadDisabledType instance
743 func NewAllowDownloadDisabledType(Description string) *AllowDownloadDisabledType {
744 s := new(AllowDownloadDisabledType)
745 s.Description = Description
746 return s
747 }
748
749 // AllowDownloadEnabledDetails : Enabled downloads.
750 type AllowDownloadEnabledDetails struct {
751 }
752
753 // NewAllowDownloadEnabledDetails returns a new AllowDownloadEnabledDetails instance
754 func NewAllowDownloadEnabledDetails() *AllowDownloadEnabledDetails {
755 s := new(AllowDownloadEnabledDetails)
756 return s
757 }
758
759 // AllowDownloadEnabledType : has no documentation (yet)
760 type AllowDownloadEnabledType struct {
761 // Description : has no documentation (yet)
762 Description string `json:"description"`
763 }
764
765 // NewAllowDownloadEnabledType returns a new AllowDownloadEnabledType instance
766 func NewAllowDownloadEnabledType(Description string) *AllowDownloadEnabledType {
767 s := new(AllowDownloadEnabledType)
768 s.Description = Description
769 return s
770 }
771
772 // ApiSessionLogInfo : Api session.
773 type ApiSessionLogInfo struct {
774 // RequestId : Api request ID.
775 RequestId string `json:"request_id"`
776 }
777
778 // NewApiSessionLogInfo returns a new ApiSessionLogInfo instance
779 func NewApiSessionLogInfo(RequestId string) *ApiSessionLogInfo {
780 s := new(ApiSessionLogInfo)
781 s.RequestId = RequestId
782 return s
783 }
784
785 // AppBlockedByPermissionsDetails : Failed to connect app for member.
786 type AppBlockedByPermissionsDetails struct {
787 // AppInfo : Relevant application details.
788 AppInfo IsAppLogInfo `json:"app_info"`
789 }
790
791 // NewAppBlockedByPermissionsDetails returns a new AppBlockedByPermissionsDetails instance
792 func NewAppBlockedByPermissionsDetails(AppInfo IsAppLogInfo) *AppBlockedByPermissionsDetails {
793 s := new(AppBlockedByPermissionsDetails)
794 s.AppInfo = AppInfo
795 return s
796 }
797
798 // UnmarshalJSON deserializes into a AppBlockedByPermissionsDetails instance
799 func (u *AppBlockedByPermissionsDetails) UnmarshalJSON(b []byte) error {
800 type wrap struct {
801 // AppInfo : Relevant application details.
802 AppInfo json.RawMessage `json:"app_info"`
803 }
804 var w wrap
805 if err := json.Unmarshal(b, &w); err != nil {
806 return err
807 }
808 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
809 if err != nil {
810 return err
811 }
812 u.AppInfo = AppInfo
813 return nil
814 }
815
816 // AppBlockedByPermissionsType : has no documentation (yet)
817 type AppBlockedByPermissionsType struct {
818 // Description : has no documentation (yet)
819 Description string `json:"description"`
820 }
821
822 // NewAppBlockedByPermissionsType returns a new AppBlockedByPermissionsType instance
823 func NewAppBlockedByPermissionsType(Description string) *AppBlockedByPermissionsType {
824 s := new(AppBlockedByPermissionsType)
825 s.Description = Description
826 return s
827 }
828
829 // AppLinkTeamDetails : Linked app for team.
830 type AppLinkTeamDetails struct {
831 // AppInfo : Relevant application details.
832 AppInfo IsAppLogInfo `json:"app_info"`
833 }
834
835 // NewAppLinkTeamDetails returns a new AppLinkTeamDetails instance
836 func NewAppLinkTeamDetails(AppInfo IsAppLogInfo) *AppLinkTeamDetails {
837 s := new(AppLinkTeamDetails)
838 s.AppInfo = AppInfo
839 return s
840 }
841
842 // UnmarshalJSON deserializes into a AppLinkTeamDetails instance
843 func (u *AppLinkTeamDetails) UnmarshalJSON(b []byte) error {
844 type wrap struct {
845 // AppInfo : Relevant application details.
846 AppInfo json.RawMessage `json:"app_info"`
847 }
848 var w wrap
849 if err := json.Unmarshal(b, &w); err != nil {
850 return err
851 }
852 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
853 if err != nil {
854 return err
855 }
856 u.AppInfo = AppInfo
857 return nil
858 }
859
860 // AppLinkTeamType : has no documentation (yet)
861 type AppLinkTeamType struct {
862 // Description : has no documentation (yet)
863 Description string `json:"description"`
864 }
865
866 // NewAppLinkTeamType returns a new AppLinkTeamType instance
867 func NewAppLinkTeamType(Description string) *AppLinkTeamType {
868 s := new(AppLinkTeamType)
869 s.Description = Description
870 return s
871 }
872
873 // AppLinkUserDetails : Linked app for member.
874 type AppLinkUserDetails struct {
875 // AppInfo : Relevant application details.
876 AppInfo IsAppLogInfo `json:"app_info"`
877 }
878
879 // NewAppLinkUserDetails returns a new AppLinkUserDetails instance
880 func NewAppLinkUserDetails(AppInfo IsAppLogInfo) *AppLinkUserDetails {
881 s := new(AppLinkUserDetails)
882 s.AppInfo = AppInfo
883 return s
884 }
885
886 // UnmarshalJSON deserializes into a AppLinkUserDetails instance
887 func (u *AppLinkUserDetails) UnmarshalJSON(b []byte) error {
888 type wrap struct {
889 // AppInfo : Relevant application details.
890 AppInfo json.RawMessage `json:"app_info"`
891 }
892 var w wrap
893 if err := json.Unmarshal(b, &w); err != nil {
894 return err
895 }
896 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
897 if err != nil {
898 return err
899 }
900 u.AppInfo = AppInfo
901 return nil
902 }
903
904 // AppLinkUserType : has no documentation (yet)
905 type AppLinkUserType struct {
906 // Description : has no documentation (yet)
907 Description string `json:"description"`
908 }
909
910 // NewAppLinkUserType returns a new AppLinkUserType instance
911 func NewAppLinkUserType(Description string) *AppLinkUserType {
912 s := new(AppLinkUserType)
913 s.Description = Description
914 return s
915 }
916
917 // AppLogInfo : App's logged information.
918 type AppLogInfo struct {
919 // AppId : App unique ID.
920 AppId string `json:"app_id,omitempty"`
921 // DisplayName : App display name.
922 DisplayName string `json:"display_name,omitempty"`
923 }
924
925 // NewAppLogInfo returns a new AppLogInfo instance
926 func NewAppLogInfo() *AppLogInfo {
927 s := new(AppLogInfo)
928 return s
929 }
930
931 // IsAppLogInfo is the interface type for AppLogInfo and its subtypes
932 type IsAppLogInfo interface {
933 IsAppLogInfo()
934 }
935
936 // IsAppLogInfo implements the IsAppLogInfo interface
937 func (u *AppLogInfo) IsAppLogInfo() {}
938
939 type appLogInfoUnion struct {
940 dropbox.Tagged
941 // UserOrTeamLinkedApp : has no documentation (yet)
942 UserOrTeamLinkedApp *UserOrTeamLinkedAppLogInfo `json:"user_or_team_linked_app,omitempty"`
943 // UserLinkedApp : has no documentation (yet)
944 UserLinkedApp *UserLinkedAppLogInfo `json:"user_linked_app,omitempty"`
945 // TeamLinkedApp : has no documentation (yet)
946 TeamLinkedApp *TeamLinkedAppLogInfo `json:"team_linked_app,omitempty"`
947 }
948
949 // Valid tag values for AppLogInfo
950 const (
951 AppLogInfoUserOrTeamLinkedApp = "user_or_team_linked_app"
952 AppLogInfoUserLinkedApp = "user_linked_app"
953 AppLogInfoTeamLinkedApp = "team_linked_app"
954 )
955
956 // UnmarshalJSON deserializes into a appLogInfoUnion instance
957 func (u *appLogInfoUnion) UnmarshalJSON(body []byte) error {
958 type wrap struct {
959 dropbox.Tagged
960 }
961 var w wrap
962 var err error
963 if err = json.Unmarshal(body, &w); err != nil {
964 return err
965 }
966 u.Tag = w.Tag
967 switch u.Tag {
968 case "user_or_team_linked_app":
969 err = json.Unmarshal(body, &u.UserOrTeamLinkedApp)
970
971 if err != nil {
972 return err
973 }
974 case "user_linked_app":
975 err = json.Unmarshal(body, &u.UserLinkedApp)
976
977 if err != nil {
978 return err
979 }
980 case "team_linked_app":
981 err = json.Unmarshal(body, &u.TeamLinkedApp)
982
983 if err != nil {
984 return err
985 }
986 }
987 return nil
988 }
989
990 // IsAppLogInfoFromJSON converts JSON to a concrete IsAppLogInfo instance
991 func IsAppLogInfoFromJSON(data []byte) (IsAppLogInfo, error) {
992 var t appLogInfoUnion
993 if err := json.Unmarshal(data, &t); err != nil {
994 return nil, err
995 }
996 switch t.Tag {
997 case "user_or_team_linked_app":
998 return t.UserOrTeamLinkedApp, nil
999
1000 case "user_linked_app":
1001 return t.UserLinkedApp, nil
1002
1003 case "team_linked_app":
1004 return t.TeamLinkedApp, nil
1005
1006 }
1007 return nil, nil
1008 }
1009
1010 // AppPermissionsChangedDetails : Changed app permissions.
1011 type AppPermissionsChangedDetails struct {
1012 // AppName : Name of the app.
1013 AppName string `json:"app_name,omitempty"`
1014 // Permission : Permission that was changed.
1015 Permission *AdminConsoleAppPermission `json:"permission,omitempty"`
1016 // PreviousValue : Previous policy.
1017 PreviousValue *AdminConsoleAppPolicy `json:"previous_value"`
1018 // NewValue : New policy.
1019 NewValue *AdminConsoleAppPolicy `json:"new_value"`
1020 }
1021
1022 // NewAppPermissionsChangedDetails returns a new AppPermissionsChangedDetails instance
1023 func NewAppPermissionsChangedDetails(PreviousValue *AdminConsoleAppPolicy, NewValue *AdminConsoleAppPolicy) *AppPermissionsChangedDetails {
1024 s := new(AppPermissionsChangedDetails)
1025 s.PreviousValue = PreviousValue
1026 s.NewValue = NewValue
1027 return s
1028 }
1029
1030 // AppPermissionsChangedType : has no documentation (yet)
1031 type AppPermissionsChangedType struct {
1032 // Description : has no documentation (yet)
1033 Description string `json:"description"`
1034 }
1035
1036 // NewAppPermissionsChangedType returns a new AppPermissionsChangedType instance
1037 func NewAppPermissionsChangedType(Description string) *AppPermissionsChangedType {
1038 s := new(AppPermissionsChangedType)
1039 s.Description = Description
1040 return s
1041 }
1042
1043 // AppUnlinkTeamDetails : Unlinked app for team.
1044 type AppUnlinkTeamDetails struct {
1045 // AppInfo : Relevant application details.
1046 AppInfo IsAppLogInfo `json:"app_info"`
1047 }
1048
1049 // NewAppUnlinkTeamDetails returns a new AppUnlinkTeamDetails instance
1050 func NewAppUnlinkTeamDetails(AppInfo IsAppLogInfo) *AppUnlinkTeamDetails {
1051 s := new(AppUnlinkTeamDetails)
1052 s.AppInfo = AppInfo
1053 return s
1054 }
1055
1056 // UnmarshalJSON deserializes into a AppUnlinkTeamDetails instance
1057 func (u *AppUnlinkTeamDetails) UnmarshalJSON(b []byte) error {
1058 type wrap struct {
1059 // AppInfo : Relevant application details.
1060 AppInfo json.RawMessage `json:"app_info"`
1061 }
1062 var w wrap
1063 if err := json.Unmarshal(b, &w); err != nil {
1064 return err
1065 }
1066 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
1067 if err != nil {
1068 return err
1069 }
1070 u.AppInfo = AppInfo
1071 return nil
1072 }
1073
1074 // AppUnlinkTeamType : has no documentation (yet)
1075 type AppUnlinkTeamType struct {
1076 // Description : has no documentation (yet)
1077 Description string `json:"description"`
1078 }
1079
1080 // NewAppUnlinkTeamType returns a new AppUnlinkTeamType instance
1081 func NewAppUnlinkTeamType(Description string) *AppUnlinkTeamType {
1082 s := new(AppUnlinkTeamType)
1083 s.Description = Description
1084 return s
1085 }
1086
1087 // AppUnlinkUserDetails : Unlinked app for member.
1088 type AppUnlinkUserDetails struct {
1089 // AppInfo : Relevant application details.
1090 AppInfo IsAppLogInfo `json:"app_info"`
1091 }
1092
1093 // NewAppUnlinkUserDetails returns a new AppUnlinkUserDetails instance
1094 func NewAppUnlinkUserDetails(AppInfo IsAppLogInfo) *AppUnlinkUserDetails {
1095 s := new(AppUnlinkUserDetails)
1096 s.AppInfo = AppInfo
1097 return s
1098 }
1099
1100 // UnmarshalJSON deserializes into a AppUnlinkUserDetails instance
1101 func (u *AppUnlinkUserDetails) UnmarshalJSON(b []byte) error {
1102 type wrap struct {
1103 // AppInfo : Relevant application details.
1104 AppInfo json.RawMessage `json:"app_info"`
1105 }
1106 var w wrap
1107 if err := json.Unmarshal(b, &w); err != nil {
1108 return err
1109 }
1110 AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo)
1111 if err != nil {
1112 return err
1113 }
1114 u.AppInfo = AppInfo
1115 return nil
1116 }
1117
1118 // AppUnlinkUserType : has no documentation (yet)
1119 type AppUnlinkUserType struct {
1120 // Description : has no documentation (yet)
1121 Description string `json:"description"`
1122 }
1123
1124 // NewAppUnlinkUserType returns a new AppUnlinkUserType instance
1125 func NewAppUnlinkUserType(Description string) *AppUnlinkUserType {
1126 s := new(AppUnlinkUserType)
1127 s.Description = Description
1128 return s
1129 }
1130
1131 // ApplyNamingConventionDetails : Applied a Naming Convention rule.
1132 type ApplyNamingConventionDetails struct {
1133 }
1134
1135 // NewApplyNamingConventionDetails returns a new ApplyNamingConventionDetails instance
1136 func NewApplyNamingConventionDetails() *ApplyNamingConventionDetails {
1137 s := new(ApplyNamingConventionDetails)
1138 return s
1139 }
1140
1141 // ApplyNamingConventionType : has no documentation (yet)
1142 type ApplyNamingConventionType struct {
1143 // Description : has no documentation (yet)
1144 Description string `json:"description"`
1145 }
1146
1147 // NewApplyNamingConventionType returns a new ApplyNamingConventionType instance
1148 func NewApplyNamingConventionType(Description string) *ApplyNamingConventionType {
1149 s := new(ApplyNamingConventionType)
1150 s.Description = Description
1151 return s
1152 }
1153
1154 // AssetLogInfo : Asset details.
1155 type AssetLogInfo struct {
1156 dropbox.Tagged
1157 // File : File's details.
1158 File *FileLogInfo `json:"file,omitempty"`
1159 // Folder : Folder's details.
1160 Folder *FolderLogInfo `json:"folder,omitempty"`
1161 // PaperDocument : Paper document's details.
1162 PaperDocument *PaperDocumentLogInfo `json:"paper_document,omitempty"`
1163 // PaperFolder : Paper folder's details.
1164 PaperFolder *PaperFolderLogInfo `json:"paper_folder,omitempty"`
1165 // ShowcaseDocument : Showcase document's details.
1166 ShowcaseDocument *ShowcaseDocumentLogInfo `json:"showcase_document,omitempty"`
1167 }
1168
1169 // Valid tag values for AssetLogInfo
1170 const (
1171 AssetLogInfoFile = "file"
1172 AssetLogInfoFolder = "folder"
1173 AssetLogInfoPaperDocument = "paper_document"
1174 AssetLogInfoPaperFolder = "paper_folder"
1175 AssetLogInfoShowcaseDocument = "showcase_document"
1176 AssetLogInfoOther = "other"
1177 )
1178
1179 // UnmarshalJSON deserializes into a AssetLogInfo instance
1180 func (u *AssetLogInfo) UnmarshalJSON(body []byte) error {
1181 type wrap struct {
1182 dropbox.Tagged
1183 }
1184 var w wrap
1185 var err error
1186 if err = json.Unmarshal(body, &w); err != nil {
1187 return err
1188 }
1189 u.Tag = w.Tag
1190 switch u.Tag {
1191 case "file":
1192 err = json.Unmarshal(body, &u.File)
1193
1194 if err != nil {
1195 return err
1196 }
1197 case "folder":
1198 err = json.Unmarshal(body, &u.Folder)
1199
1200 if err != nil {
1201 return err
1202 }
1203 case "paper_document":
1204 err = json.Unmarshal(body, &u.PaperDocument)
1205
1206 if err != nil {
1207 return err
1208 }
1209 case "paper_folder":
1210 err = json.Unmarshal(body, &u.PaperFolder)
1211
1212 if err != nil {
1213 return err
1214 }
1215 case "showcase_document":
1216 err = json.Unmarshal(body, &u.ShowcaseDocument)
1217
1218 if err != nil {
1219 return err
1220 }
1221 }
1222 return nil
1223 }
1224
1225 // BackupStatus : Backup status
1226 type BackupStatus struct {
1227 dropbox.Tagged
1228 }
1229
1230 // Valid tag values for BackupStatus
1231 const (
1232 BackupStatusDisabled = "disabled"
1233 BackupStatusEnabled = "enabled"
1234 BackupStatusOther = "other"
1235 )
1236
1237 // BinderAddPageDetails : Added Binder page.
1238 type BinderAddPageDetails struct {
1239 // EventUuid : Event unique identifier.
1240 EventUuid string `json:"event_uuid"`
1241 // DocTitle : Title of the Binder doc.
1242 DocTitle string `json:"doc_title"`
1243 // BinderItemName : Name of the Binder page/section.
1244 BinderItemName string `json:"binder_item_name"`
1245 }
1246
1247 // NewBinderAddPageDetails returns a new BinderAddPageDetails instance
1248 func NewBinderAddPageDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderAddPageDetails {
1249 s := new(BinderAddPageDetails)
1250 s.EventUuid = EventUuid
1251 s.DocTitle = DocTitle
1252 s.BinderItemName = BinderItemName
1253 return s
1254 }
1255
1256 // BinderAddPageType : has no documentation (yet)
1257 type BinderAddPageType struct {
1258 // Description : has no documentation (yet)
1259 Description string `json:"description"`
1260 }
1261
1262 // NewBinderAddPageType returns a new BinderAddPageType instance
1263 func NewBinderAddPageType(Description string) *BinderAddPageType {
1264 s := new(BinderAddPageType)
1265 s.Description = Description
1266 return s
1267 }
1268
1269 // BinderAddSectionDetails : Added Binder section.
1270 type BinderAddSectionDetails struct {
1271 // EventUuid : Event unique identifier.
1272 EventUuid string `json:"event_uuid"`
1273 // DocTitle : Title of the Binder doc.
1274 DocTitle string `json:"doc_title"`
1275 // BinderItemName : Name of the Binder page/section.
1276 BinderItemName string `json:"binder_item_name"`
1277 }
1278
1279 // NewBinderAddSectionDetails returns a new BinderAddSectionDetails instance
1280 func NewBinderAddSectionDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderAddSectionDetails {
1281 s := new(BinderAddSectionDetails)
1282 s.EventUuid = EventUuid
1283 s.DocTitle = DocTitle
1284 s.BinderItemName = BinderItemName
1285 return s
1286 }
1287
1288 // BinderAddSectionType : has no documentation (yet)
1289 type BinderAddSectionType struct {
1290 // Description : has no documentation (yet)
1291 Description string `json:"description"`
1292 }
1293
1294 // NewBinderAddSectionType returns a new BinderAddSectionType instance
1295 func NewBinderAddSectionType(Description string) *BinderAddSectionType {
1296 s := new(BinderAddSectionType)
1297 s.Description = Description
1298 return s
1299 }
1300
1301 // BinderRemovePageDetails : Removed Binder page.
1302 type BinderRemovePageDetails struct {
1303 // EventUuid : Event unique identifier.
1304 EventUuid string `json:"event_uuid"`
1305 // DocTitle : Title of the Binder doc.
1306 DocTitle string `json:"doc_title"`
1307 // BinderItemName : Name of the Binder page/section.
1308 BinderItemName string `json:"binder_item_name"`
1309 }
1310
1311 // NewBinderRemovePageDetails returns a new BinderRemovePageDetails instance
1312 func NewBinderRemovePageDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderRemovePageDetails {
1313 s := new(BinderRemovePageDetails)
1314 s.EventUuid = EventUuid
1315 s.DocTitle = DocTitle
1316 s.BinderItemName = BinderItemName
1317 return s
1318 }
1319
1320 // BinderRemovePageType : has no documentation (yet)
1321 type BinderRemovePageType struct {
1322 // Description : has no documentation (yet)
1323 Description string `json:"description"`
1324 }
1325
1326 // NewBinderRemovePageType returns a new BinderRemovePageType instance
1327 func NewBinderRemovePageType(Description string) *BinderRemovePageType {
1328 s := new(BinderRemovePageType)
1329 s.Description = Description
1330 return s
1331 }
1332
1333 // BinderRemoveSectionDetails : Removed Binder section.
1334 type BinderRemoveSectionDetails struct {
1335 // EventUuid : Event unique identifier.
1336 EventUuid string `json:"event_uuid"`
1337 // DocTitle : Title of the Binder doc.
1338 DocTitle string `json:"doc_title"`
1339 // BinderItemName : Name of the Binder page/section.
1340 BinderItemName string `json:"binder_item_name"`
1341 }
1342
1343 // NewBinderRemoveSectionDetails returns a new BinderRemoveSectionDetails instance
1344 func NewBinderRemoveSectionDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderRemoveSectionDetails {
1345 s := new(BinderRemoveSectionDetails)
1346 s.EventUuid = EventUuid
1347 s.DocTitle = DocTitle
1348 s.BinderItemName = BinderItemName
1349 return s
1350 }
1351
1352 // BinderRemoveSectionType : has no documentation (yet)
1353 type BinderRemoveSectionType struct {
1354 // Description : has no documentation (yet)
1355 Description string `json:"description"`
1356 }
1357
1358 // NewBinderRemoveSectionType returns a new BinderRemoveSectionType instance
1359 func NewBinderRemoveSectionType(Description string) *BinderRemoveSectionType {
1360 s := new(BinderRemoveSectionType)
1361 s.Description = Description
1362 return s
1363 }
1364
1365 // BinderRenamePageDetails : Renamed Binder page.
1366 type BinderRenamePageDetails struct {
1367 // EventUuid : Event unique identifier.
1368 EventUuid string `json:"event_uuid"`
1369 // DocTitle : Title of the Binder doc.
1370 DocTitle string `json:"doc_title"`
1371 // BinderItemName : Name of the Binder page/section.
1372 BinderItemName string `json:"binder_item_name"`
1373 // PreviousBinderItemName : Previous name of the Binder page/section.
1374 PreviousBinderItemName string `json:"previous_binder_item_name,omitempty"`
1375 }
1376
1377 // NewBinderRenamePageDetails returns a new BinderRenamePageDetails instance
1378 func NewBinderRenamePageDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderRenamePageDetails {
1379 s := new(BinderRenamePageDetails)
1380 s.EventUuid = EventUuid
1381 s.DocTitle = DocTitle
1382 s.BinderItemName = BinderItemName
1383 return s
1384 }
1385
1386 // BinderRenamePageType : has no documentation (yet)
1387 type BinderRenamePageType struct {
1388 // Description : has no documentation (yet)
1389 Description string `json:"description"`
1390 }
1391
1392 // NewBinderRenamePageType returns a new BinderRenamePageType instance
1393 func NewBinderRenamePageType(Description string) *BinderRenamePageType {
1394 s := new(BinderRenamePageType)
1395 s.Description = Description
1396 return s
1397 }
1398
1399 // BinderRenameSectionDetails : Renamed Binder section.
1400 type BinderRenameSectionDetails struct {
1401 // EventUuid : Event unique identifier.
1402 EventUuid string `json:"event_uuid"`
1403 // DocTitle : Title of the Binder doc.
1404 DocTitle string `json:"doc_title"`
1405 // BinderItemName : Name of the Binder page/section.
1406 BinderItemName string `json:"binder_item_name"`
1407 // PreviousBinderItemName : Previous name of the Binder page/section.
1408 PreviousBinderItemName string `json:"previous_binder_item_name,omitempty"`
1409 }
1410
1411 // NewBinderRenameSectionDetails returns a new BinderRenameSectionDetails instance
1412 func NewBinderRenameSectionDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderRenameSectionDetails {
1413 s := new(BinderRenameSectionDetails)
1414 s.EventUuid = EventUuid
1415 s.DocTitle = DocTitle
1416 s.BinderItemName = BinderItemName
1417 return s
1418 }
1419
1420 // BinderRenameSectionType : has no documentation (yet)
1421 type BinderRenameSectionType struct {
1422 // Description : has no documentation (yet)
1423 Description string `json:"description"`
1424 }
1425
1426 // NewBinderRenameSectionType returns a new BinderRenameSectionType instance
1427 func NewBinderRenameSectionType(Description string) *BinderRenameSectionType {
1428 s := new(BinderRenameSectionType)
1429 s.Description = Description
1430 return s
1431 }
1432
1433 // BinderReorderPageDetails : Reordered Binder page.
1434 type BinderReorderPageDetails struct {
1435 // EventUuid : Event unique identifier.
1436 EventUuid string `json:"event_uuid"`
1437 // DocTitle : Title of the Binder doc.
1438 DocTitle string `json:"doc_title"`
1439 // BinderItemName : Name of the Binder page/section.
1440 BinderItemName string `json:"binder_item_name"`
1441 }
1442
1443 // NewBinderReorderPageDetails returns a new BinderReorderPageDetails instance
1444 func NewBinderReorderPageDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderReorderPageDetails {
1445 s := new(BinderReorderPageDetails)
1446 s.EventUuid = EventUuid
1447 s.DocTitle = DocTitle
1448 s.BinderItemName = BinderItemName
1449 return s
1450 }
1451
1452 // BinderReorderPageType : has no documentation (yet)
1453 type BinderReorderPageType struct {
1454 // Description : has no documentation (yet)
1455 Description string `json:"description"`
1456 }
1457
1458 // NewBinderReorderPageType returns a new BinderReorderPageType instance
1459 func NewBinderReorderPageType(Description string) *BinderReorderPageType {
1460 s := new(BinderReorderPageType)
1461 s.Description = Description
1462 return s
1463 }
1464
1465 // BinderReorderSectionDetails : Reordered Binder section.
1466 type BinderReorderSectionDetails struct {
1467 // EventUuid : Event unique identifier.
1468 EventUuid string `json:"event_uuid"`
1469 // DocTitle : Title of the Binder doc.
1470 DocTitle string `json:"doc_title"`
1471 // BinderItemName : Name of the Binder page/section.
1472 BinderItemName string `json:"binder_item_name"`
1473 }
1474
1475 // NewBinderReorderSectionDetails returns a new BinderReorderSectionDetails instance
1476 func NewBinderReorderSectionDetails(EventUuid string, DocTitle string, BinderItemName string) *BinderReorderSectionDetails {
1477 s := new(BinderReorderSectionDetails)
1478 s.EventUuid = EventUuid
1479 s.DocTitle = DocTitle
1480 s.BinderItemName = BinderItemName
1481 return s
1482 }
1483
1484 // BinderReorderSectionType : has no documentation (yet)
1485 type BinderReorderSectionType struct {
1486 // Description : has no documentation (yet)
1487 Description string `json:"description"`
1488 }
1489
1490 // NewBinderReorderSectionType returns a new BinderReorderSectionType instance
1491 func NewBinderReorderSectionType(Description string) *BinderReorderSectionType {
1492 s := new(BinderReorderSectionType)
1493 s.Description = Description
1494 return s
1495 }
1496
1497 // CameraUploadsPolicy : Policy for controlling if team members can activate
1498 // camera uploads
1499 type CameraUploadsPolicy struct {
1500 dropbox.Tagged
1501 }
1502
1503 // Valid tag values for CameraUploadsPolicy
1504 const (
1505 CameraUploadsPolicyDisabled = "disabled"
1506 CameraUploadsPolicyEnabled = "enabled"
1507 CameraUploadsPolicyOther = "other"
1508 )
1509
1510 // CameraUploadsPolicyChangedDetails : Changed camera uploads setting for team.
1511 type CameraUploadsPolicyChangedDetails struct {
1512 // NewValue : New camera uploads setting.
1513 NewValue *CameraUploadsPolicy `json:"new_value"`
1514 // PreviousValue : Previous camera uploads setting.
1515 PreviousValue *CameraUploadsPolicy `json:"previous_value"`
1516 }
1517
1518 // NewCameraUploadsPolicyChangedDetails returns a new CameraUploadsPolicyChangedDetails instance
1519 func NewCameraUploadsPolicyChangedDetails(NewValue *CameraUploadsPolicy, PreviousValue *CameraUploadsPolicy) *CameraUploadsPolicyChangedDetails {
1520 s := new(CameraUploadsPolicyChangedDetails)
1521 s.NewValue = NewValue
1522 s.PreviousValue = PreviousValue
1523 return s
1524 }
1525
1526 // CameraUploadsPolicyChangedType : has no documentation (yet)
1527 type CameraUploadsPolicyChangedType struct {
1528 // Description : has no documentation (yet)
1529 Description string `json:"description"`
1530 }
1531
1532 // NewCameraUploadsPolicyChangedType returns a new CameraUploadsPolicyChangedType instance
1533 func NewCameraUploadsPolicyChangedType(Description string) *CameraUploadsPolicyChangedType {
1534 s := new(CameraUploadsPolicyChangedType)
1535 s.Description = Description
1536 return s
1537 }
1538
1539 // Certificate : Certificate details.
1540 type Certificate struct {
1541 // Subject : Certificate subject.
1542 Subject string `json:"subject"`
1543 // Issuer : Certificate issuer.
1544 Issuer string `json:"issuer"`
1545 // IssueDate : Certificate issue date.
1546 IssueDate string `json:"issue_date"`
1547 // ExpirationDate : Certificate expiration date.
1548 ExpirationDate string `json:"expiration_date"`
1549 // SerialNumber : Certificate serial number.
1550 SerialNumber string `json:"serial_number"`
1551 // Sha1Fingerprint : Certificate sha1 fingerprint.
1552 Sha1Fingerprint string `json:"sha1_fingerprint"`
1553 // CommonName : Certificate common name.
1554 CommonName string `json:"common_name,omitempty"`
1555 }
1556
1557 // NewCertificate returns a new Certificate instance
1558 func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationDate string, SerialNumber string, Sha1Fingerprint string) *Certificate {
1559 s := new(Certificate)
1560 s.Subject = Subject
1561 s.Issuer = Issuer
1562 s.IssueDate = IssueDate
1563 s.ExpirationDate = ExpirationDate
1564 s.SerialNumber = SerialNumber
1565 s.Sha1Fingerprint = Sha1Fingerprint
1566 return s
1567 }
1568
1569 // ChangeLinkExpirationPolicy : Policy for deciding whether the team's default
1570 // expiration days policy must be enforced when an externally shared is updated
1571 type ChangeLinkExpirationPolicy struct {
1572 dropbox.Tagged
1573 }
1574
1575 // Valid tag values for ChangeLinkExpirationPolicy
1576 const (
1577 ChangeLinkExpirationPolicyAllowed = "allowed"
1578 ChangeLinkExpirationPolicyNotAllowed = "not_allowed"
1579 ChangeLinkExpirationPolicyOther = "other"
1580 )
1581
1582 // ChangedEnterpriseAdminRoleDetails : Changed enterprise admin role.
1583 type ChangedEnterpriseAdminRoleDetails struct {
1584 // PreviousValue : The member&#x2019s previous enterprise admin role.
1585 PreviousValue *FedAdminRole `json:"previous_value"`
1586 // NewValue : The member&#x2019s new enterprise admin role.
1587 NewValue *FedAdminRole `json:"new_value"`
1588 // TeamName : The name of the member&#x2019s team.
1589 TeamName string `json:"team_name"`
1590 }
1591
1592 // NewChangedEnterpriseAdminRoleDetails returns a new ChangedEnterpriseAdminRoleDetails instance
1593 func NewChangedEnterpriseAdminRoleDetails(PreviousValue *FedAdminRole, NewValue *FedAdminRole, TeamName string) *ChangedEnterpriseAdminRoleDetails {
1594 s := new(ChangedEnterpriseAdminRoleDetails)
1595 s.PreviousValue = PreviousValue
1596 s.NewValue = NewValue
1597 s.TeamName = TeamName
1598 return s
1599 }
1600
1601 // ChangedEnterpriseAdminRoleType : has no documentation (yet)
1602 type ChangedEnterpriseAdminRoleType struct {
1603 // Description : has no documentation (yet)
1604 Description string `json:"description"`
1605 }
1606
1607 // NewChangedEnterpriseAdminRoleType returns a new ChangedEnterpriseAdminRoleType instance
1608 func NewChangedEnterpriseAdminRoleType(Description string) *ChangedEnterpriseAdminRoleType {
1609 s := new(ChangedEnterpriseAdminRoleType)
1610 s.Description = Description
1611 return s
1612 }
1613
1614 // ChangedEnterpriseConnectedTeamStatusDetails : Changed enterprise-connected
1615 // team status.
1616 type ChangedEnterpriseConnectedTeamStatusDetails struct {
1617 // Action : The preformed change in the team&#x2019s connection status.
1618 Action *FedHandshakeAction `json:"action"`
1619 // AdditionalInfo : Additional information about the organization or team.
1620 AdditionalInfo *FederationStatusChangeAdditionalInfo `json:"additional_info"`
1621 // PreviousValue : Previous request state.
1622 PreviousValue *TrustedTeamsRequestState `json:"previous_value"`
1623 // NewValue : New request state.
1624 NewValue *TrustedTeamsRequestState `json:"new_value"`
1625 }
1626
1627 // NewChangedEnterpriseConnectedTeamStatusDetails returns a new ChangedEnterpriseConnectedTeamStatusDetails instance
1628 func NewChangedEnterpriseConnectedTeamStatusDetails(Action *FedHandshakeAction, AdditionalInfo *FederationStatusChangeAdditionalInfo, PreviousValue *TrustedTeamsRequestState, NewValue *TrustedTeamsRequestState) *ChangedEnterpriseConnectedTeamStatusDetails {
1629 s := new(ChangedEnterpriseConnectedTeamStatusDetails)
1630 s.Action = Action
1631 s.AdditionalInfo = AdditionalInfo
1632 s.PreviousValue = PreviousValue
1633 s.NewValue = NewValue
1634 return s
1635 }
1636
1637 // ChangedEnterpriseConnectedTeamStatusType : has no documentation (yet)
1638 type ChangedEnterpriseConnectedTeamStatusType struct {
1639 // Description : has no documentation (yet)
1640 Description string `json:"description"`
1641 }
1642
1643 // NewChangedEnterpriseConnectedTeamStatusType returns a new ChangedEnterpriseConnectedTeamStatusType instance
1644 func NewChangedEnterpriseConnectedTeamStatusType(Description string) *ChangedEnterpriseConnectedTeamStatusType {
1645 s := new(ChangedEnterpriseConnectedTeamStatusType)
1646 s.Description = Description
1647 return s
1648 }
1649
1650 // ClassificationChangePolicyDetails : Changed classification policy for team.
1651 type ClassificationChangePolicyDetails struct {
1652 // PreviousValue : Previous classification policy.
1653 PreviousValue *ClassificationPolicyEnumWrapper `json:"previous_value"`
1654 // NewValue : New classification policy.
1655 NewValue *ClassificationPolicyEnumWrapper `json:"new_value"`
1656 // ClassificationType : Policy type.
1657 ClassificationType *ClassificationType `json:"classification_type"`
1658 }
1659
1660 // NewClassificationChangePolicyDetails returns a new ClassificationChangePolicyDetails instance
1661 func NewClassificationChangePolicyDetails(PreviousValue *ClassificationPolicyEnumWrapper, NewValue *ClassificationPolicyEnumWrapper, ClassificationType *ClassificationType) *ClassificationChangePolicyDetails {
1662 s := new(ClassificationChangePolicyDetails)
1663 s.PreviousValue = PreviousValue
1664 s.NewValue = NewValue
1665 s.ClassificationType = ClassificationType
1666 return s
1667 }
1668
1669 // ClassificationChangePolicyType : has no documentation (yet)
1670 type ClassificationChangePolicyType struct {
1671 // Description : has no documentation (yet)
1672 Description string `json:"description"`
1673 }
1674
1675 // NewClassificationChangePolicyType returns a new ClassificationChangePolicyType instance
1676 func NewClassificationChangePolicyType(Description string) *ClassificationChangePolicyType {
1677 s := new(ClassificationChangePolicyType)
1678 s.Description = Description
1679 return s
1680 }
1681
1682 // ClassificationCreateReportDetails : Created Classification report.
1683 type ClassificationCreateReportDetails struct {
1684 }
1685
1686 // NewClassificationCreateReportDetails returns a new ClassificationCreateReportDetails instance
1687 func NewClassificationCreateReportDetails() *ClassificationCreateReportDetails {
1688 s := new(ClassificationCreateReportDetails)
1689 return s
1690 }
1691
1692 // ClassificationCreateReportFailDetails : Couldn't create Classification
1693 // report.
1694 type ClassificationCreateReportFailDetails struct {
1695 // FailureReason : Failure reason.
1696 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
1697 }
1698
1699 // NewClassificationCreateReportFailDetails returns a new ClassificationCreateReportFailDetails instance
1700 func NewClassificationCreateReportFailDetails(FailureReason *team.TeamReportFailureReason) *ClassificationCreateReportFailDetails {
1701 s := new(ClassificationCreateReportFailDetails)
1702 s.FailureReason = FailureReason
1703 return s
1704 }
1705
1706 // ClassificationCreateReportFailType : has no documentation (yet)
1707 type ClassificationCreateReportFailType struct {
1708 // Description : has no documentation (yet)
1709 Description string `json:"description"`
1710 }
1711
1712 // NewClassificationCreateReportFailType returns a new ClassificationCreateReportFailType instance
1713 func NewClassificationCreateReportFailType(Description string) *ClassificationCreateReportFailType {
1714 s := new(ClassificationCreateReportFailType)
1715 s.Description = Description
1716 return s
1717 }
1718
1719 // ClassificationCreateReportType : has no documentation (yet)
1720 type ClassificationCreateReportType struct {
1721 // Description : has no documentation (yet)
1722 Description string `json:"description"`
1723 }
1724
1725 // NewClassificationCreateReportType returns a new ClassificationCreateReportType instance
1726 func NewClassificationCreateReportType(Description string) *ClassificationCreateReportType {
1727 s := new(ClassificationCreateReportType)
1728 s.Description = Description
1729 return s
1730 }
1731
1732 // ClassificationPolicyEnumWrapper : Policy for controlling team access to the
1733 // classification feature
1734 type ClassificationPolicyEnumWrapper struct {
1735 dropbox.Tagged
1736 }
1737
1738 // Valid tag values for ClassificationPolicyEnumWrapper
1739 const (
1740 ClassificationPolicyEnumWrapperDisabled = "disabled"
1741 ClassificationPolicyEnumWrapperEnabled = "enabled"
1742 ClassificationPolicyEnumWrapperMemberAndTeamFolders = "member_and_team_folders"
1743 ClassificationPolicyEnumWrapperTeamFolders = "team_folders"
1744 ClassificationPolicyEnumWrapperOther = "other"
1745 )
1746
1747 // ClassificationType : The type of classification (currently only personal
1748 // information)
1749 type ClassificationType struct {
1750 dropbox.Tagged
1751 }
1752
1753 // Valid tag values for ClassificationType
1754 const (
1755 ClassificationTypePersonalInformation = "personal_information"
1756 ClassificationTypePii = "pii"
1757 ClassificationTypeOther = "other"
1758 )
1759
1760 // CollectionShareDetails : Shared album.
1761 type CollectionShareDetails struct {
1762 // AlbumName : Album name.
1763 AlbumName string `json:"album_name"`
1764 }
1765
1766 // NewCollectionShareDetails returns a new CollectionShareDetails instance
1767 func NewCollectionShareDetails(AlbumName string) *CollectionShareDetails {
1768 s := new(CollectionShareDetails)
1769 s.AlbumName = AlbumName
1770 return s
1771 }
1772
1773 // CollectionShareType : has no documentation (yet)
1774 type CollectionShareType struct {
1775 // Description : has no documentation (yet)
1776 Description string `json:"description"`
1777 }
1778
1779 // NewCollectionShareType returns a new CollectionShareType instance
1780 func NewCollectionShareType(Description string) *CollectionShareType {
1781 s := new(CollectionShareType)
1782 s.Description = Description
1783 return s
1784 }
1785
1786 // ComputerBackupPolicy : Policy for controlling team access to computer backup
1787 // feature
1788 type ComputerBackupPolicy struct {
1789 dropbox.Tagged
1790 }
1791
1792 // Valid tag values for ComputerBackupPolicy
1793 const (
1794 ComputerBackupPolicyDefault = "default"
1795 ComputerBackupPolicyDisabled = "disabled"
1796 ComputerBackupPolicyEnabled = "enabled"
1797 ComputerBackupPolicyOther = "other"
1798 )
1799
1800 // ComputerBackupPolicyChangedDetails : Changed computer backup policy for team.
1801 type ComputerBackupPolicyChangedDetails struct {
1802 // NewValue : New computer backup policy.
1803 NewValue *ComputerBackupPolicy `json:"new_value"`
1804 // PreviousValue : Previous computer backup policy.
1805 PreviousValue *ComputerBackupPolicy `json:"previous_value"`
1806 }
1807
1808 // NewComputerBackupPolicyChangedDetails returns a new ComputerBackupPolicyChangedDetails instance
1809 func NewComputerBackupPolicyChangedDetails(NewValue *ComputerBackupPolicy, PreviousValue *ComputerBackupPolicy) *ComputerBackupPolicyChangedDetails {
1810 s := new(ComputerBackupPolicyChangedDetails)
1811 s.NewValue = NewValue
1812 s.PreviousValue = PreviousValue
1813 return s
1814 }
1815
1816 // ComputerBackupPolicyChangedType : has no documentation (yet)
1817 type ComputerBackupPolicyChangedType struct {
1818 // Description : has no documentation (yet)
1819 Description string `json:"description"`
1820 }
1821
1822 // NewComputerBackupPolicyChangedType returns a new ComputerBackupPolicyChangedType instance
1823 func NewComputerBackupPolicyChangedType(Description string) *ComputerBackupPolicyChangedType {
1824 s := new(ComputerBackupPolicyChangedType)
1825 s.Description = Description
1826 return s
1827 }
1828
1829 // ConnectedTeamName : The name of the team
1830 type ConnectedTeamName struct {
1831 // Team : The name of the team.
1832 Team string `json:"team"`
1833 }
1834
1835 // NewConnectedTeamName returns a new ConnectedTeamName instance
1836 func NewConnectedTeamName(Team string) *ConnectedTeamName {
1837 s := new(ConnectedTeamName)
1838 s.Team = Team
1839 return s
1840 }
1841
1842 // ContentAdministrationPolicyChangedDetails : Changed content management
1843 // setting.
1844 type ContentAdministrationPolicyChangedDetails struct {
1845 // NewValue : New content administration policy.
1846 NewValue string `json:"new_value"`
1847 // PreviousValue : Previous content administration policy.
1848 PreviousValue string `json:"previous_value"`
1849 }
1850
1851 // NewContentAdministrationPolicyChangedDetails returns a new ContentAdministrationPolicyChangedDetails instance
1852 func NewContentAdministrationPolicyChangedDetails(NewValue string, PreviousValue string) *ContentAdministrationPolicyChangedDetails {
1853 s := new(ContentAdministrationPolicyChangedDetails)
1854 s.NewValue = NewValue
1855 s.PreviousValue = PreviousValue
1856 return s
1857 }
1858
1859 // ContentAdministrationPolicyChangedType : has no documentation (yet)
1860 type ContentAdministrationPolicyChangedType struct {
1861 // Description : has no documentation (yet)
1862 Description string `json:"description"`
1863 }
1864
1865 // NewContentAdministrationPolicyChangedType returns a new ContentAdministrationPolicyChangedType instance
1866 func NewContentAdministrationPolicyChangedType(Description string) *ContentAdministrationPolicyChangedType {
1867 s := new(ContentAdministrationPolicyChangedType)
1868 s.Description = Description
1869 return s
1870 }
1871
1872 // ContentPermanentDeletePolicy : Policy for pemanent content deletion
1873 type ContentPermanentDeletePolicy struct {
1874 dropbox.Tagged
1875 }
1876
1877 // Valid tag values for ContentPermanentDeletePolicy
1878 const (
1879 ContentPermanentDeletePolicyDisabled = "disabled"
1880 ContentPermanentDeletePolicyEnabled = "enabled"
1881 ContentPermanentDeletePolicyOther = "other"
1882 )
1883
1884 // ContextLogInfo : The primary entity on which the action was done.
1885 type ContextLogInfo struct {
1886 dropbox.Tagged
1887 // NonTeamMember : Action was done on behalf of a non team member.
1888 NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"`
1889 // OrganizationTeam : Action was done on behalf of a team that's part of an
1890 // organization.
1891 OrganizationTeam *TeamLogInfo `json:"organization_team,omitempty"`
1892 // TeamMember : Action was done on behalf of a team member.
1893 TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"`
1894 // TrustedNonTeamMember : Action was done on behalf of a trusted non team
1895 // member.
1896 TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"`
1897 }
1898
1899 // Valid tag values for ContextLogInfo
1900 const (
1901 ContextLogInfoAnonymous = "anonymous"
1902 ContextLogInfoNonTeamMember = "non_team_member"
1903 ContextLogInfoOrganizationTeam = "organization_team"
1904 ContextLogInfoTeam = "team"
1905 ContextLogInfoTeamMember = "team_member"
1906 ContextLogInfoTrustedNonTeamMember = "trusted_non_team_member"
1907 ContextLogInfoOther = "other"
1908 )
1909
1910 // UnmarshalJSON deserializes into a ContextLogInfo instance
1911 func (u *ContextLogInfo) UnmarshalJSON(body []byte) error {
1912 type wrap struct {
1913 dropbox.Tagged
1914 }
1915 var w wrap
1916 var err error
1917 if err = json.Unmarshal(body, &w); err != nil {
1918 return err
1919 }
1920 u.Tag = w.Tag
1921 switch u.Tag {
1922 case "non_team_member":
1923 err = json.Unmarshal(body, &u.NonTeamMember)
1924
1925 if err != nil {
1926 return err
1927 }
1928 case "organization_team":
1929 err = json.Unmarshal(body, &u.OrganizationTeam)
1930
1931 if err != nil {
1932 return err
1933 }
1934 case "team_member":
1935 err = json.Unmarshal(body, &u.TeamMember)
1936
1937 if err != nil {
1938 return err
1939 }
1940 case "trusted_non_team_member":
1941 err = json.Unmarshal(body, &u.TrustedNonTeamMember)
1942
1943 if err != nil {
1944 return err
1945 }
1946 }
1947 return nil
1948 }
1949
1950 // CreateFolderDetails : Created folders.
1951 type CreateFolderDetails struct {
1952 }
1953
1954 // NewCreateFolderDetails returns a new CreateFolderDetails instance
1955 func NewCreateFolderDetails() *CreateFolderDetails {
1956 s := new(CreateFolderDetails)
1957 return s
1958 }
1959
1960 // CreateFolderType : has no documentation (yet)
1961 type CreateFolderType struct {
1962 // Description : has no documentation (yet)
1963 Description string `json:"description"`
1964 }
1965
1966 // NewCreateFolderType returns a new CreateFolderType instance
1967 func NewCreateFolderType(Description string) *CreateFolderType {
1968 s := new(CreateFolderType)
1969 s.Description = Description
1970 return s
1971 }
1972
1973 // CreateTeamInviteLinkDetails : Created team invite link.
1974 type CreateTeamInviteLinkDetails struct {
1975 // LinkUrl : The invite link url that was created.
1976 LinkUrl string `json:"link_url"`
1977 // ExpiryDate : The expiration date of the invite link.
1978 ExpiryDate string `json:"expiry_date"`
1979 }
1980
1981 // NewCreateTeamInviteLinkDetails returns a new CreateTeamInviteLinkDetails instance
1982 func NewCreateTeamInviteLinkDetails(LinkUrl string, ExpiryDate string) *CreateTeamInviteLinkDetails {
1983 s := new(CreateTeamInviteLinkDetails)
1984 s.LinkUrl = LinkUrl
1985 s.ExpiryDate = ExpiryDate
1986 return s
1987 }
1988
1989 // CreateTeamInviteLinkType : has no documentation (yet)
1990 type CreateTeamInviteLinkType struct {
1991 // Description : has no documentation (yet)
1992 Description string `json:"description"`
1993 }
1994
1995 // NewCreateTeamInviteLinkType returns a new CreateTeamInviteLinkType instance
1996 func NewCreateTeamInviteLinkType(Description string) *CreateTeamInviteLinkType {
1997 s := new(CreateTeamInviteLinkType)
1998 s.Description = Description
1999 return s
2000 }
2001
2002 // DataPlacementRestrictionChangePolicyDetails : Set restrictions on data center
2003 // locations where team data resides.
2004 type DataPlacementRestrictionChangePolicyDetails struct {
2005 // PreviousValue : Previous placement restriction.
2006 PreviousValue *PlacementRestriction `json:"previous_value"`
2007 // NewValue : New placement restriction.
2008 NewValue *PlacementRestriction `json:"new_value"`
2009 }
2010
2011 // NewDataPlacementRestrictionChangePolicyDetails returns a new DataPlacementRestrictionChangePolicyDetails instance
2012 func NewDataPlacementRestrictionChangePolicyDetails(PreviousValue *PlacementRestriction, NewValue *PlacementRestriction) *DataPlacementRestrictionChangePolicyDetails {
2013 s := new(DataPlacementRestrictionChangePolicyDetails)
2014 s.PreviousValue = PreviousValue
2015 s.NewValue = NewValue
2016 return s
2017 }
2018
2019 // DataPlacementRestrictionChangePolicyType : has no documentation (yet)
2020 type DataPlacementRestrictionChangePolicyType struct {
2021 // Description : has no documentation (yet)
2022 Description string `json:"description"`
2023 }
2024
2025 // NewDataPlacementRestrictionChangePolicyType returns a new DataPlacementRestrictionChangePolicyType instance
2026 func NewDataPlacementRestrictionChangePolicyType(Description string) *DataPlacementRestrictionChangePolicyType {
2027 s := new(DataPlacementRestrictionChangePolicyType)
2028 s.Description = Description
2029 return s
2030 }
2031
2032 // DataPlacementRestrictionSatisfyPolicyDetails : Completed restrictions on data
2033 // center locations where team data resides.
2034 type DataPlacementRestrictionSatisfyPolicyDetails struct {
2035 // PlacementRestriction : Placement restriction.
2036 PlacementRestriction *PlacementRestriction `json:"placement_restriction"`
2037 }
2038
2039 // NewDataPlacementRestrictionSatisfyPolicyDetails returns a new DataPlacementRestrictionSatisfyPolicyDetails instance
2040 func NewDataPlacementRestrictionSatisfyPolicyDetails(PlacementRestriction *PlacementRestriction) *DataPlacementRestrictionSatisfyPolicyDetails {
2041 s := new(DataPlacementRestrictionSatisfyPolicyDetails)
2042 s.PlacementRestriction = PlacementRestriction
2043 return s
2044 }
2045
2046 // DataPlacementRestrictionSatisfyPolicyType : has no documentation (yet)
2047 type DataPlacementRestrictionSatisfyPolicyType struct {
2048 // Description : has no documentation (yet)
2049 Description string `json:"description"`
2050 }
2051
2052 // NewDataPlacementRestrictionSatisfyPolicyType returns a new DataPlacementRestrictionSatisfyPolicyType instance
2053 func NewDataPlacementRestrictionSatisfyPolicyType(Description string) *DataPlacementRestrictionSatisfyPolicyType {
2054 s := new(DataPlacementRestrictionSatisfyPolicyType)
2055 s.Description = Description
2056 return s
2057 }
2058
2059 // DefaultLinkExpirationDaysPolicy : Policy for the default number of days until
2060 // an externally shared link expires
2061 type DefaultLinkExpirationDaysPolicy struct {
2062 dropbox.Tagged
2063 }
2064
2065 // Valid tag values for DefaultLinkExpirationDaysPolicy
2066 const (
2067 DefaultLinkExpirationDaysPolicyDay1 = "day_1"
2068 DefaultLinkExpirationDaysPolicyDay180 = "day_180"
2069 DefaultLinkExpirationDaysPolicyDay3 = "day_3"
2070 DefaultLinkExpirationDaysPolicyDay30 = "day_30"
2071 DefaultLinkExpirationDaysPolicyDay7 = "day_7"
2072 DefaultLinkExpirationDaysPolicyDay90 = "day_90"
2073 DefaultLinkExpirationDaysPolicyNone = "none"
2074 DefaultLinkExpirationDaysPolicyYear1 = "year_1"
2075 DefaultLinkExpirationDaysPolicyOther = "other"
2076 )
2077
2078 // DeleteTeamInviteLinkDetails : Deleted team invite link.
2079 type DeleteTeamInviteLinkDetails struct {
2080 // LinkUrl : The invite link url that was deleted.
2081 LinkUrl string `json:"link_url"`
2082 }
2083
2084 // NewDeleteTeamInviteLinkDetails returns a new DeleteTeamInviteLinkDetails instance
2085 func NewDeleteTeamInviteLinkDetails(LinkUrl string) *DeleteTeamInviteLinkDetails {
2086 s := new(DeleteTeamInviteLinkDetails)
2087 s.LinkUrl = LinkUrl
2088 return s
2089 }
2090
2091 // DeleteTeamInviteLinkType : has no documentation (yet)
2092 type DeleteTeamInviteLinkType struct {
2093 // Description : has no documentation (yet)
2094 Description string `json:"description"`
2095 }
2096
2097 // NewDeleteTeamInviteLinkType returns a new DeleteTeamInviteLinkType instance
2098 func NewDeleteTeamInviteLinkType(Description string) *DeleteTeamInviteLinkType {
2099 s := new(DeleteTeamInviteLinkType)
2100 s.Description = Description
2101 return s
2102 }
2103
2104 // DeviceSessionLogInfo : Device's session logged information.
2105 type DeviceSessionLogInfo struct {
2106 // IpAddress : The IP address of the last activity from this session.
2107 IpAddress string `json:"ip_address,omitempty"`
2108 // Created : The time this session was created.
2109 Created *time.Time `json:"created,omitempty"`
2110 // Updated : The time of the last activity from this session.
2111 Updated *time.Time `json:"updated,omitempty"`
2112 }
2113
2114 // NewDeviceSessionLogInfo returns a new DeviceSessionLogInfo instance
2115 func NewDeviceSessionLogInfo() *DeviceSessionLogInfo {
2116 s := new(DeviceSessionLogInfo)
2117 return s
2118 }
2119
2120 // IsDeviceSessionLogInfo is the interface type for DeviceSessionLogInfo and its subtypes
2121 type IsDeviceSessionLogInfo interface {
2122 IsDeviceSessionLogInfo()
2123 }
2124
2125 // IsDeviceSessionLogInfo implements the IsDeviceSessionLogInfo interface
2126 func (u *DeviceSessionLogInfo) IsDeviceSessionLogInfo() {}
2127
2128 type deviceSessionLogInfoUnion struct {
2129 dropbox.Tagged
2130 // DesktopDeviceSession : has no documentation (yet)
2131 DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"`
2132 // MobileDeviceSession : has no documentation (yet)
2133 MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"`
2134 // WebDeviceSession : has no documentation (yet)
2135 WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"`
2136 // LegacyDeviceSession : has no documentation (yet)
2137 LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"`
2138 }
2139
2140 // Valid tag values for DeviceSessionLogInfo
2141 const (
2142 DeviceSessionLogInfoDesktopDeviceSession = "desktop_device_session"
2143 DeviceSessionLogInfoMobileDeviceSession = "mobile_device_session"
2144 DeviceSessionLogInfoWebDeviceSession = "web_device_session"
2145 DeviceSessionLogInfoLegacyDeviceSession = "legacy_device_session"
2146 )
2147
2148 // UnmarshalJSON deserializes into a deviceSessionLogInfoUnion instance
2149 func (u *deviceSessionLogInfoUnion) UnmarshalJSON(body []byte) error {
2150 type wrap struct {
2151 dropbox.Tagged
2152 }
2153 var w wrap
2154 var err error
2155 if err = json.Unmarshal(body, &w); err != nil {
2156 return err
2157 }
2158 u.Tag = w.Tag
2159 switch u.Tag {
2160 case "desktop_device_session":
2161 err = json.Unmarshal(body, &u.DesktopDeviceSession)
2162
2163 if err != nil {
2164 return err
2165 }
2166 case "mobile_device_session":
2167 err = json.Unmarshal(body, &u.MobileDeviceSession)
2168
2169 if err != nil {
2170 return err
2171 }
2172 case "web_device_session":
2173 err = json.Unmarshal(body, &u.WebDeviceSession)
2174
2175 if err != nil {
2176 return err
2177 }
2178 case "legacy_device_session":
2179 err = json.Unmarshal(body, &u.LegacyDeviceSession)
2180
2181 if err != nil {
2182 return err
2183 }
2184 }
2185 return nil
2186 }
2187
2188 // IsDeviceSessionLogInfoFromJSON converts JSON to a concrete IsDeviceSessionLogInfo instance
2189 func IsDeviceSessionLogInfoFromJSON(data []byte) (IsDeviceSessionLogInfo, error) {
2190 var t deviceSessionLogInfoUnion
2191 if err := json.Unmarshal(data, &t); err != nil {
2192 return nil, err
2193 }
2194 switch t.Tag {
2195 case "desktop_device_session":
2196 return t.DesktopDeviceSession, nil
2197
2198 case "mobile_device_session":
2199 return t.MobileDeviceSession, nil
2200
2201 case "web_device_session":
2202 return t.WebDeviceSession, nil
2203
2204 case "legacy_device_session":
2205 return t.LegacyDeviceSession, nil
2206
2207 }
2208 return nil, nil
2209 }
2210
2211 // DesktopDeviceSessionLogInfo : Information about linked Dropbox desktop client
2212 // sessions
2213 type DesktopDeviceSessionLogInfo struct {
2214 DeviceSessionLogInfo
2215 // SessionInfo : Desktop session unique id.
2216 SessionInfo *DesktopSessionLogInfo `json:"session_info,omitempty"`
2217 // HostName : Name of the hosting desktop.
2218 HostName string `json:"host_name"`
2219 // ClientType : The Dropbox desktop client type.
2220 ClientType *team.DesktopPlatform `json:"client_type"`
2221 // ClientVersion : The Dropbox client version.
2222 ClientVersion string `json:"client_version,omitempty"`
2223 // Platform : Information on the hosting platform.
2224 Platform string `json:"platform"`
2225 // IsDeleteOnUnlinkSupported : Whether itu2019s possible to delete all of
2226 // the account files upon unlinking.
2227 IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"`
2228 }
2229
2230 // NewDesktopDeviceSessionLogInfo returns a new DesktopDeviceSessionLogInfo instance
2231 func NewDesktopDeviceSessionLogInfo(HostName string, ClientType *team.DesktopPlatform, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopDeviceSessionLogInfo {
2232 s := new(DesktopDeviceSessionLogInfo)
2233 s.HostName = HostName
2234 s.ClientType = ClientType
2235 s.Platform = Platform
2236 s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported
2237 return s
2238 }
2239
2240 // SessionLogInfo : Session's logged information.
2241 type SessionLogInfo struct {
2242 // SessionId : Session ID.
2243 SessionId string `json:"session_id,omitempty"`
2244 }
2245
2246 // NewSessionLogInfo returns a new SessionLogInfo instance
2247 func NewSessionLogInfo() *SessionLogInfo {
2248 s := new(SessionLogInfo)
2249 return s
2250 }
2251
2252 // IsSessionLogInfo is the interface type for SessionLogInfo and its subtypes
2253 type IsSessionLogInfo interface {
2254 IsSessionLogInfo()
2255 }
2256
2257 // IsSessionLogInfo implements the IsSessionLogInfo interface
2258 func (u *SessionLogInfo) IsSessionLogInfo() {}
2259
2260 type sessionLogInfoUnion struct {
2261 dropbox.Tagged
2262 // Web : has no documentation (yet)
2263 Web *WebSessionLogInfo `json:"web,omitempty"`
2264 // Desktop : has no documentation (yet)
2265 Desktop *DesktopSessionLogInfo `json:"desktop,omitempty"`
2266 // Mobile : has no documentation (yet)
2267 Mobile *MobileSessionLogInfo `json:"mobile,omitempty"`
2268 }
2269
2270 // Valid tag values for SessionLogInfo
2271 const (
2272 SessionLogInfoWeb = "web"
2273 SessionLogInfoDesktop = "desktop"
2274 SessionLogInfoMobile = "mobile"
2275 )
2276
2277 // UnmarshalJSON deserializes into a sessionLogInfoUnion instance
2278 func (u *sessionLogInfoUnion) UnmarshalJSON(body []byte) error {
2279 type wrap struct {
2280 dropbox.Tagged
2281 }
2282 var w wrap
2283 var err error
2284 if err = json.Unmarshal(body, &w); err != nil {
2285 return err
2286 }
2287 u.Tag = w.Tag
2288 switch u.Tag {
2289 case "web":
2290 err = json.Unmarshal(body, &u.Web)
2291
2292 if err != nil {
2293 return err
2294 }
2295 case "desktop":
2296 err = json.Unmarshal(body, &u.Desktop)
2297
2298 if err != nil {
2299 return err
2300 }
2301 case "mobile":
2302 err = json.Unmarshal(body, &u.Mobile)
2303
2304 if err != nil {
2305 return err
2306 }
2307 }
2308 return nil
2309 }
2310
2311 // IsSessionLogInfoFromJSON converts JSON to a concrete IsSessionLogInfo instance
2312 func IsSessionLogInfoFromJSON(data []byte) (IsSessionLogInfo, error) {
2313 var t sessionLogInfoUnion
2314 if err := json.Unmarshal(data, &t); err != nil {
2315 return nil, err
2316 }
2317 switch t.Tag {
2318 case "web":
2319 return t.Web, nil
2320
2321 case "desktop":
2322 return t.Desktop, nil
2323
2324 case "mobile":
2325 return t.Mobile, nil
2326
2327 }
2328 return nil, nil
2329 }
2330
2331 // DesktopSessionLogInfo : Desktop session.
2332 type DesktopSessionLogInfo struct {
2333 SessionLogInfo
2334 }
2335
2336 // NewDesktopSessionLogInfo returns a new DesktopSessionLogInfo instance
2337 func NewDesktopSessionLogInfo() *DesktopSessionLogInfo {
2338 s := new(DesktopSessionLogInfo)
2339 return s
2340 }
2341
2342 // DeviceApprovalsAddExceptionDetails : Added members to device approvals
2343 // exception list.
2344 type DeviceApprovalsAddExceptionDetails struct {
2345 }
2346
2347 // NewDeviceApprovalsAddExceptionDetails returns a new DeviceApprovalsAddExceptionDetails instance
2348 func NewDeviceApprovalsAddExceptionDetails() *DeviceApprovalsAddExceptionDetails {
2349 s := new(DeviceApprovalsAddExceptionDetails)
2350 return s
2351 }
2352
2353 // DeviceApprovalsAddExceptionType : has no documentation (yet)
2354 type DeviceApprovalsAddExceptionType struct {
2355 // Description : has no documentation (yet)
2356 Description string `json:"description"`
2357 }
2358
2359 // NewDeviceApprovalsAddExceptionType returns a new DeviceApprovalsAddExceptionType instance
2360 func NewDeviceApprovalsAddExceptionType(Description string) *DeviceApprovalsAddExceptionType {
2361 s := new(DeviceApprovalsAddExceptionType)
2362 s.Description = Description
2363 return s
2364 }
2365
2366 // DeviceApprovalsChangeDesktopPolicyDetails : Set/removed limit on number of
2367 // computers member can link to team Dropbox account.
2368 type DeviceApprovalsChangeDesktopPolicyDetails struct {
2369 // NewValue : New desktop device approvals policy. Might be missing due to
2370 // historical data gap.
2371 NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"`
2372 // PreviousValue : Previous desktop device approvals policy. Might be
2373 // missing due to historical data gap.
2374 PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"`
2375 }
2376
2377 // NewDeviceApprovalsChangeDesktopPolicyDetails returns a new DeviceApprovalsChangeDesktopPolicyDetails instance
2378 func NewDeviceApprovalsChangeDesktopPolicyDetails() *DeviceApprovalsChangeDesktopPolicyDetails {
2379 s := new(DeviceApprovalsChangeDesktopPolicyDetails)
2380 return s
2381 }
2382
2383 // DeviceApprovalsChangeDesktopPolicyType : has no documentation (yet)
2384 type DeviceApprovalsChangeDesktopPolicyType struct {
2385 // Description : has no documentation (yet)
2386 Description string `json:"description"`
2387 }
2388
2389 // NewDeviceApprovalsChangeDesktopPolicyType returns a new DeviceApprovalsChangeDesktopPolicyType instance
2390 func NewDeviceApprovalsChangeDesktopPolicyType(Description string) *DeviceApprovalsChangeDesktopPolicyType {
2391 s := new(DeviceApprovalsChangeDesktopPolicyType)
2392 s.Description = Description
2393 return s
2394 }
2395
2396 // DeviceApprovalsChangeMobilePolicyDetails : Set/removed limit on number of
2397 // mobile devices member can link to team Dropbox account.
2398 type DeviceApprovalsChangeMobilePolicyDetails struct {
2399 // NewValue : New mobile device approvals policy. Might be missing due to
2400 // historical data gap.
2401 NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"`
2402 // PreviousValue : Previous mobile device approvals policy. Might be missing
2403 // due to historical data gap.
2404 PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"`
2405 }
2406
2407 // NewDeviceApprovalsChangeMobilePolicyDetails returns a new DeviceApprovalsChangeMobilePolicyDetails instance
2408 func NewDeviceApprovalsChangeMobilePolicyDetails() *DeviceApprovalsChangeMobilePolicyDetails {
2409 s := new(DeviceApprovalsChangeMobilePolicyDetails)
2410 return s
2411 }
2412
2413 // DeviceApprovalsChangeMobilePolicyType : has no documentation (yet)
2414 type DeviceApprovalsChangeMobilePolicyType struct {
2415 // Description : has no documentation (yet)
2416 Description string `json:"description"`
2417 }
2418
2419 // NewDeviceApprovalsChangeMobilePolicyType returns a new DeviceApprovalsChangeMobilePolicyType instance
2420 func NewDeviceApprovalsChangeMobilePolicyType(Description string) *DeviceApprovalsChangeMobilePolicyType {
2421 s := new(DeviceApprovalsChangeMobilePolicyType)
2422 s.Description = Description
2423 return s
2424 }
2425
2426 // DeviceApprovalsChangeOverageActionDetails : Changed device approvals setting
2427 // when member is over limit.
2428 type DeviceApprovalsChangeOverageActionDetails struct {
2429 // NewValue : New over the limits policy. Might be missing due to historical
2430 // data gap.
2431 NewValue *team_policies.RolloutMethod `json:"new_value,omitempty"`
2432 // PreviousValue : Previous over the limit policy. Might be missing due to
2433 // historical data gap.
2434 PreviousValue *team_policies.RolloutMethod `json:"previous_value,omitempty"`
2435 }
2436
2437 // NewDeviceApprovalsChangeOverageActionDetails returns a new DeviceApprovalsChangeOverageActionDetails instance
2438 func NewDeviceApprovalsChangeOverageActionDetails() *DeviceApprovalsChangeOverageActionDetails {
2439 s := new(DeviceApprovalsChangeOverageActionDetails)
2440 return s
2441 }
2442
2443 // DeviceApprovalsChangeOverageActionType : has no documentation (yet)
2444 type DeviceApprovalsChangeOverageActionType struct {
2445 // Description : has no documentation (yet)
2446 Description string `json:"description"`
2447 }
2448
2449 // NewDeviceApprovalsChangeOverageActionType returns a new DeviceApprovalsChangeOverageActionType instance
2450 func NewDeviceApprovalsChangeOverageActionType(Description string) *DeviceApprovalsChangeOverageActionType {
2451 s := new(DeviceApprovalsChangeOverageActionType)
2452 s.Description = Description
2453 return s
2454 }
2455
2456 // DeviceApprovalsChangeUnlinkActionDetails : Changed device approvals setting
2457 // when member unlinks approved device.
2458 type DeviceApprovalsChangeUnlinkActionDetails struct {
2459 // NewValue : New device unlink policy. Might be missing due to historical
2460 // data gap.
2461 NewValue *DeviceUnlinkPolicy `json:"new_value,omitempty"`
2462 // PreviousValue : Previous device unlink policy. Might be missing due to
2463 // historical data gap.
2464 PreviousValue *DeviceUnlinkPolicy `json:"previous_value,omitempty"`
2465 }
2466
2467 // NewDeviceApprovalsChangeUnlinkActionDetails returns a new DeviceApprovalsChangeUnlinkActionDetails instance
2468 func NewDeviceApprovalsChangeUnlinkActionDetails() *DeviceApprovalsChangeUnlinkActionDetails {
2469 s := new(DeviceApprovalsChangeUnlinkActionDetails)
2470 return s
2471 }
2472
2473 // DeviceApprovalsChangeUnlinkActionType : has no documentation (yet)
2474 type DeviceApprovalsChangeUnlinkActionType struct {
2475 // Description : has no documentation (yet)
2476 Description string `json:"description"`
2477 }
2478
2479 // NewDeviceApprovalsChangeUnlinkActionType returns a new DeviceApprovalsChangeUnlinkActionType instance
2480 func NewDeviceApprovalsChangeUnlinkActionType(Description string) *DeviceApprovalsChangeUnlinkActionType {
2481 s := new(DeviceApprovalsChangeUnlinkActionType)
2482 s.Description = Description
2483 return s
2484 }
2485
2486 // DeviceApprovalsPolicy : has no documentation (yet)
2487 type DeviceApprovalsPolicy struct {
2488 dropbox.Tagged
2489 }
2490
2491 // Valid tag values for DeviceApprovalsPolicy
2492 const (
2493 DeviceApprovalsPolicyLimited = "limited"
2494 DeviceApprovalsPolicyUnlimited = "unlimited"
2495 DeviceApprovalsPolicyOther = "other"
2496 )
2497
2498 // DeviceApprovalsRemoveExceptionDetails : Removed members from device approvals
2499 // exception list.
2500 type DeviceApprovalsRemoveExceptionDetails struct {
2501 }
2502
2503 // NewDeviceApprovalsRemoveExceptionDetails returns a new DeviceApprovalsRemoveExceptionDetails instance
2504 func NewDeviceApprovalsRemoveExceptionDetails() *DeviceApprovalsRemoveExceptionDetails {
2505 s := new(DeviceApprovalsRemoveExceptionDetails)
2506 return s
2507 }
2508
2509 // DeviceApprovalsRemoveExceptionType : has no documentation (yet)
2510 type DeviceApprovalsRemoveExceptionType struct {
2511 // Description : has no documentation (yet)
2512 Description string `json:"description"`
2513 }
2514
2515 // NewDeviceApprovalsRemoveExceptionType returns a new DeviceApprovalsRemoveExceptionType instance
2516 func NewDeviceApprovalsRemoveExceptionType(Description string) *DeviceApprovalsRemoveExceptionType {
2517 s := new(DeviceApprovalsRemoveExceptionType)
2518 s.Description = Description
2519 return s
2520 }
2521
2522 // DeviceChangeIpDesktopDetails : Changed IP address associated with active
2523 // desktop session.
2524 type DeviceChangeIpDesktopDetails struct {
2525 // DeviceSessionInfo : Device's session logged information.
2526 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info"`
2527 }
2528
2529 // NewDeviceChangeIpDesktopDetails returns a new DeviceChangeIpDesktopDetails instance
2530 func NewDeviceChangeIpDesktopDetails(DeviceSessionInfo IsDeviceSessionLogInfo) *DeviceChangeIpDesktopDetails {
2531 s := new(DeviceChangeIpDesktopDetails)
2532 s.DeviceSessionInfo = DeviceSessionInfo
2533 return s
2534 }
2535
2536 // UnmarshalJSON deserializes into a DeviceChangeIpDesktopDetails instance
2537 func (u *DeviceChangeIpDesktopDetails) UnmarshalJSON(b []byte) error {
2538 type wrap struct {
2539 // DeviceSessionInfo : Device's session logged information.
2540 DeviceSessionInfo json.RawMessage `json:"device_session_info"`
2541 }
2542 var w wrap
2543 if err := json.Unmarshal(b, &w); err != nil {
2544 return err
2545 }
2546 DeviceSessionInfo, err := IsDeviceSessionLogInfoFromJSON(w.DeviceSessionInfo)
2547 if err != nil {
2548 return err
2549 }
2550 u.DeviceSessionInfo = DeviceSessionInfo
2551 return nil
2552 }
2553
2554 // DeviceChangeIpDesktopType : has no documentation (yet)
2555 type DeviceChangeIpDesktopType struct {
2556 // Description : has no documentation (yet)
2557 Description string `json:"description"`
2558 }
2559
2560 // NewDeviceChangeIpDesktopType returns a new DeviceChangeIpDesktopType instance
2561 func NewDeviceChangeIpDesktopType(Description string) *DeviceChangeIpDesktopType {
2562 s := new(DeviceChangeIpDesktopType)
2563 s.Description = Description
2564 return s
2565 }
2566
2567 // DeviceChangeIpMobileDetails : Changed IP address associated with active
2568 // mobile session.
2569 type DeviceChangeIpMobileDetails struct {
2570 // DeviceSessionInfo : Device's session logged information.
2571 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"`
2572 }
2573
2574 // NewDeviceChangeIpMobileDetails returns a new DeviceChangeIpMobileDetails instance
2575 func NewDeviceChangeIpMobileDetails() *DeviceChangeIpMobileDetails {
2576 s := new(DeviceChangeIpMobileDetails)
2577 return s
2578 }
2579
2580 // DeviceChangeIpMobileType : has no documentation (yet)
2581 type DeviceChangeIpMobileType struct {
2582 // Description : has no documentation (yet)
2583 Description string `json:"description"`
2584 }
2585
2586 // NewDeviceChangeIpMobileType returns a new DeviceChangeIpMobileType instance
2587 func NewDeviceChangeIpMobileType(Description string) *DeviceChangeIpMobileType {
2588 s := new(DeviceChangeIpMobileType)
2589 s.Description = Description
2590 return s
2591 }
2592
2593 // DeviceChangeIpWebDetails : Changed IP address associated with active web
2594 // session.
2595 type DeviceChangeIpWebDetails struct {
2596 // UserAgent : Web browser name.
2597 UserAgent string `json:"user_agent"`
2598 }
2599
2600 // NewDeviceChangeIpWebDetails returns a new DeviceChangeIpWebDetails instance
2601 func NewDeviceChangeIpWebDetails(UserAgent string) *DeviceChangeIpWebDetails {
2602 s := new(DeviceChangeIpWebDetails)
2603 s.UserAgent = UserAgent
2604 return s
2605 }
2606
2607 // DeviceChangeIpWebType : has no documentation (yet)
2608 type DeviceChangeIpWebType struct {
2609 // Description : has no documentation (yet)
2610 Description string `json:"description"`
2611 }
2612
2613 // NewDeviceChangeIpWebType returns a new DeviceChangeIpWebType instance
2614 func NewDeviceChangeIpWebType(Description string) *DeviceChangeIpWebType {
2615 s := new(DeviceChangeIpWebType)
2616 s.Description = Description
2617 return s
2618 }
2619
2620 // DeviceDeleteOnUnlinkFailDetails : Failed to delete all files from unlinked
2621 // device.
2622 type DeviceDeleteOnUnlinkFailDetails struct {
2623 // SessionInfo : Session unique id.
2624 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
2625 // DisplayName : The device name. Might be missing due to historical data
2626 // gap.
2627 DisplayName string `json:"display_name,omitempty"`
2628 // NumFailures : The number of times that remote file deletion failed.
2629 NumFailures int64 `json:"num_failures"`
2630 }
2631
2632 // NewDeviceDeleteOnUnlinkFailDetails returns a new DeviceDeleteOnUnlinkFailDetails instance
2633 func NewDeviceDeleteOnUnlinkFailDetails(NumFailures int64) *DeviceDeleteOnUnlinkFailDetails {
2634 s := new(DeviceDeleteOnUnlinkFailDetails)
2635 s.NumFailures = NumFailures
2636 return s
2637 }
2638
2639 // DeviceDeleteOnUnlinkFailType : has no documentation (yet)
2640 type DeviceDeleteOnUnlinkFailType struct {
2641 // Description : has no documentation (yet)
2642 Description string `json:"description"`
2643 }
2644
2645 // NewDeviceDeleteOnUnlinkFailType returns a new DeviceDeleteOnUnlinkFailType instance
2646 func NewDeviceDeleteOnUnlinkFailType(Description string) *DeviceDeleteOnUnlinkFailType {
2647 s := new(DeviceDeleteOnUnlinkFailType)
2648 s.Description = Description
2649 return s
2650 }
2651
2652 // DeviceDeleteOnUnlinkSuccessDetails : Deleted all files from unlinked device.
2653 type DeviceDeleteOnUnlinkSuccessDetails struct {
2654 // SessionInfo : Session unique id.
2655 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
2656 // DisplayName : The device name. Might be missing due to historical data
2657 // gap.
2658 DisplayName string `json:"display_name,omitempty"`
2659 }
2660
2661 // NewDeviceDeleteOnUnlinkSuccessDetails returns a new DeviceDeleteOnUnlinkSuccessDetails instance
2662 func NewDeviceDeleteOnUnlinkSuccessDetails() *DeviceDeleteOnUnlinkSuccessDetails {
2663 s := new(DeviceDeleteOnUnlinkSuccessDetails)
2664 return s
2665 }
2666
2667 // DeviceDeleteOnUnlinkSuccessType : has no documentation (yet)
2668 type DeviceDeleteOnUnlinkSuccessType struct {
2669 // Description : has no documentation (yet)
2670 Description string `json:"description"`
2671 }
2672
2673 // NewDeviceDeleteOnUnlinkSuccessType returns a new DeviceDeleteOnUnlinkSuccessType instance
2674 func NewDeviceDeleteOnUnlinkSuccessType(Description string) *DeviceDeleteOnUnlinkSuccessType {
2675 s := new(DeviceDeleteOnUnlinkSuccessType)
2676 s.Description = Description
2677 return s
2678 }
2679
2680 // DeviceLinkFailDetails : Failed to link device.
2681 type DeviceLinkFailDetails struct {
2682 // IpAddress : IP address. Might be missing due to historical data gap.
2683 IpAddress string `json:"ip_address,omitempty"`
2684 // DeviceType : A description of the device used while user approval
2685 // blocked.
2686 DeviceType *DeviceType `json:"device_type"`
2687 }
2688
2689 // NewDeviceLinkFailDetails returns a new DeviceLinkFailDetails instance
2690 func NewDeviceLinkFailDetails(DeviceType *DeviceType) *DeviceLinkFailDetails {
2691 s := new(DeviceLinkFailDetails)
2692 s.DeviceType = DeviceType
2693 return s
2694 }
2695
2696 // DeviceLinkFailType : has no documentation (yet)
2697 type DeviceLinkFailType struct {
2698 // Description : has no documentation (yet)
2699 Description string `json:"description"`
2700 }
2701
2702 // NewDeviceLinkFailType returns a new DeviceLinkFailType instance
2703 func NewDeviceLinkFailType(Description string) *DeviceLinkFailType {
2704 s := new(DeviceLinkFailType)
2705 s.Description = Description
2706 return s
2707 }
2708
2709 // DeviceLinkSuccessDetails : Linked device.
2710 type DeviceLinkSuccessDetails struct {
2711 // DeviceSessionInfo : Device's session logged information.
2712 DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"`
2713 }
2714
2715 // NewDeviceLinkSuccessDetails returns a new DeviceLinkSuccessDetails instance
2716 func NewDeviceLinkSuccessDetails() *DeviceLinkSuccessDetails {
2717 s := new(DeviceLinkSuccessDetails)
2718 return s
2719 }
2720
2721 // DeviceLinkSuccessType : has no documentation (yet)
2722 type DeviceLinkSuccessType struct {
2723 // Description : has no documentation (yet)
2724 Description string `json:"description"`
2725 }
2726
2727 // NewDeviceLinkSuccessType returns a new DeviceLinkSuccessType instance
2728 func NewDeviceLinkSuccessType(Description string) *DeviceLinkSuccessType {
2729 s := new(DeviceLinkSuccessType)
2730 s.Description = Description
2731 return s
2732 }
2733
2734 // DeviceManagementDisabledDetails : Disabled device management.
2735 type DeviceManagementDisabledDetails struct {
2736 }
2737
2738 // NewDeviceManagementDisabledDetails returns a new DeviceManagementDisabledDetails instance
2739 func NewDeviceManagementDisabledDetails() *DeviceManagementDisabledDetails {
2740 s := new(DeviceManagementDisabledDetails)
2741 return s
2742 }
2743
2744 // DeviceManagementDisabledType : has no documentation (yet)
2745 type DeviceManagementDisabledType struct {
2746 // Description : has no documentation (yet)
2747 Description string `json:"description"`
2748 }
2749
2750 // NewDeviceManagementDisabledType returns a new DeviceManagementDisabledType instance
2751 func NewDeviceManagementDisabledType(Description string) *DeviceManagementDisabledType {
2752 s := new(DeviceManagementDisabledType)
2753 s.Description = Description
2754 return s
2755 }
2756
2757 // DeviceManagementEnabledDetails : Enabled device management.
2758 type DeviceManagementEnabledDetails struct {
2759 }
2760
2761 // NewDeviceManagementEnabledDetails returns a new DeviceManagementEnabledDetails instance
2762 func NewDeviceManagementEnabledDetails() *DeviceManagementEnabledDetails {
2763 s := new(DeviceManagementEnabledDetails)
2764 return s
2765 }
2766
2767 // DeviceManagementEnabledType : has no documentation (yet)
2768 type DeviceManagementEnabledType struct {
2769 // Description : has no documentation (yet)
2770 Description string `json:"description"`
2771 }
2772
2773 // NewDeviceManagementEnabledType returns a new DeviceManagementEnabledType instance
2774 func NewDeviceManagementEnabledType(Description string) *DeviceManagementEnabledType {
2775 s := new(DeviceManagementEnabledType)
2776 s.Description = Description
2777 return s
2778 }
2779
2780 // DeviceSyncBackupStatusChangedDetails : Enabled/disabled backup for computer.
2781 type DeviceSyncBackupStatusChangedDetails struct {
2782 // DesktopDeviceSessionInfo : Device's session logged information.
2783 DesktopDeviceSessionInfo *DesktopDeviceSessionLogInfo `json:"desktop_device_session_info"`
2784 // PreviousValue : Previous status of computer backup on the device.
2785 PreviousValue *BackupStatus `json:"previous_value"`
2786 // NewValue : Next status of computer backup on the device.
2787 NewValue *BackupStatus `json:"new_value"`
2788 }
2789
2790 // NewDeviceSyncBackupStatusChangedDetails returns a new DeviceSyncBackupStatusChangedDetails instance
2791 func NewDeviceSyncBackupStatusChangedDetails(DesktopDeviceSessionInfo *DesktopDeviceSessionLogInfo, PreviousValue *BackupStatus, NewValue *BackupStatus) *DeviceSyncBackupStatusChangedDetails {
2792 s := new(DeviceSyncBackupStatusChangedDetails)
2793 s.DesktopDeviceSessionInfo = DesktopDeviceSessionInfo
2794 s.PreviousValue = PreviousValue
2795 s.NewValue = NewValue
2796 return s
2797 }
2798
2799 // DeviceSyncBackupStatusChangedType : has no documentation (yet)
2800 type DeviceSyncBackupStatusChangedType struct {
2801 // Description : has no documentation (yet)
2802 Description string `json:"description"`
2803 }
2804
2805 // NewDeviceSyncBackupStatusChangedType returns a new DeviceSyncBackupStatusChangedType instance
2806 func NewDeviceSyncBackupStatusChangedType(Description string) *DeviceSyncBackupStatusChangedType {
2807 s := new(DeviceSyncBackupStatusChangedType)
2808 s.Description = Description
2809 return s
2810 }
2811
2812 // DeviceType : has no documentation (yet)
2813 type DeviceType struct {
2814 dropbox.Tagged
2815 }
2816
2817 // Valid tag values for DeviceType
2818 const (
2819 DeviceTypeDesktop = "desktop"
2820 DeviceTypeMobile = "mobile"
2821 DeviceTypeOther = "other"
2822 )
2823
2824 // DeviceUnlinkDetails : Disconnected device.
2825 type DeviceUnlinkDetails struct {
2826 // SessionInfo : Session unique id.
2827 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
2828 // DisplayName : The device name. Might be missing due to historical data
2829 // gap.
2830 DisplayName string `json:"display_name,omitempty"`
2831 // DeleteData : True if the user requested to delete data after device
2832 // unlink, false otherwise.
2833 DeleteData bool `json:"delete_data"`
2834 }
2835
2836 // NewDeviceUnlinkDetails returns a new DeviceUnlinkDetails instance
2837 func NewDeviceUnlinkDetails(DeleteData bool) *DeviceUnlinkDetails {
2838 s := new(DeviceUnlinkDetails)
2839 s.DeleteData = DeleteData
2840 return s
2841 }
2842
2843 // DeviceUnlinkPolicy : has no documentation (yet)
2844 type DeviceUnlinkPolicy struct {
2845 dropbox.Tagged
2846 }
2847
2848 // Valid tag values for DeviceUnlinkPolicy
2849 const (
2850 DeviceUnlinkPolicyKeep = "keep"
2851 DeviceUnlinkPolicyRemove = "remove"
2852 DeviceUnlinkPolicyOther = "other"
2853 )
2854
2855 // DeviceUnlinkType : has no documentation (yet)
2856 type DeviceUnlinkType struct {
2857 // Description : has no documentation (yet)
2858 Description string `json:"description"`
2859 }
2860
2861 // NewDeviceUnlinkType returns a new DeviceUnlinkType instance
2862 func NewDeviceUnlinkType(Description string) *DeviceUnlinkType {
2863 s := new(DeviceUnlinkType)
2864 s.Description = Description
2865 return s
2866 }
2867
2868 // DirectoryRestrictionsAddMembersDetails : Added members to directory
2869 // restrictions list.
2870 type DirectoryRestrictionsAddMembersDetails struct {
2871 }
2872
2873 // NewDirectoryRestrictionsAddMembersDetails returns a new DirectoryRestrictionsAddMembersDetails instance
2874 func NewDirectoryRestrictionsAddMembersDetails() *DirectoryRestrictionsAddMembersDetails {
2875 s := new(DirectoryRestrictionsAddMembersDetails)
2876 return s
2877 }
2878
2879 // DirectoryRestrictionsAddMembersType : has no documentation (yet)
2880 type DirectoryRestrictionsAddMembersType struct {
2881 // Description : has no documentation (yet)
2882 Description string `json:"description"`
2883 }
2884
2885 // NewDirectoryRestrictionsAddMembersType returns a new DirectoryRestrictionsAddMembersType instance
2886 func NewDirectoryRestrictionsAddMembersType(Description string) *DirectoryRestrictionsAddMembersType {
2887 s := new(DirectoryRestrictionsAddMembersType)
2888 s.Description = Description
2889 return s
2890 }
2891
2892 // DirectoryRestrictionsRemoveMembersDetails : Removed members from directory
2893 // restrictions list.
2894 type DirectoryRestrictionsRemoveMembersDetails struct {
2895 }
2896
2897 // NewDirectoryRestrictionsRemoveMembersDetails returns a new DirectoryRestrictionsRemoveMembersDetails instance
2898 func NewDirectoryRestrictionsRemoveMembersDetails() *DirectoryRestrictionsRemoveMembersDetails {
2899 s := new(DirectoryRestrictionsRemoveMembersDetails)
2900 return s
2901 }
2902
2903 // DirectoryRestrictionsRemoveMembersType : has no documentation (yet)
2904 type DirectoryRestrictionsRemoveMembersType struct {
2905 // Description : has no documentation (yet)
2906 Description string `json:"description"`
2907 }
2908
2909 // NewDirectoryRestrictionsRemoveMembersType returns a new DirectoryRestrictionsRemoveMembersType instance
2910 func NewDirectoryRestrictionsRemoveMembersType(Description string) *DirectoryRestrictionsRemoveMembersType {
2911 s := new(DirectoryRestrictionsRemoveMembersType)
2912 s.Description = Description
2913 return s
2914 }
2915
2916 // DisabledDomainInvitesDetails : Disabled domain invites.
2917 type DisabledDomainInvitesDetails struct {
2918 }
2919
2920 // NewDisabledDomainInvitesDetails returns a new DisabledDomainInvitesDetails instance
2921 func NewDisabledDomainInvitesDetails() *DisabledDomainInvitesDetails {
2922 s := new(DisabledDomainInvitesDetails)
2923 return s
2924 }
2925
2926 // DisabledDomainInvitesType : has no documentation (yet)
2927 type DisabledDomainInvitesType struct {
2928 // Description : has no documentation (yet)
2929 Description string `json:"description"`
2930 }
2931
2932 // NewDisabledDomainInvitesType returns a new DisabledDomainInvitesType instance
2933 func NewDisabledDomainInvitesType(Description string) *DisabledDomainInvitesType {
2934 s := new(DisabledDomainInvitesType)
2935 s.Description = Description
2936 return s
2937 }
2938
2939 // DispositionActionType : has no documentation (yet)
2940 type DispositionActionType struct {
2941 dropbox.Tagged
2942 }
2943
2944 // Valid tag values for DispositionActionType
2945 const (
2946 DispositionActionTypeAutomaticDelete = "automatic_delete"
2947 DispositionActionTypeAutomaticPermanentlyDelete = "automatic_permanently_delete"
2948 DispositionActionTypeOther = "other"
2949 )
2950
2951 // DomainInvitesApproveRequestToJoinTeamDetails : Approved user's request to
2952 // join team.
2953 type DomainInvitesApproveRequestToJoinTeamDetails struct {
2954 }
2955
2956 // NewDomainInvitesApproveRequestToJoinTeamDetails returns a new DomainInvitesApproveRequestToJoinTeamDetails instance
2957 func NewDomainInvitesApproveRequestToJoinTeamDetails() *DomainInvitesApproveRequestToJoinTeamDetails {
2958 s := new(DomainInvitesApproveRequestToJoinTeamDetails)
2959 return s
2960 }
2961
2962 // DomainInvitesApproveRequestToJoinTeamType : has no documentation (yet)
2963 type DomainInvitesApproveRequestToJoinTeamType struct {
2964 // Description : has no documentation (yet)
2965 Description string `json:"description"`
2966 }
2967
2968 // NewDomainInvitesApproveRequestToJoinTeamType returns a new DomainInvitesApproveRequestToJoinTeamType instance
2969 func NewDomainInvitesApproveRequestToJoinTeamType(Description string) *DomainInvitesApproveRequestToJoinTeamType {
2970 s := new(DomainInvitesApproveRequestToJoinTeamType)
2971 s.Description = Description
2972 return s
2973 }
2974
2975 // DomainInvitesDeclineRequestToJoinTeamDetails : Declined user's request to
2976 // join team.
2977 type DomainInvitesDeclineRequestToJoinTeamDetails struct {
2978 }
2979
2980 // NewDomainInvitesDeclineRequestToJoinTeamDetails returns a new DomainInvitesDeclineRequestToJoinTeamDetails instance
2981 func NewDomainInvitesDeclineRequestToJoinTeamDetails() *DomainInvitesDeclineRequestToJoinTeamDetails {
2982 s := new(DomainInvitesDeclineRequestToJoinTeamDetails)
2983 return s
2984 }
2985
2986 // DomainInvitesDeclineRequestToJoinTeamType : has no documentation (yet)
2987 type DomainInvitesDeclineRequestToJoinTeamType struct {
2988 // Description : has no documentation (yet)
2989 Description string `json:"description"`
2990 }
2991
2992 // NewDomainInvitesDeclineRequestToJoinTeamType returns a new DomainInvitesDeclineRequestToJoinTeamType instance
2993 func NewDomainInvitesDeclineRequestToJoinTeamType(Description string) *DomainInvitesDeclineRequestToJoinTeamType {
2994 s := new(DomainInvitesDeclineRequestToJoinTeamType)
2995 s.Description = Description
2996 return s
2997 }
2998
2999 // DomainInvitesEmailExistingUsersDetails : Sent domain invites to existing
3000 // domain accounts.
3001 type DomainInvitesEmailExistingUsersDetails struct {
3002 // DomainName : Domain names.
3003 DomainName string `json:"domain_name"`
3004 // NumRecipients : Number of recipients.
3005 NumRecipients uint64 `json:"num_recipients"`
3006 }
3007
3008 // NewDomainInvitesEmailExistingUsersDetails returns a new DomainInvitesEmailExistingUsersDetails instance
3009 func NewDomainInvitesEmailExistingUsersDetails(DomainName string, NumRecipients uint64) *DomainInvitesEmailExistingUsersDetails {
3010 s := new(DomainInvitesEmailExistingUsersDetails)
3011 s.DomainName = DomainName
3012 s.NumRecipients = NumRecipients
3013 return s
3014 }
3015
3016 // DomainInvitesEmailExistingUsersType : has no documentation (yet)
3017 type DomainInvitesEmailExistingUsersType struct {
3018 // Description : has no documentation (yet)
3019 Description string `json:"description"`
3020 }
3021
3022 // NewDomainInvitesEmailExistingUsersType returns a new DomainInvitesEmailExistingUsersType instance
3023 func NewDomainInvitesEmailExistingUsersType(Description string) *DomainInvitesEmailExistingUsersType {
3024 s := new(DomainInvitesEmailExistingUsersType)
3025 s.Description = Description
3026 return s
3027 }
3028
3029 // DomainInvitesRequestToJoinTeamDetails : Requested to join team.
3030 type DomainInvitesRequestToJoinTeamDetails struct {
3031 }
3032
3033 // NewDomainInvitesRequestToJoinTeamDetails returns a new DomainInvitesRequestToJoinTeamDetails instance
3034 func NewDomainInvitesRequestToJoinTeamDetails() *DomainInvitesRequestToJoinTeamDetails {
3035 s := new(DomainInvitesRequestToJoinTeamDetails)
3036 return s
3037 }
3038
3039 // DomainInvitesRequestToJoinTeamType : has no documentation (yet)
3040 type DomainInvitesRequestToJoinTeamType struct {
3041 // Description : has no documentation (yet)
3042 Description string `json:"description"`
3043 }
3044
3045 // NewDomainInvitesRequestToJoinTeamType returns a new DomainInvitesRequestToJoinTeamType instance
3046 func NewDomainInvitesRequestToJoinTeamType(Description string) *DomainInvitesRequestToJoinTeamType {
3047 s := new(DomainInvitesRequestToJoinTeamType)
3048 s.Description = Description
3049 return s
3050 }
3051
3052 // DomainInvitesSetInviteNewUserPrefToNoDetails : Disabled "Automatically invite
3053 // new users".
3054 type DomainInvitesSetInviteNewUserPrefToNoDetails struct {
3055 }
3056
3057 // NewDomainInvitesSetInviteNewUserPrefToNoDetails returns a new DomainInvitesSetInviteNewUserPrefToNoDetails instance
3058 func NewDomainInvitesSetInviteNewUserPrefToNoDetails() *DomainInvitesSetInviteNewUserPrefToNoDetails {
3059 s := new(DomainInvitesSetInviteNewUserPrefToNoDetails)
3060 return s
3061 }
3062
3063 // DomainInvitesSetInviteNewUserPrefToNoType : has no documentation (yet)
3064 type DomainInvitesSetInviteNewUserPrefToNoType struct {
3065 // Description : has no documentation (yet)
3066 Description string `json:"description"`
3067 }
3068
3069 // NewDomainInvitesSetInviteNewUserPrefToNoType returns a new DomainInvitesSetInviteNewUserPrefToNoType instance
3070 func NewDomainInvitesSetInviteNewUserPrefToNoType(Description string) *DomainInvitesSetInviteNewUserPrefToNoType {
3071 s := new(DomainInvitesSetInviteNewUserPrefToNoType)
3072 s.Description = Description
3073 return s
3074 }
3075
3076 // DomainInvitesSetInviteNewUserPrefToYesDetails : Enabled "Automatically invite
3077 // new users".
3078 type DomainInvitesSetInviteNewUserPrefToYesDetails struct {
3079 }
3080
3081 // NewDomainInvitesSetInviteNewUserPrefToYesDetails returns a new DomainInvitesSetInviteNewUserPrefToYesDetails instance
3082 func NewDomainInvitesSetInviteNewUserPrefToYesDetails() *DomainInvitesSetInviteNewUserPrefToYesDetails {
3083 s := new(DomainInvitesSetInviteNewUserPrefToYesDetails)
3084 return s
3085 }
3086
3087 // DomainInvitesSetInviteNewUserPrefToYesType : has no documentation (yet)
3088 type DomainInvitesSetInviteNewUserPrefToYesType struct {
3089 // Description : has no documentation (yet)
3090 Description string `json:"description"`
3091 }
3092
3093 // NewDomainInvitesSetInviteNewUserPrefToYesType returns a new DomainInvitesSetInviteNewUserPrefToYesType instance
3094 func NewDomainInvitesSetInviteNewUserPrefToYesType(Description string) *DomainInvitesSetInviteNewUserPrefToYesType {
3095 s := new(DomainInvitesSetInviteNewUserPrefToYesType)
3096 s.Description = Description
3097 return s
3098 }
3099
3100 // DomainVerificationAddDomainFailDetails : Failed to verify team domain.
3101 type DomainVerificationAddDomainFailDetails struct {
3102 // DomainName : Domain name.
3103 DomainName string `json:"domain_name"`
3104 // VerificationMethod : Domain name verification method. Might be missing
3105 // due to historical data gap.
3106 VerificationMethod string `json:"verification_method,omitempty"`
3107 }
3108
3109 // NewDomainVerificationAddDomainFailDetails returns a new DomainVerificationAddDomainFailDetails instance
3110 func NewDomainVerificationAddDomainFailDetails(DomainName string) *DomainVerificationAddDomainFailDetails {
3111 s := new(DomainVerificationAddDomainFailDetails)
3112 s.DomainName = DomainName
3113 return s
3114 }
3115
3116 // DomainVerificationAddDomainFailType : has no documentation (yet)
3117 type DomainVerificationAddDomainFailType struct {
3118 // Description : has no documentation (yet)
3119 Description string `json:"description"`
3120 }
3121
3122 // NewDomainVerificationAddDomainFailType returns a new DomainVerificationAddDomainFailType instance
3123 func NewDomainVerificationAddDomainFailType(Description string) *DomainVerificationAddDomainFailType {
3124 s := new(DomainVerificationAddDomainFailType)
3125 s.Description = Description
3126 return s
3127 }
3128
3129 // DomainVerificationAddDomainSuccessDetails : Verified team domain.
3130 type DomainVerificationAddDomainSuccessDetails struct {
3131 // DomainNames : Domain names.
3132 DomainNames []string `json:"domain_names"`
3133 // VerificationMethod : Domain name verification method. Might be missing
3134 // due to historical data gap.
3135 VerificationMethod string `json:"verification_method,omitempty"`
3136 }
3137
3138 // NewDomainVerificationAddDomainSuccessDetails returns a new DomainVerificationAddDomainSuccessDetails instance
3139 func NewDomainVerificationAddDomainSuccessDetails(DomainNames []string) *DomainVerificationAddDomainSuccessDetails {
3140 s := new(DomainVerificationAddDomainSuccessDetails)
3141 s.DomainNames = DomainNames
3142 return s
3143 }
3144
3145 // DomainVerificationAddDomainSuccessType : has no documentation (yet)
3146 type DomainVerificationAddDomainSuccessType struct {
3147 // Description : has no documentation (yet)
3148 Description string `json:"description"`
3149 }
3150
3151 // NewDomainVerificationAddDomainSuccessType returns a new DomainVerificationAddDomainSuccessType instance
3152 func NewDomainVerificationAddDomainSuccessType(Description string) *DomainVerificationAddDomainSuccessType {
3153 s := new(DomainVerificationAddDomainSuccessType)
3154 s.Description = Description
3155 return s
3156 }
3157
3158 // DomainVerificationRemoveDomainDetails : Removed domain from list of verified
3159 // team domains.
3160 type DomainVerificationRemoveDomainDetails struct {
3161 // DomainNames : Domain names.
3162 DomainNames []string `json:"domain_names"`
3163 }
3164
3165 // NewDomainVerificationRemoveDomainDetails returns a new DomainVerificationRemoveDomainDetails instance
3166 func NewDomainVerificationRemoveDomainDetails(DomainNames []string) *DomainVerificationRemoveDomainDetails {
3167 s := new(DomainVerificationRemoveDomainDetails)
3168 s.DomainNames = DomainNames
3169 return s
3170 }
3171
3172 // DomainVerificationRemoveDomainType : has no documentation (yet)
3173 type DomainVerificationRemoveDomainType struct {
3174 // Description : has no documentation (yet)
3175 Description string `json:"description"`
3176 }
3177
3178 // NewDomainVerificationRemoveDomainType returns a new DomainVerificationRemoveDomainType instance
3179 func NewDomainVerificationRemoveDomainType(Description string) *DomainVerificationRemoveDomainType {
3180 s := new(DomainVerificationRemoveDomainType)
3181 s.Description = Description
3182 return s
3183 }
3184
3185 // DownloadPolicyType : Shared content downloads policy
3186 type DownloadPolicyType struct {
3187 dropbox.Tagged
3188 }
3189
3190 // Valid tag values for DownloadPolicyType
3191 const (
3192 DownloadPolicyTypeAllow = "allow"
3193 DownloadPolicyTypeDisallow = "disallow"
3194 DownloadPolicyTypeOther = "other"
3195 )
3196
3197 // DropboxPasswordsExportedDetails : Exported passwords.
3198 type DropboxPasswordsExportedDetails struct {
3199 // Platform : The platform the device runs export.
3200 Platform string `json:"platform"`
3201 }
3202
3203 // NewDropboxPasswordsExportedDetails returns a new DropboxPasswordsExportedDetails instance
3204 func NewDropboxPasswordsExportedDetails(Platform string) *DropboxPasswordsExportedDetails {
3205 s := new(DropboxPasswordsExportedDetails)
3206 s.Platform = Platform
3207 return s
3208 }
3209
3210 // DropboxPasswordsExportedType : has no documentation (yet)
3211 type DropboxPasswordsExportedType struct {
3212 // Description : has no documentation (yet)
3213 Description string `json:"description"`
3214 }
3215
3216 // NewDropboxPasswordsExportedType returns a new DropboxPasswordsExportedType instance
3217 func NewDropboxPasswordsExportedType(Description string) *DropboxPasswordsExportedType {
3218 s := new(DropboxPasswordsExportedType)
3219 s.Description = Description
3220 return s
3221 }
3222
3223 // DropboxPasswordsNewDeviceEnrolledDetails : Enrolled new Dropbox Passwords
3224 // device.
3225 type DropboxPasswordsNewDeviceEnrolledDetails struct {
3226 // IsFirstDevice : Whether it's a first device enrolled.
3227 IsFirstDevice bool `json:"is_first_device"`
3228 // Platform : The platform the device is enrolled.
3229 Platform string `json:"platform"`
3230 }
3231
3232 // NewDropboxPasswordsNewDeviceEnrolledDetails returns a new DropboxPasswordsNewDeviceEnrolledDetails instance
3233 func NewDropboxPasswordsNewDeviceEnrolledDetails(IsFirstDevice bool, Platform string) *DropboxPasswordsNewDeviceEnrolledDetails {
3234 s := new(DropboxPasswordsNewDeviceEnrolledDetails)
3235 s.IsFirstDevice = IsFirstDevice
3236 s.Platform = Platform
3237 return s
3238 }
3239
3240 // DropboxPasswordsNewDeviceEnrolledType : has no documentation (yet)
3241 type DropboxPasswordsNewDeviceEnrolledType struct {
3242 // Description : has no documentation (yet)
3243 Description string `json:"description"`
3244 }
3245
3246 // NewDropboxPasswordsNewDeviceEnrolledType returns a new DropboxPasswordsNewDeviceEnrolledType instance
3247 func NewDropboxPasswordsNewDeviceEnrolledType(Description string) *DropboxPasswordsNewDeviceEnrolledType {
3248 s := new(DropboxPasswordsNewDeviceEnrolledType)
3249 s.Description = Description
3250 return s
3251 }
3252
3253 // DurationLogInfo : Represents a time duration: unit and amount
3254 type DurationLogInfo struct {
3255 // Unit : Time unit.
3256 Unit *TimeUnit `json:"unit"`
3257 // Amount : Amount of time.
3258 Amount uint64 `json:"amount"`
3259 }
3260
3261 // NewDurationLogInfo returns a new DurationLogInfo instance
3262 func NewDurationLogInfo(Unit *TimeUnit, Amount uint64) *DurationLogInfo {
3263 s := new(DurationLogInfo)
3264 s.Unit = Unit
3265 s.Amount = Amount
3266 return s
3267 }
3268
3269 // EmmAddExceptionDetails : Added members to EMM exception list.
3270 type EmmAddExceptionDetails struct {
3271 }
3272
3273 // NewEmmAddExceptionDetails returns a new EmmAddExceptionDetails instance
3274 func NewEmmAddExceptionDetails() *EmmAddExceptionDetails {
3275 s := new(EmmAddExceptionDetails)
3276 return s
3277 }
3278
3279 // EmmAddExceptionType : has no documentation (yet)
3280 type EmmAddExceptionType struct {
3281 // Description : has no documentation (yet)
3282 Description string `json:"description"`
3283 }
3284
3285 // NewEmmAddExceptionType returns a new EmmAddExceptionType instance
3286 func NewEmmAddExceptionType(Description string) *EmmAddExceptionType {
3287 s := new(EmmAddExceptionType)
3288 s.Description = Description
3289 return s
3290 }
3291
3292 // EmmChangePolicyDetails : Enabled/disabled enterprise mobility management for
3293 // members.
3294 type EmmChangePolicyDetails struct {
3295 // NewValue : New enterprise mobility management policy.
3296 NewValue *team_policies.EmmState `json:"new_value"`
3297 // PreviousValue : Previous enterprise mobility management policy. Might be
3298 // missing due to historical data gap.
3299 PreviousValue *team_policies.EmmState `json:"previous_value,omitempty"`
3300 }
3301
3302 // NewEmmChangePolicyDetails returns a new EmmChangePolicyDetails instance
3303 func NewEmmChangePolicyDetails(NewValue *team_policies.EmmState) *EmmChangePolicyDetails {
3304 s := new(EmmChangePolicyDetails)
3305 s.NewValue = NewValue
3306 return s
3307 }
3308
3309 // EmmChangePolicyType : has no documentation (yet)
3310 type EmmChangePolicyType struct {
3311 // Description : has no documentation (yet)
3312 Description string `json:"description"`
3313 }
3314
3315 // NewEmmChangePolicyType returns a new EmmChangePolicyType instance
3316 func NewEmmChangePolicyType(Description string) *EmmChangePolicyType {
3317 s := new(EmmChangePolicyType)
3318 s.Description = Description
3319 return s
3320 }
3321
3322 // EmmCreateExceptionsReportDetails : Created EMM-excluded users report.
3323 type EmmCreateExceptionsReportDetails struct {
3324 }
3325
3326 // NewEmmCreateExceptionsReportDetails returns a new EmmCreateExceptionsReportDetails instance
3327 func NewEmmCreateExceptionsReportDetails() *EmmCreateExceptionsReportDetails {
3328 s := new(EmmCreateExceptionsReportDetails)
3329 return s
3330 }
3331
3332 // EmmCreateExceptionsReportType : has no documentation (yet)
3333 type EmmCreateExceptionsReportType struct {
3334 // Description : has no documentation (yet)
3335 Description string `json:"description"`
3336 }
3337
3338 // NewEmmCreateExceptionsReportType returns a new EmmCreateExceptionsReportType instance
3339 func NewEmmCreateExceptionsReportType(Description string) *EmmCreateExceptionsReportType {
3340 s := new(EmmCreateExceptionsReportType)
3341 s.Description = Description
3342 return s
3343 }
3344
3345 // EmmCreateUsageReportDetails : Created EMM mobile app usage report.
3346 type EmmCreateUsageReportDetails struct {
3347 }
3348
3349 // NewEmmCreateUsageReportDetails returns a new EmmCreateUsageReportDetails instance
3350 func NewEmmCreateUsageReportDetails() *EmmCreateUsageReportDetails {
3351 s := new(EmmCreateUsageReportDetails)
3352 return s
3353 }
3354
3355 // EmmCreateUsageReportType : has no documentation (yet)
3356 type EmmCreateUsageReportType struct {
3357 // Description : has no documentation (yet)
3358 Description string `json:"description"`
3359 }
3360
3361 // NewEmmCreateUsageReportType returns a new EmmCreateUsageReportType instance
3362 func NewEmmCreateUsageReportType(Description string) *EmmCreateUsageReportType {
3363 s := new(EmmCreateUsageReportType)
3364 s.Description = Description
3365 return s
3366 }
3367
3368 // EmmErrorDetails : Failed to sign in via EMM.
3369 type EmmErrorDetails struct {
3370 // ErrorDetails : Error details.
3371 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
3372 }
3373
3374 // NewEmmErrorDetails returns a new EmmErrorDetails instance
3375 func NewEmmErrorDetails(ErrorDetails *FailureDetailsLogInfo) *EmmErrorDetails {
3376 s := new(EmmErrorDetails)
3377 s.ErrorDetails = ErrorDetails
3378 return s
3379 }
3380
3381 // EmmErrorType : has no documentation (yet)
3382 type EmmErrorType struct {
3383 // Description : has no documentation (yet)
3384 Description string `json:"description"`
3385 }
3386
3387 // NewEmmErrorType returns a new EmmErrorType instance
3388 func NewEmmErrorType(Description string) *EmmErrorType {
3389 s := new(EmmErrorType)
3390 s.Description = Description
3391 return s
3392 }
3393
3394 // EmmRefreshAuthTokenDetails : Refreshed auth token used for setting up EMM.
3395 type EmmRefreshAuthTokenDetails struct {
3396 }
3397
3398 // NewEmmRefreshAuthTokenDetails returns a new EmmRefreshAuthTokenDetails instance
3399 func NewEmmRefreshAuthTokenDetails() *EmmRefreshAuthTokenDetails {
3400 s := new(EmmRefreshAuthTokenDetails)
3401 return s
3402 }
3403
3404 // EmmRefreshAuthTokenType : has no documentation (yet)
3405 type EmmRefreshAuthTokenType struct {
3406 // Description : has no documentation (yet)
3407 Description string `json:"description"`
3408 }
3409
3410 // NewEmmRefreshAuthTokenType returns a new EmmRefreshAuthTokenType instance
3411 func NewEmmRefreshAuthTokenType(Description string) *EmmRefreshAuthTokenType {
3412 s := new(EmmRefreshAuthTokenType)
3413 s.Description = Description
3414 return s
3415 }
3416
3417 // EmmRemoveExceptionDetails : Removed members from EMM exception list.
3418 type EmmRemoveExceptionDetails struct {
3419 }
3420
3421 // NewEmmRemoveExceptionDetails returns a new EmmRemoveExceptionDetails instance
3422 func NewEmmRemoveExceptionDetails() *EmmRemoveExceptionDetails {
3423 s := new(EmmRemoveExceptionDetails)
3424 return s
3425 }
3426
3427 // EmmRemoveExceptionType : has no documentation (yet)
3428 type EmmRemoveExceptionType struct {
3429 // Description : has no documentation (yet)
3430 Description string `json:"description"`
3431 }
3432
3433 // NewEmmRemoveExceptionType returns a new EmmRemoveExceptionType instance
3434 func NewEmmRemoveExceptionType(Description string) *EmmRemoveExceptionType {
3435 s := new(EmmRemoveExceptionType)
3436 s.Description = Description
3437 return s
3438 }
3439
3440 // EnabledDomainInvitesDetails : Enabled domain invites.
3441 type EnabledDomainInvitesDetails struct {
3442 }
3443
3444 // NewEnabledDomainInvitesDetails returns a new EnabledDomainInvitesDetails instance
3445 func NewEnabledDomainInvitesDetails() *EnabledDomainInvitesDetails {
3446 s := new(EnabledDomainInvitesDetails)
3447 return s
3448 }
3449
3450 // EnabledDomainInvitesType : has no documentation (yet)
3451 type EnabledDomainInvitesType struct {
3452 // Description : has no documentation (yet)
3453 Description string `json:"description"`
3454 }
3455
3456 // NewEnabledDomainInvitesType returns a new EnabledDomainInvitesType instance
3457 func NewEnabledDomainInvitesType(Description string) *EnabledDomainInvitesType {
3458 s := new(EnabledDomainInvitesType)
3459 s.Description = Description
3460 return s
3461 }
3462
3463 // EndedEnterpriseAdminSessionDeprecatedDetails : Ended enterprise admin
3464 // session.
3465 type EndedEnterpriseAdminSessionDeprecatedDetails struct {
3466 // FederationExtraDetails : More information about the organization or team.
3467 FederationExtraDetails *FedExtraDetails `json:"federation_extra_details"`
3468 }
3469
3470 // NewEndedEnterpriseAdminSessionDeprecatedDetails returns a new EndedEnterpriseAdminSessionDeprecatedDetails instance
3471 func NewEndedEnterpriseAdminSessionDeprecatedDetails(FederationExtraDetails *FedExtraDetails) *EndedEnterpriseAdminSessionDeprecatedDetails {
3472 s := new(EndedEnterpriseAdminSessionDeprecatedDetails)
3473 s.FederationExtraDetails = FederationExtraDetails
3474 return s
3475 }
3476
3477 // EndedEnterpriseAdminSessionDeprecatedType : has no documentation (yet)
3478 type EndedEnterpriseAdminSessionDeprecatedType struct {
3479 // Description : has no documentation (yet)
3480 Description string `json:"description"`
3481 }
3482
3483 // NewEndedEnterpriseAdminSessionDeprecatedType returns a new EndedEnterpriseAdminSessionDeprecatedType instance
3484 func NewEndedEnterpriseAdminSessionDeprecatedType(Description string) *EndedEnterpriseAdminSessionDeprecatedType {
3485 s := new(EndedEnterpriseAdminSessionDeprecatedType)
3486 s.Description = Description
3487 return s
3488 }
3489
3490 // EndedEnterpriseAdminSessionDetails : Ended enterprise admin session.
3491 type EndedEnterpriseAdminSessionDetails struct {
3492 }
3493
3494 // NewEndedEnterpriseAdminSessionDetails returns a new EndedEnterpriseAdminSessionDetails instance
3495 func NewEndedEnterpriseAdminSessionDetails() *EndedEnterpriseAdminSessionDetails {
3496 s := new(EndedEnterpriseAdminSessionDetails)
3497 return s
3498 }
3499
3500 // EndedEnterpriseAdminSessionType : has no documentation (yet)
3501 type EndedEnterpriseAdminSessionType struct {
3502 // Description : has no documentation (yet)
3503 Description string `json:"description"`
3504 }
3505
3506 // NewEndedEnterpriseAdminSessionType returns a new EndedEnterpriseAdminSessionType instance
3507 func NewEndedEnterpriseAdminSessionType(Description string) *EndedEnterpriseAdminSessionType {
3508 s := new(EndedEnterpriseAdminSessionType)
3509 s.Description = Description
3510 return s
3511 }
3512
3513 // EnforceLinkPasswordPolicy : Policy for deciding whether password must be
3514 // enforced when an externally shared link is updated
3515 type EnforceLinkPasswordPolicy struct {
3516 dropbox.Tagged
3517 }
3518
3519 // Valid tag values for EnforceLinkPasswordPolicy
3520 const (
3521 EnforceLinkPasswordPolicyOptional = "optional"
3522 EnforceLinkPasswordPolicyRequired = "required"
3523 EnforceLinkPasswordPolicyOther = "other"
3524 )
3525
3526 // EnterpriseSettingsLockingDetails : Changed who can update a setting.
3527 type EnterpriseSettingsLockingDetails struct {
3528 // TeamName : The secondary team name.
3529 TeamName string `json:"team_name"`
3530 // SettingsPageName : Settings page name.
3531 SettingsPageName string `json:"settings_page_name"`
3532 // PreviousSettingsPageLockingState : Previous locked settings page state.
3533 PreviousSettingsPageLockingState string `json:"previous_settings_page_locking_state"`
3534 // NewSettingsPageLockingState : New locked settings page state.
3535 NewSettingsPageLockingState string `json:"new_settings_page_locking_state"`
3536 }
3537
3538 // NewEnterpriseSettingsLockingDetails returns a new EnterpriseSettingsLockingDetails instance
3539 func NewEnterpriseSettingsLockingDetails(TeamName string, SettingsPageName string, PreviousSettingsPageLockingState string, NewSettingsPageLockingState string) *EnterpriseSettingsLockingDetails {
3540 s := new(EnterpriseSettingsLockingDetails)
3541 s.TeamName = TeamName
3542 s.SettingsPageName = SettingsPageName
3543 s.PreviousSettingsPageLockingState = PreviousSettingsPageLockingState
3544 s.NewSettingsPageLockingState = NewSettingsPageLockingState
3545 return s
3546 }
3547
3548 // EnterpriseSettingsLockingType : has no documentation (yet)
3549 type EnterpriseSettingsLockingType struct {
3550 // Description : has no documentation (yet)
3551 Description string `json:"description"`
3552 }
3553
3554 // NewEnterpriseSettingsLockingType returns a new EnterpriseSettingsLockingType instance
3555 func NewEnterpriseSettingsLockingType(Description string) *EnterpriseSettingsLockingType {
3556 s := new(EnterpriseSettingsLockingType)
3557 s.Description = Description
3558 return s
3559 }
3560
3561 // EventCategory : Category of events in event audit log.
3562 type EventCategory struct {
3563 dropbox.Tagged
3564 }
3565
3566 // Valid tag values for EventCategory
3567 const (
3568 EventCategoryAdminAlerting = "admin_alerting"
3569 EventCategoryApps = "apps"
3570 EventCategoryComments = "comments"
3571 EventCategoryDataGovernance = "data_governance"
3572 EventCategoryDevices = "devices"
3573 EventCategoryDomains = "domains"
3574 EventCategoryFileOperations = "file_operations"
3575 EventCategoryFileRequests = "file_requests"
3576 EventCategoryGroups = "groups"
3577 EventCategoryLogins = "logins"
3578 EventCategoryMembers = "members"
3579 EventCategoryPaper = "paper"
3580 EventCategoryPasswords = "passwords"
3581 EventCategoryReports = "reports"
3582 EventCategorySharing = "sharing"
3583 EventCategoryShowcase = "showcase"
3584 EventCategorySso = "sso"
3585 EventCategoryTeamFolders = "team_folders"
3586 EventCategoryTeamPolicies = "team_policies"
3587 EventCategoryTeamProfile = "team_profile"
3588 EventCategoryTfa = "tfa"
3589 EventCategoryTrustedTeams = "trusted_teams"
3590 EventCategoryOther = "other"
3591 )
3592
3593 // EventDetails : Additional fields depending on the event type.
3594 type EventDetails struct {
3595 dropbox.Tagged
3596 // AdminAlertingAlertStateChangedDetails : has no documentation (yet)
3597 AdminAlertingAlertStateChangedDetails *AdminAlertingAlertStateChangedDetails `json:"admin_alerting_alert_state_changed_details,omitempty"`
3598 // AdminAlertingChangedAlertConfigDetails : has no documentation (yet)
3599 AdminAlertingChangedAlertConfigDetails *AdminAlertingChangedAlertConfigDetails `json:"admin_alerting_changed_alert_config_details,omitempty"`
3600 // AdminAlertingTriggeredAlertDetails : has no documentation (yet)
3601 AdminAlertingTriggeredAlertDetails *AdminAlertingTriggeredAlertDetails `json:"admin_alerting_triggered_alert_details,omitempty"`
3602 // AppBlockedByPermissionsDetails : has no documentation (yet)
3603 AppBlockedByPermissionsDetails *AppBlockedByPermissionsDetails `json:"app_blocked_by_permissions_details,omitempty"`
3604 // AppLinkTeamDetails : has no documentation (yet)
3605 AppLinkTeamDetails *AppLinkTeamDetails `json:"app_link_team_details,omitempty"`
3606 // AppLinkUserDetails : has no documentation (yet)
3607 AppLinkUserDetails *AppLinkUserDetails `json:"app_link_user_details,omitempty"`
3608 // AppUnlinkTeamDetails : has no documentation (yet)
3609 AppUnlinkTeamDetails *AppUnlinkTeamDetails `json:"app_unlink_team_details,omitempty"`
3610 // AppUnlinkUserDetails : has no documentation (yet)
3611 AppUnlinkUserDetails *AppUnlinkUserDetails `json:"app_unlink_user_details,omitempty"`
3612 // IntegrationConnectedDetails : has no documentation (yet)
3613 IntegrationConnectedDetails *IntegrationConnectedDetails `json:"integration_connected_details,omitempty"`
3614 // IntegrationDisconnectedDetails : has no documentation (yet)
3615 IntegrationDisconnectedDetails *IntegrationDisconnectedDetails `json:"integration_disconnected_details,omitempty"`
3616 // FileAddCommentDetails : has no documentation (yet)
3617 FileAddCommentDetails *FileAddCommentDetails `json:"file_add_comment_details,omitempty"`
3618 // FileChangeCommentSubscriptionDetails : has no documentation (yet)
3619 FileChangeCommentSubscriptionDetails *FileChangeCommentSubscriptionDetails `json:"file_change_comment_subscription_details,omitempty"`
3620 // FileDeleteCommentDetails : has no documentation (yet)
3621 FileDeleteCommentDetails *FileDeleteCommentDetails `json:"file_delete_comment_details,omitempty"`
3622 // FileEditCommentDetails : has no documentation (yet)
3623 FileEditCommentDetails *FileEditCommentDetails `json:"file_edit_comment_details,omitempty"`
3624 // FileLikeCommentDetails : has no documentation (yet)
3625 FileLikeCommentDetails *FileLikeCommentDetails `json:"file_like_comment_details,omitempty"`
3626 // FileResolveCommentDetails : has no documentation (yet)
3627 FileResolveCommentDetails *FileResolveCommentDetails `json:"file_resolve_comment_details,omitempty"`
3628 // FileUnlikeCommentDetails : has no documentation (yet)
3629 FileUnlikeCommentDetails *FileUnlikeCommentDetails `json:"file_unlike_comment_details,omitempty"`
3630 // FileUnresolveCommentDetails : has no documentation (yet)
3631 FileUnresolveCommentDetails *FileUnresolveCommentDetails `json:"file_unresolve_comment_details,omitempty"`
3632 // GovernancePolicyAddFoldersDetails : has no documentation (yet)
3633 GovernancePolicyAddFoldersDetails *GovernancePolicyAddFoldersDetails `json:"governance_policy_add_folders_details,omitempty"`
3634 // GovernancePolicyAddFolderFailedDetails : has no documentation (yet)
3635 GovernancePolicyAddFolderFailedDetails *GovernancePolicyAddFolderFailedDetails `json:"governance_policy_add_folder_failed_details,omitempty"`
3636 // GovernancePolicyContentDisposedDetails : has no documentation (yet)
3637 GovernancePolicyContentDisposedDetails *GovernancePolicyContentDisposedDetails `json:"governance_policy_content_disposed_details,omitempty"`
3638 // GovernancePolicyCreateDetails : has no documentation (yet)
3639 GovernancePolicyCreateDetails *GovernancePolicyCreateDetails `json:"governance_policy_create_details,omitempty"`
3640 // GovernancePolicyDeleteDetails : has no documentation (yet)
3641 GovernancePolicyDeleteDetails *GovernancePolicyDeleteDetails `json:"governance_policy_delete_details,omitempty"`
3642 // GovernancePolicyEditDetailsDetails : has no documentation (yet)
3643 GovernancePolicyEditDetailsDetails *GovernancePolicyEditDetailsDetails `json:"governance_policy_edit_details_details,omitempty"`
3644 // GovernancePolicyEditDurationDetails : has no documentation (yet)
3645 GovernancePolicyEditDurationDetails *GovernancePolicyEditDurationDetails `json:"governance_policy_edit_duration_details,omitempty"`
3646 // GovernancePolicyExportCreatedDetails : has no documentation (yet)
3647 GovernancePolicyExportCreatedDetails *GovernancePolicyExportCreatedDetails `json:"governance_policy_export_created_details,omitempty"`
3648 // GovernancePolicyExportRemovedDetails : has no documentation (yet)
3649 GovernancePolicyExportRemovedDetails *GovernancePolicyExportRemovedDetails `json:"governance_policy_export_removed_details,omitempty"`
3650 // GovernancePolicyRemoveFoldersDetails : has no documentation (yet)
3651 GovernancePolicyRemoveFoldersDetails *GovernancePolicyRemoveFoldersDetails `json:"governance_policy_remove_folders_details,omitempty"`
3652 // GovernancePolicyReportCreatedDetails : has no documentation (yet)
3653 GovernancePolicyReportCreatedDetails *GovernancePolicyReportCreatedDetails `json:"governance_policy_report_created_details,omitempty"`
3654 // GovernancePolicyZipPartDownloadedDetails : has no documentation (yet)
3655 GovernancePolicyZipPartDownloadedDetails *GovernancePolicyZipPartDownloadedDetails `json:"governance_policy_zip_part_downloaded_details,omitempty"`
3656 // LegalHoldsActivateAHoldDetails : has no documentation (yet)
3657 LegalHoldsActivateAHoldDetails *LegalHoldsActivateAHoldDetails `json:"legal_holds_activate_a_hold_details,omitempty"`
3658 // LegalHoldsAddMembersDetails : has no documentation (yet)
3659 LegalHoldsAddMembersDetails *LegalHoldsAddMembersDetails `json:"legal_holds_add_members_details,omitempty"`
3660 // LegalHoldsChangeHoldDetailsDetails : has no documentation (yet)
3661 LegalHoldsChangeHoldDetailsDetails *LegalHoldsChangeHoldDetailsDetails `json:"legal_holds_change_hold_details_details,omitempty"`
3662 // LegalHoldsChangeHoldNameDetails : has no documentation (yet)
3663 LegalHoldsChangeHoldNameDetails *LegalHoldsChangeHoldNameDetails `json:"legal_holds_change_hold_name_details,omitempty"`
3664 // LegalHoldsExportAHoldDetails : has no documentation (yet)
3665 LegalHoldsExportAHoldDetails *LegalHoldsExportAHoldDetails `json:"legal_holds_export_a_hold_details,omitempty"`
3666 // LegalHoldsExportCancelledDetails : has no documentation (yet)
3667 LegalHoldsExportCancelledDetails *LegalHoldsExportCancelledDetails `json:"legal_holds_export_cancelled_details,omitempty"`
3668 // LegalHoldsExportDownloadedDetails : has no documentation (yet)
3669 LegalHoldsExportDownloadedDetails *LegalHoldsExportDownloadedDetails `json:"legal_holds_export_downloaded_details,omitempty"`
3670 // LegalHoldsExportRemovedDetails : has no documentation (yet)
3671 LegalHoldsExportRemovedDetails *LegalHoldsExportRemovedDetails `json:"legal_holds_export_removed_details,omitempty"`
3672 // LegalHoldsReleaseAHoldDetails : has no documentation (yet)
3673 LegalHoldsReleaseAHoldDetails *LegalHoldsReleaseAHoldDetails `json:"legal_holds_release_a_hold_details,omitempty"`
3674 // LegalHoldsRemoveMembersDetails : has no documentation (yet)
3675 LegalHoldsRemoveMembersDetails *LegalHoldsRemoveMembersDetails `json:"legal_holds_remove_members_details,omitempty"`
3676 // LegalHoldsReportAHoldDetails : has no documentation (yet)
3677 LegalHoldsReportAHoldDetails *LegalHoldsReportAHoldDetails `json:"legal_holds_report_a_hold_details,omitempty"`
3678 // DeviceChangeIpDesktopDetails : has no documentation (yet)
3679 DeviceChangeIpDesktopDetails *DeviceChangeIpDesktopDetails `json:"device_change_ip_desktop_details,omitempty"`
3680 // DeviceChangeIpMobileDetails : has no documentation (yet)
3681 DeviceChangeIpMobileDetails *DeviceChangeIpMobileDetails `json:"device_change_ip_mobile_details,omitempty"`
3682 // DeviceChangeIpWebDetails : has no documentation (yet)
3683 DeviceChangeIpWebDetails *DeviceChangeIpWebDetails `json:"device_change_ip_web_details,omitempty"`
3684 // DeviceDeleteOnUnlinkFailDetails : has no documentation (yet)
3685 DeviceDeleteOnUnlinkFailDetails *DeviceDeleteOnUnlinkFailDetails `json:"device_delete_on_unlink_fail_details,omitempty"`
3686 // DeviceDeleteOnUnlinkSuccessDetails : has no documentation (yet)
3687 DeviceDeleteOnUnlinkSuccessDetails *DeviceDeleteOnUnlinkSuccessDetails `json:"device_delete_on_unlink_success_details,omitempty"`
3688 // DeviceLinkFailDetails : has no documentation (yet)
3689 DeviceLinkFailDetails *DeviceLinkFailDetails `json:"device_link_fail_details,omitempty"`
3690 // DeviceLinkSuccessDetails : has no documentation (yet)
3691 DeviceLinkSuccessDetails *DeviceLinkSuccessDetails `json:"device_link_success_details,omitempty"`
3692 // DeviceManagementDisabledDetails : has no documentation (yet)
3693 DeviceManagementDisabledDetails *DeviceManagementDisabledDetails `json:"device_management_disabled_details,omitempty"`
3694 // DeviceManagementEnabledDetails : has no documentation (yet)
3695 DeviceManagementEnabledDetails *DeviceManagementEnabledDetails `json:"device_management_enabled_details,omitempty"`
3696 // DeviceSyncBackupStatusChangedDetails : has no documentation (yet)
3697 DeviceSyncBackupStatusChangedDetails *DeviceSyncBackupStatusChangedDetails `json:"device_sync_backup_status_changed_details,omitempty"`
3698 // DeviceUnlinkDetails : has no documentation (yet)
3699 DeviceUnlinkDetails *DeviceUnlinkDetails `json:"device_unlink_details,omitempty"`
3700 // DropboxPasswordsExportedDetails : has no documentation (yet)
3701 DropboxPasswordsExportedDetails *DropboxPasswordsExportedDetails `json:"dropbox_passwords_exported_details,omitempty"`
3702 // DropboxPasswordsNewDeviceEnrolledDetails : has no documentation (yet)
3703 DropboxPasswordsNewDeviceEnrolledDetails *DropboxPasswordsNewDeviceEnrolledDetails `json:"dropbox_passwords_new_device_enrolled_details,omitempty"`
3704 // EmmRefreshAuthTokenDetails : has no documentation (yet)
3705 EmmRefreshAuthTokenDetails *EmmRefreshAuthTokenDetails `json:"emm_refresh_auth_token_details,omitempty"`
3706 // AccountCaptureChangeAvailabilityDetails : has no documentation (yet)
3707 AccountCaptureChangeAvailabilityDetails *AccountCaptureChangeAvailabilityDetails `json:"account_capture_change_availability_details,omitempty"`
3708 // AccountCaptureMigrateAccountDetails : has no documentation (yet)
3709 AccountCaptureMigrateAccountDetails *AccountCaptureMigrateAccountDetails `json:"account_capture_migrate_account_details,omitempty"`
3710 // AccountCaptureNotificationEmailsSentDetails : has no documentation (yet)
3711 AccountCaptureNotificationEmailsSentDetails *AccountCaptureNotificationEmailsSentDetails `json:"account_capture_notification_emails_sent_details,omitempty"`
3712 // AccountCaptureRelinquishAccountDetails : has no documentation (yet)
3713 AccountCaptureRelinquishAccountDetails *AccountCaptureRelinquishAccountDetails `json:"account_capture_relinquish_account_details,omitempty"`
3714 // DisabledDomainInvitesDetails : has no documentation (yet)
3715 DisabledDomainInvitesDetails *DisabledDomainInvitesDetails `json:"disabled_domain_invites_details,omitempty"`
3716 // DomainInvitesApproveRequestToJoinTeamDetails : has no documentation (yet)
3717 DomainInvitesApproveRequestToJoinTeamDetails *DomainInvitesApproveRequestToJoinTeamDetails `json:"domain_invites_approve_request_to_join_team_details,omitempty"`
3718 // DomainInvitesDeclineRequestToJoinTeamDetails : has no documentation (yet)
3719 DomainInvitesDeclineRequestToJoinTeamDetails *DomainInvitesDeclineRequestToJoinTeamDetails `json:"domain_invites_decline_request_to_join_team_details,omitempty"`
3720 // DomainInvitesEmailExistingUsersDetails : has no documentation (yet)
3721 DomainInvitesEmailExistingUsersDetails *DomainInvitesEmailExistingUsersDetails `json:"domain_invites_email_existing_users_details,omitempty"`
3722 // DomainInvitesRequestToJoinTeamDetails : has no documentation (yet)
3723 DomainInvitesRequestToJoinTeamDetails *DomainInvitesRequestToJoinTeamDetails `json:"domain_invites_request_to_join_team_details,omitempty"`
3724 // DomainInvitesSetInviteNewUserPrefToNoDetails : has no documentation (yet)
3725 DomainInvitesSetInviteNewUserPrefToNoDetails *DomainInvitesSetInviteNewUserPrefToNoDetails `json:"domain_invites_set_invite_new_user_pref_to_no_details,omitempty"`
3726 // DomainInvitesSetInviteNewUserPrefToYesDetails : has no documentation
3727 // (yet)
3728 DomainInvitesSetInviteNewUserPrefToYesDetails *DomainInvitesSetInviteNewUserPrefToYesDetails `json:"domain_invites_set_invite_new_user_pref_to_yes_details,omitempty"`
3729 // DomainVerificationAddDomainFailDetails : has no documentation (yet)
3730 DomainVerificationAddDomainFailDetails *DomainVerificationAddDomainFailDetails `json:"domain_verification_add_domain_fail_details,omitempty"`
3731 // DomainVerificationAddDomainSuccessDetails : has no documentation (yet)
3732 DomainVerificationAddDomainSuccessDetails *DomainVerificationAddDomainSuccessDetails `json:"domain_verification_add_domain_success_details,omitempty"`
3733 // DomainVerificationRemoveDomainDetails : has no documentation (yet)
3734 DomainVerificationRemoveDomainDetails *DomainVerificationRemoveDomainDetails `json:"domain_verification_remove_domain_details,omitempty"`
3735 // EnabledDomainInvitesDetails : has no documentation (yet)
3736 EnabledDomainInvitesDetails *EnabledDomainInvitesDetails `json:"enabled_domain_invites_details,omitempty"`
3737 // ApplyNamingConventionDetails : has no documentation (yet)
3738 ApplyNamingConventionDetails *ApplyNamingConventionDetails `json:"apply_naming_convention_details,omitempty"`
3739 // CreateFolderDetails : has no documentation (yet)
3740 CreateFolderDetails *CreateFolderDetails `json:"create_folder_details,omitempty"`
3741 // FileAddDetails : has no documentation (yet)
3742 FileAddDetails *FileAddDetails `json:"file_add_details,omitempty"`
3743 // FileCopyDetails : has no documentation (yet)
3744 FileCopyDetails *FileCopyDetails `json:"file_copy_details,omitempty"`
3745 // FileDeleteDetails : has no documentation (yet)
3746 FileDeleteDetails *FileDeleteDetails `json:"file_delete_details,omitempty"`
3747 // FileDownloadDetails : has no documentation (yet)
3748 FileDownloadDetails *FileDownloadDetails `json:"file_download_details,omitempty"`
3749 // FileEditDetails : has no documentation (yet)
3750 FileEditDetails *FileEditDetails `json:"file_edit_details,omitempty"`
3751 // FileGetCopyReferenceDetails : has no documentation (yet)
3752 FileGetCopyReferenceDetails *FileGetCopyReferenceDetails `json:"file_get_copy_reference_details,omitempty"`
3753 // FileLockingLockStatusChangedDetails : has no documentation (yet)
3754 FileLockingLockStatusChangedDetails *FileLockingLockStatusChangedDetails `json:"file_locking_lock_status_changed_details,omitempty"`
3755 // FileMoveDetails : has no documentation (yet)
3756 FileMoveDetails *FileMoveDetails `json:"file_move_details,omitempty"`
3757 // FilePermanentlyDeleteDetails : has no documentation (yet)
3758 FilePermanentlyDeleteDetails *FilePermanentlyDeleteDetails `json:"file_permanently_delete_details,omitempty"`
3759 // FilePreviewDetails : has no documentation (yet)
3760 FilePreviewDetails *FilePreviewDetails `json:"file_preview_details,omitempty"`
3761 // FileRenameDetails : has no documentation (yet)
3762 FileRenameDetails *FileRenameDetails `json:"file_rename_details,omitempty"`
3763 // FileRestoreDetails : has no documentation (yet)
3764 FileRestoreDetails *FileRestoreDetails `json:"file_restore_details,omitempty"`
3765 // FileRevertDetails : has no documentation (yet)
3766 FileRevertDetails *FileRevertDetails `json:"file_revert_details,omitempty"`
3767 // FileRollbackChangesDetails : has no documentation (yet)
3768 FileRollbackChangesDetails *FileRollbackChangesDetails `json:"file_rollback_changes_details,omitempty"`
3769 // FileSaveCopyReferenceDetails : has no documentation (yet)
3770 FileSaveCopyReferenceDetails *FileSaveCopyReferenceDetails `json:"file_save_copy_reference_details,omitempty"`
3771 // FolderOverviewDescriptionChangedDetails : has no documentation (yet)
3772 FolderOverviewDescriptionChangedDetails *FolderOverviewDescriptionChangedDetails `json:"folder_overview_description_changed_details,omitempty"`
3773 // FolderOverviewItemPinnedDetails : has no documentation (yet)
3774 FolderOverviewItemPinnedDetails *FolderOverviewItemPinnedDetails `json:"folder_overview_item_pinned_details,omitempty"`
3775 // FolderOverviewItemUnpinnedDetails : has no documentation (yet)
3776 FolderOverviewItemUnpinnedDetails *FolderOverviewItemUnpinnedDetails `json:"folder_overview_item_unpinned_details,omitempty"`
3777 // ObjectLabelAddedDetails : has no documentation (yet)
3778 ObjectLabelAddedDetails *ObjectLabelAddedDetails `json:"object_label_added_details,omitempty"`
3779 // ObjectLabelRemovedDetails : has no documentation (yet)
3780 ObjectLabelRemovedDetails *ObjectLabelRemovedDetails `json:"object_label_removed_details,omitempty"`
3781 // ObjectLabelUpdatedValueDetails : has no documentation (yet)
3782 ObjectLabelUpdatedValueDetails *ObjectLabelUpdatedValueDetails `json:"object_label_updated_value_details,omitempty"`
3783 // OrganizeFolderWithTidyDetails : has no documentation (yet)
3784 OrganizeFolderWithTidyDetails *OrganizeFolderWithTidyDetails `json:"organize_folder_with_tidy_details,omitempty"`
3785 // RewindFolderDetails : has no documentation (yet)
3786 RewindFolderDetails *RewindFolderDetails `json:"rewind_folder_details,omitempty"`
3787 // UserTagsAddedDetails : has no documentation (yet)
3788 UserTagsAddedDetails *UserTagsAddedDetails `json:"user_tags_added_details,omitempty"`
3789 // UserTagsRemovedDetails : has no documentation (yet)
3790 UserTagsRemovedDetails *UserTagsRemovedDetails `json:"user_tags_removed_details,omitempty"`
3791 // FileRequestChangeDetails : has no documentation (yet)
3792 FileRequestChangeDetails *FileRequestChangeDetails `json:"file_request_change_details,omitempty"`
3793 // FileRequestCloseDetails : has no documentation (yet)
3794 FileRequestCloseDetails *FileRequestCloseDetails `json:"file_request_close_details,omitempty"`
3795 // FileRequestCreateDetails : has no documentation (yet)
3796 FileRequestCreateDetails *FileRequestCreateDetails `json:"file_request_create_details,omitempty"`
3797 // FileRequestDeleteDetails : has no documentation (yet)
3798 FileRequestDeleteDetails *FileRequestDeleteDetails `json:"file_request_delete_details,omitempty"`
3799 // FileRequestReceiveFileDetails : has no documentation (yet)
3800 FileRequestReceiveFileDetails *FileRequestReceiveFileDetails `json:"file_request_receive_file_details,omitempty"`
3801 // GroupAddExternalIdDetails : has no documentation (yet)
3802 GroupAddExternalIdDetails *GroupAddExternalIdDetails `json:"group_add_external_id_details,omitempty"`
3803 // GroupAddMemberDetails : has no documentation (yet)
3804 GroupAddMemberDetails *GroupAddMemberDetails `json:"group_add_member_details,omitempty"`
3805 // GroupChangeExternalIdDetails : has no documentation (yet)
3806 GroupChangeExternalIdDetails *GroupChangeExternalIdDetails `json:"group_change_external_id_details,omitempty"`
3807 // GroupChangeManagementTypeDetails : has no documentation (yet)
3808 GroupChangeManagementTypeDetails *GroupChangeManagementTypeDetails `json:"group_change_management_type_details,omitempty"`
3809 // GroupChangeMemberRoleDetails : has no documentation (yet)
3810 GroupChangeMemberRoleDetails *GroupChangeMemberRoleDetails `json:"group_change_member_role_details,omitempty"`
3811 // GroupCreateDetails : has no documentation (yet)
3812 GroupCreateDetails *GroupCreateDetails `json:"group_create_details,omitempty"`
3813 // GroupDeleteDetails : has no documentation (yet)
3814 GroupDeleteDetails *GroupDeleteDetails `json:"group_delete_details,omitempty"`
3815 // GroupDescriptionUpdatedDetails : has no documentation (yet)
3816 GroupDescriptionUpdatedDetails *GroupDescriptionUpdatedDetails `json:"group_description_updated_details,omitempty"`
3817 // GroupJoinPolicyUpdatedDetails : has no documentation (yet)
3818 GroupJoinPolicyUpdatedDetails *GroupJoinPolicyUpdatedDetails `json:"group_join_policy_updated_details,omitempty"`
3819 // GroupMovedDetails : has no documentation (yet)
3820 GroupMovedDetails *GroupMovedDetails `json:"group_moved_details,omitempty"`
3821 // GroupRemoveExternalIdDetails : has no documentation (yet)
3822 GroupRemoveExternalIdDetails *GroupRemoveExternalIdDetails `json:"group_remove_external_id_details,omitempty"`
3823 // GroupRemoveMemberDetails : has no documentation (yet)
3824 GroupRemoveMemberDetails *GroupRemoveMemberDetails `json:"group_remove_member_details,omitempty"`
3825 // GroupRenameDetails : has no documentation (yet)
3826 GroupRenameDetails *GroupRenameDetails `json:"group_rename_details,omitempty"`
3827 // AccountLockOrUnlockedDetails : has no documentation (yet)
3828 AccountLockOrUnlockedDetails *AccountLockOrUnlockedDetails `json:"account_lock_or_unlocked_details,omitempty"`
3829 // EmmErrorDetails : has no documentation (yet)
3830 EmmErrorDetails *EmmErrorDetails `json:"emm_error_details,omitempty"`
3831 // GuestAdminSignedInViaTrustedTeamsDetails : has no documentation (yet)
3832 GuestAdminSignedInViaTrustedTeamsDetails *GuestAdminSignedInViaTrustedTeamsDetails `json:"guest_admin_signed_in_via_trusted_teams_details,omitempty"`
3833 // GuestAdminSignedOutViaTrustedTeamsDetails : has no documentation (yet)
3834 GuestAdminSignedOutViaTrustedTeamsDetails *GuestAdminSignedOutViaTrustedTeamsDetails `json:"guest_admin_signed_out_via_trusted_teams_details,omitempty"`
3835 // LoginFailDetails : has no documentation (yet)
3836 LoginFailDetails *LoginFailDetails `json:"login_fail_details,omitempty"`
3837 // LoginSuccessDetails : has no documentation (yet)
3838 LoginSuccessDetails *LoginSuccessDetails `json:"login_success_details,omitempty"`
3839 // LogoutDetails : has no documentation (yet)
3840 LogoutDetails *LogoutDetails `json:"logout_details,omitempty"`
3841 // ResellerSupportSessionEndDetails : has no documentation (yet)
3842 ResellerSupportSessionEndDetails *ResellerSupportSessionEndDetails `json:"reseller_support_session_end_details,omitempty"`
3843 // ResellerSupportSessionStartDetails : has no documentation (yet)
3844 ResellerSupportSessionStartDetails *ResellerSupportSessionStartDetails `json:"reseller_support_session_start_details,omitempty"`
3845 // SignInAsSessionEndDetails : has no documentation (yet)
3846 SignInAsSessionEndDetails *SignInAsSessionEndDetails `json:"sign_in_as_session_end_details,omitempty"`
3847 // SignInAsSessionStartDetails : has no documentation (yet)
3848 SignInAsSessionStartDetails *SignInAsSessionStartDetails `json:"sign_in_as_session_start_details,omitempty"`
3849 // SsoErrorDetails : has no documentation (yet)
3850 SsoErrorDetails *SsoErrorDetails `json:"sso_error_details,omitempty"`
3851 // CreateTeamInviteLinkDetails : has no documentation (yet)
3852 CreateTeamInviteLinkDetails *CreateTeamInviteLinkDetails `json:"create_team_invite_link_details,omitempty"`
3853 // DeleteTeamInviteLinkDetails : has no documentation (yet)
3854 DeleteTeamInviteLinkDetails *DeleteTeamInviteLinkDetails `json:"delete_team_invite_link_details,omitempty"`
3855 // MemberAddExternalIdDetails : has no documentation (yet)
3856 MemberAddExternalIdDetails *MemberAddExternalIdDetails `json:"member_add_external_id_details,omitempty"`
3857 // MemberAddNameDetails : has no documentation (yet)
3858 MemberAddNameDetails *MemberAddNameDetails `json:"member_add_name_details,omitempty"`
3859 // MemberChangeAdminRoleDetails : has no documentation (yet)
3860 MemberChangeAdminRoleDetails *MemberChangeAdminRoleDetails `json:"member_change_admin_role_details,omitempty"`
3861 // MemberChangeEmailDetails : has no documentation (yet)
3862 MemberChangeEmailDetails *MemberChangeEmailDetails `json:"member_change_email_details,omitempty"`
3863 // MemberChangeExternalIdDetails : has no documentation (yet)
3864 MemberChangeExternalIdDetails *MemberChangeExternalIdDetails `json:"member_change_external_id_details,omitempty"`
3865 // MemberChangeMembershipTypeDetails : has no documentation (yet)
3866 MemberChangeMembershipTypeDetails *MemberChangeMembershipTypeDetails `json:"member_change_membership_type_details,omitempty"`
3867 // MemberChangeNameDetails : has no documentation (yet)
3868 MemberChangeNameDetails *MemberChangeNameDetails `json:"member_change_name_details,omitempty"`
3869 // MemberChangeResellerRoleDetails : has no documentation (yet)
3870 MemberChangeResellerRoleDetails *MemberChangeResellerRoleDetails `json:"member_change_reseller_role_details,omitempty"`
3871 // MemberChangeStatusDetails : has no documentation (yet)
3872 MemberChangeStatusDetails *MemberChangeStatusDetails `json:"member_change_status_details,omitempty"`
3873 // MemberDeleteManualContactsDetails : has no documentation (yet)
3874 MemberDeleteManualContactsDetails *MemberDeleteManualContactsDetails `json:"member_delete_manual_contacts_details,omitempty"`
3875 // MemberDeleteProfilePhotoDetails : has no documentation (yet)
3876 MemberDeleteProfilePhotoDetails *MemberDeleteProfilePhotoDetails `json:"member_delete_profile_photo_details,omitempty"`
3877 // MemberPermanentlyDeleteAccountContentsDetails : has no documentation
3878 // (yet)
3879 MemberPermanentlyDeleteAccountContentsDetails *MemberPermanentlyDeleteAccountContentsDetails `json:"member_permanently_delete_account_contents_details,omitempty"`
3880 // MemberRemoveExternalIdDetails : has no documentation (yet)
3881 MemberRemoveExternalIdDetails *MemberRemoveExternalIdDetails `json:"member_remove_external_id_details,omitempty"`
3882 // MemberSetProfilePhotoDetails : has no documentation (yet)
3883 MemberSetProfilePhotoDetails *MemberSetProfilePhotoDetails `json:"member_set_profile_photo_details,omitempty"`
3884 // MemberSpaceLimitsAddCustomQuotaDetails : has no documentation (yet)
3885 MemberSpaceLimitsAddCustomQuotaDetails *MemberSpaceLimitsAddCustomQuotaDetails `json:"member_space_limits_add_custom_quota_details,omitempty"`
3886 // MemberSpaceLimitsChangeCustomQuotaDetails : has no documentation (yet)
3887 MemberSpaceLimitsChangeCustomQuotaDetails *MemberSpaceLimitsChangeCustomQuotaDetails `json:"member_space_limits_change_custom_quota_details,omitempty"`
3888 // MemberSpaceLimitsChangeStatusDetails : has no documentation (yet)
3889 MemberSpaceLimitsChangeStatusDetails *MemberSpaceLimitsChangeStatusDetails `json:"member_space_limits_change_status_details,omitempty"`
3890 // MemberSpaceLimitsRemoveCustomQuotaDetails : has no documentation (yet)
3891 MemberSpaceLimitsRemoveCustomQuotaDetails *MemberSpaceLimitsRemoveCustomQuotaDetails `json:"member_space_limits_remove_custom_quota_details,omitempty"`
3892 // MemberSuggestDetails : has no documentation (yet)
3893 MemberSuggestDetails *MemberSuggestDetails `json:"member_suggest_details,omitempty"`
3894 // MemberTransferAccountContentsDetails : has no documentation (yet)
3895 MemberTransferAccountContentsDetails *MemberTransferAccountContentsDetails `json:"member_transfer_account_contents_details,omitempty"`
3896 // PendingSecondaryEmailAddedDetails : has no documentation (yet)
3897 PendingSecondaryEmailAddedDetails *PendingSecondaryEmailAddedDetails `json:"pending_secondary_email_added_details,omitempty"`
3898 // SecondaryEmailDeletedDetails : has no documentation (yet)
3899 SecondaryEmailDeletedDetails *SecondaryEmailDeletedDetails `json:"secondary_email_deleted_details,omitempty"`
3900 // SecondaryEmailVerifiedDetails : has no documentation (yet)
3901 SecondaryEmailVerifiedDetails *SecondaryEmailVerifiedDetails `json:"secondary_email_verified_details,omitempty"`
3902 // SecondaryMailsPolicyChangedDetails : has no documentation (yet)
3903 SecondaryMailsPolicyChangedDetails *SecondaryMailsPolicyChangedDetails `json:"secondary_mails_policy_changed_details,omitempty"`
3904 // BinderAddPageDetails : has no documentation (yet)
3905 BinderAddPageDetails *BinderAddPageDetails `json:"binder_add_page_details,omitempty"`
3906 // BinderAddSectionDetails : has no documentation (yet)
3907 BinderAddSectionDetails *BinderAddSectionDetails `json:"binder_add_section_details,omitempty"`
3908 // BinderRemovePageDetails : has no documentation (yet)
3909 BinderRemovePageDetails *BinderRemovePageDetails `json:"binder_remove_page_details,omitempty"`
3910 // BinderRemoveSectionDetails : has no documentation (yet)
3911 BinderRemoveSectionDetails *BinderRemoveSectionDetails `json:"binder_remove_section_details,omitempty"`
3912 // BinderRenamePageDetails : has no documentation (yet)
3913 BinderRenamePageDetails *BinderRenamePageDetails `json:"binder_rename_page_details,omitempty"`
3914 // BinderRenameSectionDetails : has no documentation (yet)
3915 BinderRenameSectionDetails *BinderRenameSectionDetails `json:"binder_rename_section_details,omitempty"`
3916 // BinderReorderPageDetails : has no documentation (yet)
3917 BinderReorderPageDetails *BinderReorderPageDetails `json:"binder_reorder_page_details,omitempty"`
3918 // BinderReorderSectionDetails : has no documentation (yet)
3919 BinderReorderSectionDetails *BinderReorderSectionDetails `json:"binder_reorder_section_details,omitempty"`
3920 // PaperContentAddMemberDetails : has no documentation (yet)
3921 PaperContentAddMemberDetails *PaperContentAddMemberDetails `json:"paper_content_add_member_details,omitempty"`
3922 // PaperContentAddToFolderDetails : has no documentation (yet)
3923 PaperContentAddToFolderDetails *PaperContentAddToFolderDetails `json:"paper_content_add_to_folder_details,omitempty"`
3924 // PaperContentArchiveDetails : has no documentation (yet)
3925 PaperContentArchiveDetails *PaperContentArchiveDetails `json:"paper_content_archive_details,omitempty"`
3926 // PaperContentCreateDetails : has no documentation (yet)
3927 PaperContentCreateDetails *PaperContentCreateDetails `json:"paper_content_create_details,omitempty"`
3928 // PaperContentPermanentlyDeleteDetails : has no documentation (yet)
3929 PaperContentPermanentlyDeleteDetails *PaperContentPermanentlyDeleteDetails `json:"paper_content_permanently_delete_details,omitempty"`
3930 // PaperContentRemoveFromFolderDetails : has no documentation (yet)
3931 PaperContentRemoveFromFolderDetails *PaperContentRemoveFromFolderDetails `json:"paper_content_remove_from_folder_details,omitempty"`
3932 // PaperContentRemoveMemberDetails : has no documentation (yet)
3933 PaperContentRemoveMemberDetails *PaperContentRemoveMemberDetails `json:"paper_content_remove_member_details,omitempty"`
3934 // PaperContentRenameDetails : has no documentation (yet)
3935 PaperContentRenameDetails *PaperContentRenameDetails `json:"paper_content_rename_details,omitempty"`
3936 // PaperContentRestoreDetails : has no documentation (yet)
3937 PaperContentRestoreDetails *PaperContentRestoreDetails `json:"paper_content_restore_details,omitempty"`
3938 // PaperDocAddCommentDetails : has no documentation (yet)
3939 PaperDocAddCommentDetails *PaperDocAddCommentDetails `json:"paper_doc_add_comment_details,omitempty"`
3940 // PaperDocChangeMemberRoleDetails : has no documentation (yet)
3941 PaperDocChangeMemberRoleDetails *PaperDocChangeMemberRoleDetails `json:"paper_doc_change_member_role_details,omitempty"`
3942 // PaperDocChangeSharingPolicyDetails : has no documentation (yet)
3943 PaperDocChangeSharingPolicyDetails *PaperDocChangeSharingPolicyDetails `json:"paper_doc_change_sharing_policy_details,omitempty"`
3944 // PaperDocChangeSubscriptionDetails : has no documentation (yet)
3945 PaperDocChangeSubscriptionDetails *PaperDocChangeSubscriptionDetails `json:"paper_doc_change_subscription_details,omitempty"`
3946 // PaperDocDeletedDetails : has no documentation (yet)
3947 PaperDocDeletedDetails *PaperDocDeletedDetails `json:"paper_doc_deleted_details,omitempty"`
3948 // PaperDocDeleteCommentDetails : has no documentation (yet)
3949 PaperDocDeleteCommentDetails *PaperDocDeleteCommentDetails `json:"paper_doc_delete_comment_details,omitempty"`
3950 // PaperDocDownloadDetails : has no documentation (yet)
3951 PaperDocDownloadDetails *PaperDocDownloadDetails `json:"paper_doc_download_details,omitempty"`
3952 // PaperDocEditDetails : has no documentation (yet)
3953 PaperDocEditDetails *PaperDocEditDetails `json:"paper_doc_edit_details,omitempty"`
3954 // PaperDocEditCommentDetails : has no documentation (yet)
3955 PaperDocEditCommentDetails *PaperDocEditCommentDetails `json:"paper_doc_edit_comment_details,omitempty"`
3956 // PaperDocFollowedDetails : has no documentation (yet)
3957 PaperDocFollowedDetails *PaperDocFollowedDetails `json:"paper_doc_followed_details,omitempty"`
3958 // PaperDocMentionDetails : has no documentation (yet)
3959 PaperDocMentionDetails *PaperDocMentionDetails `json:"paper_doc_mention_details,omitempty"`
3960 // PaperDocOwnershipChangedDetails : has no documentation (yet)
3961 PaperDocOwnershipChangedDetails *PaperDocOwnershipChangedDetails `json:"paper_doc_ownership_changed_details,omitempty"`
3962 // PaperDocRequestAccessDetails : has no documentation (yet)
3963 PaperDocRequestAccessDetails *PaperDocRequestAccessDetails `json:"paper_doc_request_access_details,omitempty"`
3964 // PaperDocResolveCommentDetails : has no documentation (yet)
3965 PaperDocResolveCommentDetails *PaperDocResolveCommentDetails `json:"paper_doc_resolve_comment_details,omitempty"`
3966 // PaperDocRevertDetails : has no documentation (yet)
3967 PaperDocRevertDetails *PaperDocRevertDetails `json:"paper_doc_revert_details,omitempty"`
3968 // PaperDocSlackShareDetails : has no documentation (yet)
3969 PaperDocSlackShareDetails *PaperDocSlackShareDetails `json:"paper_doc_slack_share_details,omitempty"`
3970 // PaperDocTeamInviteDetails : has no documentation (yet)
3971 PaperDocTeamInviteDetails *PaperDocTeamInviteDetails `json:"paper_doc_team_invite_details,omitempty"`
3972 // PaperDocTrashedDetails : has no documentation (yet)
3973 PaperDocTrashedDetails *PaperDocTrashedDetails `json:"paper_doc_trashed_details,omitempty"`
3974 // PaperDocUnresolveCommentDetails : has no documentation (yet)
3975 PaperDocUnresolveCommentDetails *PaperDocUnresolveCommentDetails `json:"paper_doc_unresolve_comment_details,omitempty"`
3976 // PaperDocUntrashedDetails : has no documentation (yet)
3977 PaperDocUntrashedDetails *PaperDocUntrashedDetails `json:"paper_doc_untrashed_details,omitempty"`
3978 // PaperDocViewDetails : has no documentation (yet)
3979 PaperDocViewDetails *PaperDocViewDetails `json:"paper_doc_view_details,omitempty"`
3980 // PaperExternalViewAllowDetails : has no documentation (yet)
3981 PaperExternalViewAllowDetails *PaperExternalViewAllowDetails `json:"paper_external_view_allow_details,omitempty"`
3982 // PaperExternalViewDefaultTeamDetails : has no documentation (yet)
3983 PaperExternalViewDefaultTeamDetails *PaperExternalViewDefaultTeamDetails `json:"paper_external_view_default_team_details,omitempty"`
3984 // PaperExternalViewForbidDetails : has no documentation (yet)
3985 PaperExternalViewForbidDetails *PaperExternalViewForbidDetails `json:"paper_external_view_forbid_details,omitempty"`
3986 // PaperFolderChangeSubscriptionDetails : has no documentation (yet)
3987 PaperFolderChangeSubscriptionDetails *PaperFolderChangeSubscriptionDetails `json:"paper_folder_change_subscription_details,omitempty"`
3988 // PaperFolderDeletedDetails : has no documentation (yet)
3989 PaperFolderDeletedDetails *PaperFolderDeletedDetails `json:"paper_folder_deleted_details,omitempty"`
3990 // PaperFolderFollowedDetails : has no documentation (yet)
3991 PaperFolderFollowedDetails *PaperFolderFollowedDetails `json:"paper_folder_followed_details,omitempty"`
3992 // PaperFolderTeamInviteDetails : has no documentation (yet)
3993 PaperFolderTeamInviteDetails *PaperFolderTeamInviteDetails `json:"paper_folder_team_invite_details,omitempty"`
3994 // PaperPublishedLinkChangePermissionDetails : has no documentation (yet)
3995 PaperPublishedLinkChangePermissionDetails *PaperPublishedLinkChangePermissionDetails `json:"paper_published_link_change_permission_details,omitempty"`
3996 // PaperPublishedLinkCreateDetails : has no documentation (yet)
3997 PaperPublishedLinkCreateDetails *PaperPublishedLinkCreateDetails `json:"paper_published_link_create_details,omitempty"`
3998 // PaperPublishedLinkDisabledDetails : has no documentation (yet)
3999 PaperPublishedLinkDisabledDetails *PaperPublishedLinkDisabledDetails `json:"paper_published_link_disabled_details,omitempty"`
4000 // PaperPublishedLinkViewDetails : has no documentation (yet)
4001 PaperPublishedLinkViewDetails *PaperPublishedLinkViewDetails `json:"paper_published_link_view_details,omitempty"`
4002 // PasswordChangeDetails : has no documentation (yet)
4003 PasswordChangeDetails *PasswordChangeDetails `json:"password_change_details,omitempty"`
4004 // PasswordResetDetails : has no documentation (yet)
4005 PasswordResetDetails *PasswordResetDetails `json:"password_reset_details,omitempty"`
4006 // PasswordResetAllDetails : has no documentation (yet)
4007 PasswordResetAllDetails *PasswordResetAllDetails `json:"password_reset_all_details,omitempty"`
4008 // ClassificationCreateReportDetails : has no documentation (yet)
4009 ClassificationCreateReportDetails *ClassificationCreateReportDetails `json:"classification_create_report_details,omitempty"`
4010 // ClassificationCreateReportFailDetails : has no documentation (yet)
4011 ClassificationCreateReportFailDetails *ClassificationCreateReportFailDetails `json:"classification_create_report_fail_details,omitempty"`
4012 // EmmCreateExceptionsReportDetails : has no documentation (yet)
4013 EmmCreateExceptionsReportDetails *EmmCreateExceptionsReportDetails `json:"emm_create_exceptions_report_details,omitempty"`
4014 // EmmCreateUsageReportDetails : has no documentation (yet)
4015 EmmCreateUsageReportDetails *EmmCreateUsageReportDetails `json:"emm_create_usage_report_details,omitempty"`
4016 // ExportMembersReportDetails : has no documentation (yet)
4017 ExportMembersReportDetails *ExportMembersReportDetails `json:"export_members_report_details,omitempty"`
4018 // ExportMembersReportFailDetails : has no documentation (yet)
4019 ExportMembersReportFailDetails *ExportMembersReportFailDetails `json:"export_members_report_fail_details,omitempty"`
4020 // ExternalSharingCreateReportDetails : has no documentation (yet)
4021 ExternalSharingCreateReportDetails *ExternalSharingCreateReportDetails `json:"external_sharing_create_report_details,omitempty"`
4022 // ExternalSharingReportFailedDetails : has no documentation (yet)
4023 ExternalSharingReportFailedDetails *ExternalSharingReportFailedDetails `json:"external_sharing_report_failed_details,omitempty"`
4024 // NoExpirationLinkGenCreateReportDetails : has no documentation (yet)
4025 NoExpirationLinkGenCreateReportDetails *NoExpirationLinkGenCreateReportDetails `json:"no_expiration_link_gen_create_report_details,omitempty"`
4026 // NoExpirationLinkGenReportFailedDetails : has no documentation (yet)
4027 NoExpirationLinkGenReportFailedDetails *NoExpirationLinkGenReportFailedDetails `json:"no_expiration_link_gen_report_failed_details,omitempty"`
4028 // NoPasswordLinkGenCreateReportDetails : has no documentation (yet)
4029 NoPasswordLinkGenCreateReportDetails *NoPasswordLinkGenCreateReportDetails `json:"no_password_link_gen_create_report_details,omitempty"`
4030 // NoPasswordLinkGenReportFailedDetails : has no documentation (yet)
4031 NoPasswordLinkGenReportFailedDetails *NoPasswordLinkGenReportFailedDetails `json:"no_password_link_gen_report_failed_details,omitempty"`
4032 // NoPasswordLinkViewCreateReportDetails : has no documentation (yet)
4033 NoPasswordLinkViewCreateReportDetails *NoPasswordLinkViewCreateReportDetails `json:"no_password_link_view_create_report_details,omitempty"`
4034 // NoPasswordLinkViewReportFailedDetails : has no documentation (yet)
4035 NoPasswordLinkViewReportFailedDetails *NoPasswordLinkViewReportFailedDetails `json:"no_password_link_view_report_failed_details,omitempty"`
4036 // OutdatedLinkViewCreateReportDetails : has no documentation (yet)
4037 OutdatedLinkViewCreateReportDetails *OutdatedLinkViewCreateReportDetails `json:"outdated_link_view_create_report_details,omitempty"`
4038 // OutdatedLinkViewReportFailedDetails : has no documentation (yet)
4039 OutdatedLinkViewReportFailedDetails *OutdatedLinkViewReportFailedDetails `json:"outdated_link_view_report_failed_details,omitempty"`
4040 // PaperAdminExportStartDetails : has no documentation (yet)
4041 PaperAdminExportStartDetails *PaperAdminExportStartDetails `json:"paper_admin_export_start_details,omitempty"`
4042 // SmartSyncCreateAdminPrivilegeReportDetails : has no documentation (yet)
4043 SmartSyncCreateAdminPrivilegeReportDetails *SmartSyncCreateAdminPrivilegeReportDetails `json:"smart_sync_create_admin_privilege_report_details,omitempty"`
4044 // TeamActivityCreateReportDetails : has no documentation (yet)
4045 TeamActivityCreateReportDetails *TeamActivityCreateReportDetails `json:"team_activity_create_report_details,omitempty"`
4046 // TeamActivityCreateReportFailDetails : has no documentation (yet)
4047 TeamActivityCreateReportFailDetails *TeamActivityCreateReportFailDetails `json:"team_activity_create_report_fail_details,omitempty"`
4048 // CollectionShareDetails : has no documentation (yet)
4049 CollectionShareDetails *CollectionShareDetails `json:"collection_share_details,omitempty"`
4050 // FileTransfersFileAddDetails : has no documentation (yet)
4051 FileTransfersFileAddDetails *FileTransfersFileAddDetails `json:"file_transfers_file_add_details,omitempty"`
4052 // FileTransfersTransferDeleteDetails : has no documentation (yet)
4053 FileTransfersTransferDeleteDetails *FileTransfersTransferDeleteDetails `json:"file_transfers_transfer_delete_details,omitempty"`
4054 // FileTransfersTransferDownloadDetails : has no documentation (yet)
4055 FileTransfersTransferDownloadDetails *FileTransfersTransferDownloadDetails `json:"file_transfers_transfer_download_details,omitempty"`
4056 // FileTransfersTransferSendDetails : has no documentation (yet)
4057 FileTransfersTransferSendDetails *FileTransfersTransferSendDetails `json:"file_transfers_transfer_send_details,omitempty"`
4058 // FileTransfersTransferViewDetails : has no documentation (yet)
4059 FileTransfersTransferViewDetails *FileTransfersTransferViewDetails `json:"file_transfers_transfer_view_details,omitempty"`
4060 // NoteAclInviteOnlyDetails : has no documentation (yet)
4061 NoteAclInviteOnlyDetails *NoteAclInviteOnlyDetails `json:"note_acl_invite_only_details,omitempty"`
4062 // NoteAclLinkDetails : has no documentation (yet)
4063 NoteAclLinkDetails *NoteAclLinkDetails `json:"note_acl_link_details,omitempty"`
4064 // NoteAclTeamLinkDetails : has no documentation (yet)
4065 NoteAclTeamLinkDetails *NoteAclTeamLinkDetails `json:"note_acl_team_link_details,omitempty"`
4066 // NoteSharedDetails : has no documentation (yet)
4067 NoteSharedDetails *NoteSharedDetails `json:"note_shared_details,omitempty"`
4068 // NoteShareReceiveDetails : has no documentation (yet)
4069 NoteShareReceiveDetails *NoteShareReceiveDetails `json:"note_share_receive_details,omitempty"`
4070 // OpenNoteSharedDetails : has no documentation (yet)
4071 OpenNoteSharedDetails *OpenNoteSharedDetails `json:"open_note_shared_details,omitempty"`
4072 // SfAddGroupDetails : has no documentation (yet)
4073 SfAddGroupDetails *SfAddGroupDetails `json:"sf_add_group_details,omitempty"`
4074 // SfAllowNonMembersToViewSharedLinksDetails : has no documentation (yet)
4075 SfAllowNonMembersToViewSharedLinksDetails *SfAllowNonMembersToViewSharedLinksDetails `json:"sf_allow_non_members_to_view_shared_links_details,omitempty"`
4076 // SfExternalInviteWarnDetails : has no documentation (yet)
4077 SfExternalInviteWarnDetails *SfExternalInviteWarnDetails `json:"sf_external_invite_warn_details,omitempty"`
4078 // SfFbInviteDetails : has no documentation (yet)
4079 SfFbInviteDetails *SfFbInviteDetails `json:"sf_fb_invite_details,omitempty"`
4080 // SfFbInviteChangeRoleDetails : has no documentation (yet)
4081 SfFbInviteChangeRoleDetails *SfFbInviteChangeRoleDetails `json:"sf_fb_invite_change_role_details,omitempty"`
4082 // SfFbUninviteDetails : has no documentation (yet)
4083 SfFbUninviteDetails *SfFbUninviteDetails `json:"sf_fb_uninvite_details,omitempty"`
4084 // SfInviteGroupDetails : has no documentation (yet)
4085 SfInviteGroupDetails *SfInviteGroupDetails `json:"sf_invite_group_details,omitempty"`
4086 // SfTeamGrantAccessDetails : has no documentation (yet)
4087 SfTeamGrantAccessDetails *SfTeamGrantAccessDetails `json:"sf_team_grant_access_details,omitempty"`
4088 // SfTeamInviteDetails : has no documentation (yet)
4089 SfTeamInviteDetails *SfTeamInviteDetails `json:"sf_team_invite_details,omitempty"`
4090 // SfTeamInviteChangeRoleDetails : has no documentation (yet)
4091 SfTeamInviteChangeRoleDetails *SfTeamInviteChangeRoleDetails `json:"sf_team_invite_change_role_details,omitempty"`
4092 // SfTeamJoinDetails : has no documentation (yet)
4093 SfTeamJoinDetails *SfTeamJoinDetails `json:"sf_team_join_details,omitempty"`
4094 // SfTeamJoinFromOobLinkDetails : has no documentation (yet)
4095 SfTeamJoinFromOobLinkDetails *SfTeamJoinFromOobLinkDetails `json:"sf_team_join_from_oob_link_details,omitempty"`
4096 // SfTeamUninviteDetails : has no documentation (yet)
4097 SfTeamUninviteDetails *SfTeamUninviteDetails `json:"sf_team_uninvite_details,omitempty"`
4098 // SharedContentAddInviteesDetails : has no documentation (yet)
4099 SharedContentAddInviteesDetails *SharedContentAddInviteesDetails `json:"shared_content_add_invitees_details,omitempty"`
4100 // SharedContentAddLinkExpiryDetails : has no documentation (yet)
4101 SharedContentAddLinkExpiryDetails *SharedContentAddLinkExpiryDetails `json:"shared_content_add_link_expiry_details,omitempty"`
4102 // SharedContentAddLinkPasswordDetails : has no documentation (yet)
4103 SharedContentAddLinkPasswordDetails *SharedContentAddLinkPasswordDetails `json:"shared_content_add_link_password_details,omitempty"`
4104 // SharedContentAddMemberDetails : has no documentation (yet)
4105 SharedContentAddMemberDetails *SharedContentAddMemberDetails `json:"shared_content_add_member_details,omitempty"`
4106 // SharedContentChangeDownloadsPolicyDetails : has no documentation (yet)
4107 SharedContentChangeDownloadsPolicyDetails *SharedContentChangeDownloadsPolicyDetails `json:"shared_content_change_downloads_policy_details,omitempty"`
4108 // SharedContentChangeInviteeRoleDetails : has no documentation (yet)
4109 SharedContentChangeInviteeRoleDetails *SharedContentChangeInviteeRoleDetails `json:"shared_content_change_invitee_role_details,omitempty"`
4110 // SharedContentChangeLinkAudienceDetails : has no documentation (yet)
4111 SharedContentChangeLinkAudienceDetails *SharedContentChangeLinkAudienceDetails `json:"shared_content_change_link_audience_details,omitempty"`
4112 // SharedContentChangeLinkExpiryDetails : has no documentation (yet)
4113 SharedContentChangeLinkExpiryDetails *SharedContentChangeLinkExpiryDetails `json:"shared_content_change_link_expiry_details,omitempty"`
4114 // SharedContentChangeLinkPasswordDetails : has no documentation (yet)
4115 SharedContentChangeLinkPasswordDetails *SharedContentChangeLinkPasswordDetails `json:"shared_content_change_link_password_details,omitempty"`
4116 // SharedContentChangeMemberRoleDetails : has no documentation (yet)
4117 SharedContentChangeMemberRoleDetails *SharedContentChangeMemberRoleDetails `json:"shared_content_change_member_role_details,omitempty"`
4118 // SharedContentChangeViewerInfoPolicyDetails : has no documentation (yet)
4119 SharedContentChangeViewerInfoPolicyDetails *SharedContentChangeViewerInfoPolicyDetails `json:"shared_content_change_viewer_info_policy_details,omitempty"`
4120 // SharedContentClaimInvitationDetails : has no documentation (yet)
4121 SharedContentClaimInvitationDetails *SharedContentClaimInvitationDetails `json:"shared_content_claim_invitation_details,omitempty"`
4122 // SharedContentCopyDetails : has no documentation (yet)
4123 SharedContentCopyDetails *SharedContentCopyDetails `json:"shared_content_copy_details,omitempty"`
4124 // SharedContentDownloadDetails : has no documentation (yet)
4125 SharedContentDownloadDetails *SharedContentDownloadDetails `json:"shared_content_download_details,omitempty"`
4126 // SharedContentRelinquishMembershipDetails : has no documentation (yet)
4127 SharedContentRelinquishMembershipDetails *SharedContentRelinquishMembershipDetails `json:"shared_content_relinquish_membership_details,omitempty"`
4128 // SharedContentRemoveInviteesDetails : has no documentation (yet)
4129 SharedContentRemoveInviteesDetails *SharedContentRemoveInviteesDetails `json:"shared_content_remove_invitees_details,omitempty"`
4130 // SharedContentRemoveLinkExpiryDetails : has no documentation (yet)
4131 SharedContentRemoveLinkExpiryDetails *SharedContentRemoveLinkExpiryDetails `json:"shared_content_remove_link_expiry_details,omitempty"`
4132 // SharedContentRemoveLinkPasswordDetails : has no documentation (yet)
4133 SharedContentRemoveLinkPasswordDetails *SharedContentRemoveLinkPasswordDetails `json:"shared_content_remove_link_password_details,omitempty"`
4134 // SharedContentRemoveMemberDetails : has no documentation (yet)
4135 SharedContentRemoveMemberDetails *SharedContentRemoveMemberDetails `json:"shared_content_remove_member_details,omitempty"`
4136 // SharedContentRequestAccessDetails : has no documentation (yet)
4137 SharedContentRequestAccessDetails *SharedContentRequestAccessDetails `json:"shared_content_request_access_details,omitempty"`
4138 // SharedContentRestoreInviteesDetails : has no documentation (yet)
4139 SharedContentRestoreInviteesDetails *SharedContentRestoreInviteesDetails `json:"shared_content_restore_invitees_details,omitempty"`
4140 // SharedContentRestoreMemberDetails : has no documentation (yet)
4141 SharedContentRestoreMemberDetails *SharedContentRestoreMemberDetails `json:"shared_content_restore_member_details,omitempty"`
4142 // SharedContentUnshareDetails : has no documentation (yet)
4143 SharedContentUnshareDetails *SharedContentUnshareDetails `json:"shared_content_unshare_details,omitempty"`
4144 // SharedContentViewDetails : has no documentation (yet)
4145 SharedContentViewDetails *SharedContentViewDetails `json:"shared_content_view_details,omitempty"`
4146 // SharedFolderChangeLinkPolicyDetails : has no documentation (yet)
4147 SharedFolderChangeLinkPolicyDetails *SharedFolderChangeLinkPolicyDetails `json:"shared_folder_change_link_policy_details,omitempty"`
4148 // SharedFolderChangeMembersInheritancePolicyDetails : has no documentation
4149 // (yet)
4150 SharedFolderChangeMembersInheritancePolicyDetails *SharedFolderChangeMembersInheritancePolicyDetails `json:"shared_folder_change_members_inheritance_policy_details,omitempty"`
4151 // SharedFolderChangeMembersManagementPolicyDetails : has no documentation
4152 // (yet)
4153 SharedFolderChangeMembersManagementPolicyDetails *SharedFolderChangeMembersManagementPolicyDetails `json:"shared_folder_change_members_management_policy_details,omitempty"`
4154 // SharedFolderChangeMembersPolicyDetails : has no documentation (yet)
4155 SharedFolderChangeMembersPolicyDetails *SharedFolderChangeMembersPolicyDetails `json:"shared_folder_change_members_policy_details,omitempty"`
4156 // SharedFolderCreateDetails : has no documentation (yet)
4157 SharedFolderCreateDetails *SharedFolderCreateDetails `json:"shared_folder_create_details,omitempty"`
4158 // SharedFolderDeclineInvitationDetails : has no documentation (yet)
4159 SharedFolderDeclineInvitationDetails *SharedFolderDeclineInvitationDetails `json:"shared_folder_decline_invitation_details,omitempty"`
4160 // SharedFolderMountDetails : has no documentation (yet)
4161 SharedFolderMountDetails *SharedFolderMountDetails `json:"shared_folder_mount_details,omitempty"`
4162 // SharedFolderNestDetails : has no documentation (yet)
4163 SharedFolderNestDetails *SharedFolderNestDetails `json:"shared_folder_nest_details,omitempty"`
4164 // SharedFolderTransferOwnershipDetails : has no documentation (yet)
4165 SharedFolderTransferOwnershipDetails *SharedFolderTransferOwnershipDetails `json:"shared_folder_transfer_ownership_details,omitempty"`
4166 // SharedFolderUnmountDetails : has no documentation (yet)
4167 SharedFolderUnmountDetails *SharedFolderUnmountDetails `json:"shared_folder_unmount_details,omitempty"`
4168 // SharedLinkAddExpiryDetails : has no documentation (yet)
4169 SharedLinkAddExpiryDetails *SharedLinkAddExpiryDetails `json:"shared_link_add_expiry_details,omitempty"`
4170 // SharedLinkChangeExpiryDetails : has no documentation (yet)
4171 SharedLinkChangeExpiryDetails *SharedLinkChangeExpiryDetails `json:"shared_link_change_expiry_details,omitempty"`
4172 // SharedLinkChangeVisibilityDetails : has no documentation (yet)
4173 SharedLinkChangeVisibilityDetails *SharedLinkChangeVisibilityDetails `json:"shared_link_change_visibility_details,omitempty"`
4174 // SharedLinkCopyDetails : has no documentation (yet)
4175 SharedLinkCopyDetails *SharedLinkCopyDetails `json:"shared_link_copy_details,omitempty"`
4176 // SharedLinkCreateDetails : has no documentation (yet)
4177 SharedLinkCreateDetails *SharedLinkCreateDetails `json:"shared_link_create_details,omitempty"`
4178 // SharedLinkDisableDetails : has no documentation (yet)
4179 SharedLinkDisableDetails *SharedLinkDisableDetails `json:"shared_link_disable_details,omitempty"`
4180 // SharedLinkDownloadDetails : has no documentation (yet)
4181 SharedLinkDownloadDetails *SharedLinkDownloadDetails `json:"shared_link_download_details,omitempty"`
4182 // SharedLinkRemoveExpiryDetails : has no documentation (yet)
4183 SharedLinkRemoveExpiryDetails *SharedLinkRemoveExpiryDetails `json:"shared_link_remove_expiry_details,omitempty"`
4184 // SharedLinkSettingsAddExpirationDetails : has no documentation (yet)
4185 SharedLinkSettingsAddExpirationDetails *SharedLinkSettingsAddExpirationDetails `json:"shared_link_settings_add_expiration_details,omitempty"`
4186 // SharedLinkSettingsAddPasswordDetails : has no documentation (yet)
4187 SharedLinkSettingsAddPasswordDetails *SharedLinkSettingsAddPasswordDetails `json:"shared_link_settings_add_password_details,omitempty"`
4188 // SharedLinkSettingsAllowDownloadDisabledDetails : has no documentation
4189 // (yet)
4190 SharedLinkSettingsAllowDownloadDisabledDetails *SharedLinkSettingsAllowDownloadDisabledDetails `json:"shared_link_settings_allow_download_disabled_details,omitempty"`
4191 // SharedLinkSettingsAllowDownloadEnabledDetails : has no documentation
4192 // (yet)
4193 SharedLinkSettingsAllowDownloadEnabledDetails *SharedLinkSettingsAllowDownloadEnabledDetails `json:"shared_link_settings_allow_download_enabled_details,omitempty"`
4194 // SharedLinkSettingsChangeAudienceDetails : has no documentation (yet)
4195 SharedLinkSettingsChangeAudienceDetails *SharedLinkSettingsChangeAudienceDetails `json:"shared_link_settings_change_audience_details,omitempty"`
4196 // SharedLinkSettingsChangeExpirationDetails : has no documentation (yet)
4197 SharedLinkSettingsChangeExpirationDetails *SharedLinkSettingsChangeExpirationDetails `json:"shared_link_settings_change_expiration_details,omitempty"`
4198 // SharedLinkSettingsChangePasswordDetails : has no documentation (yet)
4199 SharedLinkSettingsChangePasswordDetails *SharedLinkSettingsChangePasswordDetails `json:"shared_link_settings_change_password_details,omitempty"`
4200 // SharedLinkSettingsRemoveExpirationDetails : has no documentation (yet)
4201 SharedLinkSettingsRemoveExpirationDetails *SharedLinkSettingsRemoveExpirationDetails `json:"shared_link_settings_remove_expiration_details,omitempty"`
4202 // SharedLinkSettingsRemovePasswordDetails : has no documentation (yet)
4203 SharedLinkSettingsRemovePasswordDetails *SharedLinkSettingsRemovePasswordDetails `json:"shared_link_settings_remove_password_details,omitempty"`
4204 // SharedLinkShareDetails : has no documentation (yet)
4205 SharedLinkShareDetails *SharedLinkShareDetails `json:"shared_link_share_details,omitempty"`
4206 // SharedLinkViewDetails : has no documentation (yet)
4207 SharedLinkViewDetails *SharedLinkViewDetails `json:"shared_link_view_details,omitempty"`
4208 // SharedNoteOpenedDetails : has no documentation (yet)
4209 SharedNoteOpenedDetails *SharedNoteOpenedDetails `json:"shared_note_opened_details,omitempty"`
4210 // ShmodelDisableDownloadsDetails : has no documentation (yet)
4211 ShmodelDisableDownloadsDetails *ShmodelDisableDownloadsDetails `json:"shmodel_disable_downloads_details,omitempty"`
4212 // ShmodelEnableDownloadsDetails : has no documentation (yet)
4213 ShmodelEnableDownloadsDetails *ShmodelEnableDownloadsDetails `json:"shmodel_enable_downloads_details,omitempty"`
4214 // ShmodelGroupShareDetails : has no documentation (yet)
4215 ShmodelGroupShareDetails *ShmodelGroupShareDetails `json:"shmodel_group_share_details,omitempty"`
4216 // ShowcaseAccessGrantedDetails : has no documentation (yet)
4217 ShowcaseAccessGrantedDetails *ShowcaseAccessGrantedDetails `json:"showcase_access_granted_details,omitempty"`
4218 // ShowcaseAddMemberDetails : has no documentation (yet)
4219 ShowcaseAddMemberDetails *ShowcaseAddMemberDetails `json:"showcase_add_member_details,omitempty"`
4220 // ShowcaseArchivedDetails : has no documentation (yet)
4221 ShowcaseArchivedDetails *ShowcaseArchivedDetails `json:"showcase_archived_details,omitempty"`
4222 // ShowcaseCreatedDetails : has no documentation (yet)
4223 ShowcaseCreatedDetails *ShowcaseCreatedDetails `json:"showcase_created_details,omitempty"`
4224 // ShowcaseDeleteCommentDetails : has no documentation (yet)
4225 ShowcaseDeleteCommentDetails *ShowcaseDeleteCommentDetails `json:"showcase_delete_comment_details,omitempty"`
4226 // ShowcaseEditedDetails : has no documentation (yet)
4227 ShowcaseEditedDetails *ShowcaseEditedDetails `json:"showcase_edited_details,omitempty"`
4228 // ShowcaseEditCommentDetails : has no documentation (yet)
4229 ShowcaseEditCommentDetails *ShowcaseEditCommentDetails `json:"showcase_edit_comment_details,omitempty"`
4230 // ShowcaseFileAddedDetails : has no documentation (yet)
4231 ShowcaseFileAddedDetails *ShowcaseFileAddedDetails `json:"showcase_file_added_details,omitempty"`
4232 // ShowcaseFileDownloadDetails : has no documentation (yet)
4233 ShowcaseFileDownloadDetails *ShowcaseFileDownloadDetails `json:"showcase_file_download_details,omitempty"`
4234 // ShowcaseFileRemovedDetails : has no documentation (yet)
4235 ShowcaseFileRemovedDetails *ShowcaseFileRemovedDetails `json:"showcase_file_removed_details,omitempty"`
4236 // ShowcaseFileViewDetails : has no documentation (yet)
4237 ShowcaseFileViewDetails *ShowcaseFileViewDetails `json:"showcase_file_view_details,omitempty"`
4238 // ShowcasePermanentlyDeletedDetails : has no documentation (yet)
4239 ShowcasePermanentlyDeletedDetails *ShowcasePermanentlyDeletedDetails `json:"showcase_permanently_deleted_details,omitempty"`
4240 // ShowcasePostCommentDetails : has no documentation (yet)
4241 ShowcasePostCommentDetails *ShowcasePostCommentDetails `json:"showcase_post_comment_details,omitempty"`
4242 // ShowcaseRemoveMemberDetails : has no documentation (yet)
4243 ShowcaseRemoveMemberDetails *ShowcaseRemoveMemberDetails `json:"showcase_remove_member_details,omitempty"`
4244 // ShowcaseRenamedDetails : has no documentation (yet)
4245 ShowcaseRenamedDetails *ShowcaseRenamedDetails `json:"showcase_renamed_details,omitempty"`
4246 // ShowcaseRequestAccessDetails : has no documentation (yet)
4247 ShowcaseRequestAccessDetails *ShowcaseRequestAccessDetails `json:"showcase_request_access_details,omitempty"`
4248 // ShowcaseResolveCommentDetails : has no documentation (yet)
4249 ShowcaseResolveCommentDetails *ShowcaseResolveCommentDetails `json:"showcase_resolve_comment_details,omitempty"`
4250 // ShowcaseRestoredDetails : has no documentation (yet)
4251 ShowcaseRestoredDetails *ShowcaseRestoredDetails `json:"showcase_restored_details,omitempty"`
4252 // ShowcaseTrashedDetails : has no documentation (yet)
4253 ShowcaseTrashedDetails *ShowcaseTrashedDetails `json:"showcase_trashed_details,omitempty"`
4254 // ShowcaseTrashedDeprecatedDetails : has no documentation (yet)
4255 ShowcaseTrashedDeprecatedDetails *ShowcaseTrashedDeprecatedDetails `json:"showcase_trashed_deprecated_details,omitempty"`
4256 // ShowcaseUnresolveCommentDetails : has no documentation (yet)
4257 ShowcaseUnresolveCommentDetails *ShowcaseUnresolveCommentDetails `json:"showcase_unresolve_comment_details,omitempty"`
4258 // ShowcaseUntrashedDetails : has no documentation (yet)
4259 ShowcaseUntrashedDetails *ShowcaseUntrashedDetails `json:"showcase_untrashed_details,omitempty"`
4260 // ShowcaseUntrashedDeprecatedDetails : has no documentation (yet)
4261 ShowcaseUntrashedDeprecatedDetails *ShowcaseUntrashedDeprecatedDetails `json:"showcase_untrashed_deprecated_details,omitempty"`
4262 // ShowcaseViewDetails : has no documentation (yet)
4263 ShowcaseViewDetails *ShowcaseViewDetails `json:"showcase_view_details,omitempty"`
4264 // SsoAddCertDetails : has no documentation (yet)
4265 SsoAddCertDetails *SsoAddCertDetails `json:"sso_add_cert_details,omitempty"`
4266 // SsoAddLoginUrlDetails : has no documentation (yet)
4267 SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"`
4268 // SsoAddLogoutUrlDetails : has no documentation (yet)
4269 SsoAddLogoutUrlDetails *SsoAddLogoutUrlDetails `json:"sso_add_logout_url_details,omitempty"`
4270 // SsoChangeCertDetails : has no documentation (yet)
4271 SsoChangeCertDetails *SsoChangeCertDetails `json:"sso_change_cert_details,omitempty"`
4272 // SsoChangeLoginUrlDetails : has no documentation (yet)
4273 SsoChangeLoginUrlDetails *SsoChangeLoginUrlDetails `json:"sso_change_login_url_details,omitempty"`
4274 // SsoChangeLogoutUrlDetails : has no documentation (yet)
4275 SsoChangeLogoutUrlDetails *SsoChangeLogoutUrlDetails `json:"sso_change_logout_url_details,omitempty"`
4276 // SsoChangeSamlIdentityModeDetails : has no documentation (yet)
4277 SsoChangeSamlIdentityModeDetails *SsoChangeSamlIdentityModeDetails `json:"sso_change_saml_identity_mode_details,omitempty"`
4278 // SsoRemoveCertDetails : has no documentation (yet)
4279 SsoRemoveCertDetails *SsoRemoveCertDetails `json:"sso_remove_cert_details,omitempty"`
4280 // SsoRemoveLoginUrlDetails : has no documentation (yet)
4281 SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"`
4282 // SsoRemoveLogoutUrlDetails : has no documentation (yet)
4283 SsoRemoveLogoutUrlDetails *SsoRemoveLogoutUrlDetails `json:"sso_remove_logout_url_details,omitempty"`
4284 // TeamFolderChangeStatusDetails : has no documentation (yet)
4285 TeamFolderChangeStatusDetails *TeamFolderChangeStatusDetails `json:"team_folder_change_status_details,omitempty"`
4286 // TeamFolderCreateDetails : has no documentation (yet)
4287 TeamFolderCreateDetails *TeamFolderCreateDetails `json:"team_folder_create_details,omitempty"`
4288 // TeamFolderDowngradeDetails : has no documentation (yet)
4289 TeamFolderDowngradeDetails *TeamFolderDowngradeDetails `json:"team_folder_downgrade_details,omitempty"`
4290 // TeamFolderPermanentlyDeleteDetails : has no documentation (yet)
4291 TeamFolderPermanentlyDeleteDetails *TeamFolderPermanentlyDeleteDetails `json:"team_folder_permanently_delete_details,omitempty"`
4292 // TeamFolderRenameDetails : has no documentation (yet)
4293 TeamFolderRenameDetails *TeamFolderRenameDetails `json:"team_folder_rename_details,omitempty"`
4294 // TeamSelectiveSyncSettingsChangedDetails : has no documentation (yet)
4295 TeamSelectiveSyncSettingsChangedDetails *TeamSelectiveSyncSettingsChangedDetails `json:"team_selective_sync_settings_changed_details,omitempty"`
4296 // AccountCaptureChangePolicyDetails : has no documentation (yet)
4297 AccountCaptureChangePolicyDetails *AccountCaptureChangePolicyDetails `json:"account_capture_change_policy_details,omitempty"`
4298 // AllowDownloadDisabledDetails : has no documentation (yet)
4299 AllowDownloadDisabledDetails *AllowDownloadDisabledDetails `json:"allow_download_disabled_details,omitempty"`
4300 // AllowDownloadEnabledDetails : has no documentation (yet)
4301 AllowDownloadEnabledDetails *AllowDownloadEnabledDetails `json:"allow_download_enabled_details,omitempty"`
4302 // AppPermissionsChangedDetails : has no documentation (yet)
4303 AppPermissionsChangedDetails *AppPermissionsChangedDetails `json:"app_permissions_changed_details,omitempty"`
4304 // CameraUploadsPolicyChangedDetails : has no documentation (yet)
4305 CameraUploadsPolicyChangedDetails *CameraUploadsPolicyChangedDetails `json:"camera_uploads_policy_changed_details,omitempty"`
4306 // ClassificationChangePolicyDetails : has no documentation (yet)
4307 ClassificationChangePolicyDetails *ClassificationChangePolicyDetails `json:"classification_change_policy_details,omitempty"`
4308 // ComputerBackupPolicyChangedDetails : has no documentation (yet)
4309 ComputerBackupPolicyChangedDetails *ComputerBackupPolicyChangedDetails `json:"computer_backup_policy_changed_details,omitempty"`
4310 // ContentAdministrationPolicyChangedDetails : has no documentation (yet)
4311 ContentAdministrationPolicyChangedDetails *ContentAdministrationPolicyChangedDetails `json:"content_administration_policy_changed_details,omitempty"`
4312 // DataPlacementRestrictionChangePolicyDetails : has no documentation (yet)
4313 DataPlacementRestrictionChangePolicyDetails *DataPlacementRestrictionChangePolicyDetails `json:"data_placement_restriction_change_policy_details,omitempty"`
4314 // DataPlacementRestrictionSatisfyPolicyDetails : has no documentation (yet)
4315 DataPlacementRestrictionSatisfyPolicyDetails *DataPlacementRestrictionSatisfyPolicyDetails `json:"data_placement_restriction_satisfy_policy_details,omitempty"`
4316 // DeviceApprovalsAddExceptionDetails : has no documentation (yet)
4317 DeviceApprovalsAddExceptionDetails *DeviceApprovalsAddExceptionDetails `json:"device_approvals_add_exception_details,omitempty"`
4318 // DeviceApprovalsChangeDesktopPolicyDetails : has no documentation (yet)
4319 DeviceApprovalsChangeDesktopPolicyDetails *DeviceApprovalsChangeDesktopPolicyDetails `json:"device_approvals_change_desktop_policy_details,omitempty"`
4320 // DeviceApprovalsChangeMobilePolicyDetails : has no documentation (yet)
4321 DeviceApprovalsChangeMobilePolicyDetails *DeviceApprovalsChangeMobilePolicyDetails `json:"device_approvals_change_mobile_policy_details,omitempty"`
4322 // DeviceApprovalsChangeOverageActionDetails : has no documentation (yet)
4323 DeviceApprovalsChangeOverageActionDetails *DeviceApprovalsChangeOverageActionDetails `json:"device_approvals_change_overage_action_details,omitempty"`
4324 // DeviceApprovalsChangeUnlinkActionDetails : has no documentation (yet)
4325 DeviceApprovalsChangeUnlinkActionDetails *DeviceApprovalsChangeUnlinkActionDetails `json:"device_approvals_change_unlink_action_details,omitempty"`
4326 // DeviceApprovalsRemoveExceptionDetails : has no documentation (yet)
4327 DeviceApprovalsRemoveExceptionDetails *DeviceApprovalsRemoveExceptionDetails `json:"device_approvals_remove_exception_details,omitempty"`
4328 // DirectoryRestrictionsAddMembersDetails : has no documentation (yet)
4329 DirectoryRestrictionsAddMembersDetails *DirectoryRestrictionsAddMembersDetails `json:"directory_restrictions_add_members_details,omitempty"`
4330 // DirectoryRestrictionsRemoveMembersDetails : has no documentation (yet)
4331 DirectoryRestrictionsRemoveMembersDetails *DirectoryRestrictionsRemoveMembersDetails `json:"directory_restrictions_remove_members_details,omitempty"`
4332 // EmmAddExceptionDetails : has no documentation (yet)
4333 EmmAddExceptionDetails *EmmAddExceptionDetails `json:"emm_add_exception_details,omitempty"`
4334 // EmmChangePolicyDetails : has no documentation (yet)
4335 EmmChangePolicyDetails *EmmChangePolicyDetails `json:"emm_change_policy_details,omitempty"`
4336 // EmmRemoveExceptionDetails : has no documentation (yet)
4337 EmmRemoveExceptionDetails *EmmRemoveExceptionDetails `json:"emm_remove_exception_details,omitempty"`
4338 // ExtendedVersionHistoryChangePolicyDetails : has no documentation (yet)
4339 ExtendedVersionHistoryChangePolicyDetails *ExtendedVersionHistoryChangePolicyDetails `json:"extended_version_history_change_policy_details,omitempty"`
4340 // FileCommentsChangePolicyDetails : has no documentation (yet)
4341 FileCommentsChangePolicyDetails *FileCommentsChangePolicyDetails `json:"file_comments_change_policy_details,omitempty"`
4342 // FileLockingPolicyChangedDetails : has no documentation (yet)
4343 FileLockingPolicyChangedDetails *FileLockingPolicyChangedDetails `json:"file_locking_policy_changed_details,omitempty"`
4344 // FileRequestsChangePolicyDetails : has no documentation (yet)
4345 FileRequestsChangePolicyDetails *FileRequestsChangePolicyDetails `json:"file_requests_change_policy_details,omitempty"`
4346 // FileRequestsEmailsEnabledDetails : has no documentation (yet)
4347 FileRequestsEmailsEnabledDetails *FileRequestsEmailsEnabledDetails `json:"file_requests_emails_enabled_details,omitempty"`
4348 // FileRequestsEmailsRestrictedToTeamOnlyDetails : has no documentation
4349 // (yet)
4350 FileRequestsEmailsRestrictedToTeamOnlyDetails *FileRequestsEmailsRestrictedToTeamOnlyDetails `json:"file_requests_emails_restricted_to_team_only_details,omitempty"`
4351 // FileTransfersPolicyChangedDetails : has no documentation (yet)
4352 FileTransfersPolicyChangedDetails *FileTransfersPolicyChangedDetails `json:"file_transfers_policy_changed_details,omitempty"`
4353 // GoogleSsoChangePolicyDetails : has no documentation (yet)
4354 GoogleSsoChangePolicyDetails *GoogleSsoChangePolicyDetails `json:"google_sso_change_policy_details,omitempty"`
4355 // GroupUserManagementChangePolicyDetails : has no documentation (yet)
4356 GroupUserManagementChangePolicyDetails *GroupUserManagementChangePolicyDetails `json:"group_user_management_change_policy_details,omitempty"`
4357 // IntegrationPolicyChangedDetails : has no documentation (yet)
4358 IntegrationPolicyChangedDetails *IntegrationPolicyChangedDetails `json:"integration_policy_changed_details,omitempty"`
4359 // InviteAcceptanceEmailPolicyChangedDetails : has no documentation (yet)
4360 InviteAcceptanceEmailPolicyChangedDetails *InviteAcceptanceEmailPolicyChangedDetails `json:"invite_acceptance_email_policy_changed_details,omitempty"`
4361 // MemberRequestsChangePolicyDetails : has no documentation (yet)
4362 MemberRequestsChangePolicyDetails *MemberRequestsChangePolicyDetails `json:"member_requests_change_policy_details,omitempty"`
4363 // MemberSendInvitePolicyChangedDetails : has no documentation (yet)
4364 MemberSendInvitePolicyChangedDetails *MemberSendInvitePolicyChangedDetails `json:"member_send_invite_policy_changed_details,omitempty"`
4365 // MemberSpaceLimitsAddExceptionDetails : has no documentation (yet)
4366 MemberSpaceLimitsAddExceptionDetails *MemberSpaceLimitsAddExceptionDetails `json:"member_space_limits_add_exception_details,omitempty"`
4367 // MemberSpaceLimitsChangeCapsTypePolicyDetails : has no documentation (yet)
4368 MemberSpaceLimitsChangeCapsTypePolicyDetails *MemberSpaceLimitsChangeCapsTypePolicyDetails `json:"member_space_limits_change_caps_type_policy_details,omitempty"`
4369 // MemberSpaceLimitsChangePolicyDetails : has no documentation (yet)
4370 MemberSpaceLimitsChangePolicyDetails *MemberSpaceLimitsChangePolicyDetails `json:"member_space_limits_change_policy_details,omitempty"`
4371 // MemberSpaceLimitsRemoveExceptionDetails : has no documentation (yet)
4372 MemberSpaceLimitsRemoveExceptionDetails *MemberSpaceLimitsRemoveExceptionDetails `json:"member_space_limits_remove_exception_details,omitempty"`
4373 // MemberSuggestionsChangePolicyDetails : has no documentation (yet)
4374 MemberSuggestionsChangePolicyDetails *MemberSuggestionsChangePolicyDetails `json:"member_suggestions_change_policy_details,omitempty"`
4375 // MicrosoftOfficeAddinChangePolicyDetails : has no documentation (yet)
4376 MicrosoftOfficeAddinChangePolicyDetails *MicrosoftOfficeAddinChangePolicyDetails `json:"microsoft_office_addin_change_policy_details,omitempty"`
4377 // NetworkControlChangePolicyDetails : has no documentation (yet)
4378 NetworkControlChangePolicyDetails *NetworkControlChangePolicyDetails `json:"network_control_change_policy_details,omitempty"`
4379 // PaperChangeDeploymentPolicyDetails : has no documentation (yet)
4380 PaperChangeDeploymentPolicyDetails *PaperChangeDeploymentPolicyDetails `json:"paper_change_deployment_policy_details,omitempty"`
4381 // PaperChangeMemberLinkPolicyDetails : has no documentation (yet)
4382 PaperChangeMemberLinkPolicyDetails *PaperChangeMemberLinkPolicyDetails `json:"paper_change_member_link_policy_details,omitempty"`
4383 // PaperChangeMemberPolicyDetails : has no documentation (yet)
4384 PaperChangeMemberPolicyDetails *PaperChangeMemberPolicyDetails `json:"paper_change_member_policy_details,omitempty"`
4385 // PaperChangePolicyDetails : has no documentation (yet)
4386 PaperChangePolicyDetails *PaperChangePolicyDetails `json:"paper_change_policy_details,omitempty"`
4387 // PaperDefaultFolderPolicyChangedDetails : has no documentation (yet)
4388 PaperDefaultFolderPolicyChangedDetails *PaperDefaultFolderPolicyChangedDetails `json:"paper_default_folder_policy_changed_details,omitempty"`
4389 // PaperDesktopPolicyChangedDetails : has no documentation (yet)
4390 PaperDesktopPolicyChangedDetails *PaperDesktopPolicyChangedDetails `json:"paper_desktop_policy_changed_details,omitempty"`
4391 // PaperEnabledUsersGroupAdditionDetails : has no documentation (yet)
4392 PaperEnabledUsersGroupAdditionDetails *PaperEnabledUsersGroupAdditionDetails `json:"paper_enabled_users_group_addition_details,omitempty"`
4393 // PaperEnabledUsersGroupRemovalDetails : has no documentation (yet)
4394 PaperEnabledUsersGroupRemovalDetails *PaperEnabledUsersGroupRemovalDetails `json:"paper_enabled_users_group_removal_details,omitempty"`
4395 // PasswordStrengthRequirementsChangePolicyDetails : has no documentation
4396 // (yet)
4397 PasswordStrengthRequirementsChangePolicyDetails *PasswordStrengthRequirementsChangePolicyDetails `json:"password_strength_requirements_change_policy_details,omitempty"`
4398 // PermanentDeleteChangePolicyDetails : has no documentation (yet)
4399 PermanentDeleteChangePolicyDetails *PermanentDeleteChangePolicyDetails `json:"permanent_delete_change_policy_details,omitempty"`
4400 // ResellerSupportChangePolicyDetails : has no documentation (yet)
4401 ResellerSupportChangePolicyDetails *ResellerSupportChangePolicyDetails `json:"reseller_support_change_policy_details,omitempty"`
4402 // RewindPolicyChangedDetails : has no documentation (yet)
4403 RewindPolicyChangedDetails *RewindPolicyChangedDetails `json:"rewind_policy_changed_details,omitempty"`
4404 // SendForSignaturePolicyChangedDetails : has no documentation (yet)
4405 SendForSignaturePolicyChangedDetails *SendForSignaturePolicyChangedDetails `json:"send_for_signature_policy_changed_details,omitempty"`
4406 // SharingChangeFolderJoinPolicyDetails : has no documentation (yet)
4407 SharingChangeFolderJoinPolicyDetails *SharingChangeFolderJoinPolicyDetails `json:"sharing_change_folder_join_policy_details,omitempty"`
4408 // SharingChangeLinkAllowChangeExpirationPolicyDetails : has no
4409 // documentation (yet)
4410 SharingChangeLinkAllowChangeExpirationPolicyDetails *SharingChangeLinkAllowChangeExpirationPolicyDetails `json:"sharing_change_link_allow_change_expiration_policy_details,omitempty"`
4411 // SharingChangeLinkDefaultExpirationPolicyDetails : has no documentation
4412 // (yet)
4413 SharingChangeLinkDefaultExpirationPolicyDetails *SharingChangeLinkDefaultExpirationPolicyDetails `json:"sharing_change_link_default_expiration_policy_details,omitempty"`
4414 // SharingChangeLinkEnforcePasswordPolicyDetails : has no documentation
4415 // (yet)
4416 SharingChangeLinkEnforcePasswordPolicyDetails *SharingChangeLinkEnforcePasswordPolicyDetails `json:"sharing_change_link_enforce_password_policy_details,omitempty"`
4417 // SharingChangeLinkPolicyDetails : has no documentation (yet)
4418 SharingChangeLinkPolicyDetails *SharingChangeLinkPolicyDetails `json:"sharing_change_link_policy_details,omitempty"`
4419 // SharingChangeMemberPolicyDetails : has no documentation (yet)
4420 SharingChangeMemberPolicyDetails *SharingChangeMemberPolicyDetails `json:"sharing_change_member_policy_details,omitempty"`
4421 // ShowcaseChangeDownloadPolicyDetails : has no documentation (yet)
4422 ShowcaseChangeDownloadPolicyDetails *ShowcaseChangeDownloadPolicyDetails `json:"showcase_change_download_policy_details,omitempty"`
4423 // ShowcaseChangeEnabledPolicyDetails : has no documentation (yet)
4424 ShowcaseChangeEnabledPolicyDetails *ShowcaseChangeEnabledPolicyDetails `json:"showcase_change_enabled_policy_details,omitempty"`
4425 // ShowcaseChangeExternalSharingPolicyDetails : has no documentation (yet)
4426 ShowcaseChangeExternalSharingPolicyDetails *ShowcaseChangeExternalSharingPolicyDetails `json:"showcase_change_external_sharing_policy_details,omitempty"`
4427 // SmarterSmartSyncPolicyChangedDetails : has no documentation (yet)
4428 SmarterSmartSyncPolicyChangedDetails *SmarterSmartSyncPolicyChangedDetails `json:"smarter_smart_sync_policy_changed_details,omitempty"`
4429 // SmartSyncChangePolicyDetails : has no documentation (yet)
4430 SmartSyncChangePolicyDetails *SmartSyncChangePolicyDetails `json:"smart_sync_change_policy_details,omitempty"`
4431 // SmartSyncNotOptOutDetails : has no documentation (yet)
4432 SmartSyncNotOptOutDetails *SmartSyncNotOptOutDetails `json:"smart_sync_not_opt_out_details,omitempty"`
4433 // SmartSyncOptOutDetails : has no documentation (yet)
4434 SmartSyncOptOutDetails *SmartSyncOptOutDetails `json:"smart_sync_opt_out_details,omitempty"`
4435 // SsoChangePolicyDetails : has no documentation (yet)
4436 SsoChangePolicyDetails *SsoChangePolicyDetails `json:"sso_change_policy_details,omitempty"`
4437 // TeamBrandingPolicyChangedDetails : has no documentation (yet)
4438 TeamBrandingPolicyChangedDetails *TeamBrandingPolicyChangedDetails `json:"team_branding_policy_changed_details,omitempty"`
4439 // TeamExtensionsPolicyChangedDetails : has no documentation (yet)
4440 TeamExtensionsPolicyChangedDetails *TeamExtensionsPolicyChangedDetails `json:"team_extensions_policy_changed_details,omitempty"`
4441 // TeamSelectiveSyncPolicyChangedDetails : has no documentation (yet)
4442 TeamSelectiveSyncPolicyChangedDetails *TeamSelectiveSyncPolicyChangedDetails `json:"team_selective_sync_policy_changed_details,omitempty"`
4443 // TeamSharingWhitelistSubjectsChangedDetails : has no documentation (yet)
4444 TeamSharingWhitelistSubjectsChangedDetails *TeamSharingWhitelistSubjectsChangedDetails `json:"team_sharing_whitelist_subjects_changed_details,omitempty"`
4445 // TfaAddExceptionDetails : has no documentation (yet)
4446 TfaAddExceptionDetails *TfaAddExceptionDetails `json:"tfa_add_exception_details,omitempty"`
4447 // TfaChangePolicyDetails : has no documentation (yet)
4448 TfaChangePolicyDetails *TfaChangePolicyDetails `json:"tfa_change_policy_details,omitempty"`
4449 // TfaRemoveExceptionDetails : has no documentation (yet)
4450 TfaRemoveExceptionDetails *TfaRemoveExceptionDetails `json:"tfa_remove_exception_details,omitempty"`
4451 // TwoAccountChangePolicyDetails : has no documentation (yet)
4452 TwoAccountChangePolicyDetails *TwoAccountChangePolicyDetails `json:"two_account_change_policy_details,omitempty"`
4453 // ViewerInfoPolicyChangedDetails : has no documentation (yet)
4454 ViewerInfoPolicyChangedDetails *ViewerInfoPolicyChangedDetails `json:"viewer_info_policy_changed_details,omitempty"`
4455 // WatermarkingPolicyChangedDetails : has no documentation (yet)
4456 WatermarkingPolicyChangedDetails *WatermarkingPolicyChangedDetails `json:"watermarking_policy_changed_details,omitempty"`
4457 // WebSessionsChangeActiveSessionLimitDetails : has no documentation (yet)
4458 WebSessionsChangeActiveSessionLimitDetails *WebSessionsChangeActiveSessionLimitDetails `json:"web_sessions_change_active_session_limit_details,omitempty"`
4459 // WebSessionsChangeFixedLengthPolicyDetails : has no documentation (yet)
4460 WebSessionsChangeFixedLengthPolicyDetails *WebSessionsChangeFixedLengthPolicyDetails `json:"web_sessions_change_fixed_length_policy_details,omitempty"`
4461 // WebSessionsChangeIdleLengthPolicyDetails : has no documentation (yet)
4462 WebSessionsChangeIdleLengthPolicyDetails *WebSessionsChangeIdleLengthPolicyDetails `json:"web_sessions_change_idle_length_policy_details,omitempty"`
4463 // TeamMergeFromDetails : has no documentation (yet)
4464 TeamMergeFromDetails *TeamMergeFromDetails `json:"team_merge_from_details,omitempty"`
4465 // TeamMergeToDetails : has no documentation (yet)
4466 TeamMergeToDetails *TeamMergeToDetails `json:"team_merge_to_details,omitempty"`
4467 // TeamProfileAddBackgroundDetails : has no documentation (yet)
4468 TeamProfileAddBackgroundDetails *TeamProfileAddBackgroundDetails `json:"team_profile_add_background_details,omitempty"`
4469 // TeamProfileAddLogoDetails : has no documentation (yet)
4470 TeamProfileAddLogoDetails *TeamProfileAddLogoDetails `json:"team_profile_add_logo_details,omitempty"`
4471 // TeamProfileChangeBackgroundDetails : has no documentation (yet)
4472 TeamProfileChangeBackgroundDetails *TeamProfileChangeBackgroundDetails `json:"team_profile_change_background_details,omitempty"`
4473 // TeamProfileChangeDefaultLanguageDetails : has no documentation (yet)
4474 TeamProfileChangeDefaultLanguageDetails *TeamProfileChangeDefaultLanguageDetails `json:"team_profile_change_default_language_details,omitempty"`
4475 // TeamProfileChangeLogoDetails : has no documentation (yet)
4476 TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"`
4477 // TeamProfileChangeNameDetails : has no documentation (yet)
4478 TeamProfileChangeNameDetails *TeamProfileChangeNameDetails `json:"team_profile_change_name_details,omitempty"`
4479 // TeamProfileRemoveBackgroundDetails : has no documentation (yet)
4480 TeamProfileRemoveBackgroundDetails *TeamProfileRemoveBackgroundDetails `json:"team_profile_remove_background_details,omitempty"`
4481 // TeamProfileRemoveLogoDetails : has no documentation (yet)
4482 TeamProfileRemoveLogoDetails *TeamProfileRemoveLogoDetails `json:"team_profile_remove_logo_details,omitempty"`
4483 // TfaAddBackupPhoneDetails : has no documentation (yet)
4484 TfaAddBackupPhoneDetails *TfaAddBackupPhoneDetails `json:"tfa_add_backup_phone_details,omitempty"`
4485 // TfaAddSecurityKeyDetails : has no documentation (yet)
4486 TfaAddSecurityKeyDetails *TfaAddSecurityKeyDetails `json:"tfa_add_security_key_details,omitempty"`
4487 // TfaChangeBackupPhoneDetails : has no documentation (yet)
4488 TfaChangeBackupPhoneDetails *TfaChangeBackupPhoneDetails `json:"tfa_change_backup_phone_details,omitempty"`
4489 // TfaChangeStatusDetails : has no documentation (yet)
4490 TfaChangeStatusDetails *TfaChangeStatusDetails `json:"tfa_change_status_details,omitempty"`
4491 // TfaRemoveBackupPhoneDetails : has no documentation (yet)
4492 TfaRemoveBackupPhoneDetails *TfaRemoveBackupPhoneDetails `json:"tfa_remove_backup_phone_details,omitempty"`
4493 // TfaRemoveSecurityKeyDetails : has no documentation (yet)
4494 TfaRemoveSecurityKeyDetails *TfaRemoveSecurityKeyDetails `json:"tfa_remove_security_key_details,omitempty"`
4495 // TfaResetDetails : has no documentation (yet)
4496 TfaResetDetails *TfaResetDetails `json:"tfa_reset_details,omitempty"`
4497 // ChangedEnterpriseAdminRoleDetails : has no documentation (yet)
4498 ChangedEnterpriseAdminRoleDetails *ChangedEnterpriseAdminRoleDetails `json:"changed_enterprise_admin_role_details,omitempty"`
4499 // ChangedEnterpriseConnectedTeamStatusDetails : has no documentation (yet)
4500 ChangedEnterpriseConnectedTeamStatusDetails *ChangedEnterpriseConnectedTeamStatusDetails `json:"changed_enterprise_connected_team_status_details,omitempty"`
4501 // EndedEnterpriseAdminSessionDetails : has no documentation (yet)
4502 EndedEnterpriseAdminSessionDetails *EndedEnterpriseAdminSessionDetails `json:"ended_enterprise_admin_session_details,omitempty"`
4503 // EndedEnterpriseAdminSessionDeprecatedDetails : has no documentation (yet)
4504 EndedEnterpriseAdminSessionDeprecatedDetails *EndedEnterpriseAdminSessionDeprecatedDetails `json:"ended_enterprise_admin_session_deprecated_details,omitempty"`
4505 // EnterpriseSettingsLockingDetails : has no documentation (yet)
4506 EnterpriseSettingsLockingDetails *EnterpriseSettingsLockingDetails `json:"enterprise_settings_locking_details,omitempty"`
4507 // GuestAdminChangeStatusDetails : has no documentation (yet)
4508 GuestAdminChangeStatusDetails *GuestAdminChangeStatusDetails `json:"guest_admin_change_status_details,omitempty"`
4509 // StartedEnterpriseAdminSessionDetails : has no documentation (yet)
4510 StartedEnterpriseAdminSessionDetails *StartedEnterpriseAdminSessionDetails `json:"started_enterprise_admin_session_details,omitempty"`
4511 // TeamMergeRequestAcceptedDetails : has no documentation (yet)
4512 TeamMergeRequestAcceptedDetails *TeamMergeRequestAcceptedDetails `json:"team_merge_request_accepted_details,omitempty"`
4513 // TeamMergeRequestAcceptedShownToPrimaryTeamDetails : has no documentation
4514 // (yet)
4515 TeamMergeRequestAcceptedShownToPrimaryTeamDetails *TeamMergeRequestAcceptedShownToPrimaryTeamDetails `json:"team_merge_request_accepted_shown_to_primary_team_details,omitempty"`
4516 // TeamMergeRequestAcceptedShownToSecondaryTeamDetails : has no
4517 // documentation (yet)
4518 TeamMergeRequestAcceptedShownToSecondaryTeamDetails *TeamMergeRequestAcceptedShownToSecondaryTeamDetails `json:"team_merge_request_accepted_shown_to_secondary_team_details,omitempty"`
4519 // TeamMergeRequestAutoCanceledDetails : has no documentation (yet)
4520 TeamMergeRequestAutoCanceledDetails *TeamMergeRequestAutoCanceledDetails `json:"team_merge_request_auto_canceled_details,omitempty"`
4521 // TeamMergeRequestCanceledDetails : has no documentation (yet)
4522 TeamMergeRequestCanceledDetails *TeamMergeRequestCanceledDetails `json:"team_merge_request_canceled_details,omitempty"`
4523 // TeamMergeRequestCanceledShownToPrimaryTeamDetails : has no documentation
4524 // (yet)
4525 TeamMergeRequestCanceledShownToPrimaryTeamDetails *TeamMergeRequestCanceledShownToPrimaryTeamDetails `json:"team_merge_request_canceled_shown_to_primary_team_details,omitempty"`
4526 // TeamMergeRequestCanceledShownToSecondaryTeamDetails : has no
4527 // documentation (yet)
4528 TeamMergeRequestCanceledShownToSecondaryTeamDetails *TeamMergeRequestCanceledShownToSecondaryTeamDetails `json:"team_merge_request_canceled_shown_to_secondary_team_details,omitempty"`
4529 // TeamMergeRequestExpiredDetails : has no documentation (yet)
4530 TeamMergeRequestExpiredDetails *TeamMergeRequestExpiredDetails `json:"team_merge_request_expired_details,omitempty"`
4531 // TeamMergeRequestExpiredShownToPrimaryTeamDetails : has no documentation
4532 // (yet)
4533 TeamMergeRequestExpiredShownToPrimaryTeamDetails *TeamMergeRequestExpiredShownToPrimaryTeamDetails `json:"team_merge_request_expired_shown_to_primary_team_details,omitempty"`
4534 // TeamMergeRequestExpiredShownToSecondaryTeamDetails : has no documentation
4535 // (yet)
4536 TeamMergeRequestExpiredShownToSecondaryTeamDetails *TeamMergeRequestExpiredShownToSecondaryTeamDetails `json:"team_merge_request_expired_shown_to_secondary_team_details,omitempty"`
4537 // TeamMergeRequestRejectedShownToPrimaryTeamDetails : has no documentation
4538 // (yet)
4539 TeamMergeRequestRejectedShownToPrimaryTeamDetails *TeamMergeRequestRejectedShownToPrimaryTeamDetails `json:"team_merge_request_rejected_shown_to_primary_team_details,omitempty"`
4540 // TeamMergeRequestRejectedShownToSecondaryTeamDetails : has no
4541 // documentation (yet)
4542 TeamMergeRequestRejectedShownToSecondaryTeamDetails *TeamMergeRequestRejectedShownToSecondaryTeamDetails `json:"team_merge_request_rejected_shown_to_secondary_team_details,omitempty"`
4543 // TeamMergeRequestReminderDetails : has no documentation (yet)
4544 TeamMergeRequestReminderDetails *TeamMergeRequestReminderDetails `json:"team_merge_request_reminder_details,omitempty"`
4545 // TeamMergeRequestReminderShownToPrimaryTeamDetails : has no documentation
4546 // (yet)
4547 TeamMergeRequestReminderShownToPrimaryTeamDetails *TeamMergeRequestReminderShownToPrimaryTeamDetails `json:"team_merge_request_reminder_shown_to_primary_team_details,omitempty"`
4548 // TeamMergeRequestReminderShownToSecondaryTeamDetails : has no
4549 // documentation (yet)
4550 TeamMergeRequestReminderShownToSecondaryTeamDetails *TeamMergeRequestReminderShownToSecondaryTeamDetails `json:"team_merge_request_reminder_shown_to_secondary_team_details,omitempty"`
4551 // TeamMergeRequestRevokedDetails : has no documentation (yet)
4552 TeamMergeRequestRevokedDetails *TeamMergeRequestRevokedDetails `json:"team_merge_request_revoked_details,omitempty"`
4553 // TeamMergeRequestSentShownToPrimaryTeamDetails : has no documentation
4554 // (yet)
4555 TeamMergeRequestSentShownToPrimaryTeamDetails *TeamMergeRequestSentShownToPrimaryTeamDetails `json:"team_merge_request_sent_shown_to_primary_team_details,omitempty"`
4556 // TeamMergeRequestSentShownToSecondaryTeamDetails : has no documentation
4557 // (yet)
4558 TeamMergeRequestSentShownToSecondaryTeamDetails *TeamMergeRequestSentShownToSecondaryTeamDetails `json:"team_merge_request_sent_shown_to_secondary_team_details,omitempty"`
4559 // MissingDetails : Hints that this event was returned with missing details
4560 // due to an internal error.
4561 MissingDetails *MissingDetails `json:"missing_details,omitempty"`
4562 }
4563
4564 // Valid tag values for EventDetails
4565 const (
4566 EventDetailsAdminAlertingAlertStateChangedDetails = "admin_alerting_alert_state_changed_details"
4567 EventDetailsAdminAlertingChangedAlertConfigDetails = "admin_alerting_changed_alert_config_details"
4568 EventDetailsAdminAlertingTriggeredAlertDetails = "admin_alerting_triggered_alert_details"
4569 EventDetailsAppBlockedByPermissionsDetails = "app_blocked_by_permissions_details"
4570 EventDetailsAppLinkTeamDetails = "app_link_team_details"
4571 EventDetailsAppLinkUserDetails = "app_link_user_details"
4572 EventDetailsAppUnlinkTeamDetails = "app_unlink_team_details"
4573 EventDetailsAppUnlinkUserDetails = "app_unlink_user_details"
4574 EventDetailsIntegrationConnectedDetails = "integration_connected_details"
4575 EventDetailsIntegrationDisconnectedDetails = "integration_disconnected_details"
4576 EventDetailsFileAddCommentDetails = "file_add_comment_details"
4577 EventDetailsFileChangeCommentSubscriptionDetails = "file_change_comment_subscription_details"
4578 EventDetailsFileDeleteCommentDetails = "file_delete_comment_details"
4579 EventDetailsFileEditCommentDetails = "file_edit_comment_details"
4580 EventDetailsFileLikeCommentDetails = "file_like_comment_details"
4581 EventDetailsFileResolveCommentDetails = "file_resolve_comment_details"
4582 EventDetailsFileUnlikeCommentDetails = "file_unlike_comment_details"
4583 EventDetailsFileUnresolveCommentDetails = "file_unresolve_comment_details"
4584 EventDetailsGovernancePolicyAddFoldersDetails = "governance_policy_add_folders_details"
4585 EventDetailsGovernancePolicyAddFolderFailedDetails = "governance_policy_add_folder_failed_details"
4586 EventDetailsGovernancePolicyContentDisposedDetails = "governance_policy_content_disposed_details"
4587 EventDetailsGovernancePolicyCreateDetails = "governance_policy_create_details"
4588 EventDetailsGovernancePolicyDeleteDetails = "governance_policy_delete_details"
4589 EventDetailsGovernancePolicyEditDetailsDetails = "governance_policy_edit_details_details"
4590 EventDetailsGovernancePolicyEditDurationDetails = "governance_policy_edit_duration_details"
4591 EventDetailsGovernancePolicyExportCreatedDetails = "governance_policy_export_created_details"
4592 EventDetailsGovernancePolicyExportRemovedDetails = "governance_policy_export_removed_details"
4593 EventDetailsGovernancePolicyRemoveFoldersDetails = "governance_policy_remove_folders_details"
4594 EventDetailsGovernancePolicyReportCreatedDetails = "governance_policy_report_created_details"
4595 EventDetailsGovernancePolicyZipPartDownloadedDetails = "governance_policy_zip_part_downloaded_details"
4596 EventDetailsLegalHoldsActivateAHoldDetails = "legal_holds_activate_a_hold_details"
4597 EventDetailsLegalHoldsAddMembersDetails = "legal_holds_add_members_details"
4598 EventDetailsLegalHoldsChangeHoldDetailsDetails = "legal_holds_change_hold_details_details"
4599 EventDetailsLegalHoldsChangeHoldNameDetails = "legal_holds_change_hold_name_details"
4600 EventDetailsLegalHoldsExportAHoldDetails = "legal_holds_export_a_hold_details"
4601 EventDetailsLegalHoldsExportCancelledDetails = "legal_holds_export_cancelled_details"
4602 EventDetailsLegalHoldsExportDownloadedDetails = "legal_holds_export_downloaded_details"
4603 EventDetailsLegalHoldsExportRemovedDetails = "legal_holds_export_removed_details"
4604 EventDetailsLegalHoldsReleaseAHoldDetails = "legal_holds_release_a_hold_details"
4605 EventDetailsLegalHoldsRemoveMembersDetails = "legal_holds_remove_members_details"
4606 EventDetailsLegalHoldsReportAHoldDetails = "legal_holds_report_a_hold_details"
4607 EventDetailsDeviceChangeIpDesktopDetails = "device_change_ip_desktop_details"
4608 EventDetailsDeviceChangeIpMobileDetails = "device_change_ip_mobile_details"
4609 EventDetailsDeviceChangeIpWebDetails = "device_change_ip_web_details"
4610 EventDetailsDeviceDeleteOnUnlinkFailDetails = "device_delete_on_unlink_fail_details"
4611 EventDetailsDeviceDeleteOnUnlinkSuccessDetails = "device_delete_on_unlink_success_details"
4612 EventDetailsDeviceLinkFailDetails = "device_link_fail_details"
4613 EventDetailsDeviceLinkSuccessDetails = "device_link_success_details"
4614 EventDetailsDeviceManagementDisabledDetails = "device_management_disabled_details"
4615 EventDetailsDeviceManagementEnabledDetails = "device_management_enabled_details"
4616 EventDetailsDeviceSyncBackupStatusChangedDetails = "device_sync_backup_status_changed_details"
4617 EventDetailsDeviceUnlinkDetails = "device_unlink_details"
4618 EventDetailsDropboxPasswordsExportedDetails = "dropbox_passwords_exported_details"
4619 EventDetailsDropboxPasswordsNewDeviceEnrolledDetails = "dropbox_passwords_new_device_enrolled_details"
4620 EventDetailsEmmRefreshAuthTokenDetails = "emm_refresh_auth_token_details"
4621 EventDetailsAccountCaptureChangeAvailabilityDetails = "account_capture_change_availability_details"
4622 EventDetailsAccountCaptureMigrateAccountDetails = "account_capture_migrate_account_details"
4623 EventDetailsAccountCaptureNotificationEmailsSentDetails = "account_capture_notification_emails_sent_details"
4624 EventDetailsAccountCaptureRelinquishAccountDetails = "account_capture_relinquish_account_details"
4625 EventDetailsDisabledDomainInvitesDetails = "disabled_domain_invites_details"
4626 EventDetailsDomainInvitesApproveRequestToJoinTeamDetails = "domain_invites_approve_request_to_join_team_details"
4627 EventDetailsDomainInvitesDeclineRequestToJoinTeamDetails = "domain_invites_decline_request_to_join_team_details"
4628 EventDetailsDomainInvitesEmailExistingUsersDetails = "domain_invites_email_existing_users_details"
4629 EventDetailsDomainInvitesRequestToJoinTeamDetails = "domain_invites_request_to_join_team_details"
4630 EventDetailsDomainInvitesSetInviteNewUserPrefToNoDetails = "domain_invites_set_invite_new_user_pref_to_no_details"
4631 EventDetailsDomainInvitesSetInviteNewUserPrefToYesDetails = "domain_invites_set_invite_new_user_pref_to_yes_details"
4632 EventDetailsDomainVerificationAddDomainFailDetails = "domain_verification_add_domain_fail_details"
4633 EventDetailsDomainVerificationAddDomainSuccessDetails = "domain_verification_add_domain_success_details"
4634 EventDetailsDomainVerificationRemoveDomainDetails = "domain_verification_remove_domain_details"
4635 EventDetailsEnabledDomainInvitesDetails = "enabled_domain_invites_details"
4636 EventDetailsApplyNamingConventionDetails = "apply_naming_convention_details"
4637 EventDetailsCreateFolderDetails = "create_folder_details"
4638 EventDetailsFileAddDetails = "file_add_details"
4639 EventDetailsFileCopyDetails = "file_copy_details"
4640 EventDetailsFileDeleteDetails = "file_delete_details"
4641 EventDetailsFileDownloadDetails = "file_download_details"
4642 EventDetailsFileEditDetails = "file_edit_details"
4643 EventDetailsFileGetCopyReferenceDetails = "file_get_copy_reference_details"
4644 EventDetailsFileLockingLockStatusChangedDetails = "file_locking_lock_status_changed_details"
4645 EventDetailsFileMoveDetails = "file_move_details"
4646 EventDetailsFilePermanentlyDeleteDetails = "file_permanently_delete_details"
4647 EventDetailsFilePreviewDetails = "file_preview_details"
4648 EventDetailsFileRenameDetails = "file_rename_details"
4649 EventDetailsFileRestoreDetails = "file_restore_details"
4650 EventDetailsFileRevertDetails = "file_revert_details"
4651 EventDetailsFileRollbackChangesDetails = "file_rollback_changes_details"
4652 EventDetailsFileSaveCopyReferenceDetails = "file_save_copy_reference_details"
4653 EventDetailsFolderOverviewDescriptionChangedDetails = "folder_overview_description_changed_details"
4654 EventDetailsFolderOverviewItemPinnedDetails = "folder_overview_item_pinned_details"
4655 EventDetailsFolderOverviewItemUnpinnedDetails = "folder_overview_item_unpinned_details"
4656 EventDetailsObjectLabelAddedDetails = "object_label_added_details"
4657 EventDetailsObjectLabelRemovedDetails = "object_label_removed_details"
4658 EventDetailsObjectLabelUpdatedValueDetails = "object_label_updated_value_details"
4659 EventDetailsOrganizeFolderWithTidyDetails = "organize_folder_with_tidy_details"
4660 EventDetailsRewindFolderDetails = "rewind_folder_details"
4661 EventDetailsUserTagsAddedDetails = "user_tags_added_details"
4662 EventDetailsUserTagsRemovedDetails = "user_tags_removed_details"
4663 EventDetailsFileRequestChangeDetails = "file_request_change_details"
4664 EventDetailsFileRequestCloseDetails = "file_request_close_details"
4665 EventDetailsFileRequestCreateDetails = "file_request_create_details"
4666 EventDetailsFileRequestDeleteDetails = "file_request_delete_details"
4667 EventDetailsFileRequestReceiveFileDetails = "file_request_receive_file_details"
4668 EventDetailsGroupAddExternalIdDetails = "group_add_external_id_details"
4669 EventDetailsGroupAddMemberDetails = "group_add_member_details"
4670 EventDetailsGroupChangeExternalIdDetails = "group_change_external_id_details"
4671 EventDetailsGroupChangeManagementTypeDetails = "group_change_management_type_details"
4672 EventDetailsGroupChangeMemberRoleDetails = "group_change_member_role_details"
4673 EventDetailsGroupCreateDetails = "group_create_details"
4674 EventDetailsGroupDeleteDetails = "group_delete_details"
4675 EventDetailsGroupDescriptionUpdatedDetails = "group_description_updated_details"
4676 EventDetailsGroupJoinPolicyUpdatedDetails = "group_join_policy_updated_details"
4677 EventDetailsGroupMovedDetails = "group_moved_details"
4678 EventDetailsGroupRemoveExternalIdDetails = "group_remove_external_id_details"
4679 EventDetailsGroupRemoveMemberDetails = "group_remove_member_details"
4680 EventDetailsGroupRenameDetails = "group_rename_details"
4681 EventDetailsAccountLockOrUnlockedDetails = "account_lock_or_unlocked_details"
4682 EventDetailsEmmErrorDetails = "emm_error_details"
4683 EventDetailsGuestAdminSignedInViaTrustedTeamsDetails = "guest_admin_signed_in_via_trusted_teams_details"
4684 EventDetailsGuestAdminSignedOutViaTrustedTeamsDetails = "guest_admin_signed_out_via_trusted_teams_details"
4685 EventDetailsLoginFailDetails = "login_fail_details"
4686 EventDetailsLoginSuccessDetails = "login_success_details"
4687 EventDetailsLogoutDetails = "logout_details"
4688 EventDetailsResellerSupportSessionEndDetails = "reseller_support_session_end_details"
4689 EventDetailsResellerSupportSessionStartDetails = "reseller_support_session_start_details"
4690 EventDetailsSignInAsSessionEndDetails = "sign_in_as_session_end_details"
4691 EventDetailsSignInAsSessionStartDetails = "sign_in_as_session_start_details"
4692 EventDetailsSsoErrorDetails = "sso_error_details"
4693 EventDetailsCreateTeamInviteLinkDetails = "create_team_invite_link_details"
4694 EventDetailsDeleteTeamInviteLinkDetails = "delete_team_invite_link_details"
4695 EventDetailsMemberAddExternalIdDetails = "member_add_external_id_details"
4696 EventDetailsMemberAddNameDetails = "member_add_name_details"
4697 EventDetailsMemberChangeAdminRoleDetails = "member_change_admin_role_details"
4698 EventDetailsMemberChangeEmailDetails = "member_change_email_details"
4699 EventDetailsMemberChangeExternalIdDetails = "member_change_external_id_details"
4700 EventDetailsMemberChangeMembershipTypeDetails = "member_change_membership_type_details"
4701 EventDetailsMemberChangeNameDetails = "member_change_name_details"
4702 EventDetailsMemberChangeResellerRoleDetails = "member_change_reseller_role_details"
4703 EventDetailsMemberChangeStatusDetails = "member_change_status_details"
4704 EventDetailsMemberDeleteManualContactsDetails = "member_delete_manual_contacts_details"
4705 EventDetailsMemberDeleteProfilePhotoDetails = "member_delete_profile_photo_details"
4706 EventDetailsMemberPermanentlyDeleteAccountContentsDetails = "member_permanently_delete_account_contents_details"
4707 EventDetailsMemberRemoveExternalIdDetails = "member_remove_external_id_details"
4708 EventDetailsMemberSetProfilePhotoDetails = "member_set_profile_photo_details"
4709 EventDetailsMemberSpaceLimitsAddCustomQuotaDetails = "member_space_limits_add_custom_quota_details"
4710 EventDetailsMemberSpaceLimitsChangeCustomQuotaDetails = "member_space_limits_change_custom_quota_details"
4711 EventDetailsMemberSpaceLimitsChangeStatusDetails = "member_space_limits_change_status_details"
4712 EventDetailsMemberSpaceLimitsRemoveCustomQuotaDetails = "member_space_limits_remove_custom_quota_details"
4713 EventDetailsMemberSuggestDetails = "member_suggest_details"
4714 EventDetailsMemberTransferAccountContentsDetails = "member_transfer_account_contents_details"
4715 EventDetailsPendingSecondaryEmailAddedDetails = "pending_secondary_email_added_details"
4716 EventDetailsSecondaryEmailDeletedDetails = "secondary_email_deleted_details"
4717 EventDetailsSecondaryEmailVerifiedDetails = "secondary_email_verified_details"
4718 EventDetailsSecondaryMailsPolicyChangedDetails = "secondary_mails_policy_changed_details"
4719 EventDetailsBinderAddPageDetails = "binder_add_page_details"
4720 EventDetailsBinderAddSectionDetails = "binder_add_section_details"
4721 EventDetailsBinderRemovePageDetails = "binder_remove_page_details"
4722 EventDetailsBinderRemoveSectionDetails = "binder_remove_section_details"
4723 EventDetailsBinderRenamePageDetails = "binder_rename_page_details"
4724 EventDetailsBinderRenameSectionDetails = "binder_rename_section_details"
4725 EventDetailsBinderReorderPageDetails = "binder_reorder_page_details"
4726 EventDetailsBinderReorderSectionDetails = "binder_reorder_section_details"
4727 EventDetailsPaperContentAddMemberDetails = "paper_content_add_member_details"
4728 EventDetailsPaperContentAddToFolderDetails = "paper_content_add_to_folder_details"
4729 EventDetailsPaperContentArchiveDetails = "paper_content_archive_details"
4730 EventDetailsPaperContentCreateDetails = "paper_content_create_details"
4731 EventDetailsPaperContentPermanentlyDeleteDetails = "paper_content_permanently_delete_details"
4732 EventDetailsPaperContentRemoveFromFolderDetails = "paper_content_remove_from_folder_details"
4733 EventDetailsPaperContentRemoveMemberDetails = "paper_content_remove_member_details"
4734 EventDetailsPaperContentRenameDetails = "paper_content_rename_details"
4735 EventDetailsPaperContentRestoreDetails = "paper_content_restore_details"
4736 EventDetailsPaperDocAddCommentDetails = "paper_doc_add_comment_details"
4737 EventDetailsPaperDocChangeMemberRoleDetails = "paper_doc_change_member_role_details"
4738 EventDetailsPaperDocChangeSharingPolicyDetails = "paper_doc_change_sharing_policy_details"
4739 EventDetailsPaperDocChangeSubscriptionDetails = "paper_doc_change_subscription_details"
4740 EventDetailsPaperDocDeletedDetails = "paper_doc_deleted_details"
4741 EventDetailsPaperDocDeleteCommentDetails = "paper_doc_delete_comment_details"
4742 EventDetailsPaperDocDownloadDetails = "paper_doc_download_details"
4743 EventDetailsPaperDocEditDetails = "paper_doc_edit_details"
4744 EventDetailsPaperDocEditCommentDetails = "paper_doc_edit_comment_details"
4745 EventDetailsPaperDocFollowedDetails = "paper_doc_followed_details"
4746 EventDetailsPaperDocMentionDetails = "paper_doc_mention_details"
4747 EventDetailsPaperDocOwnershipChangedDetails = "paper_doc_ownership_changed_details"
4748 EventDetailsPaperDocRequestAccessDetails = "paper_doc_request_access_details"
4749 EventDetailsPaperDocResolveCommentDetails = "paper_doc_resolve_comment_details"
4750 EventDetailsPaperDocRevertDetails = "paper_doc_revert_details"
4751 EventDetailsPaperDocSlackShareDetails = "paper_doc_slack_share_details"
4752 EventDetailsPaperDocTeamInviteDetails = "paper_doc_team_invite_details"
4753 EventDetailsPaperDocTrashedDetails = "paper_doc_trashed_details"
4754 EventDetailsPaperDocUnresolveCommentDetails = "paper_doc_unresolve_comment_details"
4755 EventDetailsPaperDocUntrashedDetails = "paper_doc_untrashed_details"
4756 EventDetailsPaperDocViewDetails = "paper_doc_view_details"
4757 EventDetailsPaperExternalViewAllowDetails = "paper_external_view_allow_details"
4758 EventDetailsPaperExternalViewDefaultTeamDetails = "paper_external_view_default_team_details"
4759 EventDetailsPaperExternalViewForbidDetails = "paper_external_view_forbid_details"
4760 EventDetailsPaperFolderChangeSubscriptionDetails = "paper_folder_change_subscription_details"
4761 EventDetailsPaperFolderDeletedDetails = "paper_folder_deleted_details"
4762 EventDetailsPaperFolderFollowedDetails = "paper_folder_followed_details"
4763 EventDetailsPaperFolderTeamInviteDetails = "paper_folder_team_invite_details"
4764 EventDetailsPaperPublishedLinkChangePermissionDetails = "paper_published_link_change_permission_details"
4765 EventDetailsPaperPublishedLinkCreateDetails = "paper_published_link_create_details"
4766 EventDetailsPaperPublishedLinkDisabledDetails = "paper_published_link_disabled_details"
4767 EventDetailsPaperPublishedLinkViewDetails = "paper_published_link_view_details"
4768 EventDetailsPasswordChangeDetails = "password_change_details"
4769 EventDetailsPasswordResetDetails = "password_reset_details"
4770 EventDetailsPasswordResetAllDetails = "password_reset_all_details"
4771 EventDetailsClassificationCreateReportDetails = "classification_create_report_details"
4772 EventDetailsClassificationCreateReportFailDetails = "classification_create_report_fail_details"
4773 EventDetailsEmmCreateExceptionsReportDetails = "emm_create_exceptions_report_details"
4774 EventDetailsEmmCreateUsageReportDetails = "emm_create_usage_report_details"
4775 EventDetailsExportMembersReportDetails = "export_members_report_details"
4776 EventDetailsExportMembersReportFailDetails = "export_members_report_fail_details"
4777 EventDetailsExternalSharingCreateReportDetails = "external_sharing_create_report_details"
4778 EventDetailsExternalSharingReportFailedDetails = "external_sharing_report_failed_details"
4779 EventDetailsNoExpirationLinkGenCreateReportDetails = "no_expiration_link_gen_create_report_details"
4780 EventDetailsNoExpirationLinkGenReportFailedDetails = "no_expiration_link_gen_report_failed_details"
4781 EventDetailsNoPasswordLinkGenCreateReportDetails = "no_password_link_gen_create_report_details"
4782 EventDetailsNoPasswordLinkGenReportFailedDetails = "no_password_link_gen_report_failed_details"
4783 EventDetailsNoPasswordLinkViewCreateReportDetails = "no_password_link_view_create_report_details"
4784 EventDetailsNoPasswordLinkViewReportFailedDetails = "no_password_link_view_report_failed_details"
4785 EventDetailsOutdatedLinkViewCreateReportDetails = "outdated_link_view_create_report_details"
4786 EventDetailsOutdatedLinkViewReportFailedDetails = "outdated_link_view_report_failed_details"
4787 EventDetailsPaperAdminExportStartDetails = "paper_admin_export_start_details"
4788 EventDetailsSmartSyncCreateAdminPrivilegeReportDetails = "smart_sync_create_admin_privilege_report_details"
4789 EventDetailsTeamActivityCreateReportDetails = "team_activity_create_report_details"
4790 EventDetailsTeamActivityCreateReportFailDetails = "team_activity_create_report_fail_details"
4791 EventDetailsCollectionShareDetails = "collection_share_details"
4792 EventDetailsFileTransfersFileAddDetails = "file_transfers_file_add_details"
4793 EventDetailsFileTransfersTransferDeleteDetails = "file_transfers_transfer_delete_details"
4794 EventDetailsFileTransfersTransferDownloadDetails = "file_transfers_transfer_download_details"
4795 EventDetailsFileTransfersTransferSendDetails = "file_transfers_transfer_send_details"
4796 EventDetailsFileTransfersTransferViewDetails = "file_transfers_transfer_view_details"
4797 EventDetailsNoteAclInviteOnlyDetails = "note_acl_invite_only_details"
4798 EventDetailsNoteAclLinkDetails = "note_acl_link_details"
4799 EventDetailsNoteAclTeamLinkDetails = "note_acl_team_link_details"
4800 EventDetailsNoteSharedDetails = "note_shared_details"
4801 EventDetailsNoteShareReceiveDetails = "note_share_receive_details"
4802 EventDetailsOpenNoteSharedDetails = "open_note_shared_details"
4803 EventDetailsSfAddGroupDetails = "sf_add_group_details"
4804 EventDetailsSfAllowNonMembersToViewSharedLinksDetails = "sf_allow_non_members_to_view_shared_links_details"
4805 EventDetailsSfExternalInviteWarnDetails = "sf_external_invite_warn_details"
4806 EventDetailsSfFbInviteDetails = "sf_fb_invite_details"
4807 EventDetailsSfFbInviteChangeRoleDetails = "sf_fb_invite_change_role_details"
4808 EventDetailsSfFbUninviteDetails = "sf_fb_uninvite_details"
4809 EventDetailsSfInviteGroupDetails = "sf_invite_group_details"
4810 EventDetailsSfTeamGrantAccessDetails = "sf_team_grant_access_details"
4811 EventDetailsSfTeamInviteDetails = "sf_team_invite_details"
4812 EventDetailsSfTeamInviteChangeRoleDetails = "sf_team_invite_change_role_details"
4813 EventDetailsSfTeamJoinDetails = "sf_team_join_details"
4814 EventDetailsSfTeamJoinFromOobLinkDetails = "sf_team_join_from_oob_link_details"
4815 EventDetailsSfTeamUninviteDetails = "sf_team_uninvite_details"
4816 EventDetailsSharedContentAddInviteesDetails = "shared_content_add_invitees_details"
4817 EventDetailsSharedContentAddLinkExpiryDetails = "shared_content_add_link_expiry_details"
4818 EventDetailsSharedContentAddLinkPasswordDetails = "shared_content_add_link_password_details"
4819 EventDetailsSharedContentAddMemberDetails = "shared_content_add_member_details"
4820 EventDetailsSharedContentChangeDownloadsPolicyDetails = "shared_content_change_downloads_policy_details"
4821 EventDetailsSharedContentChangeInviteeRoleDetails = "shared_content_change_invitee_role_details"
4822 EventDetailsSharedContentChangeLinkAudienceDetails = "shared_content_change_link_audience_details"
4823 EventDetailsSharedContentChangeLinkExpiryDetails = "shared_content_change_link_expiry_details"
4824 EventDetailsSharedContentChangeLinkPasswordDetails = "shared_content_change_link_password_details"
4825 EventDetailsSharedContentChangeMemberRoleDetails = "shared_content_change_member_role_details"
4826 EventDetailsSharedContentChangeViewerInfoPolicyDetails = "shared_content_change_viewer_info_policy_details"
4827 EventDetailsSharedContentClaimInvitationDetails = "shared_content_claim_invitation_details"
4828 EventDetailsSharedContentCopyDetails = "shared_content_copy_details"
4829 EventDetailsSharedContentDownloadDetails = "shared_content_download_details"
4830 EventDetailsSharedContentRelinquishMembershipDetails = "shared_content_relinquish_membership_details"
4831 EventDetailsSharedContentRemoveInviteesDetails = "shared_content_remove_invitees_details"
4832 EventDetailsSharedContentRemoveLinkExpiryDetails = "shared_content_remove_link_expiry_details"
4833 EventDetailsSharedContentRemoveLinkPasswordDetails = "shared_content_remove_link_password_details"
4834 EventDetailsSharedContentRemoveMemberDetails = "shared_content_remove_member_details"
4835 EventDetailsSharedContentRequestAccessDetails = "shared_content_request_access_details"
4836 EventDetailsSharedContentRestoreInviteesDetails = "shared_content_restore_invitees_details"
4837 EventDetailsSharedContentRestoreMemberDetails = "shared_content_restore_member_details"
4838 EventDetailsSharedContentUnshareDetails = "shared_content_unshare_details"
4839 EventDetailsSharedContentViewDetails = "shared_content_view_details"
4840 EventDetailsSharedFolderChangeLinkPolicyDetails = "shared_folder_change_link_policy_details"
4841 EventDetailsSharedFolderChangeMembersInheritancePolicyDetails = "shared_folder_change_members_inheritance_policy_details"
4842 EventDetailsSharedFolderChangeMembersManagementPolicyDetails = "shared_folder_change_members_management_policy_details"
4843 EventDetailsSharedFolderChangeMembersPolicyDetails = "shared_folder_change_members_policy_details"
4844 EventDetailsSharedFolderCreateDetails = "shared_folder_create_details"
4845 EventDetailsSharedFolderDeclineInvitationDetails = "shared_folder_decline_invitation_details"
4846 EventDetailsSharedFolderMountDetails = "shared_folder_mount_details"
4847 EventDetailsSharedFolderNestDetails = "shared_folder_nest_details"
4848 EventDetailsSharedFolderTransferOwnershipDetails = "shared_folder_transfer_ownership_details"
4849 EventDetailsSharedFolderUnmountDetails = "shared_folder_unmount_details"
4850 EventDetailsSharedLinkAddExpiryDetails = "shared_link_add_expiry_details"
4851 EventDetailsSharedLinkChangeExpiryDetails = "shared_link_change_expiry_details"
4852 EventDetailsSharedLinkChangeVisibilityDetails = "shared_link_change_visibility_details"
4853 EventDetailsSharedLinkCopyDetails = "shared_link_copy_details"
4854 EventDetailsSharedLinkCreateDetails = "shared_link_create_details"
4855 EventDetailsSharedLinkDisableDetails = "shared_link_disable_details"
4856 EventDetailsSharedLinkDownloadDetails = "shared_link_download_details"
4857 EventDetailsSharedLinkRemoveExpiryDetails = "shared_link_remove_expiry_details"
4858 EventDetailsSharedLinkSettingsAddExpirationDetails = "shared_link_settings_add_expiration_details"
4859 EventDetailsSharedLinkSettingsAddPasswordDetails = "shared_link_settings_add_password_details"
4860 EventDetailsSharedLinkSettingsAllowDownloadDisabledDetails = "shared_link_settings_allow_download_disabled_details"
4861 EventDetailsSharedLinkSettingsAllowDownloadEnabledDetails = "shared_link_settings_allow_download_enabled_details"
4862 EventDetailsSharedLinkSettingsChangeAudienceDetails = "shared_link_settings_change_audience_details"
4863 EventDetailsSharedLinkSettingsChangeExpirationDetails = "shared_link_settings_change_expiration_details"
4864 EventDetailsSharedLinkSettingsChangePasswordDetails = "shared_link_settings_change_password_details"
4865 EventDetailsSharedLinkSettingsRemoveExpirationDetails = "shared_link_settings_remove_expiration_details"
4866 EventDetailsSharedLinkSettingsRemovePasswordDetails = "shared_link_settings_remove_password_details"
4867 EventDetailsSharedLinkShareDetails = "shared_link_share_details"
4868 EventDetailsSharedLinkViewDetails = "shared_link_view_details"
4869 EventDetailsSharedNoteOpenedDetails = "shared_note_opened_details"
4870 EventDetailsShmodelDisableDownloadsDetails = "shmodel_disable_downloads_details"
4871 EventDetailsShmodelEnableDownloadsDetails = "shmodel_enable_downloads_details"
4872 EventDetailsShmodelGroupShareDetails = "shmodel_group_share_details"
4873 EventDetailsShowcaseAccessGrantedDetails = "showcase_access_granted_details"
4874 EventDetailsShowcaseAddMemberDetails = "showcase_add_member_details"
4875 EventDetailsShowcaseArchivedDetails = "showcase_archived_details"
4876 EventDetailsShowcaseCreatedDetails = "showcase_created_details"
4877 EventDetailsShowcaseDeleteCommentDetails = "showcase_delete_comment_details"
4878 EventDetailsShowcaseEditedDetails = "showcase_edited_details"
4879 EventDetailsShowcaseEditCommentDetails = "showcase_edit_comment_details"
4880 EventDetailsShowcaseFileAddedDetails = "showcase_file_added_details"
4881 EventDetailsShowcaseFileDownloadDetails = "showcase_file_download_details"
4882 EventDetailsShowcaseFileRemovedDetails = "showcase_file_removed_details"
4883 EventDetailsShowcaseFileViewDetails = "showcase_file_view_details"
4884 EventDetailsShowcasePermanentlyDeletedDetails = "showcase_permanently_deleted_details"
4885 EventDetailsShowcasePostCommentDetails = "showcase_post_comment_details"
4886 EventDetailsShowcaseRemoveMemberDetails = "showcase_remove_member_details"
4887 EventDetailsShowcaseRenamedDetails = "showcase_renamed_details"
4888 EventDetailsShowcaseRequestAccessDetails = "showcase_request_access_details"
4889 EventDetailsShowcaseResolveCommentDetails = "showcase_resolve_comment_details"
4890 EventDetailsShowcaseRestoredDetails = "showcase_restored_details"
4891 EventDetailsShowcaseTrashedDetails = "showcase_trashed_details"
4892 EventDetailsShowcaseTrashedDeprecatedDetails = "showcase_trashed_deprecated_details"
4893 EventDetailsShowcaseUnresolveCommentDetails = "showcase_unresolve_comment_details"
4894 EventDetailsShowcaseUntrashedDetails = "showcase_untrashed_details"
4895 EventDetailsShowcaseUntrashedDeprecatedDetails = "showcase_untrashed_deprecated_details"
4896 EventDetailsShowcaseViewDetails = "showcase_view_details"
4897 EventDetailsSsoAddCertDetails = "sso_add_cert_details"
4898 EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details"
4899 EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details"
4900 EventDetailsSsoChangeCertDetails = "sso_change_cert_details"
4901 EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details"
4902 EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details"
4903 EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details"
4904 EventDetailsSsoRemoveCertDetails = "sso_remove_cert_details"
4905 EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details"
4906 EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details"
4907 EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details"
4908 EventDetailsTeamFolderCreateDetails = "team_folder_create_details"
4909 EventDetailsTeamFolderDowngradeDetails = "team_folder_downgrade_details"
4910 EventDetailsTeamFolderPermanentlyDeleteDetails = "team_folder_permanently_delete_details"
4911 EventDetailsTeamFolderRenameDetails = "team_folder_rename_details"
4912 EventDetailsTeamSelectiveSyncSettingsChangedDetails = "team_selective_sync_settings_changed_details"
4913 EventDetailsAccountCaptureChangePolicyDetails = "account_capture_change_policy_details"
4914 EventDetailsAllowDownloadDisabledDetails = "allow_download_disabled_details"
4915 EventDetailsAllowDownloadEnabledDetails = "allow_download_enabled_details"
4916 EventDetailsAppPermissionsChangedDetails = "app_permissions_changed_details"
4917 EventDetailsCameraUploadsPolicyChangedDetails = "camera_uploads_policy_changed_details"
4918 EventDetailsClassificationChangePolicyDetails = "classification_change_policy_details"
4919 EventDetailsComputerBackupPolicyChangedDetails = "computer_backup_policy_changed_details"
4920 EventDetailsContentAdministrationPolicyChangedDetails = "content_administration_policy_changed_details"
4921 EventDetailsDataPlacementRestrictionChangePolicyDetails = "data_placement_restriction_change_policy_details"
4922 EventDetailsDataPlacementRestrictionSatisfyPolicyDetails = "data_placement_restriction_satisfy_policy_details"
4923 EventDetailsDeviceApprovalsAddExceptionDetails = "device_approvals_add_exception_details"
4924 EventDetailsDeviceApprovalsChangeDesktopPolicyDetails = "device_approvals_change_desktop_policy_details"
4925 EventDetailsDeviceApprovalsChangeMobilePolicyDetails = "device_approvals_change_mobile_policy_details"
4926 EventDetailsDeviceApprovalsChangeOverageActionDetails = "device_approvals_change_overage_action_details"
4927 EventDetailsDeviceApprovalsChangeUnlinkActionDetails = "device_approvals_change_unlink_action_details"
4928 EventDetailsDeviceApprovalsRemoveExceptionDetails = "device_approvals_remove_exception_details"
4929 EventDetailsDirectoryRestrictionsAddMembersDetails = "directory_restrictions_add_members_details"
4930 EventDetailsDirectoryRestrictionsRemoveMembersDetails = "directory_restrictions_remove_members_details"
4931 EventDetailsEmmAddExceptionDetails = "emm_add_exception_details"
4932 EventDetailsEmmChangePolicyDetails = "emm_change_policy_details"
4933 EventDetailsEmmRemoveExceptionDetails = "emm_remove_exception_details"
4934 EventDetailsExtendedVersionHistoryChangePolicyDetails = "extended_version_history_change_policy_details"
4935 EventDetailsFileCommentsChangePolicyDetails = "file_comments_change_policy_details"
4936 EventDetailsFileLockingPolicyChangedDetails = "file_locking_policy_changed_details"
4937 EventDetailsFileRequestsChangePolicyDetails = "file_requests_change_policy_details"
4938 EventDetailsFileRequestsEmailsEnabledDetails = "file_requests_emails_enabled_details"
4939 EventDetailsFileRequestsEmailsRestrictedToTeamOnlyDetails = "file_requests_emails_restricted_to_team_only_details"
4940 EventDetailsFileTransfersPolicyChangedDetails = "file_transfers_policy_changed_details"
4941 EventDetailsGoogleSsoChangePolicyDetails = "google_sso_change_policy_details"
4942 EventDetailsGroupUserManagementChangePolicyDetails = "group_user_management_change_policy_details"
4943 EventDetailsIntegrationPolicyChangedDetails = "integration_policy_changed_details"
4944 EventDetailsInviteAcceptanceEmailPolicyChangedDetails = "invite_acceptance_email_policy_changed_details"
4945 EventDetailsMemberRequestsChangePolicyDetails = "member_requests_change_policy_details"
4946 EventDetailsMemberSendInvitePolicyChangedDetails = "member_send_invite_policy_changed_details"
4947 EventDetailsMemberSpaceLimitsAddExceptionDetails = "member_space_limits_add_exception_details"
4948 EventDetailsMemberSpaceLimitsChangeCapsTypePolicyDetails = "member_space_limits_change_caps_type_policy_details"
4949 EventDetailsMemberSpaceLimitsChangePolicyDetails = "member_space_limits_change_policy_details"
4950 EventDetailsMemberSpaceLimitsRemoveExceptionDetails = "member_space_limits_remove_exception_details"
4951 EventDetailsMemberSuggestionsChangePolicyDetails = "member_suggestions_change_policy_details"
4952 EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details"
4953 EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details"
4954 EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details"
4955 EventDetailsPaperChangeMemberLinkPolicyDetails = "paper_change_member_link_policy_details"
4956 EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details"
4957 EventDetailsPaperChangePolicyDetails = "paper_change_policy_details"
4958 EventDetailsPaperDefaultFolderPolicyChangedDetails = "paper_default_folder_policy_changed_details"
4959 EventDetailsPaperDesktopPolicyChangedDetails = "paper_desktop_policy_changed_details"
4960 EventDetailsPaperEnabledUsersGroupAdditionDetails = "paper_enabled_users_group_addition_details"
4961 EventDetailsPaperEnabledUsersGroupRemovalDetails = "paper_enabled_users_group_removal_details"
4962 EventDetailsPasswordStrengthRequirementsChangePolicyDetails = "password_strength_requirements_change_policy_details"
4963 EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details"
4964 EventDetailsResellerSupportChangePolicyDetails = "reseller_support_change_policy_details"
4965 EventDetailsRewindPolicyChangedDetails = "rewind_policy_changed_details"
4966 EventDetailsSendForSignaturePolicyChangedDetails = "send_for_signature_policy_changed_details"
4967 EventDetailsSharingChangeFolderJoinPolicyDetails = "sharing_change_folder_join_policy_details"
4968 EventDetailsSharingChangeLinkAllowChangeExpirationPolicyDetails = "sharing_change_link_allow_change_expiration_policy_details"
4969 EventDetailsSharingChangeLinkDefaultExpirationPolicyDetails = "sharing_change_link_default_expiration_policy_details"
4970 EventDetailsSharingChangeLinkEnforcePasswordPolicyDetails = "sharing_change_link_enforce_password_policy_details"
4971 EventDetailsSharingChangeLinkPolicyDetails = "sharing_change_link_policy_details"
4972 EventDetailsSharingChangeMemberPolicyDetails = "sharing_change_member_policy_details"
4973 EventDetailsShowcaseChangeDownloadPolicyDetails = "showcase_change_download_policy_details"
4974 EventDetailsShowcaseChangeEnabledPolicyDetails = "showcase_change_enabled_policy_details"
4975 EventDetailsShowcaseChangeExternalSharingPolicyDetails = "showcase_change_external_sharing_policy_details"
4976 EventDetailsSmarterSmartSyncPolicyChangedDetails = "smarter_smart_sync_policy_changed_details"
4977 EventDetailsSmartSyncChangePolicyDetails = "smart_sync_change_policy_details"
4978 EventDetailsSmartSyncNotOptOutDetails = "smart_sync_not_opt_out_details"
4979 EventDetailsSmartSyncOptOutDetails = "smart_sync_opt_out_details"
4980 EventDetailsSsoChangePolicyDetails = "sso_change_policy_details"
4981 EventDetailsTeamBrandingPolicyChangedDetails = "team_branding_policy_changed_details"
4982 EventDetailsTeamExtensionsPolicyChangedDetails = "team_extensions_policy_changed_details"
4983 EventDetailsTeamSelectiveSyncPolicyChangedDetails = "team_selective_sync_policy_changed_details"
4984 EventDetailsTeamSharingWhitelistSubjectsChangedDetails = "team_sharing_whitelist_subjects_changed_details"
4985 EventDetailsTfaAddExceptionDetails = "tfa_add_exception_details"
4986 EventDetailsTfaChangePolicyDetails = "tfa_change_policy_details"
4987 EventDetailsTfaRemoveExceptionDetails = "tfa_remove_exception_details"
4988 EventDetailsTwoAccountChangePolicyDetails = "two_account_change_policy_details"
4989 EventDetailsViewerInfoPolicyChangedDetails = "viewer_info_policy_changed_details"
4990 EventDetailsWatermarkingPolicyChangedDetails = "watermarking_policy_changed_details"
4991 EventDetailsWebSessionsChangeActiveSessionLimitDetails = "web_sessions_change_active_session_limit_details"
4992 EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details"
4993 EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details"
4994 EventDetailsTeamMergeFromDetails = "team_merge_from_details"
4995 EventDetailsTeamMergeToDetails = "team_merge_to_details"
4996 EventDetailsTeamProfileAddBackgroundDetails = "team_profile_add_background_details"
4997 EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details"
4998 EventDetailsTeamProfileChangeBackgroundDetails = "team_profile_change_background_details"
4999 EventDetailsTeamProfileChangeDefaultLanguageDetails = "team_profile_change_default_language_details"
5000 EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details"
5001 EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details"
5002 EventDetailsTeamProfileRemoveBackgroundDetails = "team_profile_remove_background_details"
5003 EventDetailsTeamProfileRemoveLogoDetails = "team_profile_remove_logo_details"
5004 EventDetailsTfaAddBackupPhoneDetails = "tfa_add_backup_phone_details"
5005 EventDetailsTfaAddSecurityKeyDetails = "tfa_add_security_key_details"
5006 EventDetailsTfaChangeBackupPhoneDetails = "tfa_change_backup_phone_details"
5007 EventDetailsTfaChangeStatusDetails = "tfa_change_status_details"
5008 EventDetailsTfaRemoveBackupPhoneDetails = "tfa_remove_backup_phone_details"
5009 EventDetailsTfaRemoveSecurityKeyDetails = "tfa_remove_security_key_details"
5010 EventDetailsTfaResetDetails = "tfa_reset_details"
5011 EventDetailsChangedEnterpriseAdminRoleDetails = "changed_enterprise_admin_role_details"
5012 EventDetailsChangedEnterpriseConnectedTeamStatusDetails = "changed_enterprise_connected_team_status_details"
5013 EventDetailsEndedEnterpriseAdminSessionDetails = "ended_enterprise_admin_session_details"
5014 EventDetailsEndedEnterpriseAdminSessionDeprecatedDetails = "ended_enterprise_admin_session_deprecated_details"
5015 EventDetailsEnterpriseSettingsLockingDetails = "enterprise_settings_locking_details"
5016 EventDetailsGuestAdminChangeStatusDetails = "guest_admin_change_status_details"
5017 EventDetailsStartedEnterpriseAdminSessionDetails = "started_enterprise_admin_session_details"
5018 EventDetailsTeamMergeRequestAcceptedDetails = "team_merge_request_accepted_details"
5019 EventDetailsTeamMergeRequestAcceptedShownToPrimaryTeamDetails = "team_merge_request_accepted_shown_to_primary_team_details"
5020 EventDetailsTeamMergeRequestAcceptedShownToSecondaryTeamDetails = "team_merge_request_accepted_shown_to_secondary_team_details"
5021 EventDetailsTeamMergeRequestAutoCanceledDetails = "team_merge_request_auto_canceled_details"
5022 EventDetailsTeamMergeRequestCanceledDetails = "team_merge_request_canceled_details"
5023 EventDetailsTeamMergeRequestCanceledShownToPrimaryTeamDetails = "team_merge_request_canceled_shown_to_primary_team_details"
5024 EventDetailsTeamMergeRequestCanceledShownToSecondaryTeamDetails = "team_merge_request_canceled_shown_to_secondary_team_details"
5025 EventDetailsTeamMergeRequestExpiredDetails = "team_merge_request_expired_details"
5026 EventDetailsTeamMergeRequestExpiredShownToPrimaryTeamDetails = "team_merge_request_expired_shown_to_primary_team_details"
5027 EventDetailsTeamMergeRequestExpiredShownToSecondaryTeamDetails = "team_merge_request_expired_shown_to_secondary_team_details"
5028 EventDetailsTeamMergeRequestRejectedShownToPrimaryTeamDetails = "team_merge_request_rejected_shown_to_primary_team_details"
5029 EventDetailsTeamMergeRequestRejectedShownToSecondaryTeamDetails = "team_merge_request_rejected_shown_to_secondary_team_details"
5030 EventDetailsTeamMergeRequestReminderDetails = "team_merge_request_reminder_details"
5031 EventDetailsTeamMergeRequestReminderShownToPrimaryTeamDetails = "team_merge_request_reminder_shown_to_primary_team_details"
5032 EventDetailsTeamMergeRequestReminderShownToSecondaryTeamDetails = "team_merge_request_reminder_shown_to_secondary_team_details"
5033 EventDetailsTeamMergeRequestRevokedDetails = "team_merge_request_revoked_details"
5034 EventDetailsTeamMergeRequestSentShownToPrimaryTeamDetails = "team_merge_request_sent_shown_to_primary_team_details"
5035 EventDetailsTeamMergeRequestSentShownToSecondaryTeamDetails = "team_merge_request_sent_shown_to_secondary_team_details"
5036 EventDetailsMissingDetails = "missing_details"
5037 EventDetailsOther = "other"
5038 )
5039
5040 // UnmarshalJSON deserializes into a EventDetails instance
5041 func (u *EventDetails) UnmarshalJSON(body []byte) error {
5042 type wrap struct {
5043 dropbox.Tagged
5044 }
5045 var w wrap
5046 var err error
5047 if err = json.Unmarshal(body, &w); err != nil {
5048 return err
5049 }
5050 u.Tag = w.Tag
5051 switch u.Tag {
5052 case "admin_alerting_alert_state_changed_details":
5053 err = json.Unmarshal(body, &u.AdminAlertingAlertStateChangedDetails)
5054
5055 if err != nil {
5056 return err
5057 }
5058 case "admin_alerting_changed_alert_config_details":
5059 err = json.Unmarshal(body, &u.AdminAlertingChangedAlertConfigDetails)
5060
5061 if err != nil {
5062 return err
5063 }
5064 case "admin_alerting_triggered_alert_details":
5065 err = json.Unmarshal(body, &u.AdminAlertingTriggeredAlertDetails)
5066
5067 if err != nil {
5068 return err
5069 }
5070 case "app_blocked_by_permissions_details":
5071 err = json.Unmarshal(body, &u.AppBlockedByPermissionsDetails)
5072
5073 if err != nil {
5074 return err
5075 }
5076 case "app_link_team_details":
5077 err = json.Unmarshal(body, &u.AppLinkTeamDetails)
5078
5079 if err != nil {
5080 return err
5081 }
5082 case "app_link_user_details":
5083 err = json.Unmarshal(body, &u.AppLinkUserDetails)
5084
5085 if err != nil {
5086 return err
5087 }
5088 case "app_unlink_team_details":
5089 err = json.Unmarshal(body, &u.AppUnlinkTeamDetails)
5090
5091 if err != nil {
5092 return err
5093 }
5094 case "app_unlink_user_details":
5095 err = json.Unmarshal(body, &u.AppUnlinkUserDetails)
5096
5097 if err != nil {
5098 return err
5099 }
5100 case "integration_connected_details":
5101 err = json.Unmarshal(body, &u.IntegrationConnectedDetails)
5102
5103 if err != nil {
5104 return err
5105 }
5106 case "integration_disconnected_details":
5107 err = json.Unmarshal(body, &u.IntegrationDisconnectedDetails)
5108
5109 if err != nil {
5110 return err
5111 }
5112 case "file_add_comment_details":
5113 err = json.Unmarshal(body, &u.FileAddCommentDetails)
5114
5115 if err != nil {
5116 return err
5117 }
5118 case "file_change_comment_subscription_details":
5119 err = json.Unmarshal(body, &u.FileChangeCommentSubscriptionDetails)
5120
5121 if err != nil {
5122 return err
5123 }
5124 case "file_delete_comment_details":
5125 err = json.Unmarshal(body, &u.FileDeleteCommentDetails)
5126
5127 if err != nil {
5128 return err
5129 }
5130 case "file_edit_comment_details":
5131 err = json.Unmarshal(body, &u.FileEditCommentDetails)
5132
5133 if err != nil {
5134 return err
5135 }
5136 case "file_like_comment_details":
5137 err = json.Unmarshal(body, &u.FileLikeCommentDetails)
5138
5139 if err != nil {
5140 return err
5141 }
5142 case "file_resolve_comment_details":
5143 err = json.Unmarshal(body, &u.FileResolveCommentDetails)
5144
5145 if err != nil {
5146 return err
5147 }
5148 case "file_unlike_comment_details":
5149 err = json.Unmarshal(body, &u.FileUnlikeCommentDetails)
5150
5151 if err != nil {
5152 return err
5153 }
5154 case "file_unresolve_comment_details":
5155 err = json.Unmarshal(body, &u.FileUnresolveCommentDetails)
5156
5157 if err != nil {
5158 return err
5159 }
5160 case "governance_policy_add_folders_details":
5161 err = json.Unmarshal(body, &u.GovernancePolicyAddFoldersDetails)
5162
5163 if err != nil {
5164 return err
5165 }
5166 case "governance_policy_add_folder_failed_details":
5167 err = json.Unmarshal(body, &u.GovernancePolicyAddFolderFailedDetails)
5168
5169 if err != nil {
5170 return err
5171 }
5172 case "governance_policy_content_disposed_details":
5173 err = json.Unmarshal(body, &u.GovernancePolicyContentDisposedDetails)
5174
5175 if err != nil {
5176 return err
5177 }
5178 case "governance_policy_create_details":
5179 err = json.Unmarshal(body, &u.GovernancePolicyCreateDetails)
5180
5181 if err != nil {
5182 return err
5183 }
5184 case "governance_policy_delete_details":
5185 err = json.Unmarshal(body, &u.GovernancePolicyDeleteDetails)
5186
5187 if err != nil {
5188 return err
5189 }
5190 case "governance_policy_edit_details_details":
5191 err = json.Unmarshal(body, &u.GovernancePolicyEditDetailsDetails)
5192
5193 if err != nil {
5194 return err
5195 }
5196 case "governance_policy_edit_duration_details":
5197 err = json.Unmarshal(body, &u.GovernancePolicyEditDurationDetails)
5198
5199 if err != nil {
5200 return err
5201 }
5202 case "governance_policy_export_created_details":
5203 err = json.Unmarshal(body, &u.GovernancePolicyExportCreatedDetails)
5204
5205 if err != nil {
5206 return err
5207 }
5208 case "governance_policy_export_removed_details":
5209 err = json.Unmarshal(body, &u.GovernancePolicyExportRemovedDetails)
5210
5211 if err != nil {
5212 return err
5213 }
5214 case "governance_policy_remove_folders_details":
5215 err = json.Unmarshal(body, &u.GovernancePolicyRemoveFoldersDetails)
5216
5217 if err != nil {
5218 return err
5219 }
5220 case "governance_policy_report_created_details":
5221 err = json.Unmarshal(body, &u.GovernancePolicyReportCreatedDetails)
5222
5223 if err != nil {
5224 return err
5225 }
5226 case "governance_policy_zip_part_downloaded_details":
5227 err = json.Unmarshal(body, &u.GovernancePolicyZipPartDownloadedDetails)
5228
5229 if err != nil {
5230 return err
5231 }
5232 case "legal_holds_activate_a_hold_details":
5233 err = json.Unmarshal(body, &u.LegalHoldsActivateAHoldDetails)
5234
5235 if err != nil {
5236 return err
5237 }
5238 case "legal_holds_add_members_details":
5239 err = json.Unmarshal(body, &u.LegalHoldsAddMembersDetails)
5240
5241 if err != nil {
5242 return err
5243 }
5244 case "legal_holds_change_hold_details_details":
5245 err = json.Unmarshal(body, &u.LegalHoldsChangeHoldDetailsDetails)
5246
5247 if err != nil {
5248 return err
5249 }
5250 case "legal_holds_change_hold_name_details":
5251 err = json.Unmarshal(body, &u.LegalHoldsChangeHoldNameDetails)
5252
5253 if err != nil {
5254 return err
5255 }
5256 case "legal_holds_export_a_hold_details":
5257 err = json.Unmarshal(body, &u.LegalHoldsExportAHoldDetails)
5258
5259 if err != nil {
5260 return err
5261 }
5262 case "legal_holds_export_cancelled_details":
5263 err = json.Unmarshal(body, &u.LegalHoldsExportCancelledDetails)
5264
5265 if err != nil {
5266 return err
5267 }
5268 case "legal_holds_export_downloaded_details":
5269 err = json.Unmarshal(body, &u.LegalHoldsExportDownloadedDetails)
5270
5271 if err != nil {
5272 return err
5273 }
5274 case "legal_holds_export_removed_details":
5275 err = json.Unmarshal(body, &u.LegalHoldsExportRemovedDetails)
5276
5277 if err != nil {
5278 return err
5279 }
5280 case "legal_holds_release_a_hold_details":
5281 err = json.Unmarshal(body, &u.LegalHoldsReleaseAHoldDetails)
5282
5283 if err != nil {
5284 return err
5285 }
5286 case "legal_holds_remove_members_details":
5287 err = json.Unmarshal(body, &u.LegalHoldsRemoveMembersDetails)
5288
5289 if err != nil {
5290 return err
5291 }
5292 case "legal_holds_report_a_hold_details":
5293 err = json.Unmarshal(body, &u.LegalHoldsReportAHoldDetails)
5294
5295 if err != nil {
5296 return err
5297 }
5298 case "device_change_ip_desktop_details":
5299 err = json.Unmarshal(body, &u.DeviceChangeIpDesktopDetails)
5300
5301 if err != nil {
5302 return err
5303 }
5304 case "device_change_ip_mobile_details":
5305 err = json.Unmarshal(body, &u.DeviceChangeIpMobileDetails)
5306
5307 if err != nil {
5308 return err
5309 }
5310 case "device_change_ip_web_details":
5311 err = json.Unmarshal(body, &u.DeviceChangeIpWebDetails)
5312
5313 if err != nil {
5314 return err
5315 }
5316 case "device_delete_on_unlink_fail_details":
5317 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFailDetails)
5318
5319 if err != nil {
5320 return err
5321 }
5322 case "device_delete_on_unlink_success_details":
5323 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccessDetails)
5324
5325 if err != nil {
5326 return err
5327 }
5328 case "device_link_fail_details":
5329 err = json.Unmarshal(body, &u.DeviceLinkFailDetails)
5330
5331 if err != nil {
5332 return err
5333 }
5334 case "device_link_success_details":
5335 err = json.Unmarshal(body, &u.DeviceLinkSuccessDetails)
5336
5337 if err != nil {
5338 return err
5339 }
5340 case "device_management_disabled_details":
5341 err = json.Unmarshal(body, &u.DeviceManagementDisabledDetails)
5342
5343 if err != nil {
5344 return err
5345 }
5346 case "device_management_enabled_details":
5347 err = json.Unmarshal(body, &u.DeviceManagementEnabledDetails)
5348
5349 if err != nil {
5350 return err
5351 }
5352 case "device_sync_backup_status_changed_details":
5353 err = json.Unmarshal(body, &u.DeviceSyncBackupStatusChangedDetails)
5354
5355 if err != nil {
5356 return err
5357 }
5358 case "device_unlink_details":
5359 err = json.Unmarshal(body, &u.DeviceUnlinkDetails)
5360
5361 if err != nil {
5362 return err
5363 }
5364 case "dropbox_passwords_exported_details":
5365 err = json.Unmarshal(body, &u.DropboxPasswordsExportedDetails)
5366
5367 if err != nil {
5368 return err
5369 }
5370 case "dropbox_passwords_new_device_enrolled_details":
5371 err = json.Unmarshal(body, &u.DropboxPasswordsNewDeviceEnrolledDetails)
5372
5373 if err != nil {
5374 return err
5375 }
5376 case "emm_refresh_auth_token_details":
5377 err = json.Unmarshal(body, &u.EmmRefreshAuthTokenDetails)
5378
5379 if err != nil {
5380 return err
5381 }
5382 case "account_capture_change_availability_details":
5383 err = json.Unmarshal(body, &u.AccountCaptureChangeAvailabilityDetails)
5384
5385 if err != nil {
5386 return err
5387 }
5388 case "account_capture_migrate_account_details":
5389 err = json.Unmarshal(body, &u.AccountCaptureMigrateAccountDetails)
5390
5391 if err != nil {
5392 return err
5393 }
5394 case "account_capture_notification_emails_sent_details":
5395 err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSentDetails)
5396
5397 if err != nil {
5398 return err
5399 }
5400 case "account_capture_relinquish_account_details":
5401 err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccountDetails)
5402
5403 if err != nil {
5404 return err
5405 }
5406 case "disabled_domain_invites_details":
5407 err = json.Unmarshal(body, &u.DisabledDomainInvitesDetails)
5408
5409 if err != nil {
5410 return err
5411 }
5412 case "domain_invites_approve_request_to_join_team_details":
5413 err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeamDetails)
5414
5415 if err != nil {
5416 return err
5417 }
5418 case "domain_invites_decline_request_to_join_team_details":
5419 err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeamDetails)
5420
5421 if err != nil {
5422 return err
5423 }
5424 case "domain_invites_email_existing_users_details":
5425 err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsersDetails)
5426
5427 if err != nil {
5428 return err
5429 }
5430 case "domain_invites_request_to_join_team_details":
5431 err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeamDetails)
5432
5433 if err != nil {
5434 return err
5435 }
5436 case "domain_invites_set_invite_new_user_pref_to_no_details":
5437 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNoDetails)
5438
5439 if err != nil {
5440 return err
5441 }
5442 case "domain_invites_set_invite_new_user_pref_to_yes_details":
5443 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYesDetails)
5444
5445 if err != nil {
5446 return err
5447 }
5448 case "domain_verification_add_domain_fail_details":
5449 err = json.Unmarshal(body, &u.DomainVerificationAddDomainFailDetails)
5450
5451 if err != nil {
5452 return err
5453 }
5454 case "domain_verification_add_domain_success_details":
5455 err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccessDetails)
5456
5457 if err != nil {
5458 return err
5459 }
5460 case "domain_verification_remove_domain_details":
5461 err = json.Unmarshal(body, &u.DomainVerificationRemoveDomainDetails)
5462
5463 if err != nil {
5464 return err
5465 }
5466 case "enabled_domain_invites_details":
5467 err = json.Unmarshal(body, &u.EnabledDomainInvitesDetails)
5468
5469 if err != nil {
5470 return err
5471 }
5472 case "apply_naming_convention_details":
5473 err = json.Unmarshal(body, &u.ApplyNamingConventionDetails)
5474
5475 if err != nil {
5476 return err
5477 }
5478 case "create_folder_details":
5479 err = json.Unmarshal(body, &u.CreateFolderDetails)
5480
5481 if err != nil {
5482 return err
5483 }
5484 case "file_add_details":
5485 err = json.Unmarshal(body, &u.FileAddDetails)
5486
5487 if err != nil {
5488 return err
5489 }
5490 case "file_copy_details":
5491 err = json.Unmarshal(body, &u.FileCopyDetails)
5492
5493 if err != nil {
5494 return err
5495 }
5496 case "file_delete_details":
5497 err = json.Unmarshal(body, &u.FileDeleteDetails)
5498
5499 if err != nil {
5500 return err
5501 }
5502 case "file_download_details":
5503 err = json.Unmarshal(body, &u.FileDownloadDetails)
5504
5505 if err != nil {
5506 return err
5507 }
5508 case "file_edit_details":
5509 err = json.Unmarshal(body, &u.FileEditDetails)
5510
5511 if err != nil {
5512 return err
5513 }
5514 case "file_get_copy_reference_details":
5515 err = json.Unmarshal(body, &u.FileGetCopyReferenceDetails)
5516
5517 if err != nil {
5518 return err
5519 }
5520 case "file_locking_lock_status_changed_details":
5521 err = json.Unmarshal(body, &u.FileLockingLockStatusChangedDetails)
5522
5523 if err != nil {
5524 return err
5525 }
5526 case "file_move_details":
5527 err = json.Unmarshal(body, &u.FileMoveDetails)
5528
5529 if err != nil {
5530 return err
5531 }
5532 case "file_permanently_delete_details":
5533 err = json.Unmarshal(body, &u.FilePermanentlyDeleteDetails)
5534
5535 if err != nil {
5536 return err
5537 }
5538 case "file_preview_details":
5539 err = json.Unmarshal(body, &u.FilePreviewDetails)
5540
5541 if err != nil {
5542 return err
5543 }
5544 case "file_rename_details":
5545 err = json.Unmarshal(body, &u.FileRenameDetails)
5546
5547 if err != nil {
5548 return err
5549 }
5550 case "file_restore_details":
5551 err = json.Unmarshal(body, &u.FileRestoreDetails)
5552
5553 if err != nil {
5554 return err
5555 }
5556 case "file_revert_details":
5557 err = json.Unmarshal(body, &u.FileRevertDetails)
5558
5559 if err != nil {
5560 return err
5561 }
5562 case "file_rollback_changes_details":
5563 err = json.Unmarshal(body, &u.FileRollbackChangesDetails)
5564
5565 if err != nil {
5566 return err
5567 }
5568 case "file_save_copy_reference_details":
5569 err = json.Unmarshal(body, &u.FileSaveCopyReferenceDetails)
5570
5571 if err != nil {
5572 return err
5573 }
5574 case "folder_overview_description_changed_details":
5575 err = json.Unmarshal(body, &u.FolderOverviewDescriptionChangedDetails)
5576
5577 if err != nil {
5578 return err
5579 }
5580 case "folder_overview_item_pinned_details":
5581 err = json.Unmarshal(body, &u.FolderOverviewItemPinnedDetails)
5582
5583 if err != nil {
5584 return err
5585 }
5586 case "folder_overview_item_unpinned_details":
5587 err = json.Unmarshal(body, &u.FolderOverviewItemUnpinnedDetails)
5588
5589 if err != nil {
5590 return err
5591 }
5592 case "object_label_added_details":
5593 err = json.Unmarshal(body, &u.ObjectLabelAddedDetails)
5594
5595 if err != nil {
5596 return err
5597 }
5598 case "object_label_removed_details":
5599 err = json.Unmarshal(body, &u.ObjectLabelRemovedDetails)
5600
5601 if err != nil {
5602 return err
5603 }
5604 case "object_label_updated_value_details":
5605 err = json.Unmarshal(body, &u.ObjectLabelUpdatedValueDetails)
5606
5607 if err != nil {
5608 return err
5609 }
5610 case "organize_folder_with_tidy_details":
5611 err = json.Unmarshal(body, &u.OrganizeFolderWithTidyDetails)
5612
5613 if err != nil {
5614 return err
5615 }
5616 case "rewind_folder_details":
5617 err = json.Unmarshal(body, &u.RewindFolderDetails)
5618
5619 if err != nil {
5620 return err
5621 }
5622 case "user_tags_added_details":
5623 err = json.Unmarshal(body, &u.UserTagsAddedDetails)
5624
5625 if err != nil {
5626 return err
5627 }
5628 case "user_tags_removed_details":
5629 err = json.Unmarshal(body, &u.UserTagsRemovedDetails)
5630
5631 if err != nil {
5632 return err
5633 }
5634 case "file_request_change_details":
5635 err = json.Unmarshal(body, &u.FileRequestChangeDetails)
5636
5637 if err != nil {
5638 return err
5639 }
5640 case "file_request_close_details":
5641 err = json.Unmarshal(body, &u.FileRequestCloseDetails)
5642
5643 if err != nil {
5644 return err
5645 }
5646 case "file_request_create_details":
5647 err = json.Unmarshal(body, &u.FileRequestCreateDetails)
5648
5649 if err != nil {
5650 return err
5651 }
5652 case "file_request_delete_details":
5653 err = json.Unmarshal(body, &u.FileRequestDeleteDetails)
5654
5655 if err != nil {
5656 return err
5657 }
5658 case "file_request_receive_file_details":
5659 err = json.Unmarshal(body, &u.FileRequestReceiveFileDetails)
5660
5661 if err != nil {
5662 return err
5663 }
5664 case "group_add_external_id_details":
5665 err = json.Unmarshal(body, &u.GroupAddExternalIdDetails)
5666
5667 if err != nil {
5668 return err
5669 }
5670 case "group_add_member_details":
5671 err = json.Unmarshal(body, &u.GroupAddMemberDetails)
5672
5673 if err != nil {
5674 return err
5675 }
5676 case "group_change_external_id_details":
5677 err = json.Unmarshal(body, &u.GroupChangeExternalIdDetails)
5678
5679 if err != nil {
5680 return err
5681 }
5682 case "group_change_management_type_details":
5683 err = json.Unmarshal(body, &u.GroupChangeManagementTypeDetails)
5684
5685 if err != nil {
5686 return err
5687 }
5688 case "group_change_member_role_details":
5689 err = json.Unmarshal(body, &u.GroupChangeMemberRoleDetails)
5690
5691 if err != nil {
5692 return err
5693 }
5694 case "group_create_details":
5695 err = json.Unmarshal(body, &u.GroupCreateDetails)
5696
5697 if err != nil {
5698 return err
5699 }
5700 case "group_delete_details":
5701 err = json.Unmarshal(body, &u.GroupDeleteDetails)
5702
5703 if err != nil {
5704 return err
5705 }
5706 case "group_description_updated_details":
5707 err = json.Unmarshal(body, &u.GroupDescriptionUpdatedDetails)
5708
5709 if err != nil {
5710 return err
5711 }
5712 case "group_join_policy_updated_details":
5713 err = json.Unmarshal(body, &u.GroupJoinPolicyUpdatedDetails)
5714
5715 if err != nil {
5716 return err
5717 }
5718 case "group_moved_details":
5719 err = json.Unmarshal(body, &u.GroupMovedDetails)
5720
5721 if err != nil {
5722 return err
5723 }
5724 case "group_remove_external_id_details":
5725 err = json.Unmarshal(body, &u.GroupRemoveExternalIdDetails)
5726
5727 if err != nil {
5728 return err
5729 }
5730 case "group_remove_member_details":
5731 err = json.Unmarshal(body, &u.GroupRemoveMemberDetails)
5732
5733 if err != nil {
5734 return err
5735 }
5736 case "group_rename_details":
5737 err = json.Unmarshal(body, &u.GroupRenameDetails)
5738
5739 if err != nil {
5740 return err
5741 }
5742 case "account_lock_or_unlocked_details":
5743 err = json.Unmarshal(body, &u.AccountLockOrUnlockedDetails)
5744
5745 if err != nil {
5746 return err
5747 }
5748 case "emm_error_details":
5749 err = json.Unmarshal(body, &u.EmmErrorDetails)
5750
5751 if err != nil {
5752 return err
5753 }
5754 case "guest_admin_signed_in_via_trusted_teams_details":
5755 err = json.Unmarshal(body, &u.GuestAdminSignedInViaTrustedTeamsDetails)
5756
5757 if err != nil {
5758 return err
5759 }
5760 case "guest_admin_signed_out_via_trusted_teams_details":
5761 err = json.Unmarshal(body, &u.GuestAdminSignedOutViaTrustedTeamsDetails)
5762
5763 if err != nil {
5764 return err
5765 }
5766 case "login_fail_details":
5767 err = json.Unmarshal(body, &u.LoginFailDetails)
5768
5769 if err != nil {
5770 return err
5771 }
5772 case "login_success_details":
5773 err = json.Unmarshal(body, &u.LoginSuccessDetails)
5774
5775 if err != nil {
5776 return err
5777 }
5778 case "logout_details":
5779 err = json.Unmarshal(body, &u.LogoutDetails)
5780
5781 if err != nil {
5782 return err
5783 }
5784 case "reseller_support_session_end_details":
5785 err = json.Unmarshal(body, &u.ResellerSupportSessionEndDetails)
5786
5787 if err != nil {
5788 return err
5789 }
5790 case "reseller_support_session_start_details":
5791 err = json.Unmarshal(body, &u.ResellerSupportSessionStartDetails)
5792
5793 if err != nil {
5794 return err
5795 }
5796 case "sign_in_as_session_end_details":
5797 err = json.Unmarshal(body, &u.SignInAsSessionEndDetails)
5798
5799 if err != nil {
5800 return err
5801 }
5802 case "sign_in_as_session_start_details":
5803 err = json.Unmarshal(body, &u.SignInAsSessionStartDetails)
5804
5805 if err != nil {
5806 return err
5807 }
5808 case "sso_error_details":
5809 err = json.Unmarshal(body, &u.SsoErrorDetails)
5810
5811 if err != nil {
5812 return err
5813 }
5814 case "create_team_invite_link_details":
5815 err = json.Unmarshal(body, &u.CreateTeamInviteLinkDetails)
5816
5817 if err != nil {
5818 return err
5819 }
5820 case "delete_team_invite_link_details":
5821 err = json.Unmarshal(body, &u.DeleteTeamInviteLinkDetails)
5822
5823 if err != nil {
5824 return err
5825 }
5826 case "member_add_external_id_details":
5827 err = json.Unmarshal(body, &u.MemberAddExternalIdDetails)
5828
5829 if err != nil {
5830 return err
5831 }
5832 case "member_add_name_details":
5833 err = json.Unmarshal(body, &u.MemberAddNameDetails)
5834
5835 if err != nil {
5836 return err
5837 }
5838 case "member_change_admin_role_details":
5839 err = json.Unmarshal(body, &u.MemberChangeAdminRoleDetails)
5840
5841 if err != nil {
5842 return err
5843 }
5844 case "member_change_email_details":
5845 err = json.Unmarshal(body, &u.MemberChangeEmailDetails)
5846
5847 if err != nil {
5848 return err
5849 }
5850 case "member_change_external_id_details":
5851 err = json.Unmarshal(body, &u.MemberChangeExternalIdDetails)
5852
5853 if err != nil {
5854 return err
5855 }
5856 case "member_change_membership_type_details":
5857 err = json.Unmarshal(body, &u.MemberChangeMembershipTypeDetails)
5858
5859 if err != nil {
5860 return err
5861 }
5862 case "member_change_name_details":
5863 err = json.Unmarshal(body, &u.MemberChangeNameDetails)
5864
5865 if err != nil {
5866 return err
5867 }
5868 case "member_change_reseller_role_details":
5869 err = json.Unmarshal(body, &u.MemberChangeResellerRoleDetails)
5870
5871 if err != nil {
5872 return err
5873 }
5874 case "member_change_status_details":
5875 err = json.Unmarshal(body, &u.MemberChangeStatusDetails)
5876
5877 if err != nil {
5878 return err
5879 }
5880 case "member_delete_manual_contacts_details":
5881 err = json.Unmarshal(body, &u.MemberDeleteManualContactsDetails)
5882
5883 if err != nil {
5884 return err
5885 }
5886 case "member_delete_profile_photo_details":
5887 err = json.Unmarshal(body, &u.MemberDeleteProfilePhotoDetails)
5888
5889 if err != nil {
5890 return err
5891 }
5892 case "member_permanently_delete_account_contents_details":
5893 err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContentsDetails)
5894
5895 if err != nil {
5896 return err
5897 }
5898 case "member_remove_external_id_details":
5899 err = json.Unmarshal(body, &u.MemberRemoveExternalIdDetails)
5900
5901 if err != nil {
5902 return err
5903 }
5904 case "member_set_profile_photo_details":
5905 err = json.Unmarshal(body, &u.MemberSetProfilePhotoDetails)
5906
5907 if err != nil {
5908 return err
5909 }
5910 case "member_space_limits_add_custom_quota_details":
5911 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuotaDetails)
5912
5913 if err != nil {
5914 return err
5915 }
5916 case "member_space_limits_change_custom_quota_details":
5917 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuotaDetails)
5918
5919 if err != nil {
5920 return err
5921 }
5922 case "member_space_limits_change_status_details":
5923 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatusDetails)
5924
5925 if err != nil {
5926 return err
5927 }
5928 case "member_space_limits_remove_custom_quota_details":
5929 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuotaDetails)
5930
5931 if err != nil {
5932 return err
5933 }
5934 case "member_suggest_details":
5935 err = json.Unmarshal(body, &u.MemberSuggestDetails)
5936
5937 if err != nil {
5938 return err
5939 }
5940 case "member_transfer_account_contents_details":
5941 err = json.Unmarshal(body, &u.MemberTransferAccountContentsDetails)
5942
5943 if err != nil {
5944 return err
5945 }
5946 case "pending_secondary_email_added_details":
5947 err = json.Unmarshal(body, &u.PendingSecondaryEmailAddedDetails)
5948
5949 if err != nil {
5950 return err
5951 }
5952 case "secondary_email_deleted_details":
5953 err = json.Unmarshal(body, &u.SecondaryEmailDeletedDetails)
5954
5955 if err != nil {
5956 return err
5957 }
5958 case "secondary_email_verified_details":
5959 err = json.Unmarshal(body, &u.SecondaryEmailVerifiedDetails)
5960
5961 if err != nil {
5962 return err
5963 }
5964 case "secondary_mails_policy_changed_details":
5965 err = json.Unmarshal(body, &u.SecondaryMailsPolicyChangedDetails)
5966
5967 if err != nil {
5968 return err
5969 }
5970 case "binder_add_page_details":
5971 err = json.Unmarshal(body, &u.BinderAddPageDetails)
5972
5973 if err != nil {
5974 return err
5975 }
5976 case "binder_add_section_details":
5977 err = json.Unmarshal(body, &u.BinderAddSectionDetails)
5978
5979 if err != nil {
5980 return err
5981 }
5982 case "binder_remove_page_details":
5983 err = json.Unmarshal(body, &u.BinderRemovePageDetails)
5984
5985 if err != nil {
5986 return err
5987 }
5988 case "binder_remove_section_details":
5989 err = json.Unmarshal(body, &u.BinderRemoveSectionDetails)
5990
5991 if err != nil {
5992 return err
5993 }
5994 case "binder_rename_page_details":
5995 err = json.Unmarshal(body, &u.BinderRenamePageDetails)
5996
5997 if err != nil {
5998 return err
5999 }
6000 case "binder_rename_section_details":
6001 err = json.Unmarshal(body, &u.BinderRenameSectionDetails)
6002
6003 if err != nil {
6004 return err
6005 }
6006 case "binder_reorder_page_details":
6007 err = json.Unmarshal(body, &u.BinderReorderPageDetails)
6008
6009 if err != nil {
6010 return err
6011 }
6012 case "binder_reorder_section_details":
6013 err = json.Unmarshal(body, &u.BinderReorderSectionDetails)
6014
6015 if err != nil {
6016 return err
6017 }
6018 case "paper_content_add_member_details":
6019 err = json.Unmarshal(body, &u.PaperContentAddMemberDetails)
6020
6021 if err != nil {
6022 return err
6023 }
6024 case "paper_content_add_to_folder_details":
6025 err = json.Unmarshal(body, &u.PaperContentAddToFolderDetails)
6026
6027 if err != nil {
6028 return err
6029 }
6030 case "paper_content_archive_details":
6031 err = json.Unmarshal(body, &u.PaperContentArchiveDetails)
6032
6033 if err != nil {
6034 return err
6035 }
6036 case "paper_content_create_details":
6037 err = json.Unmarshal(body, &u.PaperContentCreateDetails)
6038
6039 if err != nil {
6040 return err
6041 }
6042 case "paper_content_permanently_delete_details":
6043 err = json.Unmarshal(body, &u.PaperContentPermanentlyDeleteDetails)
6044
6045 if err != nil {
6046 return err
6047 }
6048 case "paper_content_remove_from_folder_details":
6049 err = json.Unmarshal(body, &u.PaperContentRemoveFromFolderDetails)
6050
6051 if err != nil {
6052 return err
6053 }
6054 case "paper_content_remove_member_details":
6055 err = json.Unmarshal(body, &u.PaperContentRemoveMemberDetails)
6056
6057 if err != nil {
6058 return err
6059 }
6060 case "paper_content_rename_details":
6061 err = json.Unmarshal(body, &u.PaperContentRenameDetails)
6062
6063 if err != nil {
6064 return err
6065 }
6066 case "paper_content_restore_details":
6067 err = json.Unmarshal(body, &u.PaperContentRestoreDetails)
6068
6069 if err != nil {
6070 return err
6071 }
6072 case "paper_doc_add_comment_details":
6073 err = json.Unmarshal(body, &u.PaperDocAddCommentDetails)
6074
6075 if err != nil {
6076 return err
6077 }
6078 case "paper_doc_change_member_role_details":
6079 err = json.Unmarshal(body, &u.PaperDocChangeMemberRoleDetails)
6080
6081 if err != nil {
6082 return err
6083 }
6084 case "paper_doc_change_sharing_policy_details":
6085 err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicyDetails)
6086
6087 if err != nil {
6088 return err
6089 }
6090 case "paper_doc_change_subscription_details":
6091 err = json.Unmarshal(body, &u.PaperDocChangeSubscriptionDetails)
6092
6093 if err != nil {
6094 return err
6095 }
6096 case "paper_doc_deleted_details":
6097 err = json.Unmarshal(body, &u.PaperDocDeletedDetails)
6098
6099 if err != nil {
6100 return err
6101 }
6102 case "paper_doc_delete_comment_details":
6103 err = json.Unmarshal(body, &u.PaperDocDeleteCommentDetails)
6104
6105 if err != nil {
6106 return err
6107 }
6108 case "paper_doc_download_details":
6109 err = json.Unmarshal(body, &u.PaperDocDownloadDetails)
6110
6111 if err != nil {
6112 return err
6113 }
6114 case "paper_doc_edit_details":
6115 err = json.Unmarshal(body, &u.PaperDocEditDetails)
6116
6117 if err != nil {
6118 return err
6119 }
6120 case "paper_doc_edit_comment_details":
6121 err = json.Unmarshal(body, &u.PaperDocEditCommentDetails)
6122
6123 if err != nil {
6124 return err
6125 }
6126 case "paper_doc_followed_details":
6127 err = json.Unmarshal(body, &u.PaperDocFollowedDetails)
6128
6129 if err != nil {
6130 return err
6131 }
6132 case "paper_doc_mention_details":
6133 err = json.Unmarshal(body, &u.PaperDocMentionDetails)
6134
6135 if err != nil {
6136 return err
6137 }
6138 case "paper_doc_ownership_changed_details":
6139 err = json.Unmarshal(body, &u.PaperDocOwnershipChangedDetails)
6140
6141 if err != nil {
6142 return err
6143 }
6144 case "paper_doc_request_access_details":
6145 err = json.Unmarshal(body, &u.PaperDocRequestAccessDetails)
6146
6147 if err != nil {
6148 return err
6149 }
6150 case "paper_doc_resolve_comment_details":
6151 err = json.Unmarshal(body, &u.PaperDocResolveCommentDetails)
6152
6153 if err != nil {
6154 return err
6155 }
6156 case "paper_doc_revert_details":
6157 err = json.Unmarshal(body, &u.PaperDocRevertDetails)
6158
6159 if err != nil {
6160 return err
6161 }
6162 case "paper_doc_slack_share_details":
6163 err = json.Unmarshal(body, &u.PaperDocSlackShareDetails)
6164
6165 if err != nil {
6166 return err
6167 }
6168 case "paper_doc_team_invite_details":
6169 err = json.Unmarshal(body, &u.PaperDocTeamInviteDetails)
6170
6171 if err != nil {
6172 return err
6173 }
6174 case "paper_doc_trashed_details":
6175 err = json.Unmarshal(body, &u.PaperDocTrashedDetails)
6176
6177 if err != nil {
6178 return err
6179 }
6180 case "paper_doc_unresolve_comment_details":
6181 err = json.Unmarshal(body, &u.PaperDocUnresolveCommentDetails)
6182
6183 if err != nil {
6184 return err
6185 }
6186 case "paper_doc_untrashed_details":
6187 err = json.Unmarshal(body, &u.PaperDocUntrashedDetails)
6188
6189 if err != nil {
6190 return err
6191 }
6192 case "paper_doc_view_details":
6193 err = json.Unmarshal(body, &u.PaperDocViewDetails)
6194
6195 if err != nil {
6196 return err
6197 }
6198 case "paper_external_view_allow_details":
6199 err = json.Unmarshal(body, &u.PaperExternalViewAllowDetails)
6200
6201 if err != nil {
6202 return err
6203 }
6204 case "paper_external_view_default_team_details":
6205 err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeamDetails)
6206
6207 if err != nil {
6208 return err
6209 }
6210 case "paper_external_view_forbid_details":
6211 err = json.Unmarshal(body, &u.PaperExternalViewForbidDetails)
6212
6213 if err != nil {
6214 return err
6215 }
6216 case "paper_folder_change_subscription_details":
6217 err = json.Unmarshal(body, &u.PaperFolderChangeSubscriptionDetails)
6218
6219 if err != nil {
6220 return err
6221 }
6222 case "paper_folder_deleted_details":
6223 err = json.Unmarshal(body, &u.PaperFolderDeletedDetails)
6224
6225 if err != nil {
6226 return err
6227 }
6228 case "paper_folder_followed_details":
6229 err = json.Unmarshal(body, &u.PaperFolderFollowedDetails)
6230
6231 if err != nil {
6232 return err
6233 }
6234 case "paper_folder_team_invite_details":
6235 err = json.Unmarshal(body, &u.PaperFolderTeamInviteDetails)
6236
6237 if err != nil {
6238 return err
6239 }
6240 case "paper_published_link_change_permission_details":
6241 err = json.Unmarshal(body, &u.PaperPublishedLinkChangePermissionDetails)
6242
6243 if err != nil {
6244 return err
6245 }
6246 case "paper_published_link_create_details":
6247 err = json.Unmarshal(body, &u.PaperPublishedLinkCreateDetails)
6248
6249 if err != nil {
6250 return err
6251 }
6252 case "paper_published_link_disabled_details":
6253 err = json.Unmarshal(body, &u.PaperPublishedLinkDisabledDetails)
6254
6255 if err != nil {
6256 return err
6257 }
6258 case "paper_published_link_view_details":
6259 err = json.Unmarshal(body, &u.PaperPublishedLinkViewDetails)
6260
6261 if err != nil {
6262 return err
6263 }
6264 case "password_change_details":
6265 err = json.Unmarshal(body, &u.PasswordChangeDetails)
6266
6267 if err != nil {
6268 return err
6269 }
6270 case "password_reset_details":
6271 err = json.Unmarshal(body, &u.PasswordResetDetails)
6272
6273 if err != nil {
6274 return err
6275 }
6276 case "password_reset_all_details":
6277 err = json.Unmarshal(body, &u.PasswordResetAllDetails)
6278
6279 if err != nil {
6280 return err
6281 }
6282 case "classification_create_report_details":
6283 err = json.Unmarshal(body, &u.ClassificationCreateReportDetails)
6284
6285 if err != nil {
6286 return err
6287 }
6288 case "classification_create_report_fail_details":
6289 err = json.Unmarshal(body, &u.ClassificationCreateReportFailDetails)
6290
6291 if err != nil {
6292 return err
6293 }
6294 case "emm_create_exceptions_report_details":
6295 err = json.Unmarshal(body, &u.EmmCreateExceptionsReportDetails)
6296
6297 if err != nil {
6298 return err
6299 }
6300 case "emm_create_usage_report_details":
6301 err = json.Unmarshal(body, &u.EmmCreateUsageReportDetails)
6302
6303 if err != nil {
6304 return err
6305 }
6306 case "export_members_report_details":
6307 err = json.Unmarshal(body, &u.ExportMembersReportDetails)
6308
6309 if err != nil {
6310 return err
6311 }
6312 case "export_members_report_fail_details":
6313 err = json.Unmarshal(body, &u.ExportMembersReportFailDetails)
6314
6315 if err != nil {
6316 return err
6317 }
6318 case "external_sharing_create_report_details":
6319 err = json.Unmarshal(body, &u.ExternalSharingCreateReportDetails)
6320
6321 if err != nil {
6322 return err
6323 }
6324 case "external_sharing_report_failed_details":
6325 err = json.Unmarshal(body, &u.ExternalSharingReportFailedDetails)
6326
6327 if err != nil {
6328 return err
6329 }
6330 case "no_expiration_link_gen_create_report_details":
6331 err = json.Unmarshal(body, &u.NoExpirationLinkGenCreateReportDetails)
6332
6333 if err != nil {
6334 return err
6335 }
6336 case "no_expiration_link_gen_report_failed_details":
6337 err = json.Unmarshal(body, &u.NoExpirationLinkGenReportFailedDetails)
6338
6339 if err != nil {
6340 return err
6341 }
6342 case "no_password_link_gen_create_report_details":
6343 err = json.Unmarshal(body, &u.NoPasswordLinkGenCreateReportDetails)
6344
6345 if err != nil {
6346 return err
6347 }
6348 case "no_password_link_gen_report_failed_details":
6349 err = json.Unmarshal(body, &u.NoPasswordLinkGenReportFailedDetails)
6350
6351 if err != nil {
6352 return err
6353 }
6354 case "no_password_link_view_create_report_details":
6355 err = json.Unmarshal(body, &u.NoPasswordLinkViewCreateReportDetails)
6356
6357 if err != nil {
6358 return err
6359 }
6360 case "no_password_link_view_report_failed_details":
6361 err = json.Unmarshal(body, &u.NoPasswordLinkViewReportFailedDetails)
6362
6363 if err != nil {
6364 return err
6365 }
6366 case "outdated_link_view_create_report_details":
6367 err = json.Unmarshal(body, &u.OutdatedLinkViewCreateReportDetails)
6368
6369 if err != nil {
6370 return err
6371 }
6372 case "outdated_link_view_report_failed_details":
6373 err = json.Unmarshal(body, &u.OutdatedLinkViewReportFailedDetails)
6374
6375 if err != nil {
6376 return err
6377 }
6378 case "paper_admin_export_start_details":
6379 err = json.Unmarshal(body, &u.PaperAdminExportStartDetails)
6380
6381 if err != nil {
6382 return err
6383 }
6384 case "smart_sync_create_admin_privilege_report_details":
6385 err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReportDetails)
6386
6387 if err != nil {
6388 return err
6389 }
6390 case "team_activity_create_report_details":
6391 err = json.Unmarshal(body, &u.TeamActivityCreateReportDetails)
6392
6393 if err != nil {
6394 return err
6395 }
6396 case "team_activity_create_report_fail_details":
6397 err = json.Unmarshal(body, &u.TeamActivityCreateReportFailDetails)
6398
6399 if err != nil {
6400 return err
6401 }
6402 case "collection_share_details":
6403 err = json.Unmarshal(body, &u.CollectionShareDetails)
6404
6405 if err != nil {
6406 return err
6407 }
6408 case "file_transfers_file_add_details":
6409 err = json.Unmarshal(body, &u.FileTransfersFileAddDetails)
6410
6411 if err != nil {
6412 return err
6413 }
6414 case "file_transfers_transfer_delete_details":
6415 err = json.Unmarshal(body, &u.FileTransfersTransferDeleteDetails)
6416
6417 if err != nil {
6418 return err
6419 }
6420 case "file_transfers_transfer_download_details":
6421 err = json.Unmarshal(body, &u.FileTransfersTransferDownloadDetails)
6422
6423 if err != nil {
6424 return err
6425 }
6426 case "file_transfers_transfer_send_details":
6427 err = json.Unmarshal(body, &u.FileTransfersTransferSendDetails)
6428
6429 if err != nil {
6430 return err
6431 }
6432 case "file_transfers_transfer_view_details":
6433 err = json.Unmarshal(body, &u.FileTransfersTransferViewDetails)
6434
6435 if err != nil {
6436 return err
6437 }
6438 case "note_acl_invite_only_details":
6439 err = json.Unmarshal(body, &u.NoteAclInviteOnlyDetails)
6440
6441 if err != nil {
6442 return err
6443 }
6444 case "note_acl_link_details":
6445 err = json.Unmarshal(body, &u.NoteAclLinkDetails)
6446
6447 if err != nil {
6448 return err
6449 }
6450 case "note_acl_team_link_details":
6451 err = json.Unmarshal(body, &u.NoteAclTeamLinkDetails)
6452
6453 if err != nil {
6454 return err
6455 }
6456 case "note_shared_details":
6457 err = json.Unmarshal(body, &u.NoteSharedDetails)
6458
6459 if err != nil {
6460 return err
6461 }
6462 case "note_share_receive_details":
6463 err = json.Unmarshal(body, &u.NoteShareReceiveDetails)
6464
6465 if err != nil {
6466 return err
6467 }
6468 case "open_note_shared_details":
6469 err = json.Unmarshal(body, &u.OpenNoteSharedDetails)
6470
6471 if err != nil {
6472 return err
6473 }
6474 case "sf_add_group_details":
6475 err = json.Unmarshal(body, &u.SfAddGroupDetails)
6476
6477 if err != nil {
6478 return err
6479 }
6480 case "sf_allow_non_members_to_view_shared_links_details":
6481 err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinksDetails)
6482
6483 if err != nil {
6484 return err
6485 }
6486 case "sf_external_invite_warn_details":
6487 err = json.Unmarshal(body, &u.SfExternalInviteWarnDetails)
6488
6489 if err != nil {
6490 return err
6491 }
6492 case "sf_fb_invite_details":
6493 err = json.Unmarshal(body, &u.SfFbInviteDetails)
6494
6495 if err != nil {
6496 return err
6497 }
6498 case "sf_fb_invite_change_role_details":
6499 err = json.Unmarshal(body, &u.SfFbInviteChangeRoleDetails)
6500
6501 if err != nil {
6502 return err
6503 }
6504 case "sf_fb_uninvite_details":
6505 err = json.Unmarshal(body, &u.SfFbUninviteDetails)
6506
6507 if err != nil {
6508 return err
6509 }
6510 case "sf_invite_group_details":
6511 err = json.Unmarshal(body, &u.SfInviteGroupDetails)
6512
6513 if err != nil {
6514 return err
6515 }
6516 case "sf_team_grant_access_details":
6517 err = json.Unmarshal(body, &u.SfTeamGrantAccessDetails)
6518
6519 if err != nil {
6520 return err
6521 }
6522 case "sf_team_invite_details":
6523 err = json.Unmarshal(body, &u.SfTeamInviteDetails)
6524
6525 if err != nil {
6526 return err
6527 }
6528 case "sf_team_invite_change_role_details":
6529 err = json.Unmarshal(body, &u.SfTeamInviteChangeRoleDetails)
6530
6531 if err != nil {
6532 return err
6533 }
6534 case "sf_team_join_details":
6535 err = json.Unmarshal(body, &u.SfTeamJoinDetails)
6536
6537 if err != nil {
6538 return err
6539 }
6540 case "sf_team_join_from_oob_link_details":
6541 err = json.Unmarshal(body, &u.SfTeamJoinFromOobLinkDetails)
6542
6543 if err != nil {
6544 return err
6545 }
6546 case "sf_team_uninvite_details":
6547 err = json.Unmarshal(body, &u.SfTeamUninviteDetails)
6548
6549 if err != nil {
6550 return err
6551 }
6552 case "shared_content_add_invitees_details":
6553 err = json.Unmarshal(body, &u.SharedContentAddInviteesDetails)
6554
6555 if err != nil {
6556 return err
6557 }
6558 case "shared_content_add_link_expiry_details":
6559 err = json.Unmarshal(body, &u.SharedContentAddLinkExpiryDetails)
6560
6561 if err != nil {
6562 return err
6563 }
6564 case "shared_content_add_link_password_details":
6565 err = json.Unmarshal(body, &u.SharedContentAddLinkPasswordDetails)
6566
6567 if err != nil {
6568 return err
6569 }
6570 case "shared_content_add_member_details":
6571 err = json.Unmarshal(body, &u.SharedContentAddMemberDetails)
6572
6573 if err != nil {
6574 return err
6575 }
6576 case "shared_content_change_downloads_policy_details":
6577 err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicyDetails)
6578
6579 if err != nil {
6580 return err
6581 }
6582 case "shared_content_change_invitee_role_details":
6583 err = json.Unmarshal(body, &u.SharedContentChangeInviteeRoleDetails)
6584
6585 if err != nil {
6586 return err
6587 }
6588 case "shared_content_change_link_audience_details":
6589 err = json.Unmarshal(body, &u.SharedContentChangeLinkAudienceDetails)
6590
6591 if err != nil {
6592 return err
6593 }
6594 case "shared_content_change_link_expiry_details":
6595 err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiryDetails)
6596
6597 if err != nil {
6598 return err
6599 }
6600 case "shared_content_change_link_password_details":
6601 err = json.Unmarshal(body, &u.SharedContentChangeLinkPasswordDetails)
6602
6603 if err != nil {
6604 return err
6605 }
6606 case "shared_content_change_member_role_details":
6607 err = json.Unmarshal(body, &u.SharedContentChangeMemberRoleDetails)
6608
6609 if err != nil {
6610 return err
6611 }
6612 case "shared_content_change_viewer_info_policy_details":
6613 err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicyDetails)
6614
6615 if err != nil {
6616 return err
6617 }
6618 case "shared_content_claim_invitation_details":
6619 err = json.Unmarshal(body, &u.SharedContentClaimInvitationDetails)
6620
6621 if err != nil {
6622 return err
6623 }
6624 case "shared_content_copy_details":
6625 err = json.Unmarshal(body, &u.SharedContentCopyDetails)
6626
6627 if err != nil {
6628 return err
6629 }
6630 case "shared_content_download_details":
6631 err = json.Unmarshal(body, &u.SharedContentDownloadDetails)
6632
6633 if err != nil {
6634 return err
6635 }
6636 case "shared_content_relinquish_membership_details":
6637 err = json.Unmarshal(body, &u.SharedContentRelinquishMembershipDetails)
6638
6639 if err != nil {
6640 return err
6641 }
6642 case "shared_content_remove_invitees_details":
6643 err = json.Unmarshal(body, &u.SharedContentRemoveInviteesDetails)
6644
6645 if err != nil {
6646 return err
6647 }
6648 case "shared_content_remove_link_expiry_details":
6649 err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiryDetails)
6650
6651 if err != nil {
6652 return err
6653 }
6654 case "shared_content_remove_link_password_details":
6655 err = json.Unmarshal(body, &u.SharedContentRemoveLinkPasswordDetails)
6656
6657 if err != nil {
6658 return err
6659 }
6660 case "shared_content_remove_member_details":
6661 err = json.Unmarshal(body, &u.SharedContentRemoveMemberDetails)
6662
6663 if err != nil {
6664 return err
6665 }
6666 case "shared_content_request_access_details":
6667 err = json.Unmarshal(body, &u.SharedContentRequestAccessDetails)
6668
6669 if err != nil {
6670 return err
6671 }
6672 case "shared_content_restore_invitees_details":
6673 err = json.Unmarshal(body, &u.SharedContentRestoreInviteesDetails)
6674
6675 if err != nil {
6676 return err
6677 }
6678 case "shared_content_restore_member_details":
6679 err = json.Unmarshal(body, &u.SharedContentRestoreMemberDetails)
6680
6681 if err != nil {
6682 return err
6683 }
6684 case "shared_content_unshare_details":
6685 err = json.Unmarshal(body, &u.SharedContentUnshareDetails)
6686
6687 if err != nil {
6688 return err
6689 }
6690 case "shared_content_view_details":
6691 err = json.Unmarshal(body, &u.SharedContentViewDetails)
6692
6693 if err != nil {
6694 return err
6695 }
6696 case "shared_folder_change_link_policy_details":
6697 err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicyDetails)
6698
6699 if err != nil {
6700 return err
6701 }
6702 case "shared_folder_change_members_inheritance_policy_details":
6703 err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicyDetails)
6704
6705 if err != nil {
6706 return err
6707 }
6708 case "shared_folder_change_members_management_policy_details":
6709 err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicyDetails)
6710
6711 if err != nil {
6712 return err
6713 }
6714 case "shared_folder_change_members_policy_details":
6715 err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicyDetails)
6716
6717 if err != nil {
6718 return err
6719 }
6720 case "shared_folder_create_details":
6721 err = json.Unmarshal(body, &u.SharedFolderCreateDetails)
6722
6723 if err != nil {
6724 return err
6725 }
6726 case "shared_folder_decline_invitation_details":
6727 err = json.Unmarshal(body, &u.SharedFolderDeclineInvitationDetails)
6728
6729 if err != nil {
6730 return err
6731 }
6732 case "shared_folder_mount_details":
6733 err = json.Unmarshal(body, &u.SharedFolderMountDetails)
6734
6735 if err != nil {
6736 return err
6737 }
6738 case "shared_folder_nest_details":
6739 err = json.Unmarshal(body, &u.SharedFolderNestDetails)
6740
6741 if err != nil {
6742 return err
6743 }
6744 case "shared_folder_transfer_ownership_details":
6745 err = json.Unmarshal(body, &u.SharedFolderTransferOwnershipDetails)
6746
6747 if err != nil {
6748 return err
6749 }
6750 case "shared_folder_unmount_details":
6751 err = json.Unmarshal(body, &u.SharedFolderUnmountDetails)
6752
6753 if err != nil {
6754 return err
6755 }
6756 case "shared_link_add_expiry_details":
6757 err = json.Unmarshal(body, &u.SharedLinkAddExpiryDetails)
6758
6759 if err != nil {
6760 return err
6761 }
6762 case "shared_link_change_expiry_details":
6763 err = json.Unmarshal(body, &u.SharedLinkChangeExpiryDetails)
6764
6765 if err != nil {
6766 return err
6767 }
6768 case "shared_link_change_visibility_details":
6769 err = json.Unmarshal(body, &u.SharedLinkChangeVisibilityDetails)
6770
6771 if err != nil {
6772 return err
6773 }
6774 case "shared_link_copy_details":
6775 err = json.Unmarshal(body, &u.SharedLinkCopyDetails)
6776
6777 if err != nil {
6778 return err
6779 }
6780 case "shared_link_create_details":
6781 err = json.Unmarshal(body, &u.SharedLinkCreateDetails)
6782
6783 if err != nil {
6784 return err
6785 }
6786 case "shared_link_disable_details":
6787 err = json.Unmarshal(body, &u.SharedLinkDisableDetails)
6788
6789 if err != nil {
6790 return err
6791 }
6792 case "shared_link_download_details":
6793 err = json.Unmarshal(body, &u.SharedLinkDownloadDetails)
6794
6795 if err != nil {
6796 return err
6797 }
6798 case "shared_link_remove_expiry_details":
6799 err = json.Unmarshal(body, &u.SharedLinkRemoveExpiryDetails)
6800
6801 if err != nil {
6802 return err
6803 }
6804 case "shared_link_settings_add_expiration_details":
6805 err = json.Unmarshal(body, &u.SharedLinkSettingsAddExpirationDetails)
6806
6807 if err != nil {
6808 return err
6809 }
6810 case "shared_link_settings_add_password_details":
6811 err = json.Unmarshal(body, &u.SharedLinkSettingsAddPasswordDetails)
6812
6813 if err != nil {
6814 return err
6815 }
6816 case "shared_link_settings_allow_download_disabled_details":
6817 err = json.Unmarshal(body, &u.SharedLinkSettingsAllowDownloadDisabledDetails)
6818
6819 if err != nil {
6820 return err
6821 }
6822 case "shared_link_settings_allow_download_enabled_details":
6823 err = json.Unmarshal(body, &u.SharedLinkSettingsAllowDownloadEnabledDetails)
6824
6825 if err != nil {
6826 return err
6827 }
6828 case "shared_link_settings_change_audience_details":
6829 err = json.Unmarshal(body, &u.SharedLinkSettingsChangeAudienceDetails)
6830
6831 if err != nil {
6832 return err
6833 }
6834 case "shared_link_settings_change_expiration_details":
6835 err = json.Unmarshal(body, &u.SharedLinkSettingsChangeExpirationDetails)
6836
6837 if err != nil {
6838 return err
6839 }
6840 case "shared_link_settings_change_password_details":
6841 err = json.Unmarshal(body, &u.SharedLinkSettingsChangePasswordDetails)
6842
6843 if err != nil {
6844 return err
6845 }
6846 case "shared_link_settings_remove_expiration_details":
6847 err = json.Unmarshal(body, &u.SharedLinkSettingsRemoveExpirationDetails)
6848
6849 if err != nil {
6850 return err
6851 }
6852 case "shared_link_settings_remove_password_details":
6853 err = json.Unmarshal(body, &u.SharedLinkSettingsRemovePasswordDetails)
6854
6855 if err != nil {
6856 return err
6857 }
6858 case "shared_link_share_details":
6859 err = json.Unmarshal(body, &u.SharedLinkShareDetails)
6860
6861 if err != nil {
6862 return err
6863 }
6864 case "shared_link_view_details":
6865 err = json.Unmarshal(body, &u.SharedLinkViewDetails)
6866
6867 if err != nil {
6868 return err
6869 }
6870 case "shared_note_opened_details":
6871 err = json.Unmarshal(body, &u.SharedNoteOpenedDetails)
6872
6873 if err != nil {
6874 return err
6875 }
6876 case "shmodel_disable_downloads_details":
6877 err = json.Unmarshal(body, &u.ShmodelDisableDownloadsDetails)
6878
6879 if err != nil {
6880 return err
6881 }
6882 case "shmodel_enable_downloads_details":
6883 err = json.Unmarshal(body, &u.ShmodelEnableDownloadsDetails)
6884
6885 if err != nil {
6886 return err
6887 }
6888 case "shmodel_group_share_details":
6889 err = json.Unmarshal(body, &u.ShmodelGroupShareDetails)
6890
6891 if err != nil {
6892 return err
6893 }
6894 case "showcase_access_granted_details":
6895 err = json.Unmarshal(body, &u.ShowcaseAccessGrantedDetails)
6896
6897 if err != nil {
6898 return err
6899 }
6900 case "showcase_add_member_details":
6901 err = json.Unmarshal(body, &u.ShowcaseAddMemberDetails)
6902
6903 if err != nil {
6904 return err
6905 }
6906 case "showcase_archived_details":
6907 err = json.Unmarshal(body, &u.ShowcaseArchivedDetails)
6908
6909 if err != nil {
6910 return err
6911 }
6912 case "showcase_created_details":
6913 err = json.Unmarshal(body, &u.ShowcaseCreatedDetails)
6914
6915 if err != nil {
6916 return err
6917 }
6918 case "showcase_delete_comment_details":
6919 err = json.Unmarshal(body, &u.ShowcaseDeleteCommentDetails)
6920
6921 if err != nil {
6922 return err
6923 }
6924 case "showcase_edited_details":
6925 err = json.Unmarshal(body, &u.ShowcaseEditedDetails)
6926
6927 if err != nil {
6928 return err
6929 }
6930 case "showcase_edit_comment_details":
6931 err = json.Unmarshal(body, &u.ShowcaseEditCommentDetails)
6932
6933 if err != nil {
6934 return err
6935 }
6936 case "showcase_file_added_details":
6937 err = json.Unmarshal(body, &u.ShowcaseFileAddedDetails)
6938
6939 if err != nil {
6940 return err
6941 }
6942 case "showcase_file_download_details":
6943 err = json.Unmarshal(body, &u.ShowcaseFileDownloadDetails)
6944
6945 if err != nil {
6946 return err
6947 }
6948 case "showcase_file_removed_details":
6949 err = json.Unmarshal(body, &u.ShowcaseFileRemovedDetails)
6950
6951 if err != nil {
6952 return err
6953 }
6954 case "showcase_file_view_details":
6955 err = json.Unmarshal(body, &u.ShowcaseFileViewDetails)
6956
6957 if err != nil {
6958 return err
6959 }
6960 case "showcase_permanently_deleted_details":
6961 err = json.Unmarshal(body, &u.ShowcasePermanentlyDeletedDetails)
6962
6963 if err != nil {
6964 return err
6965 }
6966 case "showcase_post_comment_details":
6967 err = json.Unmarshal(body, &u.ShowcasePostCommentDetails)
6968
6969 if err != nil {
6970 return err
6971 }
6972 case "showcase_remove_member_details":
6973 err = json.Unmarshal(body, &u.ShowcaseRemoveMemberDetails)
6974
6975 if err != nil {
6976 return err
6977 }
6978 case "showcase_renamed_details":
6979 err = json.Unmarshal(body, &u.ShowcaseRenamedDetails)
6980
6981 if err != nil {
6982 return err
6983 }
6984 case "showcase_request_access_details":
6985 err = json.Unmarshal(body, &u.ShowcaseRequestAccessDetails)
6986
6987 if err != nil {
6988 return err
6989 }
6990 case "showcase_resolve_comment_details":
6991 err = json.Unmarshal(body, &u.ShowcaseResolveCommentDetails)
6992
6993 if err != nil {
6994 return err
6995 }
6996 case "showcase_restored_details":
6997 err = json.Unmarshal(body, &u.ShowcaseRestoredDetails)
6998
6999 if err != nil {
7000 return err
7001 }
7002 case "showcase_trashed_details":
7003 err = json.Unmarshal(body, &u.ShowcaseTrashedDetails)
7004
7005 if err != nil {
7006 return err
7007 }
7008 case "showcase_trashed_deprecated_details":
7009 err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecatedDetails)
7010
7011 if err != nil {
7012 return err
7013 }
7014 case "showcase_unresolve_comment_details":
7015 err = json.Unmarshal(body, &u.ShowcaseUnresolveCommentDetails)
7016
7017 if err != nil {
7018 return err
7019 }
7020 case "showcase_untrashed_details":
7021 err = json.Unmarshal(body, &u.ShowcaseUntrashedDetails)
7022
7023 if err != nil {
7024 return err
7025 }
7026 case "showcase_untrashed_deprecated_details":
7027 err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecatedDetails)
7028
7029 if err != nil {
7030 return err
7031 }
7032 case "showcase_view_details":
7033 err = json.Unmarshal(body, &u.ShowcaseViewDetails)
7034
7035 if err != nil {
7036 return err
7037 }
7038 case "sso_add_cert_details":
7039 err = json.Unmarshal(body, &u.SsoAddCertDetails)
7040
7041 if err != nil {
7042 return err
7043 }
7044 case "sso_add_login_url_details":
7045 err = json.Unmarshal(body, &u.SsoAddLoginUrlDetails)
7046
7047 if err != nil {
7048 return err
7049 }
7050 case "sso_add_logout_url_details":
7051 err = json.Unmarshal(body, &u.SsoAddLogoutUrlDetails)
7052
7053 if err != nil {
7054 return err
7055 }
7056 case "sso_change_cert_details":
7057 err = json.Unmarshal(body, &u.SsoChangeCertDetails)
7058
7059 if err != nil {
7060 return err
7061 }
7062 case "sso_change_login_url_details":
7063 err = json.Unmarshal(body, &u.SsoChangeLoginUrlDetails)
7064
7065 if err != nil {
7066 return err
7067 }
7068 case "sso_change_logout_url_details":
7069 err = json.Unmarshal(body, &u.SsoChangeLogoutUrlDetails)
7070
7071 if err != nil {
7072 return err
7073 }
7074 case "sso_change_saml_identity_mode_details":
7075 err = json.Unmarshal(body, &u.SsoChangeSamlIdentityModeDetails)
7076
7077 if err != nil {
7078 return err
7079 }
7080 case "sso_remove_cert_details":
7081 err = json.Unmarshal(body, &u.SsoRemoveCertDetails)
7082
7083 if err != nil {
7084 return err
7085 }
7086 case "sso_remove_login_url_details":
7087 err = json.Unmarshal(body, &u.SsoRemoveLoginUrlDetails)
7088
7089 if err != nil {
7090 return err
7091 }
7092 case "sso_remove_logout_url_details":
7093 err = json.Unmarshal(body, &u.SsoRemoveLogoutUrlDetails)
7094
7095 if err != nil {
7096 return err
7097 }
7098 case "team_folder_change_status_details":
7099 err = json.Unmarshal(body, &u.TeamFolderChangeStatusDetails)
7100
7101 if err != nil {
7102 return err
7103 }
7104 case "team_folder_create_details":
7105 err = json.Unmarshal(body, &u.TeamFolderCreateDetails)
7106
7107 if err != nil {
7108 return err
7109 }
7110 case "team_folder_downgrade_details":
7111 err = json.Unmarshal(body, &u.TeamFolderDowngradeDetails)
7112
7113 if err != nil {
7114 return err
7115 }
7116 case "team_folder_permanently_delete_details":
7117 err = json.Unmarshal(body, &u.TeamFolderPermanentlyDeleteDetails)
7118
7119 if err != nil {
7120 return err
7121 }
7122 case "team_folder_rename_details":
7123 err = json.Unmarshal(body, &u.TeamFolderRenameDetails)
7124
7125 if err != nil {
7126 return err
7127 }
7128 case "team_selective_sync_settings_changed_details":
7129 err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChangedDetails)
7130
7131 if err != nil {
7132 return err
7133 }
7134 case "account_capture_change_policy_details":
7135 err = json.Unmarshal(body, &u.AccountCaptureChangePolicyDetails)
7136
7137 if err != nil {
7138 return err
7139 }
7140 case "allow_download_disabled_details":
7141 err = json.Unmarshal(body, &u.AllowDownloadDisabledDetails)
7142
7143 if err != nil {
7144 return err
7145 }
7146 case "allow_download_enabled_details":
7147 err = json.Unmarshal(body, &u.AllowDownloadEnabledDetails)
7148
7149 if err != nil {
7150 return err
7151 }
7152 case "app_permissions_changed_details":
7153 err = json.Unmarshal(body, &u.AppPermissionsChangedDetails)
7154
7155 if err != nil {
7156 return err
7157 }
7158 case "camera_uploads_policy_changed_details":
7159 err = json.Unmarshal(body, &u.CameraUploadsPolicyChangedDetails)
7160
7161 if err != nil {
7162 return err
7163 }
7164 case "classification_change_policy_details":
7165 err = json.Unmarshal(body, &u.ClassificationChangePolicyDetails)
7166
7167 if err != nil {
7168 return err
7169 }
7170 case "computer_backup_policy_changed_details":
7171 err = json.Unmarshal(body, &u.ComputerBackupPolicyChangedDetails)
7172
7173 if err != nil {
7174 return err
7175 }
7176 case "content_administration_policy_changed_details":
7177 err = json.Unmarshal(body, &u.ContentAdministrationPolicyChangedDetails)
7178
7179 if err != nil {
7180 return err
7181 }
7182 case "data_placement_restriction_change_policy_details":
7183 err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicyDetails)
7184
7185 if err != nil {
7186 return err
7187 }
7188 case "data_placement_restriction_satisfy_policy_details":
7189 err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicyDetails)
7190
7191 if err != nil {
7192 return err
7193 }
7194 case "device_approvals_add_exception_details":
7195 err = json.Unmarshal(body, &u.DeviceApprovalsAddExceptionDetails)
7196
7197 if err != nil {
7198 return err
7199 }
7200 case "device_approvals_change_desktop_policy_details":
7201 err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicyDetails)
7202
7203 if err != nil {
7204 return err
7205 }
7206 case "device_approvals_change_mobile_policy_details":
7207 err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicyDetails)
7208
7209 if err != nil {
7210 return err
7211 }
7212 case "device_approvals_change_overage_action_details":
7213 err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageActionDetails)
7214
7215 if err != nil {
7216 return err
7217 }
7218 case "device_approvals_change_unlink_action_details":
7219 err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkActionDetails)
7220
7221 if err != nil {
7222 return err
7223 }
7224 case "device_approvals_remove_exception_details":
7225 err = json.Unmarshal(body, &u.DeviceApprovalsRemoveExceptionDetails)
7226
7227 if err != nil {
7228 return err
7229 }
7230 case "directory_restrictions_add_members_details":
7231 err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembersDetails)
7232
7233 if err != nil {
7234 return err
7235 }
7236 case "directory_restrictions_remove_members_details":
7237 err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembersDetails)
7238
7239 if err != nil {
7240 return err
7241 }
7242 case "emm_add_exception_details":
7243 err = json.Unmarshal(body, &u.EmmAddExceptionDetails)
7244
7245 if err != nil {
7246 return err
7247 }
7248 case "emm_change_policy_details":
7249 err = json.Unmarshal(body, &u.EmmChangePolicyDetails)
7250
7251 if err != nil {
7252 return err
7253 }
7254 case "emm_remove_exception_details":
7255 err = json.Unmarshal(body, &u.EmmRemoveExceptionDetails)
7256
7257 if err != nil {
7258 return err
7259 }
7260 case "extended_version_history_change_policy_details":
7261 err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicyDetails)
7262
7263 if err != nil {
7264 return err
7265 }
7266 case "file_comments_change_policy_details":
7267 err = json.Unmarshal(body, &u.FileCommentsChangePolicyDetails)
7268
7269 if err != nil {
7270 return err
7271 }
7272 case "file_locking_policy_changed_details":
7273 err = json.Unmarshal(body, &u.FileLockingPolicyChangedDetails)
7274
7275 if err != nil {
7276 return err
7277 }
7278 case "file_requests_change_policy_details":
7279 err = json.Unmarshal(body, &u.FileRequestsChangePolicyDetails)
7280
7281 if err != nil {
7282 return err
7283 }
7284 case "file_requests_emails_enabled_details":
7285 err = json.Unmarshal(body, &u.FileRequestsEmailsEnabledDetails)
7286
7287 if err != nil {
7288 return err
7289 }
7290 case "file_requests_emails_restricted_to_team_only_details":
7291 err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnlyDetails)
7292
7293 if err != nil {
7294 return err
7295 }
7296 case "file_transfers_policy_changed_details":
7297 err = json.Unmarshal(body, &u.FileTransfersPolicyChangedDetails)
7298
7299 if err != nil {
7300 return err
7301 }
7302 case "google_sso_change_policy_details":
7303 err = json.Unmarshal(body, &u.GoogleSsoChangePolicyDetails)
7304
7305 if err != nil {
7306 return err
7307 }
7308 case "group_user_management_change_policy_details":
7309 err = json.Unmarshal(body, &u.GroupUserManagementChangePolicyDetails)
7310
7311 if err != nil {
7312 return err
7313 }
7314 case "integration_policy_changed_details":
7315 err = json.Unmarshal(body, &u.IntegrationPolicyChangedDetails)
7316
7317 if err != nil {
7318 return err
7319 }
7320 case "invite_acceptance_email_policy_changed_details":
7321 err = json.Unmarshal(body, &u.InviteAcceptanceEmailPolicyChangedDetails)
7322
7323 if err != nil {
7324 return err
7325 }
7326 case "member_requests_change_policy_details":
7327 err = json.Unmarshal(body, &u.MemberRequestsChangePolicyDetails)
7328
7329 if err != nil {
7330 return err
7331 }
7332 case "member_send_invite_policy_changed_details":
7333 err = json.Unmarshal(body, &u.MemberSendInvitePolicyChangedDetails)
7334
7335 if err != nil {
7336 return err
7337 }
7338 case "member_space_limits_add_exception_details":
7339 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddExceptionDetails)
7340
7341 if err != nil {
7342 return err
7343 }
7344 case "member_space_limits_change_caps_type_policy_details":
7345 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicyDetails)
7346
7347 if err != nil {
7348 return err
7349 }
7350 case "member_space_limits_change_policy_details":
7351 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicyDetails)
7352
7353 if err != nil {
7354 return err
7355 }
7356 case "member_space_limits_remove_exception_details":
7357 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveExceptionDetails)
7358
7359 if err != nil {
7360 return err
7361 }
7362 case "member_suggestions_change_policy_details":
7363 err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicyDetails)
7364
7365 if err != nil {
7366 return err
7367 }
7368 case "microsoft_office_addin_change_policy_details":
7369 err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicyDetails)
7370
7371 if err != nil {
7372 return err
7373 }
7374 case "network_control_change_policy_details":
7375 err = json.Unmarshal(body, &u.NetworkControlChangePolicyDetails)
7376
7377 if err != nil {
7378 return err
7379 }
7380 case "paper_change_deployment_policy_details":
7381 err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicyDetails)
7382
7383 if err != nil {
7384 return err
7385 }
7386 case "paper_change_member_link_policy_details":
7387 err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicyDetails)
7388
7389 if err != nil {
7390 return err
7391 }
7392 case "paper_change_member_policy_details":
7393 err = json.Unmarshal(body, &u.PaperChangeMemberPolicyDetails)
7394
7395 if err != nil {
7396 return err
7397 }
7398 case "paper_change_policy_details":
7399 err = json.Unmarshal(body, &u.PaperChangePolicyDetails)
7400
7401 if err != nil {
7402 return err
7403 }
7404 case "paper_default_folder_policy_changed_details":
7405 err = json.Unmarshal(body, &u.PaperDefaultFolderPolicyChangedDetails)
7406
7407 if err != nil {
7408 return err
7409 }
7410 case "paper_desktop_policy_changed_details":
7411 err = json.Unmarshal(body, &u.PaperDesktopPolicyChangedDetails)
7412
7413 if err != nil {
7414 return err
7415 }
7416 case "paper_enabled_users_group_addition_details":
7417 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAdditionDetails)
7418
7419 if err != nil {
7420 return err
7421 }
7422 case "paper_enabled_users_group_removal_details":
7423 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemovalDetails)
7424
7425 if err != nil {
7426 return err
7427 }
7428 case "password_strength_requirements_change_policy_details":
7429 err = json.Unmarshal(body, &u.PasswordStrengthRequirementsChangePolicyDetails)
7430
7431 if err != nil {
7432 return err
7433 }
7434 case "permanent_delete_change_policy_details":
7435 err = json.Unmarshal(body, &u.PermanentDeleteChangePolicyDetails)
7436
7437 if err != nil {
7438 return err
7439 }
7440 case "reseller_support_change_policy_details":
7441 err = json.Unmarshal(body, &u.ResellerSupportChangePolicyDetails)
7442
7443 if err != nil {
7444 return err
7445 }
7446 case "rewind_policy_changed_details":
7447 err = json.Unmarshal(body, &u.RewindPolicyChangedDetails)
7448
7449 if err != nil {
7450 return err
7451 }
7452 case "send_for_signature_policy_changed_details":
7453 err = json.Unmarshal(body, &u.SendForSignaturePolicyChangedDetails)
7454
7455 if err != nil {
7456 return err
7457 }
7458 case "sharing_change_folder_join_policy_details":
7459 err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicyDetails)
7460
7461 if err != nil {
7462 return err
7463 }
7464 case "sharing_change_link_allow_change_expiration_policy_details":
7465 err = json.Unmarshal(body, &u.SharingChangeLinkAllowChangeExpirationPolicyDetails)
7466
7467 if err != nil {
7468 return err
7469 }
7470 case "sharing_change_link_default_expiration_policy_details":
7471 err = json.Unmarshal(body, &u.SharingChangeLinkDefaultExpirationPolicyDetails)
7472
7473 if err != nil {
7474 return err
7475 }
7476 case "sharing_change_link_enforce_password_policy_details":
7477 err = json.Unmarshal(body, &u.SharingChangeLinkEnforcePasswordPolicyDetails)
7478
7479 if err != nil {
7480 return err
7481 }
7482 case "sharing_change_link_policy_details":
7483 err = json.Unmarshal(body, &u.SharingChangeLinkPolicyDetails)
7484
7485 if err != nil {
7486 return err
7487 }
7488 case "sharing_change_member_policy_details":
7489 err = json.Unmarshal(body, &u.SharingChangeMemberPolicyDetails)
7490
7491 if err != nil {
7492 return err
7493 }
7494 case "showcase_change_download_policy_details":
7495 err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicyDetails)
7496
7497 if err != nil {
7498 return err
7499 }
7500 case "showcase_change_enabled_policy_details":
7501 err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicyDetails)
7502
7503 if err != nil {
7504 return err
7505 }
7506 case "showcase_change_external_sharing_policy_details":
7507 err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicyDetails)
7508
7509 if err != nil {
7510 return err
7511 }
7512 case "smarter_smart_sync_policy_changed_details":
7513 err = json.Unmarshal(body, &u.SmarterSmartSyncPolicyChangedDetails)
7514
7515 if err != nil {
7516 return err
7517 }
7518 case "smart_sync_change_policy_details":
7519 err = json.Unmarshal(body, &u.SmartSyncChangePolicyDetails)
7520
7521 if err != nil {
7522 return err
7523 }
7524 case "smart_sync_not_opt_out_details":
7525 err = json.Unmarshal(body, &u.SmartSyncNotOptOutDetails)
7526
7527 if err != nil {
7528 return err
7529 }
7530 case "smart_sync_opt_out_details":
7531 err = json.Unmarshal(body, &u.SmartSyncOptOutDetails)
7532
7533 if err != nil {
7534 return err
7535 }
7536 case "sso_change_policy_details":
7537 err = json.Unmarshal(body, &u.SsoChangePolicyDetails)
7538
7539 if err != nil {
7540 return err
7541 }
7542 case "team_branding_policy_changed_details":
7543 err = json.Unmarshal(body, &u.TeamBrandingPolicyChangedDetails)
7544
7545 if err != nil {
7546 return err
7547 }
7548 case "team_extensions_policy_changed_details":
7549 err = json.Unmarshal(body, &u.TeamExtensionsPolicyChangedDetails)
7550
7551 if err != nil {
7552 return err
7553 }
7554 case "team_selective_sync_policy_changed_details":
7555 err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChangedDetails)
7556
7557 if err != nil {
7558 return err
7559 }
7560 case "team_sharing_whitelist_subjects_changed_details":
7561 err = json.Unmarshal(body, &u.TeamSharingWhitelistSubjectsChangedDetails)
7562
7563 if err != nil {
7564 return err
7565 }
7566 case "tfa_add_exception_details":
7567 err = json.Unmarshal(body, &u.TfaAddExceptionDetails)
7568
7569 if err != nil {
7570 return err
7571 }
7572 case "tfa_change_policy_details":
7573 err = json.Unmarshal(body, &u.TfaChangePolicyDetails)
7574
7575 if err != nil {
7576 return err
7577 }
7578 case "tfa_remove_exception_details":
7579 err = json.Unmarshal(body, &u.TfaRemoveExceptionDetails)
7580
7581 if err != nil {
7582 return err
7583 }
7584 case "two_account_change_policy_details":
7585 err = json.Unmarshal(body, &u.TwoAccountChangePolicyDetails)
7586
7587 if err != nil {
7588 return err
7589 }
7590 case "viewer_info_policy_changed_details":
7591 err = json.Unmarshal(body, &u.ViewerInfoPolicyChangedDetails)
7592
7593 if err != nil {
7594 return err
7595 }
7596 case "watermarking_policy_changed_details":
7597 err = json.Unmarshal(body, &u.WatermarkingPolicyChangedDetails)
7598
7599 if err != nil {
7600 return err
7601 }
7602 case "web_sessions_change_active_session_limit_details":
7603 err = json.Unmarshal(body, &u.WebSessionsChangeActiveSessionLimitDetails)
7604
7605 if err != nil {
7606 return err
7607 }
7608 case "web_sessions_change_fixed_length_policy_details":
7609 err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicyDetails)
7610
7611 if err != nil {
7612 return err
7613 }
7614 case "web_sessions_change_idle_length_policy_details":
7615 err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicyDetails)
7616
7617 if err != nil {
7618 return err
7619 }
7620 case "team_merge_from_details":
7621 err = json.Unmarshal(body, &u.TeamMergeFromDetails)
7622
7623 if err != nil {
7624 return err
7625 }
7626 case "team_merge_to_details":
7627 err = json.Unmarshal(body, &u.TeamMergeToDetails)
7628
7629 if err != nil {
7630 return err
7631 }
7632 case "team_profile_add_background_details":
7633 err = json.Unmarshal(body, &u.TeamProfileAddBackgroundDetails)
7634
7635 if err != nil {
7636 return err
7637 }
7638 case "team_profile_add_logo_details":
7639 err = json.Unmarshal(body, &u.TeamProfileAddLogoDetails)
7640
7641 if err != nil {
7642 return err
7643 }
7644 case "team_profile_change_background_details":
7645 err = json.Unmarshal(body, &u.TeamProfileChangeBackgroundDetails)
7646
7647 if err != nil {
7648 return err
7649 }
7650 case "team_profile_change_default_language_details":
7651 err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguageDetails)
7652
7653 if err != nil {
7654 return err
7655 }
7656 case "team_profile_change_logo_details":
7657 err = json.Unmarshal(body, &u.TeamProfileChangeLogoDetails)
7658
7659 if err != nil {
7660 return err
7661 }
7662 case "team_profile_change_name_details":
7663 err = json.Unmarshal(body, &u.TeamProfileChangeNameDetails)
7664
7665 if err != nil {
7666 return err
7667 }
7668 case "team_profile_remove_background_details":
7669 err = json.Unmarshal(body, &u.TeamProfileRemoveBackgroundDetails)
7670
7671 if err != nil {
7672 return err
7673 }
7674 case "team_profile_remove_logo_details":
7675 err = json.Unmarshal(body, &u.TeamProfileRemoveLogoDetails)
7676
7677 if err != nil {
7678 return err
7679 }
7680 case "tfa_add_backup_phone_details":
7681 err = json.Unmarshal(body, &u.TfaAddBackupPhoneDetails)
7682
7683 if err != nil {
7684 return err
7685 }
7686 case "tfa_add_security_key_details":
7687 err = json.Unmarshal(body, &u.TfaAddSecurityKeyDetails)
7688
7689 if err != nil {
7690 return err
7691 }
7692 case "tfa_change_backup_phone_details":
7693 err = json.Unmarshal(body, &u.TfaChangeBackupPhoneDetails)
7694
7695 if err != nil {
7696 return err
7697 }
7698 case "tfa_change_status_details":
7699 err = json.Unmarshal(body, &u.TfaChangeStatusDetails)
7700
7701 if err != nil {
7702 return err
7703 }
7704 case "tfa_remove_backup_phone_details":
7705 err = json.Unmarshal(body, &u.TfaRemoveBackupPhoneDetails)
7706
7707 if err != nil {
7708 return err
7709 }
7710 case "tfa_remove_security_key_details":
7711 err = json.Unmarshal(body, &u.TfaRemoveSecurityKeyDetails)
7712
7713 if err != nil {
7714 return err
7715 }
7716 case "tfa_reset_details":
7717 err = json.Unmarshal(body, &u.TfaResetDetails)
7718
7719 if err != nil {
7720 return err
7721 }
7722 case "changed_enterprise_admin_role_details":
7723 err = json.Unmarshal(body, &u.ChangedEnterpriseAdminRoleDetails)
7724
7725 if err != nil {
7726 return err
7727 }
7728 case "changed_enterprise_connected_team_status_details":
7729 err = json.Unmarshal(body, &u.ChangedEnterpriseConnectedTeamStatusDetails)
7730
7731 if err != nil {
7732 return err
7733 }
7734 case "ended_enterprise_admin_session_details":
7735 err = json.Unmarshal(body, &u.EndedEnterpriseAdminSessionDetails)
7736
7737 if err != nil {
7738 return err
7739 }
7740 case "ended_enterprise_admin_session_deprecated_details":
7741 err = json.Unmarshal(body, &u.EndedEnterpriseAdminSessionDeprecatedDetails)
7742
7743 if err != nil {
7744 return err
7745 }
7746 case "enterprise_settings_locking_details":
7747 err = json.Unmarshal(body, &u.EnterpriseSettingsLockingDetails)
7748
7749 if err != nil {
7750 return err
7751 }
7752 case "guest_admin_change_status_details":
7753 err = json.Unmarshal(body, &u.GuestAdminChangeStatusDetails)
7754
7755 if err != nil {
7756 return err
7757 }
7758 case "started_enterprise_admin_session_details":
7759 err = json.Unmarshal(body, &u.StartedEnterpriseAdminSessionDetails)
7760
7761 if err != nil {
7762 return err
7763 }
7764 case "team_merge_request_accepted_details":
7765 err = json.Unmarshal(body, &u.TeamMergeRequestAcceptedDetails)
7766
7767 if err != nil {
7768 return err
7769 }
7770 case "team_merge_request_accepted_shown_to_primary_team_details":
7771 err = json.Unmarshal(body, &u.TeamMergeRequestAcceptedShownToPrimaryTeamDetails)
7772
7773 if err != nil {
7774 return err
7775 }
7776 case "team_merge_request_accepted_shown_to_secondary_team_details":
7777 err = json.Unmarshal(body, &u.TeamMergeRequestAcceptedShownToSecondaryTeamDetails)
7778
7779 if err != nil {
7780 return err
7781 }
7782 case "team_merge_request_auto_canceled_details":
7783 err = json.Unmarshal(body, &u.TeamMergeRequestAutoCanceledDetails)
7784
7785 if err != nil {
7786 return err
7787 }
7788 case "team_merge_request_canceled_details":
7789 err = json.Unmarshal(body, &u.TeamMergeRequestCanceledDetails)
7790
7791 if err != nil {
7792 return err
7793 }
7794 case "team_merge_request_canceled_shown_to_primary_team_details":
7795 err = json.Unmarshal(body, &u.TeamMergeRequestCanceledShownToPrimaryTeamDetails)
7796
7797 if err != nil {
7798 return err
7799 }
7800 case "team_merge_request_canceled_shown_to_secondary_team_details":
7801 err = json.Unmarshal(body, &u.TeamMergeRequestCanceledShownToSecondaryTeamDetails)
7802
7803 if err != nil {
7804 return err
7805 }
7806 case "team_merge_request_expired_details":
7807 err = json.Unmarshal(body, &u.TeamMergeRequestExpiredDetails)
7808
7809 if err != nil {
7810 return err
7811 }
7812 case "team_merge_request_expired_shown_to_primary_team_details":
7813 err = json.Unmarshal(body, &u.TeamMergeRequestExpiredShownToPrimaryTeamDetails)
7814
7815 if err != nil {
7816 return err
7817 }
7818 case "team_merge_request_expired_shown_to_secondary_team_details":
7819 err = json.Unmarshal(body, &u.TeamMergeRequestExpiredShownToSecondaryTeamDetails)
7820
7821 if err != nil {
7822 return err
7823 }
7824 case "team_merge_request_rejected_shown_to_primary_team_details":
7825 err = json.Unmarshal(body, &u.TeamMergeRequestRejectedShownToPrimaryTeamDetails)
7826
7827 if err != nil {
7828 return err
7829 }
7830 case "team_merge_request_rejected_shown_to_secondary_team_details":
7831 err = json.Unmarshal(body, &u.TeamMergeRequestRejectedShownToSecondaryTeamDetails)
7832
7833 if err != nil {
7834 return err
7835 }
7836 case "team_merge_request_reminder_details":
7837 err = json.Unmarshal(body, &u.TeamMergeRequestReminderDetails)
7838
7839 if err != nil {
7840 return err
7841 }
7842 case "team_merge_request_reminder_shown_to_primary_team_details":
7843 err = json.Unmarshal(body, &u.TeamMergeRequestReminderShownToPrimaryTeamDetails)
7844
7845 if err != nil {
7846 return err
7847 }
7848 case "team_merge_request_reminder_shown_to_secondary_team_details":
7849 err = json.Unmarshal(body, &u.TeamMergeRequestReminderShownToSecondaryTeamDetails)
7850
7851 if err != nil {
7852 return err
7853 }
7854 case "team_merge_request_revoked_details":
7855 err = json.Unmarshal(body, &u.TeamMergeRequestRevokedDetails)
7856
7857 if err != nil {
7858 return err
7859 }
7860 case "team_merge_request_sent_shown_to_primary_team_details":
7861 err = json.Unmarshal(body, &u.TeamMergeRequestSentShownToPrimaryTeamDetails)
7862
7863 if err != nil {
7864 return err
7865 }
7866 case "team_merge_request_sent_shown_to_secondary_team_details":
7867 err = json.Unmarshal(body, &u.TeamMergeRequestSentShownToSecondaryTeamDetails)
7868
7869 if err != nil {
7870 return err
7871 }
7872 case "missing_details":
7873 err = json.Unmarshal(body, &u.MissingDetails)
7874
7875 if err != nil {
7876 return err
7877 }
7878 }
7879 return nil
7880 }
7881
7882 // EventType : The type of the event with description.
7883 type EventType struct {
7884 dropbox.Tagged
7885 // AdminAlertingAlertStateChanged : (admin_alerting) Changed an alert state
7886 AdminAlertingAlertStateChanged *AdminAlertingAlertStateChangedType `json:"admin_alerting_alert_state_changed,omitempty"`
7887 // AdminAlertingChangedAlertConfig : (admin_alerting) Changed an alert
7888 // setting
7889 AdminAlertingChangedAlertConfig *AdminAlertingChangedAlertConfigType `json:"admin_alerting_changed_alert_config,omitempty"`
7890 // AdminAlertingTriggeredAlert : (admin_alerting) Triggered security alert
7891 AdminAlertingTriggeredAlert *AdminAlertingTriggeredAlertType `json:"admin_alerting_triggered_alert,omitempty"`
7892 // AppBlockedByPermissions : (apps) Failed to connect app for member
7893 AppBlockedByPermissions *AppBlockedByPermissionsType `json:"app_blocked_by_permissions,omitempty"`
7894 // AppLinkTeam : (apps) Linked app for team
7895 AppLinkTeam *AppLinkTeamType `json:"app_link_team,omitempty"`
7896 // AppLinkUser : (apps) Linked app for member
7897 AppLinkUser *AppLinkUserType `json:"app_link_user,omitempty"`
7898 // AppUnlinkTeam : (apps) Unlinked app for team
7899 AppUnlinkTeam *AppUnlinkTeamType `json:"app_unlink_team,omitempty"`
7900 // AppUnlinkUser : (apps) Unlinked app for member
7901 AppUnlinkUser *AppUnlinkUserType `json:"app_unlink_user,omitempty"`
7902 // IntegrationConnected : (apps) Connected integration for member
7903 IntegrationConnected *IntegrationConnectedType `json:"integration_connected,omitempty"`
7904 // IntegrationDisconnected : (apps) Disconnected integration for member
7905 IntegrationDisconnected *IntegrationDisconnectedType `json:"integration_disconnected,omitempty"`
7906 // FileAddComment : (comments) Added file comment
7907 FileAddComment *FileAddCommentType `json:"file_add_comment,omitempty"`
7908 // FileChangeCommentSubscription : (comments) Subscribed to or unsubscribed
7909 // from comment notifications for file
7910 FileChangeCommentSubscription *FileChangeCommentSubscriptionType `json:"file_change_comment_subscription,omitempty"`
7911 // FileDeleteComment : (comments) Deleted file comment
7912 FileDeleteComment *FileDeleteCommentType `json:"file_delete_comment,omitempty"`
7913 // FileEditComment : (comments) Edited file comment
7914 FileEditComment *FileEditCommentType `json:"file_edit_comment,omitempty"`
7915 // FileLikeComment : (comments) Liked file comment (deprecated, no longer
7916 // logged)
7917 FileLikeComment *FileLikeCommentType `json:"file_like_comment,omitempty"`
7918 // FileResolveComment : (comments) Resolved file comment
7919 FileResolveComment *FileResolveCommentType `json:"file_resolve_comment,omitempty"`
7920 // FileUnlikeComment : (comments) Unliked file comment (deprecated, no
7921 // longer logged)
7922 FileUnlikeComment *FileUnlikeCommentType `json:"file_unlike_comment,omitempty"`
7923 // FileUnresolveComment : (comments) Unresolved file comment
7924 FileUnresolveComment *FileUnresolveCommentType `json:"file_unresolve_comment,omitempty"`
7925 // GovernancePolicyAddFolders : (data_governance) Added folders to policy
7926 GovernancePolicyAddFolders *GovernancePolicyAddFoldersType `json:"governance_policy_add_folders,omitempty"`
7927 // GovernancePolicyAddFolderFailed : (data_governance) Couldn't add a folder
7928 // to a policy
7929 GovernancePolicyAddFolderFailed *GovernancePolicyAddFolderFailedType `json:"governance_policy_add_folder_failed,omitempty"`
7930 // GovernancePolicyContentDisposed : (data_governance) Content disposed
7931 GovernancePolicyContentDisposed *GovernancePolicyContentDisposedType `json:"governance_policy_content_disposed,omitempty"`
7932 // GovernancePolicyCreate : (data_governance) Activated a new policy
7933 GovernancePolicyCreate *GovernancePolicyCreateType `json:"governance_policy_create,omitempty"`
7934 // GovernancePolicyDelete : (data_governance) Deleted a policy
7935 GovernancePolicyDelete *GovernancePolicyDeleteType `json:"governance_policy_delete,omitempty"`
7936 // GovernancePolicyEditDetails : (data_governance) Edited policy
7937 GovernancePolicyEditDetails *GovernancePolicyEditDetailsType `json:"governance_policy_edit_details,omitempty"`
7938 // GovernancePolicyEditDuration : (data_governance) Changed policy duration
7939 GovernancePolicyEditDuration *GovernancePolicyEditDurationType `json:"governance_policy_edit_duration,omitempty"`
7940 // GovernancePolicyExportCreated : (data_governance) Created a policy
7941 // download
7942 GovernancePolicyExportCreated *GovernancePolicyExportCreatedType `json:"governance_policy_export_created,omitempty"`
7943 // GovernancePolicyExportRemoved : (data_governance) Removed a policy
7944 // download
7945 GovernancePolicyExportRemoved *GovernancePolicyExportRemovedType `json:"governance_policy_export_removed,omitempty"`
7946 // GovernancePolicyRemoveFolders : (data_governance) Removed folders from
7947 // policy
7948 GovernancePolicyRemoveFolders *GovernancePolicyRemoveFoldersType `json:"governance_policy_remove_folders,omitempty"`
7949 // GovernancePolicyReportCreated : (data_governance) Created a summary
7950 // report for a policy
7951 GovernancePolicyReportCreated *GovernancePolicyReportCreatedType `json:"governance_policy_report_created,omitempty"`
7952 // GovernancePolicyZipPartDownloaded : (data_governance) Downloaded content
7953 // from a policy
7954 GovernancePolicyZipPartDownloaded *GovernancePolicyZipPartDownloadedType `json:"governance_policy_zip_part_downloaded,omitempty"`
7955 // LegalHoldsActivateAHold : (data_governance) Activated a hold
7956 LegalHoldsActivateAHold *LegalHoldsActivateAHoldType `json:"legal_holds_activate_a_hold,omitempty"`
7957 // LegalHoldsAddMembers : (data_governance) Added members to a hold
7958 LegalHoldsAddMembers *LegalHoldsAddMembersType `json:"legal_holds_add_members,omitempty"`
7959 // LegalHoldsChangeHoldDetails : (data_governance) Edited details for a hold
7960 LegalHoldsChangeHoldDetails *LegalHoldsChangeHoldDetailsType `json:"legal_holds_change_hold_details,omitempty"`
7961 // LegalHoldsChangeHoldName : (data_governance) Renamed a hold
7962 LegalHoldsChangeHoldName *LegalHoldsChangeHoldNameType `json:"legal_holds_change_hold_name,omitempty"`
7963 // LegalHoldsExportAHold : (data_governance) Exported hold
7964 LegalHoldsExportAHold *LegalHoldsExportAHoldType `json:"legal_holds_export_a_hold,omitempty"`
7965 // LegalHoldsExportCancelled : (data_governance) Canceled export for a hold
7966 LegalHoldsExportCancelled *LegalHoldsExportCancelledType `json:"legal_holds_export_cancelled,omitempty"`
7967 // LegalHoldsExportDownloaded : (data_governance) Downloaded export for a
7968 // hold
7969 LegalHoldsExportDownloaded *LegalHoldsExportDownloadedType `json:"legal_holds_export_downloaded,omitempty"`
7970 // LegalHoldsExportRemoved : (data_governance) Removed export for a hold
7971 LegalHoldsExportRemoved *LegalHoldsExportRemovedType `json:"legal_holds_export_removed,omitempty"`
7972 // LegalHoldsReleaseAHold : (data_governance) Released a hold
7973 LegalHoldsReleaseAHold *LegalHoldsReleaseAHoldType `json:"legal_holds_release_a_hold,omitempty"`
7974 // LegalHoldsRemoveMembers : (data_governance) Removed members from a hold
7975 LegalHoldsRemoveMembers *LegalHoldsRemoveMembersType `json:"legal_holds_remove_members,omitempty"`
7976 // LegalHoldsReportAHold : (data_governance) Created a summary report for a
7977 // hold
7978 LegalHoldsReportAHold *LegalHoldsReportAHoldType `json:"legal_holds_report_a_hold,omitempty"`
7979 // DeviceChangeIpDesktop : (devices) Changed IP address associated with
7980 // active desktop session
7981 DeviceChangeIpDesktop *DeviceChangeIpDesktopType `json:"device_change_ip_desktop,omitempty"`
7982 // DeviceChangeIpMobile : (devices) Changed IP address associated with
7983 // active mobile session
7984 DeviceChangeIpMobile *DeviceChangeIpMobileType `json:"device_change_ip_mobile,omitempty"`
7985 // DeviceChangeIpWeb : (devices) Changed IP address associated with active
7986 // web session
7987 DeviceChangeIpWeb *DeviceChangeIpWebType `json:"device_change_ip_web,omitempty"`
7988 // DeviceDeleteOnUnlinkFail : (devices) Failed to delete all files from
7989 // unlinked device
7990 DeviceDeleteOnUnlinkFail *DeviceDeleteOnUnlinkFailType `json:"device_delete_on_unlink_fail,omitempty"`
7991 // DeviceDeleteOnUnlinkSuccess : (devices) Deleted all files from unlinked
7992 // device
7993 DeviceDeleteOnUnlinkSuccess *DeviceDeleteOnUnlinkSuccessType `json:"device_delete_on_unlink_success,omitempty"`
7994 // DeviceLinkFail : (devices) Failed to link device
7995 DeviceLinkFail *DeviceLinkFailType `json:"device_link_fail,omitempty"`
7996 // DeviceLinkSuccess : (devices) Linked device
7997 DeviceLinkSuccess *DeviceLinkSuccessType `json:"device_link_success,omitempty"`
7998 // DeviceManagementDisabled : (devices) Disabled device management
7999 // (deprecated, no longer logged)
8000 DeviceManagementDisabled *DeviceManagementDisabledType `json:"device_management_disabled,omitempty"`
8001 // DeviceManagementEnabled : (devices) Enabled device management
8002 // (deprecated, no longer logged)
8003 DeviceManagementEnabled *DeviceManagementEnabledType `json:"device_management_enabled,omitempty"`
8004 // DeviceSyncBackupStatusChanged : (devices) Enabled/disabled backup for
8005 // computer
8006 DeviceSyncBackupStatusChanged *DeviceSyncBackupStatusChangedType `json:"device_sync_backup_status_changed,omitempty"`
8007 // DeviceUnlink : (devices) Disconnected device
8008 DeviceUnlink *DeviceUnlinkType `json:"device_unlink,omitempty"`
8009 // DropboxPasswordsExported : (devices) Exported passwords
8010 DropboxPasswordsExported *DropboxPasswordsExportedType `json:"dropbox_passwords_exported,omitempty"`
8011 // DropboxPasswordsNewDeviceEnrolled : (devices) Enrolled new Dropbox
8012 // Passwords device
8013 DropboxPasswordsNewDeviceEnrolled *DropboxPasswordsNewDeviceEnrolledType `json:"dropbox_passwords_new_device_enrolled,omitempty"`
8014 // EmmRefreshAuthToken : (devices) Refreshed auth token used for setting up
8015 // EMM
8016 EmmRefreshAuthToken *EmmRefreshAuthTokenType `json:"emm_refresh_auth_token,omitempty"`
8017 // AccountCaptureChangeAvailability : (domains) Granted/revoked option to
8018 // enable account capture on team domains
8019 AccountCaptureChangeAvailability *AccountCaptureChangeAvailabilityType `json:"account_capture_change_availability,omitempty"`
8020 // AccountCaptureMigrateAccount : (domains) Account-captured user migrated
8021 // account to team
8022 AccountCaptureMigrateAccount *AccountCaptureMigrateAccountType `json:"account_capture_migrate_account,omitempty"`
8023 // AccountCaptureNotificationEmailsSent : (domains) Sent account capture
8024 // email to all unmanaged members
8025 AccountCaptureNotificationEmailsSent *AccountCaptureNotificationEmailsSentType `json:"account_capture_notification_emails_sent,omitempty"`
8026 // AccountCaptureRelinquishAccount : (domains) Account-captured user changed
8027 // account email to personal email
8028 AccountCaptureRelinquishAccount *AccountCaptureRelinquishAccountType `json:"account_capture_relinquish_account,omitempty"`
8029 // DisabledDomainInvites : (domains) Disabled domain invites (deprecated, no
8030 // longer logged)
8031 DisabledDomainInvites *DisabledDomainInvitesType `json:"disabled_domain_invites,omitempty"`
8032 // DomainInvitesApproveRequestToJoinTeam : (domains) Approved user's request
8033 // to join team
8034 DomainInvitesApproveRequestToJoinTeam *DomainInvitesApproveRequestToJoinTeamType `json:"domain_invites_approve_request_to_join_team,omitempty"`
8035 // DomainInvitesDeclineRequestToJoinTeam : (domains) Declined user's request
8036 // to join team
8037 DomainInvitesDeclineRequestToJoinTeam *DomainInvitesDeclineRequestToJoinTeamType `json:"domain_invites_decline_request_to_join_team,omitempty"`
8038 // DomainInvitesEmailExistingUsers : (domains) Sent domain invites to
8039 // existing domain accounts (deprecated, no longer logged)
8040 DomainInvitesEmailExistingUsers *DomainInvitesEmailExistingUsersType `json:"domain_invites_email_existing_users,omitempty"`
8041 // DomainInvitesRequestToJoinTeam : (domains) Requested to join team
8042 DomainInvitesRequestToJoinTeam *DomainInvitesRequestToJoinTeamType `json:"domain_invites_request_to_join_team,omitempty"`
8043 // DomainInvitesSetInviteNewUserPrefToNo : (domains) Disabled "Automatically
8044 // invite new users" (deprecated, no longer logged)
8045 DomainInvitesSetInviteNewUserPrefToNo *DomainInvitesSetInviteNewUserPrefToNoType `json:"domain_invites_set_invite_new_user_pref_to_no,omitempty"`
8046 // DomainInvitesSetInviteNewUserPrefToYes : (domains) Enabled "Automatically
8047 // invite new users" (deprecated, no longer logged)
8048 DomainInvitesSetInviteNewUserPrefToYes *DomainInvitesSetInviteNewUserPrefToYesType `json:"domain_invites_set_invite_new_user_pref_to_yes,omitempty"`
8049 // DomainVerificationAddDomainFail : (domains) Failed to verify team domain
8050 DomainVerificationAddDomainFail *DomainVerificationAddDomainFailType `json:"domain_verification_add_domain_fail,omitempty"`
8051 // DomainVerificationAddDomainSuccess : (domains) Verified team domain
8052 DomainVerificationAddDomainSuccess *DomainVerificationAddDomainSuccessType `json:"domain_verification_add_domain_success,omitempty"`
8053 // DomainVerificationRemoveDomain : (domains) Removed domain from list of
8054 // verified team domains
8055 DomainVerificationRemoveDomain *DomainVerificationRemoveDomainType `json:"domain_verification_remove_domain,omitempty"`
8056 // EnabledDomainInvites : (domains) Enabled domain invites (deprecated, no
8057 // longer logged)
8058 EnabledDomainInvites *EnabledDomainInvitesType `json:"enabled_domain_invites,omitempty"`
8059 // ApplyNamingConvention : (file_operations) Applied a Naming Convention
8060 // rule
8061 ApplyNamingConvention *ApplyNamingConventionType `json:"apply_naming_convention,omitempty"`
8062 // CreateFolder : (file_operations) Created folders (deprecated, no longer
8063 // logged)
8064 CreateFolder *CreateFolderType `json:"create_folder,omitempty"`
8065 // FileAdd : (file_operations) Added files and/or folders
8066 FileAdd *FileAddType `json:"file_add,omitempty"`
8067 // FileCopy : (file_operations) Copied files and/or folders
8068 FileCopy *FileCopyType `json:"file_copy,omitempty"`
8069 // FileDelete : (file_operations) Deleted files and/or folders
8070 FileDelete *FileDeleteType `json:"file_delete,omitempty"`
8071 // FileDownload : (file_operations) Downloaded files and/or folders
8072 FileDownload *FileDownloadType `json:"file_download,omitempty"`
8073 // FileEdit : (file_operations) Edited files
8074 FileEdit *FileEditType `json:"file_edit,omitempty"`
8075 // FileGetCopyReference : (file_operations) Created copy reference to
8076 // file/folder
8077 FileGetCopyReference *FileGetCopyReferenceType `json:"file_get_copy_reference,omitempty"`
8078 // FileLockingLockStatusChanged : (file_operations) Locked/unlocked editing
8079 // for a file
8080 FileLockingLockStatusChanged *FileLockingLockStatusChangedType `json:"file_locking_lock_status_changed,omitempty"`
8081 // FileMove : (file_operations) Moved files and/or folders
8082 FileMove *FileMoveType `json:"file_move,omitempty"`
8083 // FilePermanentlyDelete : (file_operations) Permanently deleted files
8084 // and/or folders
8085 FilePermanentlyDelete *FilePermanentlyDeleteType `json:"file_permanently_delete,omitempty"`
8086 // FilePreview : (file_operations) Previewed files and/or folders
8087 FilePreview *FilePreviewType `json:"file_preview,omitempty"`
8088 // FileRename : (file_operations) Renamed files and/or folders
8089 FileRename *FileRenameType `json:"file_rename,omitempty"`
8090 // FileRestore : (file_operations) Restored deleted files and/or folders
8091 FileRestore *FileRestoreType `json:"file_restore,omitempty"`
8092 // FileRevert : (file_operations) Reverted files to previous version
8093 FileRevert *FileRevertType `json:"file_revert,omitempty"`
8094 // FileRollbackChanges : (file_operations) Rolled back file actions
8095 FileRollbackChanges *FileRollbackChangesType `json:"file_rollback_changes,omitempty"`
8096 // FileSaveCopyReference : (file_operations) Saved file/folder using copy
8097 // reference
8098 FileSaveCopyReference *FileSaveCopyReferenceType `json:"file_save_copy_reference,omitempty"`
8099 // FolderOverviewDescriptionChanged : (file_operations) Updated folder
8100 // overview
8101 FolderOverviewDescriptionChanged *FolderOverviewDescriptionChangedType `json:"folder_overview_description_changed,omitempty"`
8102 // FolderOverviewItemPinned : (file_operations) Pinned item to folder
8103 // overview
8104 FolderOverviewItemPinned *FolderOverviewItemPinnedType `json:"folder_overview_item_pinned,omitempty"`
8105 // FolderOverviewItemUnpinned : (file_operations) Unpinned item from folder
8106 // overview
8107 FolderOverviewItemUnpinned *FolderOverviewItemUnpinnedType `json:"folder_overview_item_unpinned,omitempty"`
8108 // ObjectLabelAdded : (file_operations) Added a label
8109 ObjectLabelAdded *ObjectLabelAddedType `json:"object_label_added,omitempty"`
8110 // ObjectLabelRemoved : (file_operations) Removed a label
8111 ObjectLabelRemoved *ObjectLabelRemovedType `json:"object_label_removed,omitempty"`
8112 // ObjectLabelUpdatedValue : (file_operations) Updated a label's value
8113 ObjectLabelUpdatedValue *ObjectLabelUpdatedValueType `json:"object_label_updated_value,omitempty"`
8114 // OrganizeFolderWithTidy : (file_operations) Organized a folder with the
8115 // Tidy Up action
8116 OrganizeFolderWithTidy *OrganizeFolderWithTidyType `json:"organize_folder_with_tidy,omitempty"`
8117 // RewindFolder : (file_operations) Rewound a folder
8118 RewindFolder *RewindFolderType `json:"rewind_folder,omitempty"`
8119 // UserTagsAdded : (file_operations) Tagged a file
8120 UserTagsAdded *UserTagsAddedType `json:"user_tags_added,omitempty"`
8121 // UserTagsRemoved : (file_operations) Removed tags
8122 UserTagsRemoved *UserTagsRemovedType `json:"user_tags_removed,omitempty"`
8123 // FileRequestChange : (file_requests) Changed file request
8124 FileRequestChange *FileRequestChangeType `json:"file_request_change,omitempty"`
8125 // FileRequestClose : (file_requests) Closed file request
8126 FileRequestClose *FileRequestCloseType `json:"file_request_close,omitempty"`
8127 // FileRequestCreate : (file_requests) Created file request
8128 FileRequestCreate *FileRequestCreateType `json:"file_request_create,omitempty"`
8129 // FileRequestDelete : (file_requests) Delete file request
8130 FileRequestDelete *FileRequestDeleteType `json:"file_request_delete,omitempty"`
8131 // FileRequestReceiveFile : (file_requests) Received files for file request
8132 FileRequestReceiveFile *FileRequestReceiveFileType `json:"file_request_receive_file,omitempty"`
8133 // GroupAddExternalId : (groups) Added external ID for group
8134 GroupAddExternalId *GroupAddExternalIdType `json:"group_add_external_id,omitempty"`
8135 // GroupAddMember : (groups) Added team members to group
8136 GroupAddMember *GroupAddMemberType `json:"group_add_member,omitempty"`
8137 // GroupChangeExternalId : (groups) Changed external ID for group
8138 GroupChangeExternalId *GroupChangeExternalIdType `json:"group_change_external_id,omitempty"`
8139 // GroupChangeManagementType : (groups) Changed group management type
8140 GroupChangeManagementType *GroupChangeManagementTypeType `json:"group_change_management_type,omitempty"`
8141 // GroupChangeMemberRole : (groups) Changed manager permissions of group
8142 // member
8143 GroupChangeMemberRole *GroupChangeMemberRoleType `json:"group_change_member_role,omitempty"`
8144 // GroupCreate : (groups) Created group
8145 GroupCreate *GroupCreateType `json:"group_create,omitempty"`
8146 // GroupDelete : (groups) Deleted group
8147 GroupDelete *GroupDeleteType `json:"group_delete,omitempty"`
8148 // GroupDescriptionUpdated : (groups) Updated group (deprecated, no longer
8149 // logged)
8150 GroupDescriptionUpdated *GroupDescriptionUpdatedType `json:"group_description_updated,omitempty"`
8151 // GroupJoinPolicyUpdated : (groups) Updated group join policy (deprecated,
8152 // no longer logged)
8153 GroupJoinPolicyUpdated *GroupJoinPolicyUpdatedType `json:"group_join_policy_updated,omitempty"`
8154 // GroupMoved : (groups) Moved group (deprecated, no longer logged)
8155 GroupMoved *GroupMovedType `json:"group_moved,omitempty"`
8156 // GroupRemoveExternalId : (groups) Removed external ID for group
8157 GroupRemoveExternalId *GroupRemoveExternalIdType `json:"group_remove_external_id,omitempty"`
8158 // GroupRemoveMember : (groups) Removed team members from group
8159 GroupRemoveMember *GroupRemoveMemberType `json:"group_remove_member,omitempty"`
8160 // GroupRename : (groups) Renamed group
8161 GroupRename *GroupRenameType `json:"group_rename,omitempty"`
8162 // AccountLockOrUnlocked : (logins) Unlocked/locked account after failed
8163 // sign in attempts
8164 AccountLockOrUnlocked *AccountLockOrUnlockedType `json:"account_lock_or_unlocked,omitempty"`
8165 // EmmError : (logins) Failed to sign in via EMM (deprecated, replaced by
8166 // 'Failed to sign in')
8167 EmmError *EmmErrorType `json:"emm_error,omitempty"`
8168 // GuestAdminSignedInViaTrustedTeams : (logins) Started trusted team admin
8169 // session
8170 GuestAdminSignedInViaTrustedTeams *GuestAdminSignedInViaTrustedTeamsType `json:"guest_admin_signed_in_via_trusted_teams,omitempty"`
8171 // GuestAdminSignedOutViaTrustedTeams : (logins) Ended trusted team admin
8172 // session
8173 GuestAdminSignedOutViaTrustedTeams *GuestAdminSignedOutViaTrustedTeamsType `json:"guest_admin_signed_out_via_trusted_teams,omitempty"`
8174 // LoginFail : (logins) Failed to sign in
8175 LoginFail *LoginFailType `json:"login_fail,omitempty"`
8176 // LoginSuccess : (logins) Signed in
8177 LoginSuccess *LoginSuccessType `json:"login_success,omitempty"`
8178 // Logout : (logins) Signed out
8179 Logout *LogoutType `json:"logout,omitempty"`
8180 // ResellerSupportSessionEnd : (logins) Ended reseller support session
8181 ResellerSupportSessionEnd *ResellerSupportSessionEndType `json:"reseller_support_session_end,omitempty"`
8182 // ResellerSupportSessionStart : (logins) Started reseller support session
8183 ResellerSupportSessionStart *ResellerSupportSessionStartType `json:"reseller_support_session_start,omitempty"`
8184 // SignInAsSessionEnd : (logins) Ended admin sign-in-as session
8185 SignInAsSessionEnd *SignInAsSessionEndType `json:"sign_in_as_session_end,omitempty"`
8186 // SignInAsSessionStart : (logins) Started admin sign-in-as session
8187 SignInAsSessionStart *SignInAsSessionStartType `json:"sign_in_as_session_start,omitempty"`
8188 // SsoError : (logins) Failed to sign in via SSO (deprecated, replaced by
8189 // 'Failed to sign in')
8190 SsoError *SsoErrorType `json:"sso_error,omitempty"`
8191 // CreateTeamInviteLink : (members) Created team invite link
8192 CreateTeamInviteLink *CreateTeamInviteLinkType `json:"create_team_invite_link,omitempty"`
8193 // DeleteTeamInviteLink : (members) Deleted team invite link
8194 DeleteTeamInviteLink *DeleteTeamInviteLinkType `json:"delete_team_invite_link,omitempty"`
8195 // MemberAddExternalId : (members) Added an external ID for team member
8196 MemberAddExternalId *MemberAddExternalIdType `json:"member_add_external_id,omitempty"`
8197 // MemberAddName : (members) Added team member name
8198 MemberAddName *MemberAddNameType `json:"member_add_name,omitempty"`
8199 // MemberChangeAdminRole : (members) Changed team member admin role
8200 MemberChangeAdminRole *MemberChangeAdminRoleType `json:"member_change_admin_role,omitempty"`
8201 // MemberChangeEmail : (members) Changed team member email
8202 MemberChangeEmail *MemberChangeEmailType `json:"member_change_email,omitempty"`
8203 // MemberChangeExternalId : (members) Changed the external ID for team
8204 // member
8205 MemberChangeExternalId *MemberChangeExternalIdType `json:"member_change_external_id,omitempty"`
8206 // MemberChangeMembershipType : (members) Changed membership type
8207 // (limited/full) of member (deprecated, no longer logged)
8208 MemberChangeMembershipType *MemberChangeMembershipTypeType `json:"member_change_membership_type,omitempty"`
8209 // MemberChangeName : (members) Changed team member name
8210 MemberChangeName *MemberChangeNameType `json:"member_change_name,omitempty"`
8211 // MemberChangeResellerRole : (members) Changed team member reseller role
8212 MemberChangeResellerRole *MemberChangeResellerRoleType `json:"member_change_reseller_role,omitempty"`
8213 // MemberChangeStatus : (members) Changed member status (invited, joined,
8214 // suspended, etc.)
8215 MemberChangeStatus *MemberChangeStatusType `json:"member_change_status,omitempty"`
8216 // MemberDeleteManualContacts : (members) Cleared manually added contacts
8217 MemberDeleteManualContacts *MemberDeleteManualContactsType `json:"member_delete_manual_contacts,omitempty"`
8218 // MemberDeleteProfilePhoto : (members) Deleted team member profile photo
8219 MemberDeleteProfilePhoto *MemberDeleteProfilePhotoType `json:"member_delete_profile_photo,omitempty"`
8220 // MemberPermanentlyDeleteAccountContents : (members) Permanently deleted
8221 // contents of deleted team member account
8222 MemberPermanentlyDeleteAccountContents *MemberPermanentlyDeleteAccountContentsType `json:"member_permanently_delete_account_contents,omitempty"`
8223 // MemberRemoveExternalId : (members) Removed the external ID for team
8224 // member
8225 MemberRemoveExternalId *MemberRemoveExternalIdType `json:"member_remove_external_id,omitempty"`
8226 // MemberSetProfilePhoto : (members) Set team member profile photo
8227 MemberSetProfilePhoto *MemberSetProfilePhotoType `json:"member_set_profile_photo,omitempty"`
8228 // MemberSpaceLimitsAddCustomQuota : (members) Set custom member space limit
8229 MemberSpaceLimitsAddCustomQuota *MemberSpaceLimitsAddCustomQuotaType `json:"member_space_limits_add_custom_quota,omitempty"`
8230 // MemberSpaceLimitsChangeCustomQuota : (members) Changed custom member
8231 // space limit
8232 MemberSpaceLimitsChangeCustomQuota *MemberSpaceLimitsChangeCustomQuotaType `json:"member_space_limits_change_custom_quota,omitempty"`
8233 // MemberSpaceLimitsChangeStatus : (members) Changed space limit status
8234 MemberSpaceLimitsChangeStatus *MemberSpaceLimitsChangeStatusType `json:"member_space_limits_change_status,omitempty"`
8235 // MemberSpaceLimitsRemoveCustomQuota : (members) Removed custom member
8236 // space limit
8237 MemberSpaceLimitsRemoveCustomQuota *MemberSpaceLimitsRemoveCustomQuotaType `json:"member_space_limits_remove_custom_quota,omitempty"`
8238 // MemberSuggest : (members) Suggested person to add to team
8239 MemberSuggest *MemberSuggestType `json:"member_suggest,omitempty"`
8240 // MemberTransferAccountContents : (members) Transferred contents of deleted
8241 // member account to another member
8242 MemberTransferAccountContents *MemberTransferAccountContentsType `json:"member_transfer_account_contents,omitempty"`
8243 // PendingSecondaryEmailAdded : (members) Added pending secondary email
8244 PendingSecondaryEmailAdded *PendingSecondaryEmailAddedType `json:"pending_secondary_email_added,omitempty"`
8245 // SecondaryEmailDeleted : (members) Deleted secondary email
8246 SecondaryEmailDeleted *SecondaryEmailDeletedType `json:"secondary_email_deleted,omitempty"`
8247 // SecondaryEmailVerified : (members) Verified secondary email
8248 SecondaryEmailVerified *SecondaryEmailVerifiedType `json:"secondary_email_verified,omitempty"`
8249 // SecondaryMailsPolicyChanged : (members) Secondary mails policy changed
8250 SecondaryMailsPolicyChanged *SecondaryMailsPolicyChangedType `json:"secondary_mails_policy_changed,omitempty"`
8251 // BinderAddPage : (paper) Added Binder page (deprecated, replaced by
8252 // 'Edited files')
8253 BinderAddPage *BinderAddPageType `json:"binder_add_page,omitempty"`
8254 // BinderAddSection : (paper) Added Binder section (deprecated, replaced by
8255 // 'Edited files')
8256 BinderAddSection *BinderAddSectionType `json:"binder_add_section,omitempty"`
8257 // BinderRemovePage : (paper) Removed Binder page (deprecated, replaced by
8258 // 'Edited files')
8259 BinderRemovePage *BinderRemovePageType `json:"binder_remove_page,omitempty"`
8260 // BinderRemoveSection : (paper) Removed Binder section (deprecated,
8261 // replaced by 'Edited files')
8262 BinderRemoveSection *BinderRemoveSectionType `json:"binder_remove_section,omitempty"`
8263 // BinderRenamePage : (paper) Renamed Binder page (deprecated, replaced by
8264 // 'Edited files')
8265 BinderRenamePage *BinderRenamePageType `json:"binder_rename_page,omitempty"`
8266 // BinderRenameSection : (paper) Renamed Binder section (deprecated,
8267 // replaced by 'Edited files')
8268 BinderRenameSection *BinderRenameSectionType `json:"binder_rename_section,omitempty"`
8269 // BinderReorderPage : (paper) Reordered Binder page (deprecated, replaced
8270 // by 'Edited files')
8271 BinderReorderPage *BinderReorderPageType `json:"binder_reorder_page,omitempty"`
8272 // BinderReorderSection : (paper) Reordered Binder section (deprecated,
8273 // replaced by 'Edited files')
8274 BinderReorderSection *BinderReorderSectionType `json:"binder_reorder_section,omitempty"`
8275 // PaperContentAddMember : (paper) Added users and/or groups to Paper
8276 // doc/folder
8277 PaperContentAddMember *PaperContentAddMemberType `json:"paper_content_add_member,omitempty"`
8278 // PaperContentAddToFolder : (paper) Added Paper doc/folder to folder
8279 PaperContentAddToFolder *PaperContentAddToFolderType `json:"paper_content_add_to_folder,omitempty"`
8280 // PaperContentArchive : (paper) Archived Paper doc/folder
8281 PaperContentArchive *PaperContentArchiveType `json:"paper_content_archive,omitempty"`
8282 // PaperContentCreate : (paper) Created Paper doc/folder
8283 PaperContentCreate *PaperContentCreateType `json:"paper_content_create,omitempty"`
8284 // PaperContentPermanentlyDelete : (paper) Permanently deleted Paper
8285 // doc/folder
8286 PaperContentPermanentlyDelete *PaperContentPermanentlyDeleteType `json:"paper_content_permanently_delete,omitempty"`
8287 // PaperContentRemoveFromFolder : (paper) Removed Paper doc/folder from
8288 // folder
8289 PaperContentRemoveFromFolder *PaperContentRemoveFromFolderType `json:"paper_content_remove_from_folder,omitempty"`
8290 // PaperContentRemoveMember : (paper) Removed users and/or groups from Paper
8291 // doc/folder
8292 PaperContentRemoveMember *PaperContentRemoveMemberType `json:"paper_content_remove_member,omitempty"`
8293 // PaperContentRename : (paper) Renamed Paper doc/folder
8294 PaperContentRename *PaperContentRenameType `json:"paper_content_rename,omitempty"`
8295 // PaperContentRestore : (paper) Restored archived Paper doc/folder
8296 PaperContentRestore *PaperContentRestoreType `json:"paper_content_restore,omitempty"`
8297 // PaperDocAddComment : (paper) Added Paper doc comment
8298 PaperDocAddComment *PaperDocAddCommentType `json:"paper_doc_add_comment,omitempty"`
8299 // PaperDocChangeMemberRole : (paper) Changed member permissions for Paper
8300 // doc
8301 PaperDocChangeMemberRole *PaperDocChangeMemberRoleType `json:"paper_doc_change_member_role,omitempty"`
8302 // PaperDocChangeSharingPolicy : (paper) Changed sharing setting for Paper
8303 // doc
8304 PaperDocChangeSharingPolicy *PaperDocChangeSharingPolicyType `json:"paper_doc_change_sharing_policy,omitempty"`
8305 // PaperDocChangeSubscription : (paper) Followed/unfollowed Paper doc
8306 PaperDocChangeSubscription *PaperDocChangeSubscriptionType `json:"paper_doc_change_subscription,omitempty"`
8307 // PaperDocDeleted : (paper) Archived Paper doc (deprecated, no longer
8308 // logged)
8309 PaperDocDeleted *PaperDocDeletedType `json:"paper_doc_deleted,omitempty"`
8310 // PaperDocDeleteComment : (paper) Deleted Paper doc comment
8311 PaperDocDeleteComment *PaperDocDeleteCommentType `json:"paper_doc_delete_comment,omitempty"`
8312 // PaperDocDownload : (paper) Downloaded Paper doc in specific format
8313 PaperDocDownload *PaperDocDownloadType `json:"paper_doc_download,omitempty"`
8314 // PaperDocEdit : (paper) Edited Paper doc
8315 PaperDocEdit *PaperDocEditType `json:"paper_doc_edit,omitempty"`
8316 // PaperDocEditComment : (paper) Edited Paper doc comment
8317 PaperDocEditComment *PaperDocEditCommentType `json:"paper_doc_edit_comment,omitempty"`
8318 // PaperDocFollowed : (paper) Followed Paper doc (deprecated, replaced by
8319 // 'Followed/unfollowed Paper doc')
8320 PaperDocFollowed *PaperDocFollowedType `json:"paper_doc_followed,omitempty"`
8321 // PaperDocMention : (paper) Mentioned user in Paper doc
8322 PaperDocMention *PaperDocMentionType `json:"paper_doc_mention,omitempty"`
8323 // PaperDocOwnershipChanged : (paper) Transferred ownership of Paper doc
8324 PaperDocOwnershipChanged *PaperDocOwnershipChangedType `json:"paper_doc_ownership_changed,omitempty"`
8325 // PaperDocRequestAccess : (paper) Requested access to Paper doc
8326 PaperDocRequestAccess *PaperDocRequestAccessType `json:"paper_doc_request_access,omitempty"`
8327 // PaperDocResolveComment : (paper) Resolved Paper doc comment
8328 PaperDocResolveComment *PaperDocResolveCommentType `json:"paper_doc_resolve_comment,omitempty"`
8329 // PaperDocRevert : (paper) Restored Paper doc to previous version
8330 PaperDocRevert *PaperDocRevertType `json:"paper_doc_revert,omitempty"`
8331 // PaperDocSlackShare : (paper) Shared Paper doc via Slack
8332 PaperDocSlackShare *PaperDocSlackShareType `json:"paper_doc_slack_share,omitempty"`
8333 // PaperDocTeamInvite : (paper) Shared Paper doc with users and/or groups
8334 // (deprecated, no longer logged)
8335 PaperDocTeamInvite *PaperDocTeamInviteType `json:"paper_doc_team_invite,omitempty"`
8336 // PaperDocTrashed : (paper) Deleted Paper doc
8337 PaperDocTrashed *PaperDocTrashedType `json:"paper_doc_trashed,omitempty"`
8338 // PaperDocUnresolveComment : (paper) Unresolved Paper doc comment
8339 PaperDocUnresolveComment *PaperDocUnresolveCommentType `json:"paper_doc_unresolve_comment,omitempty"`
8340 // PaperDocUntrashed : (paper) Restored Paper doc
8341 PaperDocUntrashed *PaperDocUntrashedType `json:"paper_doc_untrashed,omitempty"`
8342 // PaperDocView : (paper) Viewed Paper doc
8343 PaperDocView *PaperDocViewType `json:"paper_doc_view,omitempty"`
8344 // PaperExternalViewAllow : (paper) Changed Paper external sharing setting
8345 // to anyone (deprecated, no longer logged)
8346 PaperExternalViewAllow *PaperExternalViewAllowType `json:"paper_external_view_allow,omitempty"`
8347 // PaperExternalViewDefaultTeam : (paper) Changed Paper external sharing
8348 // setting to default team (deprecated, no longer logged)
8349 PaperExternalViewDefaultTeam *PaperExternalViewDefaultTeamType `json:"paper_external_view_default_team,omitempty"`
8350 // PaperExternalViewForbid : (paper) Changed Paper external sharing setting
8351 // to team-only (deprecated, no longer logged)
8352 PaperExternalViewForbid *PaperExternalViewForbidType `json:"paper_external_view_forbid,omitempty"`
8353 // PaperFolderChangeSubscription : (paper) Followed/unfollowed Paper folder
8354 PaperFolderChangeSubscription *PaperFolderChangeSubscriptionType `json:"paper_folder_change_subscription,omitempty"`
8355 // PaperFolderDeleted : (paper) Archived Paper folder (deprecated, no longer
8356 // logged)
8357 PaperFolderDeleted *PaperFolderDeletedType `json:"paper_folder_deleted,omitempty"`
8358 // PaperFolderFollowed : (paper) Followed Paper folder (deprecated, replaced
8359 // by 'Followed/unfollowed Paper folder')
8360 PaperFolderFollowed *PaperFolderFollowedType `json:"paper_folder_followed,omitempty"`
8361 // PaperFolderTeamInvite : (paper) Shared Paper folder with users and/or
8362 // groups (deprecated, no longer logged)
8363 PaperFolderTeamInvite *PaperFolderTeamInviteType `json:"paper_folder_team_invite,omitempty"`
8364 // PaperPublishedLinkChangePermission : (paper) Changed permissions for
8365 // published doc
8366 PaperPublishedLinkChangePermission *PaperPublishedLinkChangePermissionType `json:"paper_published_link_change_permission,omitempty"`
8367 // PaperPublishedLinkCreate : (paper) Published doc
8368 PaperPublishedLinkCreate *PaperPublishedLinkCreateType `json:"paper_published_link_create,omitempty"`
8369 // PaperPublishedLinkDisabled : (paper) Unpublished doc
8370 PaperPublishedLinkDisabled *PaperPublishedLinkDisabledType `json:"paper_published_link_disabled,omitempty"`
8371 // PaperPublishedLinkView : (paper) Viewed published doc
8372 PaperPublishedLinkView *PaperPublishedLinkViewType `json:"paper_published_link_view,omitempty"`
8373 // PasswordChange : (passwords) Changed password
8374 PasswordChange *PasswordChangeType `json:"password_change,omitempty"`
8375 // PasswordReset : (passwords) Reset password
8376 PasswordReset *PasswordResetType `json:"password_reset,omitempty"`
8377 // PasswordResetAll : (passwords) Reset all team member passwords
8378 PasswordResetAll *PasswordResetAllType `json:"password_reset_all,omitempty"`
8379 // ClassificationCreateReport : (reports) Created Classification report
8380 ClassificationCreateReport *ClassificationCreateReportType `json:"classification_create_report,omitempty"`
8381 // ClassificationCreateReportFail : (reports) Couldn't create Classification
8382 // report
8383 ClassificationCreateReportFail *ClassificationCreateReportFailType `json:"classification_create_report_fail,omitempty"`
8384 // EmmCreateExceptionsReport : (reports) Created EMM-excluded users report
8385 EmmCreateExceptionsReport *EmmCreateExceptionsReportType `json:"emm_create_exceptions_report,omitempty"`
8386 // EmmCreateUsageReport : (reports) Created EMM mobile app usage report
8387 EmmCreateUsageReport *EmmCreateUsageReportType `json:"emm_create_usage_report,omitempty"`
8388 // ExportMembersReport : (reports) Created member data report
8389 ExportMembersReport *ExportMembersReportType `json:"export_members_report,omitempty"`
8390 // ExportMembersReportFail : (reports) Failed to create members data report
8391 ExportMembersReportFail *ExportMembersReportFailType `json:"export_members_report_fail,omitempty"`
8392 // ExternalSharingCreateReport : (reports) Created External sharing report
8393 ExternalSharingCreateReport *ExternalSharingCreateReportType `json:"external_sharing_create_report,omitempty"`
8394 // ExternalSharingReportFailed : (reports) Couldn't create External sharing
8395 // report
8396 ExternalSharingReportFailed *ExternalSharingReportFailedType `json:"external_sharing_report_failed,omitempty"`
8397 // NoExpirationLinkGenCreateReport : (reports) Report created: Links created
8398 // with no expiration
8399 NoExpirationLinkGenCreateReport *NoExpirationLinkGenCreateReportType `json:"no_expiration_link_gen_create_report,omitempty"`
8400 // NoExpirationLinkGenReportFailed : (reports) Couldn't create report: Links
8401 // created with no expiration
8402 NoExpirationLinkGenReportFailed *NoExpirationLinkGenReportFailedType `json:"no_expiration_link_gen_report_failed,omitempty"`
8403 // NoPasswordLinkGenCreateReport : (reports) Report created: Links created
8404 // without passwords
8405 NoPasswordLinkGenCreateReport *NoPasswordLinkGenCreateReportType `json:"no_password_link_gen_create_report,omitempty"`
8406 // NoPasswordLinkGenReportFailed : (reports) Couldn't create report: Links
8407 // created without passwords
8408 NoPasswordLinkGenReportFailed *NoPasswordLinkGenReportFailedType `json:"no_password_link_gen_report_failed,omitempty"`
8409 // NoPasswordLinkViewCreateReport : (reports) Report created: Views of links
8410 // without passwords
8411 NoPasswordLinkViewCreateReport *NoPasswordLinkViewCreateReportType `json:"no_password_link_view_create_report,omitempty"`
8412 // NoPasswordLinkViewReportFailed : (reports) Couldn't create report: Views
8413 // of links without passwords
8414 NoPasswordLinkViewReportFailed *NoPasswordLinkViewReportFailedType `json:"no_password_link_view_report_failed,omitempty"`
8415 // OutdatedLinkViewCreateReport : (reports) Report created: Views of old
8416 // links
8417 OutdatedLinkViewCreateReport *OutdatedLinkViewCreateReportType `json:"outdated_link_view_create_report,omitempty"`
8418 // OutdatedLinkViewReportFailed : (reports) Couldn't create report: Views of
8419 // old links
8420 OutdatedLinkViewReportFailed *OutdatedLinkViewReportFailedType `json:"outdated_link_view_report_failed,omitempty"`
8421 // PaperAdminExportStart : (reports) Exported all team Paper docs
8422 PaperAdminExportStart *PaperAdminExportStartType `json:"paper_admin_export_start,omitempty"`
8423 // SmartSyncCreateAdminPrivilegeReport : (reports) Created Smart Sync
8424 // non-admin devices report
8425 SmartSyncCreateAdminPrivilegeReport *SmartSyncCreateAdminPrivilegeReportType `json:"smart_sync_create_admin_privilege_report,omitempty"`
8426 // TeamActivityCreateReport : (reports) Created team activity report
8427 TeamActivityCreateReport *TeamActivityCreateReportType `json:"team_activity_create_report,omitempty"`
8428 // TeamActivityCreateReportFail : (reports) Couldn't generate team activity
8429 // report
8430 TeamActivityCreateReportFail *TeamActivityCreateReportFailType `json:"team_activity_create_report_fail,omitempty"`
8431 // CollectionShare : (sharing) Shared album
8432 CollectionShare *CollectionShareType `json:"collection_share,omitempty"`
8433 // FileTransfersFileAdd : (sharing) Transfer files added
8434 FileTransfersFileAdd *FileTransfersFileAddType `json:"file_transfers_file_add,omitempty"`
8435 // FileTransfersTransferDelete : (sharing) Deleted transfer
8436 FileTransfersTransferDelete *FileTransfersTransferDeleteType `json:"file_transfers_transfer_delete,omitempty"`
8437 // FileTransfersTransferDownload : (sharing) Transfer downloaded
8438 FileTransfersTransferDownload *FileTransfersTransferDownloadType `json:"file_transfers_transfer_download,omitempty"`
8439 // FileTransfersTransferSend : (sharing) Sent transfer
8440 FileTransfersTransferSend *FileTransfersTransferSendType `json:"file_transfers_transfer_send,omitempty"`
8441 // FileTransfersTransferView : (sharing) Viewed transfer
8442 FileTransfersTransferView *FileTransfersTransferViewType `json:"file_transfers_transfer_view,omitempty"`
8443 // NoteAclInviteOnly : (sharing) Changed Paper doc to invite-only
8444 // (deprecated, no longer logged)
8445 NoteAclInviteOnly *NoteAclInviteOnlyType `json:"note_acl_invite_only,omitempty"`
8446 // NoteAclLink : (sharing) Changed Paper doc to link-accessible (deprecated,
8447 // no longer logged)
8448 NoteAclLink *NoteAclLinkType `json:"note_acl_link,omitempty"`
8449 // NoteAclTeamLink : (sharing) Changed Paper doc to link-accessible for team
8450 // (deprecated, no longer logged)
8451 NoteAclTeamLink *NoteAclTeamLinkType `json:"note_acl_team_link,omitempty"`
8452 // NoteShared : (sharing) Shared Paper doc (deprecated, no longer logged)
8453 NoteShared *NoteSharedType `json:"note_shared,omitempty"`
8454 // NoteShareReceive : (sharing) Shared received Paper doc (deprecated, no
8455 // longer logged)
8456 NoteShareReceive *NoteShareReceiveType `json:"note_share_receive,omitempty"`
8457 // OpenNoteShared : (sharing) Opened shared Paper doc (deprecated, no longer
8458 // logged)
8459 OpenNoteShared *OpenNoteSharedType `json:"open_note_shared,omitempty"`
8460 // SfAddGroup : (sharing) Added team to shared folder (deprecated, no longer
8461 // logged)
8462 SfAddGroup *SfAddGroupType `json:"sf_add_group,omitempty"`
8463 // SfAllowNonMembersToViewSharedLinks : (sharing) Allowed non-collaborators
8464 // to view links to files in shared folder (deprecated, no longer logged)
8465 SfAllowNonMembersToViewSharedLinks *SfAllowNonMembersToViewSharedLinksType `json:"sf_allow_non_members_to_view_shared_links,omitempty"`
8466 // SfExternalInviteWarn : (sharing) Set team members to see warning before
8467 // sharing folders outside team (deprecated, no longer logged)
8468 SfExternalInviteWarn *SfExternalInviteWarnType `json:"sf_external_invite_warn,omitempty"`
8469 // SfFbInvite : (sharing) Invited Facebook users to shared folder
8470 // (deprecated, no longer logged)
8471 SfFbInvite *SfFbInviteType `json:"sf_fb_invite,omitempty"`
8472 // SfFbInviteChangeRole : (sharing) Changed Facebook user's role in shared
8473 // folder (deprecated, no longer logged)
8474 SfFbInviteChangeRole *SfFbInviteChangeRoleType `json:"sf_fb_invite_change_role,omitempty"`
8475 // SfFbUninvite : (sharing) Uninvited Facebook user from shared folder
8476 // (deprecated, no longer logged)
8477 SfFbUninvite *SfFbUninviteType `json:"sf_fb_uninvite,omitempty"`
8478 // SfInviteGroup : (sharing) Invited group to shared folder (deprecated, no
8479 // longer logged)
8480 SfInviteGroup *SfInviteGroupType `json:"sf_invite_group,omitempty"`
8481 // SfTeamGrantAccess : (sharing) Granted access to shared folder
8482 // (deprecated, no longer logged)
8483 SfTeamGrantAccess *SfTeamGrantAccessType `json:"sf_team_grant_access,omitempty"`
8484 // SfTeamInvite : (sharing) Invited team members to shared folder
8485 // (deprecated, replaced by 'Invited user to Dropbox and added them to
8486 // shared file/folder')
8487 SfTeamInvite *SfTeamInviteType `json:"sf_team_invite,omitempty"`
8488 // SfTeamInviteChangeRole : (sharing) Changed team member's role in shared
8489 // folder (deprecated, no longer logged)
8490 SfTeamInviteChangeRole *SfTeamInviteChangeRoleType `json:"sf_team_invite_change_role,omitempty"`
8491 // SfTeamJoin : (sharing) Joined team member's shared folder (deprecated, no
8492 // longer logged)
8493 SfTeamJoin *SfTeamJoinType `json:"sf_team_join,omitempty"`
8494 // SfTeamJoinFromOobLink : (sharing) Joined team member's shared folder from
8495 // link (deprecated, no longer logged)
8496 SfTeamJoinFromOobLink *SfTeamJoinFromOobLinkType `json:"sf_team_join_from_oob_link,omitempty"`
8497 // SfTeamUninvite : (sharing) Unshared folder with team member (deprecated,
8498 // replaced by 'Removed invitee from shared file/folder before invite was
8499 // accepted')
8500 SfTeamUninvite *SfTeamUninviteType `json:"sf_team_uninvite,omitempty"`
8501 // SharedContentAddInvitees : (sharing) Invited user to Dropbox and added
8502 // them to shared file/folder
8503 SharedContentAddInvitees *SharedContentAddInviteesType `json:"shared_content_add_invitees,omitempty"`
8504 // SharedContentAddLinkExpiry : (sharing) Added expiration date to link for
8505 // shared file/folder (deprecated, no longer logged)
8506 SharedContentAddLinkExpiry *SharedContentAddLinkExpiryType `json:"shared_content_add_link_expiry,omitempty"`
8507 // SharedContentAddLinkPassword : (sharing) Added password to link for
8508 // shared file/folder (deprecated, no longer logged)
8509 SharedContentAddLinkPassword *SharedContentAddLinkPasswordType `json:"shared_content_add_link_password,omitempty"`
8510 // SharedContentAddMember : (sharing) Added users and/or groups to shared
8511 // file/folder
8512 SharedContentAddMember *SharedContentAddMemberType `json:"shared_content_add_member,omitempty"`
8513 // SharedContentChangeDownloadsPolicy : (sharing) Changed whether members
8514 // can download shared file/folder (deprecated, no longer logged)
8515 SharedContentChangeDownloadsPolicy *SharedContentChangeDownloadsPolicyType `json:"shared_content_change_downloads_policy,omitempty"`
8516 // SharedContentChangeInviteeRole : (sharing) Changed access type of invitee
8517 // to shared file/folder before invite was accepted
8518 SharedContentChangeInviteeRole *SharedContentChangeInviteeRoleType `json:"shared_content_change_invitee_role,omitempty"`
8519 // SharedContentChangeLinkAudience : (sharing) Changed link audience of
8520 // shared file/folder (deprecated, no longer logged)
8521 SharedContentChangeLinkAudience *SharedContentChangeLinkAudienceType `json:"shared_content_change_link_audience,omitempty"`
8522 // SharedContentChangeLinkExpiry : (sharing) Changed link expiration of
8523 // shared file/folder (deprecated, no longer logged)
8524 SharedContentChangeLinkExpiry *SharedContentChangeLinkExpiryType `json:"shared_content_change_link_expiry,omitempty"`
8525 // SharedContentChangeLinkPassword : (sharing) Changed link password of
8526 // shared file/folder (deprecated, no longer logged)
8527 SharedContentChangeLinkPassword *SharedContentChangeLinkPasswordType `json:"shared_content_change_link_password,omitempty"`
8528 // SharedContentChangeMemberRole : (sharing) Changed access type of shared
8529 // file/folder member
8530 SharedContentChangeMemberRole *SharedContentChangeMemberRoleType `json:"shared_content_change_member_role,omitempty"`
8531 // SharedContentChangeViewerInfoPolicy : (sharing) Changed whether members
8532 // can see who viewed shared file/folder
8533 SharedContentChangeViewerInfoPolicy *SharedContentChangeViewerInfoPolicyType `json:"shared_content_change_viewer_info_policy,omitempty"`
8534 // SharedContentClaimInvitation : (sharing) Acquired membership of shared
8535 // file/folder by accepting invite
8536 SharedContentClaimInvitation *SharedContentClaimInvitationType `json:"shared_content_claim_invitation,omitempty"`
8537 // SharedContentCopy : (sharing) Copied shared file/folder to own Dropbox
8538 SharedContentCopy *SharedContentCopyType `json:"shared_content_copy,omitempty"`
8539 // SharedContentDownload : (sharing) Downloaded shared file/folder
8540 SharedContentDownload *SharedContentDownloadType `json:"shared_content_download,omitempty"`
8541 // SharedContentRelinquishMembership : (sharing) Left shared file/folder
8542 SharedContentRelinquishMembership *SharedContentRelinquishMembershipType `json:"shared_content_relinquish_membership,omitempty"`
8543 // SharedContentRemoveInvitees : (sharing) Removed invitee from shared
8544 // file/folder before invite was accepted
8545 SharedContentRemoveInvitees *SharedContentRemoveInviteesType `json:"shared_content_remove_invitees,omitempty"`
8546 // SharedContentRemoveLinkExpiry : (sharing) Removed link expiration date of
8547 // shared file/folder (deprecated, no longer logged)
8548 SharedContentRemoveLinkExpiry *SharedContentRemoveLinkExpiryType `json:"shared_content_remove_link_expiry,omitempty"`
8549 // SharedContentRemoveLinkPassword : (sharing) Removed link password of
8550 // shared file/folder (deprecated, no longer logged)
8551 SharedContentRemoveLinkPassword *SharedContentRemoveLinkPasswordType `json:"shared_content_remove_link_password,omitempty"`
8552 // SharedContentRemoveMember : (sharing) Removed user/group from shared
8553 // file/folder
8554 SharedContentRemoveMember *SharedContentRemoveMemberType `json:"shared_content_remove_member,omitempty"`
8555 // SharedContentRequestAccess : (sharing) Requested access to shared
8556 // file/folder
8557 SharedContentRequestAccess *SharedContentRequestAccessType `json:"shared_content_request_access,omitempty"`
8558 // SharedContentRestoreInvitees : (sharing) Restored shared file/folder
8559 // invitees
8560 SharedContentRestoreInvitees *SharedContentRestoreInviteesType `json:"shared_content_restore_invitees,omitempty"`
8561 // SharedContentRestoreMember : (sharing) Restored users and/or groups to
8562 // membership of shared file/folder
8563 SharedContentRestoreMember *SharedContentRestoreMemberType `json:"shared_content_restore_member,omitempty"`
8564 // SharedContentUnshare : (sharing) Unshared file/folder by clearing
8565 // membership
8566 SharedContentUnshare *SharedContentUnshareType `json:"shared_content_unshare,omitempty"`
8567 // SharedContentView : (sharing) Previewed shared file/folder
8568 SharedContentView *SharedContentViewType `json:"shared_content_view,omitempty"`
8569 // SharedFolderChangeLinkPolicy : (sharing) Changed who can access shared
8570 // folder via link
8571 SharedFolderChangeLinkPolicy *SharedFolderChangeLinkPolicyType `json:"shared_folder_change_link_policy,omitempty"`
8572 // SharedFolderChangeMembersInheritancePolicy : (sharing) Changed whether
8573 // shared folder inherits members from parent folder
8574 SharedFolderChangeMembersInheritancePolicy *SharedFolderChangeMembersInheritancePolicyType `json:"shared_folder_change_members_inheritance_policy,omitempty"`
8575 // SharedFolderChangeMembersManagementPolicy : (sharing) Changed who can
8576 // add/remove members of shared folder
8577 SharedFolderChangeMembersManagementPolicy *SharedFolderChangeMembersManagementPolicyType `json:"shared_folder_change_members_management_policy,omitempty"`
8578 // SharedFolderChangeMembersPolicy : (sharing) Changed who can become member
8579 // of shared folder
8580 SharedFolderChangeMembersPolicy *SharedFolderChangeMembersPolicyType `json:"shared_folder_change_members_policy,omitempty"`
8581 // SharedFolderCreate : (sharing) Created shared folder
8582 SharedFolderCreate *SharedFolderCreateType `json:"shared_folder_create,omitempty"`
8583 // SharedFolderDeclineInvitation : (sharing) Declined team member's invite
8584 // to shared folder
8585 SharedFolderDeclineInvitation *SharedFolderDeclineInvitationType `json:"shared_folder_decline_invitation,omitempty"`
8586 // SharedFolderMount : (sharing) Added shared folder to own Dropbox
8587 SharedFolderMount *SharedFolderMountType `json:"shared_folder_mount,omitempty"`
8588 // SharedFolderNest : (sharing) Changed parent of shared folder
8589 SharedFolderNest *SharedFolderNestType `json:"shared_folder_nest,omitempty"`
8590 // SharedFolderTransferOwnership : (sharing) Transferred ownership of shared
8591 // folder to another member
8592 SharedFolderTransferOwnership *SharedFolderTransferOwnershipType `json:"shared_folder_transfer_ownership,omitempty"`
8593 // SharedFolderUnmount : (sharing) Deleted shared folder from Dropbox
8594 SharedFolderUnmount *SharedFolderUnmountType `json:"shared_folder_unmount,omitempty"`
8595 // SharedLinkAddExpiry : (sharing) Added shared link expiration date
8596 SharedLinkAddExpiry *SharedLinkAddExpiryType `json:"shared_link_add_expiry,omitempty"`
8597 // SharedLinkChangeExpiry : (sharing) Changed shared link expiration date
8598 SharedLinkChangeExpiry *SharedLinkChangeExpiryType `json:"shared_link_change_expiry,omitempty"`
8599 // SharedLinkChangeVisibility : (sharing) Changed visibility of shared link
8600 SharedLinkChangeVisibility *SharedLinkChangeVisibilityType `json:"shared_link_change_visibility,omitempty"`
8601 // SharedLinkCopy : (sharing) Added file/folder to Dropbox from shared link
8602 SharedLinkCopy *SharedLinkCopyType `json:"shared_link_copy,omitempty"`
8603 // SharedLinkCreate : (sharing) Created shared link
8604 SharedLinkCreate *SharedLinkCreateType `json:"shared_link_create,omitempty"`
8605 // SharedLinkDisable : (sharing) Removed shared link
8606 SharedLinkDisable *SharedLinkDisableType `json:"shared_link_disable,omitempty"`
8607 // SharedLinkDownload : (sharing) Downloaded file/folder from shared link
8608 SharedLinkDownload *SharedLinkDownloadType `json:"shared_link_download,omitempty"`
8609 // SharedLinkRemoveExpiry : (sharing) Removed shared link expiration date
8610 SharedLinkRemoveExpiry *SharedLinkRemoveExpiryType `json:"shared_link_remove_expiry,omitempty"`
8611 // SharedLinkSettingsAddExpiration : (sharing) Added an expiration date to
8612 // the shared link
8613 SharedLinkSettingsAddExpiration *SharedLinkSettingsAddExpirationType `json:"shared_link_settings_add_expiration,omitempty"`
8614 // SharedLinkSettingsAddPassword : (sharing) Added a password to the shared
8615 // link
8616 SharedLinkSettingsAddPassword *SharedLinkSettingsAddPasswordType `json:"shared_link_settings_add_password,omitempty"`
8617 // SharedLinkSettingsAllowDownloadDisabled : (sharing) Disabled downloads
8618 SharedLinkSettingsAllowDownloadDisabled *SharedLinkSettingsAllowDownloadDisabledType `json:"shared_link_settings_allow_download_disabled,omitempty"`
8619 // SharedLinkSettingsAllowDownloadEnabled : (sharing) Enabled downloads
8620 SharedLinkSettingsAllowDownloadEnabled *SharedLinkSettingsAllowDownloadEnabledType `json:"shared_link_settings_allow_download_enabled,omitempty"`
8621 // SharedLinkSettingsChangeAudience : (sharing) Changed the audience of the
8622 // shared link
8623 SharedLinkSettingsChangeAudience *SharedLinkSettingsChangeAudienceType `json:"shared_link_settings_change_audience,omitempty"`
8624 // SharedLinkSettingsChangeExpiration : (sharing) Changed the expiration
8625 // date of the shared link
8626 SharedLinkSettingsChangeExpiration *SharedLinkSettingsChangeExpirationType `json:"shared_link_settings_change_expiration,omitempty"`
8627 // SharedLinkSettingsChangePassword : (sharing) Changed the password of the
8628 // shared link
8629 SharedLinkSettingsChangePassword *SharedLinkSettingsChangePasswordType `json:"shared_link_settings_change_password,omitempty"`
8630 // SharedLinkSettingsRemoveExpiration : (sharing) Removed the expiration
8631 // date from the shared link
8632 SharedLinkSettingsRemoveExpiration *SharedLinkSettingsRemoveExpirationType `json:"shared_link_settings_remove_expiration,omitempty"`
8633 // SharedLinkSettingsRemovePassword : (sharing) Removed the password from
8634 // the shared link
8635 SharedLinkSettingsRemovePassword *SharedLinkSettingsRemovePasswordType `json:"shared_link_settings_remove_password,omitempty"`
8636 // SharedLinkShare : (sharing) Added members as audience of shared link
8637 SharedLinkShare *SharedLinkShareType `json:"shared_link_share,omitempty"`
8638 // SharedLinkView : (sharing) Opened shared link
8639 SharedLinkView *SharedLinkViewType `json:"shared_link_view,omitempty"`
8640 // SharedNoteOpened : (sharing) Opened shared Paper doc (deprecated, no
8641 // longer logged)
8642 SharedNoteOpened *SharedNoteOpenedType `json:"shared_note_opened,omitempty"`
8643 // ShmodelDisableDownloads : (sharing) Disabled downloads for link
8644 // (deprecated, no longer logged)
8645 ShmodelDisableDownloads *ShmodelDisableDownloadsType `json:"shmodel_disable_downloads,omitempty"`
8646 // ShmodelEnableDownloads : (sharing) Enabled downloads for link
8647 // (deprecated, no longer logged)
8648 ShmodelEnableDownloads *ShmodelEnableDownloadsType `json:"shmodel_enable_downloads,omitempty"`
8649 // ShmodelGroupShare : (sharing) Shared link with group (deprecated, no
8650 // longer logged)
8651 ShmodelGroupShare *ShmodelGroupShareType `json:"shmodel_group_share,omitempty"`
8652 // ShowcaseAccessGranted : (showcase) Granted access to showcase
8653 ShowcaseAccessGranted *ShowcaseAccessGrantedType `json:"showcase_access_granted,omitempty"`
8654 // ShowcaseAddMember : (showcase) Added member to showcase
8655 ShowcaseAddMember *ShowcaseAddMemberType `json:"showcase_add_member,omitempty"`
8656 // ShowcaseArchived : (showcase) Archived showcase
8657 ShowcaseArchived *ShowcaseArchivedType `json:"showcase_archived,omitempty"`
8658 // ShowcaseCreated : (showcase) Created showcase
8659 ShowcaseCreated *ShowcaseCreatedType `json:"showcase_created,omitempty"`
8660 // ShowcaseDeleteComment : (showcase) Deleted showcase comment
8661 ShowcaseDeleteComment *ShowcaseDeleteCommentType `json:"showcase_delete_comment,omitempty"`
8662 // ShowcaseEdited : (showcase) Edited showcase
8663 ShowcaseEdited *ShowcaseEditedType `json:"showcase_edited,omitempty"`
8664 // ShowcaseEditComment : (showcase) Edited showcase comment
8665 ShowcaseEditComment *ShowcaseEditCommentType `json:"showcase_edit_comment,omitempty"`
8666 // ShowcaseFileAdded : (showcase) Added file to showcase
8667 ShowcaseFileAdded *ShowcaseFileAddedType `json:"showcase_file_added,omitempty"`
8668 // ShowcaseFileDownload : (showcase) Downloaded file from showcase
8669 ShowcaseFileDownload *ShowcaseFileDownloadType `json:"showcase_file_download,omitempty"`
8670 // ShowcaseFileRemoved : (showcase) Removed file from showcase
8671 ShowcaseFileRemoved *ShowcaseFileRemovedType `json:"showcase_file_removed,omitempty"`
8672 // ShowcaseFileView : (showcase) Viewed file in showcase
8673 ShowcaseFileView *ShowcaseFileViewType `json:"showcase_file_view,omitempty"`
8674 // ShowcasePermanentlyDeleted : (showcase) Permanently deleted showcase
8675 ShowcasePermanentlyDeleted *ShowcasePermanentlyDeletedType `json:"showcase_permanently_deleted,omitempty"`
8676 // ShowcasePostComment : (showcase) Added showcase comment
8677 ShowcasePostComment *ShowcasePostCommentType `json:"showcase_post_comment,omitempty"`
8678 // ShowcaseRemoveMember : (showcase) Removed member from showcase
8679 ShowcaseRemoveMember *ShowcaseRemoveMemberType `json:"showcase_remove_member,omitempty"`
8680 // ShowcaseRenamed : (showcase) Renamed showcase
8681 ShowcaseRenamed *ShowcaseRenamedType `json:"showcase_renamed,omitempty"`
8682 // ShowcaseRequestAccess : (showcase) Requested access to showcase
8683 ShowcaseRequestAccess *ShowcaseRequestAccessType `json:"showcase_request_access,omitempty"`
8684 // ShowcaseResolveComment : (showcase) Resolved showcase comment
8685 ShowcaseResolveComment *ShowcaseResolveCommentType `json:"showcase_resolve_comment,omitempty"`
8686 // ShowcaseRestored : (showcase) Unarchived showcase
8687 ShowcaseRestored *ShowcaseRestoredType `json:"showcase_restored,omitempty"`
8688 // ShowcaseTrashed : (showcase) Deleted showcase
8689 ShowcaseTrashed *ShowcaseTrashedType `json:"showcase_trashed,omitempty"`
8690 // ShowcaseTrashedDeprecated : (showcase) Deleted showcase (old version)
8691 // (deprecated, replaced by 'Deleted showcase')
8692 ShowcaseTrashedDeprecated *ShowcaseTrashedDeprecatedType `json:"showcase_trashed_deprecated,omitempty"`
8693 // ShowcaseUnresolveComment : (showcase) Unresolved showcase comment
8694 ShowcaseUnresolveComment *ShowcaseUnresolveCommentType `json:"showcase_unresolve_comment,omitempty"`
8695 // ShowcaseUntrashed : (showcase) Restored showcase
8696 ShowcaseUntrashed *ShowcaseUntrashedType `json:"showcase_untrashed,omitempty"`
8697 // ShowcaseUntrashedDeprecated : (showcase) Restored showcase (old version)
8698 // (deprecated, replaced by 'Restored showcase')
8699 ShowcaseUntrashedDeprecated *ShowcaseUntrashedDeprecatedType `json:"showcase_untrashed_deprecated,omitempty"`
8700 // ShowcaseView : (showcase) Viewed showcase
8701 ShowcaseView *ShowcaseViewType `json:"showcase_view,omitempty"`
8702 // SsoAddCert : (sso) Added X.509 certificate for SSO
8703 SsoAddCert *SsoAddCertType `json:"sso_add_cert,omitempty"`
8704 // SsoAddLoginUrl : (sso) Added sign-in URL for SSO
8705 SsoAddLoginUrl *SsoAddLoginUrlType `json:"sso_add_login_url,omitempty"`
8706 // SsoAddLogoutUrl : (sso) Added sign-out URL for SSO
8707 SsoAddLogoutUrl *SsoAddLogoutUrlType `json:"sso_add_logout_url,omitempty"`
8708 // SsoChangeCert : (sso) Changed X.509 certificate for SSO
8709 SsoChangeCert *SsoChangeCertType `json:"sso_change_cert,omitempty"`
8710 // SsoChangeLoginUrl : (sso) Changed sign-in URL for SSO
8711 SsoChangeLoginUrl *SsoChangeLoginUrlType `json:"sso_change_login_url,omitempty"`
8712 // SsoChangeLogoutUrl : (sso) Changed sign-out URL for SSO
8713 SsoChangeLogoutUrl *SsoChangeLogoutUrlType `json:"sso_change_logout_url,omitempty"`
8714 // SsoChangeSamlIdentityMode : (sso) Changed SAML identity mode for SSO
8715 SsoChangeSamlIdentityMode *SsoChangeSamlIdentityModeType `json:"sso_change_saml_identity_mode,omitempty"`
8716 // SsoRemoveCert : (sso) Removed X.509 certificate for SSO
8717 SsoRemoveCert *SsoRemoveCertType `json:"sso_remove_cert,omitempty"`
8718 // SsoRemoveLoginUrl : (sso) Removed sign-in URL for SSO
8719 SsoRemoveLoginUrl *SsoRemoveLoginUrlType `json:"sso_remove_login_url,omitempty"`
8720 // SsoRemoveLogoutUrl : (sso) Removed sign-out URL for SSO
8721 SsoRemoveLogoutUrl *SsoRemoveLogoutUrlType `json:"sso_remove_logout_url,omitempty"`
8722 // TeamFolderChangeStatus : (team_folders) Changed archival status of team
8723 // folder
8724 TeamFolderChangeStatus *TeamFolderChangeStatusType `json:"team_folder_change_status,omitempty"`
8725 // TeamFolderCreate : (team_folders) Created team folder in active status
8726 TeamFolderCreate *TeamFolderCreateType `json:"team_folder_create,omitempty"`
8727 // TeamFolderDowngrade : (team_folders) Downgraded team folder to regular
8728 // shared folder
8729 TeamFolderDowngrade *TeamFolderDowngradeType `json:"team_folder_downgrade,omitempty"`
8730 // TeamFolderPermanentlyDelete : (team_folders) Permanently deleted archived
8731 // team folder
8732 TeamFolderPermanentlyDelete *TeamFolderPermanentlyDeleteType `json:"team_folder_permanently_delete,omitempty"`
8733 // TeamFolderRename : (team_folders) Renamed active/archived team folder
8734 TeamFolderRename *TeamFolderRenameType `json:"team_folder_rename,omitempty"`
8735 // TeamSelectiveSyncSettingsChanged : (team_folders) Changed sync default
8736 TeamSelectiveSyncSettingsChanged *TeamSelectiveSyncSettingsChangedType `json:"team_selective_sync_settings_changed,omitempty"`
8737 // AccountCaptureChangePolicy : (team_policies) Changed account capture
8738 // setting on team domain
8739 AccountCaptureChangePolicy *AccountCaptureChangePolicyType `json:"account_capture_change_policy,omitempty"`
8740 // AllowDownloadDisabled : (team_policies) Disabled downloads (deprecated,
8741 // no longer logged)
8742 AllowDownloadDisabled *AllowDownloadDisabledType `json:"allow_download_disabled,omitempty"`
8743 // AllowDownloadEnabled : (team_policies) Enabled downloads (deprecated, no
8744 // longer logged)
8745 AllowDownloadEnabled *AllowDownloadEnabledType `json:"allow_download_enabled,omitempty"`
8746 // AppPermissionsChanged : (team_policies) Changed app permissions
8747 AppPermissionsChanged *AppPermissionsChangedType `json:"app_permissions_changed,omitempty"`
8748 // CameraUploadsPolicyChanged : (team_policies) Changed camera uploads
8749 // setting for team
8750 CameraUploadsPolicyChanged *CameraUploadsPolicyChangedType `json:"camera_uploads_policy_changed,omitempty"`
8751 // ClassificationChangePolicy : (team_policies) Changed classification
8752 // policy for team
8753 ClassificationChangePolicy *ClassificationChangePolicyType `json:"classification_change_policy,omitempty"`
8754 // ComputerBackupPolicyChanged : (team_policies) Changed computer backup
8755 // policy for team
8756 ComputerBackupPolicyChanged *ComputerBackupPolicyChangedType `json:"computer_backup_policy_changed,omitempty"`
8757 // ContentAdministrationPolicyChanged : (team_policies) Changed content
8758 // management setting
8759 ContentAdministrationPolicyChanged *ContentAdministrationPolicyChangedType `json:"content_administration_policy_changed,omitempty"`
8760 // DataPlacementRestrictionChangePolicy : (team_policies) Set restrictions
8761 // on data center locations where team data resides
8762 DataPlacementRestrictionChangePolicy *DataPlacementRestrictionChangePolicyType `json:"data_placement_restriction_change_policy,omitempty"`
8763 // DataPlacementRestrictionSatisfyPolicy : (team_policies) Completed
8764 // restrictions on data center locations where team data resides
8765 DataPlacementRestrictionSatisfyPolicy *DataPlacementRestrictionSatisfyPolicyType `json:"data_placement_restriction_satisfy_policy,omitempty"`
8766 // DeviceApprovalsAddException : (team_policies) Added members to device
8767 // approvals exception list
8768 DeviceApprovalsAddException *DeviceApprovalsAddExceptionType `json:"device_approvals_add_exception,omitempty"`
8769 // DeviceApprovalsChangeDesktopPolicy : (team_policies) Set/removed limit on
8770 // number of computers member can link to team Dropbox account
8771 DeviceApprovalsChangeDesktopPolicy *DeviceApprovalsChangeDesktopPolicyType `json:"device_approvals_change_desktop_policy,omitempty"`
8772 // DeviceApprovalsChangeMobilePolicy : (team_policies) Set/removed limit on
8773 // number of mobile devices member can link to team Dropbox account
8774 DeviceApprovalsChangeMobilePolicy *DeviceApprovalsChangeMobilePolicyType `json:"device_approvals_change_mobile_policy,omitempty"`
8775 // DeviceApprovalsChangeOverageAction : (team_policies) Changed device
8776 // approvals setting when member is over limit
8777 DeviceApprovalsChangeOverageAction *DeviceApprovalsChangeOverageActionType `json:"device_approvals_change_overage_action,omitempty"`
8778 // DeviceApprovalsChangeUnlinkAction : (team_policies) Changed device
8779 // approvals setting when member unlinks approved device
8780 DeviceApprovalsChangeUnlinkAction *DeviceApprovalsChangeUnlinkActionType `json:"device_approvals_change_unlink_action,omitempty"`
8781 // DeviceApprovalsRemoveException : (team_policies) Removed members from
8782 // device approvals exception list
8783 DeviceApprovalsRemoveException *DeviceApprovalsRemoveExceptionType `json:"device_approvals_remove_exception,omitempty"`
8784 // DirectoryRestrictionsAddMembers : (team_policies) Added members to
8785 // directory restrictions list
8786 DirectoryRestrictionsAddMembers *DirectoryRestrictionsAddMembersType `json:"directory_restrictions_add_members,omitempty"`
8787 // DirectoryRestrictionsRemoveMembers : (team_policies) Removed members from
8788 // directory restrictions list
8789 DirectoryRestrictionsRemoveMembers *DirectoryRestrictionsRemoveMembersType `json:"directory_restrictions_remove_members,omitempty"`
8790 // EmmAddException : (team_policies) Added members to EMM exception list
8791 EmmAddException *EmmAddExceptionType `json:"emm_add_exception,omitempty"`
8792 // EmmChangePolicy : (team_policies) Enabled/disabled enterprise mobility
8793 // management for members
8794 EmmChangePolicy *EmmChangePolicyType `json:"emm_change_policy,omitempty"`
8795 // EmmRemoveException : (team_policies) Removed members from EMM exception
8796 // list
8797 EmmRemoveException *EmmRemoveExceptionType `json:"emm_remove_exception,omitempty"`
8798 // ExtendedVersionHistoryChangePolicy : (team_policies) Accepted/opted out
8799 // of extended version history
8800 ExtendedVersionHistoryChangePolicy *ExtendedVersionHistoryChangePolicyType `json:"extended_version_history_change_policy,omitempty"`
8801 // FileCommentsChangePolicy : (team_policies) Enabled/disabled commenting on
8802 // team files
8803 FileCommentsChangePolicy *FileCommentsChangePolicyType `json:"file_comments_change_policy,omitempty"`
8804 // FileLockingPolicyChanged : (team_policies) Changed file locking policy
8805 // for team
8806 FileLockingPolicyChanged *FileLockingPolicyChangedType `json:"file_locking_policy_changed,omitempty"`
8807 // FileRequestsChangePolicy : (team_policies) Enabled/disabled file requests
8808 FileRequestsChangePolicy *FileRequestsChangePolicyType `json:"file_requests_change_policy,omitempty"`
8809 // FileRequestsEmailsEnabled : (team_policies) Enabled file request emails
8810 // for everyone (deprecated, no longer logged)
8811 FileRequestsEmailsEnabled *FileRequestsEmailsEnabledType `json:"file_requests_emails_enabled,omitempty"`
8812 // FileRequestsEmailsRestrictedToTeamOnly : (team_policies) Enabled file
8813 // request emails for team (deprecated, no longer logged)
8814 FileRequestsEmailsRestrictedToTeamOnly *FileRequestsEmailsRestrictedToTeamOnlyType `json:"file_requests_emails_restricted_to_team_only,omitempty"`
8815 // FileTransfersPolicyChanged : (team_policies) Changed file transfers
8816 // policy for team
8817 FileTransfersPolicyChanged *FileTransfersPolicyChangedType `json:"file_transfers_policy_changed,omitempty"`
8818 // GoogleSsoChangePolicy : (team_policies) Enabled/disabled Google single
8819 // sign-on for team
8820 GoogleSsoChangePolicy *GoogleSsoChangePolicyType `json:"google_sso_change_policy,omitempty"`
8821 // GroupUserManagementChangePolicy : (team_policies) Changed who can create
8822 // groups
8823 GroupUserManagementChangePolicy *GroupUserManagementChangePolicyType `json:"group_user_management_change_policy,omitempty"`
8824 // IntegrationPolicyChanged : (team_policies) Changed integration policy for
8825 // team
8826 IntegrationPolicyChanged *IntegrationPolicyChangedType `json:"integration_policy_changed,omitempty"`
8827 // InviteAcceptanceEmailPolicyChanged : (team_policies) Changed invite
8828 // accept email policy for team
8829 InviteAcceptanceEmailPolicyChanged *InviteAcceptanceEmailPolicyChangedType `json:"invite_acceptance_email_policy_changed,omitempty"`
8830 // MemberRequestsChangePolicy : (team_policies) Changed whether users can
8831 // find team when not invited
8832 MemberRequestsChangePolicy *MemberRequestsChangePolicyType `json:"member_requests_change_policy,omitempty"`
8833 // MemberSendInvitePolicyChanged : (team_policies) Changed member send
8834 // invite policy for team
8835 MemberSendInvitePolicyChanged *MemberSendInvitePolicyChangedType `json:"member_send_invite_policy_changed,omitempty"`
8836 // MemberSpaceLimitsAddException : (team_policies) Added members to member
8837 // space limit exception list
8838 MemberSpaceLimitsAddException *MemberSpaceLimitsAddExceptionType `json:"member_space_limits_add_exception,omitempty"`
8839 // MemberSpaceLimitsChangeCapsTypePolicy : (team_policies) Changed member
8840 // space limit type for team
8841 MemberSpaceLimitsChangeCapsTypePolicy *MemberSpaceLimitsChangeCapsTypePolicyType `json:"member_space_limits_change_caps_type_policy,omitempty"`
8842 // MemberSpaceLimitsChangePolicy : (team_policies) Changed team default
8843 // member space limit
8844 MemberSpaceLimitsChangePolicy *MemberSpaceLimitsChangePolicyType `json:"member_space_limits_change_policy,omitempty"`
8845 // MemberSpaceLimitsRemoveException : (team_policies) Removed members from
8846 // member space limit exception list
8847 MemberSpaceLimitsRemoveException *MemberSpaceLimitsRemoveExceptionType `json:"member_space_limits_remove_exception,omitempty"`
8848 // MemberSuggestionsChangePolicy : (team_policies) Enabled/disabled option
8849 // for team members to suggest people to add to team
8850 MemberSuggestionsChangePolicy *MemberSuggestionsChangePolicyType `json:"member_suggestions_change_policy,omitempty"`
8851 // MicrosoftOfficeAddinChangePolicy : (team_policies) Enabled/disabled
8852 // Microsoft Office add-in
8853 MicrosoftOfficeAddinChangePolicy *MicrosoftOfficeAddinChangePolicyType `json:"microsoft_office_addin_change_policy,omitempty"`
8854 // NetworkControlChangePolicy : (team_policies) Enabled/disabled network
8855 // control
8856 NetworkControlChangePolicy *NetworkControlChangePolicyType `json:"network_control_change_policy,omitempty"`
8857 // PaperChangeDeploymentPolicy : (team_policies) Changed whether Dropbox
8858 // Paper, when enabled, is deployed to all members or to specific members
8859 PaperChangeDeploymentPolicy *PaperChangeDeploymentPolicyType `json:"paper_change_deployment_policy,omitempty"`
8860 // PaperChangeMemberLinkPolicy : (team_policies) Changed whether non-members
8861 // can view Paper docs with link (deprecated, no longer logged)
8862 PaperChangeMemberLinkPolicy *PaperChangeMemberLinkPolicyType `json:"paper_change_member_link_policy,omitempty"`
8863 // PaperChangeMemberPolicy : (team_policies) Changed whether members can
8864 // share Paper docs outside team, and if docs are accessible only by team
8865 // members or anyone by default
8866 PaperChangeMemberPolicy *PaperChangeMemberPolicyType `json:"paper_change_member_policy,omitempty"`
8867 // PaperChangePolicy : (team_policies) Enabled/disabled Dropbox Paper for
8868 // team
8869 PaperChangePolicy *PaperChangePolicyType `json:"paper_change_policy,omitempty"`
8870 // PaperDefaultFolderPolicyChanged : (team_policies) Changed Paper Default
8871 // Folder Policy setting for team
8872 PaperDefaultFolderPolicyChanged *PaperDefaultFolderPolicyChangedType `json:"paper_default_folder_policy_changed,omitempty"`
8873 // PaperDesktopPolicyChanged : (team_policies) Enabled/disabled Paper
8874 // Desktop for team
8875 PaperDesktopPolicyChanged *PaperDesktopPolicyChangedType `json:"paper_desktop_policy_changed,omitempty"`
8876 // PaperEnabledUsersGroupAddition : (team_policies) Added users to
8877 // Paper-enabled users list
8878 PaperEnabledUsersGroupAddition *PaperEnabledUsersGroupAdditionType `json:"paper_enabled_users_group_addition,omitempty"`
8879 // PaperEnabledUsersGroupRemoval : (team_policies) Removed users from
8880 // Paper-enabled users list
8881 PaperEnabledUsersGroupRemoval *PaperEnabledUsersGroupRemovalType `json:"paper_enabled_users_group_removal,omitempty"`
8882 // PasswordStrengthRequirementsChangePolicy : (team_policies) Changed team
8883 // password strength requirements
8884 PasswordStrengthRequirementsChangePolicy *PasswordStrengthRequirementsChangePolicyType `json:"password_strength_requirements_change_policy,omitempty"`
8885 // PermanentDeleteChangePolicy : (team_policies) Enabled/disabled ability of
8886 // team members to permanently delete content
8887 PermanentDeleteChangePolicy *PermanentDeleteChangePolicyType `json:"permanent_delete_change_policy,omitempty"`
8888 // ResellerSupportChangePolicy : (team_policies) Enabled/disabled reseller
8889 // support
8890 ResellerSupportChangePolicy *ResellerSupportChangePolicyType `json:"reseller_support_change_policy,omitempty"`
8891 // RewindPolicyChanged : (team_policies) Changed Rewind policy for team
8892 RewindPolicyChanged *RewindPolicyChangedType `json:"rewind_policy_changed,omitempty"`
8893 // SendForSignaturePolicyChanged : (team_policies) Changed send for
8894 // signature policy for team
8895 SendForSignaturePolicyChanged *SendForSignaturePolicyChangedType `json:"send_for_signature_policy_changed,omitempty"`
8896 // SharingChangeFolderJoinPolicy : (team_policies) Changed whether team
8897 // members can join shared folders owned outside team
8898 SharingChangeFolderJoinPolicy *SharingChangeFolderJoinPolicyType `json:"sharing_change_folder_join_policy,omitempty"`
8899 // SharingChangeLinkAllowChangeExpirationPolicy : (team_policies) Changed
8900 // the password requirement for the links shared outside of the team
8901 SharingChangeLinkAllowChangeExpirationPolicy *SharingChangeLinkAllowChangeExpirationPolicyType `json:"sharing_change_link_allow_change_expiration_policy,omitempty"`
8902 // SharingChangeLinkDefaultExpirationPolicy : (team_policies) Changed the
8903 // default expiration for the links shared outside of the team
8904 SharingChangeLinkDefaultExpirationPolicy *SharingChangeLinkDefaultExpirationPolicyType `json:"sharing_change_link_default_expiration_policy,omitempty"`
8905 // SharingChangeLinkEnforcePasswordPolicy : (team_policies) Changed the
8906 // allow remove or change expiration policy for the links shared outside of
8907 // the team
8908 SharingChangeLinkEnforcePasswordPolicy *SharingChangeLinkEnforcePasswordPolicyType `json:"sharing_change_link_enforce_password_policy,omitempty"`
8909 // SharingChangeLinkPolicy : (team_policies) Changed whether members can
8910 // share links outside team, and if links are accessible only by team
8911 // members or anyone by default
8912 SharingChangeLinkPolicy *SharingChangeLinkPolicyType `json:"sharing_change_link_policy,omitempty"`
8913 // SharingChangeMemberPolicy : (team_policies) Changed whether members can
8914 // share files/folders outside team
8915 SharingChangeMemberPolicy *SharingChangeMemberPolicyType `json:"sharing_change_member_policy,omitempty"`
8916 // ShowcaseChangeDownloadPolicy : (team_policies) Enabled/disabled
8917 // downloading files from Dropbox Showcase for team
8918 ShowcaseChangeDownloadPolicy *ShowcaseChangeDownloadPolicyType `json:"showcase_change_download_policy,omitempty"`
8919 // ShowcaseChangeEnabledPolicy : (team_policies) Enabled/disabled Dropbox
8920 // Showcase for team
8921 ShowcaseChangeEnabledPolicy *ShowcaseChangeEnabledPolicyType `json:"showcase_change_enabled_policy,omitempty"`
8922 // ShowcaseChangeExternalSharingPolicy : (team_policies) Enabled/disabled
8923 // sharing Dropbox Showcase externally for team
8924 ShowcaseChangeExternalSharingPolicy *ShowcaseChangeExternalSharingPolicyType `json:"showcase_change_external_sharing_policy,omitempty"`
8925 // SmarterSmartSyncPolicyChanged : (team_policies) Changed automatic Smart
8926 // Sync setting for team
8927 SmarterSmartSyncPolicyChanged *SmarterSmartSyncPolicyChangedType `json:"smarter_smart_sync_policy_changed,omitempty"`
8928 // SmartSyncChangePolicy : (team_policies) Changed default Smart Sync
8929 // setting for team members
8930 SmartSyncChangePolicy *SmartSyncChangePolicyType `json:"smart_sync_change_policy,omitempty"`
8931 // SmartSyncNotOptOut : (team_policies) Opted team into Smart Sync
8932 SmartSyncNotOptOut *SmartSyncNotOptOutType `json:"smart_sync_not_opt_out,omitempty"`
8933 // SmartSyncOptOut : (team_policies) Opted team out of Smart Sync
8934 SmartSyncOptOut *SmartSyncOptOutType `json:"smart_sync_opt_out,omitempty"`
8935 // SsoChangePolicy : (team_policies) Changed single sign-on setting for team
8936 SsoChangePolicy *SsoChangePolicyType `json:"sso_change_policy,omitempty"`
8937 // TeamBrandingPolicyChanged : (team_policies) Changed team branding policy
8938 // for team
8939 TeamBrandingPolicyChanged *TeamBrandingPolicyChangedType `json:"team_branding_policy_changed,omitempty"`
8940 // TeamExtensionsPolicyChanged : (team_policies) Changed App Integrations
8941 // setting for team
8942 TeamExtensionsPolicyChanged *TeamExtensionsPolicyChangedType `json:"team_extensions_policy_changed,omitempty"`
8943 // TeamSelectiveSyncPolicyChanged : (team_policies) Enabled/disabled Team
8944 // Selective Sync for team
8945 TeamSelectiveSyncPolicyChanged *TeamSelectiveSyncPolicyChangedType `json:"team_selective_sync_policy_changed,omitempty"`
8946 // TeamSharingWhitelistSubjectsChanged : (team_policies) Edited the approved
8947 // list for sharing externally
8948 TeamSharingWhitelistSubjectsChanged *TeamSharingWhitelistSubjectsChangedType `json:"team_sharing_whitelist_subjects_changed,omitempty"`
8949 // TfaAddException : (team_policies) Added members to two factor
8950 // authentication exception list
8951 TfaAddException *TfaAddExceptionType `json:"tfa_add_exception,omitempty"`
8952 // TfaChangePolicy : (team_policies) Changed two-step verification setting
8953 // for team
8954 TfaChangePolicy *TfaChangePolicyType `json:"tfa_change_policy,omitempty"`
8955 // TfaRemoveException : (team_policies) Removed members from two factor
8956 // authentication exception list
8957 TfaRemoveException *TfaRemoveExceptionType `json:"tfa_remove_exception,omitempty"`
8958 // TwoAccountChangePolicy : (team_policies) Enabled/disabled option for
8959 // members to link personal Dropbox account and team account to same
8960 // computer
8961 TwoAccountChangePolicy *TwoAccountChangePolicyType `json:"two_account_change_policy,omitempty"`
8962 // ViewerInfoPolicyChanged : (team_policies) Changed team policy for viewer
8963 // info
8964 ViewerInfoPolicyChanged *ViewerInfoPolicyChangedType `json:"viewer_info_policy_changed,omitempty"`
8965 // WatermarkingPolicyChanged : (team_policies) Changed watermarking policy
8966 // for team
8967 WatermarkingPolicyChanged *WatermarkingPolicyChangedType `json:"watermarking_policy_changed,omitempty"`
8968 // WebSessionsChangeActiveSessionLimit : (team_policies) Changed limit on
8969 // active sessions per member
8970 WebSessionsChangeActiveSessionLimit *WebSessionsChangeActiveSessionLimitType `json:"web_sessions_change_active_session_limit,omitempty"`
8971 // WebSessionsChangeFixedLengthPolicy : (team_policies) Changed how long
8972 // members can stay signed in to Dropbox.com
8973 WebSessionsChangeFixedLengthPolicy *WebSessionsChangeFixedLengthPolicyType `json:"web_sessions_change_fixed_length_policy,omitempty"`
8974 // WebSessionsChangeIdleLengthPolicy : (team_policies) Changed how long team
8975 // members can be idle while signed in to Dropbox.com
8976 WebSessionsChangeIdleLengthPolicy *WebSessionsChangeIdleLengthPolicyType `json:"web_sessions_change_idle_length_policy,omitempty"`
8977 // TeamMergeFrom : (team_profile) Merged another team into this team
8978 TeamMergeFrom *TeamMergeFromType `json:"team_merge_from,omitempty"`
8979 // TeamMergeTo : (team_profile) Merged this team into another team
8980 TeamMergeTo *TeamMergeToType `json:"team_merge_to,omitempty"`
8981 // TeamProfileAddBackground : (team_profile) Added team background to
8982 // display on shared link headers
8983 TeamProfileAddBackground *TeamProfileAddBackgroundType `json:"team_profile_add_background,omitempty"`
8984 // TeamProfileAddLogo : (team_profile) Added team logo to display on shared
8985 // link headers
8986 TeamProfileAddLogo *TeamProfileAddLogoType `json:"team_profile_add_logo,omitempty"`
8987 // TeamProfileChangeBackground : (team_profile) Changed team background
8988 // displayed on shared link headers
8989 TeamProfileChangeBackground *TeamProfileChangeBackgroundType `json:"team_profile_change_background,omitempty"`
8990 // TeamProfileChangeDefaultLanguage : (team_profile) Changed default
8991 // language for team
8992 TeamProfileChangeDefaultLanguage *TeamProfileChangeDefaultLanguageType `json:"team_profile_change_default_language,omitempty"`
8993 // TeamProfileChangeLogo : (team_profile) Changed team logo displayed on
8994 // shared link headers
8995 TeamProfileChangeLogo *TeamProfileChangeLogoType `json:"team_profile_change_logo,omitempty"`
8996 // TeamProfileChangeName : (team_profile) Changed team name
8997 TeamProfileChangeName *TeamProfileChangeNameType `json:"team_profile_change_name,omitempty"`
8998 // TeamProfileRemoveBackground : (team_profile) Removed team background
8999 // displayed on shared link headers
9000 TeamProfileRemoveBackground *TeamProfileRemoveBackgroundType `json:"team_profile_remove_background,omitempty"`
9001 // TeamProfileRemoveLogo : (team_profile) Removed team logo displayed on
9002 // shared link headers
9003 TeamProfileRemoveLogo *TeamProfileRemoveLogoType `json:"team_profile_remove_logo,omitempty"`
9004 // TfaAddBackupPhone : (tfa) Added backup phone for two-step verification
9005 TfaAddBackupPhone *TfaAddBackupPhoneType `json:"tfa_add_backup_phone,omitempty"`
9006 // TfaAddSecurityKey : (tfa) Added security key for two-step verification
9007 TfaAddSecurityKey *TfaAddSecurityKeyType `json:"tfa_add_security_key,omitempty"`
9008 // TfaChangeBackupPhone : (tfa) Changed backup phone for two-step
9009 // verification
9010 TfaChangeBackupPhone *TfaChangeBackupPhoneType `json:"tfa_change_backup_phone,omitempty"`
9011 // TfaChangeStatus : (tfa) Enabled/disabled/changed two-step verification
9012 // setting
9013 TfaChangeStatus *TfaChangeStatusType `json:"tfa_change_status,omitempty"`
9014 // TfaRemoveBackupPhone : (tfa) Removed backup phone for two-step
9015 // verification
9016 TfaRemoveBackupPhone *TfaRemoveBackupPhoneType `json:"tfa_remove_backup_phone,omitempty"`
9017 // TfaRemoveSecurityKey : (tfa) Removed security key for two-step
9018 // verification
9019 TfaRemoveSecurityKey *TfaRemoveSecurityKeyType `json:"tfa_remove_security_key,omitempty"`
9020 // TfaReset : (tfa) Reset two-step verification for team member
9021 TfaReset *TfaResetType `json:"tfa_reset,omitempty"`
9022 // ChangedEnterpriseAdminRole : (trusted_teams) Changed enterprise admin
9023 // role
9024 ChangedEnterpriseAdminRole *ChangedEnterpriseAdminRoleType `json:"changed_enterprise_admin_role,omitempty"`
9025 // ChangedEnterpriseConnectedTeamStatus : (trusted_teams) Changed
9026 // enterprise-connected team status
9027 ChangedEnterpriseConnectedTeamStatus *ChangedEnterpriseConnectedTeamStatusType `json:"changed_enterprise_connected_team_status,omitempty"`
9028 // EndedEnterpriseAdminSession : (trusted_teams) Ended enterprise admin
9029 // session
9030 EndedEnterpriseAdminSession *EndedEnterpriseAdminSessionType `json:"ended_enterprise_admin_session,omitempty"`
9031 // EndedEnterpriseAdminSessionDeprecated : (trusted_teams) Ended enterprise
9032 // admin session (deprecated, replaced by 'Ended enterprise admin session')
9033 EndedEnterpriseAdminSessionDeprecated *EndedEnterpriseAdminSessionDeprecatedType `json:"ended_enterprise_admin_session_deprecated,omitempty"`
9034 // EnterpriseSettingsLocking : (trusted_teams) Changed who can update a
9035 // setting
9036 EnterpriseSettingsLocking *EnterpriseSettingsLockingType `json:"enterprise_settings_locking,omitempty"`
9037 // GuestAdminChangeStatus : (trusted_teams) Changed guest team admin status
9038 GuestAdminChangeStatus *GuestAdminChangeStatusType `json:"guest_admin_change_status,omitempty"`
9039 // StartedEnterpriseAdminSession : (trusted_teams) Started enterprise admin
9040 // session
9041 StartedEnterpriseAdminSession *StartedEnterpriseAdminSessionType `json:"started_enterprise_admin_session,omitempty"`
9042 // TeamMergeRequestAccepted : (trusted_teams) Accepted a team merge request
9043 TeamMergeRequestAccepted *TeamMergeRequestAcceptedType `json:"team_merge_request_accepted,omitempty"`
9044 // TeamMergeRequestAcceptedShownToPrimaryTeam : (trusted_teams) Accepted a
9045 // team merge request (deprecated, replaced by 'Accepted a team merge
9046 // request')
9047 TeamMergeRequestAcceptedShownToPrimaryTeam *TeamMergeRequestAcceptedShownToPrimaryTeamType `json:"team_merge_request_accepted_shown_to_primary_team,omitempty"`
9048 // TeamMergeRequestAcceptedShownToSecondaryTeam : (trusted_teams) Accepted a
9049 // team merge request (deprecated, replaced by 'Accepted a team merge
9050 // request')
9051 TeamMergeRequestAcceptedShownToSecondaryTeam *TeamMergeRequestAcceptedShownToSecondaryTeamType `json:"team_merge_request_accepted_shown_to_secondary_team,omitempty"`
9052 // TeamMergeRequestAutoCanceled : (trusted_teams) Automatically canceled
9053 // team merge request
9054 TeamMergeRequestAutoCanceled *TeamMergeRequestAutoCanceledType `json:"team_merge_request_auto_canceled,omitempty"`
9055 // TeamMergeRequestCanceled : (trusted_teams) Canceled a team merge request
9056 TeamMergeRequestCanceled *TeamMergeRequestCanceledType `json:"team_merge_request_canceled,omitempty"`
9057 // TeamMergeRequestCanceledShownToPrimaryTeam : (trusted_teams) Canceled a
9058 // team merge request (deprecated, replaced by 'Canceled a team merge
9059 // request')
9060 TeamMergeRequestCanceledShownToPrimaryTeam *TeamMergeRequestCanceledShownToPrimaryTeamType `json:"team_merge_request_canceled_shown_to_primary_team,omitempty"`
9061 // TeamMergeRequestCanceledShownToSecondaryTeam : (trusted_teams) Canceled a
9062 // team merge request (deprecated, replaced by 'Canceled a team merge
9063 // request')
9064 TeamMergeRequestCanceledShownToSecondaryTeam *TeamMergeRequestCanceledShownToSecondaryTeamType `json:"team_merge_request_canceled_shown_to_secondary_team,omitempty"`
9065 // TeamMergeRequestExpired : (trusted_teams) Team merge request expired
9066 TeamMergeRequestExpired *TeamMergeRequestExpiredType `json:"team_merge_request_expired,omitempty"`
9067 // TeamMergeRequestExpiredShownToPrimaryTeam : (trusted_teams) Team merge
9068 // request expired (deprecated, replaced by 'Team merge request expired')
9069 TeamMergeRequestExpiredShownToPrimaryTeam *TeamMergeRequestExpiredShownToPrimaryTeamType `json:"team_merge_request_expired_shown_to_primary_team,omitempty"`
9070 // TeamMergeRequestExpiredShownToSecondaryTeam : (trusted_teams) Team merge
9071 // request expired (deprecated, replaced by 'Team merge request expired')
9072 TeamMergeRequestExpiredShownToSecondaryTeam *TeamMergeRequestExpiredShownToSecondaryTeamType `json:"team_merge_request_expired_shown_to_secondary_team,omitempty"`
9073 // TeamMergeRequestRejectedShownToPrimaryTeam : (trusted_teams) Rejected a
9074 // team merge request (deprecated, no longer logged)
9075 TeamMergeRequestRejectedShownToPrimaryTeam *TeamMergeRequestRejectedShownToPrimaryTeamType `json:"team_merge_request_rejected_shown_to_primary_team,omitempty"`
9076 // TeamMergeRequestRejectedShownToSecondaryTeam : (trusted_teams) Rejected a
9077 // team merge request (deprecated, no longer logged)
9078 TeamMergeRequestRejectedShownToSecondaryTeam *TeamMergeRequestRejectedShownToSecondaryTeamType `json:"team_merge_request_rejected_shown_to_secondary_team,omitempty"`
9079 // TeamMergeRequestReminder : (trusted_teams) Sent a team merge request
9080 // reminder
9081 TeamMergeRequestReminder *TeamMergeRequestReminderType `json:"team_merge_request_reminder,omitempty"`
9082 // TeamMergeRequestReminderShownToPrimaryTeam : (trusted_teams) Sent a team
9083 // merge request reminder (deprecated, replaced by 'Sent a team merge
9084 // request reminder')
9085 TeamMergeRequestReminderShownToPrimaryTeam *TeamMergeRequestReminderShownToPrimaryTeamType `json:"team_merge_request_reminder_shown_to_primary_team,omitempty"`
9086 // TeamMergeRequestReminderShownToSecondaryTeam : (trusted_teams) Sent a
9087 // team merge request reminder (deprecated, replaced by 'Sent a team merge
9088 // request reminder')
9089 TeamMergeRequestReminderShownToSecondaryTeam *TeamMergeRequestReminderShownToSecondaryTeamType `json:"team_merge_request_reminder_shown_to_secondary_team,omitempty"`
9090 // TeamMergeRequestRevoked : (trusted_teams) Canceled the team merge
9091 TeamMergeRequestRevoked *TeamMergeRequestRevokedType `json:"team_merge_request_revoked,omitempty"`
9092 // TeamMergeRequestSentShownToPrimaryTeam : (trusted_teams) Requested to
9093 // merge their Dropbox team into yours
9094 TeamMergeRequestSentShownToPrimaryTeam *TeamMergeRequestSentShownToPrimaryTeamType `json:"team_merge_request_sent_shown_to_primary_team,omitempty"`
9095 // TeamMergeRequestSentShownToSecondaryTeam : (trusted_teams) Requested to
9096 // merge your team into another Dropbox team
9097 TeamMergeRequestSentShownToSecondaryTeam *TeamMergeRequestSentShownToSecondaryTeamType `json:"team_merge_request_sent_shown_to_secondary_team,omitempty"`
9098 }
9099
9100 // Valid tag values for EventType
9101 const (
9102 EventTypeAdminAlertingAlertStateChanged = "admin_alerting_alert_state_changed"
9103 EventTypeAdminAlertingChangedAlertConfig = "admin_alerting_changed_alert_config"
9104 EventTypeAdminAlertingTriggeredAlert = "admin_alerting_triggered_alert"
9105 EventTypeAppBlockedByPermissions = "app_blocked_by_permissions"
9106 EventTypeAppLinkTeam = "app_link_team"
9107 EventTypeAppLinkUser = "app_link_user"
9108 EventTypeAppUnlinkTeam = "app_unlink_team"
9109 EventTypeAppUnlinkUser = "app_unlink_user"
9110 EventTypeIntegrationConnected = "integration_connected"
9111 EventTypeIntegrationDisconnected = "integration_disconnected"
9112 EventTypeFileAddComment = "file_add_comment"
9113 EventTypeFileChangeCommentSubscription = "file_change_comment_subscription"
9114 EventTypeFileDeleteComment = "file_delete_comment"
9115 EventTypeFileEditComment = "file_edit_comment"
9116 EventTypeFileLikeComment = "file_like_comment"
9117 EventTypeFileResolveComment = "file_resolve_comment"
9118 EventTypeFileUnlikeComment = "file_unlike_comment"
9119 EventTypeFileUnresolveComment = "file_unresolve_comment"
9120 EventTypeGovernancePolicyAddFolders = "governance_policy_add_folders"
9121 EventTypeGovernancePolicyAddFolderFailed = "governance_policy_add_folder_failed"
9122 EventTypeGovernancePolicyContentDisposed = "governance_policy_content_disposed"
9123 EventTypeGovernancePolicyCreate = "governance_policy_create"
9124 EventTypeGovernancePolicyDelete = "governance_policy_delete"
9125 EventTypeGovernancePolicyEditDetails = "governance_policy_edit_details"
9126 EventTypeGovernancePolicyEditDuration = "governance_policy_edit_duration"
9127 EventTypeGovernancePolicyExportCreated = "governance_policy_export_created"
9128 EventTypeGovernancePolicyExportRemoved = "governance_policy_export_removed"
9129 EventTypeGovernancePolicyRemoveFolders = "governance_policy_remove_folders"
9130 EventTypeGovernancePolicyReportCreated = "governance_policy_report_created"
9131 EventTypeGovernancePolicyZipPartDownloaded = "governance_policy_zip_part_downloaded"
9132 EventTypeLegalHoldsActivateAHold = "legal_holds_activate_a_hold"
9133 EventTypeLegalHoldsAddMembers = "legal_holds_add_members"
9134 EventTypeLegalHoldsChangeHoldDetails = "legal_holds_change_hold_details"
9135 EventTypeLegalHoldsChangeHoldName = "legal_holds_change_hold_name"
9136 EventTypeLegalHoldsExportAHold = "legal_holds_export_a_hold"
9137 EventTypeLegalHoldsExportCancelled = "legal_holds_export_cancelled"
9138 EventTypeLegalHoldsExportDownloaded = "legal_holds_export_downloaded"
9139 EventTypeLegalHoldsExportRemoved = "legal_holds_export_removed"
9140 EventTypeLegalHoldsReleaseAHold = "legal_holds_release_a_hold"
9141 EventTypeLegalHoldsRemoveMembers = "legal_holds_remove_members"
9142 EventTypeLegalHoldsReportAHold = "legal_holds_report_a_hold"
9143 EventTypeDeviceChangeIpDesktop = "device_change_ip_desktop"
9144 EventTypeDeviceChangeIpMobile = "device_change_ip_mobile"
9145 EventTypeDeviceChangeIpWeb = "device_change_ip_web"
9146 EventTypeDeviceDeleteOnUnlinkFail = "device_delete_on_unlink_fail"
9147 EventTypeDeviceDeleteOnUnlinkSuccess = "device_delete_on_unlink_success"
9148 EventTypeDeviceLinkFail = "device_link_fail"
9149 EventTypeDeviceLinkSuccess = "device_link_success"
9150 EventTypeDeviceManagementDisabled = "device_management_disabled"
9151 EventTypeDeviceManagementEnabled = "device_management_enabled"
9152 EventTypeDeviceSyncBackupStatusChanged = "device_sync_backup_status_changed"
9153 EventTypeDeviceUnlink = "device_unlink"
9154 EventTypeDropboxPasswordsExported = "dropbox_passwords_exported"
9155 EventTypeDropboxPasswordsNewDeviceEnrolled = "dropbox_passwords_new_device_enrolled"
9156 EventTypeEmmRefreshAuthToken = "emm_refresh_auth_token"
9157 EventTypeAccountCaptureChangeAvailability = "account_capture_change_availability"
9158 EventTypeAccountCaptureMigrateAccount = "account_capture_migrate_account"
9159 EventTypeAccountCaptureNotificationEmailsSent = "account_capture_notification_emails_sent"
9160 EventTypeAccountCaptureRelinquishAccount = "account_capture_relinquish_account"
9161 EventTypeDisabledDomainInvites = "disabled_domain_invites"
9162 EventTypeDomainInvitesApproveRequestToJoinTeam = "domain_invites_approve_request_to_join_team"
9163 EventTypeDomainInvitesDeclineRequestToJoinTeam = "domain_invites_decline_request_to_join_team"
9164 EventTypeDomainInvitesEmailExistingUsers = "domain_invites_email_existing_users"
9165 EventTypeDomainInvitesRequestToJoinTeam = "domain_invites_request_to_join_team"
9166 EventTypeDomainInvitesSetInviteNewUserPrefToNo = "domain_invites_set_invite_new_user_pref_to_no"
9167 EventTypeDomainInvitesSetInviteNewUserPrefToYes = "domain_invites_set_invite_new_user_pref_to_yes"
9168 EventTypeDomainVerificationAddDomainFail = "domain_verification_add_domain_fail"
9169 EventTypeDomainVerificationAddDomainSuccess = "domain_verification_add_domain_success"
9170 EventTypeDomainVerificationRemoveDomain = "domain_verification_remove_domain"
9171 EventTypeEnabledDomainInvites = "enabled_domain_invites"
9172 EventTypeApplyNamingConvention = "apply_naming_convention"
9173 EventTypeCreateFolder = "create_folder"
9174 EventTypeFileAdd = "file_add"
9175 EventTypeFileCopy = "file_copy"
9176 EventTypeFileDelete = "file_delete"
9177 EventTypeFileDownload = "file_download"
9178 EventTypeFileEdit = "file_edit"
9179 EventTypeFileGetCopyReference = "file_get_copy_reference"
9180 EventTypeFileLockingLockStatusChanged = "file_locking_lock_status_changed"
9181 EventTypeFileMove = "file_move"
9182 EventTypeFilePermanentlyDelete = "file_permanently_delete"
9183 EventTypeFilePreview = "file_preview"
9184 EventTypeFileRename = "file_rename"
9185 EventTypeFileRestore = "file_restore"
9186 EventTypeFileRevert = "file_revert"
9187 EventTypeFileRollbackChanges = "file_rollback_changes"
9188 EventTypeFileSaveCopyReference = "file_save_copy_reference"
9189 EventTypeFolderOverviewDescriptionChanged = "folder_overview_description_changed"
9190 EventTypeFolderOverviewItemPinned = "folder_overview_item_pinned"
9191 EventTypeFolderOverviewItemUnpinned = "folder_overview_item_unpinned"
9192 EventTypeObjectLabelAdded = "object_label_added"
9193 EventTypeObjectLabelRemoved = "object_label_removed"
9194 EventTypeObjectLabelUpdatedValue = "object_label_updated_value"
9195 EventTypeOrganizeFolderWithTidy = "organize_folder_with_tidy"
9196 EventTypeRewindFolder = "rewind_folder"
9197 EventTypeUserTagsAdded = "user_tags_added"
9198 EventTypeUserTagsRemoved = "user_tags_removed"
9199 EventTypeFileRequestChange = "file_request_change"
9200 EventTypeFileRequestClose = "file_request_close"
9201 EventTypeFileRequestCreate = "file_request_create"
9202 EventTypeFileRequestDelete = "file_request_delete"
9203 EventTypeFileRequestReceiveFile = "file_request_receive_file"
9204 EventTypeGroupAddExternalId = "group_add_external_id"
9205 EventTypeGroupAddMember = "group_add_member"
9206 EventTypeGroupChangeExternalId = "group_change_external_id"
9207 EventTypeGroupChangeManagementType = "group_change_management_type"
9208 EventTypeGroupChangeMemberRole = "group_change_member_role"
9209 EventTypeGroupCreate = "group_create"
9210 EventTypeGroupDelete = "group_delete"
9211 EventTypeGroupDescriptionUpdated = "group_description_updated"
9212 EventTypeGroupJoinPolicyUpdated = "group_join_policy_updated"
9213 EventTypeGroupMoved = "group_moved"
9214 EventTypeGroupRemoveExternalId = "group_remove_external_id"
9215 EventTypeGroupRemoveMember = "group_remove_member"
9216 EventTypeGroupRename = "group_rename"
9217 EventTypeAccountLockOrUnlocked = "account_lock_or_unlocked"
9218 EventTypeEmmError = "emm_error"
9219 EventTypeGuestAdminSignedInViaTrustedTeams = "guest_admin_signed_in_via_trusted_teams"
9220 EventTypeGuestAdminSignedOutViaTrustedTeams = "guest_admin_signed_out_via_trusted_teams"
9221 EventTypeLoginFail = "login_fail"
9222 EventTypeLoginSuccess = "login_success"
9223 EventTypeLogout = "logout"
9224 EventTypeResellerSupportSessionEnd = "reseller_support_session_end"
9225 EventTypeResellerSupportSessionStart = "reseller_support_session_start"
9226 EventTypeSignInAsSessionEnd = "sign_in_as_session_end"
9227 EventTypeSignInAsSessionStart = "sign_in_as_session_start"
9228 EventTypeSsoError = "sso_error"
9229 EventTypeCreateTeamInviteLink = "create_team_invite_link"
9230 EventTypeDeleteTeamInviteLink = "delete_team_invite_link"
9231 EventTypeMemberAddExternalId = "member_add_external_id"
9232 EventTypeMemberAddName = "member_add_name"
9233 EventTypeMemberChangeAdminRole = "member_change_admin_role"
9234 EventTypeMemberChangeEmail = "member_change_email"
9235 EventTypeMemberChangeExternalId = "member_change_external_id"
9236 EventTypeMemberChangeMembershipType = "member_change_membership_type"
9237 EventTypeMemberChangeName = "member_change_name"
9238 EventTypeMemberChangeResellerRole = "member_change_reseller_role"
9239 EventTypeMemberChangeStatus = "member_change_status"
9240 EventTypeMemberDeleteManualContacts = "member_delete_manual_contacts"
9241 EventTypeMemberDeleteProfilePhoto = "member_delete_profile_photo"
9242 EventTypeMemberPermanentlyDeleteAccountContents = "member_permanently_delete_account_contents"
9243 EventTypeMemberRemoveExternalId = "member_remove_external_id"
9244 EventTypeMemberSetProfilePhoto = "member_set_profile_photo"
9245 EventTypeMemberSpaceLimitsAddCustomQuota = "member_space_limits_add_custom_quota"
9246 EventTypeMemberSpaceLimitsChangeCustomQuota = "member_space_limits_change_custom_quota"
9247 EventTypeMemberSpaceLimitsChangeStatus = "member_space_limits_change_status"
9248 EventTypeMemberSpaceLimitsRemoveCustomQuota = "member_space_limits_remove_custom_quota"
9249 EventTypeMemberSuggest = "member_suggest"
9250 EventTypeMemberTransferAccountContents = "member_transfer_account_contents"
9251 EventTypePendingSecondaryEmailAdded = "pending_secondary_email_added"
9252 EventTypeSecondaryEmailDeleted = "secondary_email_deleted"
9253 EventTypeSecondaryEmailVerified = "secondary_email_verified"
9254 EventTypeSecondaryMailsPolicyChanged = "secondary_mails_policy_changed"
9255 EventTypeBinderAddPage = "binder_add_page"
9256 EventTypeBinderAddSection = "binder_add_section"
9257 EventTypeBinderRemovePage = "binder_remove_page"
9258 EventTypeBinderRemoveSection = "binder_remove_section"
9259 EventTypeBinderRenamePage = "binder_rename_page"
9260 EventTypeBinderRenameSection = "binder_rename_section"
9261 EventTypeBinderReorderPage = "binder_reorder_page"
9262 EventTypeBinderReorderSection = "binder_reorder_section"
9263 EventTypePaperContentAddMember = "paper_content_add_member"
9264 EventTypePaperContentAddToFolder = "paper_content_add_to_folder"
9265 EventTypePaperContentArchive = "paper_content_archive"
9266 EventTypePaperContentCreate = "paper_content_create"
9267 EventTypePaperContentPermanentlyDelete = "paper_content_permanently_delete"
9268 EventTypePaperContentRemoveFromFolder = "paper_content_remove_from_folder"
9269 EventTypePaperContentRemoveMember = "paper_content_remove_member"
9270 EventTypePaperContentRename = "paper_content_rename"
9271 EventTypePaperContentRestore = "paper_content_restore"
9272 EventTypePaperDocAddComment = "paper_doc_add_comment"
9273 EventTypePaperDocChangeMemberRole = "paper_doc_change_member_role"
9274 EventTypePaperDocChangeSharingPolicy = "paper_doc_change_sharing_policy"
9275 EventTypePaperDocChangeSubscription = "paper_doc_change_subscription"
9276 EventTypePaperDocDeleted = "paper_doc_deleted"
9277 EventTypePaperDocDeleteComment = "paper_doc_delete_comment"
9278 EventTypePaperDocDownload = "paper_doc_download"
9279 EventTypePaperDocEdit = "paper_doc_edit"
9280 EventTypePaperDocEditComment = "paper_doc_edit_comment"
9281 EventTypePaperDocFollowed = "paper_doc_followed"
9282 EventTypePaperDocMention = "paper_doc_mention"
9283 EventTypePaperDocOwnershipChanged = "paper_doc_ownership_changed"
9284 EventTypePaperDocRequestAccess = "paper_doc_request_access"
9285 EventTypePaperDocResolveComment = "paper_doc_resolve_comment"
9286 EventTypePaperDocRevert = "paper_doc_revert"
9287 EventTypePaperDocSlackShare = "paper_doc_slack_share"
9288 EventTypePaperDocTeamInvite = "paper_doc_team_invite"
9289 EventTypePaperDocTrashed = "paper_doc_trashed"
9290 EventTypePaperDocUnresolveComment = "paper_doc_unresolve_comment"
9291 EventTypePaperDocUntrashed = "paper_doc_untrashed"
9292 EventTypePaperDocView = "paper_doc_view"
9293 EventTypePaperExternalViewAllow = "paper_external_view_allow"
9294 EventTypePaperExternalViewDefaultTeam = "paper_external_view_default_team"
9295 EventTypePaperExternalViewForbid = "paper_external_view_forbid"
9296 EventTypePaperFolderChangeSubscription = "paper_folder_change_subscription"
9297 EventTypePaperFolderDeleted = "paper_folder_deleted"
9298 EventTypePaperFolderFollowed = "paper_folder_followed"
9299 EventTypePaperFolderTeamInvite = "paper_folder_team_invite"
9300 EventTypePaperPublishedLinkChangePermission = "paper_published_link_change_permission"
9301 EventTypePaperPublishedLinkCreate = "paper_published_link_create"
9302 EventTypePaperPublishedLinkDisabled = "paper_published_link_disabled"
9303 EventTypePaperPublishedLinkView = "paper_published_link_view"
9304 EventTypePasswordChange = "password_change"
9305 EventTypePasswordReset = "password_reset"
9306 EventTypePasswordResetAll = "password_reset_all"
9307 EventTypeClassificationCreateReport = "classification_create_report"
9308 EventTypeClassificationCreateReportFail = "classification_create_report_fail"
9309 EventTypeEmmCreateExceptionsReport = "emm_create_exceptions_report"
9310 EventTypeEmmCreateUsageReport = "emm_create_usage_report"
9311 EventTypeExportMembersReport = "export_members_report"
9312 EventTypeExportMembersReportFail = "export_members_report_fail"
9313 EventTypeExternalSharingCreateReport = "external_sharing_create_report"
9314 EventTypeExternalSharingReportFailed = "external_sharing_report_failed"
9315 EventTypeNoExpirationLinkGenCreateReport = "no_expiration_link_gen_create_report"
9316 EventTypeNoExpirationLinkGenReportFailed = "no_expiration_link_gen_report_failed"
9317 EventTypeNoPasswordLinkGenCreateReport = "no_password_link_gen_create_report"
9318 EventTypeNoPasswordLinkGenReportFailed = "no_password_link_gen_report_failed"
9319 EventTypeNoPasswordLinkViewCreateReport = "no_password_link_view_create_report"
9320 EventTypeNoPasswordLinkViewReportFailed = "no_password_link_view_report_failed"
9321 EventTypeOutdatedLinkViewCreateReport = "outdated_link_view_create_report"
9322 EventTypeOutdatedLinkViewReportFailed = "outdated_link_view_report_failed"
9323 EventTypePaperAdminExportStart = "paper_admin_export_start"
9324 EventTypeSmartSyncCreateAdminPrivilegeReport = "smart_sync_create_admin_privilege_report"
9325 EventTypeTeamActivityCreateReport = "team_activity_create_report"
9326 EventTypeTeamActivityCreateReportFail = "team_activity_create_report_fail"
9327 EventTypeCollectionShare = "collection_share"
9328 EventTypeFileTransfersFileAdd = "file_transfers_file_add"
9329 EventTypeFileTransfersTransferDelete = "file_transfers_transfer_delete"
9330 EventTypeFileTransfersTransferDownload = "file_transfers_transfer_download"
9331 EventTypeFileTransfersTransferSend = "file_transfers_transfer_send"
9332 EventTypeFileTransfersTransferView = "file_transfers_transfer_view"
9333 EventTypeNoteAclInviteOnly = "note_acl_invite_only"
9334 EventTypeNoteAclLink = "note_acl_link"
9335 EventTypeNoteAclTeamLink = "note_acl_team_link"
9336 EventTypeNoteShared = "note_shared"
9337 EventTypeNoteShareReceive = "note_share_receive"
9338 EventTypeOpenNoteShared = "open_note_shared"
9339 EventTypeSfAddGroup = "sf_add_group"
9340 EventTypeSfAllowNonMembersToViewSharedLinks = "sf_allow_non_members_to_view_shared_links"
9341 EventTypeSfExternalInviteWarn = "sf_external_invite_warn"
9342 EventTypeSfFbInvite = "sf_fb_invite"
9343 EventTypeSfFbInviteChangeRole = "sf_fb_invite_change_role"
9344 EventTypeSfFbUninvite = "sf_fb_uninvite"
9345 EventTypeSfInviteGroup = "sf_invite_group"
9346 EventTypeSfTeamGrantAccess = "sf_team_grant_access"
9347 EventTypeSfTeamInvite = "sf_team_invite"
9348 EventTypeSfTeamInviteChangeRole = "sf_team_invite_change_role"
9349 EventTypeSfTeamJoin = "sf_team_join"
9350 EventTypeSfTeamJoinFromOobLink = "sf_team_join_from_oob_link"
9351 EventTypeSfTeamUninvite = "sf_team_uninvite"
9352 EventTypeSharedContentAddInvitees = "shared_content_add_invitees"
9353 EventTypeSharedContentAddLinkExpiry = "shared_content_add_link_expiry"
9354 EventTypeSharedContentAddLinkPassword = "shared_content_add_link_password"
9355 EventTypeSharedContentAddMember = "shared_content_add_member"
9356 EventTypeSharedContentChangeDownloadsPolicy = "shared_content_change_downloads_policy"
9357 EventTypeSharedContentChangeInviteeRole = "shared_content_change_invitee_role"
9358 EventTypeSharedContentChangeLinkAudience = "shared_content_change_link_audience"
9359 EventTypeSharedContentChangeLinkExpiry = "shared_content_change_link_expiry"
9360 EventTypeSharedContentChangeLinkPassword = "shared_content_change_link_password"
9361 EventTypeSharedContentChangeMemberRole = "shared_content_change_member_role"
9362 EventTypeSharedContentChangeViewerInfoPolicy = "shared_content_change_viewer_info_policy"
9363 EventTypeSharedContentClaimInvitation = "shared_content_claim_invitation"
9364 EventTypeSharedContentCopy = "shared_content_copy"
9365 EventTypeSharedContentDownload = "shared_content_download"
9366 EventTypeSharedContentRelinquishMembership = "shared_content_relinquish_membership"
9367 EventTypeSharedContentRemoveInvitees = "shared_content_remove_invitees"
9368 EventTypeSharedContentRemoveLinkExpiry = "shared_content_remove_link_expiry"
9369 EventTypeSharedContentRemoveLinkPassword = "shared_content_remove_link_password"
9370 EventTypeSharedContentRemoveMember = "shared_content_remove_member"
9371 EventTypeSharedContentRequestAccess = "shared_content_request_access"
9372 EventTypeSharedContentRestoreInvitees = "shared_content_restore_invitees"
9373 EventTypeSharedContentRestoreMember = "shared_content_restore_member"
9374 EventTypeSharedContentUnshare = "shared_content_unshare"
9375 EventTypeSharedContentView = "shared_content_view"
9376 EventTypeSharedFolderChangeLinkPolicy = "shared_folder_change_link_policy"
9377 EventTypeSharedFolderChangeMembersInheritancePolicy = "shared_folder_change_members_inheritance_policy"
9378 EventTypeSharedFolderChangeMembersManagementPolicy = "shared_folder_change_members_management_policy"
9379 EventTypeSharedFolderChangeMembersPolicy = "shared_folder_change_members_policy"
9380 EventTypeSharedFolderCreate = "shared_folder_create"
9381 EventTypeSharedFolderDeclineInvitation = "shared_folder_decline_invitation"
9382 EventTypeSharedFolderMount = "shared_folder_mount"
9383 EventTypeSharedFolderNest = "shared_folder_nest"
9384 EventTypeSharedFolderTransferOwnership = "shared_folder_transfer_ownership"
9385 EventTypeSharedFolderUnmount = "shared_folder_unmount"
9386 EventTypeSharedLinkAddExpiry = "shared_link_add_expiry"
9387 EventTypeSharedLinkChangeExpiry = "shared_link_change_expiry"
9388 EventTypeSharedLinkChangeVisibility = "shared_link_change_visibility"
9389 EventTypeSharedLinkCopy = "shared_link_copy"
9390 EventTypeSharedLinkCreate = "shared_link_create"
9391 EventTypeSharedLinkDisable = "shared_link_disable"
9392 EventTypeSharedLinkDownload = "shared_link_download"
9393 EventTypeSharedLinkRemoveExpiry = "shared_link_remove_expiry"
9394 EventTypeSharedLinkSettingsAddExpiration = "shared_link_settings_add_expiration"
9395 EventTypeSharedLinkSettingsAddPassword = "shared_link_settings_add_password"
9396 EventTypeSharedLinkSettingsAllowDownloadDisabled = "shared_link_settings_allow_download_disabled"
9397 EventTypeSharedLinkSettingsAllowDownloadEnabled = "shared_link_settings_allow_download_enabled"
9398 EventTypeSharedLinkSettingsChangeAudience = "shared_link_settings_change_audience"
9399 EventTypeSharedLinkSettingsChangeExpiration = "shared_link_settings_change_expiration"
9400 EventTypeSharedLinkSettingsChangePassword = "shared_link_settings_change_password"
9401 EventTypeSharedLinkSettingsRemoveExpiration = "shared_link_settings_remove_expiration"
9402 EventTypeSharedLinkSettingsRemovePassword = "shared_link_settings_remove_password"
9403 EventTypeSharedLinkShare = "shared_link_share"
9404 EventTypeSharedLinkView = "shared_link_view"
9405 EventTypeSharedNoteOpened = "shared_note_opened"
9406 EventTypeShmodelDisableDownloads = "shmodel_disable_downloads"
9407 EventTypeShmodelEnableDownloads = "shmodel_enable_downloads"
9408 EventTypeShmodelGroupShare = "shmodel_group_share"
9409 EventTypeShowcaseAccessGranted = "showcase_access_granted"
9410 EventTypeShowcaseAddMember = "showcase_add_member"
9411 EventTypeShowcaseArchived = "showcase_archived"
9412 EventTypeShowcaseCreated = "showcase_created"
9413 EventTypeShowcaseDeleteComment = "showcase_delete_comment"
9414 EventTypeShowcaseEdited = "showcase_edited"
9415 EventTypeShowcaseEditComment = "showcase_edit_comment"
9416 EventTypeShowcaseFileAdded = "showcase_file_added"
9417 EventTypeShowcaseFileDownload = "showcase_file_download"
9418 EventTypeShowcaseFileRemoved = "showcase_file_removed"
9419 EventTypeShowcaseFileView = "showcase_file_view"
9420 EventTypeShowcasePermanentlyDeleted = "showcase_permanently_deleted"
9421 EventTypeShowcasePostComment = "showcase_post_comment"
9422 EventTypeShowcaseRemoveMember = "showcase_remove_member"
9423 EventTypeShowcaseRenamed = "showcase_renamed"
9424 EventTypeShowcaseRequestAccess = "showcase_request_access"
9425 EventTypeShowcaseResolveComment = "showcase_resolve_comment"
9426 EventTypeShowcaseRestored = "showcase_restored"
9427 EventTypeShowcaseTrashed = "showcase_trashed"
9428 EventTypeShowcaseTrashedDeprecated = "showcase_trashed_deprecated"
9429 EventTypeShowcaseUnresolveComment = "showcase_unresolve_comment"
9430 EventTypeShowcaseUntrashed = "showcase_untrashed"
9431 EventTypeShowcaseUntrashedDeprecated = "showcase_untrashed_deprecated"
9432 EventTypeShowcaseView = "showcase_view"
9433 EventTypeSsoAddCert = "sso_add_cert"
9434 EventTypeSsoAddLoginUrl = "sso_add_login_url"
9435 EventTypeSsoAddLogoutUrl = "sso_add_logout_url"
9436 EventTypeSsoChangeCert = "sso_change_cert"
9437 EventTypeSsoChangeLoginUrl = "sso_change_login_url"
9438 EventTypeSsoChangeLogoutUrl = "sso_change_logout_url"
9439 EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
9440 EventTypeSsoRemoveCert = "sso_remove_cert"
9441 EventTypeSsoRemoveLoginUrl = "sso_remove_login_url"
9442 EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url"
9443 EventTypeTeamFolderChangeStatus = "team_folder_change_status"
9444 EventTypeTeamFolderCreate = "team_folder_create"
9445 EventTypeTeamFolderDowngrade = "team_folder_downgrade"
9446 EventTypeTeamFolderPermanentlyDelete = "team_folder_permanently_delete"
9447 EventTypeTeamFolderRename = "team_folder_rename"
9448 EventTypeTeamSelectiveSyncSettingsChanged = "team_selective_sync_settings_changed"
9449 EventTypeAccountCaptureChangePolicy = "account_capture_change_policy"
9450 EventTypeAllowDownloadDisabled = "allow_download_disabled"
9451 EventTypeAllowDownloadEnabled = "allow_download_enabled"
9452 EventTypeAppPermissionsChanged = "app_permissions_changed"
9453 EventTypeCameraUploadsPolicyChanged = "camera_uploads_policy_changed"
9454 EventTypeClassificationChangePolicy = "classification_change_policy"
9455 EventTypeComputerBackupPolicyChanged = "computer_backup_policy_changed"
9456 EventTypeContentAdministrationPolicyChanged = "content_administration_policy_changed"
9457 EventTypeDataPlacementRestrictionChangePolicy = "data_placement_restriction_change_policy"
9458 EventTypeDataPlacementRestrictionSatisfyPolicy = "data_placement_restriction_satisfy_policy"
9459 EventTypeDeviceApprovalsAddException = "device_approvals_add_exception"
9460 EventTypeDeviceApprovalsChangeDesktopPolicy = "device_approvals_change_desktop_policy"
9461 EventTypeDeviceApprovalsChangeMobilePolicy = "device_approvals_change_mobile_policy"
9462 EventTypeDeviceApprovalsChangeOverageAction = "device_approvals_change_overage_action"
9463 EventTypeDeviceApprovalsChangeUnlinkAction = "device_approvals_change_unlink_action"
9464 EventTypeDeviceApprovalsRemoveException = "device_approvals_remove_exception"
9465 EventTypeDirectoryRestrictionsAddMembers = "directory_restrictions_add_members"
9466 EventTypeDirectoryRestrictionsRemoveMembers = "directory_restrictions_remove_members"
9467 EventTypeEmmAddException = "emm_add_exception"
9468 EventTypeEmmChangePolicy = "emm_change_policy"
9469 EventTypeEmmRemoveException = "emm_remove_exception"
9470 EventTypeExtendedVersionHistoryChangePolicy = "extended_version_history_change_policy"
9471 EventTypeFileCommentsChangePolicy = "file_comments_change_policy"
9472 EventTypeFileLockingPolicyChanged = "file_locking_policy_changed"
9473 EventTypeFileRequestsChangePolicy = "file_requests_change_policy"
9474 EventTypeFileRequestsEmailsEnabled = "file_requests_emails_enabled"
9475 EventTypeFileRequestsEmailsRestrictedToTeamOnly = "file_requests_emails_restricted_to_team_only"
9476 EventTypeFileTransfersPolicyChanged = "file_transfers_policy_changed"
9477 EventTypeGoogleSsoChangePolicy = "google_sso_change_policy"
9478 EventTypeGroupUserManagementChangePolicy = "group_user_management_change_policy"
9479 EventTypeIntegrationPolicyChanged = "integration_policy_changed"
9480 EventTypeInviteAcceptanceEmailPolicyChanged = "invite_acceptance_email_policy_changed"
9481 EventTypeMemberRequestsChangePolicy = "member_requests_change_policy"
9482 EventTypeMemberSendInvitePolicyChanged = "member_send_invite_policy_changed"
9483 EventTypeMemberSpaceLimitsAddException = "member_space_limits_add_exception"
9484 EventTypeMemberSpaceLimitsChangeCapsTypePolicy = "member_space_limits_change_caps_type_policy"
9485 EventTypeMemberSpaceLimitsChangePolicy = "member_space_limits_change_policy"
9486 EventTypeMemberSpaceLimitsRemoveException = "member_space_limits_remove_exception"
9487 EventTypeMemberSuggestionsChangePolicy = "member_suggestions_change_policy"
9488 EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
9489 EventTypeNetworkControlChangePolicy = "network_control_change_policy"
9490 EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy"
9491 EventTypePaperChangeMemberLinkPolicy = "paper_change_member_link_policy"
9492 EventTypePaperChangeMemberPolicy = "paper_change_member_policy"
9493 EventTypePaperChangePolicy = "paper_change_policy"
9494 EventTypePaperDefaultFolderPolicyChanged = "paper_default_folder_policy_changed"
9495 EventTypePaperDesktopPolicyChanged = "paper_desktop_policy_changed"
9496 EventTypePaperEnabledUsersGroupAddition = "paper_enabled_users_group_addition"
9497 EventTypePaperEnabledUsersGroupRemoval = "paper_enabled_users_group_removal"
9498 EventTypePasswordStrengthRequirementsChangePolicy = "password_strength_requirements_change_policy"
9499 EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy"
9500 EventTypeResellerSupportChangePolicy = "reseller_support_change_policy"
9501 EventTypeRewindPolicyChanged = "rewind_policy_changed"
9502 EventTypeSendForSignaturePolicyChanged = "send_for_signature_policy_changed"
9503 EventTypeSharingChangeFolderJoinPolicy = "sharing_change_folder_join_policy"
9504 EventTypeSharingChangeLinkAllowChangeExpirationPolicy = "sharing_change_link_allow_change_expiration_policy"
9505 EventTypeSharingChangeLinkDefaultExpirationPolicy = "sharing_change_link_default_expiration_policy"
9506 EventTypeSharingChangeLinkEnforcePasswordPolicy = "sharing_change_link_enforce_password_policy"
9507 EventTypeSharingChangeLinkPolicy = "sharing_change_link_policy"
9508 EventTypeSharingChangeMemberPolicy = "sharing_change_member_policy"
9509 EventTypeShowcaseChangeDownloadPolicy = "showcase_change_download_policy"
9510 EventTypeShowcaseChangeEnabledPolicy = "showcase_change_enabled_policy"
9511 EventTypeShowcaseChangeExternalSharingPolicy = "showcase_change_external_sharing_policy"
9512 EventTypeSmarterSmartSyncPolicyChanged = "smarter_smart_sync_policy_changed"
9513 EventTypeSmartSyncChangePolicy = "smart_sync_change_policy"
9514 EventTypeSmartSyncNotOptOut = "smart_sync_not_opt_out"
9515 EventTypeSmartSyncOptOut = "smart_sync_opt_out"
9516 EventTypeSsoChangePolicy = "sso_change_policy"
9517 EventTypeTeamBrandingPolicyChanged = "team_branding_policy_changed"
9518 EventTypeTeamExtensionsPolicyChanged = "team_extensions_policy_changed"
9519 EventTypeTeamSelectiveSyncPolicyChanged = "team_selective_sync_policy_changed"
9520 EventTypeTeamSharingWhitelistSubjectsChanged = "team_sharing_whitelist_subjects_changed"
9521 EventTypeTfaAddException = "tfa_add_exception"
9522 EventTypeTfaChangePolicy = "tfa_change_policy"
9523 EventTypeTfaRemoveException = "tfa_remove_exception"
9524 EventTypeTwoAccountChangePolicy = "two_account_change_policy"
9525 EventTypeViewerInfoPolicyChanged = "viewer_info_policy_changed"
9526 EventTypeWatermarkingPolicyChanged = "watermarking_policy_changed"
9527 EventTypeWebSessionsChangeActiveSessionLimit = "web_sessions_change_active_session_limit"
9528 EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
9529 EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
9530 EventTypeTeamMergeFrom = "team_merge_from"
9531 EventTypeTeamMergeTo = "team_merge_to"
9532 EventTypeTeamProfileAddBackground = "team_profile_add_background"
9533 EventTypeTeamProfileAddLogo = "team_profile_add_logo"
9534 EventTypeTeamProfileChangeBackground = "team_profile_change_background"
9535 EventTypeTeamProfileChangeDefaultLanguage = "team_profile_change_default_language"
9536 EventTypeTeamProfileChangeLogo = "team_profile_change_logo"
9537 EventTypeTeamProfileChangeName = "team_profile_change_name"
9538 EventTypeTeamProfileRemoveBackground = "team_profile_remove_background"
9539 EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo"
9540 EventTypeTfaAddBackupPhone = "tfa_add_backup_phone"
9541 EventTypeTfaAddSecurityKey = "tfa_add_security_key"
9542 EventTypeTfaChangeBackupPhone = "tfa_change_backup_phone"
9543 EventTypeTfaChangeStatus = "tfa_change_status"
9544 EventTypeTfaRemoveBackupPhone = "tfa_remove_backup_phone"
9545 EventTypeTfaRemoveSecurityKey = "tfa_remove_security_key"
9546 EventTypeTfaReset = "tfa_reset"
9547 EventTypeChangedEnterpriseAdminRole = "changed_enterprise_admin_role"
9548 EventTypeChangedEnterpriseConnectedTeamStatus = "changed_enterprise_connected_team_status"
9549 EventTypeEndedEnterpriseAdminSession = "ended_enterprise_admin_session"
9550 EventTypeEndedEnterpriseAdminSessionDeprecated = "ended_enterprise_admin_session_deprecated"
9551 EventTypeEnterpriseSettingsLocking = "enterprise_settings_locking"
9552 EventTypeGuestAdminChangeStatus = "guest_admin_change_status"
9553 EventTypeStartedEnterpriseAdminSession = "started_enterprise_admin_session"
9554 EventTypeTeamMergeRequestAccepted = "team_merge_request_accepted"
9555 EventTypeTeamMergeRequestAcceptedShownToPrimaryTeam = "team_merge_request_accepted_shown_to_primary_team"
9556 EventTypeTeamMergeRequestAcceptedShownToSecondaryTeam = "team_merge_request_accepted_shown_to_secondary_team"
9557 EventTypeTeamMergeRequestAutoCanceled = "team_merge_request_auto_canceled"
9558 EventTypeTeamMergeRequestCanceled = "team_merge_request_canceled"
9559 EventTypeTeamMergeRequestCanceledShownToPrimaryTeam = "team_merge_request_canceled_shown_to_primary_team"
9560 EventTypeTeamMergeRequestCanceledShownToSecondaryTeam = "team_merge_request_canceled_shown_to_secondary_team"
9561 EventTypeTeamMergeRequestExpired = "team_merge_request_expired"
9562 EventTypeTeamMergeRequestExpiredShownToPrimaryTeam = "team_merge_request_expired_shown_to_primary_team"
9563 EventTypeTeamMergeRequestExpiredShownToSecondaryTeam = "team_merge_request_expired_shown_to_secondary_team"
9564 EventTypeTeamMergeRequestRejectedShownToPrimaryTeam = "team_merge_request_rejected_shown_to_primary_team"
9565 EventTypeTeamMergeRequestRejectedShownToSecondaryTeam = "team_merge_request_rejected_shown_to_secondary_team"
9566 EventTypeTeamMergeRequestReminder = "team_merge_request_reminder"
9567 EventTypeTeamMergeRequestReminderShownToPrimaryTeam = "team_merge_request_reminder_shown_to_primary_team"
9568 EventTypeTeamMergeRequestReminderShownToSecondaryTeam = "team_merge_request_reminder_shown_to_secondary_team"
9569 EventTypeTeamMergeRequestRevoked = "team_merge_request_revoked"
9570 EventTypeTeamMergeRequestSentShownToPrimaryTeam = "team_merge_request_sent_shown_to_primary_team"
9571 EventTypeTeamMergeRequestSentShownToSecondaryTeam = "team_merge_request_sent_shown_to_secondary_team"
9572 EventTypeOther = "other"
9573 )
9574
9575 // UnmarshalJSON deserializes into a EventType instance
9576 func (u *EventType) UnmarshalJSON(body []byte) error {
9577 type wrap struct {
9578 dropbox.Tagged
9579 }
9580 var w wrap
9581 var err error
9582 if err = json.Unmarshal(body, &w); err != nil {
9583 return err
9584 }
9585 u.Tag = w.Tag
9586 switch u.Tag {
9587 case "admin_alerting_alert_state_changed":
9588 err = json.Unmarshal(body, &u.AdminAlertingAlertStateChanged)
9589
9590 if err != nil {
9591 return err
9592 }
9593 case "admin_alerting_changed_alert_config":
9594 err = json.Unmarshal(body, &u.AdminAlertingChangedAlertConfig)
9595
9596 if err != nil {
9597 return err
9598 }
9599 case "admin_alerting_triggered_alert":
9600 err = json.Unmarshal(body, &u.AdminAlertingTriggeredAlert)
9601
9602 if err != nil {
9603 return err
9604 }
9605 case "app_blocked_by_permissions":
9606 err = json.Unmarshal(body, &u.AppBlockedByPermissions)
9607
9608 if err != nil {
9609 return err
9610 }
9611 case "app_link_team":
9612 err = json.Unmarshal(body, &u.AppLinkTeam)
9613
9614 if err != nil {
9615 return err
9616 }
9617 case "app_link_user":
9618 err = json.Unmarshal(body, &u.AppLinkUser)
9619
9620 if err != nil {
9621 return err
9622 }
9623 case "app_unlink_team":
9624 err = json.Unmarshal(body, &u.AppUnlinkTeam)
9625
9626 if err != nil {
9627 return err
9628 }
9629 case "app_unlink_user":
9630 err = json.Unmarshal(body, &u.AppUnlinkUser)
9631
9632 if err != nil {
9633 return err
9634 }
9635 case "integration_connected":
9636 err = json.Unmarshal(body, &u.IntegrationConnected)
9637
9638 if err != nil {
9639 return err
9640 }
9641 case "integration_disconnected":
9642 err = json.Unmarshal(body, &u.IntegrationDisconnected)
9643
9644 if err != nil {
9645 return err
9646 }
9647 case "file_add_comment":
9648 err = json.Unmarshal(body, &u.FileAddComment)
9649
9650 if err != nil {
9651 return err
9652 }
9653 case "file_change_comment_subscription":
9654 err = json.Unmarshal(body, &u.FileChangeCommentSubscription)
9655
9656 if err != nil {
9657 return err
9658 }
9659 case "file_delete_comment":
9660 err = json.Unmarshal(body, &u.FileDeleteComment)
9661
9662 if err != nil {
9663 return err
9664 }
9665 case "file_edit_comment":
9666 err = json.Unmarshal(body, &u.FileEditComment)
9667
9668 if err != nil {
9669 return err
9670 }
9671 case "file_like_comment":
9672 err = json.Unmarshal(body, &u.FileLikeComment)
9673
9674 if err != nil {
9675 return err
9676 }
9677 case "file_resolve_comment":
9678 err = json.Unmarshal(body, &u.FileResolveComment)
9679
9680 if err != nil {
9681 return err
9682 }
9683 case "file_unlike_comment":
9684 err = json.Unmarshal(body, &u.FileUnlikeComment)
9685
9686 if err != nil {
9687 return err
9688 }
9689 case "file_unresolve_comment":
9690 err = json.Unmarshal(body, &u.FileUnresolveComment)
9691
9692 if err != nil {
9693 return err
9694 }
9695 case "governance_policy_add_folders":
9696 err = json.Unmarshal(body, &u.GovernancePolicyAddFolders)
9697
9698 if err != nil {
9699 return err
9700 }
9701 case "governance_policy_add_folder_failed":
9702 err = json.Unmarshal(body, &u.GovernancePolicyAddFolderFailed)
9703
9704 if err != nil {
9705 return err
9706 }
9707 case "governance_policy_content_disposed":
9708 err = json.Unmarshal(body, &u.GovernancePolicyContentDisposed)
9709
9710 if err != nil {
9711 return err
9712 }
9713 case "governance_policy_create":
9714 err = json.Unmarshal(body, &u.GovernancePolicyCreate)
9715
9716 if err != nil {
9717 return err
9718 }
9719 case "governance_policy_delete":
9720 err = json.Unmarshal(body, &u.GovernancePolicyDelete)
9721
9722 if err != nil {
9723 return err
9724 }
9725 case "governance_policy_edit_details":
9726 err = json.Unmarshal(body, &u.GovernancePolicyEditDetails)
9727
9728 if err != nil {
9729 return err
9730 }
9731 case "governance_policy_edit_duration":
9732 err = json.Unmarshal(body, &u.GovernancePolicyEditDuration)
9733
9734 if err != nil {
9735 return err
9736 }
9737 case "governance_policy_export_created":
9738 err = json.Unmarshal(body, &u.GovernancePolicyExportCreated)
9739
9740 if err != nil {
9741 return err
9742 }
9743 case "governance_policy_export_removed":
9744 err = json.Unmarshal(body, &u.GovernancePolicyExportRemoved)
9745
9746 if err != nil {
9747 return err
9748 }
9749 case "governance_policy_remove_folders":
9750 err = json.Unmarshal(body, &u.GovernancePolicyRemoveFolders)
9751
9752 if err != nil {
9753 return err
9754 }
9755 case "governance_policy_report_created":
9756 err = json.Unmarshal(body, &u.GovernancePolicyReportCreated)
9757
9758 if err != nil {
9759 return err
9760 }
9761 case "governance_policy_zip_part_downloaded":
9762 err = json.Unmarshal(body, &u.GovernancePolicyZipPartDownloaded)
9763
9764 if err != nil {
9765 return err
9766 }
9767 case "legal_holds_activate_a_hold":
9768 err = json.Unmarshal(body, &u.LegalHoldsActivateAHold)
9769
9770 if err != nil {
9771 return err
9772 }
9773 case "legal_holds_add_members":
9774 err = json.Unmarshal(body, &u.LegalHoldsAddMembers)
9775
9776 if err != nil {
9777 return err
9778 }
9779 case "legal_holds_change_hold_details":
9780 err = json.Unmarshal(body, &u.LegalHoldsChangeHoldDetails)
9781
9782 if err != nil {
9783 return err
9784 }
9785 case "legal_holds_change_hold_name":
9786 err = json.Unmarshal(body, &u.LegalHoldsChangeHoldName)
9787
9788 if err != nil {
9789 return err
9790 }
9791 case "legal_holds_export_a_hold":
9792 err = json.Unmarshal(body, &u.LegalHoldsExportAHold)
9793
9794 if err != nil {
9795 return err
9796 }
9797 case "legal_holds_export_cancelled":
9798 err = json.Unmarshal(body, &u.LegalHoldsExportCancelled)
9799
9800 if err != nil {
9801 return err
9802 }
9803 case "legal_holds_export_downloaded":
9804 err = json.Unmarshal(body, &u.LegalHoldsExportDownloaded)
9805
9806 if err != nil {
9807 return err
9808 }
9809 case "legal_holds_export_removed":
9810 err = json.Unmarshal(body, &u.LegalHoldsExportRemoved)
9811
9812 if err != nil {
9813 return err
9814 }
9815 case "legal_holds_release_a_hold":
9816 err = json.Unmarshal(body, &u.LegalHoldsReleaseAHold)
9817
9818 if err != nil {
9819 return err
9820 }
9821 case "legal_holds_remove_members":
9822 err = json.Unmarshal(body, &u.LegalHoldsRemoveMembers)
9823
9824 if err != nil {
9825 return err
9826 }
9827 case "legal_holds_report_a_hold":
9828 err = json.Unmarshal(body, &u.LegalHoldsReportAHold)
9829
9830 if err != nil {
9831 return err
9832 }
9833 case "device_change_ip_desktop":
9834 err = json.Unmarshal(body, &u.DeviceChangeIpDesktop)
9835
9836 if err != nil {
9837 return err
9838 }
9839 case "device_change_ip_mobile":
9840 err = json.Unmarshal(body, &u.DeviceChangeIpMobile)
9841
9842 if err != nil {
9843 return err
9844 }
9845 case "device_change_ip_web":
9846 err = json.Unmarshal(body, &u.DeviceChangeIpWeb)
9847
9848 if err != nil {
9849 return err
9850 }
9851 case "device_delete_on_unlink_fail":
9852 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFail)
9853
9854 if err != nil {
9855 return err
9856 }
9857 case "device_delete_on_unlink_success":
9858 err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccess)
9859
9860 if err != nil {
9861 return err
9862 }
9863 case "device_link_fail":
9864 err = json.Unmarshal(body, &u.DeviceLinkFail)
9865
9866 if err != nil {
9867 return err
9868 }
9869 case "device_link_success":
9870 err = json.Unmarshal(body, &u.DeviceLinkSuccess)
9871
9872 if err != nil {
9873 return err
9874 }
9875 case "device_management_disabled":
9876 err = json.Unmarshal(body, &u.DeviceManagementDisabled)
9877
9878 if err != nil {
9879 return err
9880 }
9881 case "device_management_enabled":
9882 err = json.Unmarshal(body, &u.DeviceManagementEnabled)
9883
9884 if err != nil {
9885 return err
9886 }
9887 case "device_sync_backup_status_changed":
9888 err = json.Unmarshal(body, &u.DeviceSyncBackupStatusChanged)
9889
9890 if err != nil {
9891 return err
9892 }
9893 case "device_unlink":
9894 err = json.Unmarshal(body, &u.DeviceUnlink)
9895
9896 if err != nil {
9897 return err
9898 }
9899 case "dropbox_passwords_exported":
9900 err = json.Unmarshal(body, &u.DropboxPasswordsExported)
9901
9902 if err != nil {
9903 return err
9904 }
9905 case "dropbox_passwords_new_device_enrolled":
9906 err = json.Unmarshal(body, &u.DropboxPasswordsNewDeviceEnrolled)
9907
9908 if err != nil {
9909 return err
9910 }
9911 case "emm_refresh_auth_token":
9912 err = json.Unmarshal(body, &u.EmmRefreshAuthToken)
9913
9914 if err != nil {
9915 return err
9916 }
9917 case "account_capture_change_availability":
9918 err = json.Unmarshal(body, &u.AccountCaptureChangeAvailability)
9919
9920 if err != nil {
9921 return err
9922 }
9923 case "account_capture_migrate_account":
9924 err = json.Unmarshal(body, &u.AccountCaptureMigrateAccount)
9925
9926 if err != nil {
9927 return err
9928 }
9929 case "account_capture_notification_emails_sent":
9930 err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSent)
9931
9932 if err != nil {
9933 return err
9934 }
9935 case "account_capture_relinquish_account":
9936 err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccount)
9937
9938 if err != nil {
9939 return err
9940 }
9941 case "disabled_domain_invites":
9942 err = json.Unmarshal(body, &u.DisabledDomainInvites)
9943
9944 if err != nil {
9945 return err
9946 }
9947 case "domain_invites_approve_request_to_join_team":
9948 err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeam)
9949
9950 if err != nil {
9951 return err
9952 }
9953 case "domain_invites_decline_request_to_join_team":
9954 err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeam)
9955
9956 if err != nil {
9957 return err
9958 }
9959 case "domain_invites_email_existing_users":
9960 err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsers)
9961
9962 if err != nil {
9963 return err
9964 }
9965 case "domain_invites_request_to_join_team":
9966 err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeam)
9967
9968 if err != nil {
9969 return err
9970 }
9971 case "domain_invites_set_invite_new_user_pref_to_no":
9972 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNo)
9973
9974 if err != nil {
9975 return err
9976 }
9977 case "domain_invites_set_invite_new_user_pref_to_yes":
9978 err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYes)
9979
9980 if err != nil {
9981 return err
9982 }
9983 case "domain_verification_add_domain_fail":
9984 err = json.Unmarshal(body, &u.DomainVerificationAddDomainFail)
9985
9986 if err != nil {
9987 return err
9988 }
9989 case "domain_verification_add_domain_success":
9990 err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccess)
9991
9992 if err != nil {
9993 return err
9994 }
9995 case "domain_verification_remove_domain":
9996 err = json.Unmarshal(body, &u.DomainVerificationRemoveDomain)
9997
9998 if err != nil {
9999 return err
10000 }
10001 case "enabled_domain_invites":
10002 err = json.Unmarshal(body, &u.EnabledDomainInvites)
10003
10004 if err != nil {
10005 return err
10006 }
10007 case "apply_naming_convention":
10008 err = json.Unmarshal(body, &u.ApplyNamingConvention)
10009
10010 if err != nil {
10011 return err
10012 }
10013 case "create_folder":
10014 err = json.Unmarshal(body, &u.CreateFolder)
10015
10016 if err != nil {
10017 return err
10018 }
10019 case "file_add":
10020 err = json.Unmarshal(body, &u.FileAdd)
10021
10022 if err != nil {
10023 return err
10024 }
10025 case "file_copy":
10026 err = json.Unmarshal(body, &u.FileCopy)
10027
10028 if err != nil {
10029 return err
10030 }
10031 case "file_delete":
10032 err = json.Unmarshal(body, &u.FileDelete)
10033
10034 if err != nil {
10035 return err
10036 }
10037 case "file_download":
10038 err = json.Unmarshal(body, &u.FileDownload)
10039
10040 if err != nil {
10041 return err
10042 }
10043 case "file_edit":
10044 err = json.Unmarshal(body, &u.FileEdit)
10045
10046 if err != nil {
10047 return err
10048 }
10049 case "file_get_copy_reference":
10050 err = json.Unmarshal(body, &u.FileGetCopyReference)
10051
10052 if err != nil {
10053 return err
10054 }
10055 case "file_locking_lock_status_changed":
10056 err = json.Unmarshal(body, &u.FileLockingLockStatusChanged)
10057
10058 if err != nil {
10059 return err
10060 }
10061 case "file_move":
10062 err = json.Unmarshal(body, &u.FileMove)
10063
10064 if err != nil {
10065 return err
10066 }
10067 case "file_permanently_delete":
10068 err = json.Unmarshal(body, &u.FilePermanentlyDelete)
10069
10070 if err != nil {
10071 return err
10072 }
10073 case "file_preview":
10074 err = json.Unmarshal(body, &u.FilePreview)
10075
10076 if err != nil {
10077 return err
10078 }
10079 case "file_rename":
10080 err = json.Unmarshal(body, &u.FileRename)
10081
10082 if err != nil {
10083 return err
10084 }
10085 case "file_restore":
10086 err = json.Unmarshal(body, &u.FileRestore)
10087
10088 if err != nil {
10089 return err
10090 }
10091 case "file_revert":
10092 err = json.Unmarshal(body, &u.FileRevert)
10093
10094 if err != nil {
10095 return err
10096 }
10097 case "file_rollback_changes":
10098 err = json.Unmarshal(body, &u.FileRollbackChanges)
10099
10100 if err != nil {
10101 return err
10102 }
10103 case "file_save_copy_reference":
10104 err = json.Unmarshal(body, &u.FileSaveCopyReference)
10105
10106 if err != nil {
10107 return err
10108 }
10109 case "folder_overview_description_changed":
10110 err = json.Unmarshal(body, &u.FolderOverviewDescriptionChanged)
10111
10112 if err != nil {
10113 return err
10114 }
10115 case "folder_overview_item_pinned":
10116 err = json.Unmarshal(body, &u.FolderOverviewItemPinned)
10117
10118 if err != nil {
10119 return err
10120 }
10121 case "folder_overview_item_unpinned":
10122 err = json.Unmarshal(body, &u.FolderOverviewItemUnpinned)
10123
10124 if err != nil {
10125 return err
10126 }
10127 case "object_label_added":
10128 err = json.Unmarshal(body, &u.ObjectLabelAdded)
10129
10130 if err != nil {
10131 return err
10132 }
10133 case "object_label_removed":
10134 err = json.Unmarshal(body, &u.ObjectLabelRemoved)
10135
10136 if err != nil {
10137 return err
10138 }
10139 case "object_label_updated_value":
10140 err = json.Unmarshal(body, &u.ObjectLabelUpdatedValue)
10141
10142 if err != nil {
10143 return err
10144 }
10145 case "organize_folder_with_tidy":
10146 err = json.Unmarshal(body, &u.OrganizeFolderWithTidy)
10147
10148 if err != nil {
10149 return err
10150 }
10151 case "rewind_folder":
10152 err = json.Unmarshal(body, &u.RewindFolder)
10153
10154 if err != nil {
10155 return err
10156 }
10157 case "user_tags_added":
10158 err = json.Unmarshal(body, &u.UserTagsAdded)
10159
10160 if err != nil {
10161 return err
10162 }
10163 case "user_tags_removed":
10164 err = json.Unmarshal(body, &u.UserTagsRemoved)
10165
10166 if err != nil {
10167 return err
10168 }
10169 case "file_request_change":
10170 err = json.Unmarshal(body, &u.FileRequestChange)
10171
10172 if err != nil {
10173 return err
10174 }
10175 case "file_request_close":
10176 err = json.Unmarshal(body, &u.FileRequestClose)
10177
10178 if err != nil {
10179 return err
10180 }
10181 case "file_request_create":
10182 err = json.Unmarshal(body, &u.FileRequestCreate)
10183
10184 if err != nil {
10185 return err
10186 }
10187 case "file_request_delete":
10188 err = json.Unmarshal(body, &u.FileRequestDelete)
10189
10190 if err != nil {
10191 return err
10192 }
10193 case "file_request_receive_file":
10194 err = json.Unmarshal(body, &u.FileRequestReceiveFile)
10195
10196 if err != nil {
10197 return err
10198 }
10199 case "group_add_external_id":
10200 err = json.Unmarshal(body, &u.GroupAddExternalId)
10201
10202 if err != nil {
10203 return err
10204 }
10205 case "group_add_member":
10206 err = json.Unmarshal(body, &u.GroupAddMember)
10207
10208 if err != nil {
10209 return err
10210 }
10211 case "group_change_external_id":
10212 err = json.Unmarshal(body, &u.GroupChangeExternalId)
10213
10214 if err != nil {
10215 return err
10216 }
10217 case "group_change_management_type":
10218 err = json.Unmarshal(body, &u.GroupChangeManagementType)
10219
10220 if err != nil {
10221 return err
10222 }
10223 case "group_change_member_role":
10224 err = json.Unmarshal(body, &u.GroupChangeMemberRole)
10225
10226 if err != nil {
10227 return err
10228 }
10229 case "group_create":
10230 err = json.Unmarshal(body, &u.GroupCreate)
10231
10232 if err != nil {
10233 return err
10234 }
10235 case "group_delete":
10236 err = json.Unmarshal(body, &u.GroupDelete)
10237
10238 if err != nil {
10239 return err
10240 }
10241 case "group_description_updated":
10242 err = json.Unmarshal(body, &u.GroupDescriptionUpdated)
10243
10244 if err != nil {
10245 return err
10246 }
10247 case "group_join_policy_updated":
10248 err = json.Unmarshal(body, &u.GroupJoinPolicyUpdated)
10249
10250 if err != nil {
10251 return err
10252 }
10253 case "group_moved":
10254 err = json.Unmarshal(body, &u.GroupMoved)
10255
10256 if err != nil {
10257 return err
10258 }
10259 case "group_remove_external_id":
10260 err = json.Unmarshal(body, &u.GroupRemoveExternalId)
10261
10262 if err != nil {
10263 return err
10264 }
10265 case "group_remove_member":
10266 err = json.Unmarshal(body, &u.GroupRemoveMember)
10267
10268 if err != nil {
10269 return err
10270 }
10271 case "group_rename":
10272 err = json.Unmarshal(body, &u.GroupRename)
10273
10274 if err != nil {
10275 return err
10276 }
10277 case "account_lock_or_unlocked":
10278 err = json.Unmarshal(body, &u.AccountLockOrUnlocked)
10279
10280 if err != nil {
10281 return err
10282 }
10283 case "emm_error":
10284 err = json.Unmarshal(body, &u.EmmError)
10285
10286 if err != nil {
10287 return err
10288 }
10289 case "guest_admin_signed_in_via_trusted_teams":
10290 err = json.Unmarshal(body, &u.GuestAdminSignedInViaTrustedTeams)
10291
10292 if err != nil {
10293 return err
10294 }
10295 case "guest_admin_signed_out_via_trusted_teams":
10296 err = json.Unmarshal(body, &u.GuestAdminSignedOutViaTrustedTeams)
10297
10298 if err != nil {
10299 return err
10300 }
10301 case "login_fail":
10302 err = json.Unmarshal(body, &u.LoginFail)
10303
10304 if err != nil {
10305 return err
10306 }
10307 case "login_success":
10308 err = json.Unmarshal(body, &u.LoginSuccess)
10309
10310 if err != nil {
10311 return err
10312 }
10313 case "logout":
10314 err = json.Unmarshal(body, &u.Logout)
10315
10316 if err != nil {
10317 return err
10318 }
10319 case "reseller_support_session_end":
10320 err = json.Unmarshal(body, &u.ResellerSupportSessionEnd)
10321
10322 if err != nil {
10323 return err
10324 }
10325 case "reseller_support_session_start":
10326 err = json.Unmarshal(body, &u.ResellerSupportSessionStart)
10327
10328 if err != nil {
10329 return err
10330 }
10331 case "sign_in_as_session_end":
10332 err = json.Unmarshal(body, &u.SignInAsSessionEnd)
10333
10334 if err != nil {
10335 return err
10336 }
10337 case "sign_in_as_session_start":
10338 err = json.Unmarshal(body, &u.SignInAsSessionStart)
10339
10340 if err != nil {
10341 return err
10342 }
10343 case "sso_error":
10344 err = json.Unmarshal(body, &u.SsoError)
10345
10346 if err != nil {
10347 return err
10348 }
10349 case "create_team_invite_link":
10350 err = json.Unmarshal(body, &u.CreateTeamInviteLink)
10351
10352 if err != nil {
10353 return err
10354 }
10355 case "delete_team_invite_link":
10356 err = json.Unmarshal(body, &u.DeleteTeamInviteLink)
10357
10358 if err != nil {
10359 return err
10360 }
10361 case "member_add_external_id":
10362 err = json.Unmarshal(body, &u.MemberAddExternalId)
10363
10364 if err != nil {
10365 return err
10366 }
10367 case "member_add_name":
10368 err = json.Unmarshal(body, &u.MemberAddName)
10369
10370 if err != nil {
10371 return err
10372 }
10373 case "member_change_admin_role":
10374 err = json.Unmarshal(body, &u.MemberChangeAdminRole)
10375
10376 if err != nil {
10377 return err
10378 }
10379 case "member_change_email":
10380 err = json.Unmarshal(body, &u.MemberChangeEmail)
10381
10382 if err != nil {
10383 return err
10384 }
10385 case "member_change_external_id":
10386 err = json.Unmarshal(body, &u.MemberChangeExternalId)
10387
10388 if err != nil {
10389 return err
10390 }
10391 case "member_change_membership_type":
10392 err = json.Unmarshal(body, &u.MemberChangeMembershipType)
10393
10394 if err != nil {
10395 return err
10396 }
10397 case "member_change_name":
10398 err = json.Unmarshal(body, &u.MemberChangeName)
10399
10400 if err != nil {
10401 return err
10402 }
10403 case "member_change_reseller_role":
10404 err = json.Unmarshal(body, &u.MemberChangeResellerRole)
10405
10406 if err != nil {
10407 return err
10408 }
10409 case "member_change_status":
10410 err = json.Unmarshal(body, &u.MemberChangeStatus)
10411
10412 if err != nil {
10413 return err
10414 }
10415 case "member_delete_manual_contacts":
10416 err = json.Unmarshal(body, &u.MemberDeleteManualContacts)
10417
10418 if err != nil {
10419 return err
10420 }
10421 case "member_delete_profile_photo":
10422 err = json.Unmarshal(body, &u.MemberDeleteProfilePhoto)
10423
10424 if err != nil {
10425 return err
10426 }
10427 case "member_permanently_delete_account_contents":
10428 err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContents)
10429
10430 if err != nil {
10431 return err
10432 }
10433 case "member_remove_external_id":
10434 err = json.Unmarshal(body, &u.MemberRemoveExternalId)
10435
10436 if err != nil {
10437 return err
10438 }
10439 case "member_set_profile_photo":
10440 err = json.Unmarshal(body, &u.MemberSetProfilePhoto)
10441
10442 if err != nil {
10443 return err
10444 }
10445 case "member_space_limits_add_custom_quota":
10446 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuota)
10447
10448 if err != nil {
10449 return err
10450 }
10451 case "member_space_limits_change_custom_quota":
10452 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuota)
10453
10454 if err != nil {
10455 return err
10456 }
10457 case "member_space_limits_change_status":
10458 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatus)
10459
10460 if err != nil {
10461 return err
10462 }
10463 case "member_space_limits_remove_custom_quota":
10464 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuota)
10465
10466 if err != nil {
10467 return err
10468 }
10469 case "member_suggest":
10470 err = json.Unmarshal(body, &u.MemberSuggest)
10471
10472 if err != nil {
10473 return err
10474 }
10475 case "member_transfer_account_contents":
10476 err = json.Unmarshal(body, &u.MemberTransferAccountContents)
10477
10478 if err != nil {
10479 return err
10480 }
10481 case "pending_secondary_email_added":
10482 err = json.Unmarshal(body, &u.PendingSecondaryEmailAdded)
10483
10484 if err != nil {
10485 return err
10486 }
10487 case "secondary_email_deleted":
10488 err = json.Unmarshal(body, &u.SecondaryEmailDeleted)
10489
10490 if err != nil {
10491 return err
10492 }
10493 case "secondary_email_verified":
10494 err = json.Unmarshal(body, &u.SecondaryEmailVerified)
10495
10496 if err != nil {
10497 return err
10498 }
10499 case "secondary_mails_policy_changed":
10500 err = json.Unmarshal(body, &u.SecondaryMailsPolicyChanged)
10501
10502 if err != nil {
10503 return err
10504 }
10505 case "binder_add_page":
10506 err = json.Unmarshal(body, &u.BinderAddPage)
10507
10508 if err != nil {
10509 return err
10510 }
10511 case "binder_add_section":
10512 err = json.Unmarshal(body, &u.BinderAddSection)
10513
10514 if err != nil {
10515 return err
10516 }
10517 case "binder_remove_page":
10518 err = json.Unmarshal(body, &u.BinderRemovePage)
10519
10520 if err != nil {
10521 return err
10522 }
10523 case "binder_remove_section":
10524 err = json.Unmarshal(body, &u.BinderRemoveSection)
10525
10526 if err != nil {
10527 return err
10528 }
10529 case "binder_rename_page":
10530 err = json.Unmarshal(body, &u.BinderRenamePage)
10531
10532 if err != nil {
10533 return err
10534 }
10535 case "binder_rename_section":
10536 err = json.Unmarshal(body, &u.BinderRenameSection)
10537
10538 if err != nil {
10539 return err
10540 }
10541 case "binder_reorder_page":
10542 err = json.Unmarshal(body, &u.BinderReorderPage)
10543
10544 if err != nil {
10545 return err
10546 }
10547 case "binder_reorder_section":
10548 err = json.Unmarshal(body, &u.BinderReorderSection)
10549
10550 if err != nil {
10551 return err
10552 }
10553 case "paper_content_add_member":
10554 err = json.Unmarshal(body, &u.PaperContentAddMember)
10555
10556 if err != nil {
10557 return err
10558 }
10559 case "paper_content_add_to_folder":
10560 err = json.Unmarshal(body, &u.PaperContentAddToFolder)
10561
10562 if err != nil {
10563 return err
10564 }
10565 case "paper_content_archive":
10566 err = json.Unmarshal(body, &u.PaperContentArchive)
10567
10568 if err != nil {
10569 return err
10570 }
10571 case "paper_content_create":
10572 err = json.Unmarshal(body, &u.PaperContentCreate)
10573
10574 if err != nil {
10575 return err
10576 }
10577 case "paper_content_permanently_delete":
10578 err = json.Unmarshal(body, &u.PaperContentPermanentlyDelete)
10579
10580 if err != nil {
10581 return err
10582 }
10583 case "paper_content_remove_from_folder":
10584 err = json.Unmarshal(body, &u.PaperContentRemoveFromFolder)
10585
10586 if err != nil {
10587 return err
10588 }
10589 case "paper_content_remove_member":
10590 err = json.Unmarshal(body, &u.PaperContentRemoveMember)
10591
10592 if err != nil {
10593 return err
10594 }
10595 case "paper_content_rename":
10596 err = json.Unmarshal(body, &u.PaperContentRename)
10597
10598 if err != nil {
10599 return err
10600 }
10601 case "paper_content_restore":
10602 err = json.Unmarshal(body, &u.PaperContentRestore)
10603
10604 if err != nil {
10605 return err
10606 }
10607 case "paper_doc_add_comment":
10608 err = json.Unmarshal(body, &u.PaperDocAddComment)
10609
10610 if err != nil {
10611 return err
10612 }
10613 case "paper_doc_change_member_role":
10614 err = json.Unmarshal(body, &u.PaperDocChangeMemberRole)
10615
10616 if err != nil {
10617 return err
10618 }
10619 case "paper_doc_change_sharing_policy":
10620 err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicy)
10621
10622 if err != nil {
10623 return err
10624 }
10625 case "paper_doc_change_subscription":
10626 err = json.Unmarshal(body, &u.PaperDocChangeSubscription)
10627
10628 if err != nil {
10629 return err
10630 }
10631 case "paper_doc_deleted":
10632 err = json.Unmarshal(body, &u.PaperDocDeleted)
10633
10634 if err != nil {
10635 return err
10636 }
10637 case "paper_doc_delete_comment":
10638 err = json.Unmarshal(body, &u.PaperDocDeleteComment)
10639
10640 if err != nil {
10641 return err
10642 }
10643 case "paper_doc_download":
10644 err = json.Unmarshal(body, &u.PaperDocDownload)
10645
10646 if err != nil {
10647 return err
10648 }
10649 case "paper_doc_edit":
10650 err = json.Unmarshal(body, &u.PaperDocEdit)
10651
10652 if err != nil {
10653 return err
10654 }
10655 case "paper_doc_edit_comment":
10656 err = json.Unmarshal(body, &u.PaperDocEditComment)
10657
10658 if err != nil {
10659 return err
10660 }
10661 case "paper_doc_followed":
10662 err = json.Unmarshal(body, &u.PaperDocFollowed)
10663
10664 if err != nil {
10665 return err
10666 }
10667 case "paper_doc_mention":
10668 err = json.Unmarshal(body, &u.PaperDocMention)
10669
10670 if err != nil {
10671 return err
10672 }
10673 case "paper_doc_ownership_changed":
10674 err = json.Unmarshal(body, &u.PaperDocOwnershipChanged)
10675
10676 if err != nil {
10677 return err
10678 }
10679 case "paper_doc_request_access":
10680 err = json.Unmarshal(body, &u.PaperDocRequestAccess)
10681
10682 if err != nil {
10683 return err
10684 }
10685 case "paper_doc_resolve_comment":
10686 err = json.Unmarshal(body, &u.PaperDocResolveComment)
10687
10688 if err != nil {
10689 return err
10690 }
10691 case "paper_doc_revert":
10692 err = json.Unmarshal(body, &u.PaperDocRevert)
10693
10694 if err != nil {
10695 return err
10696 }
10697 case "paper_doc_slack_share":
10698 err = json.Unmarshal(body, &u.PaperDocSlackShare)
10699
10700 if err != nil {
10701 return err
10702 }
10703 case "paper_doc_team_invite":
10704 err = json.Unmarshal(body, &u.PaperDocTeamInvite)
10705
10706 if err != nil {
10707 return err
10708 }
10709 case "paper_doc_trashed":
10710 err = json.Unmarshal(body, &u.PaperDocTrashed)
10711
10712 if err != nil {
10713 return err
10714 }
10715 case "paper_doc_unresolve_comment":
10716 err = json.Unmarshal(body, &u.PaperDocUnresolveComment)
10717
10718 if err != nil {
10719 return err
10720 }
10721 case "paper_doc_untrashed":
10722 err = json.Unmarshal(body, &u.PaperDocUntrashed)
10723
10724 if err != nil {
10725 return err
10726 }
10727 case "paper_doc_view":
10728 err = json.Unmarshal(body, &u.PaperDocView)
10729
10730 if err != nil {
10731 return err
10732 }
10733 case "paper_external_view_allow":
10734 err = json.Unmarshal(body, &u.PaperExternalViewAllow)
10735
10736 if err != nil {
10737 return err
10738 }
10739 case "paper_external_view_default_team":
10740 err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeam)
10741
10742 if err != nil {
10743 return err
10744 }
10745 case "paper_external_view_forbid":
10746 err = json.Unmarshal(body, &u.PaperExternalViewForbid)
10747
10748 if err != nil {
10749 return err
10750 }
10751 case "paper_folder_change_subscription":
10752 err = json.Unmarshal(body, &u.PaperFolderChangeSubscription)
10753
10754 if err != nil {
10755 return err
10756 }
10757 case "paper_folder_deleted":
10758 err = json.Unmarshal(body, &u.PaperFolderDeleted)
10759
10760 if err != nil {
10761 return err
10762 }
10763 case "paper_folder_followed":
10764 err = json.Unmarshal(body, &u.PaperFolderFollowed)
10765
10766 if err != nil {
10767 return err
10768 }
10769 case "paper_folder_team_invite":
10770 err = json.Unmarshal(body, &u.PaperFolderTeamInvite)
10771
10772 if err != nil {
10773 return err
10774 }
10775 case "paper_published_link_change_permission":
10776 err = json.Unmarshal(body, &u.PaperPublishedLinkChangePermission)
10777
10778 if err != nil {
10779 return err
10780 }
10781 case "paper_published_link_create":
10782 err = json.Unmarshal(body, &u.PaperPublishedLinkCreate)
10783
10784 if err != nil {
10785 return err
10786 }
10787 case "paper_published_link_disabled":
10788 err = json.Unmarshal(body, &u.PaperPublishedLinkDisabled)
10789
10790 if err != nil {
10791 return err
10792 }
10793 case "paper_published_link_view":
10794 err = json.Unmarshal(body, &u.PaperPublishedLinkView)
10795
10796 if err != nil {
10797 return err
10798 }
10799 case "password_change":
10800 err = json.Unmarshal(body, &u.PasswordChange)
10801
10802 if err != nil {
10803 return err
10804 }
10805 case "password_reset":
10806 err = json.Unmarshal(body, &u.PasswordReset)
10807
10808 if err != nil {
10809 return err
10810 }
10811 case "password_reset_all":
10812 err = json.Unmarshal(body, &u.PasswordResetAll)
10813
10814 if err != nil {
10815 return err
10816 }
10817 case "classification_create_report":
10818 err = json.Unmarshal(body, &u.ClassificationCreateReport)
10819
10820 if err != nil {
10821 return err
10822 }
10823 case "classification_create_report_fail":
10824 err = json.Unmarshal(body, &u.ClassificationCreateReportFail)
10825
10826 if err != nil {
10827 return err
10828 }
10829 case "emm_create_exceptions_report":
10830 err = json.Unmarshal(body, &u.EmmCreateExceptionsReport)
10831
10832 if err != nil {
10833 return err
10834 }
10835 case "emm_create_usage_report":
10836 err = json.Unmarshal(body, &u.EmmCreateUsageReport)
10837
10838 if err != nil {
10839 return err
10840 }
10841 case "export_members_report":
10842 err = json.Unmarshal(body, &u.ExportMembersReport)
10843
10844 if err != nil {
10845 return err
10846 }
10847 case "export_members_report_fail":
10848 err = json.Unmarshal(body, &u.ExportMembersReportFail)
10849
10850 if err != nil {
10851 return err
10852 }
10853 case "external_sharing_create_report":
10854 err = json.Unmarshal(body, &u.ExternalSharingCreateReport)
10855
10856 if err != nil {
10857 return err
10858 }
10859 case "external_sharing_report_failed":
10860 err = json.Unmarshal(body, &u.ExternalSharingReportFailed)
10861
10862 if err != nil {
10863 return err
10864 }
10865 case "no_expiration_link_gen_create_report":
10866 err = json.Unmarshal(body, &u.NoExpirationLinkGenCreateReport)
10867
10868 if err != nil {
10869 return err
10870 }
10871 case "no_expiration_link_gen_report_failed":
10872 err = json.Unmarshal(body, &u.NoExpirationLinkGenReportFailed)
10873
10874 if err != nil {
10875 return err
10876 }
10877 case "no_password_link_gen_create_report":
10878 err = json.Unmarshal(body, &u.NoPasswordLinkGenCreateReport)
10879
10880 if err != nil {
10881 return err
10882 }
10883 case "no_password_link_gen_report_failed":
10884 err = json.Unmarshal(body, &u.NoPasswordLinkGenReportFailed)
10885
10886 if err != nil {
10887 return err
10888 }
10889 case "no_password_link_view_create_report":
10890 err = json.Unmarshal(body, &u.NoPasswordLinkViewCreateReport)
10891
10892 if err != nil {
10893 return err
10894 }
10895 case "no_password_link_view_report_failed":
10896 err = json.Unmarshal(body, &u.NoPasswordLinkViewReportFailed)
10897
10898 if err != nil {
10899 return err
10900 }
10901 case "outdated_link_view_create_report":
10902 err = json.Unmarshal(body, &u.OutdatedLinkViewCreateReport)
10903
10904 if err != nil {
10905 return err
10906 }
10907 case "outdated_link_view_report_failed":
10908 err = json.Unmarshal(body, &u.OutdatedLinkViewReportFailed)
10909
10910 if err != nil {
10911 return err
10912 }
10913 case "paper_admin_export_start":
10914 err = json.Unmarshal(body, &u.PaperAdminExportStart)
10915
10916 if err != nil {
10917 return err
10918 }
10919 case "smart_sync_create_admin_privilege_report":
10920 err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReport)
10921
10922 if err != nil {
10923 return err
10924 }
10925 case "team_activity_create_report":
10926 err = json.Unmarshal(body, &u.TeamActivityCreateReport)
10927
10928 if err != nil {
10929 return err
10930 }
10931 case "team_activity_create_report_fail":
10932 err = json.Unmarshal(body, &u.TeamActivityCreateReportFail)
10933
10934 if err != nil {
10935 return err
10936 }
10937 case "collection_share":
10938 err = json.Unmarshal(body, &u.CollectionShare)
10939
10940 if err != nil {
10941 return err
10942 }
10943 case "file_transfers_file_add":
10944 err = json.Unmarshal(body, &u.FileTransfersFileAdd)
10945
10946 if err != nil {
10947 return err
10948 }
10949 case "file_transfers_transfer_delete":
10950 err = json.Unmarshal(body, &u.FileTransfersTransferDelete)
10951
10952 if err != nil {
10953 return err
10954 }
10955 case "file_transfers_transfer_download":
10956 err = json.Unmarshal(body, &u.FileTransfersTransferDownload)
10957
10958 if err != nil {
10959 return err
10960 }
10961 case "file_transfers_transfer_send":
10962 err = json.Unmarshal(body, &u.FileTransfersTransferSend)
10963
10964 if err != nil {
10965 return err
10966 }
10967 case "file_transfers_transfer_view":
10968 err = json.Unmarshal(body, &u.FileTransfersTransferView)
10969
10970 if err != nil {
10971 return err
10972 }
10973 case "note_acl_invite_only":
10974 err = json.Unmarshal(body, &u.NoteAclInviteOnly)
10975
10976 if err != nil {
10977 return err
10978 }
10979 case "note_acl_link":
10980 err = json.Unmarshal(body, &u.NoteAclLink)
10981
10982 if err != nil {
10983 return err
10984 }
10985 case "note_acl_team_link":
10986 err = json.Unmarshal(body, &u.NoteAclTeamLink)
10987
10988 if err != nil {
10989 return err
10990 }
10991 case "note_shared":
10992 err = json.Unmarshal(body, &u.NoteShared)
10993
10994 if err != nil {
10995 return err
10996 }
10997 case "note_share_receive":
10998 err = json.Unmarshal(body, &u.NoteShareReceive)
10999
11000 if err != nil {
11001 return err
11002 }
11003 case "open_note_shared":
11004 err = json.Unmarshal(body, &u.OpenNoteShared)
11005
11006 if err != nil {
11007 return err
11008 }
11009 case "sf_add_group":
11010 err = json.Unmarshal(body, &u.SfAddGroup)
11011
11012 if err != nil {
11013 return err
11014 }
11015 case "sf_allow_non_members_to_view_shared_links":
11016 err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinks)
11017
11018 if err != nil {
11019 return err
11020 }
11021 case "sf_external_invite_warn":
11022 err = json.Unmarshal(body, &u.SfExternalInviteWarn)
11023
11024 if err != nil {
11025 return err
11026 }
11027 case "sf_fb_invite":
11028 err = json.Unmarshal(body, &u.SfFbInvite)
11029
11030 if err != nil {
11031 return err
11032 }
11033 case "sf_fb_invite_change_role":
11034 err = json.Unmarshal(body, &u.SfFbInviteChangeRole)
11035
11036 if err != nil {
11037 return err
11038 }
11039 case "sf_fb_uninvite":
11040 err = json.Unmarshal(body, &u.SfFbUninvite)
11041
11042 if err != nil {
11043 return err
11044 }
11045 case "sf_invite_group":
11046 err = json.Unmarshal(body, &u.SfInviteGroup)
11047
11048 if err != nil {
11049 return err
11050 }
11051 case "sf_team_grant_access":
11052 err = json.Unmarshal(body, &u.SfTeamGrantAccess)
11053
11054 if err != nil {
11055 return err
11056 }
11057 case "sf_team_invite":
11058 err = json.Unmarshal(body, &u.SfTeamInvite)
11059
11060 if err != nil {
11061 return err
11062 }
11063 case "sf_team_invite_change_role":
11064 err = json.Unmarshal(body, &u.SfTeamInviteChangeRole)
11065
11066 if err != nil {
11067 return err
11068 }
11069 case "sf_team_join":
11070 err = json.Unmarshal(body, &u.SfTeamJoin)
11071
11072 if err != nil {
11073 return err
11074 }
11075 case "sf_team_join_from_oob_link":
11076 err = json.Unmarshal(body, &u.SfTeamJoinFromOobLink)
11077
11078 if err != nil {
11079 return err
11080 }
11081 case "sf_team_uninvite":
11082 err = json.Unmarshal(body, &u.SfTeamUninvite)
11083
11084 if err != nil {
11085 return err
11086 }
11087 case "shared_content_add_invitees":
11088 err = json.Unmarshal(body, &u.SharedContentAddInvitees)
11089
11090 if err != nil {
11091 return err
11092 }
11093 case "shared_content_add_link_expiry":
11094 err = json.Unmarshal(body, &u.SharedContentAddLinkExpiry)
11095
11096 if err != nil {
11097 return err
11098 }
11099 case "shared_content_add_link_password":
11100 err = json.Unmarshal(body, &u.SharedContentAddLinkPassword)
11101
11102 if err != nil {
11103 return err
11104 }
11105 case "shared_content_add_member":
11106 err = json.Unmarshal(body, &u.SharedContentAddMember)
11107
11108 if err != nil {
11109 return err
11110 }
11111 case "shared_content_change_downloads_policy":
11112 err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicy)
11113
11114 if err != nil {
11115 return err
11116 }
11117 case "shared_content_change_invitee_role":
11118 err = json.Unmarshal(body, &u.SharedContentChangeInviteeRole)
11119
11120 if err != nil {
11121 return err
11122 }
11123 case "shared_content_change_link_audience":
11124 err = json.Unmarshal(body, &u.SharedContentChangeLinkAudience)
11125
11126 if err != nil {
11127 return err
11128 }
11129 case "shared_content_change_link_expiry":
11130 err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiry)
11131
11132 if err != nil {
11133 return err
11134 }
11135 case "shared_content_change_link_password":
11136 err = json.Unmarshal(body, &u.SharedContentChangeLinkPassword)
11137
11138 if err != nil {
11139 return err
11140 }
11141 case "shared_content_change_member_role":
11142 err = json.Unmarshal(body, &u.SharedContentChangeMemberRole)
11143
11144 if err != nil {
11145 return err
11146 }
11147 case "shared_content_change_viewer_info_policy":
11148 err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicy)
11149
11150 if err != nil {
11151 return err
11152 }
11153 case "shared_content_claim_invitation":
11154 err = json.Unmarshal(body, &u.SharedContentClaimInvitation)
11155
11156 if err != nil {
11157 return err
11158 }
11159 case "shared_content_copy":
11160 err = json.Unmarshal(body, &u.SharedContentCopy)
11161
11162 if err != nil {
11163 return err
11164 }
11165 case "shared_content_download":
11166 err = json.Unmarshal(body, &u.SharedContentDownload)
11167
11168 if err != nil {
11169 return err
11170 }
11171 case "shared_content_relinquish_membership":
11172 err = json.Unmarshal(body, &u.SharedContentRelinquishMembership)
11173
11174 if err != nil {
11175 return err
11176 }
11177 case "shared_content_remove_invitees":
11178 err = json.Unmarshal(body, &u.SharedContentRemoveInvitees)
11179
11180 if err != nil {
11181 return err
11182 }
11183 case "shared_content_remove_link_expiry":
11184 err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiry)
11185
11186 if err != nil {
11187 return err
11188 }
11189 case "shared_content_remove_link_password":
11190 err = json.Unmarshal(body, &u.SharedContentRemoveLinkPassword)
11191
11192 if err != nil {
11193 return err
11194 }
11195 case "shared_content_remove_member":
11196 err = json.Unmarshal(body, &u.SharedContentRemoveMember)
11197
11198 if err != nil {
11199 return err
11200 }
11201 case "shared_content_request_access":
11202 err = json.Unmarshal(body, &u.SharedContentRequestAccess)
11203
11204 if err != nil {
11205 return err
11206 }
11207 case "shared_content_restore_invitees":
11208 err = json.Unmarshal(body, &u.SharedContentRestoreInvitees)
11209
11210 if err != nil {
11211 return err
11212 }
11213 case "shared_content_restore_member":
11214 err = json.Unmarshal(body, &u.SharedContentRestoreMember)
11215
11216 if err != nil {
11217 return err
11218 }
11219 case "shared_content_unshare":
11220 err = json.Unmarshal(body, &u.SharedContentUnshare)
11221
11222 if err != nil {
11223 return err
11224 }
11225 case "shared_content_view":
11226 err = json.Unmarshal(body, &u.SharedContentView)
11227
11228 if err != nil {
11229 return err
11230 }
11231 case "shared_folder_change_link_policy":
11232 err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicy)
11233
11234 if err != nil {
11235 return err
11236 }
11237 case "shared_folder_change_members_inheritance_policy":
11238 err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicy)
11239
11240 if err != nil {
11241 return err
11242 }
11243 case "shared_folder_change_members_management_policy":
11244 err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicy)
11245
11246 if err != nil {
11247 return err
11248 }
11249 case "shared_folder_change_members_policy":
11250 err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicy)
11251
11252 if err != nil {
11253 return err
11254 }
11255 case "shared_folder_create":
11256 err = json.Unmarshal(body, &u.SharedFolderCreate)
11257
11258 if err != nil {
11259 return err
11260 }
11261 case "shared_folder_decline_invitation":
11262 err = json.Unmarshal(body, &u.SharedFolderDeclineInvitation)
11263
11264 if err != nil {
11265 return err
11266 }
11267 case "shared_folder_mount":
11268 err = json.Unmarshal(body, &u.SharedFolderMount)
11269
11270 if err != nil {
11271 return err
11272 }
11273 case "shared_folder_nest":
11274 err = json.Unmarshal(body, &u.SharedFolderNest)
11275
11276 if err != nil {
11277 return err
11278 }
11279 case "shared_folder_transfer_ownership":
11280 err = json.Unmarshal(body, &u.SharedFolderTransferOwnership)
11281
11282 if err != nil {
11283 return err
11284 }
11285 case "shared_folder_unmount":
11286 err = json.Unmarshal(body, &u.SharedFolderUnmount)
11287
11288 if err != nil {
11289 return err
11290 }
11291 case "shared_link_add_expiry":
11292 err = json.Unmarshal(body, &u.SharedLinkAddExpiry)
11293
11294 if err != nil {
11295 return err
11296 }
11297 case "shared_link_change_expiry":
11298 err = json.Unmarshal(body, &u.SharedLinkChangeExpiry)
11299
11300 if err != nil {
11301 return err
11302 }
11303 case "shared_link_change_visibility":
11304 err = json.Unmarshal(body, &u.SharedLinkChangeVisibility)
11305
11306 if err != nil {
11307 return err
11308 }
11309 case "shared_link_copy":
11310 err = json.Unmarshal(body, &u.SharedLinkCopy)
11311
11312 if err != nil {
11313 return err
11314 }
11315 case "shared_link_create":
11316 err = json.Unmarshal(body, &u.SharedLinkCreate)
11317
11318 if err != nil {
11319 return err
11320 }
11321 case "shared_link_disable":
11322 err = json.Unmarshal(body, &u.SharedLinkDisable)
11323
11324 if err != nil {
11325 return err
11326 }
11327 case "shared_link_download":
11328 err = json.Unmarshal(body, &u.SharedLinkDownload)
11329
11330 if err != nil {
11331 return err
11332 }
11333 case "shared_link_remove_expiry":
11334 err = json.Unmarshal(body, &u.SharedLinkRemoveExpiry)
11335
11336 if err != nil {
11337 return err
11338 }
11339 case "shared_link_settings_add_expiration":
11340 err = json.Unmarshal(body, &u.SharedLinkSettingsAddExpiration)
11341
11342 if err != nil {
11343 return err
11344 }
11345 case "shared_link_settings_add_password":
11346 err = json.Unmarshal(body, &u.SharedLinkSettingsAddPassword)
11347
11348 if err != nil {
11349 return err
11350 }
11351 case "shared_link_settings_allow_download_disabled":
11352 err = json.Unmarshal(body, &u.SharedLinkSettingsAllowDownloadDisabled)
11353
11354 if err != nil {
11355 return err
11356 }
11357 case "shared_link_settings_allow_download_enabled":
11358 err = json.Unmarshal(body, &u.SharedLinkSettingsAllowDownloadEnabled)
11359
11360 if err != nil {
11361 return err
11362 }
11363 case "shared_link_settings_change_audience":
11364 err = json.Unmarshal(body, &u.SharedLinkSettingsChangeAudience)
11365
11366 if err != nil {
11367 return err
11368 }
11369 case "shared_link_settings_change_expiration":
11370 err = json.Unmarshal(body, &u.SharedLinkSettingsChangeExpiration)
11371
11372 if err != nil {
11373 return err
11374 }
11375 case "shared_link_settings_change_password":
11376 err = json.Unmarshal(body, &u.SharedLinkSettingsChangePassword)
11377
11378 if err != nil {
11379 return err
11380 }
11381 case "shared_link_settings_remove_expiration":
11382 err = json.Unmarshal(body, &u.SharedLinkSettingsRemoveExpiration)
11383
11384 if err != nil {
11385 return err
11386 }
11387 case "shared_link_settings_remove_password":
11388 err = json.Unmarshal(body, &u.SharedLinkSettingsRemovePassword)
11389
11390 if err != nil {
11391 return err
11392 }
11393 case "shared_link_share":
11394 err = json.Unmarshal(body, &u.SharedLinkShare)
11395
11396 if err != nil {
11397 return err
11398 }
11399 case "shared_link_view":
11400 err = json.Unmarshal(body, &u.SharedLinkView)
11401
11402 if err != nil {
11403 return err
11404 }
11405 case "shared_note_opened":
11406 err = json.Unmarshal(body, &u.SharedNoteOpened)
11407
11408 if err != nil {
11409 return err
11410 }
11411 case "shmodel_disable_downloads":
11412 err = json.Unmarshal(body, &u.ShmodelDisableDownloads)
11413
11414 if err != nil {
11415 return err
11416 }
11417 case "shmodel_enable_downloads":
11418 err = json.Unmarshal(body, &u.ShmodelEnableDownloads)
11419
11420 if err != nil {
11421 return err
11422 }
11423 case "shmodel_group_share":
11424 err = json.Unmarshal(body, &u.ShmodelGroupShare)
11425
11426 if err != nil {
11427 return err
11428 }
11429 case "showcase_access_granted":
11430 err = json.Unmarshal(body, &u.ShowcaseAccessGranted)
11431
11432 if err != nil {
11433 return err
11434 }
11435 case "showcase_add_member":
11436 err = json.Unmarshal(body, &u.ShowcaseAddMember)
11437
11438 if err != nil {
11439 return err
11440 }
11441 case "showcase_archived":
11442 err = json.Unmarshal(body, &u.ShowcaseArchived)
11443
11444 if err != nil {
11445 return err
11446 }
11447 case "showcase_created":
11448 err = json.Unmarshal(body, &u.ShowcaseCreated)
11449
11450 if err != nil {
11451 return err
11452 }
11453 case "showcase_delete_comment":
11454 err = json.Unmarshal(body, &u.ShowcaseDeleteComment)
11455
11456 if err != nil {
11457 return err
11458 }
11459 case "showcase_edited":
11460 err = json.Unmarshal(body, &u.ShowcaseEdited)
11461
11462 if err != nil {
11463 return err
11464 }
11465 case "showcase_edit_comment":
11466 err = json.Unmarshal(body, &u.ShowcaseEditComment)
11467
11468 if err != nil {
11469 return err
11470 }
11471 case "showcase_file_added":
11472 err = json.Unmarshal(body, &u.ShowcaseFileAdded)
11473
11474 if err != nil {
11475 return err
11476 }
11477 case "showcase_file_download":
11478 err = json.Unmarshal(body, &u.ShowcaseFileDownload)
11479
11480 if err != nil {
11481 return err
11482 }
11483 case "showcase_file_removed":
11484 err = json.Unmarshal(body, &u.ShowcaseFileRemoved)
11485
11486 if err != nil {
11487 return err
11488 }
11489 case "showcase_file_view":
11490 err = json.Unmarshal(body, &u.ShowcaseFileView)
11491
11492 if err != nil {
11493 return err
11494 }
11495 case "showcase_permanently_deleted":
11496 err = json.Unmarshal(body, &u.ShowcasePermanentlyDeleted)
11497
11498 if err != nil {
11499 return err
11500 }
11501 case "showcase_post_comment":
11502 err = json.Unmarshal(body, &u.ShowcasePostComment)
11503
11504 if err != nil {
11505 return err
11506 }
11507 case "showcase_remove_member":
11508 err = json.Unmarshal(body, &u.ShowcaseRemoveMember)
11509
11510 if err != nil {
11511 return err
11512 }
11513 case "showcase_renamed":
11514 err = json.Unmarshal(body, &u.ShowcaseRenamed)
11515
11516 if err != nil {
11517 return err
11518 }
11519 case "showcase_request_access":
11520 err = json.Unmarshal(body, &u.ShowcaseRequestAccess)
11521
11522 if err != nil {
11523 return err
11524 }
11525 case "showcase_resolve_comment":
11526 err = json.Unmarshal(body, &u.ShowcaseResolveComment)
11527
11528 if err != nil {
11529 return err
11530 }
11531 case "showcase_restored":
11532 err = json.Unmarshal(body, &u.ShowcaseRestored)
11533
11534 if err != nil {
11535 return err
11536 }
11537 case "showcase_trashed":
11538 err = json.Unmarshal(body, &u.ShowcaseTrashed)
11539
11540 if err != nil {
11541 return err
11542 }
11543 case "showcase_trashed_deprecated":
11544 err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecated)
11545
11546 if err != nil {
11547 return err
11548 }
11549 case "showcase_unresolve_comment":
11550 err = json.Unmarshal(body, &u.ShowcaseUnresolveComment)
11551
11552 if err != nil {
11553 return err
11554 }
11555 case "showcase_untrashed":
11556 err = json.Unmarshal(body, &u.ShowcaseUntrashed)
11557
11558 if err != nil {
11559 return err
11560 }
11561 case "showcase_untrashed_deprecated":
11562 err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecated)
11563
11564 if err != nil {
11565 return err
11566 }
11567 case "showcase_view":
11568 err = json.Unmarshal(body, &u.ShowcaseView)
11569
11570 if err != nil {
11571 return err
11572 }
11573 case "sso_add_cert":
11574 err = json.Unmarshal(body, &u.SsoAddCert)
11575
11576 if err != nil {
11577 return err
11578 }
11579 case "sso_add_login_url":
11580 err = json.Unmarshal(body, &u.SsoAddLoginUrl)
11581
11582 if err != nil {
11583 return err
11584 }
11585 case "sso_add_logout_url":
11586 err = json.Unmarshal(body, &u.SsoAddLogoutUrl)
11587
11588 if err != nil {
11589 return err
11590 }
11591 case "sso_change_cert":
11592 err = json.Unmarshal(body, &u.SsoChangeCert)
11593
11594 if err != nil {
11595 return err
11596 }
11597 case "sso_change_login_url":
11598 err = json.Unmarshal(body, &u.SsoChangeLoginUrl)
11599
11600 if err != nil {
11601 return err
11602 }
11603 case "sso_change_logout_url":
11604 err = json.Unmarshal(body, &u.SsoChangeLogoutUrl)
11605
11606 if err != nil {
11607 return err
11608 }
11609 case "sso_change_saml_identity_mode":
11610 err = json.Unmarshal(body, &u.SsoChangeSamlIdentityMode)
11611
11612 if err != nil {
11613 return err
11614 }
11615 case "sso_remove_cert":
11616 err = json.Unmarshal(body, &u.SsoRemoveCert)
11617
11618 if err != nil {
11619 return err
11620 }
11621 case "sso_remove_login_url":
11622 err = json.Unmarshal(body, &u.SsoRemoveLoginUrl)
11623
11624 if err != nil {
11625 return err
11626 }
11627 case "sso_remove_logout_url":
11628 err = json.Unmarshal(body, &u.SsoRemoveLogoutUrl)
11629
11630 if err != nil {
11631 return err
11632 }
11633 case "team_folder_change_status":
11634 err = json.Unmarshal(body, &u.TeamFolderChangeStatus)
11635
11636 if err != nil {
11637 return err
11638 }
11639 case "team_folder_create":
11640 err = json.Unmarshal(body, &u.TeamFolderCreate)
11641
11642 if err != nil {
11643 return err
11644 }
11645 case "team_folder_downgrade":
11646 err = json.Unmarshal(body, &u.TeamFolderDowngrade)
11647
11648 if err != nil {
11649 return err
11650 }
11651 case "team_folder_permanently_delete":
11652 err = json.Unmarshal(body, &u.TeamFolderPermanentlyDelete)
11653
11654 if err != nil {
11655 return err
11656 }
11657 case "team_folder_rename":
11658 err = json.Unmarshal(body, &u.TeamFolderRename)
11659
11660 if err != nil {
11661 return err
11662 }
11663 case "team_selective_sync_settings_changed":
11664 err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChanged)
11665
11666 if err != nil {
11667 return err
11668 }
11669 case "account_capture_change_policy":
11670 err = json.Unmarshal(body, &u.AccountCaptureChangePolicy)
11671
11672 if err != nil {
11673 return err
11674 }
11675 case "allow_download_disabled":
11676 err = json.Unmarshal(body, &u.AllowDownloadDisabled)
11677
11678 if err != nil {
11679 return err
11680 }
11681 case "allow_download_enabled":
11682 err = json.Unmarshal(body, &u.AllowDownloadEnabled)
11683
11684 if err != nil {
11685 return err
11686 }
11687 case "app_permissions_changed":
11688 err = json.Unmarshal(body, &u.AppPermissionsChanged)
11689
11690 if err != nil {
11691 return err
11692 }
11693 case "camera_uploads_policy_changed":
11694 err = json.Unmarshal(body, &u.CameraUploadsPolicyChanged)
11695
11696 if err != nil {
11697 return err
11698 }
11699 case "classification_change_policy":
11700 err = json.Unmarshal(body, &u.ClassificationChangePolicy)
11701
11702 if err != nil {
11703 return err
11704 }
11705 case "computer_backup_policy_changed":
11706 err = json.Unmarshal(body, &u.ComputerBackupPolicyChanged)
11707
11708 if err != nil {
11709 return err
11710 }
11711 case "content_administration_policy_changed":
11712 err = json.Unmarshal(body, &u.ContentAdministrationPolicyChanged)
11713
11714 if err != nil {
11715 return err
11716 }
11717 case "data_placement_restriction_change_policy":
11718 err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicy)
11719
11720 if err != nil {
11721 return err
11722 }
11723 case "data_placement_restriction_satisfy_policy":
11724 err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicy)
11725
11726 if err != nil {
11727 return err
11728 }
11729 case "device_approvals_add_exception":
11730 err = json.Unmarshal(body, &u.DeviceApprovalsAddException)
11731
11732 if err != nil {
11733 return err
11734 }
11735 case "device_approvals_change_desktop_policy":
11736 err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicy)
11737
11738 if err != nil {
11739 return err
11740 }
11741 case "device_approvals_change_mobile_policy":
11742 err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicy)
11743
11744 if err != nil {
11745 return err
11746 }
11747 case "device_approvals_change_overage_action":
11748 err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageAction)
11749
11750 if err != nil {
11751 return err
11752 }
11753 case "device_approvals_change_unlink_action":
11754 err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkAction)
11755
11756 if err != nil {
11757 return err
11758 }
11759 case "device_approvals_remove_exception":
11760 err = json.Unmarshal(body, &u.DeviceApprovalsRemoveException)
11761
11762 if err != nil {
11763 return err
11764 }
11765 case "directory_restrictions_add_members":
11766 err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembers)
11767
11768 if err != nil {
11769 return err
11770 }
11771 case "directory_restrictions_remove_members":
11772 err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembers)
11773
11774 if err != nil {
11775 return err
11776 }
11777 case "emm_add_exception":
11778 err = json.Unmarshal(body, &u.EmmAddException)
11779
11780 if err != nil {
11781 return err
11782 }
11783 case "emm_change_policy":
11784 err = json.Unmarshal(body, &u.EmmChangePolicy)
11785
11786 if err != nil {
11787 return err
11788 }
11789 case "emm_remove_exception":
11790 err = json.Unmarshal(body, &u.EmmRemoveException)
11791
11792 if err != nil {
11793 return err
11794 }
11795 case "extended_version_history_change_policy":
11796 err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicy)
11797
11798 if err != nil {
11799 return err
11800 }
11801 case "file_comments_change_policy":
11802 err = json.Unmarshal(body, &u.FileCommentsChangePolicy)
11803
11804 if err != nil {
11805 return err
11806 }
11807 case "file_locking_policy_changed":
11808 err = json.Unmarshal(body, &u.FileLockingPolicyChanged)
11809
11810 if err != nil {
11811 return err
11812 }
11813 case "file_requests_change_policy":
11814 err = json.Unmarshal(body, &u.FileRequestsChangePolicy)
11815
11816 if err != nil {
11817 return err
11818 }
11819 case "file_requests_emails_enabled":
11820 err = json.Unmarshal(body, &u.FileRequestsEmailsEnabled)
11821
11822 if err != nil {
11823 return err
11824 }
11825 case "file_requests_emails_restricted_to_team_only":
11826 err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnly)
11827
11828 if err != nil {
11829 return err
11830 }
11831 case "file_transfers_policy_changed":
11832 err = json.Unmarshal(body, &u.FileTransfersPolicyChanged)
11833
11834 if err != nil {
11835 return err
11836 }
11837 case "google_sso_change_policy":
11838 err = json.Unmarshal(body, &u.GoogleSsoChangePolicy)
11839
11840 if err != nil {
11841 return err
11842 }
11843 case "group_user_management_change_policy":
11844 err = json.Unmarshal(body, &u.GroupUserManagementChangePolicy)
11845
11846 if err != nil {
11847 return err
11848 }
11849 case "integration_policy_changed":
11850 err = json.Unmarshal(body, &u.IntegrationPolicyChanged)
11851
11852 if err != nil {
11853 return err
11854 }
11855 case "invite_acceptance_email_policy_changed":
11856 err = json.Unmarshal(body, &u.InviteAcceptanceEmailPolicyChanged)
11857
11858 if err != nil {
11859 return err
11860 }
11861 case "member_requests_change_policy":
11862 err = json.Unmarshal(body, &u.MemberRequestsChangePolicy)
11863
11864 if err != nil {
11865 return err
11866 }
11867 case "member_send_invite_policy_changed":
11868 err = json.Unmarshal(body, &u.MemberSendInvitePolicyChanged)
11869
11870 if err != nil {
11871 return err
11872 }
11873 case "member_space_limits_add_exception":
11874 err = json.Unmarshal(body, &u.MemberSpaceLimitsAddException)
11875
11876 if err != nil {
11877 return err
11878 }
11879 case "member_space_limits_change_caps_type_policy":
11880 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicy)
11881
11882 if err != nil {
11883 return err
11884 }
11885 case "member_space_limits_change_policy":
11886 err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicy)
11887
11888 if err != nil {
11889 return err
11890 }
11891 case "member_space_limits_remove_exception":
11892 err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveException)
11893
11894 if err != nil {
11895 return err
11896 }
11897 case "member_suggestions_change_policy":
11898 err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicy)
11899
11900 if err != nil {
11901 return err
11902 }
11903 case "microsoft_office_addin_change_policy":
11904 err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicy)
11905
11906 if err != nil {
11907 return err
11908 }
11909 case "network_control_change_policy":
11910 err = json.Unmarshal(body, &u.NetworkControlChangePolicy)
11911
11912 if err != nil {
11913 return err
11914 }
11915 case "paper_change_deployment_policy":
11916 err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicy)
11917
11918 if err != nil {
11919 return err
11920 }
11921 case "paper_change_member_link_policy":
11922 err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicy)
11923
11924 if err != nil {
11925 return err
11926 }
11927 case "paper_change_member_policy":
11928 err = json.Unmarshal(body, &u.PaperChangeMemberPolicy)
11929
11930 if err != nil {
11931 return err
11932 }
11933 case "paper_change_policy":
11934 err = json.Unmarshal(body, &u.PaperChangePolicy)
11935
11936 if err != nil {
11937 return err
11938 }
11939 case "paper_default_folder_policy_changed":
11940 err = json.Unmarshal(body, &u.PaperDefaultFolderPolicyChanged)
11941
11942 if err != nil {
11943 return err
11944 }
11945 case "paper_desktop_policy_changed":
11946 err = json.Unmarshal(body, &u.PaperDesktopPolicyChanged)
11947
11948 if err != nil {
11949 return err
11950 }
11951 case "paper_enabled_users_group_addition":
11952 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAddition)
11953
11954 if err != nil {
11955 return err
11956 }
11957 case "paper_enabled_users_group_removal":
11958 err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemoval)
11959
11960 if err != nil {
11961 return err
11962 }
11963 case "password_strength_requirements_change_policy":
11964 err = json.Unmarshal(body, &u.PasswordStrengthRequirementsChangePolicy)
11965
11966 if err != nil {
11967 return err
11968 }
11969 case "permanent_delete_change_policy":
11970 err = json.Unmarshal(body, &u.PermanentDeleteChangePolicy)
11971
11972 if err != nil {
11973 return err
11974 }
11975 case "reseller_support_change_policy":
11976 err = json.Unmarshal(body, &u.ResellerSupportChangePolicy)
11977
11978 if err != nil {
11979 return err
11980 }
11981 case "rewind_policy_changed":
11982 err = json.Unmarshal(body, &u.RewindPolicyChanged)
11983
11984 if err != nil {
11985 return err
11986 }
11987 case "send_for_signature_policy_changed":
11988 err = json.Unmarshal(body, &u.SendForSignaturePolicyChanged)
11989
11990 if err != nil {
11991 return err
11992 }
11993 case "sharing_change_folder_join_policy":
11994 err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicy)
11995
11996 if err != nil {
11997 return err
11998 }
11999 case "sharing_change_link_allow_change_expiration_policy":
12000 err = json.Unmarshal(body, &u.SharingChangeLinkAllowChangeExpirationPolicy)
12001
12002 if err != nil {
12003 return err
12004 }
12005 case "sharing_change_link_default_expiration_policy":
12006 err = json.Unmarshal(body, &u.SharingChangeLinkDefaultExpirationPolicy)
12007
12008 if err != nil {
12009 return err
12010 }
12011 case "sharing_change_link_enforce_password_policy":
12012 err = json.Unmarshal(body, &u.SharingChangeLinkEnforcePasswordPolicy)
12013
12014 if err != nil {
12015 return err
12016 }
12017 case "sharing_change_link_policy":
12018 err = json.Unmarshal(body, &u.SharingChangeLinkPolicy)
12019
12020 if err != nil {
12021 return err
12022 }
12023 case "sharing_change_member_policy":
12024 err = json.Unmarshal(body, &u.SharingChangeMemberPolicy)
12025
12026 if err != nil {
12027 return err
12028 }
12029 case "showcase_change_download_policy":
12030 err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicy)
12031
12032 if err != nil {
12033 return err
12034 }
12035 case "showcase_change_enabled_policy":
12036 err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicy)
12037
12038 if err != nil {
12039 return err
12040 }
12041 case "showcase_change_external_sharing_policy":
12042 err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicy)
12043
12044 if err != nil {
12045 return err
12046 }
12047 case "smarter_smart_sync_policy_changed":
12048 err = json.Unmarshal(body, &u.SmarterSmartSyncPolicyChanged)
12049
12050 if err != nil {
12051 return err
12052 }
12053 case "smart_sync_change_policy":
12054 err = json.Unmarshal(body, &u.SmartSyncChangePolicy)
12055
12056 if err != nil {
12057 return err
12058 }
12059 case "smart_sync_not_opt_out":
12060 err = json.Unmarshal(body, &u.SmartSyncNotOptOut)
12061
12062 if err != nil {
12063 return err
12064 }
12065 case "smart_sync_opt_out":
12066 err = json.Unmarshal(body, &u.SmartSyncOptOut)
12067
12068 if err != nil {
12069 return err
12070 }
12071 case "sso_change_policy":
12072 err = json.Unmarshal(body, &u.SsoChangePolicy)
12073
12074 if err != nil {
12075 return err
12076 }
12077 case "team_branding_policy_changed":
12078 err = json.Unmarshal(body, &u.TeamBrandingPolicyChanged)
12079
12080 if err != nil {
12081 return err
12082 }
12083 case "team_extensions_policy_changed":
12084 err = json.Unmarshal(body, &u.TeamExtensionsPolicyChanged)
12085
12086 if err != nil {
12087 return err
12088 }
12089 case "team_selective_sync_policy_changed":
12090 err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChanged)
12091
12092 if err != nil {
12093 return err
12094 }
12095 case "team_sharing_whitelist_subjects_changed":
12096 err = json.Unmarshal(body, &u.TeamSharingWhitelistSubjectsChanged)
12097
12098 if err != nil {
12099 return err
12100 }
12101 case "tfa_add_exception":
12102 err = json.Unmarshal(body, &u.TfaAddException)
12103
12104 if err != nil {
12105 return err
12106 }
12107 case "tfa_change_policy":
12108 err = json.Unmarshal(body, &u.TfaChangePolicy)
12109
12110 if err != nil {
12111 return err
12112 }
12113 case "tfa_remove_exception":
12114 err = json.Unmarshal(body, &u.TfaRemoveException)
12115
12116 if err != nil {
12117 return err
12118 }
12119 case "two_account_change_policy":
12120 err = json.Unmarshal(body, &u.TwoAccountChangePolicy)
12121
12122 if err != nil {
12123 return err
12124 }
12125 case "viewer_info_policy_changed":
12126 err = json.Unmarshal(body, &u.ViewerInfoPolicyChanged)
12127
12128 if err != nil {
12129 return err
12130 }
12131 case "watermarking_policy_changed":
12132 err = json.Unmarshal(body, &u.WatermarkingPolicyChanged)
12133
12134 if err != nil {
12135 return err
12136 }
12137 case "web_sessions_change_active_session_limit":
12138 err = json.Unmarshal(body, &u.WebSessionsChangeActiveSessionLimit)
12139
12140 if err != nil {
12141 return err
12142 }
12143 case "web_sessions_change_fixed_length_policy":
12144 err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicy)
12145
12146 if err != nil {
12147 return err
12148 }
12149 case "web_sessions_change_idle_length_policy":
12150 err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicy)
12151
12152 if err != nil {
12153 return err
12154 }
12155 case "team_merge_from":
12156 err = json.Unmarshal(body, &u.TeamMergeFrom)
12157
12158 if err != nil {
12159 return err
12160 }
12161 case "team_merge_to":
12162 err = json.Unmarshal(body, &u.TeamMergeTo)
12163
12164 if err != nil {
12165 return err
12166 }
12167 case "team_profile_add_background":
12168 err = json.Unmarshal(body, &u.TeamProfileAddBackground)
12169
12170 if err != nil {
12171 return err
12172 }
12173 case "team_profile_add_logo":
12174 err = json.Unmarshal(body, &u.TeamProfileAddLogo)
12175
12176 if err != nil {
12177 return err
12178 }
12179 case "team_profile_change_background":
12180 err = json.Unmarshal(body, &u.TeamProfileChangeBackground)
12181
12182 if err != nil {
12183 return err
12184 }
12185 case "team_profile_change_default_language":
12186 err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguage)
12187
12188 if err != nil {
12189 return err
12190 }
12191 case "team_profile_change_logo":
12192 err = json.Unmarshal(body, &u.TeamProfileChangeLogo)
12193
12194 if err != nil {
12195 return err
12196 }
12197 case "team_profile_change_name":
12198 err = json.Unmarshal(body, &u.TeamProfileChangeName)
12199
12200 if err != nil {
12201 return err
12202 }
12203 case "team_profile_remove_background":
12204 err = json.Unmarshal(body, &u.TeamProfileRemoveBackground)
12205
12206 if err != nil {
12207 return err
12208 }
12209 case "team_profile_remove_logo":
12210 err = json.Unmarshal(body, &u.TeamProfileRemoveLogo)
12211
12212 if err != nil {
12213 return err
12214 }
12215 case "tfa_add_backup_phone":
12216 err = json.Unmarshal(body, &u.TfaAddBackupPhone)
12217
12218 if err != nil {
12219 return err
12220 }
12221 case "tfa_add_security_key":
12222 err = json.Unmarshal(body, &u.TfaAddSecurityKey)
12223
12224 if err != nil {
12225 return err
12226 }
12227 case "tfa_change_backup_phone":
12228 err = json.Unmarshal(body, &u.TfaChangeBackupPhone)
12229
12230 if err != nil {
12231 return err
12232 }
12233 case "tfa_change_status":
12234 err = json.Unmarshal(body, &u.TfaChangeStatus)
12235
12236 if err != nil {
12237 return err
12238 }
12239 case "tfa_remove_backup_phone":
12240 err = json.Unmarshal(body, &u.TfaRemoveBackupPhone)
12241
12242 if err != nil {
12243 return err
12244 }
12245 case "tfa_remove_security_key":
12246 err = json.Unmarshal(body, &u.TfaRemoveSecurityKey)
12247
12248 if err != nil {
12249 return err
12250 }
12251 case "tfa_reset":
12252 err = json.Unmarshal(body, &u.TfaReset)
12253
12254 if err != nil {
12255 return err
12256 }
12257 case "changed_enterprise_admin_role":
12258 err = json.Unmarshal(body, &u.ChangedEnterpriseAdminRole)
12259
12260 if err != nil {
12261 return err
12262 }
12263 case "changed_enterprise_connected_team_status":
12264 err = json.Unmarshal(body, &u.ChangedEnterpriseConnectedTeamStatus)
12265
12266 if err != nil {
12267 return err
12268 }
12269 case "ended_enterprise_admin_session":
12270 err = json.Unmarshal(body, &u.EndedEnterpriseAdminSession)
12271
12272 if err != nil {
12273 return err
12274 }
12275 case "ended_enterprise_admin_session_deprecated":
12276 err = json.Unmarshal(body, &u.EndedEnterpriseAdminSessionDeprecated)
12277
12278 if err != nil {
12279 return err
12280 }
12281 case "enterprise_settings_locking":
12282 err = json.Unmarshal(body, &u.EnterpriseSettingsLocking)
12283
12284 if err != nil {
12285 return err
12286 }
12287 case "guest_admin_change_status":
12288 err = json.Unmarshal(body, &u.GuestAdminChangeStatus)
12289
12290 if err != nil {
12291 return err
12292 }
12293 case "started_enterprise_admin_session":
12294 err = json.Unmarshal(body, &u.StartedEnterpriseAdminSession)
12295
12296 if err != nil {
12297 return err
12298 }
12299 case "team_merge_request_accepted":
12300 err = json.Unmarshal(body, &u.TeamMergeRequestAccepted)
12301
12302 if err != nil {
12303 return err
12304 }
12305 case "team_merge_request_accepted_shown_to_primary_team":
12306 err = json.Unmarshal(body, &u.TeamMergeRequestAcceptedShownToPrimaryTeam)
12307
12308 if err != nil {
12309 return err
12310 }
12311 case "team_merge_request_accepted_shown_to_secondary_team":
12312 err = json.Unmarshal(body, &u.TeamMergeRequestAcceptedShownToSecondaryTeam)
12313
12314 if err != nil {
12315 return err
12316 }
12317 case "team_merge_request_auto_canceled":
12318 err = json.Unmarshal(body, &u.TeamMergeRequestAutoCanceled)
12319
12320 if err != nil {
12321 return err
12322 }
12323 case "team_merge_request_canceled":
12324 err = json.Unmarshal(body, &u.TeamMergeRequestCanceled)
12325
12326 if err != nil {
12327 return err
12328 }
12329 case "team_merge_request_canceled_shown_to_primary_team":
12330 err = json.Unmarshal(body, &u.TeamMergeRequestCanceledShownToPrimaryTeam)
12331
12332 if err != nil {
12333 return err
12334 }
12335 case "team_merge_request_canceled_shown_to_secondary_team":
12336 err = json.Unmarshal(body, &u.TeamMergeRequestCanceledShownToSecondaryTeam)
12337
12338 if err != nil {
12339 return err
12340 }
12341 case "team_merge_request_expired":
12342 err = json.Unmarshal(body, &u.TeamMergeRequestExpired)
12343
12344 if err != nil {
12345 return err
12346 }
12347 case "team_merge_request_expired_shown_to_primary_team":
12348 err = json.Unmarshal(body, &u.TeamMergeRequestExpiredShownToPrimaryTeam)
12349
12350 if err != nil {
12351 return err
12352 }
12353 case "team_merge_request_expired_shown_to_secondary_team":
12354 err = json.Unmarshal(body, &u.TeamMergeRequestExpiredShownToSecondaryTeam)
12355
12356 if err != nil {
12357 return err
12358 }
12359 case "team_merge_request_rejected_shown_to_primary_team":
12360 err = json.Unmarshal(body, &u.TeamMergeRequestRejectedShownToPrimaryTeam)
12361
12362 if err != nil {
12363 return err
12364 }
12365 case "team_merge_request_rejected_shown_to_secondary_team":
12366 err = json.Unmarshal(body, &u.TeamMergeRequestRejectedShownToSecondaryTeam)
12367
12368 if err != nil {
12369 return err
12370 }
12371 case "team_merge_request_reminder":
12372 err = json.Unmarshal(body, &u.TeamMergeRequestReminder)
12373
12374 if err != nil {
12375 return err
12376 }
12377 case "team_merge_request_reminder_shown_to_primary_team":
12378 err = json.Unmarshal(body, &u.TeamMergeRequestReminderShownToPrimaryTeam)
12379
12380 if err != nil {
12381 return err
12382 }
12383 case "team_merge_request_reminder_shown_to_secondary_team":
12384 err = json.Unmarshal(body, &u.TeamMergeRequestReminderShownToSecondaryTeam)
12385
12386 if err != nil {
12387 return err
12388 }
12389 case "team_merge_request_revoked":
12390 err = json.Unmarshal(body, &u.TeamMergeRequestRevoked)
12391
12392 if err != nil {
12393 return err
12394 }
12395 case "team_merge_request_sent_shown_to_primary_team":
12396 err = json.Unmarshal(body, &u.TeamMergeRequestSentShownToPrimaryTeam)
12397
12398 if err != nil {
12399 return err
12400 }
12401 case "team_merge_request_sent_shown_to_secondary_team":
12402 err = json.Unmarshal(body, &u.TeamMergeRequestSentShownToSecondaryTeam)
12403
12404 if err != nil {
12405 return err
12406 }
12407 }
12408 return nil
12409 }
12410
12411 // EventTypeArg : The type of the event.
12412 type EventTypeArg struct {
12413 dropbox.Tagged
12414 }
12415
12416 // Valid tag values for EventTypeArg
12417 const (
12418 EventTypeArgAdminAlertingAlertStateChanged = "admin_alerting_alert_state_changed"
12419 EventTypeArgAdminAlertingChangedAlertConfig = "admin_alerting_changed_alert_config"
12420 EventTypeArgAdminAlertingTriggeredAlert = "admin_alerting_triggered_alert"
12421 EventTypeArgAppBlockedByPermissions = "app_blocked_by_permissions"
12422 EventTypeArgAppLinkTeam = "app_link_team"
12423 EventTypeArgAppLinkUser = "app_link_user"
12424 EventTypeArgAppUnlinkTeam = "app_unlink_team"
12425 EventTypeArgAppUnlinkUser = "app_unlink_user"
12426 EventTypeArgIntegrationConnected = "integration_connected"
12427 EventTypeArgIntegrationDisconnected = "integration_disconnected"
12428 EventTypeArgFileAddComment = "file_add_comment"
12429 EventTypeArgFileChangeCommentSubscription = "file_change_comment_subscription"
12430 EventTypeArgFileDeleteComment = "file_delete_comment"
12431 EventTypeArgFileEditComment = "file_edit_comment"
12432 EventTypeArgFileLikeComment = "file_like_comment"
12433 EventTypeArgFileResolveComment = "file_resolve_comment"
12434 EventTypeArgFileUnlikeComment = "file_unlike_comment"
12435 EventTypeArgFileUnresolveComment = "file_unresolve_comment"
12436 EventTypeArgGovernancePolicyAddFolders = "governance_policy_add_folders"
12437 EventTypeArgGovernancePolicyAddFolderFailed = "governance_policy_add_folder_failed"
12438 EventTypeArgGovernancePolicyContentDisposed = "governance_policy_content_disposed"
12439 EventTypeArgGovernancePolicyCreate = "governance_policy_create"
12440 EventTypeArgGovernancePolicyDelete = "governance_policy_delete"
12441 EventTypeArgGovernancePolicyEditDetails = "governance_policy_edit_details"
12442 EventTypeArgGovernancePolicyEditDuration = "governance_policy_edit_duration"
12443 EventTypeArgGovernancePolicyExportCreated = "governance_policy_export_created"
12444 EventTypeArgGovernancePolicyExportRemoved = "governance_policy_export_removed"
12445 EventTypeArgGovernancePolicyRemoveFolders = "governance_policy_remove_folders"
12446 EventTypeArgGovernancePolicyReportCreated = "governance_policy_report_created"
12447 EventTypeArgGovernancePolicyZipPartDownloaded = "governance_policy_zip_part_downloaded"
12448 EventTypeArgLegalHoldsActivateAHold = "legal_holds_activate_a_hold"
12449 EventTypeArgLegalHoldsAddMembers = "legal_holds_add_members"
12450 EventTypeArgLegalHoldsChangeHoldDetails = "legal_holds_change_hold_details"
12451 EventTypeArgLegalHoldsChangeHoldName = "legal_holds_change_hold_name"
12452 EventTypeArgLegalHoldsExportAHold = "legal_holds_export_a_hold"
12453 EventTypeArgLegalHoldsExportCancelled = "legal_holds_export_cancelled"
12454 EventTypeArgLegalHoldsExportDownloaded = "legal_holds_export_downloaded"
12455 EventTypeArgLegalHoldsExportRemoved = "legal_holds_export_removed"
12456 EventTypeArgLegalHoldsReleaseAHold = "legal_holds_release_a_hold"
12457 EventTypeArgLegalHoldsRemoveMembers = "legal_holds_remove_members"
12458 EventTypeArgLegalHoldsReportAHold = "legal_holds_report_a_hold"
12459 EventTypeArgDeviceChangeIpDesktop = "device_change_ip_desktop"
12460 EventTypeArgDeviceChangeIpMobile = "device_change_ip_mobile"
12461 EventTypeArgDeviceChangeIpWeb = "device_change_ip_web"
12462 EventTypeArgDeviceDeleteOnUnlinkFail = "device_delete_on_unlink_fail"
12463 EventTypeArgDeviceDeleteOnUnlinkSuccess = "device_delete_on_unlink_success"
12464 EventTypeArgDeviceLinkFail = "device_link_fail"
12465 EventTypeArgDeviceLinkSuccess = "device_link_success"
12466 EventTypeArgDeviceManagementDisabled = "device_management_disabled"
12467 EventTypeArgDeviceManagementEnabled = "device_management_enabled"
12468 EventTypeArgDeviceSyncBackupStatusChanged = "device_sync_backup_status_changed"
12469 EventTypeArgDeviceUnlink = "device_unlink"
12470 EventTypeArgDropboxPasswordsExported = "dropbox_passwords_exported"
12471 EventTypeArgDropboxPasswordsNewDeviceEnrolled = "dropbox_passwords_new_device_enrolled"
12472 EventTypeArgEmmRefreshAuthToken = "emm_refresh_auth_token"
12473 EventTypeArgAccountCaptureChangeAvailability = "account_capture_change_availability"
12474 EventTypeArgAccountCaptureMigrateAccount = "account_capture_migrate_account"
12475 EventTypeArgAccountCaptureNotificationEmailsSent = "account_capture_notification_emails_sent"
12476 EventTypeArgAccountCaptureRelinquishAccount = "account_capture_relinquish_account"
12477 EventTypeArgDisabledDomainInvites = "disabled_domain_invites"
12478 EventTypeArgDomainInvitesApproveRequestToJoinTeam = "domain_invites_approve_request_to_join_team"
12479 EventTypeArgDomainInvitesDeclineRequestToJoinTeam = "domain_invites_decline_request_to_join_team"
12480 EventTypeArgDomainInvitesEmailExistingUsers = "domain_invites_email_existing_users"
12481 EventTypeArgDomainInvitesRequestToJoinTeam = "domain_invites_request_to_join_team"
12482 EventTypeArgDomainInvitesSetInviteNewUserPrefToNo = "domain_invites_set_invite_new_user_pref_to_no"
12483 EventTypeArgDomainInvitesSetInviteNewUserPrefToYes = "domain_invites_set_invite_new_user_pref_to_yes"
12484 EventTypeArgDomainVerificationAddDomainFail = "domain_verification_add_domain_fail"
12485 EventTypeArgDomainVerificationAddDomainSuccess = "domain_verification_add_domain_success"
12486 EventTypeArgDomainVerificationRemoveDomain = "domain_verification_remove_domain"
12487 EventTypeArgEnabledDomainInvites = "enabled_domain_invites"
12488 EventTypeArgApplyNamingConvention = "apply_naming_convention"
12489 EventTypeArgCreateFolder = "create_folder"
12490 EventTypeArgFileAdd = "file_add"
12491 EventTypeArgFileCopy = "file_copy"
12492 EventTypeArgFileDelete = "file_delete"
12493 EventTypeArgFileDownload = "file_download"
12494 EventTypeArgFileEdit = "file_edit"
12495 EventTypeArgFileGetCopyReference = "file_get_copy_reference"
12496 EventTypeArgFileLockingLockStatusChanged = "file_locking_lock_status_changed"
12497 EventTypeArgFileMove = "file_move"
12498 EventTypeArgFilePermanentlyDelete = "file_permanently_delete"
12499 EventTypeArgFilePreview = "file_preview"
12500 EventTypeArgFileRename = "file_rename"
12501 EventTypeArgFileRestore = "file_restore"
12502 EventTypeArgFileRevert = "file_revert"
12503 EventTypeArgFileRollbackChanges = "file_rollback_changes"
12504 EventTypeArgFileSaveCopyReference = "file_save_copy_reference"
12505 EventTypeArgFolderOverviewDescriptionChanged = "folder_overview_description_changed"
12506 EventTypeArgFolderOverviewItemPinned = "folder_overview_item_pinned"
12507 EventTypeArgFolderOverviewItemUnpinned = "folder_overview_item_unpinned"
12508 EventTypeArgObjectLabelAdded = "object_label_added"
12509 EventTypeArgObjectLabelRemoved = "object_label_removed"
12510 EventTypeArgObjectLabelUpdatedValue = "object_label_updated_value"
12511 EventTypeArgOrganizeFolderWithTidy = "organize_folder_with_tidy"
12512 EventTypeArgRewindFolder = "rewind_folder"
12513 EventTypeArgUserTagsAdded = "user_tags_added"
12514 EventTypeArgUserTagsRemoved = "user_tags_removed"
12515 EventTypeArgFileRequestChange = "file_request_change"
12516 EventTypeArgFileRequestClose = "file_request_close"
12517 EventTypeArgFileRequestCreate = "file_request_create"
12518 EventTypeArgFileRequestDelete = "file_request_delete"
12519 EventTypeArgFileRequestReceiveFile = "file_request_receive_file"
12520 EventTypeArgGroupAddExternalId = "group_add_external_id"
12521 EventTypeArgGroupAddMember = "group_add_member"
12522 EventTypeArgGroupChangeExternalId = "group_change_external_id"
12523 EventTypeArgGroupChangeManagementType = "group_change_management_type"
12524 EventTypeArgGroupChangeMemberRole = "group_change_member_role"
12525 EventTypeArgGroupCreate = "group_create"
12526 EventTypeArgGroupDelete = "group_delete"
12527 EventTypeArgGroupDescriptionUpdated = "group_description_updated"
12528 EventTypeArgGroupJoinPolicyUpdated = "group_join_policy_updated"
12529 EventTypeArgGroupMoved = "group_moved"
12530 EventTypeArgGroupRemoveExternalId = "group_remove_external_id"
12531 EventTypeArgGroupRemoveMember = "group_remove_member"
12532 EventTypeArgGroupRename = "group_rename"
12533 EventTypeArgAccountLockOrUnlocked = "account_lock_or_unlocked"
12534 EventTypeArgEmmError = "emm_error"
12535 EventTypeArgGuestAdminSignedInViaTrustedTeams = "guest_admin_signed_in_via_trusted_teams"
12536 EventTypeArgGuestAdminSignedOutViaTrustedTeams = "guest_admin_signed_out_via_trusted_teams"
12537 EventTypeArgLoginFail = "login_fail"
12538 EventTypeArgLoginSuccess = "login_success"
12539 EventTypeArgLogout = "logout"
12540 EventTypeArgResellerSupportSessionEnd = "reseller_support_session_end"
12541 EventTypeArgResellerSupportSessionStart = "reseller_support_session_start"
12542 EventTypeArgSignInAsSessionEnd = "sign_in_as_session_end"
12543 EventTypeArgSignInAsSessionStart = "sign_in_as_session_start"
12544 EventTypeArgSsoError = "sso_error"
12545 EventTypeArgCreateTeamInviteLink = "create_team_invite_link"
12546 EventTypeArgDeleteTeamInviteLink = "delete_team_invite_link"
12547 EventTypeArgMemberAddExternalId = "member_add_external_id"
12548 EventTypeArgMemberAddName = "member_add_name"
12549 EventTypeArgMemberChangeAdminRole = "member_change_admin_role"
12550 EventTypeArgMemberChangeEmail = "member_change_email"
12551 EventTypeArgMemberChangeExternalId = "member_change_external_id"
12552 EventTypeArgMemberChangeMembershipType = "member_change_membership_type"
12553 EventTypeArgMemberChangeName = "member_change_name"
12554 EventTypeArgMemberChangeResellerRole = "member_change_reseller_role"
12555 EventTypeArgMemberChangeStatus = "member_change_status"
12556 EventTypeArgMemberDeleteManualContacts = "member_delete_manual_contacts"
12557 EventTypeArgMemberDeleteProfilePhoto = "member_delete_profile_photo"
12558 EventTypeArgMemberPermanentlyDeleteAccountContents = "member_permanently_delete_account_contents"
12559 EventTypeArgMemberRemoveExternalId = "member_remove_external_id"
12560 EventTypeArgMemberSetProfilePhoto = "member_set_profile_photo"
12561 EventTypeArgMemberSpaceLimitsAddCustomQuota = "member_space_limits_add_custom_quota"
12562 EventTypeArgMemberSpaceLimitsChangeCustomQuota = "member_space_limits_change_custom_quota"
12563 EventTypeArgMemberSpaceLimitsChangeStatus = "member_space_limits_change_status"
12564 EventTypeArgMemberSpaceLimitsRemoveCustomQuota = "member_space_limits_remove_custom_quota"
12565 EventTypeArgMemberSuggest = "member_suggest"
12566 EventTypeArgMemberTransferAccountContents = "member_transfer_account_contents"
12567 EventTypeArgPendingSecondaryEmailAdded = "pending_secondary_email_added"
12568 EventTypeArgSecondaryEmailDeleted = "secondary_email_deleted"
12569 EventTypeArgSecondaryEmailVerified = "secondary_email_verified"
12570 EventTypeArgSecondaryMailsPolicyChanged = "secondary_mails_policy_changed"
12571 EventTypeArgBinderAddPage = "binder_add_page"
12572 EventTypeArgBinderAddSection = "binder_add_section"
12573 EventTypeArgBinderRemovePage = "binder_remove_page"
12574 EventTypeArgBinderRemoveSection = "binder_remove_section"
12575 EventTypeArgBinderRenamePage = "binder_rename_page"
12576 EventTypeArgBinderRenameSection = "binder_rename_section"
12577 EventTypeArgBinderReorderPage = "binder_reorder_page"
12578 EventTypeArgBinderReorderSection = "binder_reorder_section"
12579 EventTypeArgPaperContentAddMember = "paper_content_add_member"
12580 EventTypeArgPaperContentAddToFolder = "paper_content_add_to_folder"
12581 EventTypeArgPaperContentArchive = "paper_content_archive"
12582 EventTypeArgPaperContentCreate = "paper_content_create"
12583 EventTypeArgPaperContentPermanentlyDelete = "paper_content_permanently_delete"
12584 EventTypeArgPaperContentRemoveFromFolder = "paper_content_remove_from_folder"
12585 EventTypeArgPaperContentRemoveMember = "paper_content_remove_member"
12586 EventTypeArgPaperContentRename = "paper_content_rename"
12587 EventTypeArgPaperContentRestore = "paper_content_restore"
12588 EventTypeArgPaperDocAddComment = "paper_doc_add_comment"
12589 EventTypeArgPaperDocChangeMemberRole = "paper_doc_change_member_role"
12590 EventTypeArgPaperDocChangeSharingPolicy = "paper_doc_change_sharing_policy"
12591 EventTypeArgPaperDocChangeSubscription = "paper_doc_change_subscription"
12592 EventTypeArgPaperDocDeleted = "paper_doc_deleted"
12593 EventTypeArgPaperDocDeleteComment = "paper_doc_delete_comment"
12594 EventTypeArgPaperDocDownload = "paper_doc_download"
12595 EventTypeArgPaperDocEdit = "paper_doc_edit"
12596 EventTypeArgPaperDocEditComment = "paper_doc_edit_comment"
12597 EventTypeArgPaperDocFollowed = "paper_doc_followed"
12598 EventTypeArgPaperDocMention = "paper_doc_mention"
12599 EventTypeArgPaperDocOwnershipChanged = "paper_doc_ownership_changed"
12600 EventTypeArgPaperDocRequestAccess = "paper_doc_request_access"
12601 EventTypeArgPaperDocResolveComment = "paper_doc_resolve_comment"
12602 EventTypeArgPaperDocRevert = "paper_doc_revert"
12603 EventTypeArgPaperDocSlackShare = "paper_doc_slack_share"
12604 EventTypeArgPaperDocTeamInvite = "paper_doc_team_invite"
12605 EventTypeArgPaperDocTrashed = "paper_doc_trashed"
12606 EventTypeArgPaperDocUnresolveComment = "paper_doc_unresolve_comment"
12607 EventTypeArgPaperDocUntrashed = "paper_doc_untrashed"
12608 EventTypeArgPaperDocView = "paper_doc_view"
12609 EventTypeArgPaperExternalViewAllow = "paper_external_view_allow"
12610 EventTypeArgPaperExternalViewDefaultTeam = "paper_external_view_default_team"
12611 EventTypeArgPaperExternalViewForbid = "paper_external_view_forbid"
12612 EventTypeArgPaperFolderChangeSubscription = "paper_folder_change_subscription"
12613 EventTypeArgPaperFolderDeleted = "paper_folder_deleted"
12614 EventTypeArgPaperFolderFollowed = "paper_folder_followed"
12615 EventTypeArgPaperFolderTeamInvite = "paper_folder_team_invite"
12616 EventTypeArgPaperPublishedLinkChangePermission = "paper_published_link_change_permission"
12617 EventTypeArgPaperPublishedLinkCreate = "paper_published_link_create"
12618 EventTypeArgPaperPublishedLinkDisabled = "paper_published_link_disabled"
12619 EventTypeArgPaperPublishedLinkView = "paper_published_link_view"
12620 EventTypeArgPasswordChange = "password_change"
12621 EventTypeArgPasswordReset = "password_reset"
12622 EventTypeArgPasswordResetAll = "password_reset_all"
12623 EventTypeArgClassificationCreateReport = "classification_create_report"
12624 EventTypeArgClassificationCreateReportFail = "classification_create_report_fail"
12625 EventTypeArgEmmCreateExceptionsReport = "emm_create_exceptions_report"
12626 EventTypeArgEmmCreateUsageReport = "emm_create_usage_report"
12627 EventTypeArgExportMembersReport = "export_members_report"
12628 EventTypeArgExportMembersReportFail = "export_members_report_fail"
12629 EventTypeArgExternalSharingCreateReport = "external_sharing_create_report"
12630 EventTypeArgExternalSharingReportFailed = "external_sharing_report_failed"
12631 EventTypeArgNoExpirationLinkGenCreateReport = "no_expiration_link_gen_create_report"
12632 EventTypeArgNoExpirationLinkGenReportFailed = "no_expiration_link_gen_report_failed"
12633 EventTypeArgNoPasswordLinkGenCreateReport = "no_password_link_gen_create_report"
12634 EventTypeArgNoPasswordLinkGenReportFailed = "no_password_link_gen_report_failed"
12635 EventTypeArgNoPasswordLinkViewCreateReport = "no_password_link_view_create_report"
12636 EventTypeArgNoPasswordLinkViewReportFailed = "no_password_link_view_report_failed"
12637 EventTypeArgOutdatedLinkViewCreateReport = "outdated_link_view_create_report"
12638 EventTypeArgOutdatedLinkViewReportFailed = "outdated_link_view_report_failed"
12639 EventTypeArgPaperAdminExportStart = "paper_admin_export_start"
12640 EventTypeArgSmartSyncCreateAdminPrivilegeReport = "smart_sync_create_admin_privilege_report"
12641 EventTypeArgTeamActivityCreateReport = "team_activity_create_report"
12642 EventTypeArgTeamActivityCreateReportFail = "team_activity_create_report_fail"
12643 EventTypeArgCollectionShare = "collection_share"
12644 EventTypeArgFileTransfersFileAdd = "file_transfers_file_add"
12645 EventTypeArgFileTransfersTransferDelete = "file_transfers_transfer_delete"
12646 EventTypeArgFileTransfersTransferDownload = "file_transfers_transfer_download"
12647 EventTypeArgFileTransfersTransferSend = "file_transfers_transfer_send"
12648 EventTypeArgFileTransfersTransferView = "file_transfers_transfer_view"
12649 EventTypeArgNoteAclInviteOnly = "note_acl_invite_only"
12650 EventTypeArgNoteAclLink = "note_acl_link"
12651 EventTypeArgNoteAclTeamLink = "note_acl_team_link"
12652 EventTypeArgNoteShared = "note_shared"
12653 EventTypeArgNoteShareReceive = "note_share_receive"
12654 EventTypeArgOpenNoteShared = "open_note_shared"
12655 EventTypeArgSfAddGroup = "sf_add_group"
12656 EventTypeArgSfAllowNonMembersToViewSharedLinks = "sf_allow_non_members_to_view_shared_links"
12657 EventTypeArgSfExternalInviteWarn = "sf_external_invite_warn"
12658 EventTypeArgSfFbInvite = "sf_fb_invite"
12659 EventTypeArgSfFbInviteChangeRole = "sf_fb_invite_change_role"
12660 EventTypeArgSfFbUninvite = "sf_fb_uninvite"
12661 EventTypeArgSfInviteGroup = "sf_invite_group"
12662 EventTypeArgSfTeamGrantAccess = "sf_team_grant_access"
12663 EventTypeArgSfTeamInvite = "sf_team_invite"
12664 EventTypeArgSfTeamInviteChangeRole = "sf_team_invite_change_role"
12665 EventTypeArgSfTeamJoin = "sf_team_join"
12666 EventTypeArgSfTeamJoinFromOobLink = "sf_team_join_from_oob_link"
12667 EventTypeArgSfTeamUninvite = "sf_team_uninvite"
12668 EventTypeArgSharedContentAddInvitees = "shared_content_add_invitees"
12669 EventTypeArgSharedContentAddLinkExpiry = "shared_content_add_link_expiry"
12670 EventTypeArgSharedContentAddLinkPassword = "shared_content_add_link_password"
12671 EventTypeArgSharedContentAddMember = "shared_content_add_member"
12672 EventTypeArgSharedContentChangeDownloadsPolicy = "shared_content_change_downloads_policy"
12673 EventTypeArgSharedContentChangeInviteeRole = "shared_content_change_invitee_role"
12674 EventTypeArgSharedContentChangeLinkAudience = "shared_content_change_link_audience"
12675 EventTypeArgSharedContentChangeLinkExpiry = "shared_content_change_link_expiry"
12676 EventTypeArgSharedContentChangeLinkPassword = "shared_content_change_link_password"
12677 EventTypeArgSharedContentChangeMemberRole = "shared_content_change_member_role"
12678 EventTypeArgSharedContentChangeViewerInfoPolicy = "shared_content_change_viewer_info_policy"
12679 EventTypeArgSharedContentClaimInvitation = "shared_content_claim_invitation"
12680 EventTypeArgSharedContentCopy = "shared_content_copy"
12681 EventTypeArgSharedContentDownload = "shared_content_download"
12682 EventTypeArgSharedContentRelinquishMembership = "shared_content_relinquish_membership"
12683 EventTypeArgSharedContentRemoveInvitees = "shared_content_remove_invitees"
12684 EventTypeArgSharedContentRemoveLinkExpiry = "shared_content_remove_link_expiry"
12685 EventTypeArgSharedContentRemoveLinkPassword = "shared_content_remove_link_password"
12686 EventTypeArgSharedContentRemoveMember = "shared_content_remove_member"
12687 EventTypeArgSharedContentRequestAccess = "shared_content_request_access"
12688 EventTypeArgSharedContentRestoreInvitees = "shared_content_restore_invitees"
12689 EventTypeArgSharedContentRestoreMember = "shared_content_restore_member"
12690 EventTypeArgSharedContentUnshare = "shared_content_unshare"
12691 EventTypeArgSharedContentView = "shared_content_view"
12692 EventTypeArgSharedFolderChangeLinkPolicy = "shared_folder_change_link_policy"
12693 EventTypeArgSharedFolderChangeMembersInheritancePolicy = "shared_folder_change_members_inheritance_policy"
12694 EventTypeArgSharedFolderChangeMembersManagementPolicy = "shared_folder_change_members_management_policy"
12695 EventTypeArgSharedFolderChangeMembersPolicy = "shared_folder_change_members_policy"
12696 EventTypeArgSharedFolderCreate = "shared_folder_create"
12697 EventTypeArgSharedFolderDeclineInvitation = "shared_folder_decline_invitation"
12698 EventTypeArgSharedFolderMount = "shared_folder_mount"
12699 EventTypeArgSharedFolderNest = "shared_folder_nest"
12700 EventTypeArgSharedFolderTransferOwnership = "shared_folder_transfer_ownership"
12701 EventTypeArgSharedFolderUnmount = "shared_folder_unmount"
12702 EventTypeArgSharedLinkAddExpiry = "shared_link_add_expiry"
12703 EventTypeArgSharedLinkChangeExpiry = "shared_link_change_expiry"
12704 EventTypeArgSharedLinkChangeVisibility = "shared_link_change_visibility"
12705 EventTypeArgSharedLinkCopy = "shared_link_copy"
12706 EventTypeArgSharedLinkCreate = "shared_link_create"
12707 EventTypeArgSharedLinkDisable = "shared_link_disable"
12708 EventTypeArgSharedLinkDownload = "shared_link_download"
12709 EventTypeArgSharedLinkRemoveExpiry = "shared_link_remove_expiry"
12710 EventTypeArgSharedLinkSettingsAddExpiration = "shared_link_settings_add_expiration"
12711 EventTypeArgSharedLinkSettingsAddPassword = "shared_link_settings_add_password"
12712 EventTypeArgSharedLinkSettingsAllowDownloadDisabled = "shared_link_settings_allow_download_disabled"
12713 EventTypeArgSharedLinkSettingsAllowDownloadEnabled = "shared_link_settings_allow_download_enabled"
12714 EventTypeArgSharedLinkSettingsChangeAudience = "shared_link_settings_change_audience"
12715 EventTypeArgSharedLinkSettingsChangeExpiration = "shared_link_settings_change_expiration"
12716 EventTypeArgSharedLinkSettingsChangePassword = "shared_link_settings_change_password"
12717 EventTypeArgSharedLinkSettingsRemoveExpiration = "shared_link_settings_remove_expiration"
12718 EventTypeArgSharedLinkSettingsRemovePassword = "shared_link_settings_remove_password"
12719 EventTypeArgSharedLinkShare = "shared_link_share"
12720 EventTypeArgSharedLinkView = "shared_link_view"
12721 EventTypeArgSharedNoteOpened = "shared_note_opened"
12722 EventTypeArgShmodelDisableDownloads = "shmodel_disable_downloads"
12723 EventTypeArgShmodelEnableDownloads = "shmodel_enable_downloads"
12724 EventTypeArgShmodelGroupShare = "shmodel_group_share"
12725 EventTypeArgShowcaseAccessGranted = "showcase_access_granted"
12726 EventTypeArgShowcaseAddMember = "showcase_add_member"
12727 EventTypeArgShowcaseArchived = "showcase_archived"
12728 EventTypeArgShowcaseCreated = "showcase_created"
12729 EventTypeArgShowcaseDeleteComment = "showcase_delete_comment"
12730 EventTypeArgShowcaseEdited = "showcase_edited"
12731 EventTypeArgShowcaseEditComment = "showcase_edit_comment"
12732 EventTypeArgShowcaseFileAdded = "showcase_file_added"
12733 EventTypeArgShowcaseFileDownload = "showcase_file_download"
12734 EventTypeArgShowcaseFileRemoved = "showcase_file_removed"
12735 EventTypeArgShowcaseFileView = "showcase_file_view"
12736 EventTypeArgShowcasePermanentlyDeleted = "showcase_permanently_deleted"
12737 EventTypeArgShowcasePostComment = "showcase_post_comment"
12738 EventTypeArgShowcaseRemoveMember = "showcase_remove_member"
12739 EventTypeArgShowcaseRenamed = "showcase_renamed"
12740 EventTypeArgShowcaseRequestAccess = "showcase_request_access"
12741 EventTypeArgShowcaseResolveComment = "showcase_resolve_comment"
12742 EventTypeArgShowcaseRestored = "showcase_restored"
12743 EventTypeArgShowcaseTrashed = "showcase_trashed"
12744 EventTypeArgShowcaseTrashedDeprecated = "showcase_trashed_deprecated"
12745 EventTypeArgShowcaseUnresolveComment = "showcase_unresolve_comment"
12746 EventTypeArgShowcaseUntrashed = "showcase_untrashed"
12747 EventTypeArgShowcaseUntrashedDeprecated = "showcase_untrashed_deprecated"
12748 EventTypeArgShowcaseView = "showcase_view"
12749 EventTypeArgSsoAddCert = "sso_add_cert"
12750 EventTypeArgSsoAddLoginUrl = "sso_add_login_url"
12751 EventTypeArgSsoAddLogoutUrl = "sso_add_logout_url"
12752 EventTypeArgSsoChangeCert = "sso_change_cert"
12753 EventTypeArgSsoChangeLoginUrl = "sso_change_login_url"
12754 EventTypeArgSsoChangeLogoutUrl = "sso_change_logout_url"
12755 EventTypeArgSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode"
12756 EventTypeArgSsoRemoveCert = "sso_remove_cert"
12757 EventTypeArgSsoRemoveLoginUrl = "sso_remove_login_url"
12758 EventTypeArgSsoRemoveLogoutUrl = "sso_remove_logout_url"
12759 EventTypeArgTeamFolderChangeStatus = "team_folder_change_status"
12760 EventTypeArgTeamFolderCreate = "team_folder_create"
12761 EventTypeArgTeamFolderDowngrade = "team_folder_downgrade"
12762 EventTypeArgTeamFolderPermanentlyDelete = "team_folder_permanently_delete"
12763 EventTypeArgTeamFolderRename = "team_folder_rename"
12764 EventTypeArgTeamSelectiveSyncSettingsChanged = "team_selective_sync_settings_changed"
12765 EventTypeArgAccountCaptureChangePolicy = "account_capture_change_policy"
12766 EventTypeArgAllowDownloadDisabled = "allow_download_disabled"
12767 EventTypeArgAllowDownloadEnabled = "allow_download_enabled"
12768 EventTypeArgAppPermissionsChanged = "app_permissions_changed"
12769 EventTypeArgCameraUploadsPolicyChanged = "camera_uploads_policy_changed"
12770 EventTypeArgClassificationChangePolicy = "classification_change_policy"
12771 EventTypeArgComputerBackupPolicyChanged = "computer_backup_policy_changed"
12772 EventTypeArgContentAdministrationPolicyChanged = "content_administration_policy_changed"
12773 EventTypeArgDataPlacementRestrictionChangePolicy = "data_placement_restriction_change_policy"
12774 EventTypeArgDataPlacementRestrictionSatisfyPolicy = "data_placement_restriction_satisfy_policy"
12775 EventTypeArgDeviceApprovalsAddException = "device_approvals_add_exception"
12776 EventTypeArgDeviceApprovalsChangeDesktopPolicy = "device_approvals_change_desktop_policy"
12777 EventTypeArgDeviceApprovalsChangeMobilePolicy = "device_approvals_change_mobile_policy"
12778 EventTypeArgDeviceApprovalsChangeOverageAction = "device_approvals_change_overage_action"
12779 EventTypeArgDeviceApprovalsChangeUnlinkAction = "device_approvals_change_unlink_action"
12780 EventTypeArgDeviceApprovalsRemoveException = "device_approvals_remove_exception"
12781 EventTypeArgDirectoryRestrictionsAddMembers = "directory_restrictions_add_members"
12782 EventTypeArgDirectoryRestrictionsRemoveMembers = "directory_restrictions_remove_members"
12783 EventTypeArgEmmAddException = "emm_add_exception"
12784 EventTypeArgEmmChangePolicy = "emm_change_policy"
12785 EventTypeArgEmmRemoveException = "emm_remove_exception"
12786 EventTypeArgExtendedVersionHistoryChangePolicy = "extended_version_history_change_policy"
12787 EventTypeArgFileCommentsChangePolicy = "file_comments_change_policy"
12788 EventTypeArgFileLockingPolicyChanged = "file_locking_policy_changed"
12789 EventTypeArgFileRequestsChangePolicy = "file_requests_change_policy"
12790 EventTypeArgFileRequestsEmailsEnabled = "file_requests_emails_enabled"
12791 EventTypeArgFileRequestsEmailsRestrictedToTeamOnly = "file_requests_emails_restricted_to_team_only"
12792 EventTypeArgFileTransfersPolicyChanged = "file_transfers_policy_changed"
12793 EventTypeArgGoogleSsoChangePolicy = "google_sso_change_policy"
12794 EventTypeArgGroupUserManagementChangePolicy = "group_user_management_change_policy"
12795 EventTypeArgIntegrationPolicyChanged = "integration_policy_changed"
12796 EventTypeArgInviteAcceptanceEmailPolicyChanged = "invite_acceptance_email_policy_changed"
12797 EventTypeArgMemberRequestsChangePolicy = "member_requests_change_policy"
12798 EventTypeArgMemberSendInvitePolicyChanged = "member_send_invite_policy_changed"
12799 EventTypeArgMemberSpaceLimitsAddException = "member_space_limits_add_exception"
12800 EventTypeArgMemberSpaceLimitsChangeCapsTypePolicy = "member_space_limits_change_caps_type_policy"
12801 EventTypeArgMemberSpaceLimitsChangePolicy = "member_space_limits_change_policy"
12802 EventTypeArgMemberSpaceLimitsRemoveException = "member_space_limits_remove_exception"
12803 EventTypeArgMemberSuggestionsChangePolicy = "member_suggestions_change_policy"
12804 EventTypeArgMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy"
12805 EventTypeArgNetworkControlChangePolicy = "network_control_change_policy"
12806 EventTypeArgPaperChangeDeploymentPolicy = "paper_change_deployment_policy"
12807 EventTypeArgPaperChangeMemberLinkPolicy = "paper_change_member_link_policy"
12808 EventTypeArgPaperChangeMemberPolicy = "paper_change_member_policy"
12809 EventTypeArgPaperChangePolicy = "paper_change_policy"
12810 EventTypeArgPaperDefaultFolderPolicyChanged = "paper_default_folder_policy_changed"
12811 EventTypeArgPaperDesktopPolicyChanged = "paper_desktop_policy_changed"
12812 EventTypeArgPaperEnabledUsersGroupAddition = "paper_enabled_users_group_addition"
12813 EventTypeArgPaperEnabledUsersGroupRemoval = "paper_enabled_users_group_removal"
12814 EventTypeArgPasswordStrengthRequirementsChangePolicy = "password_strength_requirements_change_policy"
12815 EventTypeArgPermanentDeleteChangePolicy = "permanent_delete_change_policy"
12816 EventTypeArgResellerSupportChangePolicy = "reseller_support_change_policy"
12817 EventTypeArgRewindPolicyChanged = "rewind_policy_changed"
12818 EventTypeArgSendForSignaturePolicyChanged = "send_for_signature_policy_changed"
12819 EventTypeArgSharingChangeFolderJoinPolicy = "sharing_change_folder_join_policy"
12820 EventTypeArgSharingChangeLinkAllowChangeExpirationPolicy = "sharing_change_link_allow_change_expiration_policy"
12821 EventTypeArgSharingChangeLinkDefaultExpirationPolicy = "sharing_change_link_default_expiration_policy"
12822 EventTypeArgSharingChangeLinkEnforcePasswordPolicy = "sharing_change_link_enforce_password_policy"
12823 EventTypeArgSharingChangeLinkPolicy = "sharing_change_link_policy"
12824 EventTypeArgSharingChangeMemberPolicy = "sharing_change_member_policy"
12825 EventTypeArgShowcaseChangeDownloadPolicy = "showcase_change_download_policy"
12826 EventTypeArgShowcaseChangeEnabledPolicy = "showcase_change_enabled_policy"
12827 EventTypeArgShowcaseChangeExternalSharingPolicy = "showcase_change_external_sharing_policy"
12828 EventTypeArgSmarterSmartSyncPolicyChanged = "smarter_smart_sync_policy_changed"
12829 EventTypeArgSmartSyncChangePolicy = "smart_sync_change_policy"
12830 EventTypeArgSmartSyncNotOptOut = "smart_sync_not_opt_out"
12831 EventTypeArgSmartSyncOptOut = "smart_sync_opt_out"
12832 EventTypeArgSsoChangePolicy = "sso_change_policy"
12833 EventTypeArgTeamBrandingPolicyChanged = "team_branding_policy_changed"
12834 EventTypeArgTeamExtensionsPolicyChanged = "team_extensions_policy_changed"
12835 EventTypeArgTeamSelectiveSyncPolicyChanged = "team_selective_sync_policy_changed"
12836 EventTypeArgTeamSharingWhitelistSubjectsChanged = "team_sharing_whitelist_subjects_changed"
12837 EventTypeArgTfaAddException = "tfa_add_exception"
12838 EventTypeArgTfaChangePolicy = "tfa_change_policy"
12839 EventTypeArgTfaRemoveException = "tfa_remove_exception"
12840 EventTypeArgTwoAccountChangePolicy = "two_account_change_policy"
12841 EventTypeArgViewerInfoPolicyChanged = "viewer_info_policy_changed"
12842 EventTypeArgWatermarkingPolicyChanged = "watermarking_policy_changed"
12843 EventTypeArgWebSessionsChangeActiveSessionLimit = "web_sessions_change_active_session_limit"
12844 EventTypeArgWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy"
12845 EventTypeArgWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy"
12846 EventTypeArgTeamMergeFrom = "team_merge_from"
12847 EventTypeArgTeamMergeTo = "team_merge_to"
12848 EventTypeArgTeamProfileAddBackground = "team_profile_add_background"
12849 EventTypeArgTeamProfileAddLogo = "team_profile_add_logo"
12850 EventTypeArgTeamProfileChangeBackground = "team_profile_change_background"
12851 EventTypeArgTeamProfileChangeDefaultLanguage = "team_profile_change_default_language"
12852 EventTypeArgTeamProfileChangeLogo = "team_profile_change_logo"
12853 EventTypeArgTeamProfileChangeName = "team_profile_change_name"
12854 EventTypeArgTeamProfileRemoveBackground = "team_profile_remove_background"
12855 EventTypeArgTeamProfileRemoveLogo = "team_profile_remove_logo"
12856 EventTypeArgTfaAddBackupPhone = "tfa_add_backup_phone"
12857 EventTypeArgTfaAddSecurityKey = "tfa_add_security_key"
12858 EventTypeArgTfaChangeBackupPhone = "tfa_change_backup_phone"
12859 EventTypeArgTfaChangeStatus = "tfa_change_status"
12860 EventTypeArgTfaRemoveBackupPhone = "tfa_remove_backup_phone"
12861 EventTypeArgTfaRemoveSecurityKey = "tfa_remove_security_key"
12862 EventTypeArgTfaReset = "tfa_reset"
12863 EventTypeArgChangedEnterpriseAdminRole = "changed_enterprise_admin_role"
12864 EventTypeArgChangedEnterpriseConnectedTeamStatus = "changed_enterprise_connected_team_status"
12865 EventTypeArgEndedEnterpriseAdminSession = "ended_enterprise_admin_session"
12866 EventTypeArgEndedEnterpriseAdminSessionDeprecated = "ended_enterprise_admin_session_deprecated"
12867 EventTypeArgEnterpriseSettingsLocking = "enterprise_settings_locking"
12868 EventTypeArgGuestAdminChangeStatus = "guest_admin_change_status"
12869 EventTypeArgStartedEnterpriseAdminSession = "started_enterprise_admin_session"
12870 EventTypeArgTeamMergeRequestAccepted = "team_merge_request_accepted"
12871 EventTypeArgTeamMergeRequestAcceptedShownToPrimaryTeam = "team_merge_request_accepted_shown_to_primary_team"
12872 EventTypeArgTeamMergeRequestAcceptedShownToSecondaryTeam = "team_merge_request_accepted_shown_to_secondary_team"
12873 EventTypeArgTeamMergeRequestAutoCanceled = "team_merge_request_auto_canceled"
12874 EventTypeArgTeamMergeRequestCanceled = "team_merge_request_canceled"
12875 EventTypeArgTeamMergeRequestCanceledShownToPrimaryTeam = "team_merge_request_canceled_shown_to_primary_team"
12876 EventTypeArgTeamMergeRequestCanceledShownToSecondaryTeam = "team_merge_request_canceled_shown_to_secondary_team"
12877 EventTypeArgTeamMergeRequestExpired = "team_merge_request_expired"
12878 EventTypeArgTeamMergeRequestExpiredShownToPrimaryTeam = "team_merge_request_expired_shown_to_primary_team"
12879 EventTypeArgTeamMergeRequestExpiredShownToSecondaryTeam = "team_merge_request_expired_shown_to_secondary_team"
12880 EventTypeArgTeamMergeRequestRejectedShownToPrimaryTeam = "team_merge_request_rejected_shown_to_primary_team"
12881 EventTypeArgTeamMergeRequestRejectedShownToSecondaryTeam = "team_merge_request_rejected_shown_to_secondary_team"
12882 EventTypeArgTeamMergeRequestReminder = "team_merge_request_reminder"
12883 EventTypeArgTeamMergeRequestReminderShownToPrimaryTeam = "team_merge_request_reminder_shown_to_primary_team"
12884 EventTypeArgTeamMergeRequestReminderShownToSecondaryTeam = "team_merge_request_reminder_shown_to_secondary_team"
12885 EventTypeArgTeamMergeRequestRevoked = "team_merge_request_revoked"
12886 EventTypeArgTeamMergeRequestSentShownToPrimaryTeam = "team_merge_request_sent_shown_to_primary_team"
12887 EventTypeArgTeamMergeRequestSentShownToSecondaryTeam = "team_merge_request_sent_shown_to_secondary_team"
12888 EventTypeArgOther = "other"
12889 )
12890
12891 // ExportMembersReportDetails : Created member data report.
12892 type ExportMembersReportDetails struct {
12893 }
12894
12895 // NewExportMembersReportDetails returns a new ExportMembersReportDetails instance
12896 func NewExportMembersReportDetails() *ExportMembersReportDetails {
12897 s := new(ExportMembersReportDetails)
12898 return s
12899 }
12900
12901 // ExportMembersReportFailDetails : Failed to create members data report.
12902 type ExportMembersReportFailDetails struct {
12903 // FailureReason : Failure reason.
12904 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
12905 }
12906
12907 // NewExportMembersReportFailDetails returns a new ExportMembersReportFailDetails instance
12908 func NewExportMembersReportFailDetails(FailureReason *team.TeamReportFailureReason) *ExportMembersReportFailDetails {
12909 s := new(ExportMembersReportFailDetails)
12910 s.FailureReason = FailureReason
12911 return s
12912 }
12913
12914 // ExportMembersReportFailType : has no documentation (yet)
12915 type ExportMembersReportFailType struct {
12916 // Description : has no documentation (yet)
12917 Description string `json:"description"`
12918 }
12919
12920 // NewExportMembersReportFailType returns a new ExportMembersReportFailType instance
12921 func NewExportMembersReportFailType(Description string) *ExportMembersReportFailType {
12922 s := new(ExportMembersReportFailType)
12923 s.Description = Description
12924 return s
12925 }
12926
12927 // ExportMembersReportType : has no documentation (yet)
12928 type ExportMembersReportType struct {
12929 // Description : has no documentation (yet)
12930 Description string `json:"description"`
12931 }
12932
12933 // NewExportMembersReportType returns a new ExportMembersReportType instance
12934 func NewExportMembersReportType(Description string) *ExportMembersReportType {
12935 s := new(ExportMembersReportType)
12936 s.Description = Description
12937 return s
12938 }
12939
12940 // ExtendedVersionHistoryChangePolicyDetails : Accepted/opted out of extended
12941 // version history.
12942 type ExtendedVersionHistoryChangePolicyDetails struct {
12943 // NewValue : New extended version history policy.
12944 NewValue *ExtendedVersionHistoryPolicy `json:"new_value"`
12945 // PreviousValue : Previous extended version history policy. Might be
12946 // missing due to historical data gap.
12947 PreviousValue *ExtendedVersionHistoryPolicy `json:"previous_value,omitempty"`
12948 }
12949
12950 // NewExtendedVersionHistoryChangePolicyDetails returns a new ExtendedVersionHistoryChangePolicyDetails instance
12951 func NewExtendedVersionHistoryChangePolicyDetails(NewValue *ExtendedVersionHistoryPolicy) *ExtendedVersionHistoryChangePolicyDetails {
12952 s := new(ExtendedVersionHistoryChangePolicyDetails)
12953 s.NewValue = NewValue
12954 return s
12955 }
12956
12957 // ExtendedVersionHistoryChangePolicyType : has no documentation (yet)
12958 type ExtendedVersionHistoryChangePolicyType struct {
12959 // Description : has no documentation (yet)
12960 Description string `json:"description"`
12961 }
12962
12963 // NewExtendedVersionHistoryChangePolicyType returns a new ExtendedVersionHistoryChangePolicyType instance
12964 func NewExtendedVersionHistoryChangePolicyType(Description string) *ExtendedVersionHistoryChangePolicyType {
12965 s := new(ExtendedVersionHistoryChangePolicyType)
12966 s.Description = Description
12967 return s
12968 }
12969
12970 // ExtendedVersionHistoryPolicy : has no documentation (yet)
12971 type ExtendedVersionHistoryPolicy struct {
12972 dropbox.Tagged
12973 }
12974
12975 // Valid tag values for ExtendedVersionHistoryPolicy
12976 const (
12977 ExtendedVersionHistoryPolicyExplicitlyLimited = "explicitly_limited"
12978 ExtendedVersionHistoryPolicyExplicitlyUnlimited = "explicitly_unlimited"
12979 ExtendedVersionHistoryPolicyImplicitlyLimited = "implicitly_limited"
12980 ExtendedVersionHistoryPolicyImplicitlyUnlimited = "implicitly_unlimited"
12981 ExtendedVersionHistoryPolicyOther = "other"
12982 )
12983
12984 // ExternalSharingCreateReportDetails : Created External sharing report.
12985 type ExternalSharingCreateReportDetails struct {
12986 }
12987
12988 // NewExternalSharingCreateReportDetails returns a new ExternalSharingCreateReportDetails instance
12989 func NewExternalSharingCreateReportDetails() *ExternalSharingCreateReportDetails {
12990 s := new(ExternalSharingCreateReportDetails)
12991 return s
12992 }
12993
12994 // ExternalSharingCreateReportType : has no documentation (yet)
12995 type ExternalSharingCreateReportType struct {
12996 // Description : has no documentation (yet)
12997 Description string `json:"description"`
12998 }
12999
13000 // NewExternalSharingCreateReportType returns a new ExternalSharingCreateReportType instance
13001 func NewExternalSharingCreateReportType(Description string) *ExternalSharingCreateReportType {
13002 s := new(ExternalSharingCreateReportType)
13003 s.Description = Description
13004 return s
13005 }
13006
13007 // ExternalSharingReportFailedDetails : Couldn't create External sharing report.
13008 type ExternalSharingReportFailedDetails struct {
13009 // FailureReason : Failure reason.
13010 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
13011 }
13012
13013 // NewExternalSharingReportFailedDetails returns a new ExternalSharingReportFailedDetails instance
13014 func NewExternalSharingReportFailedDetails(FailureReason *team.TeamReportFailureReason) *ExternalSharingReportFailedDetails {
13015 s := new(ExternalSharingReportFailedDetails)
13016 s.FailureReason = FailureReason
13017 return s
13018 }
13019
13020 // ExternalSharingReportFailedType : has no documentation (yet)
13021 type ExternalSharingReportFailedType struct {
13022 // Description : has no documentation (yet)
13023 Description string `json:"description"`
13024 }
13025
13026 // NewExternalSharingReportFailedType returns a new ExternalSharingReportFailedType instance
13027 func NewExternalSharingReportFailedType(Description string) *ExternalSharingReportFailedType {
13028 s := new(ExternalSharingReportFailedType)
13029 s.Description = Description
13030 return s
13031 }
13032
13033 // ExternalUserLogInfo : A user without a Dropbox account.
13034 type ExternalUserLogInfo struct {
13035 // UserIdentifier : An external user identifier.
13036 UserIdentifier string `json:"user_identifier"`
13037 // IdentifierType : Identifier type.
13038 IdentifierType *IdentifierType `json:"identifier_type"`
13039 }
13040
13041 // NewExternalUserLogInfo returns a new ExternalUserLogInfo instance
13042 func NewExternalUserLogInfo(UserIdentifier string, IdentifierType *IdentifierType) *ExternalUserLogInfo {
13043 s := new(ExternalUserLogInfo)
13044 s.UserIdentifier = UserIdentifier
13045 s.IdentifierType = IdentifierType
13046 return s
13047 }
13048
13049 // FailureDetailsLogInfo : Provides details about a failure
13050 type FailureDetailsLogInfo struct {
13051 // UserFriendlyMessage : A user friendly explanation of the error.
13052 UserFriendlyMessage string `json:"user_friendly_message,omitempty"`
13053 // TechnicalErrorMessage : A technical explanation of the error. This is
13054 // relevant for some errors.
13055 TechnicalErrorMessage string `json:"technical_error_message,omitempty"`
13056 }
13057
13058 // NewFailureDetailsLogInfo returns a new FailureDetailsLogInfo instance
13059 func NewFailureDetailsLogInfo() *FailureDetailsLogInfo {
13060 s := new(FailureDetailsLogInfo)
13061 return s
13062 }
13063
13064 // FedAdminRole : has no documentation (yet)
13065 type FedAdminRole struct {
13066 dropbox.Tagged
13067 }
13068
13069 // Valid tag values for FedAdminRole
13070 const (
13071 FedAdminRoleEnterpriseAdmin = "enterprise_admin"
13072 FedAdminRoleNotEnterpriseAdmin = "not_enterprise_admin"
13073 FedAdminRoleOther = "other"
13074 )
13075
13076 // FedExtraDetails : More details about the organization or team.
13077 type FedExtraDetails struct {
13078 dropbox.Tagged
13079 // Organization : More details about the organization.
13080 Organization *OrganizationDetails `json:"organization,omitempty"`
13081 // Team : More details about the team.
13082 Team *TeamDetails `json:"team,omitempty"`
13083 }
13084
13085 // Valid tag values for FedExtraDetails
13086 const (
13087 FedExtraDetailsOrganization = "organization"
13088 FedExtraDetailsTeam = "team"
13089 FedExtraDetailsOther = "other"
13090 )
13091
13092 // UnmarshalJSON deserializes into a FedExtraDetails instance
13093 func (u *FedExtraDetails) UnmarshalJSON(body []byte) error {
13094 type wrap struct {
13095 dropbox.Tagged
13096 }
13097 var w wrap
13098 var err error
13099 if err = json.Unmarshal(body, &w); err != nil {
13100 return err
13101 }
13102 u.Tag = w.Tag
13103 switch u.Tag {
13104 case "organization":
13105 err = json.Unmarshal(body, &u.Organization)
13106
13107 if err != nil {
13108 return err
13109 }
13110 case "team":
13111 err = json.Unmarshal(body, &u.Team)
13112
13113 if err != nil {
13114 return err
13115 }
13116 }
13117 return nil
13118 }
13119
13120 // FedHandshakeAction : has no documentation (yet)
13121 type FedHandshakeAction struct {
13122 dropbox.Tagged
13123 }
13124
13125 // Valid tag values for FedHandshakeAction
13126 const (
13127 FedHandshakeActionAcceptedInvite = "accepted_invite"
13128 FedHandshakeActionCanceledInvite = "canceled_invite"
13129 FedHandshakeActionInviteExpired = "invite_expired"
13130 FedHandshakeActionInvited = "invited"
13131 FedHandshakeActionRejectedInvite = "rejected_invite"
13132 FedHandshakeActionRemovedTeam = "removed_team"
13133 FedHandshakeActionOther = "other"
13134 )
13135
13136 // FederationStatusChangeAdditionalInfo : Additional information about the
13137 // organization or connected team
13138 type FederationStatusChangeAdditionalInfo struct {
13139 dropbox.Tagged
13140 // ConnectedTeamName : The name of the team.
13141 ConnectedTeamName *ConnectedTeamName `json:"connected_team_name,omitempty"`
13142 // NonTrustedTeamDetails : The email to which the request was sent.
13143 NonTrustedTeamDetails *NonTrustedTeamDetails `json:"non_trusted_team_details,omitempty"`
13144 // OrganizationName : The name of the organization.
13145 OrganizationName *OrganizationName `json:"organization_name,omitempty"`
13146 }
13147
13148 // Valid tag values for FederationStatusChangeAdditionalInfo
13149 const (
13150 FederationStatusChangeAdditionalInfoConnectedTeamName = "connected_team_name"
13151 FederationStatusChangeAdditionalInfoNonTrustedTeamDetails = "non_trusted_team_details"
13152 FederationStatusChangeAdditionalInfoOrganizationName = "organization_name"
13153 FederationStatusChangeAdditionalInfoOther = "other"
13154 )
13155
13156 // UnmarshalJSON deserializes into a FederationStatusChangeAdditionalInfo instance
13157 func (u *FederationStatusChangeAdditionalInfo) UnmarshalJSON(body []byte) error {
13158 type wrap struct {
13159 dropbox.Tagged
13160 }
13161 var w wrap
13162 var err error
13163 if err = json.Unmarshal(body, &w); err != nil {
13164 return err
13165 }
13166 u.Tag = w.Tag
13167 switch u.Tag {
13168 case "connected_team_name":
13169 err = json.Unmarshal(body, &u.ConnectedTeamName)
13170
13171 if err != nil {
13172 return err
13173 }
13174 case "non_trusted_team_details":
13175 err = json.Unmarshal(body, &u.NonTrustedTeamDetails)
13176
13177 if err != nil {
13178 return err
13179 }
13180 case "organization_name":
13181 err = json.Unmarshal(body, &u.OrganizationName)
13182
13183 if err != nil {
13184 return err
13185 }
13186 }
13187 return nil
13188 }
13189
13190 // FileAddCommentDetails : Added file comment.
13191 type FileAddCommentDetails struct {
13192 // CommentText : Comment text.
13193 CommentText string `json:"comment_text,omitempty"`
13194 }
13195
13196 // NewFileAddCommentDetails returns a new FileAddCommentDetails instance
13197 func NewFileAddCommentDetails() *FileAddCommentDetails {
13198 s := new(FileAddCommentDetails)
13199 return s
13200 }
13201
13202 // FileAddCommentType : has no documentation (yet)
13203 type FileAddCommentType struct {
13204 // Description : has no documentation (yet)
13205 Description string `json:"description"`
13206 }
13207
13208 // NewFileAddCommentType returns a new FileAddCommentType instance
13209 func NewFileAddCommentType(Description string) *FileAddCommentType {
13210 s := new(FileAddCommentType)
13211 s.Description = Description
13212 return s
13213 }
13214
13215 // FileAddDetails : Added files and/or folders.
13216 type FileAddDetails struct {
13217 }
13218
13219 // NewFileAddDetails returns a new FileAddDetails instance
13220 func NewFileAddDetails() *FileAddDetails {
13221 s := new(FileAddDetails)
13222 return s
13223 }
13224
13225 // FileAddType : has no documentation (yet)
13226 type FileAddType struct {
13227 // Description : has no documentation (yet)
13228 Description string `json:"description"`
13229 }
13230
13231 // NewFileAddType returns a new FileAddType instance
13232 func NewFileAddType(Description string) *FileAddType {
13233 s := new(FileAddType)
13234 s.Description = Description
13235 return s
13236 }
13237
13238 // FileChangeCommentSubscriptionDetails : Subscribed to or unsubscribed from
13239 // comment notifications for file.
13240 type FileChangeCommentSubscriptionDetails struct {
13241 // NewValue : New file comment subscription.
13242 NewValue *FileCommentNotificationPolicy `json:"new_value"`
13243 // PreviousValue : Previous file comment subscription. Might be missing due
13244 // to historical data gap.
13245 PreviousValue *FileCommentNotificationPolicy `json:"previous_value,omitempty"`
13246 }
13247
13248 // NewFileChangeCommentSubscriptionDetails returns a new FileChangeCommentSubscriptionDetails instance
13249 func NewFileChangeCommentSubscriptionDetails(NewValue *FileCommentNotificationPolicy) *FileChangeCommentSubscriptionDetails {
13250 s := new(FileChangeCommentSubscriptionDetails)
13251 s.NewValue = NewValue
13252 return s
13253 }
13254
13255 // FileChangeCommentSubscriptionType : has no documentation (yet)
13256 type FileChangeCommentSubscriptionType struct {
13257 // Description : has no documentation (yet)
13258 Description string `json:"description"`
13259 }
13260
13261 // NewFileChangeCommentSubscriptionType returns a new FileChangeCommentSubscriptionType instance
13262 func NewFileChangeCommentSubscriptionType(Description string) *FileChangeCommentSubscriptionType {
13263 s := new(FileChangeCommentSubscriptionType)
13264 s.Description = Description
13265 return s
13266 }
13267
13268 // FileCommentNotificationPolicy : Enable or disable file comments notifications
13269 type FileCommentNotificationPolicy struct {
13270 dropbox.Tagged
13271 }
13272
13273 // Valid tag values for FileCommentNotificationPolicy
13274 const (
13275 FileCommentNotificationPolicyDisabled = "disabled"
13276 FileCommentNotificationPolicyEnabled = "enabled"
13277 FileCommentNotificationPolicyOther = "other"
13278 )
13279
13280 // FileCommentsChangePolicyDetails : Enabled/disabled commenting on team files.
13281 type FileCommentsChangePolicyDetails struct {
13282 // NewValue : New commenting on team files policy.
13283 NewValue *FileCommentsPolicy `json:"new_value"`
13284 // PreviousValue : Previous commenting on team files policy. Might be
13285 // missing due to historical data gap.
13286 PreviousValue *FileCommentsPolicy `json:"previous_value,omitempty"`
13287 }
13288
13289 // NewFileCommentsChangePolicyDetails returns a new FileCommentsChangePolicyDetails instance
13290 func NewFileCommentsChangePolicyDetails(NewValue *FileCommentsPolicy) *FileCommentsChangePolicyDetails {
13291 s := new(FileCommentsChangePolicyDetails)
13292 s.NewValue = NewValue
13293 return s
13294 }
13295
13296 // FileCommentsChangePolicyType : has no documentation (yet)
13297 type FileCommentsChangePolicyType struct {
13298 // Description : has no documentation (yet)
13299 Description string `json:"description"`
13300 }
13301
13302 // NewFileCommentsChangePolicyType returns a new FileCommentsChangePolicyType instance
13303 func NewFileCommentsChangePolicyType(Description string) *FileCommentsChangePolicyType {
13304 s := new(FileCommentsChangePolicyType)
13305 s.Description = Description
13306 return s
13307 }
13308
13309 // FileCommentsPolicy : File comments policy
13310 type FileCommentsPolicy struct {
13311 dropbox.Tagged
13312 }
13313
13314 // Valid tag values for FileCommentsPolicy
13315 const (
13316 FileCommentsPolicyDisabled = "disabled"
13317 FileCommentsPolicyEnabled = "enabled"
13318 FileCommentsPolicyOther = "other"
13319 )
13320
13321 // FileCopyDetails : Copied files and/or folders.
13322 type FileCopyDetails struct {
13323 // RelocateActionDetails : Relocate action details.
13324 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
13325 }
13326
13327 // NewFileCopyDetails returns a new FileCopyDetails instance
13328 func NewFileCopyDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileCopyDetails {
13329 s := new(FileCopyDetails)
13330 s.RelocateActionDetails = RelocateActionDetails
13331 return s
13332 }
13333
13334 // FileCopyType : has no documentation (yet)
13335 type FileCopyType struct {
13336 // Description : has no documentation (yet)
13337 Description string `json:"description"`
13338 }
13339
13340 // NewFileCopyType returns a new FileCopyType instance
13341 func NewFileCopyType(Description string) *FileCopyType {
13342 s := new(FileCopyType)
13343 s.Description = Description
13344 return s
13345 }
13346
13347 // FileDeleteCommentDetails : Deleted file comment.
13348 type FileDeleteCommentDetails struct {
13349 // CommentText : Comment text.
13350 CommentText string `json:"comment_text,omitempty"`
13351 }
13352
13353 // NewFileDeleteCommentDetails returns a new FileDeleteCommentDetails instance
13354 func NewFileDeleteCommentDetails() *FileDeleteCommentDetails {
13355 s := new(FileDeleteCommentDetails)
13356 return s
13357 }
13358
13359 // FileDeleteCommentType : has no documentation (yet)
13360 type FileDeleteCommentType struct {
13361 // Description : has no documentation (yet)
13362 Description string `json:"description"`
13363 }
13364
13365 // NewFileDeleteCommentType returns a new FileDeleteCommentType instance
13366 func NewFileDeleteCommentType(Description string) *FileDeleteCommentType {
13367 s := new(FileDeleteCommentType)
13368 s.Description = Description
13369 return s
13370 }
13371
13372 // FileDeleteDetails : Deleted files and/or folders.
13373 type FileDeleteDetails struct {
13374 }
13375
13376 // NewFileDeleteDetails returns a new FileDeleteDetails instance
13377 func NewFileDeleteDetails() *FileDeleteDetails {
13378 s := new(FileDeleteDetails)
13379 return s
13380 }
13381
13382 // FileDeleteType : has no documentation (yet)
13383 type FileDeleteType struct {
13384 // Description : has no documentation (yet)
13385 Description string `json:"description"`
13386 }
13387
13388 // NewFileDeleteType returns a new FileDeleteType instance
13389 func NewFileDeleteType(Description string) *FileDeleteType {
13390 s := new(FileDeleteType)
13391 s.Description = Description
13392 return s
13393 }
13394
13395 // FileDownloadDetails : Downloaded files and/or folders.
13396 type FileDownloadDetails struct {
13397 }
13398
13399 // NewFileDownloadDetails returns a new FileDownloadDetails instance
13400 func NewFileDownloadDetails() *FileDownloadDetails {
13401 s := new(FileDownloadDetails)
13402 return s
13403 }
13404
13405 // FileDownloadType : has no documentation (yet)
13406 type FileDownloadType struct {
13407 // Description : has no documentation (yet)
13408 Description string `json:"description"`
13409 }
13410
13411 // NewFileDownloadType returns a new FileDownloadType instance
13412 func NewFileDownloadType(Description string) *FileDownloadType {
13413 s := new(FileDownloadType)
13414 s.Description = Description
13415 return s
13416 }
13417
13418 // FileEditCommentDetails : Edited file comment.
13419 type FileEditCommentDetails struct {
13420 // CommentText : Comment text.
13421 CommentText string `json:"comment_text,omitempty"`
13422 // PreviousCommentText : Previous comment text.
13423 PreviousCommentText string `json:"previous_comment_text"`
13424 }
13425
13426 // NewFileEditCommentDetails returns a new FileEditCommentDetails instance
13427 func NewFileEditCommentDetails(PreviousCommentText string) *FileEditCommentDetails {
13428 s := new(FileEditCommentDetails)
13429 s.PreviousCommentText = PreviousCommentText
13430 return s
13431 }
13432
13433 // FileEditCommentType : has no documentation (yet)
13434 type FileEditCommentType struct {
13435 // Description : has no documentation (yet)
13436 Description string `json:"description"`
13437 }
13438
13439 // NewFileEditCommentType returns a new FileEditCommentType instance
13440 func NewFileEditCommentType(Description string) *FileEditCommentType {
13441 s := new(FileEditCommentType)
13442 s.Description = Description
13443 return s
13444 }
13445
13446 // FileEditDetails : Edited files.
13447 type FileEditDetails struct {
13448 }
13449
13450 // NewFileEditDetails returns a new FileEditDetails instance
13451 func NewFileEditDetails() *FileEditDetails {
13452 s := new(FileEditDetails)
13453 return s
13454 }
13455
13456 // FileEditType : has no documentation (yet)
13457 type FileEditType struct {
13458 // Description : has no documentation (yet)
13459 Description string `json:"description"`
13460 }
13461
13462 // NewFileEditType returns a new FileEditType instance
13463 func NewFileEditType(Description string) *FileEditType {
13464 s := new(FileEditType)
13465 s.Description = Description
13466 return s
13467 }
13468
13469 // FileGetCopyReferenceDetails : Created copy reference to file/folder.
13470 type FileGetCopyReferenceDetails struct {
13471 }
13472
13473 // NewFileGetCopyReferenceDetails returns a new FileGetCopyReferenceDetails instance
13474 func NewFileGetCopyReferenceDetails() *FileGetCopyReferenceDetails {
13475 s := new(FileGetCopyReferenceDetails)
13476 return s
13477 }
13478
13479 // FileGetCopyReferenceType : has no documentation (yet)
13480 type FileGetCopyReferenceType struct {
13481 // Description : has no documentation (yet)
13482 Description string `json:"description"`
13483 }
13484
13485 // NewFileGetCopyReferenceType returns a new FileGetCopyReferenceType instance
13486 func NewFileGetCopyReferenceType(Description string) *FileGetCopyReferenceType {
13487 s := new(FileGetCopyReferenceType)
13488 s.Description = Description
13489 return s
13490 }
13491
13492 // FileLikeCommentDetails : Liked file comment.
13493 type FileLikeCommentDetails struct {
13494 // CommentText : Comment text.
13495 CommentText string `json:"comment_text,omitempty"`
13496 }
13497
13498 // NewFileLikeCommentDetails returns a new FileLikeCommentDetails instance
13499 func NewFileLikeCommentDetails() *FileLikeCommentDetails {
13500 s := new(FileLikeCommentDetails)
13501 return s
13502 }
13503
13504 // FileLikeCommentType : has no documentation (yet)
13505 type FileLikeCommentType struct {
13506 // Description : has no documentation (yet)
13507 Description string `json:"description"`
13508 }
13509
13510 // NewFileLikeCommentType returns a new FileLikeCommentType instance
13511 func NewFileLikeCommentType(Description string) *FileLikeCommentType {
13512 s := new(FileLikeCommentType)
13513 s.Description = Description
13514 return s
13515 }
13516
13517 // FileLockingLockStatusChangedDetails : Locked/unlocked editing for a file.
13518 type FileLockingLockStatusChangedDetails struct {
13519 // PreviousValue : Previous lock status of the file.
13520 PreviousValue *LockStatus `json:"previous_value"`
13521 // NewValue : New lock status of the file.
13522 NewValue *LockStatus `json:"new_value"`
13523 }
13524
13525 // NewFileLockingLockStatusChangedDetails returns a new FileLockingLockStatusChangedDetails instance
13526 func NewFileLockingLockStatusChangedDetails(PreviousValue *LockStatus, NewValue *LockStatus) *FileLockingLockStatusChangedDetails {
13527 s := new(FileLockingLockStatusChangedDetails)
13528 s.PreviousValue = PreviousValue
13529 s.NewValue = NewValue
13530 return s
13531 }
13532
13533 // FileLockingLockStatusChangedType : has no documentation (yet)
13534 type FileLockingLockStatusChangedType struct {
13535 // Description : has no documentation (yet)
13536 Description string `json:"description"`
13537 }
13538
13539 // NewFileLockingLockStatusChangedType returns a new FileLockingLockStatusChangedType instance
13540 func NewFileLockingLockStatusChangedType(Description string) *FileLockingLockStatusChangedType {
13541 s := new(FileLockingLockStatusChangedType)
13542 s.Description = Description
13543 return s
13544 }
13545
13546 // FileLockingPolicyChangedDetails : Changed file locking policy for team.
13547 type FileLockingPolicyChangedDetails struct {
13548 // NewValue : New file locking policy.
13549 NewValue *team_policies.FileLockingPolicyState `json:"new_value"`
13550 // PreviousValue : Previous file locking policy.
13551 PreviousValue *team_policies.FileLockingPolicyState `json:"previous_value"`
13552 }
13553
13554 // NewFileLockingPolicyChangedDetails returns a new FileLockingPolicyChangedDetails instance
13555 func NewFileLockingPolicyChangedDetails(NewValue *team_policies.FileLockingPolicyState, PreviousValue *team_policies.FileLockingPolicyState) *FileLockingPolicyChangedDetails {
13556 s := new(FileLockingPolicyChangedDetails)
13557 s.NewValue = NewValue
13558 s.PreviousValue = PreviousValue
13559 return s
13560 }
13561
13562 // FileLockingPolicyChangedType : has no documentation (yet)
13563 type FileLockingPolicyChangedType struct {
13564 // Description : has no documentation (yet)
13565 Description string `json:"description"`
13566 }
13567
13568 // NewFileLockingPolicyChangedType returns a new FileLockingPolicyChangedType instance
13569 func NewFileLockingPolicyChangedType(Description string) *FileLockingPolicyChangedType {
13570 s := new(FileLockingPolicyChangedType)
13571 s.Description = Description
13572 return s
13573 }
13574
13575 // FileOrFolderLogInfo : Generic information relevant both for files and folders
13576 type FileOrFolderLogInfo struct {
13577 // Path : Path relative to event context.
13578 Path *PathLogInfo `json:"path"`
13579 // DisplayName : Display name.
13580 DisplayName string `json:"display_name,omitempty"`
13581 // FileId : Unique ID.
13582 FileId string `json:"file_id,omitempty"`
13583 // FileSize : File or folder size in bytes.
13584 FileSize uint64 `json:"file_size,omitempty"`
13585 }
13586
13587 // NewFileOrFolderLogInfo returns a new FileOrFolderLogInfo instance
13588 func NewFileOrFolderLogInfo(Path *PathLogInfo) *FileOrFolderLogInfo {
13589 s := new(FileOrFolderLogInfo)
13590 s.Path = Path
13591 return s
13592 }
13593
13594 // FileLogInfo : File's logged information.
13595 type FileLogInfo struct {
13596 FileOrFolderLogInfo
13597 }
13598
13599 // NewFileLogInfo returns a new FileLogInfo instance
13600 func NewFileLogInfo(Path *PathLogInfo) *FileLogInfo {
13601 s := new(FileLogInfo)
13602 s.Path = Path
13603 return s
13604 }
13605
13606 // FileMoveDetails : Moved files and/or folders.
13607 type FileMoveDetails struct {
13608 // RelocateActionDetails : Relocate action details.
13609 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
13610 }
13611
13612 // NewFileMoveDetails returns a new FileMoveDetails instance
13613 func NewFileMoveDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileMoveDetails {
13614 s := new(FileMoveDetails)
13615 s.RelocateActionDetails = RelocateActionDetails
13616 return s
13617 }
13618
13619 // FileMoveType : has no documentation (yet)
13620 type FileMoveType struct {
13621 // Description : has no documentation (yet)
13622 Description string `json:"description"`
13623 }
13624
13625 // NewFileMoveType returns a new FileMoveType instance
13626 func NewFileMoveType(Description string) *FileMoveType {
13627 s := new(FileMoveType)
13628 s.Description = Description
13629 return s
13630 }
13631
13632 // FilePermanentlyDeleteDetails : Permanently deleted files and/or folders.
13633 type FilePermanentlyDeleteDetails struct {
13634 }
13635
13636 // NewFilePermanentlyDeleteDetails returns a new FilePermanentlyDeleteDetails instance
13637 func NewFilePermanentlyDeleteDetails() *FilePermanentlyDeleteDetails {
13638 s := new(FilePermanentlyDeleteDetails)
13639 return s
13640 }
13641
13642 // FilePermanentlyDeleteType : has no documentation (yet)
13643 type FilePermanentlyDeleteType struct {
13644 // Description : has no documentation (yet)
13645 Description string `json:"description"`
13646 }
13647
13648 // NewFilePermanentlyDeleteType returns a new FilePermanentlyDeleteType instance
13649 func NewFilePermanentlyDeleteType(Description string) *FilePermanentlyDeleteType {
13650 s := new(FilePermanentlyDeleteType)
13651 s.Description = Description
13652 return s
13653 }
13654
13655 // FilePreviewDetails : Previewed files and/or folders.
13656 type FilePreviewDetails struct {
13657 }
13658
13659 // NewFilePreviewDetails returns a new FilePreviewDetails instance
13660 func NewFilePreviewDetails() *FilePreviewDetails {
13661 s := new(FilePreviewDetails)
13662 return s
13663 }
13664
13665 // FilePreviewType : has no documentation (yet)
13666 type FilePreviewType struct {
13667 // Description : has no documentation (yet)
13668 Description string `json:"description"`
13669 }
13670
13671 // NewFilePreviewType returns a new FilePreviewType instance
13672 func NewFilePreviewType(Description string) *FilePreviewType {
13673 s := new(FilePreviewType)
13674 s.Description = Description
13675 return s
13676 }
13677
13678 // FileRenameDetails : Renamed files and/or folders.
13679 type FileRenameDetails struct {
13680 // RelocateActionDetails : Relocate action details.
13681 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
13682 }
13683
13684 // NewFileRenameDetails returns a new FileRenameDetails instance
13685 func NewFileRenameDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileRenameDetails {
13686 s := new(FileRenameDetails)
13687 s.RelocateActionDetails = RelocateActionDetails
13688 return s
13689 }
13690
13691 // FileRenameType : has no documentation (yet)
13692 type FileRenameType struct {
13693 // Description : has no documentation (yet)
13694 Description string `json:"description"`
13695 }
13696
13697 // NewFileRenameType returns a new FileRenameType instance
13698 func NewFileRenameType(Description string) *FileRenameType {
13699 s := new(FileRenameType)
13700 s.Description = Description
13701 return s
13702 }
13703
13704 // FileRequestChangeDetails : Changed file request.
13705 type FileRequestChangeDetails struct {
13706 // FileRequestId : File request id. Might be missing due to historical data
13707 // gap.
13708 FileRequestId string `json:"file_request_id,omitempty"`
13709 // PreviousDetails : Previous file request details. Might be missing due to
13710 // historical data gap.
13711 PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
13712 // NewDetails : New file request details.
13713 NewDetails *FileRequestDetails `json:"new_details"`
13714 }
13715
13716 // NewFileRequestChangeDetails returns a new FileRequestChangeDetails instance
13717 func NewFileRequestChangeDetails(NewDetails *FileRequestDetails) *FileRequestChangeDetails {
13718 s := new(FileRequestChangeDetails)
13719 s.NewDetails = NewDetails
13720 return s
13721 }
13722
13723 // FileRequestChangeType : has no documentation (yet)
13724 type FileRequestChangeType struct {
13725 // Description : has no documentation (yet)
13726 Description string `json:"description"`
13727 }
13728
13729 // NewFileRequestChangeType returns a new FileRequestChangeType instance
13730 func NewFileRequestChangeType(Description string) *FileRequestChangeType {
13731 s := new(FileRequestChangeType)
13732 s.Description = Description
13733 return s
13734 }
13735
13736 // FileRequestCloseDetails : Closed file request.
13737 type FileRequestCloseDetails struct {
13738 // FileRequestId : File request id. Might be missing due to historical data
13739 // gap.
13740 FileRequestId string `json:"file_request_id,omitempty"`
13741 // PreviousDetails : Previous file request details. Might be missing due to
13742 // historical data gap.
13743 PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
13744 }
13745
13746 // NewFileRequestCloseDetails returns a new FileRequestCloseDetails instance
13747 func NewFileRequestCloseDetails() *FileRequestCloseDetails {
13748 s := new(FileRequestCloseDetails)
13749 return s
13750 }
13751
13752 // FileRequestCloseType : has no documentation (yet)
13753 type FileRequestCloseType struct {
13754 // Description : has no documentation (yet)
13755 Description string `json:"description"`
13756 }
13757
13758 // NewFileRequestCloseType returns a new FileRequestCloseType instance
13759 func NewFileRequestCloseType(Description string) *FileRequestCloseType {
13760 s := new(FileRequestCloseType)
13761 s.Description = Description
13762 return s
13763 }
13764
13765 // FileRequestCreateDetails : Created file request.
13766 type FileRequestCreateDetails struct {
13767 // FileRequestId : File request id. Might be missing due to historical data
13768 // gap.
13769 FileRequestId string `json:"file_request_id,omitempty"`
13770 // RequestDetails : File request details. Might be missing due to historical
13771 // data gap.
13772 RequestDetails *FileRequestDetails `json:"request_details,omitempty"`
13773 }
13774
13775 // NewFileRequestCreateDetails returns a new FileRequestCreateDetails instance
13776 func NewFileRequestCreateDetails() *FileRequestCreateDetails {
13777 s := new(FileRequestCreateDetails)
13778 return s
13779 }
13780
13781 // FileRequestCreateType : has no documentation (yet)
13782 type FileRequestCreateType struct {
13783 // Description : has no documentation (yet)
13784 Description string `json:"description"`
13785 }
13786
13787 // NewFileRequestCreateType returns a new FileRequestCreateType instance
13788 func NewFileRequestCreateType(Description string) *FileRequestCreateType {
13789 s := new(FileRequestCreateType)
13790 s.Description = Description
13791 return s
13792 }
13793
13794 // FileRequestDeadline : File request deadline
13795 type FileRequestDeadline struct {
13796 // Deadline : The deadline for this file request. Might be missing due to
13797 // historical data gap.
13798 Deadline *time.Time `json:"deadline,omitempty"`
13799 // AllowLateUploads : If set, allow uploads after the deadline has passed.
13800 AllowLateUploads string `json:"allow_late_uploads,omitempty"`
13801 }
13802
13803 // NewFileRequestDeadline returns a new FileRequestDeadline instance
13804 func NewFileRequestDeadline() *FileRequestDeadline {
13805 s := new(FileRequestDeadline)
13806 return s
13807 }
13808
13809 // FileRequestDeleteDetails : Delete file request.
13810 type FileRequestDeleteDetails struct {
13811 // FileRequestId : File request id. Might be missing due to historical data
13812 // gap.
13813 FileRequestId string `json:"file_request_id,omitempty"`
13814 // PreviousDetails : Previous file request details. Might be missing due to
13815 // historical data gap.
13816 PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"`
13817 }
13818
13819 // NewFileRequestDeleteDetails returns a new FileRequestDeleteDetails instance
13820 func NewFileRequestDeleteDetails() *FileRequestDeleteDetails {
13821 s := new(FileRequestDeleteDetails)
13822 return s
13823 }
13824
13825 // FileRequestDeleteType : has no documentation (yet)
13826 type FileRequestDeleteType struct {
13827 // Description : has no documentation (yet)
13828 Description string `json:"description"`
13829 }
13830
13831 // NewFileRequestDeleteType returns a new FileRequestDeleteType instance
13832 func NewFileRequestDeleteType(Description string) *FileRequestDeleteType {
13833 s := new(FileRequestDeleteType)
13834 s.Description = Description
13835 return s
13836 }
13837
13838 // FileRequestDetails : File request details
13839 type FileRequestDetails struct {
13840 // AssetIndex : Asset position in the Assets list.
13841 AssetIndex uint64 `json:"asset_index"`
13842 // Deadline : File request deadline.
13843 Deadline *FileRequestDeadline `json:"deadline,omitempty"`
13844 }
13845
13846 // NewFileRequestDetails returns a new FileRequestDetails instance
13847 func NewFileRequestDetails(AssetIndex uint64) *FileRequestDetails {
13848 s := new(FileRequestDetails)
13849 s.AssetIndex = AssetIndex
13850 return s
13851 }
13852
13853 // FileRequestReceiveFileDetails : Received files for file request.
13854 type FileRequestReceiveFileDetails struct {
13855 // FileRequestId : File request id. Might be missing due to historical data
13856 // gap.
13857 FileRequestId string `json:"file_request_id,omitempty"`
13858 // FileRequestDetails : File request details. Might be missing due to
13859 // historical data gap.
13860 FileRequestDetails *FileRequestDetails `json:"file_request_details,omitempty"`
13861 // SubmittedFileNames : Submitted file names.
13862 SubmittedFileNames []string `json:"submitted_file_names"`
13863 // SubmitterName : The name as provided by the submitter.
13864 SubmitterName string `json:"submitter_name,omitempty"`
13865 // SubmitterEmail : The email as provided by the submitter.
13866 SubmitterEmail string `json:"submitter_email,omitempty"`
13867 }
13868
13869 // NewFileRequestReceiveFileDetails returns a new FileRequestReceiveFileDetails instance
13870 func NewFileRequestReceiveFileDetails(SubmittedFileNames []string) *FileRequestReceiveFileDetails {
13871 s := new(FileRequestReceiveFileDetails)
13872 s.SubmittedFileNames = SubmittedFileNames
13873 return s
13874 }
13875
13876 // FileRequestReceiveFileType : has no documentation (yet)
13877 type FileRequestReceiveFileType struct {
13878 // Description : has no documentation (yet)
13879 Description string `json:"description"`
13880 }
13881
13882 // NewFileRequestReceiveFileType returns a new FileRequestReceiveFileType instance
13883 func NewFileRequestReceiveFileType(Description string) *FileRequestReceiveFileType {
13884 s := new(FileRequestReceiveFileType)
13885 s.Description = Description
13886 return s
13887 }
13888
13889 // FileRequestsChangePolicyDetails : Enabled/disabled file requests.
13890 type FileRequestsChangePolicyDetails struct {
13891 // NewValue : New file requests policy.
13892 NewValue *FileRequestsPolicy `json:"new_value"`
13893 // PreviousValue : Previous file requests policy. Might be missing due to
13894 // historical data gap.
13895 PreviousValue *FileRequestsPolicy `json:"previous_value,omitempty"`
13896 }
13897
13898 // NewFileRequestsChangePolicyDetails returns a new FileRequestsChangePolicyDetails instance
13899 func NewFileRequestsChangePolicyDetails(NewValue *FileRequestsPolicy) *FileRequestsChangePolicyDetails {
13900 s := new(FileRequestsChangePolicyDetails)
13901 s.NewValue = NewValue
13902 return s
13903 }
13904
13905 // FileRequestsChangePolicyType : has no documentation (yet)
13906 type FileRequestsChangePolicyType struct {
13907 // Description : has no documentation (yet)
13908 Description string `json:"description"`
13909 }
13910
13911 // NewFileRequestsChangePolicyType returns a new FileRequestsChangePolicyType instance
13912 func NewFileRequestsChangePolicyType(Description string) *FileRequestsChangePolicyType {
13913 s := new(FileRequestsChangePolicyType)
13914 s.Description = Description
13915 return s
13916 }
13917
13918 // FileRequestsEmailsEnabledDetails : Enabled file request emails for everyone.
13919 type FileRequestsEmailsEnabledDetails struct {
13920 }
13921
13922 // NewFileRequestsEmailsEnabledDetails returns a new FileRequestsEmailsEnabledDetails instance
13923 func NewFileRequestsEmailsEnabledDetails() *FileRequestsEmailsEnabledDetails {
13924 s := new(FileRequestsEmailsEnabledDetails)
13925 return s
13926 }
13927
13928 // FileRequestsEmailsEnabledType : has no documentation (yet)
13929 type FileRequestsEmailsEnabledType struct {
13930 // Description : has no documentation (yet)
13931 Description string `json:"description"`
13932 }
13933
13934 // NewFileRequestsEmailsEnabledType returns a new FileRequestsEmailsEnabledType instance
13935 func NewFileRequestsEmailsEnabledType(Description string) *FileRequestsEmailsEnabledType {
13936 s := new(FileRequestsEmailsEnabledType)
13937 s.Description = Description
13938 return s
13939 }
13940
13941 // FileRequestsEmailsRestrictedToTeamOnlyDetails : Enabled file request emails
13942 // for team.
13943 type FileRequestsEmailsRestrictedToTeamOnlyDetails struct {
13944 }
13945
13946 // NewFileRequestsEmailsRestrictedToTeamOnlyDetails returns a new FileRequestsEmailsRestrictedToTeamOnlyDetails instance
13947 func NewFileRequestsEmailsRestrictedToTeamOnlyDetails() *FileRequestsEmailsRestrictedToTeamOnlyDetails {
13948 s := new(FileRequestsEmailsRestrictedToTeamOnlyDetails)
13949 return s
13950 }
13951
13952 // FileRequestsEmailsRestrictedToTeamOnlyType : has no documentation (yet)
13953 type FileRequestsEmailsRestrictedToTeamOnlyType struct {
13954 // Description : has no documentation (yet)
13955 Description string `json:"description"`
13956 }
13957
13958 // NewFileRequestsEmailsRestrictedToTeamOnlyType returns a new FileRequestsEmailsRestrictedToTeamOnlyType instance
13959 func NewFileRequestsEmailsRestrictedToTeamOnlyType(Description string) *FileRequestsEmailsRestrictedToTeamOnlyType {
13960 s := new(FileRequestsEmailsRestrictedToTeamOnlyType)
13961 s.Description = Description
13962 return s
13963 }
13964
13965 // FileRequestsPolicy : File requests policy
13966 type FileRequestsPolicy struct {
13967 dropbox.Tagged
13968 }
13969
13970 // Valid tag values for FileRequestsPolicy
13971 const (
13972 FileRequestsPolicyDisabled = "disabled"
13973 FileRequestsPolicyEnabled = "enabled"
13974 FileRequestsPolicyOther = "other"
13975 )
13976
13977 // FileResolveCommentDetails : Resolved file comment.
13978 type FileResolveCommentDetails struct {
13979 // CommentText : Comment text.
13980 CommentText string `json:"comment_text,omitempty"`
13981 }
13982
13983 // NewFileResolveCommentDetails returns a new FileResolveCommentDetails instance
13984 func NewFileResolveCommentDetails() *FileResolveCommentDetails {
13985 s := new(FileResolveCommentDetails)
13986 return s
13987 }
13988
13989 // FileResolveCommentType : has no documentation (yet)
13990 type FileResolveCommentType struct {
13991 // Description : has no documentation (yet)
13992 Description string `json:"description"`
13993 }
13994
13995 // NewFileResolveCommentType returns a new FileResolveCommentType instance
13996 func NewFileResolveCommentType(Description string) *FileResolveCommentType {
13997 s := new(FileResolveCommentType)
13998 s.Description = Description
13999 return s
14000 }
14001
14002 // FileRestoreDetails : Restored deleted files and/or folders.
14003 type FileRestoreDetails struct {
14004 }
14005
14006 // NewFileRestoreDetails returns a new FileRestoreDetails instance
14007 func NewFileRestoreDetails() *FileRestoreDetails {
14008 s := new(FileRestoreDetails)
14009 return s
14010 }
14011
14012 // FileRestoreType : has no documentation (yet)
14013 type FileRestoreType struct {
14014 // Description : has no documentation (yet)
14015 Description string `json:"description"`
14016 }
14017
14018 // NewFileRestoreType returns a new FileRestoreType instance
14019 func NewFileRestoreType(Description string) *FileRestoreType {
14020 s := new(FileRestoreType)
14021 s.Description = Description
14022 return s
14023 }
14024
14025 // FileRevertDetails : Reverted files to previous version.
14026 type FileRevertDetails struct {
14027 }
14028
14029 // NewFileRevertDetails returns a new FileRevertDetails instance
14030 func NewFileRevertDetails() *FileRevertDetails {
14031 s := new(FileRevertDetails)
14032 return s
14033 }
14034
14035 // FileRevertType : has no documentation (yet)
14036 type FileRevertType struct {
14037 // Description : has no documentation (yet)
14038 Description string `json:"description"`
14039 }
14040
14041 // NewFileRevertType returns a new FileRevertType instance
14042 func NewFileRevertType(Description string) *FileRevertType {
14043 s := new(FileRevertType)
14044 s.Description = Description
14045 return s
14046 }
14047
14048 // FileRollbackChangesDetails : Rolled back file actions.
14049 type FileRollbackChangesDetails struct {
14050 }
14051
14052 // NewFileRollbackChangesDetails returns a new FileRollbackChangesDetails instance
14053 func NewFileRollbackChangesDetails() *FileRollbackChangesDetails {
14054 s := new(FileRollbackChangesDetails)
14055 return s
14056 }
14057
14058 // FileRollbackChangesType : has no documentation (yet)
14059 type FileRollbackChangesType struct {
14060 // Description : has no documentation (yet)
14061 Description string `json:"description"`
14062 }
14063
14064 // NewFileRollbackChangesType returns a new FileRollbackChangesType instance
14065 func NewFileRollbackChangesType(Description string) *FileRollbackChangesType {
14066 s := new(FileRollbackChangesType)
14067 s.Description = Description
14068 return s
14069 }
14070
14071 // FileSaveCopyReferenceDetails : Saved file/folder using copy reference.
14072 type FileSaveCopyReferenceDetails struct {
14073 // RelocateActionDetails : Relocate action details.
14074 RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"`
14075 }
14076
14077 // NewFileSaveCopyReferenceDetails returns a new FileSaveCopyReferenceDetails instance
14078 func NewFileSaveCopyReferenceDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileSaveCopyReferenceDetails {
14079 s := new(FileSaveCopyReferenceDetails)
14080 s.RelocateActionDetails = RelocateActionDetails
14081 return s
14082 }
14083
14084 // FileSaveCopyReferenceType : has no documentation (yet)
14085 type FileSaveCopyReferenceType struct {
14086 // Description : has no documentation (yet)
14087 Description string `json:"description"`
14088 }
14089
14090 // NewFileSaveCopyReferenceType returns a new FileSaveCopyReferenceType instance
14091 func NewFileSaveCopyReferenceType(Description string) *FileSaveCopyReferenceType {
14092 s := new(FileSaveCopyReferenceType)
14093 s.Description = Description
14094 return s
14095 }
14096
14097 // FileTransfersFileAddDetails : Transfer files added.
14098 type FileTransfersFileAddDetails struct {
14099 // FileTransferId : Transfer id.
14100 FileTransferId string `json:"file_transfer_id"`
14101 }
14102
14103 // NewFileTransfersFileAddDetails returns a new FileTransfersFileAddDetails instance
14104 func NewFileTransfersFileAddDetails(FileTransferId string) *FileTransfersFileAddDetails {
14105 s := new(FileTransfersFileAddDetails)
14106 s.FileTransferId = FileTransferId
14107 return s
14108 }
14109
14110 // FileTransfersFileAddType : has no documentation (yet)
14111 type FileTransfersFileAddType struct {
14112 // Description : has no documentation (yet)
14113 Description string `json:"description"`
14114 }
14115
14116 // NewFileTransfersFileAddType returns a new FileTransfersFileAddType instance
14117 func NewFileTransfersFileAddType(Description string) *FileTransfersFileAddType {
14118 s := new(FileTransfersFileAddType)
14119 s.Description = Description
14120 return s
14121 }
14122
14123 // FileTransfersPolicy : File transfers policy
14124 type FileTransfersPolicy struct {
14125 dropbox.Tagged
14126 }
14127
14128 // Valid tag values for FileTransfersPolicy
14129 const (
14130 FileTransfersPolicyDisabled = "disabled"
14131 FileTransfersPolicyEnabled = "enabled"
14132 FileTransfersPolicyOther = "other"
14133 )
14134
14135 // FileTransfersPolicyChangedDetails : Changed file transfers policy for team.
14136 type FileTransfersPolicyChangedDetails struct {
14137 // NewValue : New file transfers policy.
14138 NewValue *FileTransfersPolicy `json:"new_value"`
14139 // PreviousValue : Previous file transfers policy.
14140 PreviousValue *FileTransfersPolicy `json:"previous_value"`
14141 }
14142
14143 // NewFileTransfersPolicyChangedDetails returns a new FileTransfersPolicyChangedDetails instance
14144 func NewFileTransfersPolicyChangedDetails(NewValue *FileTransfersPolicy, PreviousValue *FileTransfersPolicy) *FileTransfersPolicyChangedDetails {
14145 s := new(FileTransfersPolicyChangedDetails)
14146 s.NewValue = NewValue
14147 s.PreviousValue = PreviousValue
14148 return s
14149 }
14150
14151 // FileTransfersPolicyChangedType : has no documentation (yet)
14152 type FileTransfersPolicyChangedType struct {
14153 // Description : has no documentation (yet)
14154 Description string `json:"description"`
14155 }
14156
14157 // NewFileTransfersPolicyChangedType returns a new FileTransfersPolicyChangedType instance
14158 func NewFileTransfersPolicyChangedType(Description string) *FileTransfersPolicyChangedType {
14159 s := new(FileTransfersPolicyChangedType)
14160 s.Description = Description
14161 return s
14162 }
14163
14164 // FileTransfersTransferDeleteDetails : Deleted transfer.
14165 type FileTransfersTransferDeleteDetails struct {
14166 // FileTransferId : Transfer id.
14167 FileTransferId string `json:"file_transfer_id"`
14168 }
14169
14170 // NewFileTransfersTransferDeleteDetails returns a new FileTransfersTransferDeleteDetails instance
14171 func NewFileTransfersTransferDeleteDetails(FileTransferId string) *FileTransfersTransferDeleteDetails {
14172 s := new(FileTransfersTransferDeleteDetails)
14173 s.FileTransferId = FileTransferId
14174 return s
14175 }
14176
14177 // FileTransfersTransferDeleteType : has no documentation (yet)
14178 type FileTransfersTransferDeleteType struct {
14179 // Description : has no documentation (yet)
14180 Description string `json:"description"`
14181 }
14182
14183 // NewFileTransfersTransferDeleteType returns a new FileTransfersTransferDeleteType instance
14184 func NewFileTransfersTransferDeleteType(Description string) *FileTransfersTransferDeleteType {
14185 s := new(FileTransfersTransferDeleteType)
14186 s.Description = Description
14187 return s
14188 }
14189
14190 // FileTransfersTransferDownloadDetails : Transfer downloaded.
14191 type FileTransfersTransferDownloadDetails struct {
14192 // FileTransferId : Transfer id.
14193 FileTransferId string `json:"file_transfer_id"`
14194 }
14195
14196 // NewFileTransfersTransferDownloadDetails returns a new FileTransfersTransferDownloadDetails instance
14197 func NewFileTransfersTransferDownloadDetails(FileTransferId string) *FileTransfersTransferDownloadDetails {
14198 s := new(FileTransfersTransferDownloadDetails)
14199 s.FileTransferId = FileTransferId
14200 return s
14201 }
14202
14203 // FileTransfersTransferDownloadType : has no documentation (yet)
14204 type FileTransfersTransferDownloadType struct {
14205 // Description : has no documentation (yet)
14206 Description string `json:"description"`
14207 }
14208
14209 // NewFileTransfersTransferDownloadType returns a new FileTransfersTransferDownloadType instance
14210 func NewFileTransfersTransferDownloadType(Description string) *FileTransfersTransferDownloadType {
14211 s := new(FileTransfersTransferDownloadType)
14212 s.Description = Description
14213 return s
14214 }
14215
14216 // FileTransfersTransferSendDetails : Sent transfer.
14217 type FileTransfersTransferSendDetails struct {
14218 // FileTransferId : Transfer id.
14219 FileTransferId string `json:"file_transfer_id"`
14220 }
14221
14222 // NewFileTransfersTransferSendDetails returns a new FileTransfersTransferSendDetails instance
14223 func NewFileTransfersTransferSendDetails(FileTransferId string) *FileTransfersTransferSendDetails {
14224 s := new(FileTransfersTransferSendDetails)
14225 s.FileTransferId = FileTransferId
14226 return s
14227 }
14228
14229 // FileTransfersTransferSendType : has no documentation (yet)
14230 type FileTransfersTransferSendType struct {
14231 // Description : has no documentation (yet)
14232 Description string `json:"description"`
14233 }
14234
14235 // NewFileTransfersTransferSendType returns a new FileTransfersTransferSendType instance
14236 func NewFileTransfersTransferSendType(Description string) *FileTransfersTransferSendType {
14237 s := new(FileTransfersTransferSendType)
14238 s.Description = Description
14239 return s
14240 }
14241
14242 // FileTransfersTransferViewDetails : Viewed transfer.
14243 type FileTransfersTransferViewDetails struct {
14244 // FileTransferId : Transfer id.
14245 FileTransferId string `json:"file_transfer_id"`
14246 }
14247
14248 // NewFileTransfersTransferViewDetails returns a new FileTransfersTransferViewDetails instance
14249 func NewFileTransfersTransferViewDetails(FileTransferId string) *FileTransfersTransferViewDetails {
14250 s := new(FileTransfersTransferViewDetails)
14251 s.FileTransferId = FileTransferId
14252 return s
14253 }
14254
14255 // FileTransfersTransferViewType : has no documentation (yet)
14256 type FileTransfersTransferViewType struct {
14257 // Description : has no documentation (yet)
14258 Description string `json:"description"`
14259 }
14260
14261 // NewFileTransfersTransferViewType returns a new FileTransfersTransferViewType instance
14262 func NewFileTransfersTransferViewType(Description string) *FileTransfersTransferViewType {
14263 s := new(FileTransfersTransferViewType)
14264 s.Description = Description
14265 return s
14266 }
14267
14268 // FileUnlikeCommentDetails : Unliked file comment.
14269 type FileUnlikeCommentDetails struct {
14270 // CommentText : Comment text.
14271 CommentText string `json:"comment_text,omitempty"`
14272 }
14273
14274 // NewFileUnlikeCommentDetails returns a new FileUnlikeCommentDetails instance
14275 func NewFileUnlikeCommentDetails() *FileUnlikeCommentDetails {
14276 s := new(FileUnlikeCommentDetails)
14277 return s
14278 }
14279
14280 // FileUnlikeCommentType : has no documentation (yet)
14281 type FileUnlikeCommentType struct {
14282 // Description : has no documentation (yet)
14283 Description string `json:"description"`
14284 }
14285
14286 // NewFileUnlikeCommentType returns a new FileUnlikeCommentType instance
14287 func NewFileUnlikeCommentType(Description string) *FileUnlikeCommentType {
14288 s := new(FileUnlikeCommentType)
14289 s.Description = Description
14290 return s
14291 }
14292
14293 // FileUnresolveCommentDetails : Unresolved file comment.
14294 type FileUnresolveCommentDetails struct {
14295 // CommentText : Comment text.
14296 CommentText string `json:"comment_text,omitempty"`
14297 }
14298
14299 // NewFileUnresolveCommentDetails returns a new FileUnresolveCommentDetails instance
14300 func NewFileUnresolveCommentDetails() *FileUnresolveCommentDetails {
14301 s := new(FileUnresolveCommentDetails)
14302 return s
14303 }
14304
14305 // FileUnresolveCommentType : has no documentation (yet)
14306 type FileUnresolveCommentType struct {
14307 // Description : has no documentation (yet)
14308 Description string `json:"description"`
14309 }
14310
14311 // NewFileUnresolveCommentType returns a new FileUnresolveCommentType instance
14312 func NewFileUnresolveCommentType(Description string) *FileUnresolveCommentType {
14313 s := new(FileUnresolveCommentType)
14314 s.Description = Description
14315 return s
14316 }
14317
14318 // FolderLogInfo : Folder's logged information.
14319 type FolderLogInfo struct {
14320 FileOrFolderLogInfo
14321 // FileCount : Number of files within the folder.
14322 FileCount uint64 `json:"file_count,omitempty"`
14323 }
14324
14325 // NewFolderLogInfo returns a new FolderLogInfo instance
14326 func NewFolderLogInfo(Path *PathLogInfo) *FolderLogInfo {
14327 s := new(FolderLogInfo)
14328 s.Path = Path
14329 return s
14330 }
14331
14332 // FolderOverviewDescriptionChangedDetails : Updated folder overview.
14333 type FolderOverviewDescriptionChangedDetails struct {
14334 // FolderOverviewLocationAsset : Folder Overview location position in the
14335 // Assets list.
14336 FolderOverviewLocationAsset uint64 `json:"folder_overview_location_asset"`
14337 }
14338
14339 // NewFolderOverviewDescriptionChangedDetails returns a new FolderOverviewDescriptionChangedDetails instance
14340 func NewFolderOverviewDescriptionChangedDetails(FolderOverviewLocationAsset uint64) *FolderOverviewDescriptionChangedDetails {
14341 s := new(FolderOverviewDescriptionChangedDetails)
14342 s.FolderOverviewLocationAsset = FolderOverviewLocationAsset
14343 return s
14344 }
14345
14346 // FolderOverviewDescriptionChangedType : has no documentation (yet)
14347 type FolderOverviewDescriptionChangedType struct {
14348 // Description : has no documentation (yet)
14349 Description string `json:"description"`
14350 }
14351
14352 // NewFolderOverviewDescriptionChangedType returns a new FolderOverviewDescriptionChangedType instance
14353 func NewFolderOverviewDescriptionChangedType(Description string) *FolderOverviewDescriptionChangedType {
14354 s := new(FolderOverviewDescriptionChangedType)
14355 s.Description = Description
14356 return s
14357 }
14358
14359 // FolderOverviewItemPinnedDetails : Pinned item to folder overview.
14360 type FolderOverviewItemPinnedDetails struct {
14361 // FolderOverviewLocationAsset : Folder Overview location position in the
14362 // Assets list.
14363 FolderOverviewLocationAsset uint64 `json:"folder_overview_location_asset"`
14364 // PinnedItemsAssetIndices : Pinned items positions in the Assets list.
14365 PinnedItemsAssetIndices []uint64 `json:"pinned_items_asset_indices"`
14366 }
14367
14368 // NewFolderOverviewItemPinnedDetails returns a new FolderOverviewItemPinnedDetails instance
14369 func NewFolderOverviewItemPinnedDetails(FolderOverviewLocationAsset uint64, PinnedItemsAssetIndices []uint64) *FolderOverviewItemPinnedDetails {
14370 s := new(FolderOverviewItemPinnedDetails)
14371 s.FolderOverviewLocationAsset = FolderOverviewLocationAsset
14372 s.PinnedItemsAssetIndices = PinnedItemsAssetIndices
14373 return s
14374 }
14375
14376 // FolderOverviewItemPinnedType : has no documentation (yet)
14377 type FolderOverviewItemPinnedType struct {
14378 // Description : has no documentation (yet)
14379 Description string `json:"description"`
14380 }
14381
14382 // NewFolderOverviewItemPinnedType returns a new FolderOverviewItemPinnedType instance
14383 func NewFolderOverviewItemPinnedType(Description string) *FolderOverviewItemPinnedType {
14384 s := new(FolderOverviewItemPinnedType)
14385 s.Description = Description
14386 return s
14387 }
14388
14389 // FolderOverviewItemUnpinnedDetails : Unpinned item from folder overview.
14390 type FolderOverviewItemUnpinnedDetails struct {
14391 // FolderOverviewLocationAsset : Folder Overview location position in the
14392 // Assets list.
14393 FolderOverviewLocationAsset uint64 `json:"folder_overview_location_asset"`
14394 // PinnedItemsAssetIndices : Pinned items positions in the Assets list.
14395 PinnedItemsAssetIndices []uint64 `json:"pinned_items_asset_indices"`
14396 }
14397
14398 // NewFolderOverviewItemUnpinnedDetails returns a new FolderOverviewItemUnpinnedDetails instance
14399 func NewFolderOverviewItemUnpinnedDetails(FolderOverviewLocationAsset uint64, PinnedItemsAssetIndices []uint64) *FolderOverviewItemUnpinnedDetails {
14400 s := new(FolderOverviewItemUnpinnedDetails)
14401 s.FolderOverviewLocationAsset = FolderOverviewLocationAsset
14402 s.PinnedItemsAssetIndices = PinnedItemsAssetIndices
14403 return s
14404 }
14405
14406 // FolderOverviewItemUnpinnedType : has no documentation (yet)
14407 type FolderOverviewItemUnpinnedType struct {
14408 // Description : has no documentation (yet)
14409 Description string `json:"description"`
14410 }
14411
14412 // NewFolderOverviewItemUnpinnedType returns a new FolderOverviewItemUnpinnedType instance
14413 func NewFolderOverviewItemUnpinnedType(Description string) *FolderOverviewItemUnpinnedType {
14414 s := new(FolderOverviewItemUnpinnedType)
14415 s.Description = Description
14416 return s
14417 }
14418
14419 // GeoLocationLogInfo : Geographic location details.
14420 type GeoLocationLogInfo struct {
14421 // City : City name.
14422 City string `json:"city,omitempty"`
14423 // Region : Region name.
14424 Region string `json:"region,omitempty"`
14425 // Country : Country code.
14426 Country string `json:"country,omitempty"`
14427 // IpAddress : IP address.
14428 IpAddress string `json:"ip_address"`
14429 }
14430
14431 // NewGeoLocationLogInfo returns a new GeoLocationLogInfo instance
14432 func NewGeoLocationLogInfo(IpAddress string) *GeoLocationLogInfo {
14433 s := new(GeoLocationLogInfo)
14434 s.IpAddress = IpAddress
14435 return s
14436 }
14437
14438 // GetTeamEventsArg : has no documentation (yet)
14439 type GetTeamEventsArg struct {
14440 // Limit : The maximal number of results to return per call. Note that some
14441 // calls may not return `limit` number of events, and may even return no
14442 // events, even with `has_more` set to true. In this case, callers should
14443 // fetch again using `getEventsContinue`.
14444 Limit uint32 `json:"limit"`
14445 // AccountId : Filter the events by account ID. Return only events with this
14446 // account_id as either Actor, Context, or Participants.
14447 AccountId string `json:"account_id,omitempty"`
14448 // Time : Filter by time range.
14449 Time *team_common.TimeRange `json:"time,omitempty"`
14450 // Category : Filter the returned events to a single category. Note that
14451 // category shouldn't be provided together with event_type.
14452 Category *EventCategory `json:"category,omitempty"`
14453 // EventType : Filter the returned events to a single event type. Note that
14454 // event_type shouldn't be provided together with category.
14455 EventType *EventTypeArg `json:"event_type,omitempty"`
14456 }
14457
14458 // NewGetTeamEventsArg returns a new GetTeamEventsArg instance
14459 func NewGetTeamEventsArg() *GetTeamEventsArg {
14460 s := new(GetTeamEventsArg)
14461 s.Limit = 1000
14462 return s
14463 }
14464
14465 // GetTeamEventsContinueArg : has no documentation (yet)
14466 type GetTeamEventsContinueArg struct {
14467 // Cursor : Indicates from what point to get the next set of events.
14468 Cursor string `json:"cursor"`
14469 }
14470
14471 // NewGetTeamEventsContinueArg returns a new GetTeamEventsContinueArg instance
14472 func NewGetTeamEventsContinueArg(Cursor string) *GetTeamEventsContinueArg {
14473 s := new(GetTeamEventsContinueArg)
14474 s.Cursor = Cursor
14475 return s
14476 }
14477
14478 // GetTeamEventsContinueError : Errors that can be raised when calling
14479 // `getEventsContinue`.
14480 type GetTeamEventsContinueError struct {
14481 dropbox.Tagged
14482 // Reset : Cursors are intended to be used quickly. Individual cursor values
14483 // are normally valid for days, but in rare cases may be reset sooner.
14484 // Cursor reset errors should be handled by fetching a new cursor from
14485 // `getEvents`. The associated value is the approximate timestamp of the
14486 // most recent event returned by the cursor. This should be used as a
14487 // resumption point when calling `getEvents` to obtain a new cursor.
14488 Reset time.Time `json:"reset,omitempty"`
14489 }
14490
14491 // Valid tag values for GetTeamEventsContinueError
14492 const (
14493 GetTeamEventsContinueErrorBadCursor = "bad_cursor"
14494 GetTeamEventsContinueErrorReset = "reset"
14495 GetTeamEventsContinueErrorOther = "other"
14496 )
14497
14498 // UnmarshalJSON deserializes into a GetTeamEventsContinueError instance
14499 func (u *GetTeamEventsContinueError) UnmarshalJSON(body []byte) error {
14500 type wrap struct {
14501 dropbox.Tagged
14502 // Reset : Cursors are intended to be used quickly. Individual cursor
14503 // values are normally valid for days, but in rare cases may be reset
14504 // sooner. Cursor reset errors should be handled by fetching a new
14505 // cursor from `getEvents`. The associated value is the approximate
14506 // timestamp of the most recent event returned by the cursor. This
14507 // should be used as a resumption point when calling `getEvents` to
14508 // obtain a new cursor.
14509 Reset time.Time `json:"reset,omitempty"`
14510 }
14511 var w wrap
14512 var err error
14513 if err = json.Unmarshal(body, &w); err != nil {
14514 return err
14515 }
14516 u.Tag = w.Tag
14517 switch u.Tag {
14518 case "reset":
14519 u.Reset = w.Reset
14520
14521 if err != nil {
14522 return err
14523 }
14524 }
14525 return nil
14526 }
14527
14528 // GetTeamEventsError : Errors that can be raised when calling `getEvents`.
14529 type GetTeamEventsError struct {
14530 dropbox.Tagged
14531 }
14532
14533 // Valid tag values for GetTeamEventsError
14534 const (
14535 GetTeamEventsErrorAccountIdNotFound = "account_id_not_found"
14536 GetTeamEventsErrorInvalidTimeRange = "invalid_time_range"
14537 GetTeamEventsErrorInvalidFilters = "invalid_filters"
14538 GetTeamEventsErrorOther = "other"
14539 )
14540
14541 // GetTeamEventsResult : has no documentation (yet)
14542 type GetTeamEventsResult struct {
14543 // Events : List of events. Note that events are not guaranteed to be sorted
14544 // by their timestamp value.
14545 Events []*TeamEvent `json:"events"`
14546 // Cursor : Pass the cursor into `getEventsContinue` to obtain additional
14547 // events. The value of `cursor` may change for each response from
14548 // `getEventsContinue`, regardless of the value of `has_more`; older cursor
14549 // strings may expire. Thus, callers should ensure that they update their
14550 // cursor based on the latest value of `cursor` after each call, and poll
14551 // regularly if they wish to poll for new events. Callers should handle
14552 // reset exceptions for expired cursors.
14553 Cursor string `json:"cursor"`
14554 // HasMore : Is true if there may be additional events that have not been
14555 // returned yet. An additional call to `getEventsContinue` can retrieve
14556 // them. Note that `has_more` may be true, even if `events` is empty.
14557 HasMore bool `json:"has_more"`
14558 }
14559
14560 // NewGetTeamEventsResult returns a new GetTeamEventsResult instance
14561 func NewGetTeamEventsResult(Events []*TeamEvent, Cursor string, HasMore bool) *GetTeamEventsResult {
14562 s := new(GetTeamEventsResult)
14563 s.Events = Events
14564 s.Cursor = Cursor
14565 s.HasMore = HasMore
14566 return s
14567 }
14568
14569 // GoogleSsoChangePolicyDetails : Enabled/disabled Google single sign-on for
14570 // team.
14571 type GoogleSsoChangePolicyDetails struct {
14572 // NewValue : New Google single sign-on policy.
14573 NewValue *GoogleSsoPolicy `json:"new_value"`
14574 // PreviousValue : Previous Google single sign-on policy. Might be missing
14575 // due to historical data gap.
14576 PreviousValue *GoogleSsoPolicy `json:"previous_value,omitempty"`
14577 }
14578
14579 // NewGoogleSsoChangePolicyDetails returns a new GoogleSsoChangePolicyDetails instance
14580 func NewGoogleSsoChangePolicyDetails(NewValue *GoogleSsoPolicy) *GoogleSsoChangePolicyDetails {
14581 s := new(GoogleSsoChangePolicyDetails)
14582 s.NewValue = NewValue
14583 return s
14584 }
14585
14586 // GoogleSsoChangePolicyType : has no documentation (yet)
14587 type GoogleSsoChangePolicyType struct {
14588 // Description : has no documentation (yet)
14589 Description string `json:"description"`
14590 }
14591
14592 // NewGoogleSsoChangePolicyType returns a new GoogleSsoChangePolicyType instance
14593 func NewGoogleSsoChangePolicyType(Description string) *GoogleSsoChangePolicyType {
14594 s := new(GoogleSsoChangePolicyType)
14595 s.Description = Description
14596 return s
14597 }
14598
14599 // GoogleSsoPolicy : Google SSO policy
14600 type GoogleSsoPolicy struct {
14601 dropbox.Tagged
14602 }
14603
14604 // Valid tag values for GoogleSsoPolicy
14605 const (
14606 GoogleSsoPolicyDisabled = "disabled"
14607 GoogleSsoPolicyEnabled = "enabled"
14608 GoogleSsoPolicyOther = "other"
14609 )
14610
14611 // GovernancePolicyAddFolderFailedDetails : Couldn't add a folder to a policy.
14612 type GovernancePolicyAddFolderFailedDetails struct {
14613 // GovernancePolicyId : Policy ID.
14614 GovernancePolicyId string `json:"governance_policy_id"`
14615 // Name : Policy name.
14616 Name string `json:"name"`
14617 // PolicyType : Policy type.
14618 PolicyType *PolicyType `json:"policy_type,omitempty"`
14619 // Folder : Folder.
14620 Folder string `json:"folder"`
14621 // Reason : Reason.
14622 Reason string `json:"reason,omitempty"`
14623 }
14624
14625 // NewGovernancePolicyAddFolderFailedDetails returns a new GovernancePolicyAddFolderFailedDetails instance
14626 func NewGovernancePolicyAddFolderFailedDetails(GovernancePolicyId string, Name string, Folder string) *GovernancePolicyAddFolderFailedDetails {
14627 s := new(GovernancePolicyAddFolderFailedDetails)
14628 s.GovernancePolicyId = GovernancePolicyId
14629 s.Name = Name
14630 s.Folder = Folder
14631 return s
14632 }
14633
14634 // GovernancePolicyAddFolderFailedType : has no documentation (yet)
14635 type GovernancePolicyAddFolderFailedType struct {
14636 // Description : has no documentation (yet)
14637 Description string `json:"description"`
14638 }
14639
14640 // NewGovernancePolicyAddFolderFailedType returns a new GovernancePolicyAddFolderFailedType instance
14641 func NewGovernancePolicyAddFolderFailedType(Description string) *GovernancePolicyAddFolderFailedType {
14642 s := new(GovernancePolicyAddFolderFailedType)
14643 s.Description = Description
14644 return s
14645 }
14646
14647 // GovernancePolicyAddFoldersDetails : Added folders to policy.
14648 type GovernancePolicyAddFoldersDetails struct {
14649 // GovernancePolicyId : Policy ID.
14650 GovernancePolicyId string `json:"governance_policy_id"`
14651 // Name : Policy name.
14652 Name string `json:"name"`
14653 // PolicyType : Policy type.
14654 PolicyType *PolicyType `json:"policy_type,omitempty"`
14655 // Folders : Folders.
14656 Folders []string `json:"folders,omitempty"`
14657 }
14658
14659 // NewGovernancePolicyAddFoldersDetails returns a new GovernancePolicyAddFoldersDetails instance
14660 func NewGovernancePolicyAddFoldersDetails(GovernancePolicyId string, Name string) *GovernancePolicyAddFoldersDetails {
14661 s := new(GovernancePolicyAddFoldersDetails)
14662 s.GovernancePolicyId = GovernancePolicyId
14663 s.Name = Name
14664 return s
14665 }
14666
14667 // GovernancePolicyAddFoldersType : has no documentation (yet)
14668 type GovernancePolicyAddFoldersType struct {
14669 // Description : has no documentation (yet)
14670 Description string `json:"description"`
14671 }
14672
14673 // NewGovernancePolicyAddFoldersType returns a new GovernancePolicyAddFoldersType instance
14674 func NewGovernancePolicyAddFoldersType(Description string) *GovernancePolicyAddFoldersType {
14675 s := new(GovernancePolicyAddFoldersType)
14676 s.Description = Description
14677 return s
14678 }
14679
14680 // GovernancePolicyContentDisposedDetails : Content disposed.
14681 type GovernancePolicyContentDisposedDetails struct {
14682 // GovernancePolicyId : Policy ID.
14683 GovernancePolicyId string `json:"governance_policy_id"`
14684 // Name : Policy name.
14685 Name string `json:"name"`
14686 // PolicyType : Policy type.
14687 PolicyType *PolicyType `json:"policy_type,omitempty"`
14688 // DispositionType : Disposition type.
14689 DispositionType *DispositionActionType `json:"disposition_type"`
14690 }
14691
14692 // NewGovernancePolicyContentDisposedDetails returns a new GovernancePolicyContentDisposedDetails instance
14693 func NewGovernancePolicyContentDisposedDetails(GovernancePolicyId string, Name string, DispositionType *DispositionActionType) *GovernancePolicyContentDisposedDetails {
14694 s := new(GovernancePolicyContentDisposedDetails)
14695 s.GovernancePolicyId = GovernancePolicyId
14696 s.Name = Name
14697 s.DispositionType = DispositionType
14698 return s
14699 }
14700
14701 // GovernancePolicyContentDisposedType : has no documentation (yet)
14702 type GovernancePolicyContentDisposedType struct {
14703 // Description : has no documentation (yet)
14704 Description string `json:"description"`
14705 }
14706
14707 // NewGovernancePolicyContentDisposedType returns a new GovernancePolicyContentDisposedType instance
14708 func NewGovernancePolicyContentDisposedType(Description string) *GovernancePolicyContentDisposedType {
14709 s := new(GovernancePolicyContentDisposedType)
14710 s.Description = Description
14711 return s
14712 }
14713
14714 // GovernancePolicyCreateDetails : Activated a new policy.
14715 type GovernancePolicyCreateDetails struct {
14716 // GovernancePolicyId : Policy ID.
14717 GovernancePolicyId string `json:"governance_policy_id"`
14718 // Name : Policy name.
14719 Name string `json:"name"`
14720 // PolicyType : Policy type.
14721 PolicyType *PolicyType `json:"policy_type,omitempty"`
14722 // Duration : Duration in days.
14723 Duration *DurationLogInfo `json:"duration"`
14724 // Folders : Folders.
14725 Folders []string `json:"folders,omitempty"`
14726 }
14727
14728 // NewGovernancePolicyCreateDetails returns a new GovernancePolicyCreateDetails instance
14729 func NewGovernancePolicyCreateDetails(GovernancePolicyId string, Name string, Duration *DurationLogInfo) *GovernancePolicyCreateDetails {
14730 s := new(GovernancePolicyCreateDetails)
14731 s.GovernancePolicyId = GovernancePolicyId
14732 s.Name = Name
14733 s.Duration = Duration
14734 return s
14735 }
14736
14737 // GovernancePolicyCreateType : has no documentation (yet)
14738 type GovernancePolicyCreateType struct {
14739 // Description : has no documentation (yet)
14740 Description string `json:"description"`
14741 }
14742
14743 // NewGovernancePolicyCreateType returns a new GovernancePolicyCreateType instance
14744 func NewGovernancePolicyCreateType(Description string) *GovernancePolicyCreateType {
14745 s := new(GovernancePolicyCreateType)
14746 s.Description = Description
14747 return s
14748 }
14749
14750 // GovernancePolicyDeleteDetails : Deleted a policy.
14751 type GovernancePolicyDeleteDetails struct {
14752 // GovernancePolicyId : Policy ID.
14753 GovernancePolicyId string `json:"governance_policy_id"`
14754 // Name : Policy name.
14755 Name string `json:"name"`
14756 // PolicyType : Policy type.
14757 PolicyType *PolicyType `json:"policy_type,omitempty"`
14758 }
14759
14760 // NewGovernancePolicyDeleteDetails returns a new GovernancePolicyDeleteDetails instance
14761 func NewGovernancePolicyDeleteDetails(GovernancePolicyId string, Name string) *GovernancePolicyDeleteDetails {
14762 s := new(GovernancePolicyDeleteDetails)
14763 s.GovernancePolicyId = GovernancePolicyId
14764 s.Name = Name
14765 return s
14766 }
14767
14768 // GovernancePolicyDeleteType : has no documentation (yet)
14769 type GovernancePolicyDeleteType struct {
14770 // Description : has no documentation (yet)
14771 Description string `json:"description"`
14772 }
14773
14774 // NewGovernancePolicyDeleteType returns a new GovernancePolicyDeleteType instance
14775 func NewGovernancePolicyDeleteType(Description string) *GovernancePolicyDeleteType {
14776 s := new(GovernancePolicyDeleteType)
14777 s.Description = Description
14778 return s
14779 }
14780
14781 // GovernancePolicyEditDetailsDetails : Edited policy.
14782 type GovernancePolicyEditDetailsDetails struct {
14783 // GovernancePolicyId : Policy ID.
14784 GovernancePolicyId string `json:"governance_policy_id"`
14785 // Name : Policy name.
14786 Name string `json:"name"`
14787 // PolicyType : Policy type.
14788 PolicyType *PolicyType `json:"policy_type,omitempty"`
14789 // Attribute : Attribute.
14790 Attribute string `json:"attribute"`
14791 // PreviousValue : From.
14792 PreviousValue string `json:"previous_value"`
14793 // NewValue : To.
14794 NewValue string `json:"new_value"`
14795 }
14796
14797 // NewGovernancePolicyEditDetailsDetails returns a new GovernancePolicyEditDetailsDetails instance
14798 func NewGovernancePolicyEditDetailsDetails(GovernancePolicyId string, Name string, Attribute string, PreviousValue string, NewValue string) *GovernancePolicyEditDetailsDetails {
14799 s := new(GovernancePolicyEditDetailsDetails)
14800 s.GovernancePolicyId = GovernancePolicyId
14801 s.Name = Name
14802 s.Attribute = Attribute
14803 s.PreviousValue = PreviousValue
14804 s.NewValue = NewValue
14805 return s
14806 }
14807
14808 // GovernancePolicyEditDetailsType : has no documentation (yet)
14809 type GovernancePolicyEditDetailsType struct {
14810 // Description : has no documentation (yet)
14811 Description string `json:"description"`
14812 }
14813
14814 // NewGovernancePolicyEditDetailsType returns a new GovernancePolicyEditDetailsType instance
14815 func NewGovernancePolicyEditDetailsType(Description string) *GovernancePolicyEditDetailsType {
14816 s := new(GovernancePolicyEditDetailsType)
14817 s.Description = Description
14818 return s
14819 }
14820
14821 // GovernancePolicyEditDurationDetails : Changed policy duration.
14822 type GovernancePolicyEditDurationDetails struct {
14823 // GovernancePolicyId : Policy ID.
14824 GovernancePolicyId string `json:"governance_policy_id"`
14825 // Name : Policy name.
14826 Name string `json:"name"`
14827 // PolicyType : Policy type.
14828 PolicyType *PolicyType `json:"policy_type,omitempty"`
14829 // PreviousValue : From.
14830 PreviousValue *DurationLogInfo `json:"previous_value"`
14831 // NewValue : To.
14832 NewValue *DurationLogInfo `json:"new_value"`
14833 }
14834
14835 // NewGovernancePolicyEditDurationDetails returns a new GovernancePolicyEditDurationDetails instance
14836 func NewGovernancePolicyEditDurationDetails(GovernancePolicyId string, Name string, PreviousValue *DurationLogInfo, NewValue *DurationLogInfo) *GovernancePolicyEditDurationDetails {
14837 s := new(GovernancePolicyEditDurationDetails)
14838 s.GovernancePolicyId = GovernancePolicyId
14839 s.Name = Name
14840 s.PreviousValue = PreviousValue
14841 s.NewValue = NewValue
14842 return s
14843 }
14844
14845 // GovernancePolicyEditDurationType : has no documentation (yet)
14846 type GovernancePolicyEditDurationType struct {
14847 // Description : has no documentation (yet)
14848 Description string `json:"description"`
14849 }
14850
14851 // NewGovernancePolicyEditDurationType returns a new GovernancePolicyEditDurationType instance
14852 func NewGovernancePolicyEditDurationType(Description string) *GovernancePolicyEditDurationType {
14853 s := new(GovernancePolicyEditDurationType)
14854 s.Description = Description
14855 return s
14856 }
14857
14858 // GovernancePolicyExportCreatedDetails : Created a policy download.
14859 type GovernancePolicyExportCreatedDetails struct {
14860 // GovernancePolicyId : Policy ID.
14861 GovernancePolicyId string `json:"governance_policy_id"`
14862 // Name : Policy name.
14863 Name string `json:"name"`
14864 // PolicyType : Policy type.
14865 PolicyType *PolicyType `json:"policy_type,omitempty"`
14866 // ExportName : Export name.
14867 ExportName string `json:"export_name"`
14868 }
14869
14870 // NewGovernancePolicyExportCreatedDetails returns a new GovernancePolicyExportCreatedDetails instance
14871 func NewGovernancePolicyExportCreatedDetails(GovernancePolicyId string, Name string, ExportName string) *GovernancePolicyExportCreatedDetails {
14872 s := new(GovernancePolicyExportCreatedDetails)
14873 s.GovernancePolicyId = GovernancePolicyId
14874 s.Name = Name
14875 s.ExportName = ExportName
14876 return s
14877 }
14878
14879 // GovernancePolicyExportCreatedType : has no documentation (yet)
14880 type GovernancePolicyExportCreatedType struct {
14881 // Description : has no documentation (yet)
14882 Description string `json:"description"`
14883 }
14884
14885 // NewGovernancePolicyExportCreatedType returns a new GovernancePolicyExportCreatedType instance
14886 func NewGovernancePolicyExportCreatedType(Description string) *GovernancePolicyExportCreatedType {
14887 s := new(GovernancePolicyExportCreatedType)
14888 s.Description = Description
14889 return s
14890 }
14891
14892 // GovernancePolicyExportRemovedDetails : Removed a policy download.
14893 type GovernancePolicyExportRemovedDetails struct {
14894 // GovernancePolicyId : Policy ID.
14895 GovernancePolicyId string `json:"governance_policy_id"`
14896 // Name : Policy name.
14897 Name string `json:"name"`
14898 // PolicyType : Policy type.
14899 PolicyType *PolicyType `json:"policy_type,omitempty"`
14900 // ExportName : Export name.
14901 ExportName string `json:"export_name"`
14902 }
14903
14904 // NewGovernancePolicyExportRemovedDetails returns a new GovernancePolicyExportRemovedDetails instance
14905 func NewGovernancePolicyExportRemovedDetails(GovernancePolicyId string, Name string, ExportName string) *GovernancePolicyExportRemovedDetails {
14906 s := new(GovernancePolicyExportRemovedDetails)
14907 s.GovernancePolicyId = GovernancePolicyId
14908 s.Name = Name
14909 s.ExportName = ExportName
14910 return s
14911 }
14912
14913 // GovernancePolicyExportRemovedType : has no documentation (yet)
14914 type GovernancePolicyExportRemovedType struct {
14915 // Description : has no documentation (yet)
14916 Description string `json:"description"`
14917 }
14918
14919 // NewGovernancePolicyExportRemovedType returns a new GovernancePolicyExportRemovedType instance
14920 func NewGovernancePolicyExportRemovedType(Description string) *GovernancePolicyExportRemovedType {
14921 s := new(GovernancePolicyExportRemovedType)
14922 s.Description = Description
14923 return s
14924 }
14925
14926 // GovernancePolicyRemoveFoldersDetails : Removed folders from policy.
14927 type GovernancePolicyRemoveFoldersDetails struct {
14928 // GovernancePolicyId : Policy ID.
14929 GovernancePolicyId string `json:"governance_policy_id"`
14930 // Name : Policy name.
14931 Name string `json:"name"`
14932 // PolicyType : Policy type.
14933 PolicyType *PolicyType `json:"policy_type,omitempty"`
14934 // Folders : Folders.
14935 Folders []string `json:"folders,omitempty"`
14936 // Reason : Reason.
14937 Reason string `json:"reason,omitempty"`
14938 }
14939
14940 // NewGovernancePolicyRemoveFoldersDetails returns a new GovernancePolicyRemoveFoldersDetails instance
14941 func NewGovernancePolicyRemoveFoldersDetails(GovernancePolicyId string, Name string) *GovernancePolicyRemoveFoldersDetails {
14942 s := new(GovernancePolicyRemoveFoldersDetails)
14943 s.GovernancePolicyId = GovernancePolicyId
14944 s.Name = Name
14945 return s
14946 }
14947
14948 // GovernancePolicyRemoveFoldersType : has no documentation (yet)
14949 type GovernancePolicyRemoveFoldersType struct {
14950 // Description : has no documentation (yet)
14951 Description string `json:"description"`
14952 }
14953
14954 // NewGovernancePolicyRemoveFoldersType returns a new GovernancePolicyRemoveFoldersType instance
14955 func NewGovernancePolicyRemoveFoldersType(Description string) *GovernancePolicyRemoveFoldersType {
14956 s := new(GovernancePolicyRemoveFoldersType)
14957 s.Description = Description
14958 return s
14959 }
14960
14961 // GovernancePolicyReportCreatedDetails : Created a summary report for a policy.
14962 type GovernancePolicyReportCreatedDetails struct {
14963 // GovernancePolicyId : Policy ID.
14964 GovernancePolicyId string `json:"governance_policy_id"`
14965 // Name : Policy name.
14966 Name string `json:"name"`
14967 // PolicyType : Policy type.
14968 PolicyType *PolicyType `json:"policy_type,omitempty"`
14969 }
14970
14971 // NewGovernancePolicyReportCreatedDetails returns a new GovernancePolicyReportCreatedDetails instance
14972 func NewGovernancePolicyReportCreatedDetails(GovernancePolicyId string, Name string) *GovernancePolicyReportCreatedDetails {
14973 s := new(GovernancePolicyReportCreatedDetails)
14974 s.GovernancePolicyId = GovernancePolicyId
14975 s.Name = Name
14976 return s
14977 }
14978
14979 // GovernancePolicyReportCreatedType : has no documentation (yet)
14980 type GovernancePolicyReportCreatedType struct {
14981 // Description : has no documentation (yet)
14982 Description string `json:"description"`
14983 }
14984
14985 // NewGovernancePolicyReportCreatedType returns a new GovernancePolicyReportCreatedType instance
14986 func NewGovernancePolicyReportCreatedType(Description string) *GovernancePolicyReportCreatedType {
14987 s := new(GovernancePolicyReportCreatedType)
14988 s.Description = Description
14989 return s
14990 }
14991
14992 // GovernancePolicyZipPartDownloadedDetails : Downloaded content from a policy.
14993 type GovernancePolicyZipPartDownloadedDetails struct {
14994 // GovernancePolicyId : Policy ID.
14995 GovernancePolicyId string `json:"governance_policy_id"`
14996 // Name : Policy name.
14997 Name string `json:"name"`
14998 // PolicyType : Policy type.
14999 PolicyType *PolicyType `json:"policy_type,omitempty"`
15000 // ExportName : Export name.
15001 ExportName string `json:"export_name"`
15002 // Part : Part.
15003 Part string `json:"part,omitempty"`
15004 }
15005
15006 // NewGovernancePolicyZipPartDownloadedDetails returns a new GovernancePolicyZipPartDownloadedDetails instance
15007 func NewGovernancePolicyZipPartDownloadedDetails(GovernancePolicyId string, Name string, ExportName string) *GovernancePolicyZipPartDownloadedDetails {
15008 s := new(GovernancePolicyZipPartDownloadedDetails)
15009 s.GovernancePolicyId = GovernancePolicyId
15010 s.Name = Name
15011 s.ExportName = ExportName
15012 return s
15013 }
15014
15015 // GovernancePolicyZipPartDownloadedType : has no documentation (yet)
15016 type GovernancePolicyZipPartDownloadedType struct {
15017 // Description : has no documentation (yet)
15018 Description string `json:"description"`
15019 }
15020
15021 // NewGovernancePolicyZipPartDownloadedType returns a new GovernancePolicyZipPartDownloadedType instance
15022 func NewGovernancePolicyZipPartDownloadedType(Description string) *GovernancePolicyZipPartDownloadedType {
15023 s := new(GovernancePolicyZipPartDownloadedType)
15024 s.Description = Description
15025 return s
15026 }
15027
15028 // GroupAddExternalIdDetails : Added external ID for group.
15029 type GroupAddExternalIdDetails struct {
15030 // NewValue : Current external id.
15031 NewValue string `json:"new_value"`
15032 }
15033
15034 // NewGroupAddExternalIdDetails returns a new GroupAddExternalIdDetails instance
15035 func NewGroupAddExternalIdDetails(NewValue string) *GroupAddExternalIdDetails {
15036 s := new(GroupAddExternalIdDetails)
15037 s.NewValue = NewValue
15038 return s
15039 }
15040
15041 // GroupAddExternalIdType : has no documentation (yet)
15042 type GroupAddExternalIdType struct {
15043 // Description : has no documentation (yet)
15044 Description string `json:"description"`
15045 }
15046
15047 // NewGroupAddExternalIdType returns a new GroupAddExternalIdType instance
15048 func NewGroupAddExternalIdType(Description string) *GroupAddExternalIdType {
15049 s := new(GroupAddExternalIdType)
15050 s.Description = Description
15051 return s
15052 }
15053
15054 // GroupAddMemberDetails : Added team members to group.
15055 type GroupAddMemberDetails struct {
15056 // IsGroupOwner : Is group owner.
15057 IsGroupOwner bool `json:"is_group_owner"`
15058 }
15059
15060 // NewGroupAddMemberDetails returns a new GroupAddMemberDetails instance
15061 func NewGroupAddMemberDetails(IsGroupOwner bool) *GroupAddMemberDetails {
15062 s := new(GroupAddMemberDetails)
15063 s.IsGroupOwner = IsGroupOwner
15064 return s
15065 }
15066
15067 // GroupAddMemberType : has no documentation (yet)
15068 type GroupAddMemberType struct {
15069 // Description : has no documentation (yet)
15070 Description string `json:"description"`
15071 }
15072
15073 // NewGroupAddMemberType returns a new GroupAddMemberType instance
15074 func NewGroupAddMemberType(Description string) *GroupAddMemberType {
15075 s := new(GroupAddMemberType)
15076 s.Description = Description
15077 return s
15078 }
15079
15080 // GroupChangeExternalIdDetails : Changed external ID for group.
15081 type GroupChangeExternalIdDetails struct {
15082 // NewValue : Current external id.
15083 NewValue string `json:"new_value"`
15084 // PreviousValue : Old external id.
15085 PreviousValue string `json:"previous_value"`
15086 }
15087
15088 // NewGroupChangeExternalIdDetails returns a new GroupChangeExternalIdDetails instance
15089 func NewGroupChangeExternalIdDetails(NewValue string, PreviousValue string) *GroupChangeExternalIdDetails {
15090 s := new(GroupChangeExternalIdDetails)
15091 s.NewValue = NewValue
15092 s.PreviousValue = PreviousValue
15093 return s
15094 }
15095
15096 // GroupChangeExternalIdType : has no documentation (yet)
15097 type GroupChangeExternalIdType struct {
15098 // Description : has no documentation (yet)
15099 Description string `json:"description"`
15100 }
15101
15102 // NewGroupChangeExternalIdType returns a new GroupChangeExternalIdType instance
15103 func NewGroupChangeExternalIdType(Description string) *GroupChangeExternalIdType {
15104 s := new(GroupChangeExternalIdType)
15105 s.Description = Description
15106 return s
15107 }
15108
15109 // GroupChangeManagementTypeDetails : Changed group management type.
15110 type GroupChangeManagementTypeDetails struct {
15111 // NewValue : New group management type.
15112 NewValue *team_common.GroupManagementType `json:"new_value"`
15113 // PreviousValue : Previous group management type. Might be missing due to
15114 // historical data gap.
15115 PreviousValue *team_common.GroupManagementType `json:"previous_value,omitempty"`
15116 }
15117
15118 // NewGroupChangeManagementTypeDetails returns a new GroupChangeManagementTypeDetails instance
15119 func NewGroupChangeManagementTypeDetails(NewValue *team_common.GroupManagementType) *GroupChangeManagementTypeDetails {
15120 s := new(GroupChangeManagementTypeDetails)
15121 s.NewValue = NewValue
15122 return s
15123 }
15124
15125 // GroupChangeManagementTypeType : has no documentation (yet)
15126 type GroupChangeManagementTypeType struct {
15127 // Description : has no documentation (yet)
15128 Description string `json:"description"`
15129 }
15130
15131 // NewGroupChangeManagementTypeType returns a new GroupChangeManagementTypeType instance
15132 func NewGroupChangeManagementTypeType(Description string) *GroupChangeManagementTypeType {
15133 s := new(GroupChangeManagementTypeType)
15134 s.Description = Description
15135 return s
15136 }
15137
15138 // GroupChangeMemberRoleDetails : Changed manager permissions of group member.
15139 type GroupChangeMemberRoleDetails struct {
15140 // IsGroupOwner : Is group owner.
15141 IsGroupOwner bool `json:"is_group_owner"`
15142 }
15143
15144 // NewGroupChangeMemberRoleDetails returns a new GroupChangeMemberRoleDetails instance
15145 func NewGroupChangeMemberRoleDetails(IsGroupOwner bool) *GroupChangeMemberRoleDetails {
15146 s := new(GroupChangeMemberRoleDetails)
15147 s.IsGroupOwner = IsGroupOwner
15148 return s
15149 }
15150
15151 // GroupChangeMemberRoleType : has no documentation (yet)
15152 type GroupChangeMemberRoleType struct {
15153 // Description : has no documentation (yet)
15154 Description string `json:"description"`
15155 }
15156
15157 // NewGroupChangeMemberRoleType returns a new GroupChangeMemberRoleType instance
15158 func NewGroupChangeMemberRoleType(Description string) *GroupChangeMemberRoleType {
15159 s := new(GroupChangeMemberRoleType)
15160 s.Description = Description
15161 return s
15162 }
15163
15164 // GroupCreateDetails : Created group.
15165 type GroupCreateDetails struct {
15166 // IsCompanyManaged : Is company managed group.
15167 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
15168 // JoinPolicy : Group join policy.
15169 JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"`
15170 }
15171
15172 // NewGroupCreateDetails returns a new GroupCreateDetails instance
15173 func NewGroupCreateDetails() *GroupCreateDetails {
15174 s := new(GroupCreateDetails)
15175 return s
15176 }
15177
15178 // GroupCreateType : has no documentation (yet)
15179 type GroupCreateType struct {
15180 // Description : has no documentation (yet)
15181 Description string `json:"description"`
15182 }
15183
15184 // NewGroupCreateType returns a new GroupCreateType instance
15185 func NewGroupCreateType(Description string) *GroupCreateType {
15186 s := new(GroupCreateType)
15187 s.Description = Description
15188 return s
15189 }
15190
15191 // GroupDeleteDetails : Deleted group.
15192 type GroupDeleteDetails struct {
15193 // IsCompanyManaged : Is company managed group.
15194 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
15195 }
15196
15197 // NewGroupDeleteDetails returns a new GroupDeleteDetails instance
15198 func NewGroupDeleteDetails() *GroupDeleteDetails {
15199 s := new(GroupDeleteDetails)
15200 return s
15201 }
15202
15203 // GroupDeleteType : has no documentation (yet)
15204 type GroupDeleteType struct {
15205 // Description : has no documentation (yet)
15206 Description string `json:"description"`
15207 }
15208
15209 // NewGroupDeleteType returns a new GroupDeleteType instance
15210 func NewGroupDeleteType(Description string) *GroupDeleteType {
15211 s := new(GroupDeleteType)
15212 s.Description = Description
15213 return s
15214 }
15215
15216 // GroupDescriptionUpdatedDetails : Updated group.
15217 type GroupDescriptionUpdatedDetails struct {
15218 }
15219
15220 // NewGroupDescriptionUpdatedDetails returns a new GroupDescriptionUpdatedDetails instance
15221 func NewGroupDescriptionUpdatedDetails() *GroupDescriptionUpdatedDetails {
15222 s := new(GroupDescriptionUpdatedDetails)
15223 return s
15224 }
15225
15226 // GroupDescriptionUpdatedType : has no documentation (yet)
15227 type GroupDescriptionUpdatedType struct {
15228 // Description : has no documentation (yet)
15229 Description string `json:"description"`
15230 }
15231
15232 // NewGroupDescriptionUpdatedType returns a new GroupDescriptionUpdatedType instance
15233 func NewGroupDescriptionUpdatedType(Description string) *GroupDescriptionUpdatedType {
15234 s := new(GroupDescriptionUpdatedType)
15235 s.Description = Description
15236 return s
15237 }
15238
15239 // GroupJoinPolicy : has no documentation (yet)
15240 type GroupJoinPolicy struct {
15241 dropbox.Tagged
15242 }
15243
15244 // Valid tag values for GroupJoinPolicy
15245 const (
15246 GroupJoinPolicyOpen = "open"
15247 GroupJoinPolicyRequestToJoin = "request_to_join"
15248 GroupJoinPolicyOther = "other"
15249 )
15250
15251 // GroupJoinPolicyUpdatedDetails : Updated group join policy.
15252 type GroupJoinPolicyUpdatedDetails struct {
15253 // IsCompanyManaged : Is company managed group.
15254 IsCompanyManaged bool `json:"is_company_managed,omitempty"`
15255 // JoinPolicy : Group join policy.
15256 JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"`
15257 }
15258
15259 // NewGroupJoinPolicyUpdatedDetails returns a new GroupJoinPolicyUpdatedDetails instance
15260 func NewGroupJoinPolicyUpdatedDetails() *GroupJoinPolicyUpdatedDetails {
15261 s := new(GroupJoinPolicyUpdatedDetails)
15262 return s
15263 }
15264
15265 // GroupJoinPolicyUpdatedType : has no documentation (yet)
15266 type GroupJoinPolicyUpdatedType struct {
15267 // Description : has no documentation (yet)
15268 Description string `json:"description"`
15269 }
15270
15271 // NewGroupJoinPolicyUpdatedType returns a new GroupJoinPolicyUpdatedType instance
15272 func NewGroupJoinPolicyUpdatedType(Description string) *GroupJoinPolicyUpdatedType {
15273 s := new(GroupJoinPolicyUpdatedType)
15274 s.Description = Description
15275 return s
15276 }
15277
15278 // GroupLogInfo : Group's logged information.
15279 type GroupLogInfo struct {
15280 // GroupId : The unique id of this group.
15281 GroupId string `json:"group_id,omitempty"`
15282 // DisplayName : The name of this group.
15283 DisplayName string `json:"display_name"`
15284 // ExternalId : External group ID.
15285 ExternalId string `json:"external_id,omitempty"`
15286 }
15287
15288 // NewGroupLogInfo returns a new GroupLogInfo instance
15289 func NewGroupLogInfo(DisplayName string) *GroupLogInfo {
15290 s := new(GroupLogInfo)
15291 s.DisplayName = DisplayName
15292 return s
15293 }
15294
15295 // GroupMovedDetails : Moved group.
15296 type GroupMovedDetails struct {
15297 }
15298
15299 // NewGroupMovedDetails returns a new GroupMovedDetails instance
15300 func NewGroupMovedDetails() *GroupMovedDetails {
15301 s := new(GroupMovedDetails)
15302 return s
15303 }
15304
15305 // GroupMovedType : has no documentation (yet)
15306 type GroupMovedType struct {
15307 // Description : has no documentation (yet)
15308 Description string `json:"description"`
15309 }
15310
15311 // NewGroupMovedType returns a new GroupMovedType instance
15312 func NewGroupMovedType(Description string) *GroupMovedType {
15313 s := new(GroupMovedType)
15314 s.Description = Description
15315 return s
15316 }
15317
15318 // GroupRemoveExternalIdDetails : Removed external ID for group.
15319 type GroupRemoveExternalIdDetails struct {
15320 // PreviousValue : Old external id.
15321 PreviousValue string `json:"previous_value"`
15322 }
15323
15324 // NewGroupRemoveExternalIdDetails returns a new GroupRemoveExternalIdDetails instance
15325 func NewGroupRemoveExternalIdDetails(PreviousValue string) *GroupRemoveExternalIdDetails {
15326 s := new(GroupRemoveExternalIdDetails)
15327 s.PreviousValue = PreviousValue
15328 return s
15329 }
15330
15331 // GroupRemoveExternalIdType : has no documentation (yet)
15332 type GroupRemoveExternalIdType struct {
15333 // Description : has no documentation (yet)
15334 Description string `json:"description"`
15335 }
15336
15337 // NewGroupRemoveExternalIdType returns a new GroupRemoveExternalIdType instance
15338 func NewGroupRemoveExternalIdType(Description string) *GroupRemoveExternalIdType {
15339 s := new(GroupRemoveExternalIdType)
15340 s.Description = Description
15341 return s
15342 }
15343
15344 // GroupRemoveMemberDetails : Removed team members from group.
15345 type GroupRemoveMemberDetails struct {
15346 }
15347
15348 // NewGroupRemoveMemberDetails returns a new GroupRemoveMemberDetails instance
15349 func NewGroupRemoveMemberDetails() *GroupRemoveMemberDetails {
15350 s := new(GroupRemoveMemberDetails)
15351 return s
15352 }
15353
15354 // GroupRemoveMemberType : has no documentation (yet)
15355 type GroupRemoveMemberType struct {
15356 // Description : has no documentation (yet)
15357 Description string `json:"description"`
15358 }
15359
15360 // NewGroupRemoveMemberType returns a new GroupRemoveMemberType instance
15361 func NewGroupRemoveMemberType(Description string) *GroupRemoveMemberType {
15362 s := new(GroupRemoveMemberType)
15363 s.Description = Description
15364 return s
15365 }
15366
15367 // GroupRenameDetails : Renamed group.
15368 type GroupRenameDetails struct {
15369 // PreviousValue : Previous display name.
15370 PreviousValue string `json:"previous_value"`
15371 // NewValue : New display name.
15372 NewValue string `json:"new_value"`
15373 }
15374
15375 // NewGroupRenameDetails returns a new GroupRenameDetails instance
15376 func NewGroupRenameDetails(PreviousValue string, NewValue string) *GroupRenameDetails {
15377 s := new(GroupRenameDetails)
15378 s.PreviousValue = PreviousValue
15379 s.NewValue = NewValue
15380 return s
15381 }
15382
15383 // GroupRenameType : has no documentation (yet)
15384 type GroupRenameType struct {
15385 // Description : has no documentation (yet)
15386 Description string `json:"description"`
15387 }
15388
15389 // NewGroupRenameType returns a new GroupRenameType instance
15390 func NewGroupRenameType(Description string) *GroupRenameType {
15391 s := new(GroupRenameType)
15392 s.Description = Description
15393 return s
15394 }
15395
15396 // GroupUserManagementChangePolicyDetails : Changed who can create groups.
15397 type GroupUserManagementChangePolicyDetails struct {
15398 // NewValue : New group users management policy.
15399 NewValue *team_policies.GroupCreation `json:"new_value"`
15400 // PreviousValue : Previous group users management policy. Might be missing
15401 // due to historical data gap.
15402 PreviousValue *team_policies.GroupCreation `json:"previous_value,omitempty"`
15403 }
15404
15405 // NewGroupUserManagementChangePolicyDetails returns a new GroupUserManagementChangePolicyDetails instance
15406 func NewGroupUserManagementChangePolicyDetails(NewValue *team_policies.GroupCreation) *GroupUserManagementChangePolicyDetails {
15407 s := new(GroupUserManagementChangePolicyDetails)
15408 s.NewValue = NewValue
15409 return s
15410 }
15411
15412 // GroupUserManagementChangePolicyType : has no documentation (yet)
15413 type GroupUserManagementChangePolicyType struct {
15414 // Description : has no documentation (yet)
15415 Description string `json:"description"`
15416 }
15417
15418 // NewGroupUserManagementChangePolicyType returns a new GroupUserManagementChangePolicyType instance
15419 func NewGroupUserManagementChangePolicyType(Description string) *GroupUserManagementChangePolicyType {
15420 s := new(GroupUserManagementChangePolicyType)
15421 s.Description = Description
15422 return s
15423 }
15424
15425 // GuestAdminChangeStatusDetails : Changed guest team admin status.
15426 type GuestAdminChangeStatusDetails struct {
15427 // IsGuest : True for guest, false for host.
15428 IsGuest bool `json:"is_guest"`
15429 // GuestTeamName : The name of the guest team.
15430 GuestTeamName string `json:"guest_team_name,omitempty"`
15431 // HostTeamName : The name of the host team.
15432 HostTeamName string `json:"host_team_name,omitempty"`
15433 // PreviousValue : Previous request state.
15434 PreviousValue *TrustedTeamsRequestState `json:"previous_value"`
15435 // NewValue : New request state.
15436 NewValue *TrustedTeamsRequestState `json:"new_value"`
15437 // ActionDetails : Action details.
15438 ActionDetails *TrustedTeamsRequestAction `json:"action_details"`
15439 }
15440
15441 // NewGuestAdminChangeStatusDetails returns a new GuestAdminChangeStatusDetails instance
15442 func NewGuestAdminChangeStatusDetails(IsGuest bool, PreviousValue *TrustedTeamsRequestState, NewValue *TrustedTeamsRequestState, ActionDetails *TrustedTeamsRequestAction) *GuestAdminChangeStatusDetails {
15443 s := new(GuestAdminChangeStatusDetails)
15444 s.IsGuest = IsGuest
15445 s.PreviousValue = PreviousValue
15446 s.NewValue = NewValue
15447 s.ActionDetails = ActionDetails
15448 return s
15449 }
15450
15451 // GuestAdminChangeStatusType : has no documentation (yet)
15452 type GuestAdminChangeStatusType struct {
15453 // Description : has no documentation (yet)
15454 Description string `json:"description"`
15455 }
15456
15457 // NewGuestAdminChangeStatusType returns a new GuestAdminChangeStatusType instance
15458 func NewGuestAdminChangeStatusType(Description string) *GuestAdminChangeStatusType {
15459 s := new(GuestAdminChangeStatusType)
15460 s.Description = Description
15461 return s
15462 }
15463
15464 // GuestAdminSignedInViaTrustedTeamsDetails : Started trusted team admin
15465 // session.
15466 type GuestAdminSignedInViaTrustedTeamsDetails struct {
15467 // TeamName : Host team name.
15468 TeamName string `json:"team_name,omitempty"`
15469 // TrustedTeamName : Trusted team name.
15470 TrustedTeamName string `json:"trusted_team_name,omitempty"`
15471 }
15472
15473 // NewGuestAdminSignedInViaTrustedTeamsDetails returns a new GuestAdminSignedInViaTrustedTeamsDetails instance
15474 func NewGuestAdminSignedInViaTrustedTeamsDetails() *GuestAdminSignedInViaTrustedTeamsDetails {
15475 s := new(GuestAdminSignedInViaTrustedTeamsDetails)
15476 return s
15477 }
15478
15479 // GuestAdminSignedInViaTrustedTeamsType : has no documentation (yet)
15480 type GuestAdminSignedInViaTrustedTeamsType struct {
15481 // Description : has no documentation (yet)
15482 Description string `json:"description"`
15483 }
15484
15485 // NewGuestAdminSignedInViaTrustedTeamsType returns a new GuestAdminSignedInViaTrustedTeamsType instance
15486 func NewGuestAdminSignedInViaTrustedTeamsType(Description string) *GuestAdminSignedInViaTrustedTeamsType {
15487 s := new(GuestAdminSignedInViaTrustedTeamsType)
15488 s.Description = Description
15489 return s
15490 }
15491
15492 // GuestAdminSignedOutViaTrustedTeamsDetails : Ended trusted team admin session.
15493 type GuestAdminSignedOutViaTrustedTeamsDetails struct {
15494 // TeamName : Host team name.
15495 TeamName string `json:"team_name,omitempty"`
15496 // TrustedTeamName : Trusted team name.
15497 TrustedTeamName string `json:"trusted_team_name,omitempty"`
15498 }
15499
15500 // NewGuestAdminSignedOutViaTrustedTeamsDetails returns a new GuestAdminSignedOutViaTrustedTeamsDetails instance
15501 func NewGuestAdminSignedOutViaTrustedTeamsDetails() *GuestAdminSignedOutViaTrustedTeamsDetails {
15502 s := new(GuestAdminSignedOutViaTrustedTeamsDetails)
15503 return s
15504 }
15505
15506 // GuestAdminSignedOutViaTrustedTeamsType : has no documentation (yet)
15507 type GuestAdminSignedOutViaTrustedTeamsType struct {
15508 // Description : has no documentation (yet)
15509 Description string `json:"description"`
15510 }
15511
15512 // NewGuestAdminSignedOutViaTrustedTeamsType returns a new GuestAdminSignedOutViaTrustedTeamsType instance
15513 func NewGuestAdminSignedOutViaTrustedTeamsType(Description string) *GuestAdminSignedOutViaTrustedTeamsType {
15514 s := new(GuestAdminSignedOutViaTrustedTeamsType)
15515 s.Description = Description
15516 return s
15517 }
15518
15519 // IdentifierType : has no documentation (yet)
15520 type IdentifierType struct {
15521 dropbox.Tagged
15522 }
15523
15524 // Valid tag values for IdentifierType
15525 const (
15526 IdentifierTypeEmail = "email"
15527 IdentifierTypeFacebookProfileName = "facebook_profile_name"
15528 IdentifierTypeOther = "other"
15529 )
15530
15531 // IntegrationConnectedDetails : Connected integration for member.
15532 type IntegrationConnectedDetails struct {
15533 // IntegrationName : Name of the third-party integration.
15534 IntegrationName string `json:"integration_name"`
15535 }
15536
15537 // NewIntegrationConnectedDetails returns a new IntegrationConnectedDetails instance
15538 func NewIntegrationConnectedDetails(IntegrationName string) *IntegrationConnectedDetails {
15539 s := new(IntegrationConnectedDetails)
15540 s.IntegrationName = IntegrationName
15541 return s
15542 }
15543
15544 // IntegrationConnectedType : has no documentation (yet)
15545 type IntegrationConnectedType struct {
15546 // Description : has no documentation (yet)
15547 Description string `json:"description"`
15548 }
15549
15550 // NewIntegrationConnectedType returns a new IntegrationConnectedType instance
15551 func NewIntegrationConnectedType(Description string) *IntegrationConnectedType {
15552 s := new(IntegrationConnectedType)
15553 s.Description = Description
15554 return s
15555 }
15556
15557 // IntegrationDisconnectedDetails : Disconnected integration for member.
15558 type IntegrationDisconnectedDetails struct {
15559 // IntegrationName : Name of the third-party integration.
15560 IntegrationName string `json:"integration_name"`
15561 }
15562
15563 // NewIntegrationDisconnectedDetails returns a new IntegrationDisconnectedDetails instance
15564 func NewIntegrationDisconnectedDetails(IntegrationName string) *IntegrationDisconnectedDetails {
15565 s := new(IntegrationDisconnectedDetails)
15566 s.IntegrationName = IntegrationName
15567 return s
15568 }
15569
15570 // IntegrationDisconnectedType : has no documentation (yet)
15571 type IntegrationDisconnectedType struct {
15572 // Description : has no documentation (yet)
15573 Description string `json:"description"`
15574 }
15575
15576 // NewIntegrationDisconnectedType returns a new IntegrationDisconnectedType instance
15577 func NewIntegrationDisconnectedType(Description string) *IntegrationDisconnectedType {
15578 s := new(IntegrationDisconnectedType)
15579 s.Description = Description
15580 return s
15581 }
15582
15583 // IntegrationPolicy : Policy for controlling whether a service integration is
15584 // enabled for the team.
15585 type IntegrationPolicy struct {
15586 dropbox.Tagged
15587 }
15588
15589 // Valid tag values for IntegrationPolicy
15590 const (
15591 IntegrationPolicyDisabled = "disabled"
15592 IntegrationPolicyEnabled = "enabled"
15593 IntegrationPolicyOther = "other"
15594 )
15595
15596 // IntegrationPolicyChangedDetails : Changed integration policy for team.
15597 type IntegrationPolicyChangedDetails struct {
15598 // IntegrationName : Name of the third-party integration.
15599 IntegrationName string `json:"integration_name"`
15600 // NewValue : New integration policy.
15601 NewValue *IntegrationPolicy `json:"new_value"`
15602 // PreviousValue : Previous integration policy.
15603 PreviousValue *IntegrationPolicy `json:"previous_value"`
15604 }
15605
15606 // NewIntegrationPolicyChangedDetails returns a new IntegrationPolicyChangedDetails instance
15607 func NewIntegrationPolicyChangedDetails(IntegrationName string, NewValue *IntegrationPolicy, PreviousValue *IntegrationPolicy) *IntegrationPolicyChangedDetails {
15608 s := new(IntegrationPolicyChangedDetails)
15609 s.IntegrationName = IntegrationName
15610 s.NewValue = NewValue
15611 s.PreviousValue = PreviousValue
15612 return s
15613 }
15614
15615 // IntegrationPolicyChangedType : has no documentation (yet)
15616 type IntegrationPolicyChangedType struct {
15617 // Description : has no documentation (yet)
15618 Description string `json:"description"`
15619 }
15620
15621 // NewIntegrationPolicyChangedType returns a new IntegrationPolicyChangedType instance
15622 func NewIntegrationPolicyChangedType(Description string) *IntegrationPolicyChangedType {
15623 s := new(IntegrationPolicyChangedType)
15624 s.Description = Description
15625 return s
15626 }
15627
15628 // InviteAcceptanceEmailPolicy : Policy for deciding whether team admins receive
15629 // email when an invitation to join the team is accepted
15630 type InviteAcceptanceEmailPolicy struct {
15631 dropbox.Tagged
15632 }
15633
15634 // Valid tag values for InviteAcceptanceEmailPolicy
15635 const (
15636 InviteAcceptanceEmailPolicyDisabled = "disabled"
15637 InviteAcceptanceEmailPolicyEnabled = "enabled"
15638 InviteAcceptanceEmailPolicyOther = "other"
15639 )
15640
15641 // InviteAcceptanceEmailPolicyChangedDetails : Changed invite accept email
15642 // policy for team.
15643 type InviteAcceptanceEmailPolicyChangedDetails struct {
15644 // NewValue : To.
15645 NewValue *InviteAcceptanceEmailPolicy `json:"new_value"`
15646 // PreviousValue : From.
15647 PreviousValue *InviteAcceptanceEmailPolicy `json:"previous_value"`
15648 }
15649
15650 // NewInviteAcceptanceEmailPolicyChangedDetails returns a new InviteAcceptanceEmailPolicyChangedDetails instance
15651 func NewInviteAcceptanceEmailPolicyChangedDetails(NewValue *InviteAcceptanceEmailPolicy, PreviousValue *InviteAcceptanceEmailPolicy) *InviteAcceptanceEmailPolicyChangedDetails {
15652 s := new(InviteAcceptanceEmailPolicyChangedDetails)
15653 s.NewValue = NewValue
15654 s.PreviousValue = PreviousValue
15655 return s
15656 }
15657
15658 // InviteAcceptanceEmailPolicyChangedType : has no documentation (yet)
15659 type InviteAcceptanceEmailPolicyChangedType struct {
15660 // Description : has no documentation (yet)
15661 Description string `json:"description"`
15662 }
15663
15664 // NewInviteAcceptanceEmailPolicyChangedType returns a new InviteAcceptanceEmailPolicyChangedType instance
15665 func NewInviteAcceptanceEmailPolicyChangedType(Description string) *InviteAcceptanceEmailPolicyChangedType {
15666 s := new(InviteAcceptanceEmailPolicyChangedType)
15667 s.Description = Description
15668 return s
15669 }
15670
15671 // InviteMethod : has no documentation (yet)
15672 type InviteMethod struct {
15673 dropbox.Tagged
15674 }
15675
15676 // Valid tag values for InviteMethod
15677 const (
15678 InviteMethodAutoApprove = "auto_approve"
15679 InviteMethodInviteLink = "invite_link"
15680 InviteMethodMemberInvite = "member_invite"
15681 InviteMethodMovedFromAnotherTeam = "moved_from_another_team"
15682 InviteMethodOther = "other"
15683 )
15684
15685 // JoinTeamDetails : Additional information relevant when a new member joins the
15686 // team.
15687 type JoinTeamDetails struct {
15688 // LinkedApps : Linked applications. (Deprecated) Please use has_linked_apps
15689 // boolean field instead.
15690 LinkedApps []*UserLinkedAppLogInfo `json:"linked_apps"`
15691 // LinkedDevices : Linked devices. (Deprecated) Please use
15692 // has_linked_devices boolean field instead.
15693 LinkedDevices []*LinkedDeviceLogInfo `json:"linked_devices"`
15694 // LinkedSharedFolders : Linked shared folders. (Deprecated) Please use
15695 // has_linked_shared_folders boolean field instead.
15696 LinkedSharedFolders []*FolderLogInfo `json:"linked_shared_folders"`
15697 // WasLinkedAppsTruncated : (Deprecated) True if the linked_apps list was
15698 // truncated to the maximum supported length (50).
15699 WasLinkedAppsTruncated bool `json:"was_linked_apps_truncated,omitempty"`
15700 // WasLinkedDevicesTruncated : (Deprecated) True if the linked_devices list
15701 // was truncated to the maximum supported length (50).
15702 WasLinkedDevicesTruncated bool `json:"was_linked_devices_truncated,omitempty"`
15703 // WasLinkedSharedFoldersTruncated : (Deprecated) True if the
15704 // linked_shared_folders list was truncated to the maximum supported length
15705 // (50).
15706 WasLinkedSharedFoldersTruncated bool `json:"was_linked_shared_folders_truncated,omitempty"`
15707 // HasLinkedApps : True if the user had linked apps at event time.
15708 HasLinkedApps bool `json:"has_linked_apps,omitempty"`
15709 // HasLinkedDevices : True if the user had linked apps at event time.
15710 HasLinkedDevices bool `json:"has_linked_devices,omitempty"`
15711 // HasLinkedSharedFolders : True if the user had linked shared folders at
15712 // event time.
15713 HasLinkedSharedFolders bool `json:"has_linked_shared_folders,omitempty"`
15714 }
15715
15716 // NewJoinTeamDetails returns a new JoinTeamDetails instance
15717 func NewJoinTeamDetails(LinkedApps []*UserLinkedAppLogInfo, LinkedDevices []*LinkedDeviceLogInfo, LinkedSharedFolders []*FolderLogInfo) *JoinTeamDetails {
15718 s := new(JoinTeamDetails)
15719 s.LinkedApps = LinkedApps
15720 s.LinkedDevices = LinkedDevices
15721 s.LinkedSharedFolders = LinkedSharedFolders
15722 return s
15723 }
15724
15725 // LabelType : Label type
15726 type LabelType struct {
15727 dropbox.Tagged
15728 }
15729
15730 // Valid tag values for LabelType
15731 const (
15732 LabelTypePersonalInformation = "personal_information"
15733 LabelTypeTestOnly = "test_only"
15734 LabelTypeUserDefinedTag = "user_defined_tag"
15735 LabelTypeOther = "other"
15736 )
15737
15738 // LegacyDeviceSessionLogInfo : Information on sessions, in legacy format
15739 type LegacyDeviceSessionLogInfo struct {
15740 DeviceSessionLogInfo
15741 // SessionInfo : Session unique id.
15742 SessionInfo IsSessionLogInfo `json:"session_info,omitempty"`
15743 // DisplayName : The device name. Might be missing due to historical data
15744 // gap.
15745 DisplayName string `json:"display_name,omitempty"`
15746 // IsEmmManaged : Is device managed by emm. Might be missing due to
15747 // historical data gap.
15748 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
15749 // Platform : Information on the hosting platform. Might be missing due to
15750 // historical data gap.
15751 Platform string `json:"platform,omitempty"`
15752 // MacAddress : The mac address of the last activity from this session.
15753 // Might be missing due to historical data gap.
15754 MacAddress string `json:"mac_address,omitempty"`
15755 // OsVersion : The hosting OS version. Might be missing due to historical
15756 // data gap.
15757 OsVersion string `json:"os_version,omitempty"`
15758 // DeviceType : Information on the hosting device type. Might be missing due
15759 // to historical data gap.
15760 DeviceType string `json:"device_type,omitempty"`
15761 // ClientVersion : The Dropbox client version. Might be missing due to
15762 // historical data gap.
15763 ClientVersion string `json:"client_version,omitempty"`
15764 // LegacyUniqId : Alternative unique device session id, instead of session
15765 // id field. Might be missing due to historical data gap.
15766 LegacyUniqId string `json:"legacy_uniq_id,omitempty"`
15767 }
15768
15769 // NewLegacyDeviceSessionLogInfo returns a new LegacyDeviceSessionLogInfo instance
15770 func NewLegacyDeviceSessionLogInfo() *LegacyDeviceSessionLogInfo {
15771 s := new(LegacyDeviceSessionLogInfo)
15772 return s
15773 }
15774
15775 // LegalHoldsActivateAHoldDetails : Activated a hold.
15776 type LegalHoldsActivateAHoldDetails struct {
15777 // LegalHoldId : Hold ID.
15778 LegalHoldId string `json:"legal_hold_id"`
15779 // Name : Hold name.
15780 Name string `json:"name"`
15781 // StartDate : Hold start date.
15782 StartDate time.Time `json:"start_date"`
15783 // EndDate : Hold end date.
15784 EndDate *time.Time `json:"end_date,omitempty"`
15785 }
15786
15787 // NewLegalHoldsActivateAHoldDetails returns a new LegalHoldsActivateAHoldDetails instance
15788 func NewLegalHoldsActivateAHoldDetails(LegalHoldId string, Name string, StartDate time.Time) *LegalHoldsActivateAHoldDetails {
15789 s := new(LegalHoldsActivateAHoldDetails)
15790 s.LegalHoldId = LegalHoldId
15791 s.Name = Name
15792 s.StartDate = StartDate
15793 return s
15794 }
15795
15796 // LegalHoldsActivateAHoldType : has no documentation (yet)
15797 type LegalHoldsActivateAHoldType struct {
15798 // Description : has no documentation (yet)
15799 Description string `json:"description"`
15800 }
15801
15802 // NewLegalHoldsActivateAHoldType returns a new LegalHoldsActivateAHoldType instance
15803 func NewLegalHoldsActivateAHoldType(Description string) *LegalHoldsActivateAHoldType {
15804 s := new(LegalHoldsActivateAHoldType)
15805 s.Description = Description
15806 return s
15807 }
15808
15809 // LegalHoldsAddMembersDetails : Added members to a hold.
15810 type LegalHoldsAddMembersDetails struct {
15811 // LegalHoldId : Hold ID.
15812 LegalHoldId string `json:"legal_hold_id"`
15813 // Name : Hold name.
15814 Name string `json:"name"`
15815 }
15816
15817 // NewLegalHoldsAddMembersDetails returns a new LegalHoldsAddMembersDetails instance
15818 func NewLegalHoldsAddMembersDetails(LegalHoldId string, Name string) *LegalHoldsAddMembersDetails {
15819 s := new(LegalHoldsAddMembersDetails)
15820 s.LegalHoldId = LegalHoldId
15821 s.Name = Name
15822 return s
15823 }
15824
15825 // LegalHoldsAddMembersType : has no documentation (yet)
15826 type LegalHoldsAddMembersType struct {
15827 // Description : has no documentation (yet)
15828 Description string `json:"description"`
15829 }
15830
15831 // NewLegalHoldsAddMembersType returns a new LegalHoldsAddMembersType instance
15832 func NewLegalHoldsAddMembersType(Description string) *LegalHoldsAddMembersType {
15833 s := new(LegalHoldsAddMembersType)
15834 s.Description = Description
15835 return s
15836 }
15837
15838 // LegalHoldsChangeHoldDetailsDetails : Edited details for a hold.
15839 type LegalHoldsChangeHoldDetailsDetails struct {
15840 // LegalHoldId : Hold ID.
15841 LegalHoldId string `json:"legal_hold_id"`
15842 // Name : Hold name.
15843 Name string `json:"name"`
15844 // PreviousValue : Previous details.
15845 PreviousValue string `json:"previous_value"`
15846 // NewValue : New details.
15847 NewValue string `json:"new_value"`
15848 }
15849
15850 // NewLegalHoldsChangeHoldDetailsDetails returns a new LegalHoldsChangeHoldDetailsDetails instance
15851 func NewLegalHoldsChangeHoldDetailsDetails(LegalHoldId string, Name string, PreviousValue string, NewValue string) *LegalHoldsChangeHoldDetailsDetails {
15852 s := new(LegalHoldsChangeHoldDetailsDetails)
15853 s.LegalHoldId = LegalHoldId
15854 s.Name = Name
15855 s.PreviousValue = PreviousValue
15856 s.NewValue = NewValue
15857 return s
15858 }
15859
15860 // LegalHoldsChangeHoldDetailsType : has no documentation (yet)
15861 type LegalHoldsChangeHoldDetailsType struct {
15862 // Description : has no documentation (yet)
15863 Description string `json:"description"`
15864 }
15865
15866 // NewLegalHoldsChangeHoldDetailsType returns a new LegalHoldsChangeHoldDetailsType instance
15867 func NewLegalHoldsChangeHoldDetailsType(Description string) *LegalHoldsChangeHoldDetailsType {
15868 s := new(LegalHoldsChangeHoldDetailsType)
15869 s.Description = Description
15870 return s
15871 }
15872
15873 // LegalHoldsChangeHoldNameDetails : Renamed a hold.
15874 type LegalHoldsChangeHoldNameDetails struct {
15875 // LegalHoldId : Hold ID.
15876 LegalHoldId string `json:"legal_hold_id"`
15877 // PreviousValue : Previous Name.
15878 PreviousValue string `json:"previous_value"`
15879 // NewValue : New Name.
15880 NewValue string `json:"new_value"`
15881 }
15882
15883 // NewLegalHoldsChangeHoldNameDetails returns a new LegalHoldsChangeHoldNameDetails instance
15884 func NewLegalHoldsChangeHoldNameDetails(LegalHoldId string, PreviousValue string, NewValue string) *LegalHoldsChangeHoldNameDetails {
15885 s := new(LegalHoldsChangeHoldNameDetails)
15886 s.LegalHoldId = LegalHoldId
15887 s.PreviousValue = PreviousValue
15888 s.NewValue = NewValue
15889 return s
15890 }
15891
15892 // LegalHoldsChangeHoldNameType : has no documentation (yet)
15893 type LegalHoldsChangeHoldNameType struct {
15894 // Description : has no documentation (yet)
15895 Description string `json:"description"`
15896 }
15897
15898 // NewLegalHoldsChangeHoldNameType returns a new LegalHoldsChangeHoldNameType instance
15899 func NewLegalHoldsChangeHoldNameType(Description string) *LegalHoldsChangeHoldNameType {
15900 s := new(LegalHoldsChangeHoldNameType)
15901 s.Description = Description
15902 return s
15903 }
15904
15905 // LegalHoldsExportAHoldDetails : Exported hold.
15906 type LegalHoldsExportAHoldDetails struct {
15907 // LegalHoldId : Hold ID.
15908 LegalHoldId string `json:"legal_hold_id"`
15909 // Name : Hold name.
15910 Name string `json:"name"`
15911 // ExportName : Export name.
15912 ExportName string `json:"export_name,omitempty"`
15913 }
15914
15915 // NewLegalHoldsExportAHoldDetails returns a new LegalHoldsExportAHoldDetails instance
15916 func NewLegalHoldsExportAHoldDetails(LegalHoldId string, Name string) *LegalHoldsExportAHoldDetails {
15917 s := new(LegalHoldsExportAHoldDetails)
15918 s.LegalHoldId = LegalHoldId
15919 s.Name = Name
15920 return s
15921 }
15922
15923 // LegalHoldsExportAHoldType : has no documentation (yet)
15924 type LegalHoldsExportAHoldType struct {
15925 // Description : has no documentation (yet)
15926 Description string `json:"description"`
15927 }
15928
15929 // NewLegalHoldsExportAHoldType returns a new LegalHoldsExportAHoldType instance
15930 func NewLegalHoldsExportAHoldType(Description string) *LegalHoldsExportAHoldType {
15931 s := new(LegalHoldsExportAHoldType)
15932 s.Description = Description
15933 return s
15934 }
15935
15936 // LegalHoldsExportCancelledDetails : Canceled export for a hold.
15937 type LegalHoldsExportCancelledDetails struct {
15938 // LegalHoldId : Hold ID.
15939 LegalHoldId string `json:"legal_hold_id"`
15940 // Name : Hold name.
15941 Name string `json:"name"`
15942 // ExportName : Export name.
15943 ExportName string `json:"export_name"`
15944 }
15945
15946 // NewLegalHoldsExportCancelledDetails returns a new LegalHoldsExportCancelledDetails instance
15947 func NewLegalHoldsExportCancelledDetails(LegalHoldId string, Name string, ExportName string) *LegalHoldsExportCancelledDetails {
15948 s := new(LegalHoldsExportCancelledDetails)
15949 s.LegalHoldId = LegalHoldId
15950 s.Name = Name
15951 s.ExportName = ExportName
15952 return s
15953 }
15954
15955 // LegalHoldsExportCancelledType : has no documentation (yet)
15956 type LegalHoldsExportCancelledType struct {
15957 // Description : has no documentation (yet)
15958 Description string `json:"description"`
15959 }
15960
15961 // NewLegalHoldsExportCancelledType returns a new LegalHoldsExportCancelledType instance
15962 func NewLegalHoldsExportCancelledType(Description string) *LegalHoldsExportCancelledType {
15963 s := new(LegalHoldsExportCancelledType)
15964 s.Description = Description
15965 return s
15966 }
15967
15968 // LegalHoldsExportDownloadedDetails : Downloaded export for a hold.
15969 type LegalHoldsExportDownloadedDetails struct {
15970 // LegalHoldId : Hold ID.
15971 LegalHoldId string `json:"legal_hold_id"`
15972 // Name : Hold name.
15973 Name string `json:"name"`
15974 // ExportName : Export name.
15975 ExportName string `json:"export_name"`
15976 // Part : Part.
15977 Part string `json:"part,omitempty"`
15978 // FileName : Filename.
15979 FileName string `json:"file_name,omitempty"`
15980 }
15981
15982 // NewLegalHoldsExportDownloadedDetails returns a new LegalHoldsExportDownloadedDetails instance
15983 func NewLegalHoldsExportDownloadedDetails(LegalHoldId string, Name string, ExportName string) *LegalHoldsExportDownloadedDetails {
15984 s := new(LegalHoldsExportDownloadedDetails)
15985 s.LegalHoldId = LegalHoldId
15986 s.Name = Name
15987 s.ExportName = ExportName
15988 return s
15989 }
15990
15991 // LegalHoldsExportDownloadedType : has no documentation (yet)
15992 type LegalHoldsExportDownloadedType struct {
15993 // Description : has no documentation (yet)
15994 Description string `json:"description"`
15995 }
15996
15997 // NewLegalHoldsExportDownloadedType returns a new LegalHoldsExportDownloadedType instance
15998 func NewLegalHoldsExportDownloadedType(Description string) *LegalHoldsExportDownloadedType {
15999 s := new(LegalHoldsExportDownloadedType)
16000 s.Description = Description
16001 return s
16002 }
16003
16004 // LegalHoldsExportRemovedDetails : Removed export for a hold.
16005 type LegalHoldsExportRemovedDetails struct {
16006 // LegalHoldId : Hold ID.
16007 LegalHoldId string `json:"legal_hold_id"`
16008 // Name : Hold name.
16009 Name string `json:"name"`
16010 // ExportName : Export name.
16011 ExportName string `json:"export_name"`
16012 }
16013
16014 // NewLegalHoldsExportRemovedDetails returns a new LegalHoldsExportRemovedDetails instance
16015 func NewLegalHoldsExportRemovedDetails(LegalHoldId string, Name string, ExportName string) *LegalHoldsExportRemovedDetails {
16016 s := new(LegalHoldsExportRemovedDetails)
16017 s.LegalHoldId = LegalHoldId
16018 s.Name = Name
16019 s.ExportName = ExportName
16020 return s
16021 }
16022
16023 // LegalHoldsExportRemovedType : has no documentation (yet)
16024 type LegalHoldsExportRemovedType struct {
16025 // Description : has no documentation (yet)
16026 Description string `json:"description"`
16027 }
16028
16029 // NewLegalHoldsExportRemovedType returns a new LegalHoldsExportRemovedType instance
16030 func NewLegalHoldsExportRemovedType(Description string) *LegalHoldsExportRemovedType {
16031 s := new(LegalHoldsExportRemovedType)
16032 s.Description = Description
16033 return s
16034 }
16035
16036 // LegalHoldsReleaseAHoldDetails : Released a hold.
16037 type LegalHoldsReleaseAHoldDetails struct {
16038 // LegalHoldId : Hold ID.
16039 LegalHoldId string `json:"legal_hold_id"`
16040 // Name : Hold name.
16041 Name string `json:"name"`
16042 }
16043
16044 // NewLegalHoldsReleaseAHoldDetails returns a new LegalHoldsReleaseAHoldDetails instance
16045 func NewLegalHoldsReleaseAHoldDetails(LegalHoldId string, Name string) *LegalHoldsReleaseAHoldDetails {
16046 s := new(LegalHoldsReleaseAHoldDetails)
16047 s.LegalHoldId = LegalHoldId
16048 s.Name = Name
16049 return s
16050 }
16051
16052 // LegalHoldsReleaseAHoldType : has no documentation (yet)
16053 type LegalHoldsReleaseAHoldType struct {
16054 // Description : has no documentation (yet)
16055 Description string `json:"description"`
16056 }
16057
16058 // NewLegalHoldsReleaseAHoldType returns a new LegalHoldsReleaseAHoldType instance
16059 func NewLegalHoldsReleaseAHoldType(Description string) *LegalHoldsReleaseAHoldType {
16060 s := new(LegalHoldsReleaseAHoldType)
16061 s.Description = Description
16062 return s
16063 }
16064
16065 // LegalHoldsRemoveMembersDetails : Removed members from a hold.
16066 type LegalHoldsRemoveMembersDetails struct {
16067 // LegalHoldId : Hold ID.
16068 LegalHoldId string `json:"legal_hold_id"`
16069 // Name : Hold name.
16070 Name string `json:"name"`
16071 }
16072
16073 // NewLegalHoldsRemoveMembersDetails returns a new LegalHoldsRemoveMembersDetails instance
16074 func NewLegalHoldsRemoveMembersDetails(LegalHoldId string, Name string) *LegalHoldsRemoveMembersDetails {
16075 s := new(LegalHoldsRemoveMembersDetails)
16076 s.LegalHoldId = LegalHoldId
16077 s.Name = Name
16078 return s
16079 }
16080
16081 // LegalHoldsRemoveMembersType : has no documentation (yet)
16082 type LegalHoldsRemoveMembersType struct {
16083 // Description : has no documentation (yet)
16084 Description string `json:"description"`
16085 }
16086
16087 // NewLegalHoldsRemoveMembersType returns a new LegalHoldsRemoveMembersType instance
16088 func NewLegalHoldsRemoveMembersType(Description string) *LegalHoldsRemoveMembersType {
16089 s := new(LegalHoldsRemoveMembersType)
16090 s.Description = Description
16091 return s
16092 }
16093
16094 // LegalHoldsReportAHoldDetails : Created a summary report for a hold.
16095 type LegalHoldsReportAHoldDetails struct {
16096 // LegalHoldId : Hold ID.
16097 LegalHoldId string `json:"legal_hold_id"`
16098 // Name : Hold name.
16099 Name string `json:"name"`
16100 }
16101
16102 // NewLegalHoldsReportAHoldDetails returns a new LegalHoldsReportAHoldDetails instance
16103 func NewLegalHoldsReportAHoldDetails(LegalHoldId string, Name string) *LegalHoldsReportAHoldDetails {
16104 s := new(LegalHoldsReportAHoldDetails)
16105 s.LegalHoldId = LegalHoldId
16106 s.Name = Name
16107 return s
16108 }
16109
16110 // LegalHoldsReportAHoldType : has no documentation (yet)
16111 type LegalHoldsReportAHoldType struct {
16112 // Description : has no documentation (yet)
16113 Description string `json:"description"`
16114 }
16115
16116 // NewLegalHoldsReportAHoldType returns a new LegalHoldsReportAHoldType instance
16117 func NewLegalHoldsReportAHoldType(Description string) *LegalHoldsReportAHoldType {
16118 s := new(LegalHoldsReportAHoldType)
16119 s.Description = Description
16120 return s
16121 }
16122
16123 // LinkedDeviceLogInfo : The device sessions that user is linked to.
16124 type LinkedDeviceLogInfo struct {
16125 dropbox.Tagged
16126 // DesktopDeviceSession : desktop device session's details.
16127 DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"`
16128 // LegacyDeviceSession : legacy device session's details.
16129 LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"`
16130 // MobileDeviceSession : mobile device session's details.
16131 MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"`
16132 // WebDeviceSession : web device session's details.
16133 WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"`
16134 }
16135
16136 // Valid tag values for LinkedDeviceLogInfo
16137 const (
16138 LinkedDeviceLogInfoDesktopDeviceSession = "desktop_device_session"
16139 LinkedDeviceLogInfoLegacyDeviceSession = "legacy_device_session"
16140 LinkedDeviceLogInfoMobileDeviceSession = "mobile_device_session"
16141 LinkedDeviceLogInfoWebDeviceSession = "web_device_session"
16142 LinkedDeviceLogInfoOther = "other"
16143 )
16144
16145 // UnmarshalJSON deserializes into a LinkedDeviceLogInfo instance
16146 func (u *LinkedDeviceLogInfo) UnmarshalJSON(body []byte) error {
16147 type wrap struct {
16148 dropbox.Tagged
16149 }
16150 var w wrap
16151 var err error
16152 if err = json.Unmarshal(body, &w); err != nil {
16153 return err
16154 }
16155 u.Tag = w.Tag
16156 switch u.Tag {
16157 case "desktop_device_session":
16158 err = json.Unmarshal(body, &u.DesktopDeviceSession)
16159
16160 if err != nil {
16161 return err
16162 }
16163 case "legacy_device_session":
16164 err = json.Unmarshal(body, &u.LegacyDeviceSession)
16165
16166 if err != nil {
16167 return err
16168 }
16169 case "mobile_device_session":
16170 err = json.Unmarshal(body, &u.MobileDeviceSession)
16171
16172 if err != nil {
16173 return err
16174 }
16175 case "web_device_session":
16176 err = json.Unmarshal(body, &u.WebDeviceSession)
16177
16178 if err != nil {
16179 return err
16180 }
16181 }
16182 return nil
16183 }
16184
16185 // LockStatus : File lock status
16186 type LockStatus struct {
16187 dropbox.Tagged
16188 }
16189
16190 // Valid tag values for LockStatus
16191 const (
16192 LockStatusLocked = "locked"
16193 LockStatusUnlocked = "unlocked"
16194 LockStatusOther = "other"
16195 )
16196
16197 // LoginFailDetails : Failed to sign in.
16198 type LoginFailDetails struct {
16199 // IsEmmManaged : Tells if the login device is EMM managed. Might be missing
16200 // due to historical data gap.
16201 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
16202 // LoginMethod : Login method.
16203 LoginMethod *LoginMethod `json:"login_method"`
16204 // ErrorDetails : Error details.
16205 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
16206 }
16207
16208 // NewLoginFailDetails returns a new LoginFailDetails instance
16209 func NewLoginFailDetails(LoginMethod *LoginMethod, ErrorDetails *FailureDetailsLogInfo) *LoginFailDetails {
16210 s := new(LoginFailDetails)
16211 s.LoginMethod = LoginMethod
16212 s.ErrorDetails = ErrorDetails
16213 return s
16214 }
16215
16216 // LoginFailType : has no documentation (yet)
16217 type LoginFailType struct {
16218 // Description : has no documentation (yet)
16219 Description string `json:"description"`
16220 }
16221
16222 // NewLoginFailType returns a new LoginFailType instance
16223 func NewLoginFailType(Description string) *LoginFailType {
16224 s := new(LoginFailType)
16225 s.Description = Description
16226 return s
16227 }
16228
16229 // LoginMethod : has no documentation (yet)
16230 type LoginMethod struct {
16231 dropbox.Tagged
16232 }
16233
16234 // Valid tag values for LoginMethod
16235 const (
16236 LoginMethodAppleOauth = "apple_oauth"
16237 LoginMethodFirstPartyTokenExchange = "first_party_token_exchange"
16238 LoginMethodGoogleOauth = "google_oauth"
16239 LoginMethodPassword = "password"
16240 LoginMethodQrCode = "qr_code"
16241 LoginMethodSaml = "saml"
16242 LoginMethodTwoFactorAuthentication = "two_factor_authentication"
16243 LoginMethodWebSession = "web_session"
16244 LoginMethodOther = "other"
16245 )
16246
16247 // LoginSuccessDetails : Signed in.
16248 type LoginSuccessDetails struct {
16249 // IsEmmManaged : Tells if the login device is EMM managed. Might be missing
16250 // due to historical data gap.
16251 IsEmmManaged bool `json:"is_emm_managed,omitempty"`
16252 // LoginMethod : Login method.
16253 LoginMethod *LoginMethod `json:"login_method"`
16254 }
16255
16256 // NewLoginSuccessDetails returns a new LoginSuccessDetails instance
16257 func NewLoginSuccessDetails(LoginMethod *LoginMethod) *LoginSuccessDetails {
16258 s := new(LoginSuccessDetails)
16259 s.LoginMethod = LoginMethod
16260 return s
16261 }
16262
16263 // LoginSuccessType : has no documentation (yet)
16264 type LoginSuccessType struct {
16265 // Description : has no documentation (yet)
16266 Description string `json:"description"`
16267 }
16268
16269 // NewLoginSuccessType returns a new LoginSuccessType instance
16270 func NewLoginSuccessType(Description string) *LoginSuccessType {
16271 s := new(LoginSuccessType)
16272 s.Description = Description
16273 return s
16274 }
16275
16276 // LogoutDetails : Signed out.
16277 type LogoutDetails struct {
16278 // LoginId : Login session id.
16279 LoginId string `json:"login_id,omitempty"`
16280 }
16281
16282 // NewLogoutDetails returns a new LogoutDetails instance
16283 func NewLogoutDetails() *LogoutDetails {
16284 s := new(LogoutDetails)
16285 return s
16286 }
16287
16288 // LogoutType : has no documentation (yet)
16289 type LogoutType struct {
16290 // Description : has no documentation (yet)
16291 Description string `json:"description"`
16292 }
16293
16294 // NewLogoutType returns a new LogoutType instance
16295 func NewLogoutType(Description string) *LogoutType {
16296 s := new(LogoutType)
16297 s.Description = Description
16298 return s
16299 }
16300
16301 // MemberAddExternalIdDetails : Added an external ID for team member.
16302 type MemberAddExternalIdDetails struct {
16303 // NewValue : Current external id.
16304 NewValue string `json:"new_value"`
16305 }
16306
16307 // NewMemberAddExternalIdDetails returns a new MemberAddExternalIdDetails instance
16308 func NewMemberAddExternalIdDetails(NewValue string) *MemberAddExternalIdDetails {
16309 s := new(MemberAddExternalIdDetails)
16310 s.NewValue = NewValue
16311 return s
16312 }
16313
16314 // MemberAddExternalIdType : has no documentation (yet)
16315 type MemberAddExternalIdType struct {
16316 // Description : has no documentation (yet)
16317 Description string `json:"description"`
16318 }
16319
16320 // NewMemberAddExternalIdType returns a new MemberAddExternalIdType instance
16321 func NewMemberAddExternalIdType(Description string) *MemberAddExternalIdType {
16322 s := new(MemberAddExternalIdType)
16323 s.Description = Description
16324 return s
16325 }
16326
16327 // MemberAddNameDetails : Added team member name.
16328 type MemberAddNameDetails struct {
16329 // NewValue : New user's name.
16330 NewValue *UserNameLogInfo `json:"new_value"`
16331 }
16332
16333 // NewMemberAddNameDetails returns a new MemberAddNameDetails instance
16334 func NewMemberAddNameDetails(NewValue *UserNameLogInfo) *MemberAddNameDetails {
16335 s := new(MemberAddNameDetails)
16336 s.NewValue = NewValue
16337 return s
16338 }
16339
16340 // MemberAddNameType : has no documentation (yet)
16341 type MemberAddNameType struct {
16342 // Description : has no documentation (yet)
16343 Description string `json:"description"`
16344 }
16345
16346 // NewMemberAddNameType returns a new MemberAddNameType instance
16347 func NewMemberAddNameType(Description string) *MemberAddNameType {
16348 s := new(MemberAddNameType)
16349 s.Description = Description
16350 return s
16351 }
16352
16353 // MemberChangeAdminRoleDetails : Changed team member admin role.
16354 type MemberChangeAdminRoleDetails struct {
16355 // NewValue : New admin role. This field is relevant when the admin role is
16356 // changed or whenthe user role changes from no admin rights to with admin
16357 // rights.
16358 NewValue *AdminRole `json:"new_value,omitempty"`
16359 // PreviousValue : Previous admin role. This field is relevant when the
16360 // admin role is changed or when the admin role is removed.
16361 PreviousValue *AdminRole `json:"previous_value,omitempty"`
16362 }
16363
16364 // NewMemberChangeAdminRoleDetails returns a new MemberChangeAdminRoleDetails instance
16365 func NewMemberChangeAdminRoleDetails() *MemberChangeAdminRoleDetails {
16366 s := new(MemberChangeAdminRoleDetails)
16367 return s
16368 }
16369
16370 // MemberChangeAdminRoleType : has no documentation (yet)
16371 type MemberChangeAdminRoleType struct {
16372 // Description : has no documentation (yet)
16373 Description string `json:"description"`
16374 }
16375
16376 // NewMemberChangeAdminRoleType returns a new MemberChangeAdminRoleType instance
16377 func NewMemberChangeAdminRoleType(Description string) *MemberChangeAdminRoleType {
16378 s := new(MemberChangeAdminRoleType)
16379 s.Description = Description
16380 return s
16381 }
16382
16383 // MemberChangeEmailDetails : Changed team member email.
16384 type MemberChangeEmailDetails struct {
16385 // NewValue : New email.
16386 NewValue string `json:"new_value"`
16387 // PreviousValue : Previous email. Might be missing due to historical data
16388 // gap.
16389 PreviousValue string `json:"previous_value,omitempty"`
16390 }
16391
16392 // NewMemberChangeEmailDetails returns a new MemberChangeEmailDetails instance
16393 func NewMemberChangeEmailDetails(NewValue string) *MemberChangeEmailDetails {
16394 s := new(MemberChangeEmailDetails)
16395 s.NewValue = NewValue
16396 return s
16397 }
16398
16399 // MemberChangeEmailType : has no documentation (yet)
16400 type MemberChangeEmailType struct {
16401 // Description : has no documentation (yet)
16402 Description string `json:"description"`
16403 }
16404
16405 // NewMemberChangeEmailType returns a new MemberChangeEmailType instance
16406 func NewMemberChangeEmailType(Description string) *MemberChangeEmailType {
16407 s := new(MemberChangeEmailType)
16408 s.Description = Description
16409 return s
16410 }
16411
16412 // MemberChangeExternalIdDetails : Changed the external ID for team member.
16413 type MemberChangeExternalIdDetails struct {
16414 // NewValue : Current external id.
16415 NewValue string `json:"new_value"`
16416 // PreviousValue : Old external id.
16417 PreviousValue string `json:"previous_value"`
16418 }
16419
16420 // NewMemberChangeExternalIdDetails returns a new MemberChangeExternalIdDetails instance
16421 func NewMemberChangeExternalIdDetails(NewValue string, PreviousValue string) *MemberChangeExternalIdDetails {
16422 s := new(MemberChangeExternalIdDetails)
16423 s.NewValue = NewValue
16424 s.PreviousValue = PreviousValue
16425 return s
16426 }
16427
16428 // MemberChangeExternalIdType : has no documentation (yet)
16429 type MemberChangeExternalIdType struct {
16430 // Description : has no documentation (yet)
16431 Description string `json:"description"`
16432 }
16433
16434 // NewMemberChangeExternalIdType returns a new MemberChangeExternalIdType instance
16435 func NewMemberChangeExternalIdType(Description string) *MemberChangeExternalIdType {
16436 s := new(MemberChangeExternalIdType)
16437 s.Description = Description
16438 return s
16439 }
16440
16441 // MemberChangeMembershipTypeDetails : Changed membership type (limited/full) of
16442 // member.
16443 type MemberChangeMembershipTypeDetails struct {
16444 // PrevValue : Previous membership type.
16445 PrevValue *TeamMembershipType `json:"prev_value"`
16446 // NewValue : New membership type.
16447 NewValue *TeamMembershipType `json:"new_value"`
16448 }
16449
16450 // NewMemberChangeMembershipTypeDetails returns a new MemberChangeMembershipTypeDetails instance
16451 func NewMemberChangeMembershipTypeDetails(PrevValue *TeamMembershipType, NewValue *TeamMembershipType) *MemberChangeMembershipTypeDetails {
16452 s := new(MemberChangeMembershipTypeDetails)
16453 s.PrevValue = PrevValue
16454 s.NewValue = NewValue
16455 return s
16456 }
16457
16458 // MemberChangeMembershipTypeType : has no documentation (yet)
16459 type MemberChangeMembershipTypeType struct {
16460 // Description : has no documentation (yet)
16461 Description string `json:"description"`
16462 }
16463
16464 // NewMemberChangeMembershipTypeType returns a new MemberChangeMembershipTypeType instance
16465 func NewMemberChangeMembershipTypeType(Description string) *MemberChangeMembershipTypeType {
16466 s := new(MemberChangeMembershipTypeType)
16467 s.Description = Description
16468 return s
16469 }
16470
16471 // MemberChangeNameDetails : Changed team member name.
16472 type MemberChangeNameDetails struct {
16473 // NewValue : New user's name.
16474 NewValue *UserNameLogInfo `json:"new_value"`
16475 // PreviousValue : Previous user's name. Might be missing due to historical
16476 // data gap.
16477 PreviousValue *UserNameLogInfo `json:"previous_value,omitempty"`
16478 }
16479
16480 // NewMemberChangeNameDetails returns a new MemberChangeNameDetails instance
16481 func NewMemberChangeNameDetails(NewValue *UserNameLogInfo) *MemberChangeNameDetails {
16482 s := new(MemberChangeNameDetails)
16483 s.NewValue = NewValue
16484 return s
16485 }
16486
16487 // MemberChangeNameType : has no documentation (yet)
16488 type MemberChangeNameType struct {
16489 // Description : has no documentation (yet)
16490 Description string `json:"description"`
16491 }
16492
16493 // NewMemberChangeNameType returns a new MemberChangeNameType instance
16494 func NewMemberChangeNameType(Description string) *MemberChangeNameType {
16495 s := new(MemberChangeNameType)
16496 s.Description = Description
16497 return s
16498 }
16499
16500 // MemberChangeResellerRoleDetails : Changed team member reseller role.
16501 type MemberChangeResellerRoleDetails struct {
16502 // NewValue : New reseller role. This field is relevant when the reseller
16503 // role is changed.
16504 NewValue *ResellerRole `json:"new_value"`
16505 // PreviousValue : Previous reseller role. This field is relevant when the
16506 // reseller role is changed or when the reseller role is removed.
16507 PreviousValue *ResellerRole `json:"previous_value"`
16508 }
16509
16510 // NewMemberChangeResellerRoleDetails returns a new MemberChangeResellerRoleDetails instance
16511 func NewMemberChangeResellerRoleDetails(NewValue *ResellerRole, PreviousValue *ResellerRole) *MemberChangeResellerRoleDetails {
16512 s := new(MemberChangeResellerRoleDetails)
16513 s.NewValue = NewValue
16514 s.PreviousValue = PreviousValue
16515 return s
16516 }
16517
16518 // MemberChangeResellerRoleType : has no documentation (yet)
16519 type MemberChangeResellerRoleType struct {
16520 // Description : has no documentation (yet)
16521 Description string `json:"description"`
16522 }
16523
16524 // NewMemberChangeResellerRoleType returns a new MemberChangeResellerRoleType instance
16525 func NewMemberChangeResellerRoleType(Description string) *MemberChangeResellerRoleType {
16526 s := new(MemberChangeResellerRoleType)
16527 s.Description = Description
16528 return s
16529 }
16530
16531 // MemberChangeStatusDetails : Changed member status (invited, joined,
16532 // suspended, etc.).
16533 type MemberChangeStatusDetails struct {
16534 // PreviousValue : Previous member status. Might be missing due to
16535 // historical data gap.
16536 PreviousValue *MemberStatus `json:"previous_value,omitempty"`
16537 // NewValue : New member status.
16538 NewValue *MemberStatus `json:"new_value"`
16539 // Action : Additional information indicating the action taken that caused
16540 // status change.
16541 Action *ActionDetails `json:"action,omitempty"`
16542 // NewTeam : The user's new team name. This field is relevant when the user
16543 // is transferred off the team.
16544 NewTeam string `json:"new_team,omitempty"`
16545 // PreviousTeam : The user's previous team name. This field is relevant when
16546 // the user is transferred onto the team.
16547 PreviousTeam string `json:"previous_team,omitempty"`
16548 }
16549
16550 // NewMemberChangeStatusDetails returns a new MemberChangeStatusDetails instance
16551 func NewMemberChangeStatusDetails(NewValue *MemberStatus) *MemberChangeStatusDetails {
16552 s := new(MemberChangeStatusDetails)
16553 s.NewValue = NewValue
16554 return s
16555 }
16556
16557 // MemberChangeStatusType : has no documentation (yet)
16558 type MemberChangeStatusType struct {
16559 // Description : has no documentation (yet)
16560 Description string `json:"description"`
16561 }
16562
16563 // NewMemberChangeStatusType returns a new MemberChangeStatusType instance
16564 func NewMemberChangeStatusType(Description string) *MemberChangeStatusType {
16565 s := new(MemberChangeStatusType)
16566 s.Description = Description
16567 return s
16568 }
16569
16570 // MemberDeleteManualContactsDetails : Cleared manually added contacts.
16571 type MemberDeleteManualContactsDetails struct {
16572 }
16573
16574 // NewMemberDeleteManualContactsDetails returns a new MemberDeleteManualContactsDetails instance
16575 func NewMemberDeleteManualContactsDetails() *MemberDeleteManualContactsDetails {
16576 s := new(MemberDeleteManualContactsDetails)
16577 return s
16578 }
16579
16580 // MemberDeleteManualContactsType : has no documentation (yet)
16581 type MemberDeleteManualContactsType struct {
16582 // Description : has no documentation (yet)
16583 Description string `json:"description"`
16584 }
16585
16586 // NewMemberDeleteManualContactsType returns a new MemberDeleteManualContactsType instance
16587 func NewMemberDeleteManualContactsType(Description string) *MemberDeleteManualContactsType {
16588 s := new(MemberDeleteManualContactsType)
16589 s.Description = Description
16590 return s
16591 }
16592
16593 // MemberDeleteProfilePhotoDetails : Deleted team member profile photo.
16594 type MemberDeleteProfilePhotoDetails struct {
16595 }
16596
16597 // NewMemberDeleteProfilePhotoDetails returns a new MemberDeleteProfilePhotoDetails instance
16598 func NewMemberDeleteProfilePhotoDetails() *MemberDeleteProfilePhotoDetails {
16599 s := new(MemberDeleteProfilePhotoDetails)
16600 return s
16601 }
16602
16603 // MemberDeleteProfilePhotoType : has no documentation (yet)
16604 type MemberDeleteProfilePhotoType struct {
16605 // Description : has no documentation (yet)
16606 Description string `json:"description"`
16607 }
16608
16609 // NewMemberDeleteProfilePhotoType returns a new MemberDeleteProfilePhotoType instance
16610 func NewMemberDeleteProfilePhotoType(Description string) *MemberDeleteProfilePhotoType {
16611 s := new(MemberDeleteProfilePhotoType)
16612 s.Description = Description
16613 return s
16614 }
16615
16616 // MemberPermanentlyDeleteAccountContentsDetails : Permanently deleted contents
16617 // of deleted team member account.
16618 type MemberPermanentlyDeleteAccountContentsDetails struct {
16619 }
16620
16621 // NewMemberPermanentlyDeleteAccountContentsDetails returns a new MemberPermanentlyDeleteAccountContentsDetails instance
16622 func NewMemberPermanentlyDeleteAccountContentsDetails() *MemberPermanentlyDeleteAccountContentsDetails {
16623 s := new(MemberPermanentlyDeleteAccountContentsDetails)
16624 return s
16625 }
16626
16627 // MemberPermanentlyDeleteAccountContentsType : has no documentation (yet)
16628 type MemberPermanentlyDeleteAccountContentsType struct {
16629 // Description : has no documentation (yet)
16630 Description string `json:"description"`
16631 }
16632
16633 // NewMemberPermanentlyDeleteAccountContentsType returns a new MemberPermanentlyDeleteAccountContentsType instance
16634 func NewMemberPermanentlyDeleteAccountContentsType(Description string) *MemberPermanentlyDeleteAccountContentsType {
16635 s := new(MemberPermanentlyDeleteAccountContentsType)
16636 s.Description = Description
16637 return s
16638 }
16639
16640 // MemberRemoveActionType : has no documentation (yet)
16641 type MemberRemoveActionType struct {
16642 dropbox.Tagged
16643 }
16644
16645 // Valid tag values for MemberRemoveActionType
16646 const (
16647 MemberRemoveActionTypeDelete = "delete"
16648 MemberRemoveActionTypeLeave = "leave"
16649 MemberRemoveActionTypeOffboard = "offboard"
16650 MemberRemoveActionTypeOffboardAndRetainTeamFolders = "offboard_and_retain_team_folders"
16651 MemberRemoveActionTypeOther = "other"
16652 )
16653
16654 // MemberRemoveExternalIdDetails : Removed the external ID for team member.
16655 type MemberRemoveExternalIdDetails struct {
16656 // PreviousValue : Old external id.
16657 PreviousValue string `json:"previous_value"`
16658 }
16659
16660 // NewMemberRemoveExternalIdDetails returns a new MemberRemoveExternalIdDetails instance
16661 func NewMemberRemoveExternalIdDetails(PreviousValue string) *MemberRemoveExternalIdDetails {
16662 s := new(MemberRemoveExternalIdDetails)
16663 s.PreviousValue = PreviousValue
16664 return s
16665 }
16666
16667 // MemberRemoveExternalIdType : has no documentation (yet)
16668 type MemberRemoveExternalIdType struct {
16669 // Description : has no documentation (yet)
16670 Description string `json:"description"`
16671 }
16672
16673 // NewMemberRemoveExternalIdType returns a new MemberRemoveExternalIdType instance
16674 func NewMemberRemoveExternalIdType(Description string) *MemberRemoveExternalIdType {
16675 s := new(MemberRemoveExternalIdType)
16676 s.Description = Description
16677 return s
16678 }
16679
16680 // MemberRequestsChangePolicyDetails : Changed whether users can find team when
16681 // not invited.
16682 type MemberRequestsChangePolicyDetails struct {
16683 // NewValue : New member change requests policy.
16684 NewValue *MemberRequestsPolicy `json:"new_value"`
16685 // PreviousValue : Previous member change requests policy. Might be missing
16686 // due to historical data gap.
16687 PreviousValue *MemberRequestsPolicy `json:"previous_value,omitempty"`
16688 }
16689
16690 // NewMemberRequestsChangePolicyDetails returns a new MemberRequestsChangePolicyDetails instance
16691 func NewMemberRequestsChangePolicyDetails(NewValue *MemberRequestsPolicy) *MemberRequestsChangePolicyDetails {
16692 s := new(MemberRequestsChangePolicyDetails)
16693 s.NewValue = NewValue
16694 return s
16695 }
16696
16697 // MemberRequestsChangePolicyType : has no documentation (yet)
16698 type MemberRequestsChangePolicyType struct {
16699 // Description : has no documentation (yet)
16700 Description string `json:"description"`
16701 }
16702
16703 // NewMemberRequestsChangePolicyType returns a new MemberRequestsChangePolicyType instance
16704 func NewMemberRequestsChangePolicyType(Description string) *MemberRequestsChangePolicyType {
16705 s := new(MemberRequestsChangePolicyType)
16706 s.Description = Description
16707 return s
16708 }
16709
16710 // MemberRequestsPolicy : has no documentation (yet)
16711 type MemberRequestsPolicy struct {
16712 dropbox.Tagged
16713 }
16714
16715 // Valid tag values for MemberRequestsPolicy
16716 const (
16717 MemberRequestsPolicyAutoAccept = "auto_accept"
16718 MemberRequestsPolicyDisabled = "disabled"
16719 MemberRequestsPolicyRequireApproval = "require_approval"
16720 MemberRequestsPolicyOther = "other"
16721 )
16722
16723 // MemberSendInvitePolicy : Policy for controlling whether team members can send
16724 // team invites
16725 type MemberSendInvitePolicy struct {
16726 dropbox.Tagged
16727 }
16728
16729 // Valid tag values for MemberSendInvitePolicy
16730 const (
16731 MemberSendInvitePolicyDisabled = "disabled"
16732 MemberSendInvitePolicyEveryone = "everyone"
16733 MemberSendInvitePolicySpecificMembers = "specific_members"
16734 MemberSendInvitePolicyOther = "other"
16735 )
16736
16737 // MemberSendInvitePolicyChangedDetails : Changed member send invite policy for
16738 // team.
16739 type MemberSendInvitePolicyChangedDetails struct {
16740 // NewValue : New team member send invite policy.
16741 NewValue *MemberSendInvitePolicy `json:"new_value"`
16742 // PreviousValue : Previous team member send invite policy.
16743 PreviousValue *MemberSendInvitePolicy `json:"previous_value"`
16744 }
16745
16746 // NewMemberSendInvitePolicyChangedDetails returns a new MemberSendInvitePolicyChangedDetails instance
16747 func NewMemberSendInvitePolicyChangedDetails(NewValue *MemberSendInvitePolicy, PreviousValue *MemberSendInvitePolicy) *MemberSendInvitePolicyChangedDetails {
16748 s := new(MemberSendInvitePolicyChangedDetails)
16749 s.NewValue = NewValue
16750 s.PreviousValue = PreviousValue
16751 return s
16752 }
16753
16754 // MemberSendInvitePolicyChangedType : has no documentation (yet)
16755 type MemberSendInvitePolicyChangedType struct {
16756 // Description : has no documentation (yet)
16757 Description string `json:"description"`
16758 }
16759
16760 // NewMemberSendInvitePolicyChangedType returns a new MemberSendInvitePolicyChangedType instance
16761 func NewMemberSendInvitePolicyChangedType(Description string) *MemberSendInvitePolicyChangedType {
16762 s := new(MemberSendInvitePolicyChangedType)
16763 s.Description = Description
16764 return s
16765 }
16766
16767 // MemberSetProfilePhotoDetails : Set team member profile photo.
16768 type MemberSetProfilePhotoDetails struct {
16769 }
16770
16771 // NewMemberSetProfilePhotoDetails returns a new MemberSetProfilePhotoDetails instance
16772 func NewMemberSetProfilePhotoDetails() *MemberSetProfilePhotoDetails {
16773 s := new(MemberSetProfilePhotoDetails)
16774 return s
16775 }
16776
16777 // MemberSetProfilePhotoType : has no documentation (yet)
16778 type MemberSetProfilePhotoType struct {
16779 // Description : has no documentation (yet)
16780 Description string `json:"description"`
16781 }
16782
16783 // NewMemberSetProfilePhotoType returns a new MemberSetProfilePhotoType instance
16784 func NewMemberSetProfilePhotoType(Description string) *MemberSetProfilePhotoType {
16785 s := new(MemberSetProfilePhotoType)
16786 s.Description = Description
16787 return s
16788 }
16789
16790 // MemberSpaceLimitsAddCustomQuotaDetails : Set custom member space limit.
16791 type MemberSpaceLimitsAddCustomQuotaDetails struct {
16792 // NewValue : New custom quota value in bytes.
16793 NewValue uint64 `json:"new_value"`
16794 }
16795
16796 // NewMemberSpaceLimitsAddCustomQuotaDetails returns a new MemberSpaceLimitsAddCustomQuotaDetails instance
16797 func NewMemberSpaceLimitsAddCustomQuotaDetails(NewValue uint64) *MemberSpaceLimitsAddCustomQuotaDetails {
16798 s := new(MemberSpaceLimitsAddCustomQuotaDetails)
16799 s.NewValue = NewValue
16800 return s
16801 }
16802
16803 // MemberSpaceLimitsAddCustomQuotaType : has no documentation (yet)
16804 type MemberSpaceLimitsAddCustomQuotaType struct {
16805 // Description : has no documentation (yet)
16806 Description string `json:"description"`
16807 }
16808
16809 // NewMemberSpaceLimitsAddCustomQuotaType returns a new MemberSpaceLimitsAddCustomQuotaType instance
16810 func NewMemberSpaceLimitsAddCustomQuotaType(Description string) *MemberSpaceLimitsAddCustomQuotaType {
16811 s := new(MemberSpaceLimitsAddCustomQuotaType)
16812 s.Description = Description
16813 return s
16814 }
16815
16816 // MemberSpaceLimitsAddExceptionDetails : Added members to member space limit
16817 // exception list.
16818 type MemberSpaceLimitsAddExceptionDetails struct {
16819 }
16820
16821 // NewMemberSpaceLimitsAddExceptionDetails returns a new MemberSpaceLimitsAddExceptionDetails instance
16822 func NewMemberSpaceLimitsAddExceptionDetails() *MemberSpaceLimitsAddExceptionDetails {
16823 s := new(MemberSpaceLimitsAddExceptionDetails)
16824 return s
16825 }
16826
16827 // MemberSpaceLimitsAddExceptionType : has no documentation (yet)
16828 type MemberSpaceLimitsAddExceptionType struct {
16829 // Description : has no documentation (yet)
16830 Description string `json:"description"`
16831 }
16832
16833 // NewMemberSpaceLimitsAddExceptionType returns a new MemberSpaceLimitsAddExceptionType instance
16834 func NewMemberSpaceLimitsAddExceptionType(Description string) *MemberSpaceLimitsAddExceptionType {
16835 s := new(MemberSpaceLimitsAddExceptionType)
16836 s.Description = Description
16837 return s
16838 }
16839
16840 // MemberSpaceLimitsChangeCapsTypePolicyDetails : Changed member space limit
16841 // type for team.
16842 type MemberSpaceLimitsChangeCapsTypePolicyDetails struct {
16843 // PreviousValue : Previous space limit type.
16844 PreviousValue *SpaceCapsType `json:"previous_value"`
16845 // NewValue : New space limit type.
16846 NewValue *SpaceCapsType `json:"new_value"`
16847 }
16848
16849 // NewMemberSpaceLimitsChangeCapsTypePolicyDetails returns a new MemberSpaceLimitsChangeCapsTypePolicyDetails instance
16850 func NewMemberSpaceLimitsChangeCapsTypePolicyDetails(PreviousValue *SpaceCapsType, NewValue *SpaceCapsType) *MemberSpaceLimitsChangeCapsTypePolicyDetails {
16851 s := new(MemberSpaceLimitsChangeCapsTypePolicyDetails)
16852 s.PreviousValue = PreviousValue
16853 s.NewValue = NewValue
16854 return s
16855 }
16856
16857 // MemberSpaceLimitsChangeCapsTypePolicyType : has no documentation (yet)
16858 type MemberSpaceLimitsChangeCapsTypePolicyType struct {
16859 // Description : has no documentation (yet)
16860 Description string `json:"description"`
16861 }
16862
16863 // NewMemberSpaceLimitsChangeCapsTypePolicyType returns a new MemberSpaceLimitsChangeCapsTypePolicyType instance
16864 func NewMemberSpaceLimitsChangeCapsTypePolicyType(Description string) *MemberSpaceLimitsChangeCapsTypePolicyType {
16865 s := new(MemberSpaceLimitsChangeCapsTypePolicyType)
16866 s.Description = Description
16867 return s
16868 }
16869
16870 // MemberSpaceLimitsChangeCustomQuotaDetails : Changed custom member space
16871 // limit.
16872 type MemberSpaceLimitsChangeCustomQuotaDetails struct {
16873 // PreviousValue : Previous custom quota value in bytes.
16874 PreviousValue uint64 `json:"previous_value"`
16875 // NewValue : New custom quota value in bytes.
16876 NewValue uint64 `json:"new_value"`
16877 }
16878
16879 // NewMemberSpaceLimitsChangeCustomQuotaDetails returns a new MemberSpaceLimitsChangeCustomQuotaDetails instance
16880 func NewMemberSpaceLimitsChangeCustomQuotaDetails(PreviousValue uint64, NewValue uint64) *MemberSpaceLimitsChangeCustomQuotaDetails {
16881 s := new(MemberSpaceLimitsChangeCustomQuotaDetails)
16882 s.PreviousValue = PreviousValue
16883 s.NewValue = NewValue
16884 return s
16885 }
16886
16887 // MemberSpaceLimitsChangeCustomQuotaType : has no documentation (yet)
16888 type MemberSpaceLimitsChangeCustomQuotaType struct {
16889 // Description : has no documentation (yet)
16890 Description string `json:"description"`
16891 }
16892
16893 // NewMemberSpaceLimitsChangeCustomQuotaType returns a new MemberSpaceLimitsChangeCustomQuotaType instance
16894 func NewMemberSpaceLimitsChangeCustomQuotaType(Description string) *MemberSpaceLimitsChangeCustomQuotaType {
16895 s := new(MemberSpaceLimitsChangeCustomQuotaType)
16896 s.Description = Description
16897 return s
16898 }
16899
16900 // MemberSpaceLimitsChangePolicyDetails : Changed team default member space
16901 // limit.
16902 type MemberSpaceLimitsChangePolicyDetails struct {
16903 // PreviousValue : Previous team default limit value in bytes. Might be
16904 // missing due to historical data gap.
16905 PreviousValue uint64 `json:"previous_value,omitempty"`
16906 // NewValue : New team default limit value in bytes. Might be missing due to
16907 // historical data gap.
16908 NewValue uint64 `json:"new_value,omitempty"`
16909 }
16910
16911 // NewMemberSpaceLimitsChangePolicyDetails returns a new MemberSpaceLimitsChangePolicyDetails instance
16912 func NewMemberSpaceLimitsChangePolicyDetails() *MemberSpaceLimitsChangePolicyDetails {
16913 s := new(MemberSpaceLimitsChangePolicyDetails)
16914 return s
16915 }
16916
16917 // MemberSpaceLimitsChangePolicyType : has no documentation (yet)
16918 type MemberSpaceLimitsChangePolicyType struct {
16919 // Description : has no documentation (yet)
16920 Description string `json:"description"`
16921 }
16922
16923 // NewMemberSpaceLimitsChangePolicyType returns a new MemberSpaceLimitsChangePolicyType instance
16924 func NewMemberSpaceLimitsChangePolicyType(Description string) *MemberSpaceLimitsChangePolicyType {
16925 s := new(MemberSpaceLimitsChangePolicyType)
16926 s.Description = Description
16927 return s
16928 }
16929
16930 // MemberSpaceLimitsChangeStatusDetails : Changed space limit status.
16931 type MemberSpaceLimitsChangeStatusDetails struct {
16932 // PreviousValue : Previous storage quota status.
16933 PreviousValue *SpaceLimitsStatus `json:"previous_value"`
16934 // NewValue : New storage quota status.
16935 NewValue *SpaceLimitsStatus `json:"new_value"`
16936 }
16937
16938 // NewMemberSpaceLimitsChangeStatusDetails returns a new MemberSpaceLimitsChangeStatusDetails instance
16939 func NewMemberSpaceLimitsChangeStatusDetails(PreviousValue *SpaceLimitsStatus, NewValue *SpaceLimitsStatus) *MemberSpaceLimitsChangeStatusDetails {
16940 s := new(MemberSpaceLimitsChangeStatusDetails)
16941 s.PreviousValue = PreviousValue
16942 s.NewValue = NewValue
16943 return s
16944 }
16945
16946 // MemberSpaceLimitsChangeStatusType : has no documentation (yet)
16947 type MemberSpaceLimitsChangeStatusType struct {
16948 // Description : has no documentation (yet)
16949 Description string `json:"description"`
16950 }
16951
16952 // NewMemberSpaceLimitsChangeStatusType returns a new MemberSpaceLimitsChangeStatusType instance
16953 func NewMemberSpaceLimitsChangeStatusType(Description string) *MemberSpaceLimitsChangeStatusType {
16954 s := new(MemberSpaceLimitsChangeStatusType)
16955 s.Description = Description
16956 return s
16957 }
16958
16959 // MemberSpaceLimitsRemoveCustomQuotaDetails : Removed custom member space
16960 // limit.
16961 type MemberSpaceLimitsRemoveCustomQuotaDetails struct {
16962 }
16963
16964 // NewMemberSpaceLimitsRemoveCustomQuotaDetails returns a new MemberSpaceLimitsRemoveCustomQuotaDetails instance
16965 func NewMemberSpaceLimitsRemoveCustomQuotaDetails() *MemberSpaceLimitsRemoveCustomQuotaDetails {
16966 s := new(MemberSpaceLimitsRemoveCustomQuotaDetails)
16967 return s
16968 }
16969
16970 // MemberSpaceLimitsRemoveCustomQuotaType : has no documentation (yet)
16971 type MemberSpaceLimitsRemoveCustomQuotaType struct {
16972 // Description : has no documentation (yet)
16973 Description string `json:"description"`
16974 }
16975
16976 // NewMemberSpaceLimitsRemoveCustomQuotaType returns a new MemberSpaceLimitsRemoveCustomQuotaType instance
16977 func NewMemberSpaceLimitsRemoveCustomQuotaType(Description string) *MemberSpaceLimitsRemoveCustomQuotaType {
16978 s := new(MemberSpaceLimitsRemoveCustomQuotaType)
16979 s.Description = Description
16980 return s
16981 }
16982
16983 // MemberSpaceLimitsRemoveExceptionDetails : Removed members from member space
16984 // limit exception list.
16985 type MemberSpaceLimitsRemoveExceptionDetails struct {
16986 }
16987
16988 // NewMemberSpaceLimitsRemoveExceptionDetails returns a new MemberSpaceLimitsRemoveExceptionDetails instance
16989 func NewMemberSpaceLimitsRemoveExceptionDetails() *MemberSpaceLimitsRemoveExceptionDetails {
16990 s := new(MemberSpaceLimitsRemoveExceptionDetails)
16991 return s
16992 }
16993
16994 // MemberSpaceLimitsRemoveExceptionType : has no documentation (yet)
16995 type MemberSpaceLimitsRemoveExceptionType struct {
16996 // Description : has no documentation (yet)
16997 Description string `json:"description"`
16998 }
16999
17000 // NewMemberSpaceLimitsRemoveExceptionType returns a new MemberSpaceLimitsRemoveExceptionType instance
17001 func NewMemberSpaceLimitsRemoveExceptionType(Description string) *MemberSpaceLimitsRemoveExceptionType {
17002 s := new(MemberSpaceLimitsRemoveExceptionType)
17003 s.Description = Description
17004 return s
17005 }
17006
17007 // MemberStatus : has no documentation (yet)
17008 type MemberStatus struct {
17009 dropbox.Tagged
17010 }
17011
17012 // Valid tag values for MemberStatus
17013 const (
17014 MemberStatusActive = "active"
17015 MemberStatusInvited = "invited"
17016 MemberStatusMovedToAnotherTeam = "moved_to_another_team"
17017 MemberStatusNotJoined = "not_joined"
17018 MemberStatusRemoved = "removed"
17019 MemberStatusSuspended = "suspended"
17020 MemberStatusOther = "other"
17021 )
17022
17023 // MemberSuggestDetails : Suggested person to add to team.
17024 type MemberSuggestDetails struct {
17025 // SuggestedMembers : suggested users emails.
17026 SuggestedMembers []string `json:"suggested_members"`
17027 }
17028
17029 // NewMemberSuggestDetails returns a new MemberSuggestDetails instance
17030 func NewMemberSuggestDetails(SuggestedMembers []string) *MemberSuggestDetails {
17031 s := new(MemberSuggestDetails)
17032 s.SuggestedMembers = SuggestedMembers
17033 return s
17034 }
17035
17036 // MemberSuggestType : has no documentation (yet)
17037 type MemberSuggestType struct {
17038 // Description : has no documentation (yet)
17039 Description string `json:"description"`
17040 }
17041
17042 // NewMemberSuggestType returns a new MemberSuggestType instance
17043 func NewMemberSuggestType(Description string) *MemberSuggestType {
17044 s := new(MemberSuggestType)
17045 s.Description = Description
17046 return s
17047 }
17048
17049 // MemberSuggestionsChangePolicyDetails : Enabled/disabled option for team
17050 // members to suggest people to add to team.
17051 type MemberSuggestionsChangePolicyDetails struct {
17052 // NewValue : New team member suggestions policy.
17053 NewValue *MemberSuggestionsPolicy `json:"new_value"`
17054 // PreviousValue : Previous team member suggestions policy. Might be missing
17055 // due to historical data gap.
17056 PreviousValue *MemberSuggestionsPolicy `json:"previous_value,omitempty"`
17057 }
17058
17059 // NewMemberSuggestionsChangePolicyDetails returns a new MemberSuggestionsChangePolicyDetails instance
17060 func NewMemberSuggestionsChangePolicyDetails(NewValue *MemberSuggestionsPolicy) *MemberSuggestionsChangePolicyDetails {
17061 s := new(MemberSuggestionsChangePolicyDetails)
17062 s.NewValue = NewValue
17063 return s
17064 }
17065
17066 // MemberSuggestionsChangePolicyType : has no documentation (yet)
17067 type MemberSuggestionsChangePolicyType struct {
17068 // Description : has no documentation (yet)
17069 Description string `json:"description"`
17070 }
17071
17072 // NewMemberSuggestionsChangePolicyType returns a new MemberSuggestionsChangePolicyType instance
17073 func NewMemberSuggestionsChangePolicyType(Description string) *MemberSuggestionsChangePolicyType {
17074 s := new(MemberSuggestionsChangePolicyType)
17075 s.Description = Description
17076 return s
17077 }
17078
17079 // MemberSuggestionsPolicy : Member suggestions policy
17080 type MemberSuggestionsPolicy struct {
17081 dropbox.Tagged
17082 }
17083
17084 // Valid tag values for MemberSuggestionsPolicy
17085 const (
17086 MemberSuggestionsPolicyDisabled = "disabled"
17087 MemberSuggestionsPolicyEnabled = "enabled"
17088 MemberSuggestionsPolicyOther = "other"
17089 )
17090
17091 // MemberTransferAccountContentsDetails : Transferred contents of deleted member
17092 // account to another member.
17093 type MemberTransferAccountContentsDetails struct {
17094 }
17095
17096 // NewMemberTransferAccountContentsDetails returns a new MemberTransferAccountContentsDetails instance
17097 func NewMemberTransferAccountContentsDetails() *MemberTransferAccountContentsDetails {
17098 s := new(MemberTransferAccountContentsDetails)
17099 return s
17100 }
17101
17102 // MemberTransferAccountContentsType : has no documentation (yet)
17103 type MemberTransferAccountContentsType struct {
17104 // Description : has no documentation (yet)
17105 Description string `json:"description"`
17106 }
17107
17108 // NewMemberTransferAccountContentsType returns a new MemberTransferAccountContentsType instance
17109 func NewMemberTransferAccountContentsType(Description string) *MemberTransferAccountContentsType {
17110 s := new(MemberTransferAccountContentsType)
17111 s.Description = Description
17112 return s
17113 }
17114
17115 // MemberTransferredInternalFields : Internal only - fields for target team
17116 // computations
17117 type MemberTransferredInternalFields struct {
17118 // SourceTeamId : Internal only - team user was moved from.
17119 SourceTeamId string `json:"source_team_id"`
17120 // TargetTeamId : Internal only - team user was moved to.
17121 TargetTeamId string `json:"target_team_id"`
17122 }
17123
17124 // NewMemberTransferredInternalFields returns a new MemberTransferredInternalFields instance
17125 func NewMemberTransferredInternalFields(SourceTeamId string, TargetTeamId string) *MemberTransferredInternalFields {
17126 s := new(MemberTransferredInternalFields)
17127 s.SourceTeamId = SourceTeamId
17128 s.TargetTeamId = TargetTeamId
17129 return s
17130 }
17131
17132 // MicrosoftOfficeAddinChangePolicyDetails : Enabled/disabled Microsoft Office
17133 // add-in.
17134 type MicrosoftOfficeAddinChangePolicyDetails struct {
17135 // NewValue : New Microsoft Office addin policy.
17136 NewValue *MicrosoftOfficeAddinPolicy `json:"new_value"`
17137 // PreviousValue : Previous Microsoft Office addin policy. Might be missing
17138 // due to historical data gap.
17139 PreviousValue *MicrosoftOfficeAddinPolicy `json:"previous_value,omitempty"`
17140 }
17141
17142 // NewMicrosoftOfficeAddinChangePolicyDetails returns a new MicrosoftOfficeAddinChangePolicyDetails instance
17143 func NewMicrosoftOfficeAddinChangePolicyDetails(NewValue *MicrosoftOfficeAddinPolicy) *MicrosoftOfficeAddinChangePolicyDetails {
17144 s := new(MicrosoftOfficeAddinChangePolicyDetails)
17145 s.NewValue = NewValue
17146 return s
17147 }
17148
17149 // MicrosoftOfficeAddinChangePolicyType : has no documentation (yet)
17150 type MicrosoftOfficeAddinChangePolicyType struct {
17151 // Description : has no documentation (yet)
17152 Description string `json:"description"`
17153 }
17154
17155 // NewMicrosoftOfficeAddinChangePolicyType returns a new MicrosoftOfficeAddinChangePolicyType instance
17156 func NewMicrosoftOfficeAddinChangePolicyType(Description string) *MicrosoftOfficeAddinChangePolicyType {
17157 s := new(MicrosoftOfficeAddinChangePolicyType)
17158 s.Description = Description
17159 return s
17160 }
17161
17162 // MicrosoftOfficeAddinPolicy : Microsoft Office addin policy
17163 type MicrosoftOfficeAddinPolicy struct {
17164 dropbox.Tagged
17165 }
17166
17167 // Valid tag values for MicrosoftOfficeAddinPolicy
17168 const (
17169 MicrosoftOfficeAddinPolicyDisabled = "disabled"
17170 MicrosoftOfficeAddinPolicyEnabled = "enabled"
17171 MicrosoftOfficeAddinPolicyOther = "other"
17172 )
17173
17174 // MissingDetails : An indication that an error occurred while retrieving the
17175 // event. Some attributes of the event may be omitted as a result.
17176 type MissingDetails struct {
17177 // SourceEventFields : All the data that could be retrieved and converted
17178 // from the source event.
17179 SourceEventFields string `json:"source_event_fields,omitempty"`
17180 }
17181
17182 // NewMissingDetails returns a new MissingDetails instance
17183 func NewMissingDetails() *MissingDetails {
17184 s := new(MissingDetails)
17185 return s
17186 }
17187
17188 // MobileDeviceSessionLogInfo : Information about linked Dropbox mobile client
17189 // sessions
17190 type MobileDeviceSessionLogInfo struct {
17191 DeviceSessionLogInfo
17192 // SessionInfo : Mobile session unique id.
17193 SessionInfo *MobileSessionLogInfo `json:"session_info,omitempty"`
17194 // DeviceName : The device name.
17195 DeviceName string `json:"device_name"`
17196 // ClientType : The mobile application type.
17197 ClientType *team.MobileClientPlatform `json:"client_type"`
17198 // ClientVersion : The Dropbox client version.
17199 ClientVersion string `json:"client_version,omitempty"`
17200 // OsVersion : The hosting OS version.
17201 OsVersion string `json:"os_version,omitempty"`
17202 // LastCarrier : last carrier used by the device.
17203 LastCarrier string `json:"last_carrier,omitempty"`
17204 }
17205
17206 // NewMobileDeviceSessionLogInfo returns a new MobileDeviceSessionLogInfo instance
17207 func NewMobileDeviceSessionLogInfo(DeviceName string, ClientType *team.MobileClientPlatform) *MobileDeviceSessionLogInfo {
17208 s := new(MobileDeviceSessionLogInfo)
17209 s.DeviceName = DeviceName
17210 s.ClientType = ClientType
17211 return s
17212 }
17213
17214 // MobileSessionLogInfo : Mobile session.
17215 type MobileSessionLogInfo struct {
17216 SessionLogInfo
17217 }
17218
17219 // NewMobileSessionLogInfo returns a new MobileSessionLogInfo instance
17220 func NewMobileSessionLogInfo() *MobileSessionLogInfo {
17221 s := new(MobileSessionLogInfo)
17222 return s
17223 }
17224
17225 // NamespaceRelativePathLogInfo : Namespace relative path details.
17226 type NamespaceRelativePathLogInfo struct {
17227 // NsId : Namespace ID.
17228 NsId string `json:"ns_id,omitempty"`
17229 // RelativePath : A path relative to the specified namespace ID.
17230 RelativePath string `json:"relative_path,omitempty"`
17231 // IsSharedNamespace : True if the namespace is shared.
17232 IsSharedNamespace bool `json:"is_shared_namespace,omitempty"`
17233 }
17234
17235 // NewNamespaceRelativePathLogInfo returns a new NamespaceRelativePathLogInfo instance
17236 func NewNamespaceRelativePathLogInfo() *NamespaceRelativePathLogInfo {
17237 s := new(NamespaceRelativePathLogInfo)
17238 return s
17239 }
17240
17241 // NetworkControlChangePolicyDetails : Enabled/disabled network control.
17242 type NetworkControlChangePolicyDetails struct {
17243 // NewValue : New network control policy.
17244 NewValue *NetworkControlPolicy `json:"new_value"`
17245 // PreviousValue : Previous network control policy. Might be missing due to
17246 // historical data gap.
17247 PreviousValue *NetworkControlPolicy `json:"previous_value,omitempty"`
17248 }
17249
17250 // NewNetworkControlChangePolicyDetails returns a new NetworkControlChangePolicyDetails instance
17251 func NewNetworkControlChangePolicyDetails(NewValue *NetworkControlPolicy) *NetworkControlChangePolicyDetails {
17252 s := new(NetworkControlChangePolicyDetails)
17253 s.NewValue = NewValue
17254 return s
17255 }
17256
17257 // NetworkControlChangePolicyType : has no documentation (yet)
17258 type NetworkControlChangePolicyType struct {
17259 // Description : has no documentation (yet)
17260 Description string `json:"description"`
17261 }
17262
17263 // NewNetworkControlChangePolicyType returns a new NetworkControlChangePolicyType instance
17264 func NewNetworkControlChangePolicyType(Description string) *NetworkControlChangePolicyType {
17265 s := new(NetworkControlChangePolicyType)
17266 s.Description = Description
17267 return s
17268 }
17269
17270 // NetworkControlPolicy : Network control policy
17271 type NetworkControlPolicy struct {
17272 dropbox.Tagged
17273 }
17274
17275 // Valid tag values for NetworkControlPolicy
17276 const (
17277 NetworkControlPolicyDisabled = "disabled"
17278 NetworkControlPolicyEnabled = "enabled"
17279 NetworkControlPolicyOther = "other"
17280 )
17281
17282 // NoExpirationLinkGenCreateReportDetails : Report created: Links created with
17283 // no expiration.
17284 type NoExpirationLinkGenCreateReportDetails struct {
17285 // StartDate : Report start date.
17286 StartDate time.Time `json:"start_date"`
17287 // EndDate : Report end date.
17288 EndDate time.Time `json:"end_date"`
17289 }
17290
17291 // NewNoExpirationLinkGenCreateReportDetails returns a new NoExpirationLinkGenCreateReportDetails instance
17292 func NewNoExpirationLinkGenCreateReportDetails(StartDate time.Time, EndDate time.Time) *NoExpirationLinkGenCreateReportDetails {
17293 s := new(NoExpirationLinkGenCreateReportDetails)
17294 s.StartDate = StartDate
17295 s.EndDate = EndDate
17296 return s
17297 }
17298
17299 // NoExpirationLinkGenCreateReportType : has no documentation (yet)
17300 type NoExpirationLinkGenCreateReportType struct {
17301 // Description : has no documentation (yet)
17302 Description string `json:"description"`
17303 }
17304
17305 // NewNoExpirationLinkGenCreateReportType returns a new NoExpirationLinkGenCreateReportType instance
17306 func NewNoExpirationLinkGenCreateReportType(Description string) *NoExpirationLinkGenCreateReportType {
17307 s := new(NoExpirationLinkGenCreateReportType)
17308 s.Description = Description
17309 return s
17310 }
17311
17312 // NoExpirationLinkGenReportFailedDetails : Couldn't create report: Links
17313 // created with no expiration.
17314 type NoExpirationLinkGenReportFailedDetails struct {
17315 // FailureReason : Failure reason.
17316 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
17317 }
17318
17319 // NewNoExpirationLinkGenReportFailedDetails returns a new NoExpirationLinkGenReportFailedDetails instance
17320 func NewNoExpirationLinkGenReportFailedDetails(FailureReason *team.TeamReportFailureReason) *NoExpirationLinkGenReportFailedDetails {
17321 s := new(NoExpirationLinkGenReportFailedDetails)
17322 s.FailureReason = FailureReason
17323 return s
17324 }
17325
17326 // NoExpirationLinkGenReportFailedType : has no documentation (yet)
17327 type NoExpirationLinkGenReportFailedType struct {
17328 // Description : has no documentation (yet)
17329 Description string `json:"description"`
17330 }
17331
17332 // NewNoExpirationLinkGenReportFailedType returns a new NoExpirationLinkGenReportFailedType instance
17333 func NewNoExpirationLinkGenReportFailedType(Description string) *NoExpirationLinkGenReportFailedType {
17334 s := new(NoExpirationLinkGenReportFailedType)
17335 s.Description = Description
17336 return s
17337 }
17338
17339 // NoPasswordLinkGenCreateReportDetails : Report created: Links created without
17340 // passwords.
17341 type NoPasswordLinkGenCreateReportDetails struct {
17342 // StartDate : Report start date.
17343 StartDate time.Time `json:"start_date"`
17344 // EndDate : Report end date.
17345 EndDate time.Time `json:"end_date"`
17346 }
17347
17348 // NewNoPasswordLinkGenCreateReportDetails returns a new NoPasswordLinkGenCreateReportDetails instance
17349 func NewNoPasswordLinkGenCreateReportDetails(StartDate time.Time, EndDate time.Time) *NoPasswordLinkGenCreateReportDetails {
17350 s := new(NoPasswordLinkGenCreateReportDetails)
17351 s.StartDate = StartDate
17352 s.EndDate = EndDate
17353 return s
17354 }
17355
17356 // NoPasswordLinkGenCreateReportType : has no documentation (yet)
17357 type NoPasswordLinkGenCreateReportType struct {
17358 // Description : has no documentation (yet)
17359 Description string `json:"description"`
17360 }
17361
17362 // NewNoPasswordLinkGenCreateReportType returns a new NoPasswordLinkGenCreateReportType instance
17363 func NewNoPasswordLinkGenCreateReportType(Description string) *NoPasswordLinkGenCreateReportType {
17364 s := new(NoPasswordLinkGenCreateReportType)
17365 s.Description = Description
17366 return s
17367 }
17368
17369 // NoPasswordLinkGenReportFailedDetails : Couldn't create report: Links created
17370 // without passwords.
17371 type NoPasswordLinkGenReportFailedDetails struct {
17372 // FailureReason : Failure reason.
17373 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
17374 }
17375
17376 // NewNoPasswordLinkGenReportFailedDetails returns a new NoPasswordLinkGenReportFailedDetails instance
17377 func NewNoPasswordLinkGenReportFailedDetails(FailureReason *team.TeamReportFailureReason) *NoPasswordLinkGenReportFailedDetails {
17378 s := new(NoPasswordLinkGenReportFailedDetails)
17379 s.FailureReason = FailureReason
17380 return s
17381 }
17382
17383 // NoPasswordLinkGenReportFailedType : has no documentation (yet)
17384 type NoPasswordLinkGenReportFailedType struct {
17385 // Description : has no documentation (yet)
17386 Description string `json:"description"`
17387 }
17388
17389 // NewNoPasswordLinkGenReportFailedType returns a new NoPasswordLinkGenReportFailedType instance
17390 func NewNoPasswordLinkGenReportFailedType(Description string) *NoPasswordLinkGenReportFailedType {
17391 s := new(NoPasswordLinkGenReportFailedType)
17392 s.Description = Description
17393 return s
17394 }
17395
17396 // NoPasswordLinkViewCreateReportDetails : Report created: Views of links
17397 // without passwords.
17398 type NoPasswordLinkViewCreateReportDetails struct {
17399 // StartDate : Report start date.
17400 StartDate time.Time `json:"start_date"`
17401 // EndDate : Report end date.
17402 EndDate time.Time `json:"end_date"`
17403 }
17404
17405 // NewNoPasswordLinkViewCreateReportDetails returns a new NoPasswordLinkViewCreateReportDetails instance
17406 func NewNoPasswordLinkViewCreateReportDetails(StartDate time.Time, EndDate time.Time) *NoPasswordLinkViewCreateReportDetails {
17407 s := new(NoPasswordLinkViewCreateReportDetails)
17408 s.StartDate = StartDate
17409 s.EndDate = EndDate
17410 return s
17411 }
17412
17413 // NoPasswordLinkViewCreateReportType : has no documentation (yet)
17414 type NoPasswordLinkViewCreateReportType struct {
17415 // Description : has no documentation (yet)
17416 Description string `json:"description"`
17417 }
17418
17419 // NewNoPasswordLinkViewCreateReportType returns a new NoPasswordLinkViewCreateReportType instance
17420 func NewNoPasswordLinkViewCreateReportType(Description string) *NoPasswordLinkViewCreateReportType {
17421 s := new(NoPasswordLinkViewCreateReportType)
17422 s.Description = Description
17423 return s
17424 }
17425
17426 // NoPasswordLinkViewReportFailedDetails : Couldn't create report: Views of
17427 // links without passwords.
17428 type NoPasswordLinkViewReportFailedDetails struct {
17429 // FailureReason : Failure reason.
17430 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
17431 }
17432
17433 // NewNoPasswordLinkViewReportFailedDetails returns a new NoPasswordLinkViewReportFailedDetails instance
17434 func NewNoPasswordLinkViewReportFailedDetails(FailureReason *team.TeamReportFailureReason) *NoPasswordLinkViewReportFailedDetails {
17435 s := new(NoPasswordLinkViewReportFailedDetails)
17436 s.FailureReason = FailureReason
17437 return s
17438 }
17439
17440 // NoPasswordLinkViewReportFailedType : has no documentation (yet)
17441 type NoPasswordLinkViewReportFailedType struct {
17442 // Description : has no documentation (yet)
17443 Description string `json:"description"`
17444 }
17445
17446 // NewNoPasswordLinkViewReportFailedType returns a new NoPasswordLinkViewReportFailedType instance
17447 func NewNoPasswordLinkViewReportFailedType(Description string) *NoPasswordLinkViewReportFailedType {
17448 s := new(NoPasswordLinkViewReportFailedType)
17449 s.Description = Description
17450 return s
17451 }
17452
17453 // UserLogInfo : User's logged information.
17454 type UserLogInfo struct {
17455 // AccountId : User unique ID.
17456 AccountId string `json:"account_id,omitempty"`
17457 // DisplayName : User display name.
17458 DisplayName string `json:"display_name,omitempty"`
17459 // Email : User email address.
17460 Email string `json:"email,omitempty"`
17461 }
17462
17463 // NewUserLogInfo returns a new UserLogInfo instance
17464 func NewUserLogInfo() *UserLogInfo {
17465 s := new(UserLogInfo)
17466 return s
17467 }
17468
17469 // IsUserLogInfo is the interface type for UserLogInfo and its subtypes
17470 type IsUserLogInfo interface {
17471 IsUserLogInfo()
17472 }
17473
17474 // IsUserLogInfo implements the IsUserLogInfo interface
17475 func (u *UserLogInfo) IsUserLogInfo() {}
17476
17477 type userLogInfoUnion struct {
17478 dropbox.Tagged
17479 // TeamMember : has no documentation (yet)
17480 TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"`
17481 // TrustedNonTeamMember : has no documentation (yet)
17482 TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"`
17483 // NonTeamMember : has no documentation (yet)
17484 NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"`
17485 }
17486
17487 // Valid tag values for UserLogInfo
17488 const (
17489 UserLogInfoTeamMember = "team_member"
17490 UserLogInfoTrustedNonTeamMember = "trusted_non_team_member"
17491 UserLogInfoNonTeamMember = "non_team_member"
17492 )
17493
17494 // UnmarshalJSON deserializes into a userLogInfoUnion instance
17495 func (u *userLogInfoUnion) UnmarshalJSON(body []byte) error {
17496 type wrap struct {
17497 dropbox.Tagged
17498 }
17499 var w wrap
17500 var err error
17501 if err = json.Unmarshal(body, &w); err != nil {
17502 return err
17503 }
17504 u.Tag = w.Tag
17505 switch u.Tag {
17506 case "team_member":
17507 err = json.Unmarshal(body, &u.TeamMember)
17508
17509 if err != nil {
17510 return err
17511 }
17512 case "trusted_non_team_member":
17513 err = json.Unmarshal(body, &u.TrustedNonTeamMember)
17514
17515 if err != nil {
17516 return err
17517 }
17518 case "non_team_member":
17519 err = json.Unmarshal(body, &u.NonTeamMember)
17520
17521 if err != nil {
17522 return err
17523 }
17524 }
17525 return nil
17526 }
17527
17528 // IsUserLogInfoFromJSON converts JSON to a concrete IsUserLogInfo instance
17529 func IsUserLogInfoFromJSON(data []byte) (IsUserLogInfo, error) {
17530 var t userLogInfoUnion
17531 if err := json.Unmarshal(data, &t); err != nil {
17532 return nil, err
17533 }
17534 switch t.Tag {
17535 case "team_member":
17536 return t.TeamMember, nil
17537
17538 case "trusted_non_team_member":
17539 return t.TrustedNonTeamMember, nil
17540
17541 case "non_team_member":
17542 return t.NonTeamMember, nil
17543
17544 }
17545 return nil, nil
17546 }
17547
17548 // NonTeamMemberLogInfo : Non team member's logged information.
17549 type NonTeamMemberLogInfo struct {
17550 UserLogInfo
17551 }
17552
17553 // NewNonTeamMemberLogInfo returns a new NonTeamMemberLogInfo instance
17554 func NewNonTeamMemberLogInfo() *NonTeamMemberLogInfo {
17555 s := new(NonTeamMemberLogInfo)
17556 return s
17557 }
17558
17559 // NonTrustedTeamDetails : The email to which the request was sent
17560 type NonTrustedTeamDetails struct {
17561 // Team : The email to which the request was sent.
17562 Team string `json:"team"`
17563 }
17564
17565 // NewNonTrustedTeamDetails returns a new NonTrustedTeamDetails instance
17566 func NewNonTrustedTeamDetails(Team string) *NonTrustedTeamDetails {
17567 s := new(NonTrustedTeamDetails)
17568 s.Team = Team
17569 return s
17570 }
17571
17572 // NoteAclInviteOnlyDetails : Changed Paper doc to invite-only.
17573 type NoteAclInviteOnlyDetails struct {
17574 }
17575
17576 // NewNoteAclInviteOnlyDetails returns a new NoteAclInviteOnlyDetails instance
17577 func NewNoteAclInviteOnlyDetails() *NoteAclInviteOnlyDetails {
17578 s := new(NoteAclInviteOnlyDetails)
17579 return s
17580 }
17581
17582 // NoteAclInviteOnlyType : has no documentation (yet)
17583 type NoteAclInviteOnlyType struct {
17584 // Description : has no documentation (yet)
17585 Description string `json:"description"`
17586 }
17587
17588 // NewNoteAclInviteOnlyType returns a new NoteAclInviteOnlyType instance
17589 func NewNoteAclInviteOnlyType(Description string) *NoteAclInviteOnlyType {
17590 s := new(NoteAclInviteOnlyType)
17591 s.Description = Description
17592 return s
17593 }
17594
17595 // NoteAclLinkDetails : Changed Paper doc to link-accessible.
17596 type NoteAclLinkDetails struct {
17597 }
17598
17599 // NewNoteAclLinkDetails returns a new NoteAclLinkDetails instance
17600 func NewNoteAclLinkDetails() *NoteAclLinkDetails {
17601 s := new(NoteAclLinkDetails)
17602 return s
17603 }
17604
17605 // NoteAclLinkType : has no documentation (yet)
17606 type NoteAclLinkType struct {
17607 // Description : has no documentation (yet)
17608 Description string `json:"description"`
17609 }
17610
17611 // NewNoteAclLinkType returns a new NoteAclLinkType instance
17612 func NewNoteAclLinkType(Description string) *NoteAclLinkType {
17613 s := new(NoteAclLinkType)
17614 s.Description = Description
17615 return s
17616 }
17617
17618 // NoteAclTeamLinkDetails : Changed Paper doc to link-accessible for team.
17619 type NoteAclTeamLinkDetails struct {
17620 }
17621
17622 // NewNoteAclTeamLinkDetails returns a new NoteAclTeamLinkDetails instance
17623 func NewNoteAclTeamLinkDetails() *NoteAclTeamLinkDetails {
17624 s := new(NoteAclTeamLinkDetails)
17625 return s
17626 }
17627
17628 // NoteAclTeamLinkType : has no documentation (yet)
17629 type NoteAclTeamLinkType struct {
17630 // Description : has no documentation (yet)
17631 Description string `json:"description"`
17632 }
17633
17634 // NewNoteAclTeamLinkType returns a new NoteAclTeamLinkType instance
17635 func NewNoteAclTeamLinkType(Description string) *NoteAclTeamLinkType {
17636 s := new(NoteAclTeamLinkType)
17637 s.Description = Description
17638 return s
17639 }
17640
17641 // NoteShareReceiveDetails : Shared received Paper doc.
17642 type NoteShareReceiveDetails struct {
17643 }
17644
17645 // NewNoteShareReceiveDetails returns a new NoteShareReceiveDetails instance
17646 func NewNoteShareReceiveDetails() *NoteShareReceiveDetails {
17647 s := new(NoteShareReceiveDetails)
17648 return s
17649 }
17650
17651 // NoteShareReceiveType : has no documentation (yet)
17652 type NoteShareReceiveType struct {
17653 // Description : has no documentation (yet)
17654 Description string `json:"description"`
17655 }
17656
17657 // NewNoteShareReceiveType returns a new NoteShareReceiveType instance
17658 func NewNoteShareReceiveType(Description string) *NoteShareReceiveType {
17659 s := new(NoteShareReceiveType)
17660 s.Description = Description
17661 return s
17662 }
17663
17664 // NoteSharedDetails : Shared Paper doc.
17665 type NoteSharedDetails struct {
17666 }
17667
17668 // NewNoteSharedDetails returns a new NoteSharedDetails instance
17669 func NewNoteSharedDetails() *NoteSharedDetails {
17670 s := new(NoteSharedDetails)
17671 return s
17672 }
17673
17674 // NoteSharedType : has no documentation (yet)
17675 type NoteSharedType struct {
17676 // Description : has no documentation (yet)
17677 Description string `json:"description"`
17678 }
17679
17680 // NewNoteSharedType returns a new NoteSharedType instance
17681 func NewNoteSharedType(Description string) *NoteSharedType {
17682 s := new(NoteSharedType)
17683 s.Description = Description
17684 return s
17685 }
17686
17687 // ObjectLabelAddedDetails : Added a label.
17688 type ObjectLabelAddedDetails struct {
17689 // LabelType : Labels mark a file or folder.
17690 LabelType *LabelType `json:"label_type"`
17691 }
17692
17693 // NewObjectLabelAddedDetails returns a new ObjectLabelAddedDetails instance
17694 func NewObjectLabelAddedDetails(LabelType *LabelType) *ObjectLabelAddedDetails {
17695 s := new(ObjectLabelAddedDetails)
17696 s.LabelType = LabelType
17697 return s
17698 }
17699
17700 // ObjectLabelAddedType : has no documentation (yet)
17701 type ObjectLabelAddedType struct {
17702 // Description : has no documentation (yet)
17703 Description string `json:"description"`
17704 }
17705
17706 // NewObjectLabelAddedType returns a new ObjectLabelAddedType instance
17707 func NewObjectLabelAddedType(Description string) *ObjectLabelAddedType {
17708 s := new(ObjectLabelAddedType)
17709 s.Description = Description
17710 return s
17711 }
17712
17713 // ObjectLabelRemovedDetails : Removed a label.
17714 type ObjectLabelRemovedDetails struct {
17715 // LabelType : Labels mark a file or folder.
17716 LabelType *LabelType `json:"label_type"`
17717 }
17718
17719 // NewObjectLabelRemovedDetails returns a new ObjectLabelRemovedDetails instance
17720 func NewObjectLabelRemovedDetails(LabelType *LabelType) *ObjectLabelRemovedDetails {
17721 s := new(ObjectLabelRemovedDetails)
17722 s.LabelType = LabelType
17723 return s
17724 }
17725
17726 // ObjectLabelRemovedType : has no documentation (yet)
17727 type ObjectLabelRemovedType struct {
17728 // Description : has no documentation (yet)
17729 Description string `json:"description"`
17730 }
17731
17732 // NewObjectLabelRemovedType returns a new ObjectLabelRemovedType instance
17733 func NewObjectLabelRemovedType(Description string) *ObjectLabelRemovedType {
17734 s := new(ObjectLabelRemovedType)
17735 s.Description = Description
17736 return s
17737 }
17738
17739 // ObjectLabelUpdatedValueDetails : Updated a label's value.
17740 type ObjectLabelUpdatedValueDetails struct {
17741 // LabelType : Labels mark a file or folder.
17742 LabelType *LabelType `json:"label_type"`
17743 }
17744
17745 // NewObjectLabelUpdatedValueDetails returns a new ObjectLabelUpdatedValueDetails instance
17746 func NewObjectLabelUpdatedValueDetails(LabelType *LabelType) *ObjectLabelUpdatedValueDetails {
17747 s := new(ObjectLabelUpdatedValueDetails)
17748 s.LabelType = LabelType
17749 return s
17750 }
17751
17752 // ObjectLabelUpdatedValueType : has no documentation (yet)
17753 type ObjectLabelUpdatedValueType struct {
17754 // Description : has no documentation (yet)
17755 Description string `json:"description"`
17756 }
17757
17758 // NewObjectLabelUpdatedValueType returns a new ObjectLabelUpdatedValueType instance
17759 func NewObjectLabelUpdatedValueType(Description string) *ObjectLabelUpdatedValueType {
17760 s := new(ObjectLabelUpdatedValueType)
17761 s.Description = Description
17762 return s
17763 }
17764
17765 // OpenNoteSharedDetails : Opened shared Paper doc.
17766 type OpenNoteSharedDetails struct {
17767 }
17768
17769 // NewOpenNoteSharedDetails returns a new OpenNoteSharedDetails instance
17770 func NewOpenNoteSharedDetails() *OpenNoteSharedDetails {
17771 s := new(OpenNoteSharedDetails)
17772 return s
17773 }
17774
17775 // OpenNoteSharedType : has no documentation (yet)
17776 type OpenNoteSharedType struct {
17777 // Description : has no documentation (yet)
17778 Description string `json:"description"`
17779 }
17780
17781 // NewOpenNoteSharedType returns a new OpenNoteSharedType instance
17782 func NewOpenNoteSharedType(Description string) *OpenNoteSharedType {
17783 s := new(OpenNoteSharedType)
17784 s.Description = Description
17785 return s
17786 }
17787
17788 // OrganizationDetails : More details about the organization.
17789 type OrganizationDetails struct {
17790 // Organization : The name of the organization.
17791 Organization string `json:"organization"`
17792 }
17793
17794 // NewOrganizationDetails returns a new OrganizationDetails instance
17795 func NewOrganizationDetails(Organization string) *OrganizationDetails {
17796 s := new(OrganizationDetails)
17797 s.Organization = Organization
17798 return s
17799 }
17800
17801 // OrganizationName : The name of the organization
17802 type OrganizationName struct {
17803 // Organization : The name of the organization.
17804 Organization string `json:"organization"`
17805 }
17806
17807 // NewOrganizationName returns a new OrganizationName instance
17808 func NewOrganizationName(Organization string) *OrganizationName {
17809 s := new(OrganizationName)
17810 s.Organization = Organization
17811 return s
17812 }
17813
17814 // OrganizeFolderWithTidyDetails : Organized a folder with the Tidy Up action.
17815 type OrganizeFolderWithTidyDetails struct {
17816 }
17817
17818 // NewOrganizeFolderWithTidyDetails returns a new OrganizeFolderWithTidyDetails instance
17819 func NewOrganizeFolderWithTidyDetails() *OrganizeFolderWithTidyDetails {
17820 s := new(OrganizeFolderWithTidyDetails)
17821 return s
17822 }
17823
17824 // OrganizeFolderWithTidyType : has no documentation (yet)
17825 type OrganizeFolderWithTidyType struct {
17826 // Description : has no documentation (yet)
17827 Description string `json:"description"`
17828 }
17829
17830 // NewOrganizeFolderWithTidyType returns a new OrganizeFolderWithTidyType instance
17831 func NewOrganizeFolderWithTidyType(Description string) *OrganizeFolderWithTidyType {
17832 s := new(OrganizeFolderWithTidyType)
17833 s.Description = Description
17834 return s
17835 }
17836
17837 // OriginLogInfo : The origin from which the actor performed the action.
17838 type OriginLogInfo struct {
17839 // GeoLocation : Geographic location details.
17840 GeoLocation *GeoLocationLogInfo `json:"geo_location,omitempty"`
17841 // AccessMethod : The method that was used to perform the action.
17842 AccessMethod *AccessMethodLogInfo `json:"access_method"`
17843 }
17844
17845 // NewOriginLogInfo returns a new OriginLogInfo instance
17846 func NewOriginLogInfo(AccessMethod *AccessMethodLogInfo) *OriginLogInfo {
17847 s := new(OriginLogInfo)
17848 s.AccessMethod = AccessMethod
17849 return s
17850 }
17851
17852 // OutdatedLinkViewCreateReportDetails : Report created: Views of old links.
17853 type OutdatedLinkViewCreateReportDetails struct {
17854 // StartDate : Report start date.
17855 StartDate time.Time `json:"start_date"`
17856 // EndDate : Report end date.
17857 EndDate time.Time `json:"end_date"`
17858 }
17859
17860 // NewOutdatedLinkViewCreateReportDetails returns a new OutdatedLinkViewCreateReportDetails instance
17861 func NewOutdatedLinkViewCreateReportDetails(StartDate time.Time, EndDate time.Time) *OutdatedLinkViewCreateReportDetails {
17862 s := new(OutdatedLinkViewCreateReportDetails)
17863 s.StartDate = StartDate
17864 s.EndDate = EndDate
17865 return s
17866 }
17867
17868 // OutdatedLinkViewCreateReportType : has no documentation (yet)
17869 type OutdatedLinkViewCreateReportType struct {
17870 // Description : has no documentation (yet)
17871 Description string `json:"description"`
17872 }
17873
17874 // NewOutdatedLinkViewCreateReportType returns a new OutdatedLinkViewCreateReportType instance
17875 func NewOutdatedLinkViewCreateReportType(Description string) *OutdatedLinkViewCreateReportType {
17876 s := new(OutdatedLinkViewCreateReportType)
17877 s.Description = Description
17878 return s
17879 }
17880
17881 // OutdatedLinkViewReportFailedDetails : Couldn't create report: Views of old
17882 // links.
17883 type OutdatedLinkViewReportFailedDetails struct {
17884 // FailureReason : Failure reason.
17885 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
17886 }
17887
17888 // NewOutdatedLinkViewReportFailedDetails returns a new OutdatedLinkViewReportFailedDetails instance
17889 func NewOutdatedLinkViewReportFailedDetails(FailureReason *team.TeamReportFailureReason) *OutdatedLinkViewReportFailedDetails {
17890 s := new(OutdatedLinkViewReportFailedDetails)
17891 s.FailureReason = FailureReason
17892 return s
17893 }
17894
17895 // OutdatedLinkViewReportFailedType : has no documentation (yet)
17896 type OutdatedLinkViewReportFailedType struct {
17897 // Description : has no documentation (yet)
17898 Description string `json:"description"`
17899 }
17900
17901 // NewOutdatedLinkViewReportFailedType returns a new OutdatedLinkViewReportFailedType instance
17902 func NewOutdatedLinkViewReportFailedType(Description string) *OutdatedLinkViewReportFailedType {
17903 s := new(OutdatedLinkViewReportFailedType)
17904 s.Description = Description
17905 return s
17906 }
17907
17908 // PaperAccessType : has no documentation (yet)
17909 type PaperAccessType struct {
17910 dropbox.Tagged
17911 }
17912
17913 // Valid tag values for PaperAccessType
17914 const (
17915 PaperAccessTypeCommenter = "commenter"
17916 PaperAccessTypeEditor = "editor"
17917 PaperAccessTypeViewer = "viewer"
17918 PaperAccessTypeOther = "other"
17919 )
17920
17921 // PaperAdminExportStartDetails : Exported all team Paper docs.
17922 type PaperAdminExportStartDetails struct {
17923 }
17924
17925 // NewPaperAdminExportStartDetails returns a new PaperAdminExportStartDetails instance
17926 func NewPaperAdminExportStartDetails() *PaperAdminExportStartDetails {
17927 s := new(PaperAdminExportStartDetails)
17928 return s
17929 }
17930
17931 // PaperAdminExportStartType : has no documentation (yet)
17932 type PaperAdminExportStartType struct {
17933 // Description : has no documentation (yet)
17934 Description string `json:"description"`
17935 }
17936
17937 // NewPaperAdminExportStartType returns a new PaperAdminExportStartType instance
17938 func NewPaperAdminExportStartType(Description string) *PaperAdminExportStartType {
17939 s := new(PaperAdminExportStartType)
17940 s.Description = Description
17941 return s
17942 }
17943
17944 // PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when
17945 // enabled, is deployed to all members or to specific members.
17946 type PaperChangeDeploymentPolicyDetails struct {
17947 // NewValue : New Dropbox Paper deployment policy.
17948 NewValue *team_policies.PaperDeploymentPolicy `json:"new_value"`
17949 // PreviousValue : Previous Dropbox Paper deployment policy. Might be
17950 // missing due to historical data gap.
17951 PreviousValue *team_policies.PaperDeploymentPolicy `json:"previous_value,omitempty"`
17952 }
17953
17954 // NewPaperChangeDeploymentPolicyDetails returns a new PaperChangeDeploymentPolicyDetails instance
17955 func NewPaperChangeDeploymentPolicyDetails(NewValue *team_policies.PaperDeploymentPolicy) *PaperChangeDeploymentPolicyDetails {
17956 s := new(PaperChangeDeploymentPolicyDetails)
17957 s.NewValue = NewValue
17958 return s
17959 }
17960
17961 // PaperChangeDeploymentPolicyType : has no documentation (yet)
17962 type PaperChangeDeploymentPolicyType struct {
17963 // Description : has no documentation (yet)
17964 Description string `json:"description"`
17965 }
17966
17967 // NewPaperChangeDeploymentPolicyType returns a new PaperChangeDeploymentPolicyType instance
17968 func NewPaperChangeDeploymentPolicyType(Description string) *PaperChangeDeploymentPolicyType {
17969 s := new(PaperChangeDeploymentPolicyType)
17970 s.Description = Description
17971 return s
17972 }
17973
17974 // PaperChangeMemberLinkPolicyDetails : Changed whether non-members can view
17975 // Paper docs with link.
17976 type PaperChangeMemberLinkPolicyDetails struct {
17977 // NewValue : New paper external link accessibility policy.
17978 NewValue *PaperMemberPolicy `json:"new_value"`
17979 }
17980
17981 // NewPaperChangeMemberLinkPolicyDetails returns a new PaperChangeMemberLinkPolicyDetails instance
17982 func NewPaperChangeMemberLinkPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberLinkPolicyDetails {
17983 s := new(PaperChangeMemberLinkPolicyDetails)
17984 s.NewValue = NewValue
17985 return s
17986 }
17987
17988 // PaperChangeMemberLinkPolicyType : has no documentation (yet)
17989 type PaperChangeMemberLinkPolicyType struct {
17990 // Description : has no documentation (yet)
17991 Description string `json:"description"`
17992 }
17993
17994 // NewPaperChangeMemberLinkPolicyType returns a new PaperChangeMemberLinkPolicyType instance
17995 func NewPaperChangeMemberLinkPolicyType(Description string) *PaperChangeMemberLinkPolicyType {
17996 s := new(PaperChangeMemberLinkPolicyType)
17997 s.Description = Description
17998 return s
17999 }
18000
18001 // PaperChangeMemberPolicyDetails : Changed whether members can share Paper docs
18002 // outside team, and if docs are accessible only by team members or anyone by
18003 // default.
18004 type PaperChangeMemberPolicyDetails struct {
18005 // NewValue : New paper external accessibility policy.
18006 NewValue *PaperMemberPolicy `json:"new_value"`
18007 // PreviousValue : Previous paper external accessibility policy. Might be
18008 // missing due to historical data gap.
18009 PreviousValue *PaperMemberPolicy `json:"previous_value,omitempty"`
18010 }
18011
18012 // NewPaperChangeMemberPolicyDetails returns a new PaperChangeMemberPolicyDetails instance
18013 func NewPaperChangeMemberPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberPolicyDetails {
18014 s := new(PaperChangeMemberPolicyDetails)
18015 s.NewValue = NewValue
18016 return s
18017 }
18018
18019 // PaperChangeMemberPolicyType : has no documentation (yet)
18020 type PaperChangeMemberPolicyType struct {
18021 // Description : has no documentation (yet)
18022 Description string `json:"description"`
18023 }
18024
18025 // NewPaperChangeMemberPolicyType returns a new PaperChangeMemberPolicyType instance
18026 func NewPaperChangeMemberPolicyType(Description string) *PaperChangeMemberPolicyType {
18027 s := new(PaperChangeMemberPolicyType)
18028 s.Description = Description
18029 return s
18030 }
18031
18032 // PaperChangePolicyDetails : Enabled/disabled Dropbox Paper for team.
18033 type PaperChangePolicyDetails struct {
18034 // NewValue : New Dropbox Paper policy.
18035 NewValue *team_policies.PaperEnabledPolicy `json:"new_value"`
18036 // PreviousValue : Previous Dropbox Paper policy. Might be missing due to
18037 // historical data gap.
18038 PreviousValue *team_policies.PaperEnabledPolicy `json:"previous_value,omitempty"`
18039 }
18040
18041 // NewPaperChangePolicyDetails returns a new PaperChangePolicyDetails instance
18042 func NewPaperChangePolicyDetails(NewValue *team_policies.PaperEnabledPolicy) *PaperChangePolicyDetails {
18043 s := new(PaperChangePolicyDetails)
18044 s.NewValue = NewValue
18045 return s
18046 }
18047
18048 // PaperChangePolicyType : has no documentation (yet)
18049 type PaperChangePolicyType struct {
18050 // Description : has no documentation (yet)
18051 Description string `json:"description"`
18052 }
18053
18054 // NewPaperChangePolicyType returns a new PaperChangePolicyType instance
18055 func NewPaperChangePolicyType(Description string) *PaperChangePolicyType {
18056 s := new(PaperChangePolicyType)
18057 s.Description = Description
18058 return s
18059 }
18060
18061 // PaperContentAddMemberDetails : Added users and/or groups to Paper doc/folder.
18062 type PaperContentAddMemberDetails struct {
18063 // EventUuid : Event unique identifier.
18064 EventUuid string `json:"event_uuid"`
18065 }
18066
18067 // NewPaperContentAddMemberDetails returns a new PaperContentAddMemberDetails instance
18068 func NewPaperContentAddMemberDetails(EventUuid string) *PaperContentAddMemberDetails {
18069 s := new(PaperContentAddMemberDetails)
18070 s.EventUuid = EventUuid
18071 return s
18072 }
18073
18074 // PaperContentAddMemberType : has no documentation (yet)
18075 type PaperContentAddMemberType struct {
18076 // Description : has no documentation (yet)
18077 Description string `json:"description"`
18078 }
18079
18080 // NewPaperContentAddMemberType returns a new PaperContentAddMemberType instance
18081 func NewPaperContentAddMemberType(Description string) *PaperContentAddMemberType {
18082 s := new(PaperContentAddMemberType)
18083 s.Description = Description
18084 return s
18085 }
18086
18087 // PaperContentAddToFolderDetails : Added Paper doc/folder to folder.
18088 type PaperContentAddToFolderDetails struct {
18089 // EventUuid : Event unique identifier.
18090 EventUuid string `json:"event_uuid"`
18091 // TargetAssetIndex : Target asset position in the Assets list.
18092 TargetAssetIndex uint64 `json:"target_asset_index"`
18093 // ParentAssetIndex : Parent asset position in the Assets list.
18094 ParentAssetIndex uint64 `json:"parent_asset_index"`
18095 }
18096
18097 // NewPaperContentAddToFolderDetails returns a new PaperContentAddToFolderDetails instance
18098 func NewPaperContentAddToFolderDetails(EventUuid string, TargetAssetIndex uint64, ParentAssetIndex uint64) *PaperContentAddToFolderDetails {
18099 s := new(PaperContentAddToFolderDetails)
18100 s.EventUuid = EventUuid
18101 s.TargetAssetIndex = TargetAssetIndex
18102 s.ParentAssetIndex = ParentAssetIndex
18103 return s
18104 }
18105
18106 // PaperContentAddToFolderType : has no documentation (yet)
18107 type PaperContentAddToFolderType struct {
18108 // Description : has no documentation (yet)
18109 Description string `json:"description"`
18110 }
18111
18112 // NewPaperContentAddToFolderType returns a new PaperContentAddToFolderType instance
18113 func NewPaperContentAddToFolderType(Description string) *PaperContentAddToFolderType {
18114 s := new(PaperContentAddToFolderType)
18115 s.Description = Description
18116 return s
18117 }
18118
18119 // PaperContentArchiveDetails : Archived Paper doc/folder.
18120 type PaperContentArchiveDetails struct {
18121 // EventUuid : Event unique identifier.
18122 EventUuid string `json:"event_uuid"`
18123 }
18124
18125 // NewPaperContentArchiveDetails returns a new PaperContentArchiveDetails instance
18126 func NewPaperContentArchiveDetails(EventUuid string) *PaperContentArchiveDetails {
18127 s := new(PaperContentArchiveDetails)
18128 s.EventUuid = EventUuid
18129 return s
18130 }
18131
18132 // PaperContentArchiveType : has no documentation (yet)
18133 type PaperContentArchiveType struct {
18134 // Description : has no documentation (yet)
18135 Description string `json:"description"`
18136 }
18137
18138 // NewPaperContentArchiveType returns a new PaperContentArchiveType instance
18139 func NewPaperContentArchiveType(Description string) *PaperContentArchiveType {
18140 s := new(PaperContentArchiveType)
18141 s.Description = Description
18142 return s
18143 }
18144
18145 // PaperContentCreateDetails : Created Paper doc/folder.
18146 type PaperContentCreateDetails struct {
18147 // EventUuid : Event unique identifier.
18148 EventUuid string `json:"event_uuid"`
18149 }
18150
18151 // NewPaperContentCreateDetails returns a new PaperContentCreateDetails instance
18152 func NewPaperContentCreateDetails(EventUuid string) *PaperContentCreateDetails {
18153 s := new(PaperContentCreateDetails)
18154 s.EventUuid = EventUuid
18155 return s
18156 }
18157
18158 // PaperContentCreateType : has no documentation (yet)
18159 type PaperContentCreateType struct {
18160 // Description : has no documentation (yet)
18161 Description string `json:"description"`
18162 }
18163
18164 // NewPaperContentCreateType returns a new PaperContentCreateType instance
18165 func NewPaperContentCreateType(Description string) *PaperContentCreateType {
18166 s := new(PaperContentCreateType)
18167 s.Description = Description
18168 return s
18169 }
18170
18171 // PaperContentPermanentlyDeleteDetails : Permanently deleted Paper doc/folder.
18172 type PaperContentPermanentlyDeleteDetails struct {
18173 // EventUuid : Event unique identifier.
18174 EventUuid string `json:"event_uuid"`
18175 }
18176
18177 // NewPaperContentPermanentlyDeleteDetails returns a new PaperContentPermanentlyDeleteDetails instance
18178 func NewPaperContentPermanentlyDeleteDetails(EventUuid string) *PaperContentPermanentlyDeleteDetails {
18179 s := new(PaperContentPermanentlyDeleteDetails)
18180 s.EventUuid = EventUuid
18181 return s
18182 }
18183
18184 // PaperContentPermanentlyDeleteType : has no documentation (yet)
18185 type PaperContentPermanentlyDeleteType struct {
18186 // Description : has no documentation (yet)
18187 Description string `json:"description"`
18188 }
18189
18190 // NewPaperContentPermanentlyDeleteType returns a new PaperContentPermanentlyDeleteType instance
18191 func NewPaperContentPermanentlyDeleteType(Description string) *PaperContentPermanentlyDeleteType {
18192 s := new(PaperContentPermanentlyDeleteType)
18193 s.Description = Description
18194 return s
18195 }
18196
18197 // PaperContentRemoveFromFolderDetails : Removed Paper doc/folder from folder.
18198 type PaperContentRemoveFromFolderDetails struct {
18199 // EventUuid : Event unique identifier.
18200 EventUuid string `json:"event_uuid"`
18201 // TargetAssetIndex : Target asset position in the Assets list.
18202 TargetAssetIndex uint64 `json:"target_asset_index,omitempty"`
18203 // ParentAssetIndex : Parent asset position in the Assets list.
18204 ParentAssetIndex uint64 `json:"parent_asset_index,omitempty"`
18205 }
18206
18207 // NewPaperContentRemoveFromFolderDetails returns a new PaperContentRemoveFromFolderDetails instance
18208 func NewPaperContentRemoveFromFolderDetails(EventUuid string) *PaperContentRemoveFromFolderDetails {
18209 s := new(PaperContentRemoveFromFolderDetails)
18210 s.EventUuid = EventUuid
18211 return s
18212 }
18213
18214 // PaperContentRemoveFromFolderType : has no documentation (yet)
18215 type PaperContentRemoveFromFolderType struct {
18216 // Description : has no documentation (yet)
18217 Description string `json:"description"`
18218 }
18219
18220 // NewPaperContentRemoveFromFolderType returns a new PaperContentRemoveFromFolderType instance
18221 func NewPaperContentRemoveFromFolderType(Description string) *PaperContentRemoveFromFolderType {
18222 s := new(PaperContentRemoveFromFolderType)
18223 s.Description = Description
18224 return s
18225 }
18226
18227 // PaperContentRemoveMemberDetails : Removed users and/or groups from Paper
18228 // doc/folder.
18229 type PaperContentRemoveMemberDetails struct {
18230 // EventUuid : Event unique identifier.
18231 EventUuid string `json:"event_uuid"`
18232 }
18233
18234 // NewPaperContentRemoveMemberDetails returns a new PaperContentRemoveMemberDetails instance
18235 func NewPaperContentRemoveMemberDetails(EventUuid string) *PaperContentRemoveMemberDetails {
18236 s := new(PaperContentRemoveMemberDetails)
18237 s.EventUuid = EventUuid
18238 return s
18239 }
18240
18241 // PaperContentRemoveMemberType : has no documentation (yet)
18242 type PaperContentRemoveMemberType struct {
18243 // Description : has no documentation (yet)
18244 Description string `json:"description"`
18245 }
18246
18247 // NewPaperContentRemoveMemberType returns a new PaperContentRemoveMemberType instance
18248 func NewPaperContentRemoveMemberType(Description string) *PaperContentRemoveMemberType {
18249 s := new(PaperContentRemoveMemberType)
18250 s.Description = Description
18251 return s
18252 }
18253
18254 // PaperContentRenameDetails : Renamed Paper doc/folder.
18255 type PaperContentRenameDetails struct {
18256 // EventUuid : Event unique identifier.
18257 EventUuid string `json:"event_uuid"`
18258 }
18259
18260 // NewPaperContentRenameDetails returns a new PaperContentRenameDetails instance
18261 func NewPaperContentRenameDetails(EventUuid string) *PaperContentRenameDetails {
18262 s := new(PaperContentRenameDetails)
18263 s.EventUuid = EventUuid
18264 return s
18265 }
18266
18267 // PaperContentRenameType : has no documentation (yet)
18268 type PaperContentRenameType struct {
18269 // Description : has no documentation (yet)
18270 Description string `json:"description"`
18271 }
18272
18273 // NewPaperContentRenameType returns a new PaperContentRenameType instance
18274 func NewPaperContentRenameType(Description string) *PaperContentRenameType {
18275 s := new(PaperContentRenameType)
18276 s.Description = Description
18277 return s
18278 }
18279
18280 // PaperContentRestoreDetails : Restored archived Paper doc/folder.
18281 type PaperContentRestoreDetails struct {
18282 // EventUuid : Event unique identifier.
18283 EventUuid string `json:"event_uuid"`
18284 }
18285
18286 // NewPaperContentRestoreDetails returns a new PaperContentRestoreDetails instance
18287 func NewPaperContentRestoreDetails(EventUuid string) *PaperContentRestoreDetails {
18288 s := new(PaperContentRestoreDetails)
18289 s.EventUuid = EventUuid
18290 return s
18291 }
18292
18293 // PaperContentRestoreType : has no documentation (yet)
18294 type PaperContentRestoreType struct {
18295 // Description : has no documentation (yet)
18296 Description string `json:"description"`
18297 }
18298
18299 // NewPaperContentRestoreType returns a new PaperContentRestoreType instance
18300 func NewPaperContentRestoreType(Description string) *PaperContentRestoreType {
18301 s := new(PaperContentRestoreType)
18302 s.Description = Description
18303 return s
18304 }
18305
18306 // PaperDefaultFolderPolicy : Policy to set default access for newly created
18307 // Paper folders.
18308 type PaperDefaultFolderPolicy struct {
18309 dropbox.Tagged
18310 }
18311
18312 // Valid tag values for PaperDefaultFolderPolicy
18313 const (
18314 PaperDefaultFolderPolicyEveryoneInTeam = "everyone_in_team"
18315 PaperDefaultFolderPolicyInviteOnly = "invite_only"
18316 PaperDefaultFolderPolicyOther = "other"
18317 )
18318
18319 // PaperDefaultFolderPolicyChangedDetails : Changed Paper Default Folder Policy
18320 // setting for team.
18321 type PaperDefaultFolderPolicyChangedDetails struct {
18322 // NewValue : New Paper Default Folder Policy.
18323 NewValue *PaperDefaultFolderPolicy `json:"new_value"`
18324 // PreviousValue : Previous Paper Default Folder Policy.
18325 PreviousValue *PaperDefaultFolderPolicy `json:"previous_value"`
18326 }
18327
18328 // NewPaperDefaultFolderPolicyChangedDetails returns a new PaperDefaultFolderPolicyChangedDetails instance
18329 func NewPaperDefaultFolderPolicyChangedDetails(NewValue *PaperDefaultFolderPolicy, PreviousValue *PaperDefaultFolderPolicy) *PaperDefaultFolderPolicyChangedDetails {
18330 s := new(PaperDefaultFolderPolicyChangedDetails)
18331 s.NewValue = NewValue
18332 s.PreviousValue = PreviousValue
18333 return s
18334 }
18335
18336 // PaperDefaultFolderPolicyChangedType : has no documentation (yet)
18337 type PaperDefaultFolderPolicyChangedType struct {
18338 // Description : has no documentation (yet)
18339 Description string `json:"description"`
18340 }
18341
18342 // NewPaperDefaultFolderPolicyChangedType returns a new PaperDefaultFolderPolicyChangedType instance
18343 func NewPaperDefaultFolderPolicyChangedType(Description string) *PaperDefaultFolderPolicyChangedType {
18344 s := new(PaperDefaultFolderPolicyChangedType)
18345 s.Description = Description
18346 return s
18347 }
18348
18349 // PaperDesktopPolicy : Policy for controlling if team members can use Paper
18350 // Desktop
18351 type PaperDesktopPolicy struct {
18352 dropbox.Tagged
18353 }
18354
18355 // Valid tag values for PaperDesktopPolicy
18356 const (
18357 PaperDesktopPolicyDisabled = "disabled"
18358 PaperDesktopPolicyEnabled = "enabled"
18359 PaperDesktopPolicyOther = "other"
18360 )
18361
18362 // PaperDesktopPolicyChangedDetails : Enabled/disabled Paper Desktop for team.
18363 type PaperDesktopPolicyChangedDetails struct {
18364 // NewValue : New Paper Desktop policy.
18365 NewValue *PaperDesktopPolicy `json:"new_value"`
18366 // PreviousValue : Previous Paper Desktop policy.
18367 PreviousValue *PaperDesktopPolicy `json:"previous_value"`
18368 }
18369
18370 // NewPaperDesktopPolicyChangedDetails returns a new PaperDesktopPolicyChangedDetails instance
18371 func NewPaperDesktopPolicyChangedDetails(NewValue *PaperDesktopPolicy, PreviousValue *PaperDesktopPolicy) *PaperDesktopPolicyChangedDetails {
18372 s := new(PaperDesktopPolicyChangedDetails)
18373 s.NewValue = NewValue
18374 s.PreviousValue = PreviousValue
18375 return s
18376 }
18377
18378 // PaperDesktopPolicyChangedType : has no documentation (yet)
18379 type PaperDesktopPolicyChangedType struct {
18380 // Description : has no documentation (yet)
18381 Description string `json:"description"`
18382 }
18383
18384 // NewPaperDesktopPolicyChangedType returns a new PaperDesktopPolicyChangedType instance
18385 func NewPaperDesktopPolicyChangedType(Description string) *PaperDesktopPolicyChangedType {
18386 s := new(PaperDesktopPolicyChangedType)
18387 s.Description = Description
18388 return s
18389 }
18390
18391 // PaperDocAddCommentDetails : Added Paper doc comment.
18392 type PaperDocAddCommentDetails struct {
18393 // EventUuid : Event unique identifier.
18394 EventUuid string `json:"event_uuid"`
18395 // CommentText : Comment text.
18396 CommentText string `json:"comment_text,omitempty"`
18397 }
18398
18399 // NewPaperDocAddCommentDetails returns a new PaperDocAddCommentDetails instance
18400 func NewPaperDocAddCommentDetails(EventUuid string) *PaperDocAddCommentDetails {
18401 s := new(PaperDocAddCommentDetails)
18402 s.EventUuid = EventUuid
18403 return s
18404 }
18405
18406 // PaperDocAddCommentType : has no documentation (yet)
18407 type PaperDocAddCommentType struct {
18408 // Description : has no documentation (yet)
18409 Description string `json:"description"`
18410 }
18411
18412 // NewPaperDocAddCommentType returns a new PaperDocAddCommentType instance
18413 func NewPaperDocAddCommentType(Description string) *PaperDocAddCommentType {
18414 s := new(PaperDocAddCommentType)
18415 s.Description = Description
18416 return s
18417 }
18418
18419 // PaperDocChangeMemberRoleDetails : Changed member permissions for Paper doc.
18420 type PaperDocChangeMemberRoleDetails struct {
18421 // EventUuid : Event unique identifier.
18422 EventUuid string `json:"event_uuid"`
18423 // AccessType : Paper doc access type.
18424 AccessType *PaperAccessType `json:"access_type"`
18425 }
18426
18427 // NewPaperDocChangeMemberRoleDetails returns a new PaperDocChangeMemberRoleDetails instance
18428 func NewPaperDocChangeMemberRoleDetails(EventUuid string, AccessType *PaperAccessType) *PaperDocChangeMemberRoleDetails {
18429 s := new(PaperDocChangeMemberRoleDetails)
18430 s.EventUuid = EventUuid
18431 s.AccessType = AccessType
18432 return s
18433 }
18434
18435 // PaperDocChangeMemberRoleType : has no documentation (yet)
18436 type PaperDocChangeMemberRoleType struct {
18437 // Description : has no documentation (yet)
18438 Description string `json:"description"`
18439 }
18440
18441 // NewPaperDocChangeMemberRoleType returns a new PaperDocChangeMemberRoleType instance
18442 func NewPaperDocChangeMemberRoleType(Description string) *PaperDocChangeMemberRoleType {
18443 s := new(PaperDocChangeMemberRoleType)
18444 s.Description = Description
18445 return s
18446 }
18447
18448 // PaperDocChangeSharingPolicyDetails : Changed sharing setting for Paper doc.
18449 type PaperDocChangeSharingPolicyDetails struct {
18450 // EventUuid : Event unique identifier.
18451 EventUuid string `json:"event_uuid"`
18452 // PublicSharingPolicy : Sharing policy with external users.
18453 PublicSharingPolicy string `json:"public_sharing_policy,omitempty"`
18454 // TeamSharingPolicy : Sharing policy with team.
18455 TeamSharingPolicy string `json:"team_sharing_policy,omitempty"`
18456 }
18457
18458 // NewPaperDocChangeSharingPolicyDetails returns a new PaperDocChangeSharingPolicyDetails instance
18459 func NewPaperDocChangeSharingPolicyDetails(EventUuid string) *PaperDocChangeSharingPolicyDetails {
18460 s := new(PaperDocChangeSharingPolicyDetails)
18461 s.EventUuid = EventUuid
18462 return s
18463 }
18464
18465 // PaperDocChangeSharingPolicyType : has no documentation (yet)
18466 type PaperDocChangeSharingPolicyType struct {
18467 // Description : has no documentation (yet)
18468 Description string `json:"description"`
18469 }
18470
18471 // NewPaperDocChangeSharingPolicyType returns a new PaperDocChangeSharingPolicyType instance
18472 func NewPaperDocChangeSharingPolicyType(Description string) *PaperDocChangeSharingPolicyType {
18473 s := new(PaperDocChangeSharingPolicyType)
18474 s.Description = Description
18475 return s
18476 }
18477
18478 // PaperDocChangeSubscriptionDetails : Followed/unfollowed Paper doc.
18479 type PaperDocChangeSubscriptionDetails struct {
18480 // EventUuid : Event unique identifier.
18481 EventUuid string `json:"event_uuid"`
18482 // NewSubscriptionLevel : New doc subscription level.
18483 NewSubscriptionLevel string `json:"new_subscription_level"`
18484 // PreviousSubscriptionLevel : Previous doc subscription level. Might be
18485 // missing due to historical data gap.
18486 PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"`
18487 }
18488
18489 // NewPaperDocChangeSubscriptionDetails returns a new PaperDocChangeSubscriptionDetails instance
18490 func NewPaperDocChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperDocChangeSubscriptionDetails {
18491 s := new(PaperDocChangeSubscriptionDetails)
18492 s.EventUuid = EventUuid
18493 s.NewSubscriptionLevel = NewSubscriptionLevel
18494 return s
18495 }
18496
18497 // PaperDocChangeSubscriptionType : has no documentation (yet)
18498 type PaperDocChangeSubscriptionType struct {
18499 // Description : has no documentation (yet)
18500 Description string `json:"description"`
18501 }
18502
18503 // NewPaperDocChangeSubscriptionType returns a new PaperDocChangeSubscriptionType instance
18504 func NewPaperDocChangeSubscriptionType(Description string) *PaperDocChangeSubscriptionType {
18505 s := new(PaperDocChangeSubscriptionType)
18506 s.Description = Description
18507 return s
18508 }
18509
18510 // PaperDocDeleteCommentDetails : Deleted Paper doc comment.
18511 type PaperDocDeleteCommentDetails struct {
18512 // EventUuid : Event unique identifier.
18513 EventUuid string `json:"event_uuid"`
18514 // CommentText : Comment text.
18515 CommentText string `json:"comment_text,omitempty"`
18516 }
18517
18518 // NewPaperDocDeleteCommentDetails returns a new PaperDocDeleteCommentDetails instance
18519 func NewPaperDocDeleteCommentDetails(EventUuid string) *PaperDocDeleteCommentDetails {
18520 s := new(PaperDocDeleteCommentDetails)
18521 s.EventUuid = EventUuid
18522 return s
18523 }
18524
18525 // PaperDocDeleteCommentType : has no documentation (yet)
18526 type PaperDocDeleteCommentType struct {
18527 // Description : has no documentation (yet)
18528 Description string `json:"description"`
18529 }
18530
18531 // NewPaperDocDeleteCommentType returns a new PaperDocDeleteCommentType instance
18532 func NewPaperDocDeleteCommentType(Description string) *PaperDocDeleteCommentType {
18533 s := new(PaperDocDeleteCommentType)
18534 s.Description = Description
18535 return s
18536 }
18537
18538 // PaperDocDeletedDetails : Archived Paper doc.
18539 type PaperDocDeletedDetails struct {
18540 // EventUuid : Event unique identifier.
18541 EventUuid string `json:"event_uuid"`
18542 }
18543
18544 // NewPaperDocDeletedDetails returns a new PaperDocDeletedDetails instance
18545 func NewPaperDocDeletedDetails(EventUuid string) *PaperDocDeletedDetails {
18546 s := new(PaperDocDeletedDetails)
18547 s.EventUuid = EventUuid
18548 return s
18549 }
18550
18551 // PaperDocDeletedType : has no documentation (yet)
18552 type PaperDocDeletedType struct {
18553 // Description : has no documentation (yet)
18554 Description string `json:"description"`
18555 }
18556
18557 // NewPaperDocDeletedType returns a new PaperDocDeletedType instance
18558 func NewPaperDocDeletedType(Description string) *PaperDocDeletedType {
18559 s := new(PaperDocDeletedType)
18560 s.Description = Description
18561 return s
18562 }
18563
18564 // PaperDocDownloadDetails : Downloaded Paper doc in specific format.
18565 type PaperDocDownloadDetails struct {
18566 // EventUuid : Event unique identifier.
18567 EventUuid string `json:"event_uuid"`
18568 // ExportFileFormat : Export file format.
18569 ExportFileFormat *PaperDownloadFormat `json:"export_file_format"`
18570 }
18571
18572 // NewPaperDocDownloadDetails returns a new PaperDocDownloadDetails instance
18573 func NewPaperDocDownloadDetails(EventUuid string, ExportFileFormat *PaperDownloadFormat) *PaperDocDownloadDetails {
18574 s := new(PaperDocDownloadDetails)
18575 s.EventUuid = EventUuid
18576 s.ExportFileFormat = ExportFileFormat
18577 return s
18578 }
18579
18580 // PaperDocDownloadType : has no documentation (yet)
18581 type PaperDocDownloadType struct {
18582 // Description : has no documentation (yet)
18583 Description string `json:"description"`
18584 }
18585
18586 // NewPaperDocDownloadType returns a new PaperDocDownloadType instance
18587 func NewPaperDocDownloadType(Description string) *PaperDocDownloadType {
18588 s := new(PaperDocDownloadType)
18589 s.Description = Description
18590 return s
18591 }
18592
18593 // PaperDocEditCommentDetails : Edited Paper doc comment.
18594 type PaperDocEditCommentDetails struct {
18595 // EventUuid : Event unique identifier.
18596 EventUuid string `json:"event_uuid"`
18597 // CommentText : Comment text.
18598 CommentText string `json:"comment_text,omitempty"`
18599 }
18600
18601 // NewPaperDocEditCommentDetails returns a new PaperDocEditCommentDetails instance
18602 func NewPaperDocEditCommentDetails(EventUuid string) *PaperDocEditCommentDetails {
18603 s := new(PaperDocEditCommentDetails)
18604 s.EventUuid = EventUuid
18605 return s
18606 }
18607
18608 // PaperDocEditCommentType : has no documentation (yet)
18609 type PaperDocEditCommentType struct {
18610 // Description : has no documentation (yet)
18611 Description string `json:"description"`
18612 }
18613
18614 // NewPaperDocEditCommentType returns a new PaperDocEditCommentType instance
18615 func NewPaperDocEditCommentType(Description string) *PaperDocEditCommentType {
18616 s := new(PaperDocEditCommentType)
18617 s.Description = Description
18618 return s
18619 }
18620
18621 // PaperDocEditDetails : Edited Paper doc.
18622 type PaperDocEditDetails struct {
18623 // EventUuid : Event unique identifier.
18624 EventUuid string `json:"event_uuid"`
18625 }
18626
18627 // NewPaperDocEditDetails returns a new PaperDocEditDetails instance
18628 func NewPaperDocEditDetails(EventUuid string) *PaperDocEditDetails {
18629 s := new(PaperDocEditDetails)
18630 s.EventUuid = EventUuid
18631 return s
18632 }
18633
18634 // PaperDocEditType : has no documentation (yet)
18635 type PaperDocEditType struct {
18636 // Description : has no documentation (yet)
18637 Description string `json:"description"`
18638 }
18639
18640 // NewPaperDocEditType returns a new PaperDocEditType instance
18641 func NewPaperDocEditType(Description string) *PaperDocEditType {
18642 s := new(PaperDocEditType)
18643 s.Description = Description
18644 return s
18645 }
18646
18647 // PaperDocFollowedDetails : Followed Paper doc.
18648 type PaperDocFollowedDetails struct {
18649 // EventUuid : Event unique identifier.
18650 EventUuid string `json:"event_uuid"`
18651 }
18652
18653 // NewPaperDocFollowedDetails returns a new PaperDocFollowedDetails instance
18654 func NewPaperDocFollowedDetails(EventUuid string) *PaperDocFollowedDetails {
18655 s := new(PaperDocFollowedDetails)
18656 s.EventUuid = EventUuid
18657 return s
18658 }
18659
18660 // PaperDocFollowedType : has no documentation (yet)
18661 type PaperDocFollowedType struct {
18662 // Description : has no documentation (yet)
18663 Description string `json:"description"`
18664 }
18665
18666 // NewPaperDocFollowedType returns a new PaperDocFollowedType instance
18667 func NewPaperDocFollowedType(Description string) *PaperDocFollowedType {
18668 s := new(PaperDocFollowedType)
18669 s.Description = Description
18670 return s
18671 }
18672
18673 // PaperDocMentionDetails : Mentioned user in Paper doc.
18674 type PaperDocMentionDetails struct {
18675 // EventUuid : Event unique identifier.
18676 EventUuid string `json:"event_uuid"`
18677 }
18678
18679 // NewPaperDocMentionDetails returns a new PaperDocMentionDetails instance
18680 func NewPaperDocMentionDetails(EventUuid string) *PaperDocMentionDetails {
18681 s := new(PaperDocMentionDetails)
18682 s.EventUuid = EventUuid
18683 return s
18684 }
18685
18686 // PaperDocMentionType : has no documentation (yet)
18687 type PaperDocMentionType struct {
18688 // Description : has no documentation (yet)
18689 Description string `json:"description"`
18690 }
18691
18692 // NewPaperDocMentionType returns a new PaperDocMentionType instance
18693 func NewPaperDocMentionType(Description string) *PaperDocMentionType {
18694 s := new(PaperDocMentionType)
18695 s.Description = Description
18696 return s
18697 }
18698
18699 // PaperDocOwnershipChangedDetails : Transferred ownership of Paper doc.
18700 type PaperDocOwnershipChangedDetails struct {
18701 // EventUuid : Event unique identifier.
18702 EventUuid string `json:"event_uuid"`
18703 // OldOwnerUserId : Previous owner.
18704 OldOwnerUserId string `json:"old_owner_user_id,omitempty"`
18705 // NewOwnerUserId : New owner.
18706 NewOwnerUserId string `json:"new_owner_user_id"`
18707 }
18708
18709 // NewPaperDocOwnershipChangedDetails returns a new PaperDocOwnershipChangedDetails instance
18710 func NewPaperDocOwnershipChangedDetails(EventUuid string, NewOwnerUserId string) *PaperDocOwnershipChangedDetails {
18711 s := new(PaperDocOwnershipChangedDetails)
18712 s.EventUuid = EventUuid
18713 s.NewOwnerUserId = NewOwnerUserId
18714 return s
18715 }
18716
18717 // PaperDocOwnershipChangedType : has no documentation (yet)
18718 type PaperDocOwnershipChangedType struct {
18719 // Description : has no documentation (yet)
18720 Description string `json:"description"`
18721 }
18722
18723 // NewPaperDocOwnershipChangedType returns a new PaperDocOwnershipChangedType instance
18724 func NewPaperDocOwnershipChangedType(Description string) *PaperDocOwnershipChangedType {
18725 s := new(PaperDocOwnershipChangedType)
18726 s.Description = Description
18727 return s
18728 }
18729
18730 // PaperDocRequestAccessDetails : Requested access to Paper doc.
18731 type PaperDocRequestAccessDetails struct {
18732 // EventUuid : Event unique identifier.
18733 EventUuid string `json:"event_uuid"`
18734 }
18735
18736 // NewPaperDocRequestAccessDetails returns a new PaperDocRequestAccessDetails instance
18737 func NewPaperDocRequestAccessDetails(EventUuid string) *PaperDocRequestAccessDetails {
18738 s := new(PaperDocRequestAccessDetails)
18739 s.EventUuid = EventUuid
18740 return s
18741 }
18742
18743 // PaperDocRequestAccessType : has no documentation (yet)
18744 type PaperDocRequestAccessType struct {
18745 // Description : has no documentation (yet)
18746 Description string `json:"description"`
18747 }
18748
18749 // NewPaperDocRequestAccessType returns a new PaperDocRequestAccessType instance
18750 func NewPaperDocRequestAccessType(Description string) *PaperDocRequestAccessType {
18751 s := new(PaperDocRequestAccessType)
18752 s.Description = Description
18753 return s
18754 }
18755
18756 // PaperDocResolveCommentDetails : Resolved Paper doc comment.
18757 type PaperDocResolveCommentDetails struct {
18758 // EventUuid : Event unique identifier.
18759 EventUuid string `json:"event_uuid"`
18760 // CommentText : Comment text.
18761 CommentText string `json:"comment_text,omitempty"`
18762 }
18763
18764 // NewPaperDocResolveCommentDetails returns a new PaperDocResolveCommentDetails instance
18765 func NewPaperDocResolveCommentDetails(EventUuid string) *PaperDocResolveCommentDetails {
18766 s := new(PaperDocResolveCommentDetails)
18767 s.EventUuid = EventUuid
18768 return s
18769 }
18770
18771 // PaperDocResolveCommentType : has no documentation (yet)
18772 type PaperDocResolveCommentType struct {
18773 // Description : has no documentation (yet)
18774 Description string `json:"description"`
18775 }
18776
18777 // NewPaperDocResolveCommentType returns a new PaperDocResolveCommentType instance
18778 func NewPaperDocResolveCommentType(Description string) *PaperDocResolveCommentType {
18779 s := new(PaperDocResolveCommentType)
18780 s.Description = Description
18781 return s
18782 }
18783
18784 // PaperDocRevertDetails : Restored Paper doc to previous version.
18785 type PaperDocRevertDetails struct {
18786 // EventUuid : Event unique identifier.
18787 EventUuid string `json:"event_uuid"`
18788 }
18789
18790 // NewPaperDocRevertDetails returns a new PaperDocRevertDetails instance
18791 func NewPaperDocRevertDetails(EventUuid string) *PaperDocRevertDetails {
18792 s := new(PaperDocRevertDetails)
18793 s.EventUuid = EventUuid
18794 return s
18795 }
18796
18797 // PaperDocRevertType : has no documentation (yet)
18798 type PaperDocRevertType struct {
18799 // Description : has no documentation (yet)
18800 Description string `json:"description"`
18801 }
18802
18803 // NewPaperDocRevertType returns a new PaperDocRevertType instance
18804 func NewPaperDocRevertType(Description string) *PaperDocRevertType {
18805 s := new(PaperDocRevertType)
18806 s.Description = Description
18807 return s
18808 }
18809
18810 // PaperDocSlackShareDetails : Shared Paper doc via Slack.
18811 type PaperDocSlackShareDetails struct {
18812 // EventUuid : Event unique identifier.
18813 EventUuid string `json:"event_uuid"`
18814 }
18815
18816 // NewPaperDocSlackShareDetails returns a new PaperDocSlackShareDetails instance
18817 func NewPaperDocSlackShareDetails(EventUuid string) *PaperDocSlackShareDetails {
18818 s := new(PaperDocSlackShareDetails)
18819 s.EventUuid = EventUuid
18820 return s
18821 }
18822
18823 // PaperDocSlackShareType : has no documentation (yet)
18824 type PaperDocSlackShareType struct {
18825 // Description : has no documentation (yet)
18826 Description string `json:"description"`
18827 }
18828
18829 // NewPaperDocSlackShareType returns a new PaperDocSlackShareType instance
18830 func NewPaperDocSlackShareType(Description string) *PaperDocSlackShareType {
18831 s := new(PaperDocSlackShareType)
18832 s.Description = Description
18833 return s
18834 }
18835
18836 // PaperDocTeamInviteDetails : Shared Paper doc with users and/or groups.
18837 type PaperDocTeamInviteDetails struct {
18838 // EventUuid : Event unique identifier.
18839 EventUuid string `json:"event_uuid"`
18840 }
18841
18842 // NewPaperDocTeamInviteDetails returns a new PaperDocTeamInviteDetails instance
18843 func NewPaperDocTeamInviteDetails(EventUuid string) *PaperDocTeamInviteDetails {
18844 s := new(PaperDocTeamInviteDetails)
18845 s.EventUuid = EventUuid
18846 return s
18847 }
18848
18849 // PaperDocTeamInviteType : has no documentation (yet)
18850 type PaperDocTeamInviteType struct {
18851 // Description : has no documentation (yet)
18852 Description string `json:"description"`
18853 }
18854
18855 // NewPaperDocTeamInviteType returns a new PaperDocTeamInviteType instance
18856 func NewPaperDocTeamInviteType(Description string) *PaperDocTeamInviteType {
18857 s := new(PaperDocTeamInviteType)
18858 s.Description = Description
18859 return s
18860 }
18861
18862 // PaperDocTrashedDetails : Deleted Paper doc.
18863 type PaperDocTrashedDetails struct {
18864 // EventUuid : Event unique identifier.
18865 EventUuid string `json:"event_uuid"`
18866 }
18867
18868 // NewPaperDocTrashedDetails returns a new PaperDocTrashedDetails instance
18869 func NewPaperDocTrashedDetails(EventUuid string) *PaperDocTrashedDetails {
18870 s := new(PaperDocTrashedDetails)
18871 s.EventUuid = EventUuid
18872 return s
18873 }
18874
18875 // PaperDocTrashedType : has no documentation (yet)
18876 type PaperDocTrashedType struct {
18877 // Description : has no documentation (yet)
18878 Description string `json:"description"`
18879 }
18880
18881 // NewPaperDocTrashedType returns a new PaperDocTrashedType instance
18882 func NewPaperDocTrashedType(Description string) *PaperDocTrashedType {
18883 s := new(PaperDocTrashedType)
18884 s.Description = Description
18885 return s
18886 }
18887
18888 // PaperDocUnresolveCommentDetails : Unresolved Paper doc comment.
18889 type PaperDocUnresolveCommentDetails struct {
18890 // EventUuid : Event unique identifier.
18891 EventUuid string `json:"event_uuid"`
18892 // CommentText : Comment text.
18893 CommentText string `json:"comment_text,omitempty"`
18894 }
18895
18896 // NewPaperDocUnresolveCommentDetails returns a new PaperDocUnresolveCommentDetails instance
18897 func NewPaperDocUnresolveCommentDetails(EventUuid string) *PaperDocUnresolveCommentDetails {
18898 s := new(PaperDocUnresolveCommentDetails)
18899 s.EventUuid = EventUuid
18900 return s
18901 }
18902
18903 // PaperDocUnresolveCommentType : has no documentation (yet)
18904 type PaperDocUnresolveCommentType struct {
18905 // Description : has no documentation (yet)
18906 Description string `json:"description"`
18907 }
18908
18909 // NewPaperDocUnresolveCommentType returns a new PaperDocUnresolveCommentType instance
18910 func NewPaperDocUnresolveCommentType(Description string) *PaperDocUnresolveCommentType {
18911 s := new(PaperDocUnresolveCommentType)
18912 s.Description = Description
18913 return s
18914 }
18915
18916 // PaperDocUntrashedDetails : Restored Paper doc.
18917 type PaperDocUntrashedDetails struct {
18918 // EventUuid : Event unique identifier.
18919 EventUuid string `json:"event_uuid"`
18920 }
18921
18922 // NewPaperDocUntrashedDetails returns a new PaperDocUntrashedDetails instance
18923 func NewPaperDocUntrashedDetails(EventUuid string) *PaperDocUntrashedDetails {
18924 s := new(PaperDocUntrashedDetails)
18925 s.EventUuid = EventUuid
18926 return s
18927 }
18928
18929 // PaperDocUntrashedType : has no documentation (yet)
18930 type PaperDocUntrashedType struct {
18931 // Description : has no documentation (yet)
18932 Description string `json:"description"`
18933 }
18934
18935 // NewPaperDocUntrashedType returns a new PaperDocUntrashedType instance
18936 func NewPaperDocUntrashedType(Description string) *PaperDocUntrashedType {
18937 s := new(PaperDocUntrashedType)
18938 s.Description = Description
18939 return s
18940 }
18941
18942 // PaperDocViewDetails : Viewed Paper doc.
18943 type PaperDocViewDetails struct {
18944 // EventUuid : Event unique identifier.
18945 EventUuid string `json:"event_uuid"`
18946 }
18947
18948 // NewPaperDocViewDetails returns a new PaperDocViewDetails instance
18949 func NewPaperDocViewDetails(EventUuid string) *PaperDocViewDetails {
18950 s := new(PaperDocViewDetails)
18951 s.EventUuid = EventUuid
18952 return s
18953 }
18954
18955 // PaperDocViewType : has no documentation (yet)
18956 type PaperDocViewType struct {
18957 // Description : has no documentation (yet)
18958 Description string `json:"description"`
18959 }
18960
18961 // NewPaperDocViewType returns a new PaperDocViewType instance
18962 func NewPaperDocViewType(Description string) *PaperDocViewType {
18963 s := new(PaperDocViewType)
18964 s.Description = Description
18965 return s
18966 }
18967
18968 // PaperDocumentLogInfo : Paper document's logged information.
18969 type PaperDocumentLogInfo struct {
18970 // DocId : Papers document Id.
18971 DocId string `json:"doc_id"`
18972 // DocTitle : Paper document title.
18973 DocTitle string `json:"doc_title"`
18974 }
18975
18976 // NewPaperDocumentLogInfo returns a new PaperDocumentLogInfo instance
18977 func NewPaperDocumentLogInfo(DocId string, DocTitle string) *PaperDocumentLogInfo {
18978 s := new(PaperDocumentLogInfo)
18979 s.DocId = DocId
18980 s.DocTitle = DocTitle
18981 return s
18982 }
18983
18984 // PaperDownloadFormat : has no documentation (yet)
18985 type PaperDownloadFormat struct {
18986 dropbox.Tagged
18987 }
18988
18989 // Valid tag values for PaperDownloadFormat
18990 const (
18991 PaperDownloadFormatDocx = "docx"
18992 PaperDownloadFormatHtml = "html"
18993 PaperDownloadFormatMarkdown = "markdown"
18994 PaperDownloadFormatPdf = "pdf"
18995 PaperDownloadFormatOther = "other"
18996 )
18997
18998 // PaperEnabledUsersGroupAdditionDetails : Added users to Paper-enabled users
18999 // list.
19000 type PaperEnabledUsersGroupAdditionDetails struct {
19001 }
19002
19003 // NewPaperEnabledUsersGroupAdditionDetails returns a new PaperEnabledUsersGroupAdditionDetails instance
19004 func NewPaperEnabledUsersGroupAdditionDetails() *PaperEnabledUsersGroupAdditionDetails {
19005 s := new(PaperEnabledUsersGroupAdditionDetails)
19006 return s
19007 }
19008
19009 // PaperEnabledUsersGroupAdditionType : has no documentation (yet)
19010 type PaperEnabledUsersGroupAdditionType struct {
19011 // Description : has no documentation (yet)
19012 Description string `json:"description"`
19013 }
19014
19015 // NewPaperEnabledUsersGroupAdditionType returns a new PaperEnabledUsersGroupAdditionType instance
19016 func NewPaperEnabledUsersGroupAdditionType(Description string) *PaperEnabledUsersGroupAdditionType {
19017 s := new(PaperEnabledUsersGroupAdditionType)
19018 s.Description = Description
19019 return s
19020 }
19021
19022 // PaperEnabledUsersGroupRemovalDetails : Removed users from Paper-enabled users
19023 // list.
19024 type PaperEnabledUsersGroupRemovalDetails struct {
19025 }
19026
19027 // NewPaperEnabledUsersGroupRemovalDetails returns a new PaperEnabledUsersGroupRemovalDetails instance
19028 func NewPaperEnabledUsersGroupRemovalDetails() *PaperEnabledUsersGroupRemovalDetails {
19029 s := new(PaperEnabledUsersGroupRemovalDetails)
19030 return s
19031 }
19032
19033 // PaperEnabledUsersGroupRemovalType : has no documentation (yet)
19034 type PaperEnabledUsersGroupRemovalType struct {
19035 // Description : has no documentation (yet)
19036 Description string `json:"description"`
19037 }
19038
19039 // NewPaperEnabledUsersGroupRemovalType returns a new PaperEnabledUsersGroupRemovalType instance
19040 func NewPaperEnabledUsersGroupRemovalType(Description string) *PaperEnabledUsersGroupRemovalType {
19041 s := new(PaperEnabledUsersGroupRemovalType)
19042 s.Description = Description
19043 return s
19044 }
19045
19046 // PaperExternalViewAllowDetails : Changed Paper external sharing setting to
19047 // anyone.
19048 type PaperExternalViewAllowDetails struct {
19049 // EventUuid : Event unique identifier.
19050 EventUuid string `json:"event_uuid"`
19051 }
19052
19053 // NewPaperExternalViewAllowDetails returns a new PaperExternalViewAllowDetails instance
19054 func NewPaperExternalViewAllowDetails(EventUuid string) *PaperExternalViewAllowDetails {
19055 s := new(PaperExternalViewAllowDetails)
19056 s.EventUuid = EventUuid
19057 return s
19058 }
19059
19060 // PaperExternalViewAllowType : has no documentation (yet)
19061 type PaperExternalViewAllowType struct {
19062 // Description : has no documentation (yet)
19063 Description string `json:"description"`
19064 }
19065
19066 // NewPaperExternalViewAllowType returns a new PaperExternalViewAllowType instance
19067 func NewPaperExternalViewAllowType(Description string) *PaperExternalViewAllowType {
19068 s := new(PaperExternalViewAllowType)
19069 s.Description = Description
19070 return s
19071 }
19072
19073 // PaperExternalViewDefaultTeamDetails : Changed Paper external sharing setting
19074 // to default team.
19075 type PaperExternalViewDefaultTeamDetails struct {
19076 // EventUuid : Event unique identifier.
19077 EventUuid string `json:"event_uuid"`
19078 }
19079
19080 // NewPaperExternalViewDefaultTeamDetails returns a new PaperExternalViewDefaultTeamDetails instance
19081 func NewPaperExternalViewDefaultTeamDetails(EventUuid string) *PaperExternalViewDefaultTeamDetails {
19082 s := new(PaperExternalViewDefaultTeamDetails)
19083 s.EventUuid = EventUuid
19084 return s
19085 }
19086
19087 // PaperExternalViewDefaultTeamType : has no documentation (yet)
19088 type PaperExternalViewDefaultTeamType struct {
19089 // Description : has no documentation (yet)
19090 Description string `json:"description"`
19091 }
19092
19093 // NewPaperExternalViewDefaultTeamType returns a new PaperExternalViewDefaultTeamType instance
19094 func NewPaperExternalViewDefaultTeamType(Description string) *PaperExternalViewDefaultTeamType {
19095 s := new(PaperExternalViewDefaultTeamType)
19096 s.Description = Description
19097 return s
19098 }
19099
19100 // PaperExternalViewForbidDetails : Changed Paper external sharing setting to
19101 // team-only.
19102 type PaperExternalViewForbidDetails struct {
19103 // EventUuid : Event unique identifier.
19104 EventUuid string `json:"event_uuid"`
19105 }
19106
19107 // NewPaperExternalViewForbidDetails returns a new PaperExternalViewForbidDetails instance
19108 func NewPaperExternalViewForbidDetails(EventUuid string) *PaperExternalViewForbidDetails {
19109 s := new(PaperExternalViewForbidDetails)
19110 s.EventUuid = EventUuid
19111 return s
19112 }
19113
19114 // PaperExternalViewForbidType : has no documentation (yet)
19115 type PaperExternalViewForbidType struct {
19116 // Description : has no documentation (yet)
19117 Description string `json:"description"`
19118 }
19119
19120 // NewPaperExternalViewForbidType returns a new PaperExternalViewForbidType instance
19121 func NewPaperExternalViewForbidType(Description string) *PaperExternalViewForbidType {
19122 s := new(PaperExternalViewForbidType)
19123 s.Description = Description
19124 return s
19125 }
19126
19127 // PaperFolderChangeSubscriptionDetails : Followed/unfollowed Paper folder.
19128 type PaperFolderChangeSubscriptionDetails struct {
19129 // EventUuid : Event unique identifier.
19130 EventUuid string `json:"event_uuid"`
19131 // NewSubscriptionLevel : New folder subscription level.
19132 NewSubscriptionLevel string `json:"new_subscription_level"`
19133 // PreviousSubscriptionLevel : Previous folder subscription level. Might be
19134 // missing due to historical data gap.
19135 PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"`
19136 }
19137
19138 // NewPaperFolderChangeSubscriptionDetails returns a new PaperFolderChangeSubscriptionDetails instance
19139 func NewPaperFolderChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperFolderChangeSubscriptionDetails {
19140 s := new(PaperFolderChangeSubscriptionDetails)
19141 s.EventUuid = EventUuid
19142 s.NewSubscriptionLevel = NewSubscriptionLevel
19143 return s
19144 }
19145
19146 // PaperFolderChangeSubscriptionType : has no documentation (yet)
19147 type PaperFolderChangeSubscriptionType struct {
19148 // Description : has no documentation (yet)
19149 Description string `json:"description"`
19150 }
19151
19152 // NewPaperFolderChangeSubscriptionType returns a new PaperFolderChangeSubscriptionType instance
19153 func NewPaperFolderChangeSubscriptionType(Description string) *PaperFolderChangeSubscriptionType {
19154 s := new(PaperFolderChangeSubscriptionType)
19155 s.Description = Description
19156 return s
19157 }
19158
19159 // PaperFolderDeletedDetails : Archived Paper folder.
19160 type PaperFolderDeletedDetails struct {
19161 // EventUuid : Event unique identifier.
19162 EventUuid string `json:"event_uuid"`
19163 }
19164
19165 // NewPaperFolderDeletedDetails returns a new PaperFolderDeletedDetails instance
19166 func NewPaperFolderDeletedDetails(EventUuid string) *PaperFolderDeletedDetails {
19167 s := new(PaperFolderDeletedDetails)
19168 s.EventUuid = EventUuid
19169 return s
19170 }
19171
19172 // PaperFolderDeletedType : has no documentation (yet)
19173 type PaperFolderDeletedType struct {
19174 // Description : has no documentation (yet)
19175 Description string `json:"description"`
19176 }
19177
19178 // NewPaperFolderDeletedType returns a new PaperFolderDeletedType instance
19179 func NewPaperFolderDeletedType(Description string) *PaperFolderDeletedType {
19180 s := new(PaperFolderDeletedType)
19181 s.Description = Description
19182 return s
19183 }
19184
19185 // PaperFolderFollowedDetails : Followed Paper folder.
19186 type PaperFolderFollowedDetails struct {
19187 // EventUuid : Event unique identifier.
19188 EventUuid string `json:"event_uuid"`
19189 }
19190
19191 // NewPaperFolderFollowedDetails returns a new PaperFolderFollowedDetails instance
19192 func NewPaperFolderFollowedDetails(EventUuid string) *PaperFolderFollowedDetails {
19193 s := new(PaperFolderFollowedDetails)
19194 s.EventUuid = EventUuid
19195 return s
19196 }
19197
19198 // PaperFolderFollowedType : has no documentation (yet)
19199 type PaperFolderFollowedType struct {
19200 // Description : has no documentation (yet)
19201 Description string `json:"description"`
19202 }
19203
19204 // NewPaperFolderFollowedType returns a new PaperFolderFollowedType instance
19205 func NewPaperFolderFollowedType(Description string) *PaperFolderFollowedType {
19206 s := new(PaperFolderFollowedType)
19207 s.Description = Description
19208 return s
19209 }
19210
19211 // PaperFolderLogInfo : Paper folder's logged information.
19212 type PaperFolderLogInfo struct {
19213 // FolderId : Papers folder Id.
19214 FolderId string `json:"folder_id"`
19215 // FolderName : Paper folder name.
19216 FolderName string `json:"folder_name"`
19217 }
19218
19219 // NewPaperFolderLogInfo returns a new PaperFolderLogInfo instance
19220 func NewPaperFolderLogInfo(FolderId string, FolderName string) *PaperFolderLogInfo {
19221 s := new(PaperFolderLogInfo)
19222 s.FolderId = FolderId
19223 s.FolderName = FolderName
19224 return s
19225 }
19226
19227 // PaperFolderTeamInviteDetails : Shared Paper folder with users and/or groups.
19228 type PaperFolderTeamInviteDetails struct {
19229 // EventUuid : Event unique identifier.
19230 EventUuid string `json:"event_uuid"`
19231 }
19232
19233 // NewPaperFolderTeamInviteDetails returns a new PaperFolderTeamInviteDetails instance
19234 func NewPaperFolderTeamInviteDetails(EventUuid string) *PaperFolderTeamInviteDetails {
19235 s := new(PaperFolderTeamInviteDetails)
19236 s.EventUuid = EventUuid
19237 return s
19238 }
19239
19240 // PaperFolderTeamInviteType : has no documentation (yet)
19241 type PaperFolderTeamInviteType struct {
19242 // Description : has no documentation (yet)
19243 Description string `json:"description"`
19244 }
19245
19246 // NewPaperFolderTeamInviteType returns a new PaperFolderTeamInviteType instance
19247 func NewPaperFolderTeamInviteType(Description string) *PaperFolderTeamInviteType {
19248 s := new(PaperFolderTeamInviteType)
19249 s.Description = Description
19250 return s
19251 }
19252
19253 // PaperMemberPolicy : Policy for controlling if team members can share Paper
19254 // documents externally.
19255 type PaperMemberPolicy struct {
19256 dropbox.Tagged
19257 }
19258
19259 // Valid tag values for PaperMemberPolicy
19260 const (
19261 PaperMemberPolicyAnyoneWithLink = "anyone_with_link"
19262 PaperMemberPolicyOnlyTeam = "only_team"
19263 PaperMemberPolicyTeamAndExplicitlyShared = "team_and_explicitly_shared"
19264 PaperMemberPolicyOther = "other"
19265 )
19266
19267 // PaperPublishedLinkChangePermissionDetails : Changed permissions for published
19268 // doc.
19269 type PaperPublishedLinkChangePermissionDetails struct {
19270 // EventUuid : Event unique identifier.
19271 EventUuid string `json:"event_uuid"`
19272 // NewPermissionLevel : New permission level.
19273 NewPermissionLevel string `json:"new_permission_level"`
19274 // PreviousPermissionLevel : Previous permission level.
19275 PreviousPermissionLevel string `json:"previous_permission_level"`
19276 }
19277
19278 // NewPaperPublishedLinkChangePermissionDetails returns a new PaperPublishedLinkChangePermissionDetails instance
19279 func NewPaperPublishedLinkChangePermissionDetails(EventUuid string, NewPermissionLevel string, PreviousPermissionLevel string) *PaperPublishedLinkChangePermissionDetails {
19280 s := new(PaperPublishedLinkChangePermissionDetails)
19281 s.EventUuid = EventUuid
19282 s.NewPermissionLevel = NewPermissionLevel
19283 s.PreviousPermissionLevel = PreviousPermissionLevel
19284 return s
19285 }
19286
19287 // PaperPublishedLinkChangePermissionType : has no documentation (yet)
19288 type PaperPublishedLinkChangePermissionType struct {
19289 // Description : has no documentation (yet)
19290 Description string `json:"description"`
19291 }
19292
19293 // NewPaperPublishedLinkChangePermissionType returns a new PaperPublishedLinkChangePermissionType instance
19294 func NewPaperPublishedLinkChangePermissionType(Description string) *PaperPublishedLinkChangePermissionType {
19295 s := new(PaperPublishedLinkChangePermissionType)
19296 s.Description = Description
19297 return s
19298 }
19299
19300 // PaperPublishedLinkCreateDetails : Published doc.
19301 type PaperPublishedLinkCreateDetails struct {
19302 // EventUuid : Event unique identifier.
19303 EventUuid string `json:"event_uuid"`
19304 }
19305
19306 // NewPaperPublishedLinkCreateDetails returns a new PaperPublishedLinkCreateDetails instance
19307 func NewPaperPublishedLinkCreateDetails(EventUuid string) *PaperPublishedLinkCreateDetails {
19308 s := new(PaperPublishedLinkCreateDetails)
19309 s.EventUuid = EventUuid
19310 return s
19311 }
19312
19313 // PaperPublishedLinkCreateType : has no documentation (yet)
19314 type PaperPublishedLinkCreateType struct {
19315 // Description : has no documentation (yet)
19316 Description string `json:"description"`
19317 }
19318
19319 // NewPaperPublishedLinkCreateType returns a new PaperPublishedLinkCreateType instance
19320 func NewPaperPublishedLinkCreateType(Description string) *PaperPublishedLinkCreateType {
19321 s := new(PaperPublishedLinkCreateType)
19322 s.Description = Description
19323 return s
19324 }
19325
19326 // PaperPublishedLinkDisabledDetails : Unpublished doc.
19327 type PaperPublishedLinkDisabledDetails struct {
19328 // EventUuid : Event unique identifier.
19329 EventUuid string `json:"event_uuid"`
19330 }
19331
19332 // NewPaperPublishedLinkDisabledDetails returns a new PaperPublishedLinkDisabledDetails instance
19333 func NewPaperPublishedLinkDisabledDetails(EventUuid string) *PaperPublishedLinkDisabledDetails {
19334 s := new(PaperPublishedLinkDisabledDetails)
19335 s.EventUuid = EventUuid
19336 return s
19337 }
19338
19339 // PaperPublishedLinkDisabledType : has no documentation (yet)
19340 type PaperPublishedLinkDisabledType struct {
19341 // Description : has no documentation (yet)
19342 Description string `json:"description"`
19343 }
19344
19345 // NewPaperPublishedLinkDisabledType returns a new PaperPublishedLinkDisabledType instance
19346 func NewPaperPublishedLinkDisabledType(Description string) *PaperPublishedLinkDisabledType {
19347 s := new(PaperPublishedLinkDisabledType)
19348 s.Description = Description
19349 return s
19350 }
19351
19352 // PaperPublishedLinkViewDetails : Viewed published doc.
19353 type PaperPublishedLinkViewDetails struct {
19354 // EventUuid : Event unique identifier.
19355 EventUuid string `json:"event_uuid"`
19356 }
19357
19358 // NewPaperPublishedLinkViewDetails returns a new PaperPublishedLinkViewDetails instance
19359 func NewPaperPublishedLinkViewDetails(EventUuid string) *PaperPublishedLinkViewDetails {
19360 s := new(PaperPublishedLinkViewDetails)
19361 s.EventUuid = EventUuid
19362 return s
19363 }
19364
19365 // PaperPublishedLinkViewType : has no documentation (yet)
19366 type PaperPublishedLinkViewType struct {
19367 // Description : has no documentation (yet)
19368 Description string `json:"description"`
19369 }
19370
19371 // NewPaperPublishedLinkViewType returns a new PaperPublishedLinkViewType instance
19372 func NewPaperPublishedLinkViewType(Description string) *PaperPublishedLinkViewType {
19373 s := new(PaperPublishedLinkViewType)
19374 s.Description = Description
19375 return s
19376 }
19377
19378 // ParticipantLogInfo : A user or group
19379 type ParticipantLogInfo struct {
19380 dropbox.Tagged
19381 // Group : Group details.
19382 Group *GroupLogInfo `json:"group,omitempty"`
19383 // User : A user with a Dropbox account.
19384 User IsUserLogInfo `json:"user,omitempty"`
19385 }
19386
19387 // Valid tag values for ParticipantLogInfo
19388 const (
19389 ParticipantLogInfoGroup = "group"
19390 ParticipantLogInfoUser = "user"
19391 ParticipantLogInfoOther = "other"
19392 )
19393
19394 // UnmarshalJSON deserializes into a ParticipantLogInfo instance
19395 func (u *ParticipantLogInfo) UnmarshalJSON(body []byte) error {
19396 type wrap struct {
19397 dropbox.Tagged
19398 // User : A user with a Dropbox account.
19399 User json.RawMessage `json:"user,omitempty"`
19400 }
19401 var w wrap
19402 var err error
19403 if err = json.Unmarshal(body, &w); err != nil {
19404 return err
19405 }
19406 u.Tag = w.Tag
19407 switch u.Tag {
19408 case "group":
19409 err = json.Unmarshal(body, &u.Group)
19410
19411 if err != nil {
19412 return err
19413 }
19414 case "user":
19415 u.User, err = IsUserLogInfoFromJSON(w.User)
19416
19417 if err != nil {
19418 return err
19419 }
19420 }
19421 return nil
19422 }
19423
19424 // PassPolicy : has no documentation (yet)
19425 type PassPolicy struct {
19426 dropbox.Tagged
19427 }
19428
19429 // Valid tag values for PassPolicy
19430 const (
19431 PassPolicyAllow = "allow"
19432 PassPolicyDisabled = "disabled"
19433 PassPolicyEnabled = "enabled"
19434 PassPolicyOther = "other"
19435 )
19436
19437 // PasswordChangeDetails : Changed password.
19438 type PasswordChangeDetails struct {
19439 }
19440
19441 // NewPasswordChangeDetails returns a new PasswordChangeDetails instance
19442 func NewPasswordChangeDetails() *PasswordChangeDetails {
19443 s := new(PasswordChangeDetails)
19444 return s
19445 }
19446
19447 // PasswordChangeType : has no documentation (yet)
19448 type PasswordChangeType struct {
19449 // Description : has no documentation (yet)
19450 Description string `json:"description"`
19451 }
19452
19453 // NewPasswordChangeType returns a new PasswordChangeType instance
19454 func NewPasswordChangeType(Description string) *PasswordChangeType {
19455 s := new(PasswordChangeType)
19456 s.Description = Description
19457 return s
19458 }
19459
19460 // PasswordResetAllDetails : Reset all team member passwords.
19461 type PasswordResetAllDetails struct {
19462 }
19463
19464 // NewPasswordResetAllDetails returns a new PasswordResetAllDetails instance
19465 func NewPasswordResetAllDetails() *PasswordResetAllDetails {
19466 s := new(PasswordResetAllDetails)
19467 return s
19468 }
19469
19470 // PasswordResetAllType : has no documentation (yet)
19471 type PasswordResetAllType struct {
19472 // Description : has no documentation (yet)
19473 Description string `json:"description"`
19474 }
19475
19476 // NewPasswordResetAllType returns a new PasswordResetAllType instance
19477 func NewPasswordResetAllType(Description string) *PasswordResetAllType {
19478 s := new(PasswordResetAllType)
19479 s.Description = Description
19480 return s
19481 }
19482
19483 // PasswordResetDetails : Reset password.
19484 type PasswordResetDetails struct {
19485 }
19486
19487 // NewPasswordResetDetails returns a new PasswordResetDetails instance
19488 func NewPasswordResetDetails() *PasswordResetDetails {
19489 s := new(PasswordResetDetails)
19490 return s
19491 }
19492
19493 // PasswordResetType : has no documentation (yet)
19494 type PasswordResetType struct {
19495 // Description : has no documentation (yet)
19496 Description string `json:"description"`
19497 }
19498
19499 // NewPasswordResetType returns a new PasswordResetType instance
19500 func NewPasswordResetType(Description string) *PasswordResetType {
19501 s := new(PasswordResetType)
19502 s.Description = Description
19503 return s
19504 }
19505
19506 // PasswordStrengthRequirementsChangePolicyDetails : Changed team password
19507 // strength requirements.
19508 type PasswordStrengthRequirementsChangePolicyDetails struct {
19509 // PreviousValue : Old password strength policy.
19510 PreviousValue *team_policies.PasswordStrengthPolicy `json:"previous_value"`
19511 // NewValue : New password strength policy.
19512 NewValue *team_policies.PasswordStrengthPolicy `json:"new_value"`
19513 }
19514
19515 // NewPasswordStrengthRequirementsChangePolicyDetails returns a new PasswordStrengthRequirementsChangePolicyDetails instance
19516 func NewPasswordStrengthRequirementsChangePolicyDetails(PreviousValue *team_policies.PasswordStrengthPolicy, NewValue *team_policies.PasswordStrengthPolicy) *PasswordStrengthRequirementsChangePolicyDetails {
19517 s := new(PasswordStrengthRequirementsChangePolicyDetails)
19518 s.PreviousValue = PreviousValue
19519 s.NewValue = NewValue
19520 return s
19521 }
19522
19523 // PasswordStrengthRequirementsChangePolicyType : has no documentation (yet)
19524 type PasswordStrengthRequirementsChangePolicyType struct {
19525 // Description : has no documentation (yet)
19526 Description string `json:"description"`
19527 }
19528
19529 // NewPasswordStrengthRequirementsChangePolicyType returns a new PasswordStrengthRequirementsChangePolicyType instance
19530 func NewPasswordStrengthRequirementsChangePolicyType(Description string) *PasswordStrengthRequirementsChangePolicyType {
19531 s := new(PasswordStrengthRequirementsChangePolicyType)
19532 s.Description = Description
19533 return s
19534 }
19535
19536 // PathLogInfo : Path's details.
19537 type PathLogInfo struct {
19538 // Contextual : Fully qualified path relative to event's context.
19539 Contextual string `json:"contextual,omitempty"`
19540 // NamespaceRelative : Path relative to the namespace containing the
19541 // content.
19542 NamespaceRelative *NamespaceRelativePathLogInfo `json:"namespace_relative"`
19543 }
19544
19545 // NewPathLogInfo returns a new PathLogInfo instance
19546 func NewPathLogInfo(NamespaceRelative *NamespaceRelativePathLogInfo) *PathLogInfo {
19547 s := new(PathLogInfo)
19548 s.NamespaceRelative = NamespaceRelative
19549 return s
19550 }
19551
19552 // PendingSecondaryEmailAddedDetails : Added pending secondary email.
19553 type PendingSecondaryEmailAddedDetails struct {
19554 // SecondaryEmail : New pending secondary email.
19555 SecondaryEmail string `json:"secondary_email"`
19556 }
19557
19558 // NewPendingSecondaryEmailAddedDetails returns a new PendingSecondaryEmailAddedDetails instance
19559 func NewPendingSecondaryEmailAddedDetails(SecondaryEmail string) *PendingSecondaryEmailAddedDetails {
19560 s := new(PendingSecondaryEmailAddedDetails)
19561 s.SecondaryEmail = SecondaryEmail
19562 return s
19563 }
19564
19565 // PendingSecondaryEmailAddedType : has no documentation (yet)
19566 type PendingSecondaryEmailAddedType struct {
19567 // Description : has no documentation (yet)
19568 Description string `json:"description"`
19569 }
19570
19571 // NewPendingSecondaryEmailAddedType returns a new PendingSecondaryEmailAddedType instance
19572 func NewPendingSecondaryEmailAddedType(Description string) *PendingSecondaryEmailAddedType {
19573 s := new(PendingSecondaryEmailAddedType)
19574 s.Description = Description
19575 return s
19576 }
19577
19578 // PermanentDeleteChangePolicyDetails : Enabled/disabled ability of team members
19579 // to permanently delete content.
19580 type PermanentDeleteChangePolicyDetails struct {
19581 // NewValue : New permanent delete content policy.
19582 NewValue *ContentPermanentDeletePolicy `json:"new_value"`
19583 // PreviousValue : Previous permanent delete content policy. Might be
19584 // missing due to historical data gap.
19585 PreviousValue *ContentPermanentDeletePolicy `json:"previous_value,omitempty"`
19586 }
19587
19588 // NewPermanentDeleteChangePolicyDetails returns a new PermanentDeleteChangePolicyDetails instance
19589 func NewPermanentDeleteChangePolicyDetails(NewValue *ContentPermanentDeletePolicy) *PermanentDeleteChangePolicyDetails {
19590 s := new(PermanentDeleteChangePolicyDetails)
19591 s.NewValue = NewValue
19592 return s
19593 }
19594
19595 // PermanentDeleteChangePolicyType : has no documentation (yet)
19596 type PermanentDeleteChangePolicyType struct {
19597 // Description : has no documentation (yet)
19598 Description string `json:"description"`
19599 }
19600
19601 // NewPermanentDeleteChangePolicyType returns a new PermanentDeleteChangePolicyType instance
19602 func NewPermanentDeleteChangePolicyType(Description string) *PermanentDeleteChangePolicyType {
19603 s := new(PermanentDeleteChangePolicyType)
19604 s.Description = Description
19605 return s
19606 }
19607
19608 // PlacementRestriction : has no documentation (yet)
19609 type PlacementRestriction struct {
19610 dropbox.Tagged
19611 }
19612
19613 // Valid tag values for PlacementRestriction
19614 const (
19615 PlacementRestrictionAustraliaOnly = "australia_only"
19616 PlacementRestrictionEuropeOnly = "europe_only"
19617 PlacementRestrictionJapanOnly = "japan_only"
19618 PlacementRestrictionNone = "none"
19619 PlacementRestrictionUkOnly = "uk_only"
19620 PlacementRestrictionOther = "other"
19621 )
19622
19623 // PolicyType : has no documentation (yet)
19624 type PolicyType struct {
19625 dropbox.Tagged
19626 }
19627
19628 // Valid tag values for PolicyType
19629 const (
19630 PolicyTypeDisposition = "disposition"
19631 PolicyTypeRetention = "retention"
19632 PolicyTypeOther = "other"
19633 )
19634
19635 // PrimaryTeamRequestAcceptedDetails : Team merge request acceptance details
19636 // shown to the primary team
19637 type PrimaryTeamRequestAcceptedDetails struct {
19638 // SecondaryTeam : The secondary team name.
19639 SecondaryTeam string `json:"secondary_team"`
19640 // SentBy : The name of the secondary team admin who sent the request
19641 // originally.
19642 SentBy string `json:"sent_by"`
19643 }
19644
19645 // NewPrimaryTeamRequestAcceptedDetails returns a new PrimaryTeamRequestAcceptedDetails instance
19646 func NewPrimaryTeamRequestAcceptedDetails(SecondaryTeam string, SentBy string) *PrimaryTeamRequestAcceptedDetails {
19647 s := new(PrimaryTeamRequestAcceptedDetails)
19648 s.SecondaryTeam = SecondaryTeam
19649 s.SentBy = SentBy
19650 return s
19651 }
19652
19653 // PrimaryTeamRequestCanceledDetails : Team merge request cancellation details
19654 // shown to the primary team
19655 type PrimaryTeamRequestCanceledDetails struct {
19656 // SecondaryTeam : The secondary team name.
19657 SecondaryTeam string `json:"secondary_team"`
19658 // SentBy : The name of the secondary team admin who sent the request
19659 // originally.
19660 SentBy string `json:"sent_by"`
19661 }
19662
19663 // NewPrimaryTeamRequestCanceledDetails returns a new PrimaryTeamRequestCanceledDetails instance
19664 func NewPrimaryTeamRequestCanceledDetails(SecondaryTeam string, SentBy string) *PrimaryTeamRequestCanceledDetails {
19665 s := new(PrimaryTeamRequestCanceledDetails)
19666 s.SecondaryTeam = SecondaryTeam
19667 s.SentBy = SentBy
19668 return s
19669 }
19670
19671 // PrimaryTeamRequestExpiredDetails : Team merge request expiration details
19672 // shown to the primary team
19673 type PrimaryTeamRequestExpiredDetails struct {
19674 // SecondaryTeam : The secondary team name.
19675 SecondaryTeam string `json:"secondary_team"`
19676 // SentBy : The name of the secondary team admin who sent the request
19677 // originally.
19678 SentBy string `json:"sent_by"`
19679 }
19680
19681 // NewPrimaryTeamRequestExpiredDetails returns a new PrimaryTeamRequestExpiredDetails instance
19682 func NewPrimaryTeamRequestExpiredDetails(SecondaryTeam string, SentBy string) *PrimaryTeamRequestExpiredDetails {
19683 s := new(PrimaryTeamRequestExpiredDetails)
19684 s.SecondaryTeam = SecondaryTeam
19685 s.SentBy = SentBy
19686 return s
19687 }
19688
19689 // PrimaryTeamRequestReminderDetails : Team merge request reminder details shown
19690 // to the primary team
19691 type PrimaryTeamRequestReminderDetails struct {
19692 // SecondaryTeam : The secondary team name.
19693 SecondaryTeam string `json:"secondary_team"`
19694 // SentTo : The name of the primary team admin the request was sent to.
19695 SentTo string `json:"sent_to"`
19696 }
19697
19698 // NewPrimaryTeamRequestReminderDetails returns a new PrimaryTeamRequestReminderDetails instance
19699 func NewPrimaryTeamRequestReminderDetails(SecondaryTeam string, SentTo string) *PrimaryTeamRequestReminderDetails {
19700 s := new(PrimaryTeamRequestReminderDetails)
19701 s.SecondaryTeam = SecondaryTeam
19702 s.SentTo = SentTo
19703 return s
19704 }
19705
19706 // QuickActionType : Quick action type.
19707 type QuickActionType struct {
19708 dropbox.Tagged
19709 }
19710
19711 // Valid tag values for QuickActionType
19712 const (
19713 QuickActionTypeDeleteSharedLink = "delete_shared_link"
19714 QuickActionTypeResetPassword = "reset_password"
19715 QuickActionTypeRestoreFileOrFolder = "restore_file_or_folder"
19716 QuickActionTypeUnlinkApp = "unlink_app"
19717 QuickActionTypeUnlinkDevice = "unlink_device"
19718 QuickActionTypeUnlinkSession = "unlink_session"
19719 QuickActionTypeOther = "other"
19720 )
19721
19722 // RecipientsConfiguration : Recipients Configuration
19723 type RecipientsConfiguration struct {
19724 // RecipientSettingType : Recipients setting type.
19725 RecipientSettingType *AlertRecipientsSettingType `json:"recipient_setting_type,omitempty"`
19726 // Emails : A list of user emails to notify.
19727 Emails []string `json:"emails,omitempty"`
19728 // Groups : A list of groups to notify.
19729 Groups []string `json:"groups,omitempty"`
19730 }
19731
19732 // NewRecipientsConfiguration returns a new RecipientsConfiguration instance
19733 func NewRecipientsConfiguration() *RecipientsConfiguration {
19734 s := new(RecipientsConfiguration)
19735 return s
19736 }
19737
19738 // RelocateAssetReferencesLogInfo : Provides the indices of the source asset and
19739 // the destination asset for a relocate action.
19740 type RelocateAssetReferencesLogInfo struct {
19741 // SrcAssetIndex : Source asset position in the Assets list.
19742 SrcAssetIndex uint64 `json:"src_asset_index"`
19743 // DestAssetIndex : Destination asset position in the Assets list.
19744 DestAssetIndex uint64 `json:"dest_asset_index"`
19745 }
19746
19747 // NewRelocateAssetReferencesLogInfo returns a new RelocateAssetReferencesLogInfo instance
19748 func NewRelocateAssetReferencesLogInfo(SrcAssetIndex uint64, DestAssetIndex uint64) *RelocateAssetReferencesLogInfo {
19749 s := new(RelocateAssetReferencesLogInfo)
19750 s.SrcAssetIndex = SrcAssetIndex
19751 s.DestAssetIndex = DestAssetIndex
19752 return s
19753 }
19754
19755 // ResellerLogInfo : Reseller information.
19756 type ResellerLogInfo struct {
19757 // ResellerName : Reseller name.
19758 ResellerName string `json:"reseller_name"`
19759 // ResellerEmail : Reseller email.
19760 ResellerEmail string `json:"reseller_email"`
19761 }
19762
19763 // NewResellerLogInfo returns a new ResellerLogInfo instance
19764 func NewResellerLogInfo(ResellerName string, ResellerEmail string) *ResellerLogInfo {
19765 s := new(ResellerLogInfo)
19766 s.ResellerName = ResellerName
19767 s.ResellerEmail = ResellerEmail
19768 return s
19769 }
19770
19771 // ResellerRole : has no documentation (yet)
19772 type ResellerRole struct {
19773 dropbox.Tagged
19774 }
19775
19776 // Valid tag values for ResellerRole
19777 const (
19778 ResellerRoleNotReseller = "not_reseller"
19779 ResellerRoleResellerAdmin = "reseller_admin"
19780 ResellerRoleOther = "other"
19781 )
19782
19783 // ResellerSupportChangePolicyDetails : Enabled/disabled reseller support.
19784 type ResellerSupportChangePolicyDetails struct {
19785 // NewValue : New Reseller support policy.
19786 NewValue *ResellerSupportPolicy `json:"new_value"`
19787 // PreviousValue : Previous Reseller support policy.
19788 PreviousValue *ResellerSupportPolicy `json:"previous_value"`
19789 }
19790
19791 // NewResellerSupportChangePolicyDetails returns a new ResellerSupportChangePolicyDetails instance
19792 func NewResellerSupportChangePolicyDetails(NewValue *ResellerSupportPolicy, PreviousValue *ResellerSupportPolicy) *ResellerSupportChangePolicyDetails {
19793 s := new(ResellerSupportChangePolicyDetails)
19794 s.NewValue = NewValue
19795 s.PreviousValue = PreviousValue
19796 return s
19797 }
19798
19799 // ResellerSupportChangePolicyType : has no documentation (yet)
19800 type ResellerSupportChangePolicyType struct {
19801 // Description : has no documentation (yet)
19802 Description string `json:"description"`
19803 }
19804
19805 // NewResellerSupportChangePolicyType returns a new ResellerSupportChangePolicyType instance
19806 func NewResellerSupportChangePolicyType(Description string) *ResellerSupportChangePolicyType {
19807 s := new(ResellerSupportChangePolicyType)
19808 s.Description = Description
19809 return s
19810 }
19811
19812 // ResellerSupportPolicy : Policy for controlling if reseller can access the
19813 // admin console as administrator
19814 type ResellerSupportPolicy struct {
19815 dropbox.Tagged
19816 }
19817
19818 // Valid tag values for ResellerSupportPolicy
19819 const (
19820 ResellerSupportPolicyDisabled = "disabled"
19821 ResellerSupportPolicyEnabled = "enabled"
19822 ResellerSupportPolicyOther = "other"
19823 )
19824
19825 // ResellerSupportSessionEndDetails : Ended reseller support session.
19826 type ResellerSupportSessionEndDetails struct {
19827 }
19828
19829 // NewResellerSupportSessionEndDetails returns a new ResellerSupportSessionEndDetails instance
19830 func NewResellerSupportSessionEndDetails() *ResellerSupportSessionEndDetails {
19831 s := new(ResellerSupportSessionEndDetails)
19832 return s
19833 }
19834
19835 // ResellerSupportSessionEndType : has no documentation (yet)
19836 type ResellerSupportSessionEndType struct {
19837 // Description : has no documentation (yet)
19838 Description string `json:"description"`
19839 }
19840
19841 // NewResellerSupportSessionEndType returns a new ResellerSupportSessionEndType instance
19842 func NewResellerSupportSessionEndType(Description string) *ResellerSupportSessionEndType {
19843 s := new(ResellerSupportSessionEndType)
19844 s.Description = Description
19845 return s
19846 }
19847
19848 // ResellerSupportSessionStartDetails : Started reseller support session.
19849 type ResellerSupportSessionStartDetails struct {
19850 }
19851
19852 // NewResellerSupportSessionStartDetails returns a new ResellerSupportSessionStartDetails instance
19853 func NewResellerSupportSessionStartDetails() *ResellerSupportSessionStartDetails {
19854 s := new(ResellerSupportSessionStartDetails)
19855 return s
19856 }
19857
19858 // ResellerSupportSessionStartType : has no documentation (yet)
19859 type ResellerSupportSessionStartType struct {
19860 // Description : has no documentation (yet)
19861 Description string `json:"description"`
19862 }
19863
19864 // NewResellerSupportSessionStartType returns a new ResellerSupportSessionStartType instance
19865 func NewResellerSupportSessionStartType(Description string) *ResellerSupportSessionStartType {
19866 s := new(ResellerSupportSessionStartType)
19867 s.Description = Description
19868 return s
19869 }
19870
19871 // RewindFolderDetails : Rewound a folder.
19872 type RewindFolderDetails struct {
19873 // RewindFolderTargetTsMs : Folder was Rewound to this date.
19874 RewindFolderTargetTsMs time.Time `json:"rewind_folder_target_ts_ms"`
19875 }
19876
19877 // NewRewindFolderDetails returns a new RewindFolderDetails instance
19878 func NewRewindFolderDetails(RewindFolderTargetTsMs time.Time) *RewindFolderDetails {
19879 s := new(RewindFolderDetails)
19880 s.RewindFolderTargetTsMs = RewindFolderTargetTsMs
19881 return s
19882 }
19883
19884 // RewindFolderType : has no documentation (yet)
19885 type RewindFolderType struct {
19886 // Description : has no documentation (yet)
19887 Description string `json:"description"`
19888 }
19889
19890 // NewRewindFolderType returns a new RewindFolderType instance
19891 func NewRewindFolderType(Description string) *RewindFolderType {
19892 s := new(RewindFolderType)
19893 s.Description = Description
19894 return s
19895 }
19896
19897 // RewindPolicy : Policy for controlling whether team members can rewind
19898 type RewindPolicy struct {
19899 dropbox.Tagged
19900 }
19901
19902 // Valid tag values for RewindPolicy
19903 const (
19904 RewindPolicyAdminsOnly = "admins_only"
19905 RewindPolicyEveryone = "everyone"
19906 RewindPolicyOther = "other"
19907 )
19908
19909 // RewindPolicyChangedDetails : Changed Rewind policy for team.
19910 type RewindPolicyChangedDetails struct {
19911 // NewValue : New Dropbox Rewind policy.
19912 NewValue *RewindPolicy `json:"new_value"`
19913 // PreviousValue : Previous Dropbox Rewind policy.
19914 PreviousValue *RewindPolicy `json:"previous_value"`
19915 }
19916
19917 // NewRewindPolicyChangedDetails returns a new RewindPolicyChangedDetails instance
19918 func NewRewindPolicyChangedDetails(NewValue *RewindPolicy, PreviousValue *RewindPolicy) *RewindPolicyChangedDetails {
19919 s := new(RewindPolicyChangedDetails)
19920 s.NewValue = NewValue
19921 s.PreviousValue = PreviousValue
19922 return s
19923 }
19924
19925 // RewindPolicyChangedType : has no documentation (yet)
19926 type RewindPolicyChangedType struct {
19927 // Description : has no documentation (yet)
19928 Description string `json:"description"`
19929 }
19930
19931 // NewRewindPolicyChangedType returns a new RewindPolicyChangedType instance
19932 func NewRewindPolicyChangedType(Description string) *RewindPolicyChangedType {
19933 s := new(RewindPolicyChangedType)
19934 s.Description = Description
19935 return s
19936 }
19937
19938 // SecondaryEmailDeletedDetails : Deleted secondary email.
19939 type SecondaryEmailDeletedDetails struct {
19940 // SecondaryEmail : Deleted secondary email.
19941 SecondaryEmail string `json:"secondary_email"`
19942 }
19943
19944 // NewSecondaryEmailDeletedDetails returns a new SecondaryEmailDeletedDetails instance
19945 func NewSecondaryEmailDeletedDetails(SecondaryEmail string) *SecondaryEmailDeletedDetails {
19946 s := new(SecondaryEmailDeletedDetails)
19947 s.SecondaryEmail = SecondaryEmail
19948 return s
19949 }
19950
19951 // SecondaryEmailDeletedType : has no documentation (yet)
19952 type SecondaryEmailDeletedType struct {
19953 // Description : has no documentation (yet)
19954 Description string `json:"description"`
19955 }
19956
19957 // NewSecondaryEmailDeletedType returns a new SecondaryEmailDeletedType instance
19958 func NewSecondaryEmailDeletedType(Description string) *SecondaryEmailDeletedType {
19959 s := new(SecondaryEmailDeletedType)
19960 s.Description = Description
19961 return s
19962 }
19963
19964 // SecondaryEmailVerifiedDetails : Verified secondary email.
19965 type SecondaryEmailVerifiedDetails struct {
19966 // SecondaryEmail : Verified secondary email.
19967 SecondaryEmail string `json:"secondary_email"`
19968 }
19969
19970 // NewSecondaryEmailVerifiedDetails returns a new SecondaryEmailVerifiedDetails instance
19971 func NewSecondaryEmailVerifiedDetails(SecondaryEmail string) *SecondaryEmailVerifiedDetails {
19972 s := new(SecondaryEmailVerifiedDetails)
19973 s.SecondaryEmail = SecondaryEmail
19974 return s
19975 }
19976
19977 // SecondaryEmailVerifiedType : has no documentation (yet)
19978 type SecondaryEmailVerifiedType struct {
19979 // Description : has no documentation (yet)
19980 Description string `json:"description"`
19981 }
19982
19983 // NewSecondaryEmailVerifiedType returns a new SecondaryEmailVerifiedType instance
19984 func NewSecondaryEmailVerifiedType(Description string) *SecondaryEmailVerifiedType {
19985 s := new(SecondaryEmailVerifiedType)
19986 s.Description = Description
19987 return s
19988 }
19989
19990 // SecondaryMailsPolicy : has no documentation (yet)
19991 type SecondaryMailsPolicy struct {
19992 dropbox.Tagged
19993 }
19994
19995 // Valid tag values for SecondaryMailsPolicy
19996 const (
19997 SecondaryMailsPolicyDisabled = "disabled"
19998 SecondaryMailsPolicyEnabled = "enabled"
19999 SecondaryMailsPolicyOther = "other"
20000 )
20001
20002 // SecondaryMailsPolicyChangedDetails : Secondary mails policy changed.
20003 type SecondaryMailsPolicyChangedDetails struct {
20004 // PreviousValue : Previous secondary mails policy.
20005 PreviousValue *SecondaryMailsPolicy `json:"previous_value"`
20006 // NewValue : New secondary mails policy.
20007 NewValue *SecondaryMailsPolicy `json:"new_value"`
20008 }
20009
20010 // NewSecondaryMailsPolicyChangedDetails returns a new SecondaryMailsPolicyChangedDetails instance
20011 func NewSecondaryMailsPolicyChangedDetails(PreviousValue *SecondaryMailsPolicy, NewValue *SecondaryMailsPolicy) *SecondaryMailsPolicyChangedDetails {
20012 s := new(SecondaryMailsPolicyChangedDetails)
20013 s.PreviousValue = PreviousValue
20014 s.NewValue = NewValue
20015 return s
20016 }
20017
20018 // SecondaryMailsPolicyChangedType : has no documentation (yet)
20019 type SecondaryMailsPolicyChangedType struct {
20020 // Description : has no documentation (yet)
20021 Description string `json:"description"`
20022 }
20023
20024 // NewSecondaryMailsPolicyChangedType returns a new SecondaryMailsPolicyChangedType instance
20025 func NewSecondaryMailsPolicyChangedType(Description string) *SecondaryMailsPolicyChangedType {
20026 s := new(SecondaryMailsPolicyChangedType)
20027 s.Description = Description
20028 return s
20029 }
20030
20031 // SecondaryTeamRequestAcceptedDetails : Team merge request acceptance details
20032 // shown to the secondary team
20033 type SecondaryTeamRequestAcceptedDetails struct {
20034 // PrimaryTeam : The primary team name.
20035 PrimaryTeam string `json:"primary_team"`
20036 // SentBy : The name of the secondary team admin who sent the request
20037 // originally.
20038 SentBy string `json:"sent_by"`
20039 }
20040
20041 // NewSecondaryTeamRequestAcceptedDetails returns a new SecondaryTeamRequestAcceptedDetails instance
20042 func NewSecondaryTeamRequestAcceptedDetails(PrimaryTeam string, SentBy string) *SecondaryTeamRequestAcceptedDetails {
20043 s := new(SecondaryTeamRequestAcceptedDetails)
20044 s.PrimaryTeam = PrimaryTeam
20045 s.SentBy = SentBy
20046 return s
20047 }
20048
20049 // SecondaryTeamRequestCanceledDetails : Team merge request cancellation details
20050 // shown to the secondary team
20051 type SecondaryTeamRequestCanceledDetails struct {
20052 // SentTo : The email of the primary team admin that the request was sent
20053 // to.
20054 SentTo string `json:"sent_to"`
20055 // SentBy : The name of the secondary team admin who sent the request
20056 // originally.
20057 SentBy string `json:"sent_by"`
20058 }
20059
20060 // NewSecondaryTeamRequestCanceledDetails returns a new SecondaryTeamRequestCanceledDetails instance
20061 func NewSecondaryTeamRequestCanceledDetails(SentTo string, SentBy string) *SecondaryTeamRequestCanceledDetails {
20062 s := new(SecondaryTeamRequestCanceledDetails)
20063 s.SentTo = SentTo
20064 s.SentBy = SentBy
20065 return s
20066 }
20067
20068 // SecondaryTeamRequestExpiredDetails : Team merge request expiration details
20069 // shown to the secondary team
20070 type SecondaryTeamRequestExpiredDetails struct {
20071 // SentTo : The email of the primary team admin the request was sent to.
20072 SentTo string `json:"sent_to"`
20073 }
20074
20075 // NewSecondaryTeamRequestExpiredDetails returns a new SecondaryTeamRequestExpiredDetails instance
20076 func NewSecondaryTeamRequestExpiredDetails(SentTo string) *SecondaryTeamRequestExpiredDetails {
20077 s := new(SecondaryTeamRequestExpiredDetails)
20078 s.SentTo = SentTo
20079 return s
20080 }
20081
20082 // SecondaryTeamRequestReminderDetails : Team merge request reminder details
20083 // shown to the secondary team
20084 type SecondaryTeamRequestReminderDetails struct {
20085 // SentTo : The email of the primary team admin the request was sent to.
20086 SentTo string `json:"sent_to"`
20087 }
20088
20089 // NewSecondaryTeamRequestReminderDetails returns a new SecondaryTeamRequestReminderDetails instance
20090 func NewSecondaryTeamRequestReminderDetails(SentTo string) *SecondaryTeamRequestReminderDetails {
20091 s := new(SecondaryTeamRequestReminderDetails)
20092 s.SentTo = SentTo
20093 return s
20094 }
20095
20096 // SendForSignaturePolicy : Policy for controlling team access to send for
20097 // signature feature
20098 type SendForSignaturePolicy struct {
20099 dropbox.Tagged
20100 }
20101
20102 // Valid tag values for SendForSignaturePolicy
20103 const (
20104 SendForSignaturePolicyDisabled = "disabled"
20105 SendForSignaturePolicyEnabled = "enabled"
20106 SendForSignaturePolicyOther = "other"
20107 )
20108
20109 // SendForSignaturePolicyChangedDetails : Changed send for signature policy for
20110 // team.
20111 type SendForSignaturePolicyChangedDetails struct {
20112 // NewValue : New send for signature policy.
20113 NewValue *SendForSignaturePolicy `json:"new_value"`
20114 // PreviousValue : Previous send for signature policy.
20115 PreviousValue *SendForSignaturePolicy `json:"previous_value"`
20116 }
20117
20118 // NewSendForSignaturePolicyChangedDetails returns a new SendForSignaturePolicyChangedDetails instance
20119 func NewSendForSignaturePolicyChangedDetails(NewValue *SendForSignaturePolicy, PreviousValue *SendForSignaturePolicy) *SendForSignaturePolicyChangedDetails {
20120 s := new(SendForSignaturePolicyChangedDetails)
20121 s.NewValue = NewValue
20122 s.PreviousValue = PreviousValue
20123 return s
20124 }
20125
20126 // SendForSignaturePolicyChangedType : has no documentation (yet)
20127 type SendForSignaturePolicyChangedType struct {
20128 // Description : has no documentation (yet)
20129 Description string `json:"description"`
20130 }
20131
20132 // NewSendForSignaturePolicyChangedType returns a new SendForSignaturePolicyChangedType instance
20133 func NewSendForSignaturePolicyChangedType(Description string) *SendForSignaturePolicyChangedType {
20134 s := new(SendForSignaturePolicyChangedType)
20135 s.Description = Description
20136 return s
20137 }
20138
20139 // SfAddGroupDetails : Added team to shared folder.
20140 type SfAddGroupDetails struct {
20141 // TargetAssetIndex : Target asset position in the Assets list.
20142 TargetAssetIndex uint64 `json:"target_asset_index"`
20143 // OriginalFolderName : Original shared folder name.
20144 OriginalFolderName string `json:"original_folder_name"`
20145 // SharingPermission : Sharing permission.
20146 SharingPermission string `json:"sharing_permission,omitempty"`
20147 // TeamName : Team name.
20148 TeamName string `json:"team_name"`
20149 }
20150
20151 // NewSfAddGroupDetails returns a new SfAddGroupDetails instance
20152 func NewSfAddGroupDetails(TargetAssetIndex uint64, OriginalFolderName string, TeamName string) *SfAddGroupDetails {
20153 s := new(SfAddGroupDetails)
20154 s.TargetAssetIndex = TargetAssetIndex
20155 s.OriginalFolderName = OriginalFolderName
20156 s.TeamName = TeamName
20157 return s
20158 }
20159
20160 // SfAddGroupType : has no documentation (yet)
20161 type SfAddGroupType struct {
20162 // Description : has no documentation (yet)
20163 Description string `json:"description"`
20164 }
20165
20166 // NewSfAddGroupType returns a new SfAddGroupType instance
20167 func NewSfAddGroupType(Description string) *SfAddGroupType {
20168 s := new(SfAddGroupType)
20169 s.Description = Description
20170 return s
20171 }
20172
20173 // SfAllowNonMembersToViewSharedLinksDetails : Allowed non-collaborators to view
20174 // links to files in shared folder.
20175 type SfAllowNonMembersToViewSharedLinksDetails struct {
20176 // TargetAssetIndex : Target asset position in the Assets list.
20177 TargetAssetIndex uint64 `json:"target_asset_index"`
20178 // OriginalFolderName : Original shared folder name.
20179 OriginalFolderName string `json:"original_folder_name"`
20180 // SharedFolderType : Shared folder type.
20181 SharedFolderType string `json:"shared_folder_type,omitempty"`
20182 }
20183
20184 // NewSfAllowNonMembersToViewSharedLinksDetails returns a new SfAllowNonMembersToViewSharedLinksDetails instance
20185 func NewSfAllowNonMembersToViewSharedLinksDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfAllowNonMembersToViewSharedLinksDetails {
20186 s := new(SfAllowNonMembersToViewSharedLinksDetails)
20187 s.TargetAssetIndex = TargetAssetIndex
20188 s.OriginalFolderName = OriginalFolderName
20189 return s
20190 }
20191
20192 // SfAllowNonMembersToViewSharedLinksType : has no documentation (yet)
20193 type SfAllowNonMembersToViewSharedLinksType struct {
20194 // Description : has no documentation (yet)
20195 Description string `json:"description"`
20196 }
20197
20198 // NewSfAllowNonMembersToViewSharedLinksType returns a new SfAllowNonMembersToViewSharedLinksType instance
20199 func NewSfAllowNonMembersToViewSharedLinksType(Description string) *SfAllowNonMembersToViewSharedLinksType {
20200 s := new(SfAllowNonMembersToViewSharedLinksType)
20201 s.Description = Description
20202 return s
20203 }
20204
20205 // SfExternalInviteWarnDetails : Set team members to see warning before sharing
20206 // folders outside team.
20207 type SfExternalInviteWarnDetails struct {
20208 // TargetAssetIndex : Target asset position in the Assets list.
20209 TargetAssetIndex uint64 `json:"target_asset_index"`
20210 // OriginalFolderName : Original shared folder name.
20211 OriginalFolderName string `json:"original_folder_name"`
20212 // NewSharingPermission : New sharing permission.
20213 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
20214 // PreviousSharingPermission : Previous sharing permission.
20215 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
20216 }
20217
20218 // NewSfExternalInviteWarnDetails returns a new SfExternalInviteWarnDetails instance
20219 func NewSfExternalInviteWarnDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfExternalInviteWarnDetails {
20220 s := new(SfExternalInviteWarnDetails)
20221 s.TargetAssetIndex = TargetAssetIndex
20222 s.OriginalFolderName = OriginalFolderName
20223 return s
20224 }
20225
20226 // SfExternalInviteWarnType : has no documentation (yet)
20227 type SfExternalInviteWarnType struct {
20228 // Description : has no documentation (yet)
20229 Description string `json:"description"`
20230 }
20231
20232 // NewSfExternalInviteWarnType returns a new SfExternalInviteWarnType instance
20233 func NewSfExternalInviteWarnType(Description string) *SfExternalInviteWarnType {
20234 s := new(SfExternalInviteWarnType)
20235 s.Description = Description
20236 return s
20237 }
20238
20239 // SfFbInviteChangeRoleDetails : Changed Facebook user's role in shared folder.
20240 type SfFbInviteChangeRoleDetails struct {
20241 // TargetAssetIndex : Target asset position in the Assets list.
20242 TargetAssetIndex uint64 `json:"target_asset_index"`
20243 // OriginalFolderName : Original shared folder name.
20244 OriginalFolderName string `json:"original_folder_name"`
20245 // PreviousSharingPermission : Previous sharing permission.
20246 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
20247 // NewSharingPermission : New sharing permission.
20248 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
20249 }
20250
20251 // NewSfFbInviteChangeRoleDetails returns a new SfFbInviteChangeRoleDetails instance
20252 func NewSfFbInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteChangeRoleDetails {
20253 s := new(SfFbInviteChangeRoleDetails)
20254 s.TargetAssetIndex = TargetAssetIndex
20255 s.OriginalFolderName = OriginalFolderName
20256 return s
20257 }
20258
20259 // SfFbInviteChangeRoleType : has no documentation (yet)
20260 type SfFbInviteChangeRoleType struct {
20261 // Description : has no documentation (yet)
20262 Description string `json:"description"`
20263 }
20264
20265 // NewSfFbInviteChangeRoleType returns a new SfFbInviteChangeRoleType instance
20266 func NewSfFbInviteChangeRoleType(Description string) *SfFbInviteChangeRoleType {
20267 s := new(SfFbInviteChangeRoleType)
20268 s.Description = Description
20269 return s
20270 }
20271
20272 // SfFbInviteDetails : Invited Facebook users to shared folder.
20273 type SfFbInviteDetails struct {
20274 // TargetAssetIndex : Target asset position in the Assets list.
20275 TargetAssetIndex uint64 `json:"target_asset_index"`
20276 // OriginalFolderName : Original shared folder name.
20277 OriginalFolderName string `json:"original_folder_name"`
20278 // SharingPermission : Sharing permission.
20279 SharingPermission string `json:"sharing_permission,omitempty"`
20280 }
20281
20282 // NewSfFbInviteDetails returns a new SfFbInviteDetails instance
20283 func NewSfFbInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteDetails {
20284 s := new(SfFbInviteDetails)
20285 s.TargetAssetIndex = TargetAssetIndex
20286 s.OriginalFolderName = OriginalFolderName
20287 return s
20288 }
20289
20290 // SfFbInviteType : has no documentation (yet)
20291 type SfFbInviteType struct {
20292 // Description : has no documentation (yet)
20293 Description string `json:"description"`
20294 }
20295
20296 // NewSfFbInviteType returns a new SfFbInviteType instance
20297 func NewSfFbInviteType(Description string) *SfFbInviteType {
20298 s := new(SfFbInviteType)
20299 s.Description = Description
20300 return s
20301 }
20302
20303 // SfFbUninviteDetails : Uninvited Facebook user from shared folder.
20304 type SfFbUninviteDetails struct {
20305 // TargetAssetIndex : Target asset position in the Assets list.
20306 TargetAssetIndex uint64 `json:"target_asset_index"`
20307 // OriginalFolderName : Original shared folder name.
20308 OriginalFolderName string `json:"original_folder_name"`
20309 }
20310
20311 // NewSfFbUninviteDetails returns a new SfFbUninviteDetails instance
20312 func NewSfFbUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbUninviteDetails {
20313 s := new(SfFbUninviteDetails)
20314 s.TargetAssetIndex = TargetAssetIndex
20315 s.OriginalFolderName = OriginalFolderName
20316 return s
20317 }
20318
20319 // SfFbUninviteType : has no documentation (yet)
20320 type SfFbUninviteType struct {
20321 // Description : has no documentation (yet)
20322 Description string `json:"description"`
20323 }
20324
20325 // NewSfFbUninviteType returns a new SfFbUninviteType instance
20326 func NewSfFbUninviteType(Description string) *SfFbUninviteType {
20327 s := new(SfFbUninviteType)
20328 s.Description = Description
20329 return s
20330 }
20331
20332 // SfInviteGroupDetails : Invited group to shared folder.
20333 type SfInviteGroupDetails struct {
20334 // TargetAssetIndex : Target asset position in the Assets list.
20335 TargetAssetIndex uint64 `json:"target_asset_index"`
20336 }
20337
20338 // NewSfInviteGroupDetails returns a new SfInviteGroupDetails instance
20339 func NewSfInviteGroupDetails(TargetAssetIndex uint64) *SfInviteGroupDetails {
20340 s := new(SfInviteGroupDetails)
20341 s.TargetAssetIndex = TargetAssetIndex
20342 return s
20343 }
20344
20345 // SfInviteGroupType : has no documentation (yet)
20346 type SfInviteGroupType struct {
20347 // Description : has no documentation (yet)
20348 Description string `json:"description"`
20349 }
20350
20351 // NewSfInviteGroupType returns a new SfInviteGroupType instance
20352 func NewSfInviteGroupType(Description string) *SfInviteGroupType {
20353 s := new(SfInviteGroupType)
20354 s.Description = Description
20355 return s
20356 }
20357
20358 // SfTeamGrantAccessDetails : Granted access to shared folder.
20359 type SfTeamGrantAccessDetails struct {
20360 // TargetAssetIndex : Target asset position in the Assets list.
20361 TargetAssetIndex uint64 `json:"target_asset_index"`
20362 // OriginalFolderName : Original shared folder name.
20363 OriginalFolderName string `json:"original_folder_name"`
20364 }
20365
20366 // NewSfTeamGrantAccessDetails returns a new SfTeamGrantAccessDetails instance
20367 func NewSfTeamGrantAccessDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamGrantAccessDetails {
20368 s := new(SfTeamGrantAccessDetails)
20369 s.TargetAssetIndex = TargetAssetIndex
20370 s.OriginalFolderName = OriginalFolderName
20371 return s
20372 }
20373
20374 // SfTeamGrantAccessType : has no documentation (yet)
20375 type SfTeamGrantAccessType struct {
20376 // Description : has no documentation (yet)
20377 Description string `json:"description"`
20378 }
20379
20380 // NewSfTeamGrantAccessType returns a new SfTeamGrantAccessType instance
20381 func NewSfTeamGrantAccessType(Description string) *SfTeamGrantAccessType {
20382 s := new(SfTeamGrantAccessType)
20383 s.Description = Description
20384 return s
20385 }
20386
20387 // SfTeamInviteChangeRoleDetails : Changed team member's role in shared folder.
20388 type SfTeamInviteChangeRoleDetails struct {
20389 // TargetAssetIndex : Target asset position in the Assets list.
20390 TargetAssetIndex uint64 `json:"target_asset_index"`
20391 // OriginalFolderName : Original shared folder name.
20392 OriginalFolderName string `json:"original_folder_name"`
20393 // NewSharingPermission : New sharing permission.
20394 NewSharingPermission string `json:"new_sharing_permission,omitempty"`
20395 // PreviousSharingPermission : Previous sharing permission.
20396 PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"`
20397 }
20398
20399 // NewSfTeamInviteChangeRoleDetails returns a new SfTeamInviteChangeRoleDetails instance
20400 func NewSfTeamInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteChangeRoleDetails {
20401 s := new(SfTeamInviteChangeRoleDetails)
20402 s.TargetAssetIndex = TargetAssetIndex
20403 s.OriginalFolderName = OriginalFolderName
20404 return s
20405 }
20406
20407 // SfTeamInviteChangeRoleType : has no documentation (yet)
20408 type SfTeamInviteChangeRoleType struct {
20409 // Description : has no documentation (yet)
20410 Description string `json:"description"`
20411 }
20412
20413 // NewSfTeamInviteChangeRoleType returns a new SfTeamInviteChangeRoleType instance
20414 func NewSfTeamInviteChangeRoleType(Description string) *SfTeamInviteChangeRoleType {
20415 s := new(SfTeamInviteChangeRoleType)
20416 s.Description = Description
20417 return s
20418 }
20419
20420 // SfTeamInviteDetails : Invited team members to shared folder.
20421 type SfTeamInviteDetails struct {
20422 // TargetAssetIndex : Target asset position in the Assets list.
20423 TargetAssetIndex uint64 `json:"target_asset_index"`
20424 // OriginalFolderName : Original shared folder name.
20425 OriginalFolderName string `json:"original_folder_name"`
20426 // SharingPermission : Sharing permission.
20427 SharingPermission string `json:"sharing_permission,omitempty"`
20428 }
20429
20430 // NewSfTeamInviteDetails returns a new SfTeamInviteDetails instance
20431 func NewSfTeamInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteDetails {
20432 s := new(SfTeamInviteDetails)
20433 s.TargetAssetIndex = TargetAssetIndex
20434 s.OriginalFolderName = OriginalFolderName
20435 return s
20436 }
20437
20438 // SfTeamInviteType : has no documentation (yet)
20439 type SfTeamInviteType struct {
20440 // Description : has no documentation (yet)
20441 Description string `json:"description"`
20442 }
20443
20444 // NewSfTeamInviteType returns a new SfTeamInviteType instance
20445 func NewSfTeamInviteType(Description string) *SfTeamInviteType {
20446 s := new(SfTeamInviteType)
20447 s.Description = Description
20448 return s
20449 }
20450
20451 // SfTeamJoinDetails : Joined team member's shared folder.
20452 type SfTeamJoinDetails struct {
20453 // TargetAssetIndex : Target asset position in the Assets list.
20454 TargetAssetIndex uint64 `json:"target_asset_index"`
20455 // OriginalFolderName : Original shared folder name.
20456 OriginalFolderName string `json:"original_folder_name"`
20457 }
20458
20459 // NewSfTeamJoinDetails returns a new SfTeamJoinDetails instance
20460 func NewSfTeamJoinDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinDetails {
20461 s := new(SfTeamJoinDetails)
20462 s.TargetAssetIndex = TargetAssetIndex
20463 s.OriginalFolderName = OriginalFolderName
20464 return s
20465 }
20466
20467 // SfTeamJoinFromOobLinkDetails : Joined team member's shared folder from link.
20468 type SfTeamJoinFromOobLinkDetails struct {
20469 // TargetAssetIndex : Target asset position in the Assets list.
20470 TargetAssetIndex uint64 `json:"target_asset_index"`
20471 // OriginalFolderName : Original shared folder name.
20472 OriginalFolderName string `json:"original_folder_name"`
20473 // TokenKey : Shared link token key.
20474 TokenKey string `json:"token_key,omitempty"`
20475 // SharingPermission : Sharing permission.
20476 SharingPermission string `json:"sharing_permission,omitempty"`
20477 }
20478
20479 // NewSfTeamJoinFromOobLinkDetails returns a new SfTeamJoinFromOobLinkDetails instance
20480 func NewSfTeamJoinFromOobLinkDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinFromOobLinkDetails {
20481 s := new(SfTeamJoinFromOobLinkDetails)
20482 s.TargetAssetIndex = TargetAssetIndex
20483 s.OriginalFolderName = OriginalFolderName
20484 return s
20485 }
20486
20487 // SfTeamJoinFromOobLinkType : has no documentation (yet)
20488 type SfTeamJoinFromOobLinkType struct {
20489 // Description : has no documentation (yet)
20490 Description string `json:"description"`
20491 }
20492
20493 // NewSfTeamJoinFromOobLinkType returns a new SfTeamJoinFromOobLinkType instance
20494 func NewSfTeamJoinFromOobLinkType(Description string) *SfTeamJoinFromOobLinkType {
20495 s := new(SfTeamJoinFromOobLinkType)
20496 s.Description = Description
20497 return s
20498 }
20499
20500 // SfTeamJoinType : has no documentation (yet)
20501 type SfTeamJoinType struct {
20502 // Description : has no documentation (yet)
20503 Description string `json:"description"`
20504 }
20505
20506 // NewSfTeamJoinType returns a new SfTeamJoinType instance
20507 func NewSfTeamJoinType(Description string) *SfTeamJoinType {
20508 s := new(SfTeamJoinType)
20509 s.Description = Description
20510 return s
20511 }
20512
20513 // SfTeamUninviteDetails : Unshared folder with team member.
20514 type SfTeamUninviteDetails struct {
20515 // TargetAssetIndex : Target asset position in the Assets list.
20516 TargetAssetIndex uint64 `json:"target_asset_index"`
20517 // OriginalFolderName : Original shared folder name.
20518 OriginalFolderName string `json:"original_folder_name"`
20519 }
20520
20521 // NewSfTeamUninviteDetails returns a new SfTeamUninviteDetails instance
20522 func NewSfTeamUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamUninviteDetails {
20523 s := new(SfTeamUninviteDetails)
20524 s.TargetAssetIndex = TargetAssetIndex
20525 s.OriginalFolderName = OriginalFolderName
20526 return s
20527 }
20528
20529 // SfTeamUninviteType : has no documentation (yet)
20530 type SfTeamUninviteType struct {
20531 // Description : has no documentation (yet)
20532 Description string `json:"description"`
20533 }
20534
20535 // NewSfTeamUninviteType returns a new SfTeamUninviteType instance
20536 func NewSfTeamUninviteType(Description string) *SfTeamUninviteType {
20537 s := new(SfTeamUninviteType)
20538 s.Description = Description
20539 return s
20540 }
20541
20542 // SharedContentAddInviteesDetails : Invited user to Dropbox and added them to
20543 // shared file/folder.
20544 type SharedContentAddInviteesDetails struct {
20545 // SharedContentAccessLevel : Shared content access level.
20546 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
20547 // Invitees : A list of invitees.
20548 Invitees []string `json:"invitees"`
20549 }
20550
20551 // NewSharedContentAddInviteesDetails returns a new SharedContentAddInviteesDetails instance
20552 func NewSharedContentAddInviteesDetails(SharedContentAccessLevel *sharing.AccessLevel, Invitees []string) *SharedContentAddInviteesDetails {
20553 s := new(SharedContentAddInviteesDetails)
20554 s.SharedContentAccessLevel = SharedContentAccessLevel
20555 s.Invitees = Invitees
20556 return s
20557 }
20558
20559 // SharedContentAddInviteesType : has no documentation (yet)
20560 type SharedContentAddInviteesType struct {
20561 // Description : has no documentation (yet)
20562 Description string `json:"description"`
20563 }
20564
20565 // NewSharedContentAddInviteesType returns a new SharedContentAddInviteesType instance
20566 func NewSharedContentAddInviteesType(Description string) *SharedContentAddInviteesType {
20567 s := new(SharedContentAddInviteesType)
20568 s.Description = Description
20569 return s
20570 }
20571
20572 // SharedContentAddLinkExpiryDetails : Added expiration date to link for shared
20573 // file/folder.
20574 type SharedContentAddLinkExpiryDetails struct {
20575 // NewValue : New shared content link expiration date. Might be missing due
20576 // to historical data gap.
20577 NewValue *time.Time `json:"new_value,omitempty"`
20578 }
20579
20580 // NewSharedContentAddLinkExpiryDetails returns a new SharedContentAddLinkExpiryDetails instance
20581 func NewSharedContentAddLinkExpiryDetails() *SharedContentAddLinkExpiryDetails {
20582 s := new(SharedContentAddLinkExpiryDetails)
20583 return s
20584 }
20585
20586 // SharedContentAddLinkExpiryType : has no documentation (yet)
20587 type SharedContentAddLinkExpiryType struct {
20588 // Description : has no documentation (yet)
20589 Description string `json:"description"`
20590 }
20591
20592 // NewSharedContentAddLinkExpiryType returns a new SharedContentAddLinkExpiryType instance
20593 func NewSharedContentAddLinkExpiryType(Description string) *SharedContentAddLinkExpiryType {
20594 s := new(SharedContentAddLinkExpiryType)
20595 s.Description = Description
20596 return s
20597 }
20598
20599 // SharedContentAddLinkPasswordDetails : Added password to link for shared
20600 // file/folder.
20601 type SharedContentAddLinkPasswordDetails struct {
20602 }
20603
20604 // NewSharedContentAddLinkPasswordDetails returns a new SharedContentAddLinkPasswordDetails instance
20605 func NewSharedContentAddLinkPasswordDetails() *SharedContentAddLinkPasswordDetails {
20606 s := new(SharedContentAddLinkPasswordDetails)
20607 return s
20608 }
20609
20610 // SharedContentAddLinkPasswordType : has no documentation (yet)
20611 type SharedContentAddLinkPasswordType struct {
20612 // Description : has no documentation (yet)
20613 Description string `json:"description"`
20614 }
20615
20616 // NewSharedContentAddLinkPasswordType returns a new SharedContentAddLinkPasswordType instance
20617 func NewSharedContentAddLinkPasswordType(Description string) *SharedContentAddLinkPasswordType {
20618 s := new(SharedContentAddLinkPasswordType)
20619 s.Description = Description
20620 return s
20621 }
20622
20623 // SharedContentAddMemberDetails : Added users and/or groups to shared
20624 // file/folder.
20625 type SharedContentAddMemberDetails struct {
20626 // SharedContentAccessLevel : Shared content access level.
20627 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
20628 }
20629
20630 // NewSharedContentAddMemberDetails returns a new SharedContentAddMemberDetails instance
20631 func NewSharedContentAddMemberDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedContentAddMemberDetails {
20632 s := new(SharedContentAddMemberDetails)
20633 s.SharedContentAccessLevel = SharedContentAccessLevel
20634 return s
20635 }
20636
20637 // SharedContentAddMemberType : has no documentation (yet)
20638 type SharedContentAddMemberType struct {
20639 // Description : has no documentation (yet)
20640 Description string `json:"description"`
20641 }
20642
20643 // NewSharedContentAddMemberType returns a new SharedContentAddMemberType instance
20644 func NewSharedContentAddMemberType(Description string) *SharedContentAddMemberType {
20645 s := new(SharedContentAddMemberType)
20646 s.Description = Description
20647 return s
20648 }
20649
20650 // SharedContentChangeDownloadsPolicyDetails : Changed whether members can
20651 // download shared file/folder.
20652 type SharedContentChangeDownloadsPolicyDetails struct {
20653 // NewValue : New downloads policy.
20654 NewValue *DownloadPolicyType `json:"new_value"`
20655 // PreviousValue : Previous downloads policy. Might be missing due to
20656 // historical data gap.
20657 PreviousValue *DownloadPolicyType `json:"previous_value,omitempty"`
20658 }
20659
20660 // NewSharedContentChangeDownloadsPolicyDetails returns a new SharedContentChangeDownloadsPolicyDetails instance
20661 func NewSharedContentChangeDownloadsPolicyDetails(NewValue *DownloadPolicyType) *SharedContentChangeDownloadsPolicyDetails {
20662 s := new(SharedContentChangeDownloadsPolicyDetails)
20663 s.NewValue = NewValue
20664 return s
20665 }
20666
20667 // SharedContentChangeDownloadsPolicyType : has no documentation (yet)
20668 type SharedContentChangeDownloadsPolicyType struct {
20669 // Description : has no documentation (yet)
20670 Description string `json:"description"`
20671 }
20672
20673 // NewSharedContentChangeDownloadsPolicyType returns a new SharedContentChangeDownloadsPolicyType instance
20674 func NewSharedContentChangeDownloadsPolicyType(Description string) *SharedContentChangeDownloadsPolicyType {
20675 s := new(SharedContentChangeDownloadsPolicyType)
20676 s.Description = Description
20677 return s
20678 }
20679
20680 // SharedContentChangeInviteeRoleDetails : Changed access type of invitee to
20681 // shared file/folder before invite was accepted.
20682 type SharedContentChangeInviteeRoleDetails struct {
20683 // PreviousAccessLevel : Previous access level. Might be missing due to
20684 // historical data gap.
20685 PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"`
20686 // NewAccessLevel : New access level.
20687 NewAccessLevel *sharing.AccessLevel `json:"new_access_level"`
20688 // Invitee : The invitee whose role was changed.
20689 Invitee string `json:"invitee"`
20690 }
20691
20692 // NewSharedContentChangeInviteeRoleDetails returns a new SharedContentChangeInviteeRoleDetails instance
20693 func NewSharedContentChangeInviteeRoleDetails(NewAccessLevel *sharing.AccessLevel, Invitee string) *SharedContentChangeInviteeRoleDetails {
20694 s := new(SharedContentChangeInviteeRoleDetails)
20695 s.NewAccessLevel = NewAccessLevel
20696 s.Invitee = Invitee
20697 return s
20698 }
20699
20700 // SharedContentChangeInviteeRoleType : has no documentation (yet)
20701 type SharedContentChangeInviteeRoleType struct {
20702 // Description : has no documentation (yet)
20703 Description string `json:"description"`
20704 }
20705
20706 // NewSharedContentChangeInviteeRoleType returns a new SharedContentChangeInviteeRoleType instance
20707 func NewSharedContentChangeInviteeRoleType(Description string) *SharedContentChangeInviteeRoleType {
20708 s := new(SharedContentChangeInviteeRoleType)
20709 s.Description = Description
20710 return s
20711 }
20712
20713 // SharedContentChangeLinkAudienceDetails : Changed link audience of shared
20714 // file/folder.
20715 type SharedContentChangeLinkAudienceDetails struct {
20716 // NewValue : New link audience value.
20717 NewValue *sharing.LinkAudience `json:"new_value"`
20718 // PreviousValue : Previous link audience value.
20719 PreviousValue *sharing.LinkAudience `json:"previous_value,omitempty"`
20720 }
20721
20722 // NewSharedContentChangeLinkAudienceDetails returns a new SharedContentChangeLinkAudienceDetails instance
20723 func NewSharedContentChangeLinkAudienceDetails(NewValue *sharing.LinkAudience) *SharedContentChangeLinkAudienceDetails {
20724 s := new(SharedContentChangeLinkAudienceDetails)
20725 s.NewValue = NewValue
20726 return s
20727 }
20728
20729 // SharedContentChangeLinkAudienceType : has no documentation (yet)
20730 type SharedContentChangeLinkAudienceType struct {
20731 // Description : has no documentation (yet)
20732 Description string `json:"description"`
20733 }
20734
20735 // NewSharedContentChangeLinkAudienceType returns a new SharedContentChangeLinkAudienceType instance
20736 func NewSharedContentChangeLinkAudienceType(Description string) *SharedContentChangeLinkAudienceType {
20737 s := new(SharedContentChangeLinkAudienceType)
20738 s.Description = Description
20739 return s
20740 }
20741
20742 // SharedContentChangeLinkExpiryDetails : Changed link expiration of shared
20743 // file/folder.
20744 type SharedContentChangeLinkExpiryDetails struct {
20745 // NewValue : New shared content link expiration date. Might be missing due
20746 // to historical data gap.
20747 NewValue *time.Time `json:"new_value,omitempty"`
20748 // PreviousValue : Previous shared content link expiration date. Might be
20749 // missing due to historical data gap.
20750 PreviousValue *time.Time `json:"previous_value,omitempty"`
20751 }
20752
20753 // NewSharedContentChangeLinkExpiryDetails returns a new SharedContentChangeLinkExpiryDetails instance
20754 func NewSharedContentChangeLinkExpiryDetails() *SharedContentChangeLinkExpiryDetails {
20755 s := new(SharedContentChangeLinkExpiryDetails)
20756 return s
20757 }
20758
20759 // SharedContentChangeLinkExpiryType : has no documentation (yet)
20760 type SharedContentChangeLinkExpiryType struct {
20761 // Description : has no documentation (yet)
20762 Description string `json:"description"`
20763 }
20764
20765 // NewSharedContentChangeLinkExpiryType returns a new SharedContentChangeLinkExpiryType instance
20766 func NewSharedContentChangeLinkExpiryType(Description string) *SharedContentChangeLinkExpiryType {
20767 s := new(SharedContentChangeLinkExpiryType)
20768 s.Description = Description
20769 return s
20770 }
20771
20772 // SharedContentChangeLinkPasswordDetails : Changed link password of shared
20773 // file/folder.
20774 type SharedContentChangeLinkPasswordDetails struct {
20775 }
20776
20777 // NewSharedContentChangeLinkPasswordDetails returns a new SharedContentChangeLinkPasswordDetails instance
20778 func NewSharedContentChangeLinkPasswordDetails() *SharedContentChangeLinkPasswordDetails {
20779 s := new(SharedContentChangeLinkPasswordDetails)
20780 return s
20781 }
20782
20783 // SharedContentChangeLinkPasswordType : has no documentation (yet)
20784 type SharedContentChangeLinkPasswordType struct {
20785 // Description : has no documentation (yet)
20786 Description string `json:"description"`
20787 }
20788
20789 // NewSharedContentChangeLinkPasswordType returns a new SharedContentChangeLinkPasswordType instance
20790 func NewSharedContentChangeLinkPasswordType(Description string) *SharedContentChangeLinkPasswordType {
20791 s := new(SharedContentChangeLinkPasswordType)
20792 s.Description = Description
20793 return s
20794 }
20795
20796 // SharedContentChangeMemberRoleDetails : Changed access type of shared
20797 // file/folder member.
20798 type SharedContentChangeMemberRoleDetails struct {
20799 // PreviousAccessLevel : Previous access level. Might be missing due to
20800 // historical data gap.
20801 PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"`
20802 // NewAccessLevel : New access level.
20803 NewAccessLevel *sharing.AccessLevel `json:"new_access_level"`
20804 }
20805
20806 // NewSharedContentChangeMemberRoleDetails returns a new SharedContentChangeMemberRoleDetails instance
20807 func NewSharedContentChangeMemberRoleDetails(NewAccessLevel *sharing.AccessLevel) *SharedContentChangeMemberRoleDetails {
20808 s := new(SharedContentChangeMemberRoleDetails)
20809 s.NewAccessLevel = NewAccessLevel
20810 return s
20811 }
20812
20813 // SharedContentChangeMemberRoleType : has no documentation (yet)
20814 type SharedContentChangeMemberRoleType struct {
20815 // Description : has no documentation (yet)
20816 Description string `json:"description"`
20817 }
20818
20819 // NewSharedContentChangeMemberRoleType returns a new SharedContentChangeMemberRoleType instance
20820 func NewSharedContentChangeMemberRoleType(Description string) *SharedContentChangeMemberRoleType {
20821 s := new(SharedContentChangeMemberRoleType)
20822 s.Description = Description
20823 return s
20824 }
20825
20826 // SharedContentChangeViewerInfoPolicyDetails : Changed whether members can see
20827 // who viewed shared file/folder.
20828 type SharedContentChangeViewerInfoPolicyDetails struct {
20829 // NewValue : New viewer info policy.
20830 NewValue *sharing.ViewerInfoPolicy `json:"new_value"`
20831 // PreviousValue : Previous view info policy.
20832 PreviousValue *sharing.ViewerInfoPolicy `json:"previous_value,omitempty"`
20833 }
20834
20835 // NewSharedContentChangeViewerInfoPolicyDetails returns a new SharedContentChangeViewerInfoPolicyDetails instance
20836 func NewSharedContentChangeViewerInfoPolicyDetails(NewValue *sharing.ViewerInfoPolicy) *SharedContentChangeViewerInfoPolicyDetails {
20837 s := new(SharedContentChangeViewerInfoPolicyDetails)
20838 s.NewValue = NewValue
20839 return s
20840 }
20841
20842 // SharedContentChangeViewerInfoPolicyType : has no documentation (yet)
20843 type SharedContentChangeViewerInfoPolicyType struct {
20844 // Description : has no documentation (yet)
20845 Description string `json:"description"`
20846 }
20847
20848 // NewSharedContentChangeViewerInfoPolicyType returns a new SharedContentChangeViewerInfoPolicyType instance
20849 func NewSharedContentChangeViewerInfoPolicyType(Description string) *SharedContentChangeViewerInfoPolicyType {
20850 s := new(SharedContentChangeViewerInfoPolicyType)
20851 s.Description = Description
20852 return s
20853 }
20854
20855 // SharedContentClaimInvitationDetails : Acquired membership of shared
20856 // file/folder by accepting invite.
20857 type SharedContentClaimInvitationDetails struct {
20858 // SharedContentLink : Shared content link.
20859 SharedContentLink string `json:"shared_content_link,omitempty"`
20860 }
20861
20862 // NewSharedContentClaimInvitationDetails returns a new SharedContentClaimInvitationDetails instance
20863 func NewSharedContentClaimInvitationDetails() *SharedContentClaimInvitationDetails {
20864 s := new(SharedContentClaimInvitationDetails)
20865 return s
20866 }
20867
20868 // SharedContentClaimInvitationType : has no documentation (yet)
20869 type SharedContentClaimInvitationType struct {
20870 // Description : has no documentation (yet)
20871 Description string `json:"description"`
20872 }
20873
20874 // NewSharedContentClaimInvitationType returns a new SharedContentClaimInvitationType instance
20875 func NewSharedContentClaimInvitationType(Description string) *SharedContentClaimInvitationType {
20876 s := new(SharedContentClaimInvitationType)
20877 s.Description = Description
20878 return s
20879 }
20880
20881 // SharedContentCopyDetails : Copied shared file/folder to own Dropbox.
20882 type SharedContentCopyDetails struct {
20883 // SharedContentLink : Shared content link.
20884 SharedContentLink string `json:"shared_content_link"`
20885 // SharedContentOwner : The shared content owner.
20886 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
20887 // SharedContentAccessLevel : Shared content access level.
20888 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
20889 // DestinationPath : The path where the member saved the content.
20890 DestinationPath string `json:"destination_path"`
20891 }
20892
20893 // NewSharedContentCopyDetails returns a new SharedContentCopyDetails instance
20894 func NewSharedContentCopyDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel, DestinationPath string) *SharedContentCopyDetails {
20895 s := new(SharedContentCopyDetails)
20896 s.SharedContentLink = SharedContentLink
20897 s.SharedContentAccessLevel = SharedContentAccessLevel
20898 s.DestinationPath = DestinationPath
20899 return s
20900 }
20901
20902 // SharedContentCopyType : has no documentation (yet)
20903 type SharedContentCopyType struct {
20904 // Description : has no documentation (yet)
20905 Description string `json:"description"`
20906 }
20907
20908 // NewSharedContentCopyType returns a new SharedContentCopyType instance
20909 func NewSharedContentCopyType(Description string) *SharedContentCopyType {
20910 s := new(SharedContentCopyType)
20911 s.Description = Description
20912 return s
20913 }
20914
20915 // SharedContentDownloadDetails : Downloaded shared file/folder.
20916 type SharedContentDownloadDetails struct {
20917 // SharedContentLink : Shared content link.
20918 SharedContentLink string `json:"shared_content_link"`
20919 // SharedContentOwner : The shared content owner.
20920 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
20921 // SharedContentAccessLevel : Shared content access level.
20922 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
20923 }
20924
20925 // NewSharedContentDownloadDetails returns a new SharedContentDownloadDetails instance
20926 func NewSharedContentDownloadDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentDownloadDetails {
20927 s := new(SharedContentDownloadDetails)
20928 s.SharedContentLink = SharedContentLink
20929 s.SharedContentAccessLevel = SharedContentAccessLevel
20930 return s
20931 }
20932
20933 // SharedContentDownloadType : has no documentation (yet)
20934 type SharedContentDownloadType struct {
20935 // Description : has no documentation (yet)
20936 Description string `json:"description"`
20937 }
20938
20939 // NewSharedContentDownloadType returns a new SharedContentDownloadType instance
20940 func NewSharedContentDownloadType(Description string) *SharedContentDownloadType {
20941 s := new(SharedContentDownloadType)
20942 s.Description = Description
20943 return s
20944 }
20945
20946 // SharedContentRelinquishMembershipDetails : Left shared file/folder.
20947 type SharedContentRelinquishMembershipDetails struct {
20948 }
20949
20950 // NewSharedContentRelinquishMembershipDetails returns a new SharedContentRelinquishMembershipDetails instance
20951 func NewSharedContentRelinquishMembershipDetails() *SharedContentRelinquishMembershipDetails {
20952 s := new(SharedContentRelinquishMembershipDetails)
20953 return s
20954 }
20955
20956 // SharedContentRelinquishMembershipType : has no documentation (yet)
20957 type SharedContentRelinquishMembershipType struct {
20958 // Description : has no documentation (yet)
20959 Description string `json:"description"`
20960 }
20961
20962 // NewSharedContentRelinquishMembershipType returns a new SharedContentRelinquishMembershipType instance
20963 func NewSharedContentRelinquishMembershipType(Description string) *SharedContentRelinquishMembershipType {
20964 s := new(SharedContentRelinquishMembershipType)
20965 s.Description = Description
20966 return s
20967 }
20968
20969 // SharedContentRemoveInviteesDetails : Removed invitee from shared file/folder
20970 // before invite was accepted.
20971 type SharedContentRemoveInviteesDetails struct {
20972 // Invitees : A list of invitees.
20973 Invitees []string `json:"invitees"`
20974 }
20975
20976 // NewSharedContentRemoveInviteesDetails returns a new SharedContentRemoveInviteesDetails instance
20977 func NewSharedContentRemoveInviteesDetails(Invitees []string) *SharedContentRemoveInviteesDetails {
20978 s := new(SharedContentRemoveInviteesDetails)
20979 s.Invitees = Invitees
20980 return s
20981 }
20982
20983 // SharedContentRemoveInviteesType : has no documentation (yet)
20984 type SharedContentRemoveInviteesType struct {
20985 // Description : has no documentation (yet)
20986 Description string `json:"description"`
20987 }
20988
20989 // NewSharedContentRemoveInviteesType returns a new SharedContentRemoveInviteesType instance
20990 func NewSharedContentRemoveInviteesType(Description string) *SharedContentRemoveInviteesType {
20991 s := new(SharedContentRemoveInviteesType)
20992 s.Description = Description
20993 return s
20994 }
20995
20996 // SharedContentRemoveLinkExpiryDetails : Removed link expiration date of shared
20997 // file/folder.
20998 type SharedContentRemoveLinkExpiryDetails struct {
20999 // PreviousValue : Previous shared content link expiration date. Might be
21000 // missing due to historical data gap.
21001 PreviousValue *time.Time `json:"previous_value,omitempty"`
21002 }
21003
21004 // NewSharedContentRemoveLinkExpiryDetails returns a new SharedContentRemoveLinkExpiryDetails instance
21005 func NewSharedContentRemoveLinkExpiryDetails() *SharedContentRemoveLinkExpiryDetails {
21006 s := new(SharedContentRemoveLinkExpiryDetails)
21007 return s
21008 }
21009
21010 // SharedContentRemoveLinkExpiryType : has no documentation (yet)
21011 type SharedContentRemoveLinkExpiryType struct {
21012 // Description : has no documentation (yet)
21013 Description string `json:"description"`
21014 }
21015
21016 // NewSharedContentRemoveLinkExpiryType returns a new SharedContentRemoveLinkExpiryType instance
21017 func NewSharedContentRemoveLinkExpiryType(Description string) *SharedContentRemoveLinkExpiryType {
21018 s := new(SharedContentRemoveLinkExpiryType)
21019 s.Description = Description
21020 return s
21021 }
21022
21023 // SharedContentRemoveLinkPasswordDetails : Removed link password of shared
21024 // file/folder.
21025 type SharedContentRemoveLinkPasswordDetails struct {
21026 }
21027
21028 // NewSharedContentRemoveLinkPasswordDetails returns a new SharedContentRemoveLinkPasswordDetails instance
21029 func NewSharedContentRemoveLinkPasswordDetails() *SharedContentRemoveLinkPasswordDetails {
21030 s := new(SharedContentRemoveLinkPasswordDetails)
21031 return s
21032 }
21033
21034 // SharedContentRemoveLinkPasswordType : has no documentation (yet)
21035 type SharedContentRemoveLinkPasswordType struct {
21036 // Description : has no documentation (yet)
21037 Description string `json:"description"`
21038 }
21039
21040 // NewSharedContentRemoveLinkPasswordType returns a new SharedContentRemoveLinkPasswordType instance
21041 func NewSharedContentRemoveLinkPasswordType(Description string) *SharedContentRemoveLinkPasswordType {
21042 s := new(SharedContentRemoveLinkPasswordType)
21043 s.Description = Description
21044 return s
21045 }
21046
21047 // SharedContentRemoveMemberDetails : Removed user/group from shared
21048 // file/folder.
21049 type SharedContentRemoveMemberDetails struct {
21050 // SharedContentAccessLevel : Shared content access level.
21051 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level,omitempty"`
21052 }
21053
21054 // NewSharedContentRemoveMemberDetails returns a new SharedContentRemoveMemberDetails instance
21055 func NewSharedContentRemoveMemberDetails() *SharedContentRemoveMemberDetails {
21056 s := new(SharedContentRemoveMemberDetails)
21057 return s
21058 }
21059
21060 // SharedContentRemoveMemberType : has no documentation (yet)
21061 type SharedContentRemoveMemberType struct {
21062 // Description : has no documentation (yet)
21063 Description string `json:"description"`
21064 }
21065
21066 // NewSharedContentRemoveMemberType returns a new SharedContentRemoveMemberType instance
21067 func NewSharedContentRemoveMemberType(Description string) *SharedContentRemoveMemberType {
21068 s := new(SharedContentRemoveMemberType)
21069 s.Description = Description
21070 return s
21071 }
21072
21073 // SharedContentRequestAccessDetails : Requested access to shared file/folder.
21074 type SharedContentRequestAccessDetails struct {
21075 // SharedContentLink : Shared content link.
21076 SharedContentLink string `json:"shared_content_link,omitempty"`
21077 }
21078
21079 // NewSharedContentRequestAccessDetails returns a new SharedContentRequestAccessDetails instance
21080 func NewSharedContentRequestAccessDetails() *SharedContentRequestAccessDetails {
21081 s := new(SharedContentRequestAccessDetails)
21082 return s
21083 }
21084
21085 // SharedContentRequestAccessType : has no documentation (yet)
21086 type SharedContentRequestAccessType struct {
21087 // Description : has no documentation (yet)
21088 Description string `json:"description"`
21089 }
21090
21091 // NewSharedContentRequestAccessType returns a new SharedContentRequestAccessType instance
21092 func NewSharedContentRequestAccessType(Description string) *SharedContentRequestAccessType {
21093 s := new(SharedContentRequestAccessType)
21094 s.Description = Description
21095 return s
21096 }
21097
21098 // SharedContentRestoreInviteesDetails : Restored shared file/folder invitees.
21099 type SharedContentRestoreInviteesDetails struct {
21100 // SharedContentAccessLevel : Shared content access level.
21101 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21102 // Invitees : A list of invitees.
21103 Invitees []string `json:"invitees"`
21104 }
21105
21106 // NewSharedContentRestoreInviteesDetails returns a new SharedContentRestoreInviteesDetails instance
21107 func NewSharedContentRestoreInviteesDetails(SharedContentAccessLevel *sharing.AccessLevel, Invitees []string) *SharedContentRestoreInviteesDetails {
21108 s := new(SharedContentRestoreInviteesDetails)
21109 s.SharedContentAccessLevel = SharedContentAccessLevel
21110 s.Invitees = Invitees
21111 return s
21112 }
21113
21114 // SharedContentRestoreInviteesType : has no documentation (yet)
21115 type SharedContentRestoreInviteesType struct {
21116 // Description : has no documentation (yet)
21117 Description string `json:"description"`
21118 }
21119
21120 // NewSharedContentRestoreInviteesType returns a new SharedContentRestoreInviteesType instance
21121 func NewSharedContentRestoreInviteesType(Description string) *SharedContentRestoreInviteesType {
21122 s := new(SharedContentRestoreInviteesType)
21123 s.Description = Description
21124 return s
21125 }
21126
21127 // SharedContentRestoreMemberDetails : Restored users and/or groups to
21128 // membership of shared file/folder.
21129 type SharedContentRestoreMemberDetails struct {
21130 // SharedContentAccessLevel : Shared content access level.
21131 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21132 }
21133
21134 // NewSharedContentRestoreMemberDetails returns a new SharedContentRestoreMemberDetails instance
21135 func NewSharedContentRestoreMemberDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedContentRestoreMemberDetails {
21136 s := new(SharedContentRestoreMemberDetails)
21137 s.SharedContentAccessLevel = SharedContentAccessLevel
21138 return s
21139 }
21140
21141 // SharedContentRestoreMemberType : has no documentation (yet)
21142 type SharedContentRestoreMemberType struct {
21143 // Description : has no documentation (yet)
21144 Description string `json:"description"`
21145 }
21146
21147 // NewSharedContentRestoreMemberType returns a new SharedContentRestoreMemberType instance
21148 func NewSharedContentRestoreMemberType(Description string) *SharedContentRestoreMemberType {
21149 s := new(SharedContentRestoreMemberType)
21150 s.Description = Description
21151 return s
21152 }
21153
21154 // SharedContentUnshareDetails : Unshared file/folder by clearing membership.
21155 type SharedContentUnshareDetails struct {
21156 }
21157
21158 // NewSharedContentUnshareDetails returns a new SharedContentUnshareDetails instance
21159 func NewSharedContentUnshareDetails() *SharedContentUnshareDetails {
21160 s := new(SharedContentUnshareDetails)
21161 return s
21162 }
21163
21164 // SharedContentUnshareType : has no documentation (yet)
21165 type SharedContentUnshareType struct {
21166 // Description : has no documentation (yet)
21167 Description string `json:"description"`
21168 }
21169
21170 // NewSharedContentUnshareType returns a new SharedContentUnshareType instance
21171 func NewSharedContentUnshareType(Description string) *SharedContentUnshareType {
21172 s := new(SharedContentUnshareType)
21173 s.Description = Description
21174 return s
21175 }
21176
21177 // SharedContentViewDetails : Previewed shared file/folder.
21178 type SharedContentViewDetails struct {
21179 // SharedContentLink : Shared content link.
21180 SharedContentLink string `json:"shared_content_link"`
21181 // SharedContentOwner : The shared content owner.
21182 SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"`
21183 // SharedContentAccessLevel : Shared content access level.
21184 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21185 }
21186
21187 // NewSharedContentViewDetails returns a new SharedContentViewDetails instance
21188 func NewSharedContentViewDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentViewDetails {
21189 s := new(SharedContentViewDetails)
21190 s.SharedContentLink = SharedContentLink
21191 s.SharedContentAccessLevel = SharedContentAccessLevel
21192 return s
21193 }
21194
21195 // SharedContentViewType : has no documentation (yet)
21196 type SharedContentViewType struct {
21197 // Description : has no documentation (yet)
21198 Description string `json:"description"`
21199 }
21200
21201 // NewSharedContentViewType returns a new SharedContentViewType instance
21202 func NewSharedContentViewType(Description string) *SharedContentViewType {
21203 s := new(SharedContentViewType)
21204 s.Description = Description
21205 return s
21206 }
21207
21208 // SharedFolderChangeLinkPolicyDetails : Changed who can access shared folder
21209 // via link.
21210 type SharedFolderChangeLinkPolicyDetails struct {
21211 // NewValue : New shared folder link policy.
21212 NewValue *sharing.SharedLinkPolicy `json:"new_value"`
21213 // PreviousValue : Previous shared folder link policy. Might be missing due
21214 // to historical data gap.
21215 PreviousValue *sharing.SharedLinkPolicy `json:"previous_value,omitempty"`
21216 }
21217
21218 // NewSharedFolderChangeLinkPolicyDetails returns a new SharedFolderChangeLinkPolicyDetails instance
21219 func NewSharedFolderChangeLinkPolicyDetails(NewValue *sharing.SharedLinkPolicy) *SharedFolderChangeLinkPolicyDetails {
21220 s := new(SharedFolderChangeLinkPolicyDetails)
21221 s.NewValue = NewValue
21222 return s
21223 }
21224
21225 // SharedFolderChangeLinkPolicyType : has no documentation (yet)
21226 type SharedFolderChangeLinkPolicyType struct {
21227 // Description : has no documentation (yet)
21228 Description string `json:"description"`
21229 }
21230
21231 // NewSharedFolderChangeLinkPolicyType returns a new SharedFolderChangeLinkPolicyType instance
21232 func NewSharedFolderChangeLinkPolicyType(Description string) *SharedFolderChangeLinkPolicyType {
21233 s := new(SharedFolderChangeLinkPolicyType)
21234 s.Description = Description
21235 return s
21236 }
21237
21238 // SharedFolderChangeMembersInheritancePolicyDetails : Changed whether shared
21239 // folder inherits members from parent folder.
21240 type SharedFolderChangeMembersInheritancePolicyDetails struct {
21241 // NewValue : New member inheritance policy.
21242 NewValue *SharedFolderMembersInheritancePolicy `json:"new_value"`
21243 // PreviousValue : Previous member inheritance policy. Might be missing due
21244 // to historical data gap.
21245 PreviousValue *SharedFolderMembersInheritancePolicy `json:"previous_value,omitempty"`
21246 }
21247
21248 // NewSharedFolderChangeMembersInheritancePolicyDetails returns a new SharedFolderChangeMembersInheritancePolicyDetails instance
21249 func NewSharedFolderChangeMembersInheritancePolicyDetails(NewValue *SharedFolderMembersInheritancePolicy) *SharedFolderChangeMembersInheritancePolicyDetails {
21250 s := new(SharedFolderChangeMembersInheritancePolicyDetails)
21251 s.NewValue = NewValue
21252 return s
21253 }
21254
21255 // SharedFolderChangeMembersInheritancePolicyType : has no documentation (yet)
21256 type SharedFolderChangeMembersInheritancePolicyType struct {
21257 // Description : has no documentation (yet)
21258 Description string `json:"description"`
21259 }
21260
21261 // NewSharedFolderChangeMembersInheritancePolicyType returns a new SharedFolderChangeMembersInheritancePolicyType instance
21262 func NewSharedFolderChangeMembersInheritancePolicyType(Description string) *SharedFolderChangeMembersInheritancePolicyType {
21263 s := new(SharedFolderChangeMembersInheritancePolicyType)
21264 s.Description = Description
21265 return s
21266 }
21267
21268 // SharedFolderChangeMembersManagementPolicyDetails : Changed who can add/remove
21269 // members of shared folder.
21270 type SharedFolderChangeMembersManagementPolicyDetails struct {
21271 // NewValue : New members management policy.
21272 NewValue *sharing.AclUpdatePolicy `json:"new_value"`
21273 // PreviousValue : Previous members management policy. Might be missing due
21274 // to historical data gap.
21275 PreviousValue *sharing.AclUpdatePolicy `json:"previous_value,omitempty"`
21276 }
21277
21278 // NewSharedFolderChangeMembersManagementPolicyDetails returns a new SharedFolderChangeMembersManagementPolicyDetails instance
21279 func NewSharedFolderChangeMembersManagementPolicyDetails(NewValue *sharing.AclUpdatePolicy) *SharedFolderChangeMembersManagementPolicyDetails {
21280 s := new(SharedFolderChangeMembersManagementPolicyDetails)
21281 s.NewValue = NewValue
21282 return s
21283 }
21284
21285 // SharedFolderChangeMembersManagementPolicyType : has no documentation (yet)
21286 type SharedFolderChangeMembersManagementPolicyType struct {
21287 // Description : has no documentation (yet)
21288 Description string `json:"description"`
21289 }
21290
21291 // NewSharedFolderChangeMembersManagementPolicyType returns a new SharedFolderChangeMembersManagementPolicyType instance
21292 func NewSharedFolderChangeMembersManagementPolicyType(Description string) *SharedFolderChangeMembersManagementPolicyType {
21293 s := new(SharedFolderChangeMembersManagementPolicyType)
21294 s.Description = Description
21295 return s
21296 }
21297
21298 // SharedFolderChangeMembersPolicyDetails : Changed who can become member of
21299 // shared folder.
21300 type SharedFolderChangeMembersPolicyDetails struct {
21301 // NewValue : New external invite policy.
21302 NewValue *sharing.MemberPolicy `json:"new_value"`
21303 // PreviousValue : Previous external invite policy. Might be missing due to
21304 // historical data gap.
21305 PreviousValue *sharing.MemberPolicy `json:"previous_value,omitempty"`
21306 }
21307
21308 // NewSharedFolderChangeMembersPolicyDetails returns a new SharedFolderChangeMembersPolicyDetails instance
21309 func NewSharedFolderChangeMembersPolicyDetails(NewValue *sharing.MemberPolicy) *SharedFolderChangeMembersPolicyDetails {
21310 s := new(SharedFolderChangeMembersPolicyDetails)
21311 s.NewValue = NewValue
21312 return s
21313 }
21314
21315 // SharedFolderChangeMembersPolicyType : has no documentation (yet)
21316 type SharedFolderChangeMembersPolicyType struct {
21317 // Description : has no documentation (yet)
21318 Description string `json:"description"`
21319 }
21320
21321 // NewSharedFolderChangeMembersPolicyType returns a new SharedFolderChangeMembersPolicyType instance
21322 func NewSharedFolderChangeMembersPolicyType(Description string) *SharedFolderChangeMembersPolicyType {
21323 s := new(SharedFolderChangeMembersPolicyType)
21324 s.Description = Description
21325 return s
21326 }
21327
21328 // SharedFolderCreateDetails : Created shared folder.
21329 type SharedFolderCreateDetails struct {
21330 // TargetNsId : Target namespace ID.
21331 TargetNsId string `json:"target_ns_id,omitempty"`
21332 }
21333
21334 // NewSharedFolderCreateDetails returns a new SharedFolderCreateDetails instance
21335 func NewSharedFolderCreateDetails() *SharedFolderCreateDetails {
21336 s := new(SharedFolderCreateDetails)
21337 return s
21338 }
21339
21340 // SharedFolderCreateType : has no documentation (yet)
21341 type SharedFolderCreateType struct {
21342 // Description : has no documentation (yet)
21343 Description string `json:"description"`
21344 }
21345
21346 // NewSharedFolderCreateType returns a new SharedFolderCreateType instance
21347 func NewSharedFolderCreateType(Description string) *SharedFolderCreateType {
21348 s := new(SharedFolderCreateType)
21349 s.Description = Description
21350 return s
21351 }
21352
21353 // SharedFolderDeclineInvitationDetails : Declined team member's invite to
21354 // shared folder.
21355 type SharedFolderDeclineInvitationDetails struct {
21356 }
21357
21358 // NewSharedFolderDeclineInvitationDetails returns a new SharedFolderDeclineInvitationDetails instance
21359 func NewSharedFolderDeclineInvitationDetails() *SharedFolderDeclineInvitationDetails {
21360 s := new(SharedFolderDeclineInvitationDetails)
21361 return s
21362 }
21363
21364 // SharedFolderDeclineInvitationType : has no documentation (yet)
21365 type SharedFolderDeclineInvitationType struct {
21366 // Description : has no documentation (yet)
21367 Description string `json:"description"`
21368 }
21369
21370 // NewSharedFolderDeclineInvitationType returns a new SharedFolderDeclineInvitationType instance
21371 func NewSharedFolderDeclineInvitationType(Description string) *SharedFolderDeclineInvitationType {
21372 s := new(SharedFolderDeclineInvitationType)
21373 s.Description = Description
21374 return s
21375 }
21376
21377 // SharedFolderMembersInheritancePolicy : Specifies if a shared folder inherits
21378 // its members from the parent folder.
21379 type SharedFolderMembersInheritancePolicy struct {
21380 dropbox.Tagged
21381 }
21382
21383 // Valid tag values for SharedFolderMembersInheritancePolicy
21384 const (
21385 SharedFolderMembersInheritancePolicyDontInheritMembers = "dont_inherit_members"
21386 SharedFolderMembersInheritancePolicyInheritMembers = "inherit_members"
21387 SharedFolderMembersInheritancePolicyOther = "other"
21388 )
21389
21390 // SharedFolderMountDetails : Added shared folder to own Dropbox.
21391 type SharedFolderMountDetails struct {
21392 }
21393
21394 // NewSharedFolderMountDetails returns a new SharedFolderMountDetails instance
21395 func NewSharedFolderMountDetails() *SharedFolderMountDetails {
21396 s := new(SharedFolderMountDetails)
21397 return s
21398 }
21399
21400 // SharedFolderMountType : has no documentation (yet)
21401 type SharedFolderMountType struct {
21402 // Description : has no documentation (yet)
21403 Description string `json:"description"`
21404 }
21405
21406 // NewSharedFolderMountType returns a new SharedFolderMountType instance
21407 func NewSharedFolderMountType(Description string) *SharedFolderMountType {
21408 s := new(SharedFolderMountType)
21409 s.Description = Description
21410 return s
21411 }
21412
21413 // SharedFolderNestDetails : Changed parent of shared folder.
21414 type SharedFolderNestDetails struct {
21415 // PreviousParentNsId : Previous parent namespace ID.
21416 PreviousParentNsId string `json:"previous_parent_ns_id,omitempty"`
21417 // NewParentNsId : New parent namespace ID.
21418 NewParentNsId string `json:"new_parent_ns_id,omitempty"`
21419 // PreviousNsPath : Previous namespace path.
21420 PreviousNsPath string `json:"previous_ns_path,omitempty"`
21421 // NewNsPath : New namespace path.
21422 NewNsPath string `json:"new_ns_path,omitempty"`
21423 }
21424
21425 // NewSharedFolderNestDetails returns a new SharedFolderNestDetails instance
21426 func NewSharedFolderNestDetails() *SharedFolderNestDetails {
21427 s := new(SharedFolderNestDetails)
21428 return s
21429 }
21430
21431 // SharedFolderNestType : has no documentation (yet)
21432 type SharedFolderNestType struct {
21433 // Description : has no documentation (yet)
21434 Description string `json:"description"`
21435 }
21436
21437 // NewSharedFolderNestType returns a new SharedFolderNestType instance
21438 func NewSharedFolderNestType(Description string) *SharedFolderNestType {
21439 s := new(SharedFolderNestType)
21440 s.Description = Description
21441 return s
21442 }
21443
21444 // SharedFolderTransferOwnershipDetails : Transferred ownership of shared folder
21445 // to another member.
21446 type SharedFolderTransferOwnershipDetails struct {
21447 // PreviousOwnerEmail : The email address of the previous shared folder
21448 // owner.
21449 PreviousOwnerEmail string `json:"previous_owner_email,omitempty"`
21450 // NewOwnerEmail : The email address of the new shared folder owner.
21451 NewOwnerEmail string `json:"new_owner_email"`
21452 }
21453
21454 // NewSharedFolderTransferOwnershipDetails returns a new SharedFolderTransferOwnershipDetails instance
21455 func NewSharedFolderTransferOwnershipDetails(NewOwnerEmail string) *SharedFolderTransferOwnershipDetails {
21456 s := new(SharedFolderTransferOwnershipDetails)
21457 s.NewOwnerEmail = NewOwnerEmail
21458 return s
21459 }
21460
21461 // SharedFolderTransferOwnershipType : has no documentation (yet)
21462 type SharedFolderTransferOwnershipType struct {
21463 // Description : has no documentation (yet)
21464 Description string `json:"description"`
21465 }
21466
21467 // NewSharedFolderTransferOwnershipType returns a new SharedFolderTransferOwnershipType instance
21468 func NewSharedFolderTransferOwnershipType(Description string) *SharedFolderTransferOwnershipType {
21469 s := new(SharedFolderTransferOwnershipType)
21470 s.Description = Description
21471 return s
21472 }
21473
21474 // SharedFolderUnmountDetails : Deleted shared folder from Dropbox.
21475 type SharedFolderUnmountDetails struct {
21476 }
21477
21478 // NewSharedFolderUnmountDetails returns a new SharedFolderUnmountDetails instance
21479 func NewSharedFolderUnmountDetails() *SharedFolderUnmountDetails {
21480 s := new(SharedFolderUnmountDetails)
21481 return s
21482 }
21483
21484 // SharedFolderUnmountType : has no documentation (yet)
21485 type SharedFolderUnmountType struct {
21486 // Description : has no documentation (yet)
21487 Description string `json:"description"`
21488 }
21489
21490 // NewSharedFolderUnmountType returns a new SharedFolderUnmountType instance
21491 func NewSharedFolderUnmountType(Description string) *SharedFolderUnmountType {
21492 s := new(SharedFolderUnmountType)
21493 s.Description = Description
21494 return s
21495 }
21496
21497 // SharedLinkAccessLevel : Shared link access level.
21498 type SharedLinkAccessLevel struct {
21499 dropbox.Tagged
21500 }
21501
21502 // Valid tag values for SharedLinkAccessLevel
21503 const (
21504 SharedLinkAccessLevelNone = "none"
21505 SharedLinkAccessLevelReader = "reader"
21506 SharedLinkAccessLevelWriter = "writer"
21507 SharedLinkAccessLevelOther = "other"
21508 )
21509
21510 // SharedLinkAddExpiryDetails : Added shared link expiration date.
21511 type SharedLinkAddExpiryDetails struct {
21512 // NewValue : New shared link expiration date.
21513 NewValue time.Time `json:"new_value"`
21514 }
21515
21516 // NewSharedLinkAddExpiryDetails returns a new SharedLinkAddExpiryDetails instance
21517 func NewSharedLinkAddExpiryDetails(NewValue time.Time) *SharedLinkAddExpiryDetails {
21518 s := new(SharedLinkAddExpiryDetails)
21519 s.NewValue = NewValue
21520 return s
21521 }
21522
21523 // SharedLinkAddExpiryType : has no documentation (yet)
21524 type SharedLinkAddExpiryType struct {
21525 // Description : has no documentation (yet)
21526 Description string `json:"description"`
21527 }
21528
21529 // NewSharedLinkAddExpiryType returns a new SharedLinkAddExpiryType instance
21530 func NewSharedLinkAddExpiryType(Description string) *SharedLinkAddExpiryType {
21531 s := new(SharedLinkAddExpiryType)
21532 s.Description = Description
21533 return s
21534 }
21535
21536 // SharedLinkChangeExpiryDetails : Changed shared link expiration date.
21537 type SharedLinkChangeExpiryDetails struct {
21538 // NewValue : New shared link expiration date. Might be missing due to
21539 // historical data gap.
21540 NewValue *time.Time `json:"new_value,omitempty"`
21541 // PreviousValue : Previous shared link expiration date. Might be missing
21542 // due to historical data gap.
21543 PreviousValue *time.Time `json:"previous_value,omitempty"`
21544 }
21545
21546 // NewSharedLinkChangeExpiryDetails returns a new SharedLinkChangeExpiryDetails instance
21547 func NewSharedLinkChangeExpiryDetails() *SharedLinkChangeExpiryDetails {
21548 s := new(SharedLinkChangeExpiryDetails)
21549 return s
21550 }
21551
21552 // SharedLinkChangeExpiryType : has no documentation (yet)
21553 type SharedLinkChangeExpiryType struct {
21554 // Description : has no documentation (yet)
21555 Description string `json:"description"`
21556 }
21557
21558 // NewSharedLinkChangeExpiryType returns a new SharedLinkChangeExpiryType instance
21559 func NewSharedLinkChangeExpiryType(Description string) *SharedLinkChangeExpiryType {
21560 s := new(SharedLinkChangeExpiryType)
21561 s.Description = Description
21562 return s
21563 }
21564
21565 // SharedLinkChangeVisibilityDetails : Changed visibility of shared link.
21566 type SharedLinkChangeVisibilityDetails struct {
21567 // NewValue : New shared link visibility.
21568 NewValue *SharedLinkVisibility `json:"new_value"`
21569 // PreviousValue : Previous shared link visibility. Might be missing due to
21570 // historical data gap.
21571 PreviousValue *SharedLinkVisibility `json:"previous_value,omitempty"`
21572 }
21573
21574 // NewSharedLinkChangeVisibilityDetails returns a new SharedLinkChangeVisibilityDetails instance
21575 func NewSharedLinkChangeVisibilityDetails(NewValue *SharedLinkVisibility) *SharedLinkChangeVisibilityDetails {
21576 s := new(SharedLinkChangeVisibilityDetails)
21577 s.NewValue = NewValue
21578 return s
21579 }
21580
21581 // SharedLinkChangeVisibilityType : has no documentation (yet)
21582 type SharedLinkChangeVisibilityType struct {
21583 // Description : has no documentation (yet)
21584 Description string `json:"description"`
21585 }
21586
21587 // NewSharedLinkChangeVisibilityType returns a new SharedLinkChangeVisibilityType instance
21588 func NewSharedLinkChangeVisibilityType(Description string) *SharedLinkChangeVisibilityType {
21589 s := new(SharedLinkChangeVisibilityType)
21590 s.Description = Description
21591 return s
21592 }
21593
21594 // SharedLinkCopyDetails : Added file/folder to Dropbox from shared link.
21595 type SharedLinkCopyDetails struct {
21596 // SharedLinkOwner : Shared link owner details. Might be missing due to
21597 // historical data gap.
21598 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
21599 }
21600
21601 // NewSharedLinkCopyDetails returns a new SharedLinkCopyDetails instance
21602 func NewSharedLinkCopyDetails() *SharedLinkCopyDetails {
21603 s := new(SharedLinkCopyDetails)
21604 return s
21605 }
21606
21607 // SharedLinkCopyType : has no documentation (yet)
21608 type SharedLinkCopyType struct {
21609 // Description : has no documentation (yet)
21610 Description string `json:"description"`
21611 }
21612
21613 // NewSharedLinkCopyType returns a new SharedLinkCopyType instance
21614 func NewSharedLinkCopyType(Description string) *SharedLinkCopyType {
21615 s := new(SharedLinkCopyType)
21616 s.Description = Description
21617 return s
21618 }
21619
21620 // SharedLinkCreateDetails : Created shared link.
21621 type SharedLinkCreateDetails struct {
21622 // SharedLinkAccessLevel : Defines who can access the shared link. Might be
21623 // missing due to historical data gap.
21624 SharedLinkAccessLevel *SharedLinkAccessLevel `json:"shared_link_access_level,omitempty"`
21625 }
21626
21627 // NewSharedLinkCreateDetails returns a new SharedLinkCreateDetails instance
21628 func NewSharedLinkCreateDetails() *SharedLinkCreateDetails {
21629 s := new(SharedLinkCreateDetails)
21630 return s
21631 }
21632
21633 // SharedLinkCreateType : has no documentation (yet)
21634 type SharedLinkCreateType struct {
21635 // Description : has no documentation (yet)
21636 Description string `json:"description"`
21637 }
21638
21639 // NewSharedLinkCreateType returns a new SharedLinkCreateType instance
21640 func NewSharedLinkCreateType(Description string) *SharedLinkCreateType {
21641 s := new(SharedLinkCreateType)
21642 s.Description = Description
21643 return s
21644 }
21645
21646 // SharedLinkDisableDetails : Removed shared link.
21647 type SharedLinkDisableDetails struct {
21648 // SharedLinkOwner : Shared link owner details. Might be missing due to
21649 // historical data gap.
21650 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
21651 }
21652
21653 // NewSharedLinkDisableDetails returns a new SharedLinkDisableDetails instance
21654 func NewSharedLinkDisableDetails() *SharedLinkDisableDetails {
21655 s := new(SharedLinkDisableDetails)
21656 return s
21657 }
21658
21659 // SharedLinkDisableType : has no documentation (yet)
21660 type SharedLinkDisableType struct {
21661 // Description : has no documentation (yet)
21662 Description string `json:"description"`
21663 }
21664
21665 // NewSharedLinkDisableType returns a new SharedLinkDisableType instance
21666 func NewSharedLinkDisableType(Description string) *SharedLinkDisableType {
21667 s := new(SharedLinkDisableType)
21668 s.Description = Description
21669 return s
21670 }
21671
21672 // SharedLinkDownloadDetails : Downloaded file/folder from shared link.
21673 type SharedLinkDownloadDetails struct {
21674 // SharedLinkOwner : Shared link owner details. Might be missing due to
21675 // historical data gap.
21676 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
21677 }
21678
21679 // NewSharedLinkDownloadDetails returns a new SharedLinkDownloadDetails instance
21680 func NewSharedLinkDownloadDetails() *SharedLinkDownloadDetails {
21681 s := new(SharedLinkDownloadDetails)
21682 return s
21683 }
21684
21685 // SharedLinkDownloadType : has no documentation (yet)
21686 type SharedLinkDownloadType struct {
21687 // Description : has no documentation (yet)
21688 Description string `json:"description"`
21689 }
21690
21691 // NewSharedLinkDownloadType returns a new SharedLinkDownloadType instance
21692 func NewSharedLinkDownloadType(Description string) *SharedLinkDownloadType {
21693 s := new(SharedLinkDownloadType)
21694 s.Description = Description
21695 return s
21696 }
21697
21698 // SharedLinkRemoveExpiryDetails : Removed shared link expiration date.
21699 type SharedLinkRemoveExpiryDetails struct {
21700 // PreviousValue : Previous shared link expiration date. Might be missing
21701 // due to historical data gap.
21702 PreviousValue *time.Time `json:"previous_value,omitempty"`
21703 }
21704
21705 // NewSharedLinkRemoveExpiryDetails returns a new SharedLinkRemoveExpiryDetails instance
21706 func NewSharedLinkRemoveExpiryDetails() *SharedLinkRemoveExpiryDetails {
21707 s := new(SharedLinkRemoveExpiryDetails)
21708 return s
21709 }
21710
21711 // SharedLinkRemoveExpiryType : has no documentation (yet)
21712 type SharedLinkRemoveExpiryType struct {
21713 // Description : has no documentation (yet)
21714 Description string `json:"description"`
21715 }
21716
21717 // NewSharedLinkRemoveExpiryType returns a new SharedLinkRemoveExpiryType instance
21718 func NewSharedLinkRemoveExpiryType(Description string) *SharedLinkRemoveExpiryType {
21719 s := new(SharedLinkRemoveExpiryType)
21720 s.Description = Description
21721 return s
21722 }
21723
21724 // SharedLinkSettingsAddExpirationDetails : Added an expiration date to the
21725 // shared link.
21726 type SharedLinkSettingsAddExpirationDetails struct {
21727 // SharedContentAccessLevel : Shared content access level.
21728 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21729 // SharedContentLink : Shared content link.
21730 SharedContentLink string `json:"shared_content_link,omitempty"`
21731 // NewValue : New shared content link expiration date. Might be missing due
21732 // to historical data gap.
21733 NewValue *time.Time `json:"new_value,omitempty"`
21734 }
21735
21736 // NewSharedLinkSettingsAddExpirationDetails returns a new SharedLinkSettingsAddExpirationDetails instance
21737 func NewSharedLinkSettingsAddExpirationDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsAddExpirationDetails {
21738 s := new(SharedLinkSettingsAddExpirationDetails)
21739 s.SharedContentAccessLevel = SharedContentAccessLevel
21740 return s
21741 }
21742
21743 // SharedLinkSettingsAddExpirationType : has no documentation (yet)
21744 type SharedLinkSettingsAddExpirationType struct {
21745 // Description : has no documentation (yet)
21746 Description string `json:"description"`
21747 }
21748
21749 // NewSharedLinkSettingsAddExpirationType returns a new SharedLinkSettingsAddExpirationType instance
21750 func NewSharedLinkSettingsAddExpirationType(Description string) *SharedLinkSettingsAddExpirationType {
21751 s := new(SharedLinkSettingsAddExpirationType)
21752 s.Description = Description
21753 return s
21754 }
21755
21756 // SharedLinkSettingsAddPasswordDetails : Added a password to the shared link.
21757 type SharedLinkSettingsAddPasswordDetails struct {
21758 // SharedContentAccessLevel : Shared content access level.
21759 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21760 // SharedContentLink : Shared content link.
21761 SharedContentLink string `json:"shared_content_link,omitempty"`
21762 }
21763
21764 // NewSharedLinkSettingsAddPasswordDetails returns a new SharedLinkSettingsAddPasswordDetails instance
21765 func NewSharedLinkSettingsAddPasswordDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsAddPasswordDetails {
21766 s := new(SharedLinkSettingsAddPasswordDetails)
21767 s.SharedContentAccessLevel = SharedContentAccessLevel
21768 return s
21769 }
21770
21771 // SharedLinkSettingsAddPasswordType : has no documentation (yet)
21772 type SharedLinkSettingsAddPasswordType struct {
21773 // Description : has no documentation (yet)
21774 Description string `json:"description"`
21775 }
21776
21777 // NewSharedLinkSettingsAddPasswordType returns a new SharedLinkSettingsAddPasswordType instance
21778 func NewSharedLinkSettingsAddPasswordType(Description string) *SharedLinkSettingsAddPasswordType {
21779 s := new(SharedLinkSettingsAddPasswordType)
21780 s.Description = Description
21781 return s
21782 }
21783
21784 // SharedLinkSettingsAllowDownloadDisabledDetails : Disabled downloads.
21785 type SharedLinkSettingsAllowDownloadDisabledDetails struct {
21786 // SharedContentAccessLevel : Shared content access level.
21787 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21788 // SharedContentLink : Shared content link.
21789 SharedContentLink string `json:"shared_content_link,omitempty"`
21790 }
21791
21792 // NewSharedLinkSettingsAllowDownloadDisabledDetails returns a new SharedLinkSettingsAllowDownloadDisabledDetails instance
21793 func NewSharedLinkSettingsAllowDownloadDisabledDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsAllowDownloadDisabledDetails {
21794 s := new(SharedLinkSettingsAllowDownloadDisabledDetails)
21795 s.SharedContentAccessLevel = SharedContentAccessLevel
21796 return s
21797 }
21798
21799 // SharedLinkSettingsAllowDownloadDisabledType : has no documentation (yet)
21800 type SharedLinkSettingsAllowDownloadDisabledType struct {
21801 // Description : has no documentation (yet)
21802 Description string `json:"description"`
21803 }
21804
21805 // NewSharedLinkSettingsAllowDownloadDisabledType returns a new SharedLinkSettingsAllowDownloadDisabledType instance
21806 func NewSharedLinkSettingsAllowDownloadDisabledType(Description string) *SharedLinkSettingsAllowDownloadDisabledType {
21807 s := new(SharedLinkSettingsAllowDownloadDisabledType)
21808 s.Description = Description
21809 return s
21810 }
21811
21812 // SharedLinkSettingsAllowDownloadEnabledDetails : Enabled downloads.
21813 type SharedLinkSettingsAllowDownloadEnabledDetails struct {
21814 // SharedContentAccessLevel : Shared content access level.
21815 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21816 // SharedContentLink : Shared content link.
21817 SharedContentLink string `json:"shared_content_link,omitempty"`
21818 }
21819
21820 // NewSharedLinkSettingsAllowDownloadEnabledDetails returns a new SharedLinkSettingsAllowDownloadEnabledDetails instance
21821 func NewSharedLinkSettingsAllowDownloadEnabledDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsAllowDownloadEnabledDetails {
21822 s := new(SharedLinkSettingsAllowDownloadEnabledDetails)
21823 s.SharedContentAccessLevel = SharedContentAccessLevel
21824 return s
21825 }
21826
21827 // SharedLinkSettingsAllowDownloadEnabledType : has no documentation (yet)
21828 type SharedLinkSettingsAllowDownloadEnabledType struct {
21829 // Description : has no documentation (yet)
21830 Description string `json:"description"`
21831 }
21832
21833 // NewSharedLinkSettingsAllowDownloadEnabledType returns a new SharedLinkSettingsAllowDownloadEnabledType instance
21834 func NewSharedLinkSettingsAllowDownloadEnabledType(Description string) *SharedLinkSettingsAllowDownloadEnabledType {
21835 s := new(SharedLinkSettingsAllowDownloadEnabledType)
21836 s.Description = Description
21837 return s
21838 }
21839
21840 // SharedLinkSettingsChangeAudienceDetails : Changed the audience of the shared
21841 // link.
21842 type SharedLinkSettingsChangeAudienceDetails struct {
21843 // SharedContentAccessLevel : Shared content access level.
21844 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21845 // SharedContentLink : Shared content link.
21846 SharedContentLink string `json:"shared_content_link,omitempty"`
21847 // NewValue : New link audience value.
21848 NewValue *sharing.LinkAudience `json:"new_value"`
21849 // PreviousValue : Previous link audience value.
21850 PreviousValue *sharing.LinkAudience `json:"previous_value,omitempty"`
21851 }
21852
21853 // NewSharedLinkSettingsChangeAudienceDetails returns a new SharedLinkSettingsChangeAudienceDetails instance
21854 func NewSharedLinkSettingsChangeAudienceDetails(SharedContentAccessLevel *sharing.AccessLevel, NewValue *sharing.LinkAudience) *SharedLinkSettingsChangeAudienceDetails {
21855 s := new(SharedLinkSettingsChangeAudienceDetails)
21856 s.SharedContentAccessLevel = SharedContentAccessLevel
21857 s.NewValue = NewValue
21858 return s
21859 }
21860
21861 // SharedLinkSettingsChangeAudienceType : has no documentation (yet)
21862 type SharedLinkSettingsChangeAudienceType struct {
21863 // Description : has no documentation (yet)
21864 Description string `json:"description"`
21865 }
21866
21867 // NewSharedLinkSettingsChangeAudienceType returns a new SharedLinkSettingsChangeAudienceType instance
21868 func NewSharedLinkSettingsChangeAudienceType(Description string) *SharedLinkSettingsChangeAudienceType {
21869 s := new(SharedLinkSettingsChangeAudienceType)
21870 s.Description = Description
21871 return s
21872 }
21873
21874 // SharedLinkSettingsChangeExpirationDetails : Changed the expiration date of
21875 // the shared link.
21876 type SharedLinkSettingsChangeExpirationDetails struct {
21877 // SharedContentAccessLevel : Shared content access level.
21878 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21879 // SharedContentLink : Shared content link.
21880 SharedContentLink string `json:"shared_content_link,omitempty"`
21881 // NewValue : New shared content link expiration date. Might be missing due
21882 // to historical data gap.
21883 NewValue *time.Time `json:"new_value,omitempty"`
21884 // PreviousValue : Previous shared content link expiration date. Might be
21885 // missing due to historical data gap.
21886 PreviousValue *time.Time `json:"previous_value,omitempty"`
21887 }
21888
21889 // NewSharedLinkSettingsChangeExpirationDetails returns a new SharedLinkSettingsChangeExpirationDetails instance
21890 func NewSharedLinkSettingsChangeExpirationDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsChangeExpirationDetails {
21891 s := new(SharedLinkSettingsChangeExpirationDetails)
21892 s.SharedContentAccessLevel = SharedContentAccessLevel
21893 return s
21894 }
21895
21896 // SharedLinkSettingsChangeExpirationType : has no documentation (yet)
21897 type SharedLinkSettingsChangeExpirationType struct {
21898 // Description : has no documentation (yet)
21899 Description string `json:"description"`
21900 }
21901
21902 // NewSharedLinkSettingsChangeExpirationType returns a new SharedLinkSettingsChangeExpirationType instance
21903 func NewSharedLinkSettingsChangeExpirationType(Description string) *SharedLinkSettingsChangeExpirationType {
21904 s := new(SharedLinkSettingsChangeExpirationType)
21905 s.Description = Description
21906 return s
21907 }
21908
21909 // SharedLinkSettingsChangePasswordDetails : Changed the password of the shared
21910 // link.
21911 type SharedLinkSettingsChangePasswordDetails struct {
21912 // SharedContentAccessLevel : Shared content access level.
21913 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21914 // SharedContentLink : Shared content link.
21915 SharedContentLink string `json:"shared_content_link,omitempty"`
21916 }
21917
21918 // NewSharedLinkSettingsChangePasswordDetails returns a new SharedLinkSettingsChangePasswordDetails instance
21919 func NewSharedLinkSettingsChangePasswordDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsChangePasswordDetails {
21920 s := new(SharedLinkSettingsChangePasswordDetails)
21921 s.SharedContentAccessLevel = SharedContentAccessLevel
21922 return s
21923 }
21924
21925 // SharedLinkSettingsChangePasswordType : has no documentation (yet)
21926 type SharedLinkSettingsChangePasswordType struct {
21927 // Description : has no documentation (yet)
21928 Description string `json:"description"`
21929 }
21930
21931 // NewSharedLinkSettingsChangePasswordType returns a new SharedLinkSettingsChangePasswordType instance
21932 func NewSharedLinkSettingsChangePasswordType(Description string) *SharedLinkSettingsChangePasswordType {
21933 s := new(SharedLinkSettingsChangePasswordType)
21934 s.Description = Description
21935 return s
21936 }
21937
21938 // SharedLinkSettingsRemoveExpirationDetails : Removed the expiration date from
21939 // the shared link.
21940 type SharedLinkSettingsRemoveExpirationDetails struct {
21941 // SharedContentAccessLevel : Shared content access level.
21942 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21943 // SharedContentLink : Shared content link.
21944 SharedContentLink string `json:"shared_content_link,omitempty"`
21945 // PreviousValue : Previous shared link expiration date. Might be missing
21946 // due to historical data gap.
21947 PreviousValue *time.Time `json:"previous_value,omitempty"`
21948 }
21949
21950 // NewSharedLinkSettingsRemoveExpirationDetails returns a new SharedLinkSettingsRemoveExpirationDetails instance
21951 func NewSharedLinkSettingsRemoveExpirationDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsRemoveExpirationDetails {
21952 s := new(SharedLinkSettingsRemoveExpirationDetails)
21953 s.SharedContentAccessLevel = SharedContentAccessLevel
21954 return s
21955 }
21956
21957 // SharedLinkSettingsRemoveExpirationType : has no documentation (yet)
21958 type SharedLinkSettingsRemoveExpirationType struct {
21959 // Description : has no documentation (yet)
21960 Description string `json:"description"`
21961 }
21962
21963 // NewSharedLinkSettingsRemoveExpirationType returns a new SharedLinkSettingsRemoveExpirationType instance
21964 func NewSharedLinkSettingsRemoveExpirationType(Description string) *SharedLinkSettingsRemoveExpirationType {
21965 s := new(SharedLinkSettingsRemoveExpirationType)
21966 s.Description = Description
21967 return s
21968 }
21969
21970 // SharedLinkSettingsRemovePasswordDetails : Removed the password from the
21971 // shared link.
21972 type SharedLinkSettingsRemovePasswordDetails struct {
21973 // SharedContentAccessLevel : Shared content access level.
21974 SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"`
21975 // SharedContentLink : Shared content link.
21976 SharedContentLink string `json:"shared_content_link,omitempty"`
21977 }
21978
21979 // NewSharedLinkSettingsRemovePasswordDetails returns a new SharedLinkSettingsRemovePasswordDetails instance
21980 func NewSharedLinkSettingsRemovePasswordDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedLinkSettingsRemovePasswordDetails {
21981 s := new(SharedLinkSettingsRemovePasswordDetails)
21982 s.SharedContentAccessLevel = SharedContentAccessLevel
21983 return s
21984 }
21985
21986 // SharedLinkSettingsRemovePasswordType : has no documentation (yet)
21987 type SharedLinkSettingsRemovePasswordType struct {
21988 // Description : has no documentation (yet)
21989 Description string `json:"description"`
21990 }
21991
21992 // NewSharedLinkSettingsRemovePasswordType returns a new SharedLinkSettingsRemovePasswordType instance
21993 func NewSharedLinkSettingsRemovePasswordType(Description string) *SharedLinkSettingsRemovePasswordType {
21994 s := new(SharedLinkSettingsRemovePasswordType)
21995 s.Description = Description
21996 return s
21997 }
21998
21999 // SharedLinkShareDetails : Added members as audience of shared link.
22000 type SharedLinkShareDetails struct {
22001 // SharedLinkOwner : Shared link owner details. Might be missing due to
22002 // historical data gap.
22003 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
22004 // ExternalUsers : Users without a Dropbox account that were added as shared
22005 // link audience.
22006 ExternalUsers []*ExternalUserLogInfo `json:"external_users,omitempty"`
22007 }
22008
22009 // NewSharedLinkShareDetails returns a new SharedLinkShareDetails instance
22010 func NewSharedLinkShareDetails() *SharedLinkShareDetails {
22011 s := new(SharedLinkShareDetails)
22012 return s
22013 }
22014
22015 // SharedLinkShareType : has no documentation (yet)
22016 type SharedLinkShareType struct {
22017 // Description : has no documentation (yet)
22018 Description string `json:"description"`
22019 }
22020
22021 // NewSharedLinkShareType returns a new SharedLinkShareType instance
22022 func NewSharedLinkShareType(Description string) *SharedLinkShareType {
22023 s := new(SharedLinkShareType)
22024 s.Description = Description
22025 return s
22026 }
22027
22028 // SharedLinkViewDetails : Opened shared link.
22029 type SharedLinkViewDetails struct {
22030 // SharedLinkOwner : Shared link owner details. Might be missing due to
22031 // historical data gap.
22032 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
22033 }
22034
22035 // NewSharedLinkViewDetails returns a new SharedLinkViewDetails instance
22036 func NewSharedLinkViewDetails() *SharedLinkViewDetails {
22037 s := new(SharedLinkViewDetails)
22038 return s
22039 }
22040
22041 // SharedLinkViewType : has no documentation (yet)
22042 type SharedLinkViewType struct {
22043 // Description : has no documentation (yet)
22044 Description string `json:"description"`
22045 }
22046
22047 // NewSharedLinkViewType returns a new SharedLinkViewType instance
22048 func NewSharedLinkViewType(Description string) *SharedLinkViewType {
22049 s := new(SharedLinkViewType)
22050 s.Description = Description
22051 return s
22052 }
22053
22054 // SharedLinkVisibility : Defines who has access to a shared link.
22055 type SharedLinkVisibility struct {
22056 dropbox.Tagged
22057 }
22058
22059 // Valid tag values for SharedLinkVisibility
22060 const (
22061 SharedLinkVisibilityNoOne = "no_one"
22062 SharedLinkVisibilityPassword = "password"
22063 SharedLinkVisibilityPublic = "public"
22064 SharedLinkVisibilityTeamOnly = "team_only"
22065 SharedLinkVisibilityOther = "other"
22066 )
22067
22068 // SharedNoteOpenedDetails : Opened shared Paper doc.
22069 type SharedNoteOpenedDetails struct {
22070 }
22071
22072 // NewSharedNoteOpenedDetails returns a new SharedNoteOpenedDetails instance
22073 func NewSharedNoteOpenedDetails() *SharedNoteOpenedDetails {
22074 s := new(SharedNoteOpenedDetails)
22075 return s
22076 }
22077
22078 // SharedNoteOpenedType : has no documentation (yet)
22079 type SharedNoteOpenedType struct {
22080 // Description : has no documentation (yet)
22081 Description string `json:"description"`
22082 }
22083
22084 // NewSharedNoteOpenedType returns a new SharedNoteOpenedType instance
22085 func NewSharedNoteOpenedType(Description string) *SharedNoteOpenedType {
22086 s := new(SharedNoteOpenedType)
22087 s.Description = Description
22088 return s
22089 }
22090
22091 // SharingChangeFolderJoinPolicyDetails : Changed whether team members can join
22092 // shared folders owned outside team.
22093 type SharingChangeFolderJoinPolicyDetails struct {
22094 // NewValue : New external join policy.
22095 NewValue *SharingFolderJoinPolicy `json:"new_value"`
22096 // PreviousValue : Previous external join policy. Might be missing due to
22097 // historical data gap.
22098 PreviousValue *SharingFolderJoinPolicy `json:"previous_value,omitempty"`
22099 }
22100
22101 // NewSharingChangeFolderJoinPolicyDetails returns a new SharingChangeFolderJoinPolicyDetails instance
22102 func NewSharingChangeFolderJoinPolicyDetails(NewValue *SharingFolderJoinPolicy) *SharingChangeFolderJoinPolicyDetails {
22103 s := new(SharingChangeFolderJoinPolicyDetails)
22104 s.NewValue = NewValue
22105 return s
22106 }
22107
22108 // SharingChangeFolderJoinPolicyType : has no documentation (yet)
22109 type SharingChangeFolderJoinPolicyType struct {
22110 // Description : has no documentation (yet)
22111 Description string `json:"description"`
22112 }
22113
22114 // NewSharingChangeFolderJoinPolicyType returns a new SharingChangeFolderJoinPolicyType instance
22115 func NewSharingChangeFolderJoinPolicyType(Description string) *SharingChangeFolderJoinPolicyType {
22116 s := new(SharingChangeFolderJoinPolicyType)
22117 s.Description = Description
22118 return s
22119 }
22120
22121 // SharingChangeLinkAllowChangeExpirationPolicyDetails : Changed the password
22122 // requirement for the links shared outside of the team.
22123 type SharingChangeLinkAllowChangeExpirationPolicyDetails struct {
22124 // NewValue : To.
22125 NewValue *EnforceLinkPasswordPolicy `json:"new_value"`
22126 // PreviousValue : From.
22127 PreviousValue *EnforceLinkPasswordPolicy `json:"previous_value,omitempty"`
22128 }
22129
22130 // NewSharingChangeLinkAllowChangeExpirationPolicyDetails returns a new SharingChangeLinkAllowChangeExpirationPolicyDetails instance
22131 func NewSharingChangeLinkAllowChangeExpirationPolicyDetails(NewValue *EnforceLinkPasswordPolicy) *SharingChangeLinkAllowChangeExpirationPolicyDetails {
22132 s := new(SharingChangeLinkAllowChangeExpirationPolicyDetails)
22133 s.NewValue = NewValue
22134 return s
22135 }
22136
22137 // SharingChangeLinkAllowChangeExpirationPolicyType : has no documentation (yet)
22138 type SharingChangeLinkAllowChangeExpirationPolicyType struct {
22139 // Description : has no documentation (yet)
22140 Description string `json:"description"`
22141 }
22142
22143 // NewSharingChangeLinkAllowChangeExpirationPolicyType returns a new SharingChangeLinkAllowChangeExpirationPolicyType instance
22144 func NewSharingChangeLinkAllowChangeExpirationPolicyType(Description string) *SharingChangeLinkAllowChangeExpirationPolicyType {
22145 s := new(SharingChangeLinkAllowChangeExpirationPolicyType)
22146 s.Description = Description
22147 return s
22148 }
22149
22150 // SharingChangeLinkDefaultExpirationPolicyDetails : Changed the default
22151 // expiration for the links shared outside of the team.
22152 type SharingChangeLinkDefaultExpirationPolicyDetails struct {
22153 // NewValue : To.
22154 NewValue *DefaultLinkExpirationDaysPolicy `json:"new_value"`
22155 // PreviousValue : From.
22156 PreviousValue *DefaultLinkExpirationDaysPolicy `json:"previous_value,omitempty"`
22157 }
22158
22159 // NewSharingChangeLinkDefaultExpirationPolicyDetails returns a new SharingChangeLinkDefaultExpirationPolicyDetails instance
22160 func NewSharingChangeLinkDefaultExpirationPolicyDetails(NewValue *DefaultLinkExpirationDaysPolicy) *SharingChangeLinkDefaultExpirationPolicyDetails {
22161 s := new(SharingChangeLinkDefaultExpirationPolicyDetails)
22162 s.NewValue = NewValue
22163 return s
22164 }
22165
22166 // SharingChangeLinkDefaultExpirationPolicyType : has no documentation (yet)
22167 type SharingChangeLinkDefaultExpirationPolicyType struct {
22168 // Description : has no documentation (yet)
22169 Description string `json:"description"`
22170 }
22171
22172 // NewSharingChangeLinkDefaultExpirationPolicyType returns a new SharingChangeLinkDefaultExpirationPolicyType instance
22173 func NewSharingChangeLinkDefaultExpirationPolicyType(Description string) *SharingChangeLinkDefaultExpirationPolicyType {
22174 s := new(SharingChangeLinkDefaultExpirationPolicyType)
22175 s.Description = Description
22176 return s
22177 }
22178
22179 // SharingChangeLinkEnforcePasswordPolicyDetails : Changed the allow remove or
22180 // change expiration policy for the links shared outside of the team.
22181 type SharingChangeLinkEnforcePasswordPolicyDetails struct {
22182 // NewValue : To.
22183 NewValue *ChangeLinkExpirationPolicy `json:"new_value"`
22184 // PreviousValue : From.
22185 PreviousValue *ChangeLinkExpirationPolicy `json:"previous_value,omitempty"`
22186 }
22187
22188 // NewSharingChangeLinkEnforcePasswordPolicyDetails returns a new SharingChangeLinkEnforcePasswordPolicyDetails instance
22189 func NewSharingChangeLinkEnforcePasswordPolicyDetails(NewValue *ChangeLinkExpirationPolicy) *SharingChangeLinkEnforcePasswordPolicyDetails {
22190 s := new(SharingChangeLinkEnforcePasswordPolicyDetails)
22191 s.NewValue = NewValue
22192 return s
22193 }
22194
22195 // SharingChangeLinkEnforcePasswordPolicyType : has no documentation (yet)
22196 type SharingChangeLinkEnforcePasswordPolicyType struct {
22197 // Description : has no documentation (yet)
22198 Description string `json:"description"`
22199 }
22200
22201 // NewSharingChangeLinkEnforcePasswordPolicyType returns a new SharingChangeLinkEnforcePasswordPolicyType instance
22202 func NewSharingChangeLinkEnforcePasswordPolicyType(Description string) *SharingChangeLinkEnforcePasswordPolicyType {
22203 s := new(SharingChangeLinkEnforcePasswordPolicyType)
22204 s.Description = Description
22205 return s
22206 }
22207
22208 // SharingChangeLinkPolicyDetails : Changed whether members can share links
22209 // outside team, and if links are accessible only by team members or anyone by
22210 // default.
22211 type SharingChangeLinkPolicyDetails struct {
22212 // NewValue : New external link accessibility policy.
22213 NewValue *SharingLinkPolicy `json:"new_value"`
22214 // PreviousValue : Previous external link accessibility policy. Might be
22215 // missing due to historical data gap.
22216 PreviousValue *SharingLinkPolicy `json:"previous_value,omitempty"`
22217 }
22218
22219 // NewSharingChangeLinkPolicyDetails returns a new SharingChangeLinkPolicyDetails instance
22220 func NewSharingChangeLinkPolicyDetails(NewValue *SharingLinkPolicy) *SharingChangeLinkPolicyDetails {
22221 s := new(SharingChangeLinkPolicyDetails)
22222 s.NewValue = NewValue
22223 return s
22224 }
22225
22226 // SharingChangeLinkPolicyType : has no documentation (yet)
22227 type SharingChangeLinkPolicyType struct {
22228 // Description : has no documentation (yet)
22229 Description string `json:"description"`
22230 }
22231
22232 // NewSharingChangeLinkPolicyType returns a new SharingChangeLinkPolicyType instance
22233 func NewSharingChangeLinkPolicyType(Description string) *SharingChangeLinkPolicyType {
22234 s := new(SharingChangeLinkPolicyType)
22235 s.Description = Description
22236 return s
22237 }
22238
22239 // SharingChangeMemberPolicyDetails : Changed whether members can share
22240 // files/folders outside team.
22241 type SharingChangeMemberPolicyDetails struct {
22242 // NewValue : New external invite policy.
22243 NewValue *SharingMemberPolicy `json:"new_value"`
22244 // PreviousValue : Previous external invite policy. Might be missing due to
22245 // historical data gap.
22246 PreviousValue *SharingMemberPolicy `json:"previous_value,omitempty"`
22247 }
22248
22249 // NewSharingChangeMemberPolicyDetails returns a new SharingChangeMemberPolicyDetails instance
22250 func NewSharingChangeMemberPolicyDetails(NewValue *SharingMemberPolicy) *SharingChangeMemberPolicyDetails {
22251 s := new(SharingChangeMemberPolicyDetails)
22252 s.NewValue = NewValue
22253 return s
22254 }
22255
22256 // SharingChangeMemberPolicyType : has no documentation (yet)
22257 type SharingChangeMemberPolicyType struct {
22258 // Description : has no documentation (yet)
22259 Description string `json:"description"`
22260 }
22261
22262 // NewSharingChangeMemberPolicyType returns a new SharingChangeMemberPolicyType instance
22263 func NewSharingChangeMemberPolicyType(Description string) *SharingChangeMemberPolicyType {
22264 s := new(SharingChangeMemberPolicyType)
22265 s.Description = Description
22266 return s
22267 }
22268
22269 // SharingFolderJoinPolicy : Policy for controlling if team members can join
22270 // shared folders owned by non team members.
22271 type SharingFolderJoinPolicy struct {
22272 dropbox.Tagged
22273 }
22274
22275 // Valid tag values for SharingFolderJoinPolicy
22276 const (
22277 SharingFolderJoinPolicyFromAnyone = "from_anyone"
22278 SharingFolderJoinPolicyFromTeamOnly = "from_team_only"
22279 SharingFolderJoinPolicyOther = "other"
22280 )
22281
22282 // SharingLinkPolicy : Policy for controlling if team members can share links
22283 // externally
22284 type SharingLinkPolicy struct {
22285 dropbox.Tagged
22286 }
22287
22288 // Valid tag values for SharingLinkPolicy
22289 const (
22290 SharingLinkPolicyDefaultPrivate = "default_private"
22291 SharingLinkPolicyDefaultPublic = "default_public"
22292 SharingLinkPolicyOnlyPrivate = "only_private"
22293 SharingLinkPolicyOther = "other"
22294 )
22295
22296 // SharingMemberPolicy : External sharing policy
22297 type SharingMemberPolicy struct {
22298 dropbox.Tagged
22299 }
22300
22301 // Valid tag values for SharingMemberPolicy
22302 const (
22303 SharingMemberPolicyAllow = "allow"
22304 SharingMemberPolicyForbid = "forbid"
22305 SharingMemberPolicyForbidWithExclusions = "forbid_with_exclusions"
22306 SharingMemberPolicyOther = "other"
22307 )
22308
22309 // ShmodelDisableDownloadsDetails : Disabled downloads for link.
22310 type ShmodelDisableDownloadsDetails struct {
22311 // SharedLinkOwner : Shared link owner details. Might be missing due to
22312 // historical data gap.
22313 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
22314 }
22315
22316 // NewShmodelDisableDownloadsDetails returns a new ShmodelDisableDownloadsDetails instance
22317 func NewShmodelDisableDownloadsDetails() *ShmodelDisableDownloadsDetails {
22318 s := new(ShmodelDisableDownloadsDetails)
22319 return s
22320 }
22321
22322 // ShmodelDisableDownloadsType : has no documentation (yet)
22323 type ShmodelDisableDownloadsType struct {
22324 // Description : has no documentation (yet)
22325 Description string `json:"description"`
22326 }
22327
22328 // NewShmodelDisableDownloadsType returns a new ShmodelDisableDownloadsType instance
22329 func NewShmodelDisableDownloadsType(Description string) *ShmodelDisableDownloadsType {
22330 s := new(ShmodelDisableDownloadsType)
22331 s.Description = Description
22332 return s
22333 }
22334
22335 // ShmodelEnableDownloadsDetails : Enabled downloads for link.
22336 type ShmodelEnableDownloadsDetails struct {
22337 // SharedLinkOwner : Shared link owner details. Might be missing due to
22338 // historical data gap.
22339 SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"`
22340 }
22341
22342 // NewShmodelEnableDownloadsDetails returns a new ShmodelEnableDownloadsDetails instance
22343 func NewShmodelEnableDownloadsDetails() *ShmodelEnableDownloadsDetails {
22344 s := new(ShmodelEnableDownloadsDetails)
22345 return s
22346 }
22347
22348 // ShmodelEnableDownloadsType : has no documentation (yet)
22349 type ShmodelEnableDownloadsType struct {
22350 // Description : has no documentation (yet)
22351 Description string `json:"description"`
22352 }
22353
22354 // NewShmodelEnableDownloadsType returns a new ShmodelEnableDownloadsType instance
22355 func NewShmodelEnableDownloadsType(Description string) *ShmodelEnableDownloadsType {
22356 s := new(ShmodelEnableDownloadsType)
22357 s.Description = Description
22358 return s
22359 }
22360
22361 // ShmodelGroupShareDetails : Shared link with group.
22362 type ShmodelGroupShareDetails struct {
22363 }
22364
22365 // NewShmodelGroupShareDetails returns a new ShmodelGroupShareDetails instance
22366 func NewShmodelGroupShareDetails() *ShmodelGroupShareDetails {
22367 s := new(ShmodelGroupShareDetails)
22368 return s
22369 }
22370
22371 // ShmodelGroupShareType : has no documentation (yet)
22372 type ShmodelGroupShareType struct {
22373 // Description : has no documentation (yet)
22374 Description string `json:"description"`
22375 }
22376
22377 // NewShmodelGroupShareType returns a new ShmodelGroupShareType instance
22378 func NewShmodelGroupShareType(Description string) *ShmodelGroupShareType {
22379 s := new(ShmodelGroupShareType)
22380 s.Description = Description
22381 return s
22382 }
22383
22384 // ShowcaseAccessGrantedDetails : Granted access to showcase.
22385 type ShowcaseAccessGrantedDetails struct {
22386 // EventUuid : Event unique identifier.
22387 EventUuid string `json:"event_uuid"`
22388 }
22389
22390 // NewShowcaseAccessGrantedDetails returns a new ShowcaseAccessGrantedDetails instance
22391 func NewShowcaseAccessGrantedDetails(EventUuid string) *ShowcaseAccessGrantedDetails {
22392 s := new(ShowcaseAccessGrantedDetails)
22393 s.EventUuid = EventUuid
22394 return s
22395 }
22396
22397 // ShowcaseAccessGrantedType : has no documentation (yet)
22398 type ShowcaseAccessGrantedType struct {
22399 // Description : has no documentation (yet)
22400 Description string `json:"description"`
22401 }
22402
22403 // NewShowcaseAccessGrantedType returns a new ShowcaseAccessGrantedType instance
22404 func NewShowcaseAccessGrantedType(Description string) *ShowcaseAccessGrantedType {
22405 s := new(ShowcaseAccessGrantedType)
22406 s.Description = Description
22407 return s
22408 }
22409
22410 // ShowcaseAddMemberDetails : Added member to showcase.
22411 type ShowcaseAddMemberDetails struct {
22412 // EventUuid : Event unique identifier.
22413 EventUuid string `json:"event_uuid"`
22414 }
22415
22416 // NewShowcaseAddMemberDetails returns a new ShowcaseAddMemberDetails instance
22417 func NewShowcaseAddMemberDetails(EventUuid string) *ShowcaseAddMemberDetails {
22418 s := new(ShowcaseAddMemberDetails)
22419 s.EventUuid = EventUuid
22420 return s
22421 }
22422
22423 // ShowcaseAddMemberType : has no documentation (yet)
22424 type ShowcaseAddMemberType struct {
22425 // Description : has no documentation (yet)
22426 Description string `json:"description"`
22427 }
22428
22429 // NewShowcaseAddMemberType returns a new ShowcaseAddMemberType instance
22430 func NewShowcaseAddMemberType(Description string) *ShowcaseAddMemberType {
22431 s := new(ShowcaseAddMemberType)
22432 s.Description = Description
22433 return s
22434 }
22435
22436 // ShowcaseArchivedDetails : Archived showcase.
22437 type ShowcaseArchivedDetails struct {
22438 // EventUuid : Event unique identifier.
22439 EventUuid string `json:"event_uuid"`
22440 }
22441
22442 // NewShowcaseArchivedDetails returns a new ShowcaseArchivedDetails instance
22443 func NewShowcaseArchivedDetails(EventUuid string) *ShowcaseArchivedDetails {
22444 s := new(ShowcaseArchivedDetails)
22445 s.EventUuid = EventUuid
22446 return s
22447 }
22448
22449 // ShowcaseArchivedType : has no documentation (yet)
22450 type ShowcaseArchivedType struct {
22451 // Description : has no documentation (yet)
22452 Description string `json:"description"`
22453 }
22454
22455 // NewShowcaseArchivedType returns a new ShowcaseArchivedType instance
22456 func NewShowcaseArchivedType(Description string) *ShowcaseArchivedType {
22457 s := new(ShowcaseArchivedType)
22458 s.Description = Description
22459 return s
22460 }
22461
22462 // ShowcaseChangeDownloadPolicyDetails : Enabled/disabled downloading files from
22463 // Dropbox Showcase for team.
22464 type ShowcaseChangeDownloadPolicyDetails struct {
22465 // NewValue : New Dropbox Showcase download policy.
22466 NewValue *ShowcaseDownloadPolicy `json:"new_value"`
22467 // PreviousValue : Previous Dropbox Showcase download policy.
22468 PreviousValue *ShowcaseDownloadPolicy `json:"previous_value"`
22469 }
22470
22471 // NewShowcaseChangeDownloadPolicyDetails returns a new ShowcaseChangeDownloadPolicyDetails instance
22472 func NewShowcaseChangeDownloadPolicyDetails(NewValue *ShowcaseDownloadPolicy, PreviousValue *ShowcaseDownloadPolicy) *ShowcaseChangeDownloadPolicyDetails {
22473 s := new(ShowcaseChangeDownloadPolicyDetails)
22474 s.NewValue = NewValue
22475 s.PreviousValue = PreviousValue
22476 return s
22477 }
22478
22479 // ShowcaseChangeDownloadPolicyType : has no documentation (yet)
22480 type ShowcaseChangeDownloadPolicyType struct {
22481 // Description : has no documentation (yet)
22482 Description string `json:"description"`
22483 }
22484
22485 // NewShowcaseChangeDownloadPolicyType returns a new ShowcaseChangeDownloadPolicyType instance
22486 func NewShowcaseChangeDownloadPolicyType(Description string) *ShowcaseChangeDownloadPolicyType {
22487 s := new(ShowcaseChangeDownloadPolicyType)
22488 s.Description = Description
22489 return s
22490 }
22491
22492 // ShowcaseChangeEnabledPolicyDetails : Enabled/disabled Dropbox Showcase for
22493 // team.
22494 type ShowcaseChangeEnabledPolicyDetails struct {
22495 // NewValue : New Dropbox Showcase policy.
22496 NewValue *ShowcaseEnabledPolicy `json:"new_value"`
22497 // PreviousValue : Previous Dropbox Showcase policy.
22498 PreviousValue *ShowcaseEnabledPolicy `json:"previous_value"`
22499 }
22500
22501 // NewShowcaseChangeEnabledPolicyDetails returns a new ShowcaseChangeEnabledPolicyDetails instance
22502 func NewShowcaseChangeEnabledPolicyDetails(NewValue *ShowcaseEnabledPolicy, PreviousValue *ShowcaseEnabledPolicy) *ShowcaseChangeEnabledPolicyDetails {
22503 s := new(ShowcaseChangeEnabledPolicyDetails)
22504 s.NewValue = NewValue
22505 s.PreviousValue = PreviousValue
22506 return s
22507 }
22508
22509 // ShowcaseChangeEnabledPolicyType : has no documentation (yet)
22510 type ShowcaseChangeEnabledPolicyType struct {
22511 // Description : has no documentation (yet)
22512 Description string `json:"description"`
22513 }
22514
22515 // NewShowcaseChangeEnabledPolicyType returns a new ShowcaseChangeEnabledPolicyType instance
22516 func NewShowcaseChangeEnabledPolicyType(Description string) *ShowcaseChangeEnabledPolicyType {
22517 s := new(ShowcaseChangeEnabledPolicyType)
22518 s.Description = Description
22519 return s
22520 }
22521
22522 // ShowcaseChangeExternalSharingPolicyDetails : Enabled/disabled sharing Dropbox
22523 // Showcase externally for team.
22524 type ShowcaseChangeExternalSharingPolicyDetails struct {
22525 // NewValue : New Dropbox Showcase external sharing policy.
22526 NewValue *ShowcaseExternalSharingPolicy `json:"new_value"`
22527 // PreviousValue : Previous Dropbox Showcase external sharing policy.
22528 PreviousValue *ShowcaseExternalSharingPolicy `json:"previous_value"`
22529 }
22530
22531 // NewShowcaseChangeExternalSharingPolicyDetails returns a new ShowcaseChangeExternalSharingPolicyDetails instance
22532 func NewShowcaseChangeExternalSharingPolicyDetails(NewValue *ShowcaseExternalSharingPolicy, PreviousValue *ShowcaseExternalSharingPolicy) *ShowcaseChangeExternalSharingPolicyDetails {
22533 s := new(ShowcaseChangeExternalSharingPolicyDetails)
22534 s.NewValue = NewValue
22535 s.PreviousValue = PreviousValue
22536 return s
22537 }
22538
22539 // ShowcaseChangeExternalSharingPolicyType : has no documentation (yet)
22540 type ShowcaseChangeExternalSharingPolicyType struct {
22541 // Description : has no documentation (yet)
22542 Description string `json:"description"`
22543 }
22544
22545 // NewShowcaseChangeExternalSharingPolicyType returns a new ShowcaseChangeExternalSharingPolicyType instance
22546 func NewShowcaseChangeExternalSharingPolicyType(Description string) *ShowcaseChangeExternalSharingPolicyType {
22547 s := new(ShowcaseChangeExternalSharingPolicyType)
22548 s.Description = Description
22549 return s
22550 }
22551
22552 // ShowcaseCreatedDetails : Created showcase.
22553 type ShowcaseCreatedDetails struct {
22554 // EventUuid : Event unique identifier.
22555 EventUuid string `json:"event_uuid"`
22556 }
22557
22558 // NewShowcaseCreatedDetails returns a new ShowcaseCreatedDetails instance
22559 func NewShowcaseCreatedDetails(EventUuid string) *ShowcaseCreatedDetails {
22560 s := new(ShowcaseCreatedDetails)
22561 s.EventUuid = EventUuid
22562 return s
22563 }
22564
22565 // ShowcaseCreatedType : has no documentation (yet)
22566 type ShowcaseCreatedType struct {
22567 // Description : has no documentation (yet)
22568 Description string `json:"description"`
22569 }
22570
22571 // NewShowcaseCreatedType returns a new ShowcaseCreatedType instance
22572 func NewShowcaseCreatedType(Description string) *ShowcaseCreatedType {
22573 s := new(ShowcaseCreatedType)
22574 s.Description = Description
22575 return s
22576 }
22577
22578 // ShowcaseDeleteCommentDetails : Deleted showcase comment.
22579 type ShowcaseDeleteCommentDetails struct {
22580 // EventUuid : Event unique identifier.
22581 EventUuid string `json:"event_uuid"`
22582 // CommentText : Comment text.
22583 CommentText string `json:"comment_text,omitempty"`
22584 }
22585
22586 // NewShowcaseDeleteCommentDetails returns a new ShowcaseDeleteCommentDetails instance
22587 func NewShowcaseDeleteCommentDetails(EventUuid string) *ShowcaseDeleteCommentDetails {
22588 s := new(ShowcaseDeleteCommentDetails)
22589 s.EventUuid = EventUuid
22590 return s
22591 }
22592
22593 // ShowcaseDeleteCommentType : has no documentation (yet)
22594 type ShowcaseDeleteCommentType struct {
22595 // Description : has no documentation (yet)
22596 Description string `json:"description"`
22597 }
22598
22599 // NewShowcaseDeleteCommentType returns a new ShowcaseDeleteCommentType instance
22600 func NewShowcaseDeleteCommentType(Description string) *ShowcaseDeleteCommentType {
22601 s := new(ShowcaseDeleteCommentType)
22602 s.Description = Description
22603 return s
22604 }
22605
22606 // ShowcaseDocumentLogInfo : Showcase document's logged information.
22607 type ShowcaseDocumentLogInfo struct {
22608 // ShowcaseId : Showcase document Id.
22609 ShowcaseId string `json:"showcase_id"`
22610 // ShowcaseTitle : Showcase document title.
22611 ShowcaseTitle string `json:"showcase_title"`
22612 }
22613
22614 // NewShowcaseDocumentLogInfo returns a new ShowcaseDocumentLogInfo instance
22615 func NewShowcaseDocumentLogInfo(ShowcaseId string, ShowcaseTitle string) *ShowcaseDocumentLogInfo {
22616 s := new(ShowcaseDocumentLogInfo)
22617 s.ShowcaseId = ShowcaseId
22618 s.ShowcaseTitle = ShowcaseTitle
22619 return s
22620 }
22621
22622 // ShowcaseDownloadPolicy : Policy for controlling if files can be downloaded
22623 // from Showcases by team members
22624 type ShowcaseDownloadPolicy struct {
22625 dropbox.Tagged
22626 }
22627
22628 // Valid tag values for ShowcaseDownloadPolicy
22629 const (
22630 ShowcaseDownloadPolicyDisabled = "disabled"
22631 ShowcaseDownloadPolicyEnabled = "enabled"
22632 ShowcaseDownloadPolicyOther = "other"
22633 )
22634
22635 // ShowcaseEditCommentDetails : Edited showcase comment.
22636 type ShowcaseEditCommentDetails struct {
22637 // EventUuid : Event unique identifier.
22638 EventUuid string `json:"event_uuid"`
22639 // CommentText : Comment text.
22640 CommentText string `json:"comment_text,omitempty"`
22641 }
22642
22643 // NewShowcaseEditCommentDetails returns a new ShowcaseEditCommentDetails instance
22644 func NewShowcaseEditCommentDetails(EventUuid string) *ShowcaseEditCommentDetails {
22645 s := new(ShowcaseEditCommentDetails)
22646 s.EventUuid = EventUuid
22647 return s
22648 }
22649
22650 // ShowcaseEditCommentType : has no documentation (yet)
22651 type ShowcaseEditCommentType struct {
22652 // Description : has no documentation (yet)
22653 Description string `json:"description"`
22654 }
22655
22656 // NewShowcaseEditCommentType returns a new ShowcaseEditCommentType instance
22657 func NewShowcaseEditCommentType(Description string) *ShowcaseEditCommentType {
22658 s := new(ShowcaseEditCommentType)
22659 s.Description = Description
22660 return s
22661 }
22662
22663 // ShowcaseEditedDetails : Edited showcase.
22664 type ShowcaseEditedDetails struct {
22665 // EventUuid : Event unique identifier.
22666 EventUuid string `json:"event_uuid"`
22667 }
22668
22669 // NewShowcaseEditedDetails returns a new ShowcaseEditedDetails instance
22670 func NewShowcaseEditedDetails(EventUuid string) *ShowcaseEditedDetails {
22671 s := new(ShowcaseEditedDetails)
22672 s.EventUuid = EventUuid
22673 return s
22674 }
22675
22676 // ShowcaseEditedType : has no documentation (yet)
22677 type ShowcaseEditedType struct {
22678 // Description : has no documentation (yet)
22679 Description string `json:"description"`
22680 }
22681
22682 // NewShowcaseEditedType returns a new ShowcaseEditedType instance
22683 func NewShowcaseEditedType(Description string) *ShowcaseEditedType {
22684 s := new(ShowcaseEditedType)
22685 s.Description = Description
22686 return s
22687 }
22688
22689 // ShowcaseEnabledPolicy : Policy for controlling whether Showcase is enabled.
22690 type ShowcaseEnabledPolicy struct {
22691 dropbox.Tagged
22692 }
22693
22694 // Valid tag values for ShowcaseEnabledPolicy
22695 const (
22696 ShowcaseEnabledPolicyDisabled = "disabled"
22697 ShowcaseEnabledPolicyEnabled = "enabled"
22698 ShowcaseEnabledPolicyOther = "other"
22699 )
22700
22701 // ShowcaseExternalSharingPolicy : Policy for controlling if team members can
22702 // share Showcases externally.
22703 type ShowcaseExternalSharingPolicy struct {
22704 dropbox.Tagged
22705 }
22706
22707 // Valid tag values for ShowcaseExternalSharingPolicy
22708 const (
22709 ShowcaseExternalSharingPolicyDisabled = "disabled"
22710 ShowcaseExternalSharingPolicyEnabled = "enabled"
22711 ShowcaseExternalSharingPolicyOther = "other"
22712 )
22713
22714 // ShowcaseFileAddedDetails : Added file to showcase.
22715 type ShowcaseFileAddedDetails struct {
22716 // EventUuid : Event unique identifier.
22717 EventUuid string `json:"event_uuid"`
22718 }
22719
22720 // NewShowcaseFileAddedDetails returns a new ShowcaseFileAddedDetails instance
22721 func NewShowcaseFileAddedDetails(EventUuid string) *ShowcaseFileAddedDetails {
22722 s := new(ShowcaseFileAddedDetails)
22723 s.EventUuid = EventUuid
22724 return s
22725 }
22726
22727 // ShowcaseFileAddedType : has no documentation (yet)
22728 type ShowcaseFileAddedType struct {
22729 // Description : has no documentation (yet)
22730 Description string `json:"description"`
22731 }
22732
22733 // NewShowcaseFileAddedType returns a new ShowcaseFileAddedType instance
22734 func NewShowcaseFileAddedType(Description string) *ShowcaseFileAddedType {
22735 s := new(ShowcaseFileAddedType)
22736 s.Description = Description
22737 return s
22738 }
22739
22740 // ShowcaseFileDownloadDetails : Downloaded file from showcase.
22741 type ShowcaseFileDownloadDetails struct {
22742 // EventUuid : Event unique identifier.
22743 EventUuid string `json:"event_uuid"`
22744 // DownloadType : Showcase download type.
22745 DownloadType string `json:"download_type"`
22746 }
22747
22748 // NewShowcaseFileDownloadDetails returns a new ShowcaseFileDownloadDetails instance
22749 func NewShowcaseFileDownloadDetails(EventUuid string, DownloadType string) *ShowcaseFileDownloadDetails {
22750 s := new(ShowcaseFileDownloadDetails)
22751 s.EventUuid = EventUuid
22752 s.DownloadType = DownloadType
22753 return s
22754 }
22755
22756 // ShowcaseFileDownloadType : has no documentation (yet)
22757 type ShowcaseFileDownloadType struct {
22758 // Description : has no documentation (yet)
22759 Description string `json:"description"`
22760 }
22761
22762 // NewShowcaseFileDownloadType returns a new ShowcaseFileDownloadType instance
22763 func NewShowcaseFileDownloadType(Description string) *ShowcaseFileDownloadType {
22764 s := new(ShowcaseFileDownloadType)
22765 s.Description = Description
22766 return s
22767 }
22768
22769 // ShowcaseFileRemovedDetails : Removed file from showcase.
22770 type ShowcaseFileRemovedDetails struct {
22771 // EventUuid : Event unique identifier.
22772 EventUuid string `json:"event_uuid"`
22773 }
22774
22775 // NewShowcaseFileRemovedDetails returns a new ShowcaseFileRemovedDetails instance
22776 func NewShowcaseFileRemovedDetails(EventUuid string) *ShowcaseFileRemovedDetails {
22777 s := new(ShowcaseFileRemovedDetails)
22778 s.EventUuid = EventUuid
22779 return s
22780 }
22781
22782 // ShowcaseFileRemovedType : has no documentation (yet)
22783 type ShowcaseFileRemovedType struct {
22784 // Description : has no documentation (yet)
22785 Description string `json:"description"`
22786 }
22787
22788 // NewShowcaseFileRemovedType returns a new ShowcaseFileRemovedType instance
22789 func NewShowcaseFileRemovedType(Description string) *ShowcaseFileRemovedType {
22790 s := new(ShowcaseFileRemovedType)
22791 s.Description = Description
22792 return s
22793 }
22794
22795 // ShowcaseFileViewDetails : Viewed file in showcase.
22796 type ShowcaseFileViewDetails struct {
22797 // EventUuid : Event unique identifier.
22798 EventUuid string `json:"event_uuid"`
22799 }
22800
22801 // NewShowcaseFileViewDetails returns a new ShowcaseFileViewDetails instance
22802 func NewShowcaseFileViewDetails(EventUuid string) *ShowcaseFileViewDetails {
22803 s := new(ShowcaseFileViewDetails)
22804 s.EventUuid = EventUuid
22805 return s
22806 }
22807
22808 // ShowcaseFileViewType : has no documentation (yet)
22809 type ShowcaseFileViewType struct {
22810 // Description : has no documentation (yet)
22811 Description string `json:"description"`
22812 }
22813
22814 // NewShowcaseFileViewType returns a new ShowcaseFileViewType instance
22815 func NewShowcaseFileViewType(Description string) *ShowcaseFileViewType {
22816 s := new(ShowcaseFileViewType)
22817 s.Description = Description
22818 return s
22819 }
22820
22821 // ShowcasePermanentlyDeletedDetails : Permanently deleted showcase.
22822 type ShowcasePermanentlyDeletedDetails struct {
22823 // EventUuid : Event unique identifier.
22824 EventUuid string `json:"event_uuid"`
22825 }
22826
22827 // NewShowcasePermanentlyDeletedDetails returns a new ShowcasePermanentlyDeletedDetails instance
22828 func NewShowcasePermanentlyDeletedDetails(EventUuid string) *ShowcasePermanentlyDeletedDetails {
22829 s := new(ShowcasePermanentlyDeletedDetails)
22830 s.EventUuid = EventUuid
22831 return s
22832 }
22833
22834 // ShowcasePermanentlyDeletedType : has no documentation (yet)
22835 type ShowcasePermanentlyDeletedType struct {
22836 // Description : has no documentation (yet)
22837 Description string `json:"description"`
22838 }
22839
22840 // NewShowcasePermanentlyDeletedType returns a new ShowcasePermanentlyDeletedType instance
22841 func NewShowcasePermanentlyDeletedType(Description string) *ShowcasePermanentlyDeletedType {
22842 s := new(ShowcasePermanentlyDeletedType)
22843 s.Description = Description
22844 return s
22845 }
22846
22847 // ShowcasePostCommentDetails : Added showcase comment.
22848 type ShowcasePostCommentDetails struct {
22849 // EventUuid : Event unique identifier.
22850 EventUuid string `json:"event_uuid"`
22851 // CommentText : Comment text.
22852 CommentText string `json:"comment_text,omitempty"`
22853 }
22854
22855 // NewShowcasePostCommentDetails returns a new ShowcasePostCommentDetails instance
22856 func NewShowcasePostCommentDetails(EventUuid string) *ShowcasePostCommentDetails {
22857 s := new(ShowcasePostCommentDetails)
22858 s.EventUuid = EventUuid
22859 return s
22860 }
22861
22862 // ShowcasePostCommentType : has no documentation (yet)
22863 type ShowcasePostCommentType struct {
22864 // Description : has no documentation (yet)
22865 Description string `json:"description"`
22866 }
22867
22868 // NewShowcasePostCommentType returns a new ShowcasePostCommentType instance
22869 func NewShowcasePostCommentType(Description string) *ShowcasePostCommentType {
22870 s := new(ShowcasePostCommentType)
22871 s.Description = Description
22872 return s
22873 }
22874
22875 // ShowcaseRemoveMemberDetails : Removed member from showcase.
22876 type ShowcaseRemoveMemberDetails struct {
22877 // EventUuid : Event unique identifier.
22878 EventUuid string `json:"event_uuid"`
22879 }
22880
22881 // NewShowcaseRemoveMemberDetails returns a new ShowcaseRemoveMemberDetails instance
22882 func NewShowcaseRemoveMemberDetails(EventUuid string) *ShowcaseRemoveMemberDetails {
22883 s := new(ShowcaseRemoveMemberDetails)
22884 s.EventUuid = EventUuid
22885 return s
22886 }
22887
22888 // ShowcaseRemoveMemberType : has no documentation (yet)
22889 type ShowcaseRemoveMemberType struct {
22890 // Description : has no documentation (yet)
22891 Description string `json:"description"`
22892 }
22893
22894 // NewShowcaseRemoveMemberType returns a new ShowcaseRemoveMemberType instance
22895 func NewShowcaseRemoveMemberType(Description string) *ShowcaseRemoveMemberType {
22896 s := new(ShowcaseRemoveMemberType)
22897 s.Description = Description
22898 return s
22899 }
22900
22901 // ShowcaseRenamedDetails : Renamed showcase.
22902 type ShowcaseRenamedDetails struct {
22903 // EventUuid : Event unique identifier.
22904 EventUuid string `json:"event_uuid"`
22905 }
22906
22907 // NewShowcaseRenamedDetails returns a new ShowcaseRenamedDetails instance
22908 func NewShowcaseRenamedDetails(EventUuid string) *ShowcaseRenamedDetails {
22909 s := new(ShowcaseRenamedDetails)
22910 s.EventUuid = EventUuid
22911 return s
22912 }
22913
22914 // ShowcaseRenamedType : has no documentation (yet)
22915 type ShowcaseRenamedType struct {
22916 // Description : has no documentation (yet)
22917 Description string `json:"description"`
22918 }
22919
22920 // NewShowcaseRenamedType returns a new ShowcaseRenamedType instance
22921 func NewShowcaseRenamedType(Description string) *ShowcaseRenamedType {
22922 s := new(ShowcaseRenamedType)
22923 s.Description = Description
22924 return s
22925 }
22926
22927 // ShowcaseRequestAccessDetails : Requested access to showcase.
22928 type ShowcaseRequestAccessDetails struct {
22929 // EventUuid : Event unique identifier.
22930 EventUuid string `json:"event_uuid"`
22931 }
22932
22933 // NewShowcaseRequestAccessDetails returns a new ShowcaseRequestAccessDetails instance
22934 func NewShowcaseRequestAccessDetails(EventUuid string) *ShowcaseRequestAccessDetails {
22935 s := new(ShowcaseRequestAccessDetails)
22936 s.EventUuid = EventUuid
22937 return s
22938 }
22939
22940 // ShowcaseRequestAccessType : has no documentation (yet)
22941 type ShowcaseRequestAccessType struct {
22942 // Description : has no documentation (yet)
22943 Description string `json:"description"`
22944 }
22945
22946 // NewShowcaseRequestAccessType returns a new ShowcaseRequestAccessType instance
22947 func NewShowcaseRequestAccessType(Description string) *ShowcaseRequestAccessType {
22948 s := new(ShowcaseRequestAccessType)
22949 s.Description = Description
22950 return s
22951 }
22952
22953 // ShowcaseResolveCommentDetails : Resolved showcase comment.
22954 type ShowcaseResolveCommentDetails struct {
22955 // EventUuid : Event unique identifier.
22956 EventUuid string `json:"event_uuid"`
22957 // CommentText : Comment text.
22958 CommentText string `json:"comment_text,omitempty"`
22959 }
22960
22961 // NewShowcaseResolveCommentDetails returns a new ShowcaseResolveCommentDetails instance
22962 func NewShowcaseResolveCommentDetails(EventUuid string) *ShowcaseResolveCommentDetails {
22963 s := new(ShowcaseResolveCommentDetails)
22964 s.EventUuid = EventUuid
22965 return s
22966 }
22967
22968 // ShowcaseResolveCommentType : has no documentation (yet)
22969 type ShowcaseResolveCommentType struct {
22970 // Description : has no documentation (yet)
22971 Description string `json:"description"`
22972 }
22973
22974 // NewShowcaseResolveCommentType returns a new ShowcaseResolveCommentType instance
22975 func NewShowcaseResolveCommentType(Description string) *ShowcaseResolveCommentType {
22976 s := new(ShowcaseResolveCommentType)
22977 s.Description = Description
22978 return s
22979 }
22980
22981 // ShowcaseRestoredDetails : Unarchived showcase.
22982 type ShowcaseRestoredDetails struct {
22983 // EventUuid : Event unique identifier.
22984 EventUuid string `json:"event_uuid"`
22985 }
22986
22987 // NewShowcaseRestoredDetails returns a new ShowcaseRestoredDetails instance
22988 func NewShowcaseRestoredDetails(EventUuid string) *ShowcaseRestoredDetails {
22989 s := new(ShowcaseRestoredDetails)
22990 s.EventUuid = EventUuid
22991 return s
22992 }
22993
22994 // ShowcaseRestoredType : has no documentation (yet)
22995 type ShowcaseRestoredType struct {
22996 // Description : has no documentation (yet)
22997 Description string `json:"description"`
22998 }
22999
23000 // NewShowcaseRestoredType returns a new ShowcaseRestoredType instance
23001 func NewShowcaseRestoredType(Description string) *ShowcaseRestoredType {
23002 s := new(ShowcaseRestoredType)
23003 s.Description = Description
23004 return s
23005 }
23006
23007 // ShowcaseTrashedDeprecatedDetails : Deleted showcase (old version).
23008 type ShowcaseTrashedDeprecatedDetails struct {
23009 // EventUuid : Event unique identifier.
23010 EventUuid string `json:"event_uuid"`
23011 }
23012
23013 // NewShowcaseTrashedDeprecatedDetails returns a new ShowcaseTrashedDeprecatedDetails instance
23014 func NewShowcaseTrashedDeprecatedDetails(EventUuid string) *ShowcaseTrashedDeprecatedDetails {
23015 s := new(ShowcaseTrashedDeprecatedDetails)
23016 s.EventUuid = EventUuid
23017 return s
23018 }
23019
23020 // ShowcaseTrashedDeprecatedType : has no documentation (yet)
23021 type ShowcaseTrashedDeprecatedType struct {
23022 // Description : has no documentation (yet)
23023 Description string `json:"description"`
23024 }
23025
23026 // NewShowcaseTrashedDeprecatedType returns a new ShowcaseTrashedDeprecatedType instance
23027 func NewShowcaseTrashedDeprecatedType(Description string) *ShowcaseTrashedDeprecatedType {
23028 s := new(ShowcaseTrashedDeprecatedType)
23029 s.Description = Description
23030 return s
23031 }
23032
23033 // ShowcaseTrashedDetails : Deleted showcase.
23034 type ShowcaseTrashedDetails struct {
23035 // EventUuid : Event unique identifier.
23036 EventUuid string `json:"event_uuid"`
23037 }
23038
23039 // NewShowcaseTrashedDetails returns a new ShowcaseTrashedDetails instance
23040 func NewShowcaseTrashedDetails(EventUuid string) *ShowcaseTrashedDetails {
23041 s := new(ShowcaseTrashedDetails)
23042 s.EventUuid = EventUuid
23043 return s
23044 }
23045
23046 // ShowcaseTrashedType : has no documentation (yet)
23047 type ShowcaseTrashedType struct {
23048 // Description : has no documentation (yet)
23049 Description string `json:"description"`
23050 }
23051
23052 // NewShowcaseTrashedType returns a new ShowcaseTrashedType instance
23053 func NewShowcaseTrashedType(Description string) *ShowcaseTrashedType {
23054 s := new(ShowcaseTrashedType)
23055 s.Description = Description
23056 return s
23057 }
23058
23059 // ShowcaseUnresolveCommentDetails : Unresolved showcase comment.
23060 type ShowcaseUnresolveCommentDetails struct {
23061 // EventUuid : Event unique identifier.
23062 EventUuid string `json:"event_uuid"`
23063 // CommentText : Comment text.
23064 CommentText string `json:"comment_text,omitempty"`
23065 }
23066
23067 // NewShowcaseUnresolveCommentDetails returns a new ShowcaseUnresolveCommentDetails instance
23068 func NewShowcaseUnresolveCommentDetails(EventUuid string) *ShowcaseUnresolveCommentDetails {
23069 s := new(ShowcaseUnresolveCommentDetails)
23070 s.EventUuid = EventUuid
23071 return s
23072 }
23073
23074 // ShowcaseUnresolveCommentType : has no documentation (yet)
23075 type ShowcaseUnresolveCommentType struct {
23076 // Description : has no documentation (yet)
23077 Description string `json:"description"`
23078 }
23079
23080 // NewShowcaseUnresolveCommentType returns a new ShowcaseUnresolveCommentType instance
23081 func NewShowcaseUnresolveCommentType(Description string) *ShowcaseUnresolveCommentType {
23082 s := new(ShowcaseUnresolveCommentType)
23083 s.Description = Description
23084 return s
23085 }
23086
23087 // ShowcaseUntrashedDeprecatedDetails : Restored showcase (old version).
23088 type ShowcaseUntrashedDeprecatedDetails struct {
23089 // EventUuid : Event unique identifier.
23090 EventUuid string `json:"event_uuid"`
23091 }
23092
23093 // NewShowcaseUntrashedDeprecatedDetails returns a new ShowcaseUntrashedDeprecatedDetails instance
23094 func NewShowcaseUntrashedDeprecatedDetails(EventUuid string) *ShowcaseUntrashedDeprecatedDetails {
23095 s := new(ShowcaseUntrashedDeprecatedDetails)
23096 s.EventUuid = EventUuid
23097 return s
23098 }
23099
23100 // ShowcaseUntrashedDeprecatedType : has no documentation (yet)
23101 type ShowcaseUntrashedDeprecatedType struct {
23102 // Description : has no documentation (yet)
23103 Description string `json:"description"`
23104 }
23105
23106 // NewShowcaseUntrashedDeprecatedType returns a new ShowcaseUntrashedDeprecatedType instance
23107 func NewShowcaseUntrashedDeprecatedType(Description string) *ShowcaseUntrashedDeprecatedType {
23108 s := new(ShowcaseUntrashedDeprecatedType)
23109 s.Description = Description
23110 return s
23111 }
23112
23113 // ShowcaseUntrashedDetails : Restored showcase.
23114 type ShowcaseUntrashedDetails struct {
23115 // EventUuid : Event unique identifier.
23116 EventUuid string `json:"event_uuid"`
23117 }
23118
23119 // NewShowcaseUntrashedDetails returns a new ShowcaseUntrashedDetails instance
23120 func NewShowcaseUntrashedDetails(EventUuid string) *ShowcaseUntrashedDetails {
23121 s := new(ShowcaseUntrashedDetails)
23122 s.EventUuid = EventUuid
23123 return s
23124 }
23125
23126 // ShowcaseUntrashedType : has no documentation (yet)
23127 type ShowcaseUntrashedType struct {
23128 // Description : has no documentation (yet)
23129 Description string `json:"description"`
23130 }
23131
23132 // NewShowcaseUntrashedType returns a new ShowcaseUntrashedType instance
23133 func NewShowcaseUntrashedType(Description string) *ShowcaseUntrashedType {
23134 s := new(ShowcaseUntrashedType)
23135 s.Description = Description
23136 return s
23137 }
23138
23139 // ShowcaseViewDetails : Viewed showcase.
23140 type ShowcaseViewDetails struct {
23141 // EventUuid : Event unique identifier.
23142 EventUuid string `json:"event_uuid"`
23143 }
23144
23145 // NewShowcaseViewDetails returns a new ShowcaseViewDetails instance
23146 func NewShowcaseViewDetails(EventUuid string) *ShowcaseViewDetails {
23147 s := new(ShowcaseViewDetails)
23148 s.EventUuid = EventUuid
23149 return s
23150 }
23151
23152 // ShowcaseViewType : has no documentation (yet)
23153 type ShowcaseViewType struct {
23154 // Description : has no documentation (yet)
23155 Description string `json:"description"`
23156 }
23157
23158 // NewShowcaseViewType returns a new ShowcaseViewType instance
23159 func NewShowcaseViewType(Description string) *ShowcaseViewType {
23160 s := new(ShowcaseViewType)
23161 s.Description = Description
23162 return s
23163 }
23164
23165 // SignInAsSessionEndDetails : Ended admin sign-in-as session.
23166 type SignInAsSessionEndDetails struct {
23167 }
23168
23169 // NewSignInAsSessionEndDetails returns a new SignInAsSessionEndDetails instance
23170 func NewSignInAsSessionEndDetails() *SignInAsSessionEndDetails {
23171 s := new(SignInAsSessionEndDetails)
23172 return s
23173 }
23174
23175 // SignInAsSessionEndType : has no documentation (yet)
23176 type SignInAsSessionEndType struct {
23177 // Description : has no documentation (yet)
23178 Description string `json:"description"`
23179 }
23180
23181 // NewSignInAsSessionEndType returns a new SignInAsSessionEndType instance
23182 func NewSignInAsSessionEndType(Description string) *SignInAsSessionEndType {
23183 s := new(SignInAsSessionEndType)
23184 s.Description = Description
23185 return s
23186 }
23187
23188 // SignInAsSessionStartDetails : Started admin sign-in-as session.
23189 type SignInAsSessionStartDetails struct {
23190 }
23191
23192 // NewSignInAsSessionStartDetails returns a new SignInAsSessionStartDetails instance
23193 func NewSignInAsSessionStartDetails() *SignInAsSessionStartDetails {
23194 s := new(SignInAsSessionStartDetails)
23195 return s
23196 }
23197
23198 // SignInAsSessionStartType : has no documentation (yet)
23199 type SignInAsSessionStartType struct {
23200 // Description : has no documentation (yet)
23201 Description string `json:"description"`
23202 }
23203
23204 // NewSignInAsSessionStartType returns a new SignInAsSessionStartType instance
23205 func NewSignInAsSessionStartType(Description string) *SignInAsSessionStartType {
23206 s := new(SignInAsSessionStartType)
23207 s.Description = Description
23208 return s
23209 }
23210
23211 // SmartSyncChangePolicyDetails : Changed default Smart Sync setting for team
23212 // members.
23213 type SmartSyncChangePolicyDetails struct {
23214 // NewValue : New smart sync policy.
23215 NewValue *team_policies.SmartSyncPolicy `json:"new_value,omitempty"`
23216 // PreviousValue : Previous smart sync policy.
23217 PreviousValue *team_policies.SmartSyncPolicy `json:"previous_value,omitempty"`
23218 }
23219
23220 // NewSmartSyncChangePolicyDetails returns a new SmartSyncChangePolicyDetails instance
23221 func NewSmartSyncChangePolicyDetails() *SmartSyncChangePolicyDetails {
23222 s := new(SmartSyncChangePolicyDetails)
23223 return s
23224 }
23225
23226 // SmartSyncChangePolicyType : has no documentation (yet)
23227 type SmartSyncChangePolicyType struct {
23228 // Description : has no documentation (yet)
23229 Description string `json:"description"`
23230 }
23231
23232 // NewSmartSyncChangePolicyType returns a new SmartSyncChangePolicyType instance
23233 func NewSmartSyncChangePolicyType(Description string) *SmartSyncChangePolicyType {
23234 s := new(SmartSyncChangePolicyType)
23235 s.Description = Description
23236 return s
23237 }
23238
23239 // SmartSyncCreateAdminPrivilegeReportDetails : Created Smart Sync non-admin
23240 // devices report.
23241 type SmartSyncCreateAdminPrivilegeReportDetails struct {
23242 }
23243
23244 // NewSmartSyncCreateAdminPrivilegeReportDetails returns a new SmartSyncCreateAdminPrivilegeReportDetails instance
23245 func NewSmartSyncCreateAdminPrivilegeReportDetails() *SmartSyncCreateAdminPrivilegeReportDetails {
23246 s := new(SmartSyncCreateAdminPrivilegeReportDetails)
23247 return s
23248 }
23249
23250 // SmartSyncCreateAdminPrivilegeReportType : has no documentation (yet)
23251 type SmartSyncCreateAdminPrivilegeReportType struct {
23252 // Description : has no documentation (yet)
23253 Description string `json:"description"`
23254 }
23255
23256 // NewSmartSyncCreateAdminPrivilegeReportType returns a new SmartSyncCreateAdminPrivilegeReportType instance
23257 func NewSmartSyncCreateAdminPrivilegeReportType(Description string) *SmartSyncCreateAdminPrivilegeReportType {
23258 s := new(SmartSyncCreateAdminPrivilegeReportType)
23259 s.Description = Description
23260 return s
23261 }
23262
23263 // SmartSyncNotOptOutDetails : Opted team into Smart Sync.
23264 type SmartSyncNotOptOutDetails struct {
23265 // PreviousValue : Previous Smart Sync opt out policy.
23266 PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"`
23267 // NewValue : New Smart Sync opt out policy.
23268 NewValue *SmartSyncOptOutPolicy `json:"new_value"`
23269 }
23270
23271 // NewSmartSyncNotOptOutDetails returns a new SmartSyncNotOptOutDetails instance
23272 func NewSmartSyncNotOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncNotOptOutDetails {
23273 s := new(SmartSyncNotOptOutDetails)
23274 s.PreviousValue = PreviousValue
23275 s.NewValue = NewValue
23276 return s
23277 }
23278
23279 // SmartSyncNotOptOutType : has no documentation (yet)
23280 type SmartSyncNotOptOutType struct {
23281 // Description : has no documentation (yet)
23282 Description string `json:"description"`
23283 }
23284
23285 // NewSmartSyncNotOptOutType returns a new SmartSyncNotOptOutType instance
23286 func NewSmartSyncNotOptOutType(Description string) *SmartSyncNotOptOutType {
23287 s := new(SmartSyncNotOptOutType)
23288 s.Description = Description
23289 return s
23290 }
23291
23292 // SmartSyncOptOutDetails : Opted team out of Smart Sync.
23293 type SmartSyncOptOutDetails struct {
23294 // PreviousValue : Previous Smart Sync opt out policy.
23295 PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"`
23296 // NewValue : New Smart Sync opt out policy.
23297 NewValue *SmartSyncOptOutPolicy `json:"new_value"`
23298 }
23299
23300 // NewSmartSyncOptOutDetails returns a new SmartSyncOptOutDetails instance
23301 func NewSmartSyncOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncOptOutDetails {
23302 s := new(SmartSyncOptOutDetails)
23303 s.PreviousValue = PreviousValue
23304 s.NewValue = NewValue
23305 return s
23306 }
23307
23308 // SmartSyncOptOutPolicy : has no documentation (yet)
23309 type SmartSyncOptOutPolicy struct {
23310 dropbox.Tagged
23311 }
23312
23313 // Valid tag values for SmartSyncOptOutPolicy
23314 const (
23315 SmartSyncOptOutPolicyDefault = "default"
23316 SmartSyncOptOutPolicyOptedOut = "opted_out"
23317 SmartSyncOptOutPolicyOther = "other"
23318 )
23319
23320 // SmartSyncOptOutType : has no documentation (yet)
23321 type SmartSyncOptOutType struct {
23322 // Description : has no documentation (yet)
23323 Description string `json:"description"`
23324 }
23325
23326 // NewSmartSyncOptOutType returns a new SmartSyncOptOutType instance
23327 func NewSmartSyncOptOutType(Description string) *SmartSyncOptOutType {
23328 s := new(SmartSyncOptOutType)
23329 s.Description = Description
23330 return s
23331 }
23332
23333 // SmarterSmartSyncPolicyChangedDetails : Changed automatic Smart Sync setting
23334 // for team.
23335 type SmarterSmartSyncPolicyChangedDetails struct {
23336 // PreviousValue : Previous automatic Smart Sync setting.
23337 PreviousValue *team_policies.SmarterSmartSyncPolicyState `json:"previous_value"`
23338 // NewValue : New automatic Smart Sync setting.
23339 NewValue *team_policies.SmarterSmartSyncPolicyState `json:"new_value"`
23340 }
23341
23342 // NewSmarterSmartSyncPolicyChangedDetails returns a new SmarterSmartSyncPolicyChangedDetails instance
23343 func NewSmarterSmartSyncPolicyChangedDetails(PreviousValue *team_policies.SmarterSmartSyncPolicyState, NewValue *team_policies.SmarterSmartSyncPolicyState) *SmarterSmartSyncPolicyChangedDetails {
23344 s := new(SmarterSmartSyncPolicyChangedDetails)
23345 s.PreviousValue = PreviousValue
23346 s.NewValue = NewValue
23347 return s
23348 }
23349
23350 // SmarterSmartSyncPolicyChangedType : has no documentation (yet)
23351 type SmarterSmartSyncPolicyChangedType struct {
23352 // Description : has no documentation (yet)
23353 Description string `json:"description"`
23354 }
23355
23356 // NewSmarterSmartSyncPolicyChangedType returns a new SmarterSmartSyncPolicyChangedType instance
23357 func NewSmarterSmartSyncPolicyChangedType(Description string) *SmarterSmartSyncPolicyChangedType {
23358 s := new(SmarterSmartSyncPolicyChangedType)
23359 s.Description = Description
23360 return s
23361 }
23362
23363 // SpaceCapsType : Space limit alert policy
23364 type SpaceCapsType struct {
23365 dropbox.Tagged
23366 }
23367
23368 // Valid tag values for SpaceCapsType
23369 const (
23370 SpaceCapsTypeHard = "hard"
23371 SpaceCapsTypeOff = "off"
23372 SpaceCapsTypeSoft = "soft"
23373 SpaceCapsTypeOther = "other"
23374 )
23375
23376 // SpaceLimitsStatus : has no documentation (yet)
23377 type SpaceLimitsStatus struct {
23378 dropbox.Tagged
23379 }
23380
23381 // Valid tag values for SpaceLimitsStatus
23382 const (
23383 SpaceLimitsStatusNearQuota = "near_quota"
23384 SpaceLimitsStatusOverQuota = "over_quota"
23385 SpaceLimitsStatusWithinQuota = "within_quota"
23386 SpaceLimitsStatusOther = "other"
23387 )
23388
23389 // SsoAddCertDetails : Added X.509 certificate for SSO.
23390 type SsoAddCertDetails struct {
23391 // CertificateDetails : SSO certificate details.
23392 CertificateDetails *Certificate `json:"certificate_details"`
23393 }
23394
23395 // NewSsoAddCertDetails returns a new SsoAddCertDetails instance
23396 func NewSsoAddCertDetails(CertificateDetails *Certificate) *SsoAddCertDetails {
23397 s := new(SsoAddCertDetails)
23398 s.CertificateDetails = CertificateDetails
23399 return s
23400 }
23401
23402 // SsoAddCertType : has no documentation (yet)
23403 type SsoAddCertType struct {
23404 // Description : has no documentation (yet)
23405 Description string `json:"description"`
23406 }
23407
23408 // NewSsoAddCertType returns a new SsoAddCertType instance
23409 func NewSsoAddCertType(Description string) *SsoAddCertType {
23410 s := new(SsoAddCertType)
23411 s.Description = Description
23412 return s
23413 }
23414
23415 // SsoAddLoginUrlDetails : Added sign-in URL for SSO.
23416 type SsoAddLoginUrlDetails struct {
23417 // NewValue : New single sign-on login URL.
23418 NewValue string `json:"new_value"`
23419 }
23420
23421 // NewSsoAddLoginUrlDetails returns a new SsoAddLoginUrlDetails instance
23422 func NewSsoAddLoginUrlDetails(NewValue string) *SsoAddLoginUrlDetails {
23423 s := new(SsoAddLoginUrlDetails)
23424 s.NewValue = NewValue
23425 return s
23426 }
23427
23428 // SsoAddLoginUrlType : has no documentation (yet)
23429 type SsoAddLoginUrlType struct {
23430 // Description : has no documentation (yet)
23431 Description string `json:"description"`
23432 }
23433
23434 // NewSsoAddLoginUrlType returns a new SsoAddLoginUrlType instance
23435 func NewSsoAddLoginUrlType(Description string) *SsoAddLoginUrlType {
23436 s := new(SsoAddLoginUrlType)
23437 s.Description = Description
23438 return s
23439 }
23440
23441 // SsoAddLogoutUrlDetails : Added sign-out URL for SSO.
23442 type SsoAddLogoutUrlDetails struct {
23443 // NewValue : New single sign-on logout URL.
23444 NewValue string `json:"new_value,omitempty"`
23445 }
23446
23447 // NewSsoAddLogoutUrlDetails returns a new SsoAddLogoutUrlDetails instance
23448 func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails {
23449 s := new(SsoAddLogoutUrlDetails)
23450 return s
23451 }
23452
23453 // SsoAddLogoutUrlType : has no documentation (yet)
23454 type SsoAddLogoutUrlType struct {
23455 // Description : has no documentation (yet)
23456 Description string `json:"description"`
23457 }
23458
23459 // NewSsoAddLogoutUrlType returns a new SsoAddLogoutUrlType instance
23460 func NewSsoAddLogoutUrlType(Description string) *SsoAddLogoutUrlType {
23461 s := new(SsoAddLogoutUrlType)
23462 s.Description = Description
23463 return s
23464 }
23465
23466 // SsoChangeCertDetails : Changed X.509 certificate for SSO.
23467 type SsoChangeCertDetails struct {
23468 // PreviousCertificateDetails : Previous SSO certificate details. Might be
23469 // missing due to historical data gap.
23470 PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"`
23471 // NewCertificateDetails : New SSO certificate details.
23472 NewCertificateDetails *Certificate `json:"new_certificate_details"`
23473 }
23474
23475 // NewSsoChangeCertDetails returns a new SsoChangeCertDetails instance
23476 func NewSsoChangeCertDetails(NewCertificateDetails *Certificate) *SsoChangeCertDetails {
23477 s := new(SsoChangeCertDetails)
23478 s.NewCertificateDetails = NewCertificateDetails
23479 return s
23480 }
23481
23482 // SsoChangeCertType : has no documentation (yet)
23483 type SsoChangeCertType struct {
23484 // Description : has no documentation (yet)
23485 Description string `json:"description"`
23486 }
23487
23488 // NewSsoChangeCertType returns a new SsoChangeCertType instance
23489 func NewSsoChangeCertType(Description string) *SsoChangeCertType {
23490 s := new(SsoChangeCertType)
23491 s.Description = Description
23492 return s
23493 }
23494
23495 // SsoChangeLoginUrlDetails : Changed sign-in URL for SSO.
23496 type SsoChangeLoginUrlDetails struct {
23497 // PreviousValue : Previous single sign-on login URL.
23498 PreviousValue string `json:"previous_value"`
23499 // NewValue : New single sign-on login URL.
23500 NewValue string `json:"new_value"`
23501 }
23502
23503 // NewSsoChangeLoginUrlDetails returns a new SsoChangeLoginUrlDetails instance
23504 func NewSsoChangeLoginUrlDetails(PreviousValue string, NewValue string) *SsoChangeLoginUrlDetails {
23505 s := new(SsoChangeLoginUrlDetails)
23506 s.PreviousValue = PreviousValue
23507 s.NewValue = NewValue
23508 return s
23509 }
23510
23511 // SsoChangeLoginUrlType : has no documentation (yet)
23512 type SsoChangeLoginUrlType struct {
23513 // Description : has no documentation (yet)
23514 Description string `json:"description"`
23515 }
23516
23517 // NewSsoChangeLoginUrlType returns a new SsoChangeLoginUrlType instance
23518 func NewSsoChangeLoginUrlType(Description string) *SsoChangeLoginUrlType {
23519 s := new(SsoChangeLoginUrlType)
23520 s.Description = Description
23521 return s
23522 }
23523
23524 // SsoChangeLogoutUrlDetails : Changed sign-out URL for SSO.
23525 type SsoChangeLogoutUrlDetails struct {
23526 // PreviousValue : Previous single sign-on logout URL. Might be missing due
23527 // to historical data gap.
23528 PreviousValue string `json:"previous_value,omitempty"`
23529 // NewValue : New single sign-on logout URL.
23530 NewValue string `json:"new_value,omitempty"`
23531 }
23532
23533 // NewSsoChangeLogoutUrlDetails returns a new SsoChangeLogoutUrlDetails instance
23534 func NewSsoChangeLogoutUrlDetails() *SsoChangeLogoutUrlDetails {
23535 s := new(SsoChangeLogoutUrlDetails)
23536 return s
23537 }
23538
23539 // SsoChangeLogoutUrlType : has no documentation (yet)
23540 type SsoChangeLogoutUrlType struct {
23541 // Description : has no documentation (yet)
23542 Description string `json:"description"`
23543 }
23544
23545 // NewSsoChangeLogoutUrlType returns a new SsoChangeLogoutUrlType instance
23546 func NewSsoChangeLogoutUrlType(Description string) *SsoChangeLogoutUrlType {
23547 s := new(SsoChangeLogoutUrlType)
23548 s.Description = Description
23549 return s
23550 }
23551
23552 // SsoChangePolicyDetails : Changed single sign-on setting for team.
23553 type SsoChangePolicyDetails struct {
23554 // NewValue : New single sign-on policy.
23555 NewValue *team_policies.SsoPolicy `json:"new_value"`
23556 // PreviousValue : Previous single sign-on policy. Might be missing due to
23557 // historical data gap.
23558 PreviousValue *team_policies.SsoPolicy `json:"previous_value,omitempty"`
23559 }
23560
23561 // NewSsoChangePolicyDetails returns a new SsoChangePolicyDetails instance
23562 func NewSsoChangePolicyDetails(NewValue *team_policies.SsoPolicy) *SsoChangePolicyDetails {
23563 s := new(SsoChangePolicyDetails)
23564 s.NewValue = NewValue
23565 return s
23566 }
23567
23568 // SsoChangePolicyType : has no documentation (yet)
23569 type SsoChangePolicyType struct {
23570 // Description : has no documentation (yet)
23571 Description string `json:"description"`
23572 }
23573
23574 // NewSsoChangePolicyType returns a new SsoChangePolicyType instance
23575 func NewSsoChangePolicyType(Description string) *SsoChangePolicyType {
23576 s := new(SsoChangePolicyType)
23577 s.Description = Description
23578 return s
23579 }
23580
23581 // SsoChangeSamlIdentityModeDetails : Changed SAML identity mode for SSO.
23582 type SsoChangeSamlIdentityModeDetails struct {
23583 // PreviousValue : Previous single sign-on identity mode.
23584 PreviousValue int64 `json:"previous_value"`
23585 // NewValue : New single sign-on identity mode.
23586 NewValue int64 `json:"new_value"`
23587 }
23588
23589 // NewSsoChangeSamlIdentityModeDetails returns a new SsoChangeSamlIdentityModeDetails instance
23590 func NewSsoChangeSamlIdentityModeDetails(PreviousValue int64, NewValue int64) *SsoChangeSamlIdentityModeDetails {
23591 s := new(SsoChangeSamlIdentityModeDetails)
23592 s.PreviousValue = PreviousValue
23593 s.NewValue = NewValue
23594 return s
23595 }
23596
23597 // SsoChangeSamlIdentityModeType : has no documentation (yet)
23598 type SsoChangeSamlIdentityModeType struct {
23599 // Description : has no documentation (yet)
23600 Description string `json:"description"`
23601 }
23602
23603 // NewSsoChangeSamlIdentityModeType returns a new SsoChangeSamlIdentityModeType instance
23604 func NewSsoChangeSamlIdentityModeType(Description string) *SsoChangeSamlIdentityModeType {
23605 s := new(SsoChangeSamlIdentityModeType)
23606 s.Description = Description
23607 return s
23608 }
23609
23610 // SsoErrorDetails : Failed to sign in via SSO.
23611 type SsoErrorDetails struct {
23612 // ErrorDetails : Error details.
23613 ErrorDetails *FailureDetailsLogInfo `json:"error_details"`
23614 }
23615
23616 // NewSsoErrorDetails returns a new SsoErrorDetails instance
23617 func NewSsoErrorDetails(ErrorDetails *FailureDetailsLogInfo) *SsoErrorDetails {
23618 s := new(SsoErrorDetails)
23619 s.ErrorDetails = ErrorDetails
23620 return s
23621 }
23622
23623 // SsoErrorType : has no documentation (yet)
23624 type SsoErrorType struct {
23625 // Description : has no documentation (yet)
23626 Description string `json:"description"`
23627 }
23628
23629 // NewSsoErrorType returns a new SsoErrorType instance
23630 func NewSsoErrorType(Description string) *SsoErrorType {
23631 s := new(SsoErrorType)
23632 s.Description = Description
23633 return s
23634 }
23635
23636 // SsoRemoveCertDetails : Removed X.509 certificate for SSO.
23637 type SsoRemoveCertDetails struct {
23638 }
23639
23640 // NewSsoRemoveCertDetails returns a new SsoRemoveCertDetails instance
23641 func NewSsoRemoveCertDetails() *SsoRemoveCertDetails {
23642 s := new(SsoRemoveCertDetails)
23643 return s
23644 }
23645
23646 // SsoRemoveCertType : has no documentation (yet)
23647 type SsoRemoveCertType struct {
23648 // Description : has no documentation (yet)
23649 Description string `json:"description"`
23650 }
23651
23652 // NewSsoRemoveCertType returns a new SsoRemoveCertType instance
23653 func NewSsoRemoveCertType(Description string) *SsoRemoveCertType {
23654 s := new(SsoRemoveCertType)
23655 s.Description = Description
23656 return s
23657 }
23658
23659 // SsoRemoveLoginUrlDetails : Removed sign-in URL for SSO.
23660 type SsoRemoveLoginUrlDetails struct {
23661 // PreviousValue : Previous single sign-on login URL.
23662 PreviousValue string `json:"previous_value"`
23663 }
23664
23665 // NewSsoRemoveLoginUrlDetails returns a new SsoRemoveLoginUrlDetails instance
23666 func NewSsoRemoveLoginUrlDetails(PreviousValue string) *SsoRemoveLoginUrlDetails {
23667 s := new(SsoRemoveLoginUrlDetails)
23668 s.PreviousValue = PreviousValue
23669 return s
23670 }
23671
23672 // SsoRemoveLoginUrlType : has no documentation (yet)
23673 type SsoRemoveLoginUrlType struct {
23674 // Description : has no documentation (yet)
23675 Description string `json:"description"`
23676 }
23677
23678 // NewSsoRemoveLoginUrlType returns a new SsoRemoveLoginUrlType instance
23679 func NewSsoRemoveLoginUrlType(Description string) *SsoRemoveLoginUrlType {
23680 s := new(SsoRemoveLoginUrlType)
23681 s.Description = Description
23682 return s
23683 }
23684
23685 // SsoRemoveLogoutUrlDetails : Removed sign-out URL for SSO.
23686 type SsoRemoveLogoutUrlDetails struct {
23687 // PreviousValue : Previous single sign-on logout URL.
23688 PreviousValue string `json:"previous_value"`
23689 }
23690
23691 // NewSsoRemoveLogoutUrlDetails returns a new SsoRemoveLogoutUrlDetails instance
23692 func NewSsoRemoveLogoutUrlDetails(PreviousValue string) *SsoRemoveLogoutUrlDetails {
23693 s := new(SsoRemoveLogoutUrlDetails)
23694 s.PreviousValue = PreviousValue
23695 return s
23696 }
23697
23698 // SsoRemoveLogoutUrlType : has no documentation (yet)
23699 type SsoRemoveLogoutUrlType struct {
23700 // Description : has no documentation (yet)
23701 Description string `json:"description"`
23702 }
23703
23704 // NewSsoRemoveLogoutUrlType returns a new SsoRemoveLogoutUrlType instance
23705 func NewSsoRemoveLogoutUrlType(Description string) *SsoRemoveLogoutUrlType {
23706 s := new(SsoRemoveLogoutUrlType)
23707 s.Description = Description
23708 return s
23709 }
23710
23711 // StartedEnterpriseAdminSessionDetails : Started enterprise admin session.
23712 type StartedEnterpriseAdminSessionDetails struct {
23713 // FederationExtraDetails : More information about the organization or team.
23714 FederationExtraDetails *FedExtraDetails `json:"federation_extra_details"`
23715 }
23716
23717 // NewStartedEnterpriseAdminSessionDetails returns a new StartedEnterpriseAdminSessionDetails instance
23718 func NewStartedEnterpriseAdminSessionDetails(FederationExtraDetails *FedExtraDetails) *StartedEnterpriseAdminSessionDetails {
23719 s := new(StartedEnterpriseAdminSessionDetails)
23720 s.FederationExtraDetails = FederationExtraDetails
23721 return s
23722 }
23723
23724 // StartedEnterpriseAdminSessionType : has no documentation (yet)
23725 type StartedEnterpriseAdminSessionType struct {
23726 // Description : has no documentation (yet)
23727 Description string `json:"description"`
23728 }
23729
23730 // NewStartedEnterpriseAdminSessionType returns a new StartedEnterpriseAdminSessionType instance
23731 func NewStartedEnterpriseAdminSessionType(Description string) *StartedEnterpriseAdminSessionType {
23732 s := new(StartedEnterpriseAdminSessionType)
23733 s.Description = Description
23734 return s
23735 }
23736
23737 // TeamActivityCreateReportDetails : Created team activity report.
23738 type TeamActivityCreateReportDetails struct {
23739 // StartDate : Report start date.
23740 StartDate time.Time `json:"start_date"`
23741 // EndDate : Report end date.
23742 EndDate time.Time `json:"end_date"`
23743 }
23744
23745 // NewTeamActivityCreateReportDetails returns a new TeamActivityCreateReportDetails instance
23746 func NewTeamActivityCreateReportDetails(StartDate time.Time, EndDate time.Time) *TeamActivityCreateReportDetails {
23747 s := new(TeamActivityCreateReportDetails)
23748 s.StartDate = StartDate
23749 s.EndDate = EndDate
23750 return s
23751 }
23752
23753 // TeamActivityCreateReportFailDetails : Couldn't generate team activity report.
23754 type TeamActivityCreateReportFailDetails struct {
23755 // FailureReason : Failure reason.
23756 FailureReason *team.TeamReportFailureReason `json:"failure_reason"`
23757 }
23758
23759 // NewTeamActivityCreateReportFailDetails returns a new TeamActivityCreateReportFailDetails instance
23760 func NewTeamActivityCreateReportFailDetails(FailureReason *team.TeamReportFailureReason) *TeamActivityCreateReportFailDetails {
23761 s := new(TeamActivityCreateReportFailDetails)
23762 s.FailureReason = FailureReason
23763 return s
23764 }
23765
23766 // TeamActivityCreateReportFailType : has no documentation (yet)
23767 type TeamActivityCreateReportFailType struct {
23768 // Description : has no documentation (yet)
23769 Description string `json:"description"`
23770 }
23771
23772 // NewTeamActivityCreateReportFailType returns a new TeamActivityCreateReportFailType instance
23773 func NewTeamActivityCreateReportFailType(Description string) *TeamActivityCreateReportFailType {
23774 s := new(TeamActivityCreateReportFailType)
23775 s.Description = Description
23776 return s
23777 }
23778
23779 // TeamActivityCreateReportType : has no documentation (yet)
23780 type TeamActivityCreateReportType struct {
23781 // Description : has no documentation (yet)
23782 Description string `json:"description"`
23783 }
23784
23785 // NewTeamActivityCreateReportType returns a new TeamActivityCreateReportType instance
23786 func NewTeamActivityCreateReportType(Description string) *TeamActivityCreateReportType {
23787 s := new(TeamActivityCreateReportType)
23788 s.Description = Description
23789 return s
23790 }
23791
23792 // TeamBrandingPolicy : Policy for controlling team access to setting up
23793 // branding feature
23794 type TeamBrandingPolicy struct {
23795 dropbox.Tagged
23796 }
23797
23798 // Valid tag values for TeamBrandingPolicy
23799 const (
23800 TeamBrandingPolicyDisabled = "disabled"
23801 TeamBrandingPolicyEnabled = "enabled"
23802 TeamBrandingPolicyOther = "other"
23803 )
23804
23805 // TeamBrandingPolicyChangedDetails : Changed team branding policy for team.
23806 type TeamBrandingPolicyChangedDetails struct {
23807 // NewValue : New team branding policy.
23808 NewValue *TeamBrandingPolicy `json:"new_value"`
23809 // PreviousValue : Previous team branding policy.
23810 PreviousValue *TeamBrandingPolicy `json:"previous_value"`
23811 }
23812
23813 // NewTeamBrandingPolicyChangedDetails returns a new TeamBrandingPolicyChangedDetails instance
23814 func NewTeamBrandingPolicyChangedDetails(NewValue *TeamBrandingPolicy, PreviousValue *TeamBrandingPolicy) *TeamBrandingPolicyChangedDetails {
23815 s := new(TeamBrandingPolicyChangedDetails)
23816 s.NewValue = NewValue
23817 s.PreviousValue = PreviousValue
23818 return s
23819 }
23820
23821 // TeamBrandingPolicyChangedType : has no documentation (yet)
23822 type TeamBrandingPolicyChangedType struct {
23823 // Description : has no documentation (yet)
23824 Description string `json:"description"`
23825 }
23826
23827 // NewTeamBrandingPolicyChangedType returns a new TeamBrandingPolicyChangedType instance
23828 func NewTeamBrandingPolicyChangedType(Description string) *TeamBrandingPolicyChangedType {
23829 s := new(TeamBrandingPolicyChangedType)
23830 s.Description = Description
23831 return s
23832 }
23833
23834 // TeamDetails : More details about the team.
23835 type TeamDetails struct {
23836 // Team : The name of the team.
23837 Team string `json:"team"`
23838 }
23839
23840 // NewTeamDetails returns a new TeamDetails instance
23841 func NewTeamDetails(Team string) *TeamDetails {
23842 s := new(TeamDetails)
23843 s.Team = Team
23844 return s
23845 }
23846
23847 // TeamEvent : An audit log event.
23848 type TeamEvent struct {
23849 // Timestamp : The Dropbox timestamp representing when the action was taken.
23850 Timestamp time.Time `json:"timestamp"`
23851 // EventCategory : The category that this type of action belongs to.
23852 EventCategory *EventCategory `json:"event_category"`
23853 // Actor : The entity who actually performed the action. Might be missing
23854 // due to historical data gap.
23855 Actor *ActorLogInfo `json:"actor,omitempty"`
23856 // Origin : The origin from which the actor performed the action including
23857 // information about host, ip address, location, session, etc. If the action
23858 // was performed programmatically via the API the origin represents the API
23859 // client.
23860 Origin *OriginLogInfo `json:"origin,omitempty"`
23861 // InvolveNonTeamMember : True if the action involved a non team member
23862 // either as the actor or as one of the affected users. Might be missing due
23863 // to historical data gap.
23864 InvolveNonTeamMember bool `json:"involve_non_team_member,omitempty"`
23865 // Context : The user or team on whose behalf the actor performed the
23866 // action. Might be missing due to historical data gap.
23867 Context *ContextLogInfo `json:"context,omitempty"`
23868 // Participants : Zero or more users and/or groups that are affected by the
23869 // action. Note that this list doesn't include any actors or users in
23870 // context.
23871 Participants []*ParticipantLogInfo `json:"participants,omitempty"`
23872 // Assets : Zero or more content assets involved in the action. Currently
23873 // these include Dropbox files and folders but in the future we might add
23874 // other asset types such as Paper documents, folders, projects, etc.
23875 Assets []*AssetLogInfo `json:"assets,omitempty"`
23876 // EventType : The particular type of action taken.
23877 EventType *EventType `json:"event_type"`
23878 // Details : The variable event schema applicable to this type of action,
23879 // instantiated with respect to this particular action.
23880 Details *EventDetails `json:"details"`
23881 }
23882
23883 // NewTeamEvent returns a new TeamEvent instance
23884 func NewTeamEvent(Timestamp time.Time, EventCategory *EventCategory, EventType *EventType, Details *EventDetails) *TeamEvent {
23885 s := new(TeamEvent)
23886 s.Timestamp = Timestamp
23887 s.EventCategory = EventCategory
23888 s.EventType = EventType
23889 s.Details = Details
23890 return s
23891 }
23892
23893 // TeamExtensionsPolicy : Policy for controlling whether App Integrations are
23894 // enabled for the team.
23895 type TeamExtensionsPolicy struct {
23896 dropbox.Tagged
23897 }
23898
23899 // Valid tag values for TeamExtensionsPolicy
23900 const (
23901 TeamExtensionsPolicyDisabled = "disabled"
23902 TeamExtensionsPolicyEnabled = "enabled"
23903 TeamExtensionsPolicyOther = "other"
23904 )
23905
23906 // TeamExtensionsPolicyChangedDetails : Changed App Integrations setting for
23907 // team.
23908 type TeamExtensionsPolicyChangedDetails struct {
23909 // NewValue : New Extensions policy.
23910 NewValue *TeamExtensionsPolicy `json:"new_value"`
23911 // PreviousValue : Previous Extensions policy.
23912 PreviousValue *TeamExtensionsPolicy `json:"previous_value"`
23913 }
23914
23915 // NewTeamExtensionsPolicyChangedDetails returns a new TeamExtensionsPolicyChangedDetails instance
23916 func NewTeamExtensionsPolicyChangedDetails(NewValue *TeamExtensionsPolicy, PreviousValue *TeamExtensionsPolicy) *TeamExtensionsPolicyChangedDetails {
23917 s := new(TeamExtensionsPolicyChangedDetails)
23918 s.NewValue = NewValue
23919 s.PreviousValue = PreviousValue
23920 return s
23921 }
23922
23923 // TeamExtensionsPolicyChangedType : has no documentation (yet)
23924 type TeamExtensionsPolicyChangedType struct {
23925 // Description : has no documentation (yet)
23926 Description string `json:"description"`
23927 }
23928
23929 // NewTeamExtensionsPolicyChangedType returns a new TeamExtensionsPolicyChangedType instance
23930 func NewTeamExtensionsPolicyChangedType(Description string) *TeamExtensionsPolicyChangedType {
23931 s := new(TeamExtensionsPolicyChangedType)
23932 s.Description = Description
23933 return s
23934 }
23935
23936 // TeamFolderChangeStatusDetails : Changed archival status of team folder.
23937 type TeamFolderChangeStatusDetails struct {
23938 // NewValue : New team folder status.
23939 NewValue *team.TeamFolderStatus `json:"new_value"`
23940 // PreviousValue : Previous team folder status. Might be missing due to
23941 // historical data gap.
23942 PreviousValue *team.TeamFolderStatus `json:"previous_value,omitempty"`
23943 }
23944
23945 // NewTeamFolderChangeStatusDetails returns a new TeamFolderChangeStatusDetails instance
23946 func NewTeamFolderChangeStatusDetails(NewValue *team.TeamFolderStatus) *TeamFolderChangeStatusDetails {
23947 s := new(TeamFolderChangeStatusDetails)
23948 s.NewValue = NewValue
23949 return s
23950 }
23951
23952 // TeamFolderChangeStatusType : has no documentation (yet)
23953 type TeamFolderChangeStatusType struct {
23954 // Description : has no documentation (yet)
23955 Description string `json:"description"`
23956 }
23957
23958 // NewTeamFolderChangeStatusType returns a new TeamFolderChangeStatusType instance
23959 func NewTeamFolderChangeStatusType(Description string) *TeamFolderChangeStatusType {
23960 s := new(TeamFolderChangeStatusType)
23961 s.Description = Description
23962 return s
23963 }
23964
23965 // TeamFolderCreateDetails : Created team folder in active status.
23966 type TeamFolderCreateDetails struct {
23967 }
23968
23969 // NewTeamFolderCreateDetails returns a new TeamFolderCreateDetails instance
23970 func NewTeamFolderCreateDetails() *TeamFolderCreateDetails {
23971 s := new(TeamFolderCreateDetails)
23972 return s
23973 }
23974
23975 // TeamFolderCreateType : has no documentation (yet)
23976 type TeamFolderCreateType struct {
23977 // Description : has no documentation (yet)
23978 Description string `json:"description"`
23979 }
23980
23981 // NewTeamFolderCreateType returns a new TeamFolderCreateType instance
23982 func NewTeamFolderCreateType(Description string) *TeamFolderCreateType {
23983 s := new(TeamFolderCreateType)
23984 s.Description = Description
23985 return s
23986 }
23987
23988 // TeamFolderDowngradeDetails : Downgraded team folder to regular shared folder.
23989 type TeamFolderDowngradeDetails struct {
23990 // TargetAssetIndex : Target asset position in the Assets list.
23991 TargetAssetIndex uint64 `json:"target_asset_index"`
23992 }
23993
23994 // NewTeamFolderDowngradeDetails returns a new TeamFolderDowngradeDetails instance
23995 func NewTeamFolderDowngradeDetails(TargetAssetIndex uint64) *TeamFolderDowngradeDetails {
23996 s := new(TeamFolderDowngradeDetails)
23997 s.TargetAssetIndex = TargetAssetIndex
23998 return s
23999 }
24000
24001 // TeamFolderDowngradeType : has no documentation (yet)
24002 type TeamFolderDowngradeType struct {
24003 // Description : has no documentation (yet)
24004 Description string `json:"description"`
24005 }
24006
24007 // NewTeamFolderDowngradeType returns a new TeamFolderDowngradeType instance
24008 func NewTeamFolderDowngradeType(Description string) *TeamFolderDowngradeType {
24009 s := new(TeamFolderDowngradeType)
24010 s.Description = Description
24011 return s
24012 }
24013
24014 // TeamFolderPermanentlyDeleteDetails : Permanently deleted archived team
24015 // folder.
24016 type TeamFolderPermanentlyDeleteDetails struct {
24017 }
24018
24019 // NewTeamFolderPermanentlyDeleteDetails returns a new TeamFolderPermanentlyDeleteDetails instance
24020 func NewTeamFolderPermanentlyDeleteDetails() *TeamFolderPermanentlyDeleteDetails {
24021 s := new(TeamFolderPermanentlyDeleteDetails)
24022 return s
24023 }
24024
24025 // TeamFolderPermanentlyDeleteType : has no documentation (yet)
24026 type TeamFolderPermanentlyDeleteType struct {
24027 // Description : has no documentation (yet)
24028 Description string `json:"description"`
24029 }
24030
24031 // NewTeamFolderPermanentlyDeleteType returns a new TeamFolderPermanentlyDeleteType instance
24032 func NewTeamFolderPermanentlyDeleteType(Description string) *TeamFolderPermanentlyDeleteType {
24033 s := new(TeamFolderPermanentlyDeleteType)
24034 s.Description = Description
24035 return s
24036 }
24037
24038 // TeamFolderRenameDetails : Renamed active/archived team folder.
24039 type TeamFolderRenameDetails struct {
24040 // PreviousFolderName : Previous folder name.
24041 PreviousFolderName string `json:"previous_folder_name"`
24042 // NewFolderName : New folder name.
24043 NewFolderName string `json:"new_folder_name"`
24044 }
24045
24046 // NewTeamFolderRenameDetails returns a new TeamFolderRenameDetails instance
24047 func NewTeamFolderRenameDetails(PreviousFolderName string, NewFolderName string) *TeamFolderRenameDetails {
24048 s := new(TeamFolderRenameDetails)
24049 s.PreviousFolderName = PreviousFolderName
24050 s.NewFolderName = NewFolderName
24051 return s
24052 }
24053
24054 // TeamFolderRenameType : has no documentation (yet)
24055 type TeamFolderRenameType struct {
24056 // Description : has no documentation (yet)
24057 Description string `json:"description"`
24058 }
24059
24060 // NewTeamFolderRenameType returns a new TeamFolderRenameType instance
24061 func NewTeamFolderRenameType(Description string) *TeamFolderRenameType {
24062 s := new(TeamFolderRenameType)
24063 s.Description = Description
24064 return s
24065 }
24066
24067 // TeamInviteDetails : Details about team invites
24068 type TeamInviteDetails struct {
24069 // InviteMethod : How the user was invited to the team.
24070 InviteMethod *InviteMethod `json:"invite_method"`
24071 // AdditionalLicensePurchase : True if the invitation incurred an additional
24072 // license purchase.
24073 AdditionalLicensePurchase bool `json:"additional_license_purchase,omitempty"`
24074 }
24075
24076 // NewTeamInviteDetails returns a new TeamInviteDetails instance
24077 func NewTeamInviteDetails(InviteMethod *InviteMethod) *TeamInviteDetails {
24078 s := new(TeamInviteDetails)
24079 s.InviteMethod = InviteMethod
24080 return s
24081 }
24082
24083 // TeamLinkedAppLogInfo : Team linked app
24084 type TeamLinkedAppLogInfo struct {
24085 AppLogInfo
24086 }
24087
24088 // NewTeamLinkedAppLogInfo returns a new TeamLinkedAppLogInfo instance
24089 func NewTeamLinkedAppLogInfo() *TeamLinkedAppLogInfo {
24090 s := new(TeamLinkedAppLogInfo)
24091 return s
24092 }
24093
24094 // TeamLogInfo : Team's logged information.
24095 type TeamLogInfo struct {
24096 // DisplayName : Team display name.
24097 DisplayName string `json:"display_name"`
24098 }
24099
24100 // NewTeamLogInfo returns a new TeamLogInfo instance
24101 func NewTeamLogInfo(DisplayName string) *TeamLogInfo {
24102 s := new(TeamLogInfo)
24103 s.DisplayName = DisplayName
24104 return s
24105 }
24106
24107 // TeamMemberLogInfo : Team member's logged information.
24108 type TeamMemberLogInfo struct {
24109 UserLogInfo
24110 // TeamMemberId : Team member ID.
24111 TeamMemberId string `json:"team_member_id,omitempty"`
24112 // MemberExternalId : Team member external ID.
24113 MemberExternalId string `json:"member_external_id,omitempty"`
24114 // Team : Details about this user&#x2019s team for enterprise event.
24115 Team *TeamLogInfo `json:"team,omitempty"`
24116 }
24117
24118 // NewTeamMemberLogInfo returns a new TeamMemberLogInfo instance
24119 func NewTeamMemberLogInfo() *TeamMemberLogInfo {
24120 s := new(TeamMemberLogInfo)
24121 return s
24122 }
24123
24124 // TeamMembershipType : has no documentation (yet)
24125 type TeamMembershipType struct {
24126 dropbox.Tagged
24127 }
24128
24129 // Valid tag values for TeamMembershipType
24130 const (
24131 TeamMembershipTypeFree = "free"
24132 TeamMembershipTypeFull = "full"
24133 TeamMembershipTypeOther = "other"
24134 )
24135
24136 // TeamMergeFromDetails : Merged another team into this team.
24137 type TeamMergeFromDetails struct {
24138 // TeamName : The name of the team that was merged into this team.
24139 TeamName string `json:"team_name"`
24140 }
24141
24142 // NewTeamMergeFromDetails returns a new TeamMergeFromDetails instance
24143 func NewTeamMergeFromDetails(TeamName string) *TeamMergeFromDetails {
24144 s := new(TeamMergeFromDetails)
24145 s.TeamName = TeamName
24146 return s
24147 }
24148
24149 // TeamMergeFromType : has no documentation (yet)
24150 type TeamMergeFromType struct {
24151 // Description : has no documentation (yet)
24152 Description string `json:"description"`
24153 }
24154
24155 // NewTeamMergeFromType returns a new TeamMergeFromType instance
24156 func NewTeamMergeFromType(Description string) *TeamMergeFromType {
24157 s := new(TeamMergeFromType)
24158 s.Description = Description
24159 return s
24160 }
24161
24162 // TeamMergeRequestAcceptedDetails : Accepted a team merge request.
24163 type TeamMergeRequestAcceptedDetails struct {
24164 // RequestAcceptedDetails : Team merge request acceptance details.
24165 RequestAcceptedDetails *TeamMergeRequestAcceptedExtraDetails `json:"request_accepted_details"`
24166 }
24167
24168 // NewTeamMergeRequestAcceptedDetails returns a new TeamMergeRequestAcceptedDetails instance
24169 func NewTeamMergeRequestAcceptedDetails(RequestAcceptedDetails *TeamMergeRequestAcceptedExtraDetails) *TeamMergeRequestAcceptedDetails {
24170 s := new(TeamMergeRequestAcceptedDetails)
24171 s.RequestAcceptedDetails = RequestAcceptedDetails
24172 return s
24173 }
24174
24175 // TeamMergeRequestAcceptedExtraDetails : Team merge request acceptance details
24176 type TeamMergeRequestAcceptedExtraDetails struct {
24177 dropbox.Tagged
24178 // PrimaryTeam : Team merge request accepted details shown to the primary
24179 // team.
24180 PrimaryTeam *PrimaryTeamRequestAcceptedDetails `json:"primary_team,omitempty"`
24181 // SecondaryTeam : Team merge request accepted details shown to the
24182 // secondary team.
24183 SecondaryTeam *SecondaryTeamRequestAcceptedDetails `json:"secondary_team,omitempty"`
24184 }
24185
24186 // Valid tag values for TeamMergeRequestAcceptedExtraDetails
24187 const (
24188 TeamMergeRequestAcceptedExtraDetailsPrimaryTeam = "primary_team"
24189 TeamMergeRequestAcceptedExtraDetailsSecondaryTeam = "secondary_team"
24190 TeamMergeRequestAcceptedExtraDetailsOther = "other"
24191 )
24192
24193 // UnmarshalJSON deserializes into a TeamMergeRequestAcceptedExtraDetails instance
24194 func (u *TeamMergeRequestAcceptedExtraDetails) UnmarshalJSON(body []byte) error {
24195 type wrap struct {
24196 dropbox.Tagged
24197 }
24198 var w wrap
24199 var err error
24200 if err = json.Unmarshal(body, &w); err != nil {
24201 return err
24202 }
24203 u.Tag = w.Tag
24204 switch u.Tag {
24205 case "primary_team":
24206 err = json.Unmarshal(body, &u.PrimaryTeam)
24207
24208 if err != nil {
24209 return err
24210 }
24211 case "secondary_team":
24212 err = json.Unmarshal(body, &u.SecondaryTeam)
24213
24214 if err != nil {
24215 return err
24216 }
24217 }
24218 return nil
24219 }
24220
24221 // TeamMergeRequestAcceptedShownToPrimaryTeamDetails : Accepted a team merge
24222 // request.
24223 type TeamMergeRequestAcceptedShownToPrimaryTeamDetails struct {
24224 // SecondaryTeam : The secondary team name.
24225 SecondaryTeam string `json:"secondary_team"`
24226 // SentBy : The name of the secondary team admin who sent the request
24227 // originally.
24228 SentBy string `json:"sent_by"`
24229 }
24230
24231 // NewTeamMergeRequestAcceptedShownToPrimaryTeamDetails returns a new TeamMergeRequestAcceptedShownToPrimaryTeamDetails instance
24232 func NewTeamMergeRequestAcceptedShownToPrimaryTeamDetails(SecondaryTeam string, SentBy string) *TeamMergeRequestAcceptedShownToPrimaryTeamDetails {
24233 s := new(TeamMergeRequestAcceptedShownToPrimaryTeamDetails)
24234 s.SecondaryTeam = SecondaryTeam
24235 s.SentBy = SentBy
24236 return s
24237 }
24238
24239 // TeamMergeRequestAcceptedShownToPrimaryTeamType : has no documentation (yet)
24240 type TeamMergeRequestAcceptedShownToPrimaryTeamType struct {
24241 // Description : has no documentation (yet)
24242 Description string `json:"description"`
24243 }
24244
24245 // NewTeamMergeRequestAcceptedShownToPrimaryTeamType returns a new TeamMergeRequestAcceptedShownToPrimaryTeamType instance
24246 func NewTeamMergeRequestAcceptedShownToPrimaryTeamType(Description string) *TeamMergeRequestAcceptedShownToPrimaryTeamType {
24247 s := new(TeamMergeRequestAcceptedShownToPrimaryTeamType)
24248 s.Description = Description
24249 return s
24250 }
24251
24252 // TeamMergeRequestAcceptedShownToSecondaryTeamDetails : Accepted a team merge
24253 // request.
24254 type TeamMergeRequestAcceptedShownToSecondaryTeamDetails struct {
24255 // PrimaryTeam : The primary team name.
24256 PrimaryTeam string `json:"primary_team"`
24257 // SentBy : The name of the secondary team admin who sent the request
24258 // originally.
24259 SentBy string `json:"sent_by"`
24260 }
24261
24262 // NewTeamMergeRequestAcceptedShownToSecondaryTeamDetails returns a new TeamMergeRequestAcceptedShownToSecondaryTeamDetails instance
24263 func NewTeamMergeRequestAcceptedShownToSecondaryTeamDetails(PrimaryTeam string, SentBy string) *TeamMergeRequestAcceptedShownToSecondaryTeamDetails {
24264 s := new(TeamMergeRequestAcceptedShownToSecondaryTeamDetails)
24265 s.PrimaryTeam = PrimaryTeam
24266 s.SentBy = SentBy
24267 return s
24268 }
24269
24270 // TeamMergeRequestAcceptedShownToSecondaryTeamType : has no documentation (yet)
24271 type TeamMergeRequestAcceptedShownToSecondaryTeamType struct {
24272 // Description : has no documentation (yet)
24273 Description string `json:"description"`
24274 }
24275
24276 // NewTeamMergeRequestAcceptedShownToSecondaryTeamType returns a new TeamMergeRequestAcceptedShownToSecondaryTeamType instance
24277 func NewTeamMergeRequestAcceptedShownToSecondaryTeamType(Description string) *TeamMergeRequestAcceptedShownToSecondaryTeamType {
24278 s := new(TeamMergeRequestAcceptedShownToSecondaryTeamType)
24279 s.Description = Description
24280 return s
24281 }
24282
24283 // TeamMergeRequestAcceptedType : has no documentation (yet)
24284 type TeamMergeRequestAcceptedType struct {
24285 // Description : has no documentation (yet)
24286 Description string `json:"description"`
24287 }
24288
24289 // NewTeamMergeRequestAcceptedType returns a new TeamMergeRequestAcceptedType instance
24290 func NewTeamMergeRequestAcceptedType(Description string) *TeamMergeRequestAcceptedType {
24291 s := new(TeamMergeRequestAcceptedType)
24292 s.Description = Description
24293 return s
24294 }
24295
24296 // TeamMergeRequestAutoCanceledDetails : Automatically canceled team merge
24297 // request.
24298 type TeamMergeRequestAutoCanceledDetails struct {
24299 // Details : The cancellation reason.
24300 Details string `json:"details,omitempty"`
24301 }
24302
24303 // NewTeamMergeRequestAutoCanceledDetails returns a new TeamMergeRequestAutoCanceledDetails instance
24304 func NewTeamMergeRequestAutoCanceledDetails() *TeamMergeRequestAutoCanceledDetails {
24305 s := new(TeamMergeRequestAutoCanceledDetails)
24306 return s
24307 }
24308
24309 // TeamMergeRequestAutoCanceledType : has no documentation (yet)
24310 type TeamMergeRequestAutoCanceledType struct {
24311 // Description : has no documentation (yet)
24312 Description string `json:"description"`
24313 }
24314
24315 // NewTeamMergeRequestAutoCanceledType returns a new TeamMergeRequestAutoCanceledType instance
24316 func NewTeamMergeRequestAutoCanceledType(Description string) *TeamMergeRequestAutoCanceledType {
24317 s := new(TeamMergeRequestAutoCanceledType)
24318 s.Description = Description
24319 return s
24320 }
24321
24322 // TeamMergeRequestCanceledDetails : Canceled a team merge request.
24323 type TeamMergeRequestCanceledDetails struct {
24324 // RequestCanceledDetails : Team merge request cancellation details.
24325 RequestCanceledDetails *TeamMergeRequestCanceledExtraDetails `json:"request_canceled_details"`
24326 }
24327
24328 // NewTeamMergeRequestCanceledDetails returns a new TeamMergeRequestCanceledDetails instance
24329 func NewTeamMergeRequestCanceledDetails(RequestCanceledDetails *TeamMergeRequestCanceledExtraDetails) *TeamMergeRequestCanceledDetails {
24330 s := new(TeamMergeRequestCanceledDetails)
24331 s.RequestCanceledDetails = RequestCanceledDetails
24332 return s
24333 }
24334
24335 // TeamMergeRequestCanceledExtraDetails : Team merge request cancellation
24336 // details
24337 type TeamMergeRequestCanceledExtraDetails struct {
24338 dropbox.Tagged
24339 // PrimaryTeam : Team merge request cancellation details shown to the
24340 // primary team.
24341 PrimaryTeam *PrimaryTeamRequestCanceledDetails `json:"primary_team,omitempty"`
24342 // SecondaryTeam : Team merge request cancellation details shown to the
24343 // secondary team.
24344 SecondaryTeam *SecondaryTeamRequestCanceledDetails `json:"secondary_team,omitempty"`
24345 }
24346
24347 // Valid tag values for TeamMergeRequestCanceledExtraDetails
24348 const (
24349 TeamMergeRequestCanceledExtraDetailsPrimaryTeam = "primary_team"
24350 TeamMergeRequestCanceledExtraDetailsSecondaryTeam = "secondary_team"
24351 TeamMergeRequestCanceledExtraDetailsOther = "other"
24352 )
24353
24354 // UnmarshalJSON deserializes into a TeamMergeRequestCanceledExtraDetails instance
24355 func (u *TeamMergeRequestCanceledExtraDetails) UnmarshalJSON(body []byte) error {
24356 type wrap struct {
24357 dropbox.Tagged
24358 }
24359 var w wrap
24360 var err error
24361 if err = json.Unmarshal(body, &w); err != nil {
24362 return err
24363 }
24364 u.Tag = w.Tag
24365 switch u.Tag {
24366 case "primary_team":
24367 err = json.Unmarshal(body, &u.PrimaryTeam)
24368
24369 if err != nil {
24370 return err
24371 }
24372 case "secondary_team":
24373 err = json.Unmarshal(body, &u.SecondaryTeam)
24374
24375 if err != nil {
24376 return err
24377 }
24378 }
24379 return nil
24380 }
24381
24382 // TeamMergeRequestCanceledShownToPrimaryTeamDetails : Canceled a team merge
24383 // request.
24384 type TeamMergeRequestCanceledShownToPrimaryTeamDetails struct {
24385 // SecondaryTeam : The secondary team name.
24386 SecondaryTeam string `json:"secondary_team"`
24387 // SentBy : The name of the secondary team admin who sent the request
24388 // originally.
24389 SentBy string `json:"sent_by"`
24390 }
24391
24392 // NewTeamMergeRequestCanceledShownToPrimaryTeamDetails returns a new TeamMergeRequestCanceledShownToPrimaryTeamDetails instance
24393 func NewTeamMergeRequestCanceledShownToPrimaryTeamDetails(SecondaryTeam string, SentBy string) *TeamMergeRequestCanceledShownToPrimaryTeamDetails {
24394 s := new(TeamMergeRequestCanceledShownToPrimaryTeamDetails)
24395 s.SecondaryTeam = SecondaryTeam
24396 s.SentBy = SentBy
24397 return s
24398 }
24399
24400 // TeamMergeRequestCanceledShownToPrimaryTeamType : has no documentation (yet)
24401 type TeamMergeRequestCanceledShownToPrimaryTeamType struct {
24402 // Description : has no documentation (yet)
24403 Description string `json:"description"`
24404 }
24405
24406 // NewTeamMergeRequestCanceledShownToPrimaryTeamType returns a new TeamMergeRequestCanceledShownToPrimaryTeamType instance
24407 func NewTeamMergeRequestCanceledShownToPrimaryTeamType(Description string) *TeamMergeRequestCanceledShownToPrimaryTeamType {
24408 s := new(TeamMergeRequestCanceledShownToPrimaryTeamType)
24409 s.Description = Description
24410 return s
24411 }
24412
24413 // TeamMergeRequestCanceledShownToSecondaryTeamDetails : Canceled a team merge
24414 // request.
24415 type TeamMergeRequestCanceledShownToSecondaryTeamDetails struct {
24416 // SentTo : The email of the primary team admin that the request was sent
24417 // to.
24418 SentTo string `json:"sent_to"`
24419 // SentBy : The name of the secondary team admin who sent the request
24420 // originally.
24421 SentBy string `json:"sent_by"`
24422 }
24423
24424 // NewTeamMergeRequestCanceledShownToSecondaryTeamDetails returns a new TeamMergeRequestCanceledShownToSecondaryTeamDetails instance
24425 func NewTeamMergeRequestCanceledShownToSecondaryTeamDetails(SentTo string, SentBy string) *TeamMergeRequestCanceledShownToSecondaryTeamDetails {
24426 s := new(TeamMergeRequestCanceledShownToSecondaryTeamDetails)
24427 s.SentTo = SentTo
24428 s.SentBy = SentBy
24429 return s
24430 }
24431
24432 // TeamMergeRequestCanceledShownToSecondaryTeamType : has no documentation (yet)
24433 type TeamMergeRequestCanceledShownToSecondaryTeamType struct {
24434 // Description : has no documentation (yet)
24435 Description string `json:"description"`
24436 }
24437
24438 // NewTeamMergeRequestCanceledShownToSecondaryTeamType returns a new TeamMergeRequestCanceledShownToSecondaryTeamType instance
24439 func NewTeamMergeRequestCanceledShownToSecondaryTeamType(Description string) *TeamMergeRequestCanceledShownToSecondaryTeamType {
24440 s := new(TeamMergeRequestCanceledShownToSecondaryTeamType)
24441 s.Description = Description
24442 return s
24443 }
24444
24445 // TeamMergeRequestCanceledType : has no documentation (yet)
24446 type TeamMergeRequestCanceledType struct {
24447 // Description : has no documentation (yet)
24448 Description string `json:"description"`
24449 }
24450
24451 // NewTeamMergeRequestCanceledType returns a new TeamMergeRequestCanceledType instance
24452 func NewTeamMergeRequestCanceledType(Description string) *TeamMergeRequestCanceledType {
24453 s := new(TeamMergeRequestCanceledType)
24454 s.Description = Description
24455 return s
24456 }
24457
24458 // TeamMergeRequestExpiredDetails : Team merge request expired.
24459 type TeamMergeRequestExpiredDetails struct {
24460 // RequestExpiredDetails : Team merge request expiration details.
24461 RequestExpiredDetails *TeamMergeRequestExpiredExtraDetails `json:"request_expired_details"`
24462 }
24463
24464 // NewTeamMergeRequestExpiredDetails returns a new TeamMergeRequestExpiredDetails instance
24465 func NewTeamMergeRequestExpiredDetails(RequestExpiredDetails *TeamMergeRequestExpiredExtraDetails) *TeamMergeRequestExpiredDetails {
24466 s := new(TeamMergeRequestExpiredDetails)
24467 s.RequestExpiredDetails = RequestExpiredDetails
24468 return s
24469 }
24470
24471 // TeamMergeRequestExpiredExtraDetails : Team merge request expiration details
24472 type TeamMergeRequestExpiredExtraDetails struct {
24473 dropbox.Tagged
24474 // PrimaryTeam : Team merge request canceled details shown to the primary
24475 // team.
24476 PrimaryTeam *PrimaryTeamRequestExpiredDetails `json:"primary_team,omitempty"`
24477 // SecondaryTeam : Team merge request canceled details shown to the
24478 // secondary team.
24479 SecondaryTeam *SecondaryTeamRequestExpiredDetails `json:"secondary_team,omitempty"`
24480 }
24481
24482 // Valid tag values for TeamMergeRequestExpiredExtraDetails
24483 const (
24484 TeamMergeRequestExpiredExtraDetailsPrimaryTeam = "primary_team"
24485 TeamMergeRequestExpiredExtraDetailsSecondaryTeam = "secondary_team"
24486 TeamMergeRequestExpiredExtraDetailsOther = "other"
24487 )
24488
24489 // UnmarshalJSON deserializes into a TeamMergeRequestExpiredExtraDetails instance
24490 func (u *TeamMergeRequestExpiredExtraDetails) UnmarshalJSON(body []byte) error {
24491 type wrap struct {
24492 dropbox.Tagged
24493 }
24494 var w wrap
24495 var err error
24496 if err = json.Unmarshal(body, &w); err != nil {
24497 return err
24498 }
24499 u.Tag = w.Tag
24500 switch u.Tag {
24501 case "primary_team":
24502 err = json.Unmarshal(body, &u.PrimaryTeam)
24503
24504 if err != nil {
24505 return err
24506 }
24507 case "secondary_team":
24508 err = json.Unmarshal(body, &u.SecondaryTeam)
24509
24510 if err != nil {
24511 return err
24512 }
24513 }
24514 return nil
24515 }
24516
24517 // TeamMergeRequestExpiredShownToPrimaryTeamDetails : Team merge request
24518 // expired.
24519 type TeamMergeRequestExpiredShownToPrimaryTeamDetails struct {
24520 // SecondaryTeam : The secondary team name.
24521 SecondaryTeam string `json:"secondary_team"`
24522 // SentBy : The name of the secondary team admin who sent the request
24523 // originally.
24524 SentBy string `json:"sent_by"`
24525 }
24526
24527 // NewTeamMergeRequestExpiredShownToPrimaryTeamDetails returns a new TeamMergeRequestExpiredShownToPrimaryTeamDetails instance
24528 func NewTeamMergeRequestExpiredShownToPrimaryTeamDetails(SecondaryTeam string, SentBy string) *TeamMergeRequestExpiredShownToPrimaryTeamDetails {
24529 s := new(TeamMergeRequestExpiredShownToPrimaryTeamDetails)
24530 s.SecondaryTeam = SecondaryTeam
24531 s.SentBy = SentBy
24532 return s
24533 }
24534
24535 // TeamMergeRequestExpiredShownToPrimaryTeamType : has no documentation (yet)
24536 type TeamMergeRequestExpiredShownToPrimaryTeamType struct {
24537 // Description : has no documentation (yet)
24538 Description string `json:"description"`
24539 }
24540
24541 // NewTeamMergeRequestExpiredShownToPrimaryTeamType returns a new TeamMergeRequestExpiredShownToPrimaryTeamType instance
24542 func NewTeamMergeRequestExpiredShownToPrimaryTeamType(Description string) *TeamMergeRequestExpiredShownToPrimaryTeamType {
24543 s := new(TeamMergeRequestExpiredShownToPrimaryTeamType)
24544 s.Description = Description
24545 return s
24546 }
24547
24548 // TeamMergeRequestExpiredShownToSecondaryTeamDetails : Team merge request
24549 // expired.
24550 type TeamMergeRequestExpiredShownToSecondaryTeamDetails struct {
24551 // SentTo : The email of the primary team admin the request was sent to.
24552 SentTo string `json:"sent_to"`
24553 }
24554
24555 // NewTeamMergeRequestExpiredShownToSecondaryTeamDetails returns a new TeamMergeRequestExpiredShownToSecondaryTeamDetails instance
24556 func NewTeamMergeRequestExpiredShownToSecondaryTeamDetails(SentTo string) *TeamMergeRequestExpiredShownToSecondaryTeamDetails {
24557 s := new(TeamMergeRequestExpiredShownToSecondaryTeamDetails)
24558 s.SentTo = SentTo
24559 return s
24560 }
24561
24562 // TeamMergeRequestExpiredShownToSecondaryTeamType : has no documentation (yet)
24563 type TeamMergeRequestExpiredShownToSecondaryTeamType struct {
24564 // Description : has no documentation (yet)
24565 Description string `json:"description"`
24566 }
24567
24568 // NewTeamMergeRequestExpiredShownToSecondaryTeamType returns a new TeamMergeRequestExpiredShownToSecondaryTeamType instance
24569 func NewTeamMergeRequestExpiredShownToSecondaryTeamType(Description string) *TeamMergeRequestExpiredShownToSecondaryTeamType {
24570 s := new(TeamMergeRequestExpiredShownToSecondaryTeamType)
24571 s.Description = Description
24572 return s
24573 }
24574
24575 // TeamMergeRequestExpiredType : has no documentation (yet)
24576 type TeamMergeRequestExpiredType struct {
24577 // Description : has no documentation (yet)
24578 Description string `json:"description"`
24579 }
24580
24581 // NewTeamMergeRequestExpiredType returns a new TeamMergeRequestExpiredType instance
24582 func NewTeamMergeRequestExpiredType(Description string) *TeamMergeRequestExpiredType {
24583 s := new(TeamMergeRequestExpiredType)
24584 s.Description = Description
24585 return s
24586 }
24587
24588 // TeamMergeRequestRejectedShownToPrimaryTeamDetails : Rejected a team merge
24589 // request.
24590 type TeamMergeRequestRejectedShownToPrimaryTeamDetails struct {
24591 // SecondaryTeam : The secondary team name.
24592 SecondaryTeam string `json:"secondary_team"`
24593 // SentBy : The name of the secondary team admin who sent the request
24594 // originally.
24595 SentBy string `json:"sent_by"`
24596 }
24597
24598 // NewTeamMergeRequestRejectedShownToPrimaryTeamDetails returns a new TeamMergeRequestRejectedShownToPrimaryTeamDetails instance
24599 func NewTeamMergeRequestRejectedShownToPrimaryTeamDetails(SecondaryTeam string, SentBy string) *TeamMergeRequestRejectedShownToPrimaryTeamDetails {
24600 s := new(TeamMergeRequestRejectedShownToPrimaryTeamDetails)
24601 s.SecondaryTeam = SecondaryTeam
24602 s.SentBy = SentBy
24603 return s
24604 }
24605
24606 // TeamMergeRequestRejectedShownToPrimaryTeamType : has no documentation (yet)
24607 type TeamMergeRequestRejectedShownToPrimaryTeamType struct {
24608 // Description : has no documentation (yet)
24609 Description string `json:"description"`
24610 }
24611
24612 // NewTeamMergeRequestRejectedShownToPrimaryTeamType returns a new TeamMergeRequestRejectedShownToPrimaryTeamType instance
24613 func NewTeamMergeRequestRejectedShownToPrimaryTeamType(Description string) *TeamMergeRequestRejectedShownToPrimaryTeamType {
24614 s := new(TeamMergeRequestRejectedShownToPrimaryTeamType)
24615 s.Description = Description
24616 return s
24617 }
24618
24619 // TeamMergeRequestRejectedShownToSecondaryTeamDetails : Rejected a team merge
24620 // request.
24621 type TeamMergeRequestRejectedShownToSecondaryTeamDetails struct {
24622 // SentBy : The name of the secondary team admin who sent the request
24623 // originally.
24624 SentBy string `json:"sent_by"`
24625 }
24626
24627 // NewTeamMergeRequestRejectedShownToSecondaryTeamDetails returns a new TeamMergeRequestRejectedShownToSecondaryTeamDetails instance
24628 func NewTeamMergeRequestRejectedShownToSecondaryTeamDetails(SentBy string) *TeamMergeRequestRejectedShownToSecondaryTeamDetails {
24629 s := new(TeamMergeRequestRejectedShownToSecondaryTeamDetails)
24630 s.SentBy = SentBy
24631 return s
24632 }
24633
24634 // TeamMergeRequestRejectedShownToSecondaryTeamType : has no documentation (yet)
24635 type TeamMergeRequestRejectedShownToSecondaryTeamType struct {
24636 // Description : has no documentation (yet)
24637 Description string `json:"description"`
24638 }
24639
24640 // NewTeamMergeRequestRejectedShownToSecondaryTeamType returns a new TeamMergeRequestRejectedShownToSecondaryTeamType instance
24641 func NewTeamMergeRequestRejectedShownToSecondaryTeamType(Description string) *TeamMergeRequestRejectedShownToSecondaryTeamType {
24642 s := new(TeamMergeRequestRejectedShownToSecondaryTeamType)
24643 s.Description = Description
24644 return s
24645 }
24646
24647 // TeamMergeRequestReminderDetails : Sent a team merge request reminder.
24648 type TeamMergeRequestReminderDetails struct {
24649 // RequestReminderDetails : Team merge request reminder details.
24650 RequestReminderDetails *TeamMergeRequestReminderExtraDetails `json:"request_reminder_details"`
24651 }
24652
24653 // NewTeamMergeRequestReminderDetails returns a new TeamMergeRequestReminderDetails instance
24654 func NewTeamMergeRequestReminderDetails(RequestReminderDetails *TeamMergeRequestReminderExtraDetails) *TeamMergeRequestReminderDetails {
24655 s := new(TeamMergeRequestReminderDetails)
24656 s.RequestReminderDetails = RequestReminderDetails
24657 return s
24658 }
24659
24660 // TeamMergeRequestReminderExtraDetails : Team merge request reminder details
24661 type TeamMergeRequestReminderExtraDetails struct {
24662 dropbox.Tagged
24663 // PrimaryTeam : Team merge request reminder details shown to the primary
24664 // team.
24665 PrimaryTeam *PrimaryTeamRequestReminderDetails `json:"primary_team,omitempty"`
24666 // SecondaryTeam : Team merge request reminder details shown to the
24667 // secondary team.
24668 SecondaryTeam *SecondaryTeamRequestReminderDetails `json:"secondary_team,omitempty"`
24669 }
24670
24671 // Valid tag values for TeamMergeRequestReminderExtraDetails
24672 const (
24673 TeamMergeRequestReminderExtraDetailsPrimaryTeam = "primary_team"
24674 TeamMergeRequestReminderExtraDetailsSecondaryTeam = "secondary_team"
24675 TeamMergeRequestReminderExtraDetailsOther = "other"
24676 )
24677
24678 // UnmarshalJSON deserializes into a TeamMergeRequestReminderExtraDetails instance
24679 func (u *TeamMergeRequestReminderExtraDetails) UnmarshalJSON(body []byte) error {
24680 type wrap struct {
24681 dropbox.Tagged
24682 }
24683 var w wrap
24684 var err error
24685 if err = json.Unmarshal(body, &w); err != nil {
24686 return err
24687 }
24688 u.Tag = w.Tag
24689 switch u.Tag {
24690 case "primary_team":
24691 err = json.Unmarshal(body, &u.PrimaryTeam)
24692
24693 if err != nil {
24694 return err
24695 }
24696 case "secondary_team":
24697 err = json.Unmarshal(body, &u.SecondaryTeam)
24698
24699 if err != nil {
24700 return err
24701 }
24702 }
24703 return nil
24704 }
24705
24706 // TeamMergeRequestReminderShownToPrimaryTeamDetails : Sent a team merge request
24707 // reminder.
24708 type TeamMergeRequestReminderShownToPrimaryTeamDetails struct {
24709 // SecondaryTeam : The secondary team name.
24710 SecondaryTeam string `json:"secondary_team"`
24711 // SentTo : The name of the primary team admin the request was sent to.
24712 SentTo string `json:"sent_to"`
24713 }
24714
24715 // NewTeamMergeRequestReminderShownToPrimaryTeamDetails returns a new TeamMergeRequestReminderShownToPrimaryTeamDetails instance
24716 func NewTeamMergeRequestReminderShownToPrimaryTeamDetails(SecondaryTeam string, SentTo string) *TeamMergeRequestReminderShownToPrimaryTeamDetails {
24717 s := new(TeamMergeRequestReminderShownToPrimaryTeamDetails)
24718 s.SecondaryTeam = SecondaryTeam
24719 s.SentTo = SentTo
24720 return s
24721 }
24722
24723 // TeamMergeRequestReminderShownToPrimaryTeamType : has no documentation (yet)
24724 type TeamMergeRequestReminderShownToPrimaryTeamType struct {
24725 // Description : has no documentation (yet)
24726 Description string `json:"description"`
24727 }
24728
24729 // NewTeamMergeRequestReminderShownToPrimaryTeamType returns a new TeamMergeRequestReminderShownToPrimaryTeamType instance
24730 func NewTeamMergeRequestReminderShownToPrimaryTeamType(Description string) *TeamMergeRequestReminderShownToPrimaryTeamType {
24731 s := new(TeamMergeRequestReminderShownToPrimaryTeamType)
24732 s.Description = Description
24733 return s
24734 }
24735
24736 // TeamMergeRequestReminderShownToSecondaryTeamDetails : Sent a team merge
24737 // request reminder.
24738 type TeamMergeRequestReminderShownToSecondaryTeamDetails struct {
24739 // SentTo : The email of the primary team admin the request was sent to.
24740 SentTo string `json:"sent_to"`
24741 }
24742
24743 // NewTeamMergeRequestReminderShownToSecondaryTeamDetails returns a new TeamMergeRequestReminderShownToSecondaryTeamDetails instance
24744 func NewTeamMergeRequestReminderShownToSecondaryTeamDetails(SentTo string) *TeamMergeRequestReminderShownToSecondaryTeamDetails {
24745 s := new(TeamMergeRequestReminderShownToSecondaryTeamDetails)
24746 s.SentTo = SentTo
24747 return s
24748 }
24749
24750 // TeamMergeRequestReminderShownToSecondaryTeamType : has no documentation (yet)
24751 type TeamMergeRequestReminderShownToSecondaryTeamType struct {
24752 // Description : has no documentation (yet)
24753 Description string `json:"description"`
24754 }
24755
24756 // NewTeamMergeRequestReminderShownToSecondaryTeamType returns a new TeamMergeRequestReminderShownToSecondaryTeamType instance
24757 func NewTeamMergeRequestReminderShownToSecondaryTeamType(Description string) *TeamMergeRequestReminderShownToSecondaryTeamType {
24758 s := new(TeamMergeRequestReminderShownToSecondaryTeamType)
24759 s.Description = Description
24760 return s
24761 }
24762
24763 // TeamMergeRequestReminderType : has no documentation (yet)
24764 type TeamMergeRequestReminderType struct {
24765 // Description : has no documentation (yet)
24766 Description string `json:"description"`
24767 }
24768
24769 // NewTeamMergeRequestReminderType returns a new TeamMergeRequestReminderType instance
24770 func NewTeamMergeRequestReminderType(Description string) *TeamMergeRequestReminderType {
24771 s := new(TeamMergeRequestReminderType)
24772 s.Description = Description
24773 return s
24774 }
24775
24776 // TeamMergeRequestRevokedDetails : Canceled the team merge.
24777 type TeamMergeRequestRevokedDetails struct {
24778 // Team : The name of the other team.
24779 Team string `json:"team"`
24780 }
24781
24782 // NewTeamMergeRequestRevokedDetails returns a new TeamMergeRequestRevokedDetails instance
24783 func NewTeamMergeRequestRevokedDetails(Team string) *TeamMergeRequestRevokedDetails {
24784 s := new(TeamMergeRequestRevokedDetails)
24785 s.Team = Team
24786 return s
24787 }
24788
24789 // TeamMergeRequestRevokedType : has no documentation (yet)
24790 type TeamMergeRequestRevokedType struct {
24791 // Description : has no documentation (yet)
24792 Description string `json:"description"`
24793 }
24794
24795 // NewTeamMergeRequestRevokedType returns a new TeamMergeRequestRevokedType instance
24796 func NewTeamMergeRequestRevokedType(Description string) *TeamMergeRequestRevokedType {
24797 s := new(TeamMergeRequestRevokedType)
24798 s.Description = Description
24799 return s
24800 }
24801
24802 // TeamMergeRequestSentShownToPrimaryTeamDetails : Requested to merge their
24803 // Dropbox team into yours.
24804 type TeamMergeRequestSentShownToPrimaryTeamDetails struct {
24805 // SecondaryTeam : The secondary team name.
24806 SecondaryTeam string `json:"secondary_team"`
24807 // SentTo : The name of the primary team admin the request was sent to.
24808 SentTo string `json:"sent_to"`
24809 }
24810
24811 // NewTeamMergeRequestSentShownToPrimaryTeamDetails returns a new TeamMergeRequestSentShownToPrimaryTeamDetails instance
24812 func NewTeamMergeRequestSentShownToPrimaryTeamDetails(SecondaryTeam string, SentTo string) *TeamMergeRequestSentShownToPrimaryTeamDetails {
24813 s := new(TeamMergeRequestSentShownToPrimaryTeamDetails)
24814 s.SecondaryTeam = SecondaryTeam
24815 s.SentTo = SentTo
24816 return s
24817 }
24818
24819 // TeamMergeRequestSentShownToPrimaryTeamType : has no documentation (yet)
24820 type TeamMergeRequestSentShownToPrimaryTeamType struct {
24821 // Description : has no documentation (yet)
24822 Description string `json:"description"`
24823 }
24824
24825 // NewTeamMergeRequestSentShownToPrimaryTeamType returns a new TeamMergeRequestSentShownToPrimaryTeamType instance
24826 func NewTeamMergeRequestSentShownToPrimaryTeamType(Description string) *TeamMergeRequestSentShownToPrimaryTeamType {
24827 s := new(TeamMergeRequestSentShownToPrimaryTeamType)
24828 s.Description = Description
24829 return s
24830 }
24831
24832 // TeamMergeRequestSentShownToSecondaryTeamDetails : Requested to merge your
24833 // team into another Dropbox team.
24834 type TeamMergeRequestSentShownToSecondaryTeamDetails struct {
24835 // SentTo : The email of the primary team admin the request was sent to.
24836 SentTo string `json:"sent_to"`
24837 }
24838
24839 // NewTeamMergeRequestSentShownToSecondaryTeamDetails returns a new TeamMergeRequestSentShownToSecondaryTeamDetails instance
24840 func NewTeamMergeRequestSentShownToSecondaryTeamDetails(SentTo string) *TeamMergeRequestSentShownToSecondaryTeamDetails {
24841 s := new(TeamMergeRequestSentShownToSecondaryTeamDetails)
24842 s.SentTo = SentTo
24843 return s
24844 }
24845
24846 // TeamMergeRequestSentShownToSecondaryTeamType : has no documentation (yet)
24847 type TeamMergeRequestSentShownToSecondaryTeamType struct {
24848 // Description : has no documentation (yet)
24849 Description string `json:"description"`
24850 }
24851
24852 // NewTeamMergeRequestSentShownToSecondaryTeamType returns a new TeamMergeRequestSentShownToSecondaryTeamType instance
24853 func NewTeamMergeRequestSentShownToSecondaryTeamType(Description string) *TeamMergeRequestSentShownToSecondaryTeamType {
24854 s := new(TeamMergeRequestSentShownToSecondaryTeamType)
24855 s.Description = Description
24856 return s
24857 }
24858
24859 // TeamMergeToDetails : Merged this team into another team.
24860 type TeamMergeToDetails struct {
24861 // TeamName : The name of the team that this team was merged into.
24862 TeamName string `json:"team_name"`
24863 }
24864
24865 // NewTeamMergeToDetails returns a new TeamMergeToDetails instance
24866 func NewTeamMergeToDetails(TeamName string) *TeamMergeToDetails {
24867 s := new(TeamMergeToDetails)
24868 s.TeamName = TeamName
24869 return s
24870 }
24871
24872 // TeamMergeToType : has no documentation (yet)
24873 type TeamMergeToType struct {
24874 // Description : has no documentation (yet)
24875 Description string `json:"description"`
24876 }
24877
24878 // NewTeamMergeToType returns a new TeamMergeToType instance
24879 func NewTeamMergeToType(Description string) *TeamMergeToType {
24880 s := new(TeamMergeToType)
24881 s.Description = Description
24882 return s
24883 }
24884
24885 // TeamName : Team name details
24886 type TeamName struct {
24887 // TeamDisplayName : Team's display name.
24888 TeamDisplayName string `json:"team_display_name"`
24889 // TeamLegalName : Team's legal name.
24890 TeamLegalName string `json:"team_legal_name"`
24891 }
24892
24893 // NewTeamName returns a new TeamName instance
24894 func NewTeamName(TeamDisplayName string, TeamLegalName string) *TeamName {
24895 s := new(TeamName)
24896 s.TeamDisplayName = TeamDisplayName
24897 s.TeamLegalName = TeamLegalName
24898 return s
24899 }
24900
24901 // TeamProfileAddBackgroundDetails : Added team background to display on shared
24902 // link headers.
24903 type TeamProfileAddBackgroundDetails struct {
24904 }
24905
24906 // NewTeamProfileAddBackgroundDetails returns a new TeamProfileAddBackgroundDetails instance
24907 func NewTeamProfileAddBackgroundDetails() *TeamProfileAddBackgroundDetails {
24908 s := new(TeamProfileAddBackgroundDetails)
24909 return s
24910 }
24911
24912 // TeamProfileAddBackgroundType : has no documentation (yet)
24913 type TeamProfileAddBackgroundType struct {
24914 // Description : has no documentation (yet)
24915 Description string `json:"description"`
24916 }
24917
24918 // NewTeamProfileAddBackgroundType returns a new TeamProfileAddBackgroundType instance
24919 func NewTeamProfileAddBackgroundType(Description string) *TeamProfileAddBackgroundType {
24920 s := new(TeamProfileAddBackgroundType)
24921 s.Description = Description
24922 return s
24923 }
24924
24925 // TeamProfileAddLogoDetails : Added team logo to display on shared link
24926 // headers.
24927 type TeamProfileAddLogoDetails struct {
24928 }
24929
24930 // NewTeamProfileAddLogoDetails returns a new TeamProfileAddLogoDetails instance
24931 func NewTeamProfileAddLogoDetails() *TeamProfileAddLogoDetails {
24932 s := new(TeamProfileAddLogoDetails)
24933 return s
24934 }
24935
24936 // TeamProfileAddLogoType : has no documentation (yet)
24937 type TeamProfileAddLogoType struct {
24938 // Description : has no documentation (yet)
24939 Description string `json:"description"`
24940 }
24941
24942 // NewTeamProfileAddLogoType returns a new TeamProfileAddLogoType instance
24943 func NewTeamProfileAddLogoType(Description string) *TeamProfileAddLogoType {
24944 s := new(TeamProfileAddLogoType)
24945 s.Description = Description
24946 return s
24947 }
24948
24949 // TeamProfileChangeBackgroundDetails : Changed team background displayed on
24950 // shared link headers.
24951 type TeamProfileChangeBackgroundDetails struct {
24952 }
24953
24954 // NewTeamProfileChangeBackgroundDetails returns a new TeamProfileChangeBackgroundDetails instance
24955 func NewTeamProfileChangeBackgroundDetails() *TeamProfileChangeBackgroundDetails {
24956 s := new(TeamProfileChangeBackgroundDetails)
24957 return s
24958 }
24959
24960 // TeamProfileChangeBackgroundType : has no documentation (yet)
24961 type TeamProfileChangeBackgroundType struct {
24962 // Description : has no documentation (yet)
24963 Description string `json:"description"`
24964 }
24965
24966 // NewTeamProfileChangeBackgroundType returns a new TeamProfileChangeBackgroundType instance
24967 func NewTeamProfileChangeBackgroundType(Description string) *TeamProfileChangeBackgroundType {
24968 s := new(TeamProfileChangeBackgroundType)
24969 s.Description = Description
24970 return s
24971 }
24972
24973 // TeamProfileChangeDefaultLanguageDetails : Changed default language for team.
24974 type TeamProfileChangeDefaultLanguageDetails struct {
24975 // NewValue : New team's default language.
24976 NewValue string `json:"new_value"`
24977 // PreviousValue : Previous team's default language.
24978 PreviousValue string `json:"previous_value"`
24979 }
24980
24981 // NewTeamProfileChangeDefaultLanguageDetails returns a new TeamProfileChangeDefaultLanguageDetails instance
24982 func NewTeamProfileChangeDefaultLanguageDetails(NewValue string, PreviousValue string) *TeamProfileChangeDefaultLanguageDetails {
24983 s := new(TeamProfileChangeDefaultLanguageDetails)
24984 s.NewValue = NewValue
24985 s.PreviousValue = PreviousValue
24986 return s
24987 }
24988
24989 // TeamProfileChangeDefaultLanguageType : has no documentation (yet)
24990 type TeamProfileChangeDefaultLanguageType struct {
24991 // Description : has no documentation (yet)
24992 Description string `json:"description"`
24993 }
24994
24995 // NewTeamProfileChangeDefaultLanguageType returns a new TeamProfileChangeDefaultLanguageType instance
24996 func NewTeamProfileChangeDefaultLanguageType(Description string) *TeamProfileChangeDefaultLanguageType {
24997 s := new(TeamProfileChangeDefaultLanguageType)
24998 s.Description = Description
24999 return s
25000 }
25001
25002 // TeamProfileChangeLogoDetails : Changed team logo displayed on shared link
25003 // headers.
25004 type TeamProfileChangeLogoDetails struct {
25005 }
25006
25007 // NewTeamProfileChangeLogoDetails returns a new TeamProfileChangeLogoDetails instance
25008 func NewTeamProfileChangeLogoDetails() *TeamProfileChangeLogoDetails {
25009 s := new(TeamProfileChangeLogoDetails)
25010 return s
25011 }
25012
25013 // TeamProfileChangeLogoType : has no documentation (yet)
25014 type TeamProfileChangeLogoType struct {
25015 // Description : has no documentation (yet)
25016 Description string `json:"description"`
25017 }
25018
25019 // NewTeamProfileChangeLogoType returns a new TeamProfileChangeLogoType instance
25020 func NewTeamProfileChangeLogoType(Description string) *TeamProfileChangeLogoType {
25021 s := new(TeamProfileChangeLogoType)
25022 s.Description = Description
25023 return s
25024 }
25025
25026 // TeamProfileChangeNameDetails : Changed team name.
25027 type TeamProfileChangeNameDetails struct {
25028 // PreviousValue : Previous teams name. Might be missing due to historical
25029 // data gap.
25030 PreviousValue *TeamName `json:"previous_value,omitempty"`
25031 // NewValue : New team name.
25032 NewValue *TeamName `json:"new_value"`
25033 }
25034
25035 // NewTeamProfileChangeNameDetails returns a new TeamProfileChangeNameDetails instance
25036 func NewTeamProfileChangeNameDetails(NewValue *TeamName) *TeamProfileChangeNameDetails {
25037 s := new(TeamProfileChangeNameDetails)
25038 s.NewValue = NewValue
25039 return s
25040 }
25041
25042 // TeamProfileChangeNameType : has no documentation (yet)
25043 type TeamProfileChangeNameType struct {
25044 // Description : has no documentation (yet)
25045 Description string `json:"description"`
25046 }
25047
25048 // NewTeamProfileChangeNameType returns a new TeamProfileChangeNameType instance
25049 func NewTeamProfileChangeNameType(Description string) *TeamProfileChangeNameType {
25050 s := new(TeamProfileChangeNameType)
25051 s.Description = Description
25052 return s
25053 }
25054
25055 // TeamProfileRemoveBackgroundDetails : Removed team background displayed on
25056 // shared link headers.
25057 type TeamProfileRemoveBackgroundDetails struct {
25058 }
25059
25060 // NewTeamProfileRemoveBackgroundDetails returns a new TeamProfileRemoveBackgroundDetails instance
25061 func NewTeamProfileRemoveBackgroundDetails() *TeamProfileRemoveBackgroundDetails {
25062 s := new(TeamProfileRemoveBackgroundDetails)
25063 return s
25064 }
25065
25066 // TeamProfileRemoveBackgroundType : has no documentation (yet)
25067 type TeamProfileRemoveBackgroundType struct {
25068 // Description : has no documentation (yet)
25069 Description string `json:"description"`
25070 }
25071
25072 // NewTeamProfileRemoveBackgroundType returns a new TeamProfileRemoveBackgroundType instance
25073 func NewTeamProfileRemoveBackgroundType(Description string) *TeamProfileRemoveBackgroundType {
25074 s := new(TeamProfileRemoveBackgroundType)
25075 s.Description = Description
25076 return s
25077 }
25078
25079 // TeamProfileRemoveLogoDetails : Removed team logo displayed on shared link
25080 // headers.
25081 type TeamProfileRemoveLogoDetails struct {
25082 }
25083
25084 // NewTeamProfileRemoveLogoDetails returns a new TeamProfileRemoveLogoDetails instance
25085 func NewTeamProfileRemoveLogoDetails() *TeamProfileRemoveLogoDetails {
25086 s := new(TeamProfileRemoveLogoDetails)
25087 return s
25088 }
25089
25090 // TeamProfileRemoveLogoType : has no documentation (yet)
25091 type TeamProfileRemoveLogoType struct {
25092 // Description : has no documentation (yet)
25093 Description string `json:"description"`
25094 }
25095
25096 // NewTeamProfileRemoveLogoType returns a new TeamProfileRemoveLogoType instance
25097 func NewTeamProfileRemoveLogoType(Description string) *TeamProfileRemoveLogoType {
25098 s := new(TeamProfileRemoveLogoType)
25099 s.Description = Description
25100 return s
25101 }
25102
25103 // TeamSelectiveSyncPolicy : Policy for controlling whether team selective sync
25104 // is enabled for team.
25105 type TeamSelectiveSyncPolicy struct {
25106 dropbox.Tagged
25107 }
25108
25109 // Valid tag values for TeamSelectiveSyncPolicy
25110 const (
25111 TeamSelectiveSyncPolicyDisabled = "disabled"
25112 TeamSelectiveSyncPolicyEnabled = "enabled"
25113 TeamSelectiveSyncPolicyOther = "other"
25114 )
25115
25116 // TeamSelectiveSyncPolicyChangedDetails : Enabled/disabled Team Selective Sync
25117 // for team.
25118 type TeamSelectiveSyncPolicyChangedDetails struct {
25119 // NewValue : New Team Selective Sync policy.
25120 NewValue *TeamSelectiveSyncPolicy `json:"new_value"`
25121 // PreviousValue : Previous Team Selective Sync policy.
25122 PreviousValue *TeamSelectiveSyncPolicy `json:"previous_value"`
25123 }
25124
25125 // NewTeamSelectiveSyncPolicyChangedDetails returns a new TeamSelectiveSyncPolicyChangedDetails instance
25126 func NewTeamSelectiveSyncPolicyChangedDetails(NewValue *TeamSelectiveSyncPolicy, PreviousValue *TeamSelectiveSyncPolicy) *TeamSelectiveSyncPolicyChangedDetails {
25127 s := new(TeamSelectiveSyncPolicyChangedDetails)
25128 s.NewValue = NewValue
25129 s.PreviousValue = PreviousValue
25130 return s
25131 }
25132
25133 // TeamSelectiveSyncPolicyChangedType : has no documentation (yet)
25134 type TeamSelectiveSyncPolicyChangedType struct {
25135 // Description : has no documentation (yet)
25136 Description string `json:"description"`
25137 }
25138
25139 // NewTeamSelectiveSyncPolicyChangedType returns a new TeamSelectiveSyncPolicyChangedType instance
25140 func NewTeamSelectiveSyncPolicyChangedType(Description string) *TeamSelectiveSyncPolicyChangedType {
25141 s := new(TeamSelectiveSyncPolicyChangedType)
25142 s.Description = Description
25143 return s
25144 }
25145
25146 // TeamSelectiveSyncSettingsChangedDetails : Changed sync default.
25147 type TeamSelectiveSyncSettingsChangedDetails struct {
25148 // PreviousValue : Previous value.
25149 PreviousValue *files.SyncSetting `json:"previous_value"`
25150 // NewValue : New value.
25151 NewValue *files.SyncSetting `json:"new_value"`
25152 }
25153
25154 // NewTeamSelectiveSyncSettingsChangedDetails returns a new TeamSelectiveSyncSettingsChangedDetails instance
25155 func NewTeamSelectiveSyncSettingsChangedDetails(PreviousValue *files.SyncSetting, NewValue *files.SyncSetting) *TeamSelectiveSyncSettingsChangedDetails {
25156 s := new(TeamSelectiveSyncSettingsChangedDetails)
25157 s.PreviousValue = PreviousValue
25158 s.NewValue = NewValue
25159 return s
25160 }
25161
25162 // TeamSelectiveSyncSettingsChangedType : has no documentation (yet)
25163 type TeamSelectiveSyncSettingsChangedType struct {
25164 // Description : has no documentation (yet)
25165 Description string `json:"description"`
25166 }
25167
25168 // NewTeamSelectiveSyncSettingsChangedType returns a new TeamSelectiveSyncSettingsChangedType instance
25169 func NewTeamSelectiveSyncSettingsChangedType(Description string) *TeamSelectiveSyncSettingsChangedType {
25170 s := new(TeamSelectiveSyncSettingsChangedType)
25171 s.Description = Description
25172 return s
25173 }
25174
25175 // TeamSharingWhitelistSubjectsChangedDetails : Edited the approved list for
25176 // sharing externally.
25177 type TeamSharingWhitelistSubjectsChangedDetails struct {
25178 // AddedWhitelistSubjects : Domains or emails added to the approved list for
25179 // sharing externally.
25180 AddedWhitelistSubjects []string `json:"added_whitelist_subjects"`
25181 // RemovedWhitelistSubjects : Domains or emails removed from the approved
25182 // list for sharing externally.
25183 RemovedWhitelistSubjects []string `json:"removed_whitelist_subjects"`
25184 }
25185
25186 // NewTeamSharingWhitelistSubjectsChangedDetails returns a new TeamSharingWhitelistSubjectsChangedDetails instance
25187 func NewTeamSharingWhitelistSubjectsChangedDetails(AddedWhitelistSubjects []string, RemovedWhitelistSubjects []string) *TeamSharingWhitelistSubjectsChangedDetails {
25188 s := new(TeamSharingWhitelistSubjectsChangedDetails)
25189 s.AddedWhitelistSubjects = AddedWhitelistSubjects
25190 s.RemovedWhitelistSubjects = RemovedWhitelistSubjects
25191 return s
25192 }
25193
25194 // TeamSharingWhitelistSubjectsChangedType : has no documentation (yet)
25195 type TeamSharingWhitelistSubjectsChangedType struct {
25196 // Description : has no documentation (yet)
25197 Description string `json:"description"`
25198 }
25199
25200 // NewTeamSharingWhitelistSubjectsChangedType returns a new TeamSharingWhitelistSubjectsChangedType instance
25201 func NewTeamSharingWhitelistSubjectsChangedType(Description string) *TeamSharingWhitelistSubjectsChangedType {
25202 s := new(TeamSharingWhitelistSubjectsChangedType)
25203 s.Description = Description
25204 return s
25205 }
25206
25207 // TfaAddBackupPhoneDetails : Added backup phone for two-step verification.
25208 type TfaAddBackupPhoneDetails struct {
25209 }
25210
25211 // NewTfaAddBackupPhoneDetails returns a new TfaAddBackupPhoneDetails instance
25212 func NewTfaAddBackupPhoneDetails() *TfaAddBackupPhoneDetails {
25213 s := new(TfaAddBackupPhoneDetails)
25214 return s
25215 }
25216
25217 // TfaAddBackupPhoneType : has no documentation (yet)
25218 type TfaAddBackupPhoneType struct {
25219 // Description : has no documentation (yet)
25220 Description string `json:"description"`
25221 }
25222
25223 // NewTfaAddBackupPhoneType returns a new TfaAddBackupPhoneType instance
25224 func NewTfaAddBackupPhoneType(Description string) *TfaAddBackupPhoneType {
25225 s := new(TfaAddBackupPhoneType)
25226 s.Description = Description
25227 return s
25228 }
25229
25230 // TfaAddExceptionDetails : Added members to two factor authentication exception
25231 // list.
25232 type TfaAddExceptionDetails struct {
25233 }
25234
25235 // NewTfaAddExceptionDetails returns a new TfaAddExceptionDetails instance
25236 func NewTfaAddExceptionDetails() *TfaAddExceptionDetails {
25237 s := new(TfaAddExceptionDetails)
25238 return s
25239 }
25240
25241 // TfaAddExceptionType : has no documentation (yet)
25242 type TfaAddExceptionType struct {
25243 // Description : has no documentation (yet)
25244 Description string `json:"description"`
25245 }
25246
25247 // NewTfaAddExceptionType returns a new TfaAddExceptionType instance
25248 func NewTfaAddExceptionType(Description string) *TfaAddExceptionType {
25249 s := new(TfaAddExceptionType)
25250 s.Description = Description
25251 return s
25252 }
25253
25254 // TfaAddSecurityKeyDetails : Added security key for two-step verification.
25255 type TfaAddSecurityKeyDetails struct {
25256 }
25257
25258 // NewTfaAddSecurityKeyDetails returns a new TfaAddSecurityKeyDetails instance
25259 func NewTfaAddSecurityKeyDetails() *TfaAddSecurityKeyDetails {
25260 s := new(TfaAddSecurityKeyDetails)
25261 return s
25262 }
25263
25264 // TfaAddSecurityKeyType : has no documentation (yet)
25265 type TfaAddSecurityKeyType struct {
25266 // Description : has no documentation (yet)
25267 Description string `json:"description"`
25268 }
25269
25270 // NewTfaAddSecurityKeyType returns a new TfaAddSecurityKeyType instance
25271 func NewTfaAddSecurityKeyType(Description string) *TfaAddSecurityKeyType {
25272 s := new(TfaAddSecurityKeyType)
25273 s.Description = Description
25274 return s
25275 }
25276
25277 // TfaChangeBackupPhoneDetails : Changed backup phone for two-step verification.
25278 type TfaChangeBackupPhoneDetails struct {
25279 }
25280
25281 // NewTfaChangeBackupPhoneDetails returns a new TfaChangeBackupPhoneDetails instance
25282 func NewTfaChangeBackupPhoneDetails() *TfaChangeBackupPhoneDetails {
25283 s := new(TfaChangeBackupPhoneDetails)
25284 return s
25285 }
25286
25287 // TfaChangeBackupPhoneType : has no documentation (yet)
25288 type TfaChangeBackupPhoneType struct {
25289 // Description : has no documentation (yet)
25290 Description string `json:"description"`
25291 }
25292
25293 // NewTfaChangeBackupPhoneType returns a new TfaChangeBackupPhoneType instance
25294 func NewTfaChangeBackupPhoneType(Description string) *TfaChangeBackupPhoneType {
25295 s := new(TfaChangeBackupPhoneType)
25296 s.Description = Description
25297 return s
25298 }
25299
25300 // TfaChangePolicyDetails : Changed two-step verification setting for team.
25301 type TfaChangePolicyDetails struct {
25302 // NewValue : New change policy.
25303 NewValue *team_policies.TwoStepVerificationPolicy `json:"new_value"`
25304 // PreviousValue : Previous change policy. Might be missing due to
25305 // historical data gap.
25306 PreviousValue *team_policies.TwoStepVerificationPolicy `json:"previous_value,omitempty"`
25307 }
25308
25309 // NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance
25310 func NewTfaChangePolicyDetails(NewValue *team_policies.TwoStepVerificationPolicy) *TfaChangePolicyDetails {
25311 s := new(TfaChangePolicyDetails)
25312 s.NewValue = NewValue
25313 return s
25314 }
25315
25316 // TfaChangePolicyType : has no documentation (yet)
25317 type TfaChangePolicyType struct {
25318 // Description : has no documentation (yet)
25319 Description string `json:"description"`
25320 }
25321
25322 // NewTfaChangePolicyType returns a new TfaChangePolicyType instance
25323 func NewTfaChangePolicyType(Description string) *TfaChangePolicyType {
25324 s := new(TfaChangePolicyType)
25325 s.Description = Description
25326 return s
25327 }
25328
25329 // TfaChangeStatusDetails : Enabled/disabled/changed two-step verification
25330 // setting.
25331 type TfaChangeStatusDetails struct {
25332 // NewValue : The new two factor authentication configuration.
25333 NewValue *TfaConfiguration `json:"new_value"`
25334 // PreviousValue : The previous two factor authentication configuration.
25335 // Might be missing due to historical data gap.
25336 PreviousValue *TfaConfiguration `json:"previous_value,omitempty"`
25337 // UsedRescueCode : Used two factor authentication rescue code. This flag is
25338 // relevant when the two factor authentication configuration is disabled.
25339 UsedRescueCode bool `json:"used_rescue_code,omitempty"`
25340 }
25341
25342 // NewTfaChangeStatusDetails returns a new TfaChangeStatusDetails instance
25343 func NewTfaChangeStatusDetails(NewValue *TfaConfiguration) *TfaChangeStatusDetails {
25344 s := new(TfaChangeStatusDetails)
25345 s.NewValue = NewValue
25346 return s
25347 }
25348
25349 // TfaChangeStatusType : has no documentation (yet)
25350 type TfaChangeStatusType struct {
25351 // Description : has no documentation (yet)
25352 Description string `json:"description"`
25353 }
25354
25355 // NewTfaChangeStatusType returns a new TfaChangeStatusType instance
25356 func NewTfaChangeStatusType(Description string) *TfaChangeStatusType {
25357 s := new(TfaChangeStatusType)
25358 s.Description = Description
25359 return s
25360 }
25361
25362 // TfaConfiguration : Two factor authentication configuration. Note: the enabled
25363 // option is deprecated.
25364 type TfaConfiguration struct {
25365 dropbox.Tagged
25366 }
25367
25368 // Valid tag values for TfaConfiguration
25369 const (
25370 TfaConfigurationAuthenticator = "authenticator"
25371 TfaConfigurationDisabled = "disabled"
25372 TfaConfigurationEnabled = "enabled"
25373 TfaConfigurationSms = "sms"
25374 TfaConfigurationOther = "other"
25375 )
25376
25377 // TfaRemoveBackupPhoneDetails : Removed backup phone for two-step verification.
25378 type TfaRemoveBackupPhoneDetails struct {
25379 }
25380
25381 // NewTfaRemoveBackupPhoneDetails returns a new TfaRemoveBackupPhoneDetails instance
25382 func NewTfaRemoveBackupPhoneDetails() *TfaRemoveBackupPhoneDetails {
25383 s := new(TfaRemoveBackupPhoneDetails)
25384 return s
25385 }
25386
25387 // TfaRemoveBackupPhoneType : has no documentation (yet)
25388 type TfaRemoveBackupPhoneType struct {
25389 // Description : has no documentation (yet)
25390 Description string `json:"description"`
25391 }
25392
25393 // NewTfaRemoveBackupPhoneType returns a new TfaRemoveBackupPhoneType instance
25394 func NewTfaRemoveBackupPhoneType(Description string) *TfaRemoveBackupPhoneType {
25395 s := new(TfaRemoveBackupPhoneType)
25396 s.Description = Description
25397 return s
25398 }
25399
25400 // TfaRemoveExceptionDetails : Removed members from two factor authentication
25401 // exception list.
25402 type TfaRemoveExceptionDetails struct {
25403 }
25404
25405 // NewTfaRemoveExceptionDetails returns a new TfaRemoveExceptionDetails instance
25406 func NewTfaRemoveExceptionDetails() *TfaRemoveExceptionDetails {
25407 s := new(TfaRemoveExceptionDetails)
25408 return s
25409 }
25410
25411 // TfaRemoveExceptionType : has no documentation (yet)
25412 type TfaRemoveExceptionType struct {
25413 // Description : has no documentation (yet)
25414 Description string `json:"description"`
25415 }
25416
25417 // NewTfaRemoveExceptionType returns a new TfaRemoveExceptionType instance
25418 func NewTfaRemoveExceptionType(Description string) *TfaRemoveExceptionType {
25419 s := new(TfaRemoveExceptionType)
25420 s.Description = Description
25421 return s
25422 }
25423
25424 // TfaRemoveSecurityKeyDetails : Removed security key for two-step verification.
25425 type TfaRemoveSecurityKeyDetails struct {
25426 }
25427
25428 // NewTfaRemoveSecurityKeyDetails returns a new TfaRemoveSecurityKeyDetails instance
25429 func NewTfaRemoveSecurityKeyDetails() *TfaRemoveSecurityKeyDetails {
25430 s := new(TfaRemoveSecurityKeyDetails)
25431 return s
25432 }
25433
25434 // TfaRemoveSecurityKeyType : has no documentation (yet)
25435 type TfaRemoveSecurityKeyType struct {
25436 // Description : has no documentation (yet)
25437 Description string `json:"description"`
25438 }
25439
25440 // NewTfaRemoveSecurityKeyType returns a new TfaRemoveSecurityKeyType instance
25441 func NewTfaRemoveSecurityKeyType(Description string) *TfaRemoveSecurityKeyType {
25442 s := new(TfaRemoveSecurityKeyType)
25443 s.Description = Description
25444 return s
25445 }
25446
25447 // TfaResetDetails : Reset two-step verification for team member.
25448 type TfaResetDetails struct {
25449 }
25450
25451 // NewTfaResetDetails returns a new TfaResetDetails instance
25452 func NewTfaResetDetails() *TfaResetDetails {
25453 s := new(TfaResetDetails)
25454 return s
25455 }
25456
25457 // TfaResetType : has no documentation (yet)
25458 type TfaResetType struct {
25459 // Description : has no documentation (yet)
25460 Description string `json:"description"`
25461 }
25462
25463 // NewTfaResetType returns a new TfaResetType instance
25464 func NewTfaResetType(Description string) *TfaResetType {
25465 s := new(TfaResetType)
25466 s.Description = Description
25467 return s
25468 }
25469
25470 // TimeUnit : has no documentation (yet)
25471 type TimeUnit struct {
25472 dropbox.Tagged
25473 }
25474
25475 // Valid tag values for TimeUnit
25476 const (
25477 TimeUnitDays = "days"
25478 TimeUnitHours = "hours"
25479 TimeUnitMilliseconds = "milliseconds"
25480 TimeUnitMinutes = "minutes"
25481 TimeUnitMonths = "months"
25482 TimeUnitSeconds = "seconds"
25483 TimeUnitWeeks = "weeks"
25484 TimeUnitYears = "years"
25485 TimeUnitOther = "other"
25486 )
25487
25488 // TrustedNonTeamMemberLogInfo : User that is not a member of the team but
25489 // considered trusted.
25490 type TrustedNonTeamMemberLogInfo struct {
25491 UserLogInfo
25492 // TrustedNonTeamMemberType : Indicates the type of the member of a trusted
25493 // team.
25494 TrustedNonTeamMemberType *TrustedNonTeamMemberType `json:"trusted_non_team_member_type"`
25495 // Team : Details about this user's trusted team.
25496 Team *TeamLogInfo `json:"team,omitempty"`
25497 }
25498
25499 // NewTrustedNonTeamMemberLogInfo returns a new TrustedNonTeamMemberLogInfo instance
25500 func NewTrustedNonTeamMemberLogInfo(TrustedNonTeamMemberType *TrustedNonTeamMemberType) *TrustedNonTeamMemberLogInfo {
25501 s := new(TrustedNonTeamMemberLogInfo)
25502 s.TrustedNonTeamMemberType = TrustedNonTeamMemberType
25503 return s
25504 }
25505
25506 // TrustedNonTeamMemberType : has no documentation (yet)
25507 type TrustedNonTeamMemberType struct {
25508 dropbox.Tagged
25509 }
25510
25511 // Valid tag values for TrustedNonTeamMemberType
25512 const (
25513 TrustedNonTeamMemberTypeEnterpriseAdmin = "enterprise_admin"
25514 TrustedNonTeamMemberTypeMultiInstanceAdmin = "multi_instance_admin"
25515 TrustedNonTeamMemberTypeOther = "other"
25516 )
25517
25518 // TrustedTeamsRequestAction : has no documentation (yet)
25519 type TrustedTeamsRequestAction struct {
25520 dropbox.Tagged
25521 }
25522
25523 // Valid tag values for TrustedTeamsRequestAction
25524 const (
25525 TrustedTeamsRequestActionAccepted = "accepted"
25526 TrustedTeamsRequestActionDeclined = "declined"
25527 TrustedTeamsRequestActionExpired = "expired"
25528 TrustedTeamsRequestActionInvited = "invited"
25529 TrustedTeamsRequestActionRevoked = "revoked"
25530 TrustedTeamsRequestActionOther = "other"
25531 )
25532
25533 // TrustedTeamsRequestState : has no documentation (yet)
25534 type TrustedTeamsRequestState struct {
25535 dropbox.Tagged
25536 }
25537
25538 // Valid tag values for TrustedTeamsRequestState
25539 const (
25540 TrustedTeamsRequestStateInvited = "invited"
25541 TrustedTeamsRequestStateLinked = "linked"
25542 TrustedTeamsRequestStateUnlinked = "unlinked"
25543 TrustedTeamsRequestStateOther = "other"
25544 )
25545
25546 // TwoAccountChangePolicyDetails : Enabled/disabled option for members to link
25547 // personal Dropbox account and team account to same computer.
25548 type TwoAccountChangePolicyDetails struct {
25549 // NewValue : New two account policy.
25550 NewValue *TwoAccountPolicy `json:"new_value"`
25551 // PreviousValue : Previous two account policy. Might be missing due to
25552 // historical data gap.
25553 PreviousValue *TwoAccountPolicy `json:"previous_value,omitempty"`
25554 }
25555
25556 // NewTwoAccountChangePolicyDetails returns a new TwoAccountChangePolicyDetails instance
25557 func NewTwoAccountChangePolicyDetails(NewValue *TwoAccountPolicy) *TwoAccountChangePolicyDetails {
25558 s := new(TwoAccountChangePolicyDetails)
25559 s.NewValue = NewValue
25560 return s
25561 }
25562
25563 // TwoAccountChangePolicyType : has no documentation (yet)
25564 type TwoAccountChangePolicyType struct {
25565 // Description : has no documentation (yet)
25566 Description string `json:"description"`
25567 }
25568
25569 // NewTwoAccountChangePolicyType returns a new TwoAccountChangePolicyType instance
25570 func NewTwoAccountChangePolicyType(Description string) *TwoAccountChangePolicyType {
25571 s := new(TwoAccountChangePolicyType)
25572 s.Description = Description
25573 return s
25574 }
25575
25576 // TwoAccountPolicy : Policy for pairing personal account to work account
25577 type TwoAccountPolicy struct {
25578 dropbox.Tagged
25579 }
25580
25581 // Valid tag values for TwoAccountPolicy
25582 const (
25583 TwoAccountPolicyDisabled = "disabled"
25584 TwoAccountPolicyEnabled = "enabled"
25585 TwoAccountPolicyOther = "other"
25586 )
25587
25588 // UserLinkedAppLogInfo : User linked app
25589 type UserLinkedAppLogInfo struct {
25590 AppLogInfo
25591 }
25592
25593 // NewUserLinkedAppLogInfo returns a new UserLinkedAppLogInfo instance
25594 func NewUserLinkedAppLogInfo() *UserLinkedAppLogInfo {
25595 s := new(UserLinkedAppLogInfo)
25596 return s
25597 }
25598
25599 // UserNameLogInfo : User's name logged information
25600 type UserNameLogInfo struct {
25601 // GivenName : Given name.
25602 GivenName string `json:"given_name"`
25603 // Surname : Surname.
25604 Surname string `json:"surname"`
25605 // Locale : Locale. Might be missing due to historical data gap.
25606 Locale string `json:"locale,omitempty"`
25607 }
25608
25609 // NewUserNameLogInfo returns a new UserNameLogInfo instance
25610 func NewUserNameLogInfo(GivenName string, Surname string) *UserNameLogInfo {
25611 s := new(UserNameLogInfo)
25612 s.GivenName = GivenName
25613 s.Surname = Surname
25614 return s
25615 }
25616
25617 // UserOrTeamLinkedAppLogInfo : User or team linked app. Used when linked type
25618 // is missing due to historical data gap.
25619 type UserOrTeamLinkedAppLogInfo struct {
25620 AppLogInfo
25621 }
25622
25623 // NewUserOrTeamLinkedAppLogInfo returns a new UserOrTeamLinkedAppLogInfo instance
25624 func NewUserOrTeamLinkedAppLogInfo() *UserOrTeamLinkedAppLogInfo {
25625 s := new(UserOrTeamLinkedAppLogInfo)
25626 return s
25627 }
25628
25629 // UserTagsAddedDetails : Tagged a file.
25630 type UserTagsAddedDetails struct {
25631 // Values : values.
25632 Values []string `json:"values"`
25633 }
25634
25635 // NewUserTagsAddedDetails returns a new UserTagsAddedDetails instance
25636 func NewUserTagsAddedDetails(Values []string) *UserTagsAddedDetails {
25637 s := new(UserTagsAddedDetails)
25638 s.Values = Values
25639 return s
25640 }
25641
25642 // UserTagsAddedType : has no documentation (yet)
25643 type UserTagsAddedType struct {
25644 // Description : has no documentation (yet)
25645 Description string `json:"description"`
25646 }
25647
25648 // NewUserTagsAddedType returns a new UserTagsAddedType instance
25649 func NewUserTagsAddedType(Description string) *UserTagsAddedType {
25650 s := new(UserTagsAddedType)
25651 s.Description = Description
25652 return s
25653 }
25654
25655 // UserTagsRemovedDetails : Removed tags.
25656 type UserTagsRemovedDetails struct {
25657 // Values : values.
25658 Values []string `json:"values"`
25659 }
25660
25661 // NewUserTagsRemovedDetails returns a new UserTagsRemovedDetails instance
25662 func NewUserTagsRemovedDetails(Values []string) *UserTagsRemovedDetails {
25663 s := new(UserTagsRemovedDetails)
25664 s.Values = Values
25665 return s
25666 }
25667
25668 // UserTagsRemovedType : has no documentation (yet)
25669 type UserTagsRemovedType struct {
25670 // Description : has no documentation (yet)
25671 Description string `json:"description"`
25672 }
25673
25674 // NewUserTagsRemovedType returns a new UserTagsRemovedType instance
25675 func NewUserTagsRemovedType(Description string) *UserTagsRemovedType {
25676 s := new(UserTagsRemovedType)
25677 s.Description = Description
25678 return s
25679 }
25680
25681 // ViewerInfoPolicyChangedDetails : Changed team policy for viewer info.
25682 type ViewerInfoPolicyChangedDetails struct {
25683 // PreviousValue : Previous Viewer Info policy.
25684 PreviousValue *PassPolicy `json:"previous_value"`
25685 // NewValue : New Viewer Info policy.
25686 NewValue *PassPolicy `json:"new_value"`
25687 }
25688
25689 // NewViewerInfoPolicyChangedDetails returns a new ViewerInfoPolicyChangedDetails instance
25690 func NewViewerInfoPolicyChangedDetails(PreviousValue *PassPolicy, NewValue *PassPolicy) *ViewerInfoPolicyChangedDetails {
25691 s := new(ViewerInfoPolicyChangedDetails)
25692 s.PreviousValue = PreviousValue
25693 s.NewValue = NewValue
25694 return s
25695 }
25696
25697 // ViewerInfoPolicyChangedType : has no documentation (yet)
25698 type ViewerInfoPolicyChangedType struct {
25699 // Description : has no documentation (yet)
25700 Description string `json:"description"`
25701 }
25702
25703 // NewViewerInfoPolicyChangedType returns a new ViewerInfoPolicyChangedType instance
25704 func NewViewerInfoPolicyChangedType(Description string) *ViewerInfoPolicyChangedType {
25705 s := new(ViewerInfoPolicyChangedType)
25706 s.Description = Description
25707 return s
25708 }
25709
25710 // WatermarkingPolicy : Policy for controlling team access to watermarking
25711 // feature
25712 type WatermarkingPolicy struct {
25713 dropbox.Tagged
25714 }
25715
25716 // Valid tag values for WatermarkingPolicy
25717 const (
25718 WatermarkingPolicyDisabled = "disabled"
25719 WatermarkingPolicyEnabled = "enabled"
25720 WatermarkingPolicyOther = "other"
25721 )
25722
25723 // WatermarkingPolicyChangedDetails : Changed watermarking policy for team.
25724 type WatermarkingPolicyChangedDetails struct {
25725 // NewValue : New watermarking policy.
25726 NewValue *WatermarkingPolicy `json:"new_value"`
25727 // PreviousValue : Previous watermarking policy.
25728 PreviousValue *WatermarkingPolicy `json:"previous_value"`
25729 }
25730
25731 // NewWatermarkingPolicyChangedDetails returns a new WatermarkingPolicyChangedDetails instance
25732 func NewWatermarkingPolicyChangedDetails(NewValue *WatermarkingPolicy, PreviousValue *WatermarkingPolicy) *WatermarkingPolicyChangedDetails {
25733 s := new(WatermarkingPolicyChangedDetails)
25734 s.NewValue = NewValue
25735 s.PreviousValue = PreviousValue
25736 return s
25737 }
25738
25739 // WatermarkingPolicyChangedType : has no documentation (yet)
25740 type WatermarkingPolicyChangedType struct {
25741 // Description : has no documentation (yet)
25742 Description string `json:"description"`
25743 }
25744
25745 // NewWatermarkingPolicyChangedType returns a new WatermarkingPolicyChangedType instance
25746 func NewWatermarkingPolicyChangedType(Description string) *WatermarkingPolicyChangedType {
25747 s := new(WatermarkingPolicyChangedType)
25748 s.Description = Description
25749 return s
25750 }
25751
25752 // WebDeviceSessionLogInfo : Information on active web sessions
25753 type WebDeviceSessionLogInfo struct {
25754 DeviceSessionLogInfo
25755 // SessionInfo : Web session unique id.
25756 SessionInfo *WebSessionLogInfo `json:"session_info,omitempty"`
25757 // UserAgent : Information on the hosting device.
25758 UserAgent string `json:"user_agent"`
25759 // Os : Information on the hosting operating system.
25760 Os string `json:"os"`
25761 // Browser : Information on the browser used for this web session.
25762 Browser string `json:"browser"`
25763 }
25764
25765 // NewWebDeviceSessionLogInfo returns a new WebDeviceSessionLogInfo instance
25766 func NewWebDeviceSessionLogInfo(UserAgent string, Os string, Browser string) *WebDeviceSessionLogInfo {
25767 s := new(WebDeviceSessionLogInfo)
25768 s.UserAgent = UserAgent
25769 s.Os = Os
25770 s.Browser = Browser
25771 return s
25772 }
25773
25774 // WebSessionLogInfo : Web session.
25775 type WebSessionLogInfo struct {
25776 SessionLogInfo
25777 }
25778
25779 // NewWebSessionLogInfo returns a new WebSessionLogInfo instance
25780 func NewWebSessionLogInfo() *WebSessionLogInfo {
25781 s := new(WebSessionLogInfo)
25782 return s
25783 }
25784
25785 // WebSessionsChangeActiveSessionLimitDetails : Changed limit on active sessions
25786 // per member.
25787 type WebSessionsChangeActiveSessionLimitDetails struct {
25788 // PreviousValue : Previous max number of concurrent active sessions policy.
25789 PreviousValue string `json:"previous_value"`
25790 // NewValue : New max number of concurrent active sessions policy.
25791 NewValue string `json:"new_value"`
25792 }
25793
25794 // NewWebSessionsChangeActiveSessionLimitDetails returns a new WebSessionsChangeActiveSessionLimitDetails instance
25795 func NewWebSessionsChangeActiveSessionLimitDetails(PreviousValue string, NewValue string) *WebSessionsChangeActiveSessionLimitDetails {
25796 s := new(WebSessionsChangeActiveSessionLimitDetails)
25797 s.PreviousValue = PreviousValue
25798 s.NewValue = NewValue
25799 return s
25800 }
25801
25802 // WebSessionsChangeActiveSessionLimitType : has no documentation (yet)
25803 type WebSessionsChangeActiveSessionLimitType struct {
25804 // Description : has no documentation (yet)
25805 Description string `json:"description"`
25806 }
25807
25808 // NewWebSessionsChangeActiveSessionLimitType returns a new WebSessionsChangeActiveSessionLimitType instance
25809 func NewWebSessionsChangeActiveSessionLimitType(Description string) *WebSessionsChangeActiveSessionLimitType {
25810 s := new(WebSessionsChangeActiveSessionLimitType)
25811 s.Description = Description
25812 return s
25813 }
25814
25815 // WebSessionsChangeFixedLengthPolicyDetails : Changed how long members can stay
25816 // signed in to Dropbox.com.
25817 type WebSessionsChangeFixedLengthPolicyDetails struct {
25818 // NewValue : New session length policy. Might be missing due to historical
25819 // data gap.
25820 NewValue *WebSessionsFixedLengthPolicy `json:"new_value,omitempty"`
25821 // PreviousValue : Previous session length policy. Might be missing due to
25822 // historical data gap.
25823 PreviousValue *WebSessionsFixedLengthPolicy `json:"previous_value,omitempty"`
25824 }
25825
25826 // NewWebSessionsChangeFixedLengthPolicyDetails returns a new WebSessionsChangeFixedLengthPolicyDetails instance
25827 func NewWebSessionsChangeFixedLengthPolicyDetails() *WebSessionsChangeFixedLengthPolicyDetails {
25828 s := new(WebSessionsChangeFixedLengthPolicyDetails)
25829 return s
25830 }
25831
25832 // WebSessionsChangeFixedLengthPolicyType : has no documentation (yet)
25833 type WebSessionsChangeFixedLengthPolicyType struct {
25834 // Description : has no documentation (yet)
25835 Description string `json:"description"`
25836 }
25837
25838 // NewWebSessionsChangeFixedLengthPolicyType returns a new WebSessionsChangeFixedLengthPolicyType instance
25839 func NewWebSessionsChangeFixedLengthPolicyType(Description string) *WebSessionsChangeFixedLengthPolicyType {
25840 s := new(WebSessionsChangeFixedLengthPolicyType)
25841 s.Description = Description
25842 return s
25843 }
25844
25845 // WebSessionsChangeIdleLengthPolicyDetails : Changed how long team members can
25846 // be idle while signed in to Dropbox.com.
25847 type WebSessionsChangeIdleLengthPolicyDetails struct {
25848 // NewValue : New idle length policy. Might be missing due to historical
25849 // data gap.
25850 NewValue *WebSessionsIdleLengthPolicy `json:"new_value,omitempty"`
25851 // PreviousValue : Previous idle length policy. Might be missing due to
25852 // historical data gap.
25853 PreviousValue *WebSessionsIdleLengthPolicy `json:"previous_value,omitempty"`
25854 }
25855
25856 // NewWebSessionsChangeIdleLengthPolicyDetails returns a new WebSessionsChangeIdleLengthPolicyDetails instance
25857 func NewWebSessionsChangeIdleLengthPolicyDetails() *WebSessionsChangeIdleLengthPolicyDetails {
25858 s := new(WebSessionsChangeIdleLengthPolicyDetails)
25859 return s
25860 }
25861
25862 // WebSessionsChangeIdleLengthPolicyType : has no documentation (yet)
25863 type WebSessionsChangeIdleLengthPolicyType struct {
25864 // Description : has no documentation (yet)
25865 Description string `json:"description"`
25866 }
25867
25868 // NewWebSessionsChangeIdleLengthPolicyType returns a new WebSessionsChangeIdleLengthPolicyType instance
25869 func NewWebSessionsChangeIdleLengthPolicyType(Description string) *WebSessionsChangeIdleLengthPolicyType {
25870 s := new(WebSessionsChangeIdleLengthPolicyType)
25871 s.Description = Description
25872 return s
25873 }
25874
25875 // WebSessionsFixedLengthPolicy : Web sessions fixed length policy.
25876 type WebSessionsFixedLengthPolicy struct {
25877 dropbox.Tagged
25878 // Defined : Defined fixed session length.
25879 Defined *DurationLogInfo `json:"defined,omitempty"`
25880 }
25881
25882 // Valid tag values for WebSessionsFixedLengthPolicy
25883 const (
25884 WebSessionsFixedLengthPolicyDefined = "defined"
25885 WebSessionsFixedLengthPolicyUndefined = "undefined"
25886 WebSessionsFixedLengthPolicyOther = "other"
25887 )
25888
25889 // UnmarshalJSON deserializes into a WebSessionsFixedLengthPolicy instance
25890 func (u *WebSessionsFixedLengthPolicy) UnmarshalJSON(body []byte) error {
25891 type wrap struct {
25892 dropbox.Tagged
25893 }
25894 var w wrap
25895 var err error
25896 if err = json.Unmarshal(body, &w); err != nil {
25897 return err
25898 }
25899 u.Tag = w.Tag
25900 switch u.Tag {
25901 case "defined":
25902 err = json.Unmarshal(body, &u.Defined)
25903
25904 if err != nil {
25905 return err
25906 }
25907 }
25908 return nil
25909 }
25910
25911 // WebSessionsIdleLengthPolicy : Web sessions idle length policy.
25912 type WebSessionsIdleLengthPolicy struct {
25913 dropbox.Tagged
25914 // Defined : Defined idle session length.
25915 Defined *DurationLogInfo `json:"defined,omitempty"`
25916 }
25917
25918 // Valid tag values for WebSessionsIdleLengthPolicy
25919 const (
25920 WebSessionsIdleLengthPolicyDefined = "defined"
25921 WebSessionsIdleLengthPolicyUndefined = "undefined"
25922 WebSessionsIdleLengthPolicyOther = "other"
25923 )
25924
25925 // UnmarshalJSON deserializes into a WebSessionsIdleLengthPolicy instance
25926 func (u *WebSessionsIdleLengthPolicy) UnmarshalJSON(body []byte) error {
25927 type wrap struct {
25928 dropbox.Tagged
25929 }
25930 var w wrap
25931 var err error
25932 if err = json.Unmarshal(body, &w); err != nil {
25933 return err
25934 }
25935 u.Tag = w.Tag
25936 switch u.Tag {
25937 case "defined":
25938 err = json.Unmarshal(body, &u.Defined)
25939
25940 if err != nil {
25941 return err
25942 }
25943 }
25944 return nil
25945 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package team_policies : has no documentation (yet)
21 package team_policies
22
23 import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
24
25 // CameraUploadsPolicyState : has no documentation (yet)
26 type CameraUploadsPolicyState struct {
27 dropbox.Tagged
28 }
29
30 // Valid tag values for CameraUploadsPolicyState
31 const (
32 CameraUploadsPolicyStateDisabled = "disabled"
33 CameraUploadsPolicyStateEnabled = "enabled"
34 CameraUploadsPolicyStateOther = "other"
35 )
36
37 // ComputerBackupPolicyState : has no documentation (yet)
38 type ComputerBackupPolicyState struct {
39 dropbox.Tagged
40 }
41
42 // Valid tag values for ComputerBackupPolicyState
43 const (
44 ComputerBackupPolicyStateDisabled = "disabled"
45 ComputerBackupPolicyStateEnabled = "enabled"
46 ComputerBackupPolicyStateDefault = "default"
47 ComputerBackupPolicyStateOther = "other"
48 )
49
50 // EmmState : has no documentation (yet)
51 type EmmState struct {
52 dropbox.Tagged
53 }
54
55 // Valid tag values for EmmState
56 const (
57 EmmStateDisabled = "disabled"
58 EmmStateOptional = "optional"
59 EmmStateRequired = "required"
60 EmmStateOther = "other"
61 )
62
63 // FileLockingPolicyState : has no documentation (yet)
64 type FileLockingPolicyState struct {
65 dropbox.Tagged
66 }
67
68 // Valid tag values for FileLockingPolicyState
69 const (
70 FileLockingPolicyStateDisabled = "disabled"
71 FileLockingPolicyStateEnabled = "enabled"
72 FileLockingPolicyStateOther = "other"
73 )
74
75 // GroupCreation : has no documentation (yet)
76 type GroupCreation struct {
77 dropbox.Tagged
78 }
79
80 // Valid tag values for GroupCreation
81 const (
82 GroupCreationAdminsAndMembers = "admins_and_members"
83 GroupCreationAdminsOnly = "admins_only"
84 )
85
86 // OfficeAddInPolicy : has no documentation (yet)
87 type OfficeAddInPolicy struct {
88 dropbox.Tagged
89 }
90
91 // Valid tag values for OfficeAddInPolicy
92 const (
93 OfficeAddInPolicyDisabled = "disabled"
94 OfficeAddInPolicyEnabled = "enabled"
95 OfficeAddInPolicyOther = "other"
96 )
97
98 // PaperDefaultFolderPolicy : has no documentation (yet)
99 type PaperDefaultFolderPolicy struct {
100 dropbox.Tagged
101 }
102
103 // Valid tag values for PaperDefaultFolderPolicy
104 const (
105 PaperDefaultFolderPolicyEveryoneInTeam = "everyone_in_team"
106 PaperDefaultFolderPolicyInviteOnly = "invite_only"
107 PaperDefaultFolderPolicyOther = "other"
108 )
109
110 // PaperDeploymentPolicy : has no documentation (yet)
111 type PaperDeploymentPolicy struct {
112 dropbox.Tagged
113 }
114
115 // Valid tag values for PaperDeploymentPolicy
116 const (
117 PaperDeploymentPolicyFull = "full"
118 PaperDeploymentPolicyPartial = "partial"
119 PaperDeploymentPolicyOther = "other"
120 )
121
122 // PaperDesktopPolicy : has no documentation (yet)
123 type PaperDesktopPolicy struct {
124 dropbox.Tagged
125 }
126
127 // Valid tag values for PaperDesktopPolicy
128 const (
129 PaperDesktopPolicyDisabled = "disabled"
130 PaperDesktopPolicyEnabled = "enabled"
131 PaperDesktopPolicyOther = "other"
132 )
133
134 // PaperEnabledPolicy : has no documentation (yet)
135 type PaperEnabledPolicy struct {
136 dropbox.Tagged
137 }
138
139 // Valid tag values for PaperEnabledPolicy
140 const (
141 PaperEnabledPolicyDisabled = "disabled"
142 PaperEnabledPolicyEnabled = "enabled"
143 PaperEnabledPolicyUnspecified = "unspecified"
144 PaperEnabledPolicyOther = "other"
145 )
146
147 // PasswordControlMode : has no documentation (yet)
148 type PasswordControlMode struct {
149 dropbox.Tagged
150 }
151
152 // Valid tag values for PasswordControlMode
153 const (
154 PasswordControlModeDisabled = "disabled"
155 PasswordControlModeEnabled = "enabled"
156 PasswordControlModeOther = "other"
157 )
158
159 // PasswordStrengthPolicy : has no documentation (yet)
160 type PasswordStrengthPolicy struct {
161 dropbox.Tagged
162 }
163
164 // Valid tag values for PasswordStrengthPolicy
165 const (
166 PasswordStrengthPolicyMinimalRequirements = "minimal_requirements"
167 PasswordStrengthPolicyModeratePassword = "moderate_password"
168 PasswordStrengthPolicyStrongPassword = "strong_password"
169 PasswordStrengthPolicyOther = "other"
170 )
171
172 // RolloutMethod : has no documentation (yet)
173 type RolloutMethod struct {
174 dropbox.Tagged
175 }
176
177 // Valid tag values for RolloutMethod
178 const (
179 RolloutMethodUnlinkAll = "unlink_all"
180 RolloutMethodUnlinkMostInactive = "unlink_most_inactive"
181 RolloutMethodAddMemberToExceptions = "add_member_to_exceptions"
182 )
183
184 // SharedFolderJoinPolicy : Policy governing which shared folders a team member
185 // can join.
186 type SharedFolderJoinPolicy struct {
187 dropbox.Tagged
188 }
189
190 // Valid tag values for SharedFolderJoinPolicy
191 const (
192 SharedFolderJoinPolicyFromTeamOnly = "from_team_only"
193 SharedFolderJoinPolicyFromAnyone = "from_anyone"
194 SharedFolderJoinPolicyOther = "other"
195 )
196
197 // SharedFolderMemberPolicy : Policy governing who can be a member of a folder
198 // shared by a team member.
199 type SharedFolderMemberPolicy struct {
200 dropbox.Tagged
201 }
202
203 // Valid tag values for SharedFolderMemberPolicy
204 const (
205 SharedFolderMemberPolicyTeam = "team"
206 SharedFolderMemberPolicyAnyone = "anyone"
207 SharedFolderMemberPolicyOther = "other"
208 )
209
210 // SharedLinkCreatePolicy : Policy governing the visibility of shared links.
211 // This policy can apply to newly created shared links, or all shared links.
212 type SharedLinkCreatePolicy struct {
213 dropbox.Tagged
214 }
215
216 // Valid tag values for SharedLinkCreatePolicy
217 const (
218 SharedLinkCreatePolicyDefaultPublic = "default_public"
219 SharedLinkCreatePolicyDefaultTeamOnly = "default_team_only"
220 SharedLinkCreatePolicyTeamOnly = "team_only"
221 SharedLinkCreatePolicyOther = "other"
222 )
223
224 // ShowcaseDownloadPolicy : has no documentation (yet)
225 type ShowcaseDownloadPolicy struct {
226 dropbox.Tagged
227 }
228
229 // Valid tag values for ShowcaseDownloadPolicy
230 const (
231 ShowcaseDownloadPolicyDisabled = "disabled"
232 ShowcaseDownloadPolicyEnabled = "enabled"
233 ShowcaseDownloadPolicyOther = "other"
234 )
235
236 // ShowcaseEnabledPolicy : has no documentation (yet)
237 type ShowcaseEnabledPolicy struct {
238 dropbox.Tagged
239 }
240
241 // Valid tag values for ShowcaseEnabledPolicy
242 const (
243 ShowcaseEnabledPolicyDisabled = "disabled"
244 ShowcaseEnabledPolicyEnabled = "enabled"
245 ShowcaseEnabledPolicyOther = "other"
246 )
247
248 // ShowcaseExternalSharingPolicy : has no documentation (yet)
249 type ShowcaseExternalSharingPolicy struct {
250 dropbox.Tagged
251 }
252
253 // Valid tag values for ShowcaseExternalSharingPolicy
254 const (
255 ShowcaseExternalSharingPolicyDisabled = "disabled"
256 ShowcaseExternalSharingPolicyEnabled = "enabled"
257 ShowcaseExternalSharingPolicyOther = "other"
258 )
259
260 // SmartSyncPolicy : has no documentation (yet)
261 type SmartSyncPolicy struct {
262 dropbox.Tagged
263 }
264
265 // Valid tag values for SmartSyncPolicy
266 const (
267 SmartSyncPolicyLocal = "local"
268 SmartSyncPolicyOnDemand = "on_demand"
269 SmartSyncPolicyOther = "other"
270 )
271
272 // SmarterSmartSyncPolicyState : has no documentation (yet)
273 type SmarterSmartSyncPolicyState struct {
274 dropbox.Tagged
275 }
276
277 // Valid tag values for SmarterSmartSyncPolicyState
278 const (
279 SmarterSmartSyncPolicyStateDisabled = "disabled"
280 SmarterSmartSyncPolicyStateEnabled = "enabled"
281 SmarterSmartSyncPolicyStateOther = "other"
282 )
283
284 // SsoPolicy : has no documentation (yet)
285 type SsoPolicy struct {
286 dropbox.Tagged
287 }
288
289 // Valid tag values for SsoPolicy
290 const (
291 SsoPolicyDisabled = "disabled"
292 SsoPolicyOptional = "optional"
293 SsoPolicyRequired = "required"
294 SsoPolicyOther = "other"
295 )
296
297 // SuggestMembersPolicy : has no documentation (yet)
298 type SuggestMembersPolicy struct {
299 dropbox.Tagged
300 }
301
302 // Valid tag values for SuggestMembersPolicy
303 const (
304 SuggestMembersPolicyDisabled = "disabled"
305 SuggestMembersPolicyEnabled = "enabled"
306 SuggestMembersPolicyOther = "other"
307 )
308
309 // TeamMemberPolicies : Policies governing team members.
310 type TeamMemberPolicies struct {
311 // Sharing : Policies governing sharing.
312 Sharing *TeamSharingPolicies `json:"sharing"`
313 // EmmState : This describes the Enterprise Mobility Management (EMM) state
314 // for this team. This information can be used to understand if an
315 // organization is integrating with a third-party EMM vendor to further
316 // manage and apply restrictions upon the team's Dropbox usage on mobile
317 // devices. This is a new feature and in the future we'll be adding more new
318 // fields and additional documentation.
319 EmmState *EmmState `json:"emm_state"`
320 // OfficeAddin : The admin policy around the Dropbox Office Add-In for this
321 // team.
322 OfficeAddin *OfficeAddInPolicy `json:"office_addin"`
323 // SuggestMembersPolicy : The team policy on if teammembers are allowed to
324 // suggest users for admins to invite to the team.
325 SuggestMembersPolicy *SuggestMembersPolicy `json:"suggest_members_policy"`
326 }
327
328 // NewTeamMemberPolicies returns a new TeamMemberPolicies instance
329 func NewTeamMemberPolicies(Sharing *TeamSharingPolicies, EmmState *EmmState, OfficeAddin *OfficeAddInPolicy, SuggestMembersPolicy *SuggestMembersPolicy) *TeamMemberPolicies {
330 s := new(TeamMemberPolicies)
331 s.Sharing = Sharing
332 s.EmmState = EmmState
333 s.OfficeAddin = OfficeAddin
334 s.SuggestMembersPolicy = SuggestMembersPolicy
335 return s
336 }
337
338 // TeamSharingPolicies : Policies governing sharing within and outside of the
339 // team.
340 type TeamSharingPolicies struct {
341 // SharedFolderMemberPolicy : Who can join folders shared by team members.
342 SharedFolderMemberPolicy *SharedFolderMemberPolicy `json:"shared_folder_member_policy"`
343 // SharedFolderJoinPolicy : Which shared folders team members can join.
344 SharedFolderJoinPolicy *SharedFolderJoinPolicy `json:"shared_folder_join_policy"`
345 // SharedLinkCreatePolicy : Who can view shared links owned by team members.
346 SharedLinkCreatePolicy *SharedLinkCreatePolicy `json:"shared_link_create_policy"`
347 }
348
349 // NewTeamSharingPolicies returns a new TeamSharingPolicies instance
350 func NewTeamSharingPolicies(SharedFolderMemberPolicy *SharedFolderMemberPolicy, SharedFolderJoinPolicy *SharedFolderJoinPolicy, SharedLinkCreatePolicy *SharedLinkCreatePolicy) *TeamSharingPolicies {
351 s := new(TeamSharingPolicies)
352 s.SharedFolderMemberPolicy = SharedFolderMemberPolicy
353 s.SharedFolderJoinPolicy = SharedFolderJoinPolicy
354 s.SharedLinkCreatePolicy = SharedLinkCreatePolicy
355 return s
356 }
357
358 // TwoStepVerificationPolicy : has no documentation (yet)
359 type TwoStepVerificationPolicy struct {
360 dropbox.Tagged
361 }
362
363 // Valid tag values for TwoStepVerificationPolicy
364 const (
365 TwoStepVerificationPolicyRequireTfaEnable = "require_tfa_enable"
366 TwoStepVerificationPolicyRequireTfaDisable = "require_tfa_disable"
367 TwoStepVerificationPolicyOther = "other"
368 )
369
370 // TwoStepVerificationState : has no documentation (yet)
371 type TwoStepVerificationState struct {
372 dropbox.Tagged
373 }
374
375 // Valid tag values for TwoStepVerificationState
376 const (
377 TwoStepVerificationStateRequired = "required"
378 TwoStepVerificationStateOptional = "optional"
379 TwoStepVerificationStateDisabled = "disabled"
380 TwoStepVerificationStateOther = "other"
381 )
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 package users
21
22 import (
23 "encoding/json"
24 "io"
25
26 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
28 )
29
30 // Client interface describes all routes in this namespace
31 type Client interface {
32 // FeaturesGetValues : Get a list of feature values that may be configured
33 // for the current account.
34 FeaturesGetValues(arg *UserFeaturesGetValuesBatchArg) (res *UserFeaturesGetValuesBatchResult, err error)
35 // GetAccount : Get information about a user's account.
36 GetAccount(arg *GetAccountArg) (res *BasicAccount, err error)
37 // GetAccountBatch : Get information about multiple user accounts. At most
38 // 300 accounts may be queried per request.
39 GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error)
40 // GetCurrentAccount : Get information about the current user's account.
41 GetCurrentAccount() (res *FullAccount, err error)
42 // GetSpaceUsage : Get the space usage information for the current user's
43 // account.
44 GetSpaceUsage() (res *SpaceUsage, err error)
45 }
46
47 type apiImpl dropbox.Context
48
49 //FeaturesGetValuesAPIError is an error-wrapper for the features/get_values route
50 type FeaturesGetValuesAPIError struct {
51 dropbox.APIError
52 EndpointError *UserFeaturesGetValuesBatchError `json:"error"`
53 }
54
55 func (dbx *apiImpl) FeaturesGetValues(arg *UserFeaturesGetValuesBatchArg) (res *UserFeaturesGetValuesBatchResult, err error) {
56 req := dropbox.Request{
57 Host: "api",
58 Namespace: "users",
59 Route: "features/get_values",
60 Auth: "user",
61 Style: "rpc",
62 Arg: arg,
63 ExtraHeaders: nil,
64 }
65
66 var resp []byte
67 var respBody io.ReadCloser
68 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
69 if err != nil {
70 var appErr FeaturesGetValuesAPIError
71 err = auth.ParseError(err, &appErr)
72 if err == &appErr {
73 err = appErr
74 }
75 return
76 }
77
78 err = json.Unmarshal(resp, &res)
79 if err != nil {
80 return
81 }
82
83 _ = respBody
84 return
85 }
86
87 //GetAccountAPIError is an error-wrapper for the get_account route
88 type GetAccountAPIError struct {
89 dropbox.APIError
90 EndpointError *GetAccountError `json:"error"`
91 }
92
93 func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) {
94 req := dropbox.Request{
95 Host: "api",
96 Namespace: "users",
97 Route: "get_account",
98 Auth: "user",
99 Style: "rpc",
100 Arg: arg,
101 ExtraHeaders: nil,
102 }
103
104 var resp []byte
105 var respBody io.ReadCloser
106 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
107 if err != nil {
108 var appErr GetAccountAPIError
109 err = auth.ParseError(err, &appErr)
110 if err == &appErr {
111 err = appErr
112 }
113 return
114 }
115
116 err = json.Unmarshal(resp, &res)
117 if err != nil {
118 return
119 }
120
121 _ = respBody
122 return
123 }
124
125 //GetAccountBatchAPIError is an error-wrapper for the get_account_batch route
126 type GetAccountBatchAPIError struct {
127 dropbox.APIError
128 EndpointError *GetAccountBatchError `json:"error"`
129 }
130
131 func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) {
132 req := dropbox.Request{
133 Host: "api",
134 Namespace: "users",
135 Route: "get_account_batch",
136 Auth: "user",
137 Style: "rpc",
138 Arg: arg,
139 ExtraHeaders: nil,
140 }
141
142 var resp []byte
143 var respBody io.ReadCloser
144 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
145 if err != nil {
146 var appErr GetAccountBatchAPIError
147 err = auth.ParseError(err, &appErr)
148 if err == &appErr {
149 err = appErr
150 }
151 return
152 }
153
154 err = json.Unmarshal(resp, &res)
155 if err != nil {
156 return
157 }
158
159 _ = respBody
160 return
161 }
162
163 //GetCurrentAccountAPIError is an error-wrapper for the get_current_account route
164 type GetCurrentAccountAPIError struct {
165 dropbox.APIError
166 EndpointError struct{} `json:"error"`
167 }
168
169 func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) {
170 req := dropbox.Request{
171 Host: "api",
172 Namespace: "users",
173 Route: "get_current_account",
174 Auth: "user",
175 Style: "rpc",
176 Arg: nil,
177 ExtraHeaders: nil,
178 }
179
180 var resp []byte
181 var respBody io.ReadCloser
182 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
183 if err != nil {
184 var appErr GetCurrentAccountAPIError
185 err = auth.ParseError(err, &appErr)
186 if err == &appErr {
187 err = appErr
188 }
189 return
190 }
191
192 err = json.Unmarshal(resp, &res)
193 if err != nil {
194 return
195 }
196
197 _ = respBody
198 return
199 }
200
201 //GetSpaceUsageAPIError is an error-wrapper for the get_space_usage route
202 type GetSpaceUsageAPIError struct {
203 dropbox.APIError
204 EndpointError struct{} `json:"error"`
205 }
206
207 func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) {
208 req := dropbox.Request{
209 Host: "api",
210 Namespace: "users",
211 Route: "get_space_usage",
212 Auth: "user",
213 Style: "rpc",
214 Arg: nil,
215 ExtraHeaders: nil,
216 }
217
218 var resp []byte
219 var respBody io.ReadCloser
220 resp, respBody, err = (*dropbox.Context)(dbx).Execute(req, nil)
221 if err != nil {
222 var appErr GetSpaceUsageAPIError
223 err = auth.ParseError(err, &appErr)
224 if err == &appErr {
225 err = appErr
226 }
227 return
228 }
229
230 err = json.Unmarshal(resp, &res)
231 if err != nil {
232 return
233 }
234
235 _ = respBody
236 return
237 }
238
239 // New returns a Client implementation for this namespace
240 func New(c dropbox.Config) Client {
241 ctx := apiImpl(dropbox.NewContext(c))
242 return &ctx
243 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package users : This namespace contains endpoints and data types for user
21 // management.
22 package users
23
24 import (
25 "encoding/json"
26
27 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
28 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/common"
29 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_common"
30 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/team_policies"
31 "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/users_common"
32 )
33
34 // Account : The amount of detail revealed about an account depends on the user
35 // being queried and the user making the query.
36 type Account struct {
37 // AccountId : The user's unique Dropbox ID.
38 AccountId string `json:"account_id"`
39 // Name : Details of a user's name.
40 Name *Name `json:"name"`
41 // Email : The user's email address. Do not rely on this without checking
42 // the `email_verified` field. Even then, it's possible that the user has
43 // since lost access to their email.
44 Email string `json:"email"`
45 // EmailVerified : Whether the user has verified their email address.
46 EmailVerified bool `json:"email_verified"`
47 // ProfilePhotoUrl : URL for the photo representing the user, if one is set.
48 ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
49 // Disabled : Whether the user has been disabled.
50 Disabled bool `json:"disabled"`
51 }
52
53 // NewAccount returns a new Account instance
54 func NewAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool) *Account {
55 s := new(Account)
56 s.AccountId = AccountId
57 s.Name = Name
58 s.Email = Email
59 s.EmailVerified = EmailVerified
60 s.Disabled = Disabled
61 return s
62 }
63
64 // BasicAccount : Basic information about any account.
65 type BasicAccount struct {
66 Account
67 // IsTeammate : Whether this user is a teammate of the current user. If this
68 // account is the current user's account, then this will be true.
69 IsTeammate bool `json:"is_teammate"`
70 // TeamMemberId : The user's unique team member id. This field will only be
71 // present if the user is part of a team and `is_teammate` is true.
72 TeamMemberId string `json:"team_member_id,omitempty"`
73 }
74
75 // NewBasicAccount returns a new BasicAccount instance
76 func NewBasicAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, IsTeammate bool) *BasicAccount {
77 s := new(BasicAccount)
78 s.AccountId = AccountId
79 s.Name = Name
80 s.Email = Email
81 s.EmailVerified = EmailVerified
82 s.Disabled = Disabled
83 s.IsTeammate = IsTeammate
84 return s
85 }
86
87 // FileLockingValue : The value for `UserFeature.file_locking`.
88 type FileLockingValue struct {
89 dropbox.Tagged
90 // Enabled : When this value is True, the user can lock files in shared
91 // directories. When the value is False the user can unlock the files they
92 // have locked or request to unlock files locked by others.
93 Enabled bool `json:"enabled,omitempty"`
94 }
95
96 // Valid tag values for FileLockingValue
97 const (
98 FileLockingValueEnabled = "enabled"
99 FileLockingValueOther = "other"
100 )
101
102 // UnmarshalJSON deserializes into a FileLockingValue instance
103 func (u *FileLockingValue) UnmarshalJSON(body []byte) error {
104 type wrap struct {
105 dropbox.Tagged
106 // Enabled : When this value is True, the user can lock files in shared
107 // directories. When the value is False the user can unlock the files
108 // they have locked or request to unlock files locked by others.
109 Enabled bool `json:"enabled,omitempty"`
110 }
111 var w wrap
112 var err error
113 if err = json.Unmarshal(body, &w); err != nil {
114 return err
115 }
116 u.Tag = w.Tag
117 switch u.Tag {
118 case "enabled":
119 u.Enabled = w.Enabled
120
121 if err != nil {
122 return err
123 }
124 }
125 return nil
126 }
127
128 // FullAccount : Detailed information about the current user's account.
129 type FullAccount struct {
130 Account
131 // Country : The user's two-letter country code, if available. Country codes
132 // are based on `ISO 3166-1` <http://en.wikipedia.org/wiki/ISO_3166-1>.
133 Country string `json:"country,omitempty"`
134 // Locale : The language that the user specified. Locale tags will be `IETF
135 // language tags` <http://en.wikipedia.org/wiki/IETF_language_tag>.
136 Locale string `json:"locale"`
137 // ReferralLink : The user's `referral link`
138 // <https://www.dropbox.com/referrals>.
139 ReferralLink string `json:"referral_link"`
140 // Team : If this account is a member of a team, information about that
141 // team.
142 Team *FullTeam `json:"team,omitempty"`
143 // TeamMemberId : This account's unique team member id. This field will only
144 // be present if `team` is present.
145 TeamMemberId string `json:"team_member_id,omitempty"`
146 // IsPaired : Whether the user has a personal and work account. If the
147 // current account is personal, then `team` will always be nil, but
148 // `is_paired` will indicate if a work account is linked.
149 IsPaired bool `json:"is_paired"`
150 // AccountType : What type of account this user has.
151 AccountType *users_common.AccountType `json:"account_type"`
152 // RootInfo : The root info for this account.
153 RootInfo common.IsRootInfo `json:"root_info"`
154 }
155
156 // NewFullAccount returns a new FullAccount instance
157 func NewFullAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, Locale string, ReferralLink string, IsPaired bool, AccountType *users_common.AccountType, RootInfo common.IsRootInfo) *FullAccount {
158 s := new(FullAccount)
159 s.AccountId = AccountId
160 s.Name = Name
161 s.Email = Email
162 s.EmailVerified = EmailVerified
163 s.Disabled = Disabled
164 s.Locale = Locale
165 s.ReferralLink = ReferralLink
166 s.IsPaired = IsPaired
167 s.AccountType = AccountType
168 s.RootInfo = RootInfo
169 return s
170 }
171
172 // UnmarshalJSON deserializes into a FullAccount instance
173 func (u *FullAccount) UnmarshalJSON(b []byte) error {
174 type wrap struct {
175 // AccountId : The user's unique Dropbox ID.
176 AccountId string `json:"account_id"`
177 // Name : Details of a user's name.
178 Name *Name `json:"name"`
179 // Email : The user's email address. Do not rely on this without
180 // checking the `email_verified` field. Even then, it's possible that
181 // the user has since lost access to their email.
182 Email string `json:"email"`
183 // EmailVerified : Whether the user has verified their email address.
184 EmailVerified bool `json:"email_verified"`
185 // Disabled : Whether the user has been disabled.
186 Disabled bool `json:"disabled"`
187 // Locale : The language that the user specified. Locale tags will be
188 // `IETF language tags`
189 // <http://en.wikipedia.org/wiki/IETF_language_tag>.
190 Locale string `json:"locale"`
191 // ReferralLink : The user's `referral link`
192 // <https://www.dropbox.com/referrals>.
193 ReferralLink string `json:"referral_link"`
194 // IsPaired : Whether the user has a personal and work account. If the
195 // current account is personal, then `team` will always be nil, but
196 // `is_paired` will indicate if a work account is linked.
197 IsPaired bool `json:"is_paired"`
198 // AccountType : What type of account this user has.
199 AccountType *users_common.AccountType `json:"account_type"`
200 // RootInfo : The root info for this account.
201 RootInfo json.RawMessage `json:"root_info"`
202 // ProfilePhotoUrl : URL for the photo representing the user, if one is
203 // set.
204 ProfilePhotoUrl string `json:"profile_photo_url,omitempty"`
205 // Country : The user's two-letter country code, if available. Country
206 // codes are based on `ISO 3166-1`
207 // <http://en.wikipedia.org/wiki/ISO_3166-1>.
208 Country string `json:"country,omitempty"`
209 // Team : If this account is a member of a team, information about that
210 // team.
211 Team *FullTeam `json:"team,omitempty"`
212 // TeamMemberId : This account's unique team member id. This field will
213 // only be present if `team` is present.
214 TeamMemberId string `json:"team_member_id,omitempty"`
215 }
216 var w wrap
217 if err := json.Unmarshal(b, &w); err != nil {
218 return err
219 }
220 u.AccountId = w.AccountId
221 u.Name = w.Name
222 u.Email = w.Email
223 u.EmailVerified = w.EmailVerified
224 u.Disabled = w.Disabled
225 u.Locale = w.Locale
226 u.ReferralLink = w.ReferralLink
227 u.IsPaired = w.IsPaired
228 u.AccountType = w.AccountType
229 RootInfo, err := common.IsRootInfoFromJSON(w.RootInfo)
230 if err != nil {
231 return err
232 }
233 u.RootInfo = RootInfo
234 u.ProfilePhotoUrl = w.ProfilePhotoUrl
235 u.Country = w.Country
236 u.Team = w.Team
237 u.TeamMemberId = w.TeamMemberId
238 return nil
239 }
240
241 // Team : Information about a team.
242 type Team struct {
243 // Id : The team's unique ID.
244 Id string `json:"id"`
245 // Name : The name of the team.
246 Name string `json:"name"`
247 }
248
249 // NewTeam returns a new Team instance
250 func NewTeam(Id string, Name string) *Team {
251 s := new(Team)
252 s.Id = Id
253 s.Name = Name
254 return s
255 }
256
257 // FullTeam : Detailed information about a team.
258 type FullTeam struct {
259 Team
260 // SharingPolicies : Team policies governing sharing.
261 SharingPolicies *team_policies.TeamSharingPolicies `json:"sharing_policies"`
262 // OfficeAddinPolicy : Team policy governing the use of the Office Add-In.
263 OfficeAddinPolicy *team_policies.OfficeAddInPolicy `json:"office_addin_policy"`
264 }
265
266 // NewFullTeam returns a new FullTeam instance
267 func NewFullTeam(Id string, Name string, SharingPolicies *team_policies.TeamSharingPolicies, OfficeAddinPolicy *team_policies.OfficeAddInPolicy) *FullTeam {
268 s := new(FullTeam)
269 s.Id = Id
270 s.Name = Name
271 s.SharingPolicies = SharingPolicies
272 s.OfficeAddinPolicy = OfficeAddinPolicy
273 return s
274 }
275
276 // GetAccountArg : has no documentation (yet)
277 type GetAccountArg struct {
278 // AccountId : A user's account identifier.
279 AccountId string `json:"account_id"`
280 }
281
282 // NewGetAccountArg returns a new GetAccountArg instance
283 func NewGetAccountArg(AccountId string) *GetAccountArg {
284 s := new(GetAccountArg)
285 s.AccountId = AccountId
286 return s
287 }
288
289 // GetAccountBatchArg : has no documentation (yet)
290 type GetAccountBatchArg struct {
291 // AccountIds : List of user account identifiers. Should not contain any
292 // duplicate account IDs.
293 AccountIds []string `json:"account_ids"`
294 }
295
296 // NewGetAccountBatchArg returns a new GetAccountBatchArg instance
297 func NewGetAccountBatchArg(AccountIds []string) *GetAccountBatchArg {
298 s := new(GetAccountBatchArg)
299 s.AccountIds = AccountIds
300 return s
301 }
302
303 // GetAccountBatchError : has no documentation (yet)
304 type GetAccountBatchError struct {
305 dropbox.Tagged
306 // NoAccount : The value is an account ID specified in
307 // `GetAccountBatchArg.account_ids` that does not exist.
308 NoAccount string `json:"no_account,omitempty"`
309 }
310
311 // Valid tag values for GetAccountBatchError
312 const (
313 GetAccountBatchErrorNoAccount = "no_account"
314 GetAccountBatchErrorOther = "other"
315 )
316
317 // UnmarshalJSON deserializes into a GetAccountBatchError instance
318 func (u *GetAccountBatchError) UnmarshalJSON(body []byte) error {
319 type wrap struct {
320 dropbox.Tagged
321 // NoAccount : The value is an account ID specified in
322 // `GetAccountBatchArg.account_ids` that does not exist.
323 NoAccount string `json:"no_account,omitempty"`
324 }
325 var w wrap
326 var err error
327 if err = json.Unmarshal(body, &w); err != nil {
328 return err
329 }
330 u.Tag = w.Tag
331 switch u.Tag {
332 case "no_account":
333 u.NoAccount = w.NoAccount
334
335 if err != nil {
336 return err
337 }
338 }
339 return nil
340 }
341
342 // GetAccountError : has no documentation (yet)
343 type GetAccountError struct {
344 dropbox.Tagged
345 }
346
347 // Valid tag values for GetAccountError
348 const (
349 GetAccountErrorNoAccount = "no_account"
350 GetAccountErrorOther = "other"
351 )
352
353 // IndividualSpaceAllocation : has no documentation (yet)
354 type IndividualSpaceAllocation struct {
355 // Allocated : The total space allocated to the user's account (bytes).
356 Allocated uint64 `json:"allocated"`
357 }
358
359 // NewIndividualSpaceAllocation returns a new IndividualSpaceAllocation instance
360 func NewIndividualSpaceAllocation(Allocated uint64) *IndividualSpaceAllocation {
361 s := new(IndividualSpaceAllocation)
362 s.Allocated = Allocated
363 return s
364 }
365
366 // Name : Representations for a person's name to assist with
367 // internationalization.
368 type Name struct {
369 // GivenName : Also known as a first name.
370 GivenName string `json:"given_name"`
371 // Surname : Also known as a last name or family name.
372 Surname string `json:"surname"`
373 // FamiliarName : Locale-dependent name. In the US, a person's familiar name
374 // is their `given_name`, but elsewhere, it could be any combination of a
375 // person's `given_name` and `surname`.
376 FamiliarName string `json:"familiar_name"`
377 // DisplayName : A name that can be used directly to represent the name of a
378 // user's Dropbox account.
379 DisplayName string `json:"display_name"`
380 // AbbreviatedName : An abbreviated form of the person's name. Their
381 // initials in most locales.
382 AbbreviatedName string `json:"abbreviated_name"`
383 }
384
385 // NewName returns a new Name instance
386 func NewName(GivenName string, Surname string, FamiliarName string, DisplayName string, AbbreviatedName string) *Name {
387 s := new(Name)
388 s.GivenName = GivenName
389 s.Surname = Surname
390 s.FamiliarName = FamiliarName
391 s.DisplayName = DisplayName
392 s.AbbreviatedName = AbbreviatedName
393 return s
394 }
395
396 // PaperAsFilesValue : The value for `UserFeature.paper_as_files`.
397 type PaperAsFilesValue struct {
398 dropbox.Tagged
399 // Enabled : When this value is true, the user's Paper docs are accessible
400 // in Dropbox with the .paper extension and must be accessed via the /files
401 // endpoints. When this value is false, the user's Paper docs are stored
402 // separate from Dropbox files and folders and should be accessed via the
403 // /paper endpoints.
404 Enabled bool `json:"enabled,omitempty"`
405 }
406
407 // Valid tag values for PaperAsFilesValue
408 const (
409 PaperAsFilesValueEnabled = "enabled"
410 PaperAsFilesValueOther = "other"
411 )
412
413 // UnmarshalJSON deserializes into a PaperAsFilesValue instance
414 func (u *PaperAsFilesValue) UnmarshalJSON(body []byte) error {
415 type wrap struct {
416 dropbox.Tagged
417 // Enabled : When this value is true, the user's Paper docs are
418 // accessible in Dropbox with the .paper extension and must be accessed
419 // via the /files endpoints. When this value is false, the user's Paper
420 // docs are stored separate from Dropbox files and folders and should be
421 // accessed via the /paper endpoints.
422 Enabled bool `json:"enabled,omitempty"`
423 }
424 var w wrap
425 var err error
426 if err = json.Unmarshal(body, &w); err != nil {
427 return err
428 }
429 u.Tag = w.Tag
430 switch u.Tag {
431 case "enabled":
432 u.Enabled = w.Enabled
433
434 if err != nil {
435 return err
436 }
437 }
438 return nil
439 }
440
441 // SpaceAllocation : Space is allocated differently based on the type of
442 // account.
443 type SpaceAllocation struct {
444 dropbox.Tagged
445 // Individual : The user's space allocation applies only to their individual
446 // account.
447 Individual *IndividualSpaceAllocation `json:"individual,omitempty"`
448 // Team : The user shares space with other members of their team.
449 Team *TeamSpaceAllocation `json:"team,omitempty"`
450 }
451
452 // Valid tag values for SpaceAllocation
453 const (
454 SpaceAllocationIndividual = "individual"
455 SpaceAllocationTeam = "team"
456 SpaceAllocationOther = "other"
457 )
458
459 // UnmarshalJSON deserializes into a SpaceAllocation instance
460 func (u *SpaceAllocation) UnmarshalJSON(body []byte) error {
461 type wrap struct {
462 dropbox.Tagged
463 }
464 var w wrap
465 var err error
466 if err = json.Unmarshal(body, &w); err != nil {
467 return err
468 }
469 u.Tag = w.Tag
470 switch u.Tag {
471 case "individual":
472 err = json.Unmarshal(body, &u.Individual)
473
474 if err != nil {
475 return err
476 }
477 case "team":
478 err = json.Unmarshal(body, &u.Team)
479
480 if err != nil {
481 return err
482 }
483 }
484 return nil
485 }
486
487 // SpaceUsage : Information about a user's space usage and quota.
488 type SpaceUsage struct {
489 // Used : The user's total space usage (bytes).
490 Used uint64 `json:"used"`
491 // Allocation : The user's space allocation.
492 Allocation *SpaceAllocation `json:"allocation"`
493 }
494
495 // NewSpaceUsage returns a new SpaceUsage instance
496 func NewSpaceUsage(Used uint64, Allocation *SpaceAllocation) *SpaceUsage {
497 s := new(SpaceUsage)
498 s.Used = Used
499 s.Allocation = Allocation
500 return s
501 }
502
503 // TeamSpaceAllocation : has no documentation (yet)
504 type TeamSpaceAllocation struct {
505 // Used : The total space currently used by the user's team (bytes).
506 Used uint64 `json:"used"`
507 // Allocated : The total space allocated to the user's team (bytes).
508 Allocated uint64 `json:"allocated"`
509 // UserWithinTeamSpaceAllocated : The total space allocated to the user
510 // within its team allocated space (0 means that no restriction is imposed
511 // on the user's quota within its team).
512 UserWithinTeamSpaceAllocated uint64 `json:"user_within_team_space_allocated"`
513 // UserWithinTeamSpaceLimitType : The type of the space limit imposed on the
514 // team member (off, alert_only, stop_sync).
515 UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType `json:"user_within_team_space_limit_type"`
516 // UserWithinTeamSpaceUsedCached : An accurate cached calculation of a team
517 // member's total space usage (bytes).
518 UserWithinTeamSpaceUsedCached uint64 `json:"user_within_team_space_used_cached"`
519 }
520
521 // NewTeamSpaceAllocation returns a new TeamSpaceAllocation instance
522 func NewTeamSpaceAllocation(Used uint64, Allocated uint64, UserWithinTeamSpaceAllocated uint64, UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType, UserWithinTeamSpaceUsedCached uint64) *TeamSpaceAllocation {
523 s := new(TeamSpaceAllocation)
524 s.Used = Used
525 s.Allocated = Allocated
526 s.UserWithinTeamSpaceAllocated = UserWithinTeamSpaceAllocated
527 s.UserWithinTeamSpaceLimitType = UserWithinTeamSpaceLimitType
528 s.UserWithinTeamSpaceUsedCached = UserWithinTeamSpaceUsedCached
529 return s
530 }
531
532 // UserFeature : A set of features that a Dropbox User account may have
533 // configured.
534 type UserFeature struct {
535 dropbox.Tagged
536 }
537
538 // Valid tag values for UserFeature
539 const (
540 UserFeaturePaperAsFiles = "paper_as_files"
541 UserFeatureFileLocking = "file_locking"
542 UserFeatureOther = "other"
543 )
544
545 // UserFeatureValue : Values that correspond to entries in `UserFeature`.
546 type UserFeatureValue struct {
547 dropbox.Tagged
548 // PaperAsFiles : has no documentation (yet)
549 PaperAsFiles *PaperAsFilesValue `json:"paper_as_files,omitempty"`
550 // FileLocking : has no documentation (yet)
551 FileLocking *FileLockingValue `json:"file_locking,omitempty"`
552 }
553
554 // Valid tag values for UserFeatureValue
555 const (
556 UserFeatureValuePaperAsFiles = "paper_as_files"
557 UserFeatureValueFileLocking = "file_locking"
558 UserFeatureValueOther = "other"
559 )
560
561 // UnmarshalJSON deserializes into a UserFeatureValue instance
562 func (u *UserFeatureValue) UnmarshalJSON(body []byte) error {
563 type wrap struct {
564 dropbox.Tagged
565 // PaperAsFiles : has no documentation (yet)
566 PaperAsFiles *PaperAsFilesValue `json:"paper_as_files,omitempty"`
567 // FileLocking : has no documentation (yet)
568 FileLocking *FileLockingValue `json:"file_locking,omitempty"`
569 }
570 var w wrap
571 var err error
572 if err = json.Unmarshal(body, &w); err != nil {
573 return err
574 }
575 u.Tag = w.Tag
576 switch u.Tag {
577 case "paper_as_files":
578 u.PaperAsFiles = w.PaperAsFiles
579
580 if err != nil {
581 return err
582 }
583 case "file_locking":
584 u.FileLocking = w.FileLocking
585
586 if err != nil {
587 return err
588 }
589 }
590 return nil
591 }
592
593 // UserFeaturesGetValuesBatchArg : has no documentation (yet)
594 type UserFeaturesGetValuesBatchArg struct {
595 // Features : A list of features in `UserFeature`. If the list is empty,
596 // this route will return `UserFeaturesGetValuesBatchError`.
597 Features []*UserFeature `json:"features"`
598 }
599
600 // NewUserFeaturesGetValuesBatchArg returns a new UserFeaturesGetValuesBatchArg instance
601 func NewUserFeaturesGetValuesBatchArg(Features []*UserFeature) *UserFeaturesGetValuesBatchArg {
602 s := new(UserFeaturesGetValuesBatchArg)
603 s.Features = Features
604 return s
605 }
606
607 // UserFeaturesGetValuesBatchError : has no documentation (yet)
608 type UserFeaturesGetValuesBatchError struct {
609 dropbox.Tagged
610 }
611
612 // Valid tag values for UserFeaturesGetValuesBatchError
613 const (
614 UserFeaturesGetValuesBatchErrorEmptyFeaturesList = "empty_features_list"
615 UserFeaturesGetValuesBatchErrorOther = "other"
616 )
617
618 // UserFeaturesGetValuesBatchResult : has no documentation (yet)
619 type UserFeaturesGetValuesBatchResult struct {
620 // Values : has no documentation (yet)
621 Values []*UserFeatureValue `json:"values"`
622 }
623
624 // NewUserFeaturesGetValuesBatchResult returns a new UserFeaturesGetValuesBatchResult instance
625 func NewUserFeaturesGetValuesBatchResult(Values []*UserFeatureValue) *UserFeaturesGetValuesBatchResult {
626 s := new(UserFeaturesGetValuesBatchResult)
627 s.Values = Values
628 return s
629 }
0 // Copyright (c) Dropbox, Inc.
1 //
2 // Permission is hereby granted, free of charge, to any person obtaining a copy
3 // of this software and associated documentation files (the "Software"), to deal
4 // in the Software without restriction, including without limitation the rights
5 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 // copies of the Software, and to permit persons to whom the Software is
7 // furnished to do so, subject to the following conditions:
8 //
9 // The above copyright notice and this permission notice shall be included in
10 // all copies or substantial portions of the Software.
11 //
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 // THE SOFTWARE.
19
20 // Package users_common : This namespace contains common data types used within
21 // the users namespace.
22 package users_common
23
24 import "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
25
26 // AccountType : What type of account this user has.
27 type AccountType struct {
28 dropbox.Tagged
29 }
30
31 // Valid tag values for AccountType
32 const (
33 AccountTypeBasic = "basic"
34 AccountTypePro = "pro"
35 AccountTypeBusiness = "business"
36 )
0 module github.com/dropbox/dropbox-sdk-go-unofficial/v6
1
2 go 1.13
3
4 require golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5
0 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
1 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
2 cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
3 cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
4 cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
5 cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
6 cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
7 cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
8 cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
9 cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
10 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
11 cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
12 cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
13 cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
14 cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
15 cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
16 cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
17 cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
18 cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
19 cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
20 cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
21 cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
22 cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
23 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
24 cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
25 cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
26 cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
27 cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
28 cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
29 cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
30 cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
31 cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
32 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
33 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
34 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
35 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
36 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
37 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
38 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
39 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
40 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
41 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
42 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
43 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
44 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
45 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
46 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
47 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
48 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
49 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
50 github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
51 github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
52 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
53 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
54 github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
55 github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
56 github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
57 github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
58 github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
59 github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
60 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
61 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
62 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
63 github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
64 github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
65 github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
66 github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
67 github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
68 github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
69 github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
70 github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
71 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
72 github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
73 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
74 github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
75 github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
76 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
77 github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
78 github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
79 github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
80 github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
81 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
82 github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
83 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
84 github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
85 github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
86 github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
87 github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
88 github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
89 github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
90 github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
91 github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
92 github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
93 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
94 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
95 github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
96 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
97 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
98 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
99 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
100 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
101 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
102 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
103 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
104 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
105 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
106 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
107 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
108 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
109 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
110 github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
111 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
112 github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
113 go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
114 go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
115 go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
116 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
117 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
118 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
119 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
120 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
121 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
122 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
123 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
124 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
125 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
126 golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
127 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
128 golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
129 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
130 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
131 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
132 golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
133 golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
134 golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
135 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
136 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
137 golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
138 golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
139 golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
140 golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
141 golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
142 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
143 golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
144 golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
145 golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
146 golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
147 golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
148 golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
149 golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
150 golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
151 golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
152 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
153 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
154 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
155 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
156 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
157 golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
158 golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
159 golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
160 golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
161 golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
162 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
163 golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
164 golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
165 golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
166 golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
167 golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
168 golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
169 golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
170 golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
171 golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
172 golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
173 golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
174 golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
175 golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
176 golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
177 golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
178 golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
179 golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
180 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
181 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
182 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
183 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
184 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
185 golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 h1:Lm4OryKCca1vehdsWogr9N4t7NfZxLbJoc/H0w4K4S4=
186 golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
187 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
188 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
189 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
190 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
191 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
192 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
193 golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
194 golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
195 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
196 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
197 golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
198 golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
199 golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
200 golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
201 golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
202 golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
203 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
204 golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
205 golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
206 golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
207 golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
208 golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
209 golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
210 golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
211 golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
212 golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
213 golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
214 golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
215 golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
216 golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
217 golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
218 golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
219 golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
220 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
221 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
222 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
223 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
224 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
225 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
226 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
227 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
228 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
229 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
230 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
231 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
232 golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
233 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
234 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
235 golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
236 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
237 golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
238 golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
239 golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
240 golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
241 golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
242 golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
243 golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
244 golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
245 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
246 golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
247 golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
248 golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
249 golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
250 golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
251 golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
252 golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
253 golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
254 golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
255 golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
256 golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
257 golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
258 golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
259 golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
260 golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
261 golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
262 golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
263 golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
264 golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
265 golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
266 golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
267 golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
268 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
269 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
270 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
271 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
272 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
273 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
274 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
275 google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
276 google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
277 google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
278 google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
279 google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
280 google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
281 google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
282 google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
283 google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
284 google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
285 google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
286 google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
287 google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
288 google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
289 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
290 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
291 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
292 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
293 google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
294 google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
295 google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
296 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
297 google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
298 google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
299 google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
300 google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
301 google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
302 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
303 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
304 google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
305 google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
306 google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
307 google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
308 google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
309 google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
310 google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
311 google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
312 google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
313 google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
314 google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
315 google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
316 google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
317 google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
318 google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
319 google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
320 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
321 google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
322 google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
323 google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
324 google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
325 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
326 google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
327 google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
328 google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
329 google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
330 google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
331 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
332 google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
333 google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
334 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
335 google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
336 google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
337 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
338 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
339 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
340 google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
341 google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
342 google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
343 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
344 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
345 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
346 google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
347 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
348 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
349 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
350 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
351 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
352 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
353 honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
354 honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
355 honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
356 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
357 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
358 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
359 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
360 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
361 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=