pax_global_header00006660000000000000000000000064134075336120014516gustar00rootroot0000000000000052 comment=af4558f5e44cef90c2d963e50e76e7dfa46d0c48 dropbox-sdk-go-unofficial-5.4.0/000077500000000000000000000000001340753361200165005ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/.gitignore000066400000000000000000000001421340753361200204650ustar00rootroot00000000000000# jetbrains .idea # swap [._]*.s[a-w][a-z] [._]s[a-w][a-z] # emacs backups *~ .pyc __pycache__ dropbox-sdk-go-unofficial-5.4.0/.gitmodules000066400000000000000000000001771340753361200206620ustar00rootroot00000000000000[submodule "generator/dropbox-api-spec"] path = generator/dropbox-api-spec url = https://github.com/dropbox/dropbox-api-spec dropbox-sdk-go-unofficial-5.4.0/.travis.yml000066400000000000000000000006641340753361200206170ustar00rootroot00000000000000language: go go: - "1.9.x" - "1.10.x" - "1.11.x" install: go get -u golang.org/x/oauth2 script: - set -e - GOOS=linux GOARCH=amd64 go install ./dropbox/... - GOOS=darwin GOARCH=amd64 go install ./dropbox/... - GOOS=windows GOARCH=amd64 go install ./dropbox/... - set +e jobs: include: - stage: run tests go: "1.11.x" install: go get -u golang.org/x/oauth2 script: go test -v ./dropbox/... dropbox-sdk-go-unofficial-5.4.0/LICENSE000066400000000000000000000020761340753361200175120ustar00rootroot00000000000000Copyright (c) 2009-2016 Dropbox Inc., http://www.dropbox.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. dropbox-sdk-go-unofficial-5.4.0/README.md000066400000000000000000000122231340753361200177570ustar00rootroot00000000000000# 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) An **UNOFFICIAL** Go SDK for integrating with the Dropbox API v2. Tested with Go 1.5+ :warning: WARNING: This SDK is **NOT yet official**. What does this mean? * There is no formal Dropbox [support](https://www.dropbox.com/developers/support) for this SDK at this point * Bugs may or may not get fixed * Not all SDK features may be implemented and implemented features may be buggy or incorrect ### Uh OK, so why are you releasing this? * the SDK, while unofficial, _is_ usable. See [dbxcli](https://github.com/dropbox/dbxcli) for an example application built using the SDK * we would like to get feedback from the community and evaluate the level of interest/enthusiasm before investing into official supporting one more SDK ## Installation ```sh $ go get github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/... ``` For most applications, you should just import the relevant namespace(s) only. The SDK exports the following sub-packages: * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth` * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files` * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing` * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team` * `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users` Additionally, the base `github.com/dropbox/dropbox-sdk-go-unofficial/dropbox` package exports some configuration and helper methods. ## Usage First, you need to [register a new "app"](https://dropbox.com/developers/apps) to start making API requests. Once you have created an app, you can either use the SDK via an access token (useful for testing) or via the regular OAuth2 flow (recommended for production). ### Using OAuth token 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. ```go import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users" func main() { config := dropbox.Config{ Token: token, LogLevel: dropbox.LogInfo, // if needed, set the desired logging level. Default is off } dbx := users.New(config) // start making API calls } ``` ### Using OAuth2 flow 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. Once you have the token, usage is same as above. ### Making API calls Each Dropbox API takes in a request type and returns a response type. For instance, [/users/get_account](https://www.dropbox.com/developers/documentation/http/documentation#users-get_account) takes as input a `GetAccountArg` and returns a `BasicAccount`. The typical pattern for making API calls is: * Instantiate the argument via the `New*` convenience functions in the SDK * Invoke the API * Process the response (or handle error, as below) Here's an example: ```go arg := users.NewGetAccountArg(accountId) if resp, err := dbx.GetAccount(arg); err != nil { return err } fmt.Printf("Name: %v", resp.Name) ``` ### Error Handling As described in the [API docs](https://www.dropbox.com/developers/documentation/http/documentation#error-handling), all HTTP errors _except_ 409 are returned as-is to the client (with a helpful text message where possible). In case of a 409, the SDK will return an endpoint-specific error as described in the API. This will be made available as `EndpointError` member in the error. ## Note on using the Teams API To use the Team API, you will need to create a Dropbox Business App. The OAuth token from this app will _only_ work for the Team API. Please read the [API docs](https://www.dropbox.com/developers/documentation/http/teams) carefully to appropriate secure your apps and tokens when using the Team API. ## Code Generation This SDK is automatically generated using the public [Dropbox API spec](https://github.com/dropbox/dropbox-api-spec) and [Stone](https://github.com/dropbox/stone). See this [README](https://github.com/dropbox/dropbox-sdk-go-unofficial/blob/master/generator/README.md) for more details on how code is generated. ## Caveats * To re-iterate, this is an **UNOFFICIAL** SDK and thus has no official support from Dropbox * Only supports the v2 API. Parts of the v2 API are still in beta, and thus subject to change * This SDK itself is in beta, and so interfaces may change at any point dropbox-sdk-go-unofficial-5.4.0/dropbox/000077500000000000000000000000001340753361200201555ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/async/000077500000000000000000000000001340753361200212725ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/async/types.go000066400000000000000000000114271340753361200227720ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package async : has no documentation (yet) package async import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // LaunchResultBase : Result returned by methods that launch an asynchronous // job. A method who may either launch an asynchronous job, or complete the // request synchronously, can use this union by extending it, and adding a // 'complete' field with the type of the synchronous response. See // `LaunchEmptyResult` for an example. type LaunchResultBase struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` } // Valid tag values for LaunchResultBase const ( LaunchResultBaseAsyncJobId = "async_job_id" ) // UnmarshalJSON deserializes into a LaunchResultBase instance func (u *LaunchResultBase) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } } return nil } // LaunchEmptyResult : Result returned by methods that may either launch an // asynchronous job or complete synchronously. Upon synchronous completion of // the job, no additional information is returned. type LaunchEmptyResult struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` } // Valid tag values for LaunchEmptyResult const ( LaunchEmptyResultAsyncJobId = "async_job_id" LaunchEmptyResultComplete = "complete" ) // UnmarshalJSON deserializes into a LaunchEmptyResult instance func (u *LaunchEmptyResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } } return nil } // PollArg : Arguments for methods that poll the status of an asynchronous job. type PollArg struct { // AsyncJobId : Id of the asynchronous job. This is the value of a response // returned from the method that launched the job. AsyncJobId string `json:"async_job_id"` } // NewPollArg returns a new PollArg instance func NewPollArg(AsyncJobId string) *PollArg { s := new(PollArg) s.AsyncJobId = AsyncJobId return s } // PollResultBase : Result returned by methods that poll for the status of an // asynchronous job. Unions that extend this union should add a 'complete' field // with a type of the information returned upon job completion. See // `PollEmptyResult` for an example. type PollResultBase struct { dropbox.Tagged } // Valid tag values for PollResultBase const ( PollResultBaseInProgress = "in_progress" ) // PollEmptyResult : Result returned by methods that poll for the status of an // asynchronous job. Upon completion of the job, no additional information is // returned. type PollEmptyResult struct { dropbox.Tagged } // Valid tag values for PollEmptyResult const ( PollEmptyResultInProgress = "in_progress" PollEmptyResultComplete = "complete" ) // PollError : Error returned by methods for polling the status of asynchronous // job. type PollError struct { dropbox.Tagged } // Valid tag values for PollError const ( PollErrorInvalidAsyncJobId = "invalid_async_job_id" PollErrorInternalError = "internal_error" PollErrorOther = "other" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/auth/000077500000000000000000000000001340753361200211165ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/auth/client.go000066400000000000000000000104561340753361200227310ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package auth import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // Client interface describes all routes in this namespace type Client interface { // TokenFromOauth1 : Creates an OAuth 2.0 access token from the supplied // OAuth 1.0 access token. TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) // TokenRevoke : Disables the access token used to authenticate the call. TokenRevoke() (err error) } type apiImpl dropbox.Context //TokenFromOauth1APIError is an error-wrapper for the token/from_oauth1 route type TokenFromOauth1APIError struct { dropbox.APIError EndpointError *TokenFromOAuth1Error `json:"error"` } func (dbx *apiImpl) TokenFromOauth1(arg *TokenFromOAuth1Arg) (res *TokenFromOAuth1Result, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "auth", "token/from_oauth1", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TokenFromOauth1APIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TokenRevokeAPIError is an error-wrapper for the token/revoke route type TokenRevokeAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) TokenRevoke() (err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "auth", "token/revoke", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError TokenRevokeAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/auth/sdk.go000066400000000000000000000034701340753361200222320ustar00rootroot00000000000000package auth import ( "encoding/json" "mime" "net/http" "strconv" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // AuthAPIError wraps AuthError type AuthAPIError struct { dropbox.APIError AuthError *AuthError `json:"error"` } // AccessAPIError wraps AccessError type AccessAPIError struct { dropbox.APIError AccessError *AccessError `json:"error"` } // RateLimitAPIError wraps RateLimitError type RateLimitAPIError struct { dropbox.APIError RateLimitError *RateLimitError `json:"error"` } // HandleCommonAuthErrors handles common authentication errors func HandleCommonAuthErrors(c dropbox.Config, resp *http.Response, body []byte) error { switch resp.StatusCode { case http.StatusUnauthorized: var apiError AuthAPIError if err := json.Unmarshal(body, &apiError); err != nil { c.LogDebug("Error unmarshaling '%s' into JSON", body) return err } return apiError case http.StatusForbidden: var apiError AccessAPIError if err := json.Unmarshal(body, &apiError); err != nil { c.LogDebug("Error unmarshaling '%s' into JSON", body) return err } return apiError case http.StatusTooManyRequests: var apiError RateLimitAPIError // Check content-type contentType, _, _ := mime.ParseMediaType(resp.Header.Get("content-type")) if contentType == "application/json" { if err := json.Unmarshal(body, &apiError); err != nil { c.LogDebug("Error unmarshaling '%s' into JSON", body) return err } } else { // assume plain text apiError.ErrorSummary = string(body) reason := RateLimitReason{dropbox.Tagged{Tag: RateLimitReasonTooManyRequests}} apiError.RateLimitError = NewRateLimitError(&reason) timeout, _ := strconv.ParseInt(resp.Header.Get("retry-after"), 10, 64) apiError.RateLimitError.RetryAfter = uint64(timeout) } return apiError default: return nil } } dropbox-sdk-go-unofficial-5.4.0/dropbox/auth/types.go000066400000000000000000000136571340753361200226250ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package auth : has no documentation (yet) package auth import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // AccessError : Error occurred because the account doesn't have permission to // access the resource. type AccessError struct { dropbox.Tagged // InvalidAccountType : Current account type cannot access the resource. InvalidAccountType *InvalidAccountTypeError `json:"invalid_account_type,omitempty"` // PaperAccessDenied : Current account cannot access Paper. PaperAccessDenied *PaperAccessError `json:"paper_access_denied,omitempty"` } // Valid tag values for AccessError const ( AccessErrorInvalidAccountType = "invalid_account_type" AccessErrorPaperAccessDenied = "paper_access_denied" AccessErrorOther = "other" ) // UnmarshalJSON deserializes into a AccessError instance func (u *AccessError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // InvalidAccountType : Current account type cannot access the resource. InvalidAccountType json.RawMessage `json:"invalid_account_type,omitempty"` // PaperAccessDenied : Current account cannot access Paper. PaperAccessDenied json.RawMessage `json:"paper_access_denied,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "invalid_account_type": err = json.Unmarshal(w.InvalidAccountType, &u.InvalidAccountType) if err != nil { return err } case "paper_access_denied": err = json.Unmarshal(w.PaperAccessDenied, &u.PaperAccessDenied) if err != nil { return err } } return nil } // AuthError : Errors occurred during authentication. type AuthError struct { dropbox.Tagged } // Valid tag values for AuthError const ( AuthErrorInvalidAccessToken = "invalid_access_token" AuthErrorInvalidSelectUser = "invalid_select_user" AuthErrorInvalidSelectAdmin = "invalid_select_admin" AuthErrorUserSuspended = "user_suspended" AuthErrorExpiredAccessToken = "expired_access_token" AuthErrorOther = "other" ) // InvalidAccountTypeError : has no documentation (yet) type InvalidAccountTypeError struct { dropbox.Tagged } // Valid tag values for InvalidAccountTypeError const ( InvalidAccountTypeErrorEndpoint = "endpoint" InvalidAccountTypeErrorFeature = "feature" InvalidAccountTypeErrorOther = "other" ) // PaperAccessError : has no documentation (yet) type PaperAccessError struct { dropbox.Tagged } // Valid tag values for PaperAccessError const ( PaperAccessErrorPaperDisabled = "paper_disabled" PaperAccessErrorNotPaperUser = "not_paper_user" PaperAccessErrorOther = "other" ) // RateLimitError : Error occurred because the app is being rate limited. type RateLimitError struct { // Reason : The reason why the app is being rate limited. Reason *RateLimitReason `json:"reason"` // RetryAfter : The number of seconds that the app should wait before making // another request. RetryAfter uint64 `json:"retry_after"` } // NewRateLimitError returns a new RateLimitError instance func NewRateLimitError(Reason *RateLimitReason) *RateLimitError { s := new(RateLimitError) s.Reason = Reason s.RetryAfter = 1 return s } // RateLimitReason : has no documentation (yet) type RateLimitReason struct { dropbox.Tagged } // Valid tag values for RateLimitReason const ( RateLimitReasonTooManyRequests = "too_many_requests" RateLimitReasonTooManyWriteOperations = "too_many_write_operations" RateLimitReasonOther = "other" ) // TokenFromOAuth1Arg : has no documentation (yet) type TokenFromOAuth1Arg struct { // Oauth1Token : The supplied OAuth 1.0 access token. Oauth1Token string `json:"oauth1_token"` // Oauth1TokenSecret : The token secret associated with the supplied access // token. Oauth1TokenSecret string `json:"oauth1_token_secret"` } // NewTokenFromOAuth1Arg returns a new TokenFromOAuth1Arg instance func NewTokenFromOAuth1Arg(Oauth1Token string, Oauth1TokenSecret string) *TokenFromOAuth1Arg { s := new(TokenFromOAuth1Arg) s.Oauth1Token = Oauth1Token s.Oauth1TokenSecret = Oauth1TokenSecret return s } // TokenFromOAuth1Error : has no documentation (yet) type TokenFromOAuth1Error struct { dropbox.Tagged } // Valid tag values for TokenFromOAuth1Error const ( TokenFromOAuth1ErrorInvalidOauth1TokenInfo = "invalid_oauth1_token_info" TokenFromOAuth1ErrorAppIdMismatch = "app_id_mismatch" TokenFromOAuth1ErrorOther = "other" ) // TokenFromOAuth1Result : has no documentation (yet) type TokenFromOAuth1Result struct { // Oauth2Token : The OAuth 2.0 token generated from the supplied OAuth 1.0 // token. Oauth2Token string `json:"oauth2_token"` } // NewTokenFromOAuth1Result returns a new TokenFromOAuth1Result instance func NewTokenFromOAuth1Result(Oauth2Token string) *TokenFromOAuth1Result { s := new(TokenFromOAuth1Result) s.Oauth2Token = Oauth2Token return s } dropbox-sdk-go-unofficial-5.4.0/dropbox/common/000077500000000000000000000000001340753361200214455ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/common/types.go000066400000000000000000000150331340753361200231420ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package common : has no documentation (yet) package common import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // PathRoot : has no documentation (yet) type PathRoot struct { dropbox.Tagged // Root : Paths are relative to the authenticating user's root namespace // (This results in `PathRootError.invalid_root` if the user's root // namespace has changed.). Root string `json:"root,omitempty"` // NamespaceId : Paths are relative to given namespace id (This results in // `PathRootError.no_permission` if you don't have access to this // namespace.). NamespaceId string `json:"namespace_id,omitempty"` } // Valid tag values for PathRoot const ( PathRootHome = "home" PathRootRoot = "root" PathRootNamespaceId = "namespace_id" PathRootOther = "other" ) // UnmarshalJSON deserializes into a PathRoot instance func (u *PathRoot) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "root": err = json.Unmarshal(body, &u.Root) if err != nil { return err } case "namespace_id": err = json.Unmarshal(body, &u.NamespaceId) if err != nil { return err } } return nil } // PathRootError : has no documentation (yet) type PathRootError struct { dropbox.Tagged // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header is // not valid. The value of this error is use's latest root info. InvalidRoot IsRootInfo `json:"invalid_root,omitempty"` } // Valid tag values for PathRootError const ( PathRootErrorInvalidRoot = "invalid_root" PathRootErrorNoPermission = "no_permission" PathRootErrorOther = "other" ) // UnmarshalJSON deserializes into a PathRootError instance func (u *PathRootError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // InvalidRoot : The root namespace id in Dropbox-API-Path-Root header // is not valid. The value of this error is use's latest root info. InvalidRoot json.RawMessage `json:"invalid_root,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "invalid_root": u.InvalidRoot, err = IsRootInfoFromJSON(body) if err != nil { return err } } return nil } // RootInfo : Information about current user's root. type RootInfo struct { // RootNamespaceId : The namespace ID for user's root namespace. It will be // the namespace ID of the shared team root if the user is member of a team // with a separate team root. Otherwise it will be same as // `RootInfo.home_namespace_id`. RootNamespaceId string `json:"root_namespace_id"` // HomeNamespaceId : The namespace ID for user's home namespace. HomeNamespaceId string `json:"home_namespace_id"` } // NewRootInfo returns a new RootInfo instance func NewRootInfo(RootNamespaceId string, HomeNamespaceId string) *RootInfo { s := new(RootInfo) s.RootNamespaceId = RootNamespaceId s.HomeNamespaceId = HomeNamespaceId return s } // IsRootInfo is the interface type for RootInfo and its subtypes type IsRootInfo interface { IsRootInfo() } // IsRootInfo implements the IsRootInfo interface func (u *RootInfo) IsRootInfo() {} type rootInfoUnion struct { dropbox.Tagged // Team : has no documentation (yet) Team *TeamRootInfo `json:"team,omitempty"` // User : has no documentation (yet) User *UserRootInfo `json:"user,omitempty"` } // Valid tag values for RootInfo const ( RootInfoTeam = "team" RootInfoUser = "user" ) // UnmarshalJSON deserializes into a rootInfoUnion instance func (u *rootInfoUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Team : has no documentation (yet) Team json.RawMessage `json:"team,omitempty"` // User : has no documentation (yet) User json.RawMessage `json:"user,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team": err = json.Unmarshal(body, &u.Team) if err != nil { return err } case "user": err = json.Unmarshal(body, &u.User) if err != nil { return err } } return nil } // IsRootInfoFromJSON converts JSON to a concrete IsRootInfo instance func IsRootInfoFromJSON(data []byte) (IsRootInfo, error) { var t rootInfoUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "team": return t.Team, nil case "user": return t.User, nil } return nil, nil } // TeamRootInfo : Root info when user is member of a team with a separate root // namespace ID. type TeamRootInfo struct { RootInfo // HomePath : The path for user's home directory under the shared team root. HomePath string `json:"home_path"` } // NewTeamRootInfo returns a new TeamRootInfo instance func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo { s := new(TeamRootInfo) s.RootNamespaceId = RootNamespaceId s.HomeNamespaceId = HomeNamespaceId s.HomePath = HomePath return s } // UserRootInfo : Root info when user is not member of a team or the user is a // member of a team and the team does not have a separate root namespace. type UserRootInfo struct { RootInfo } // NewUserRootInfo returns a new UserRootInfo instance func NewUserRootInfo(RootNamespaceId string, HomeNamespaceId string) *UserRootInfo { s := new(UserRootInfo) s.RootNamespaceId = RootNamespaceId s.HomeNamespaceId = HomeNamespaceId return s } dropbox-sdk-go-unofficial-5.4.0/dropbox/contacts/000077500000000000000000000000001340753361200217735ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/contacts/client.go000066400000000000000000000107751340753361200236120ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package contacts import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // DeleteManualContacts : Removes all manually added contacts. You'll still // keep contacts who are on your team or who you imported. New contacts will // be added when you share. DeleteManualContacts() (err error) // DeleteManualContactsBatch : Removes manually added contacts from the // given list. DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error) } type apiImpl dropbox.Context //DeleteManualContactsAPIError is an error-wrapper for the delete_manual_contacts route type DeleteManualContactsAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) DeleteManualContacts() (err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "contacts", "delete_manual_contacts", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DeleteManualContactsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DeleteManualContactsBatchAPIError is an error-wrapper for the delete_manual_contacts_batch route type DeleteManualContactsBatchAPIError struct { dropbox.APIError EndpointError *DeleteManualContactsError `json:"error"` } func (dbx *apiImpl) DeleteManualContactsBatch(arg *DeleteManualContactsArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "contacts", "delete_manual_contacts_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DeleteManualContactsBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/contacts/types.go000066400000000000000000000055131340753361200234720ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package contacts : has no documentation (yet) package contacts import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // DeleteManualContactsArg : has no documentation (yet) type DeleteManualContactsArg struct { // EmailAddresses : List of manually added contacts to be deleted. EmailAddresses []string `json:"email_addresses"` } // NewDeleteManualContactsArg returns a new DeleteManualContactsArg instance func NewDeleteManualContactsArg(EmailAddresses []string) *DeleteManualContactsArg { s := new(DeleteManualContactsArg) s.EmailAddresses = EmailAddresses return s } // DeleteManualContactsError : has no documentation (yet) type DeleteManualContactsError struct { dropbox.Tagged // ContactsNotFound : Can't delete contacts from this list. Make sure the // list only has manually added contacts. The deletion was cancelled. ContactsNotFound []string `json:"contacts_not_found,omitempty"` } // Valid tag values for DeleteManualContactsError const ( DeleteManualContactsErrorContactsNotFound = "contacts_not_found" DeleteManualContactsErrorOther = "other" ) // UnmarshalJSON deserializes into a DeleteManualContactsError instance func (u *DeleteManualContactsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // ContactsNotFound : Can't delete contacts from this list. Make sure // the list only has manually added contacts. The deletion was // cancelled. ContactsNotFound json.RawMessage `json:"contacts_not_found,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "contacts_not_found": err = json.Unmarshal(body, &u.ContactsNotFound) if err != nil { return err } } return nil } dropbox-sdk-go-unofficial-5.4.0/dropbox/file_properties/000077500000000000000000000000001340753361200233505ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/file_properties/client.go000066400000000000000000000677131340753361200251730ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package file_properties import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // PropertiesAdd : Add property groups to a Dropbox file. See // `templatesAddForUser` or `templatesAddForTeam` to create new templates. PropertiesAdd(arg *AddPropertiesArg) (err error) // PropertiesOverwrite : Overwrite property groups associated with a file. // This endpoint should be used instead of `propertiesUpdate` when property // groups are being updated via a "snapshot" instead of via a "delta". In // other words, this endpoint will delete all omitted fields from a property // group, whereas `propertiesUpdate` will only delete fields that are // explicitly marked for deletion. PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) // PropertiesRemove : Permanently removes the specified property group from // the file. To remove specific property field key value pairs, see // `propertiesUpdate`. To update a template, see `templatesUpdateForUser` or // `templatesUpdateForTeam`. To remove a template, see // `templatesRemoveForUser` or `templatesRemoveForTeam`. PropertiesRemove(arg *RemovePropertiesArg) (err error) // PropertiesSearch : Search across property templates for particular // property field values. PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) // PropertiesSearchContinue : Once a cursor has been retrieved from // `propertiesSearch`, use this to paginate through all search results. PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) // PropertiesUpdate : Add, update or remove properties associated with the // supplied file and templates. This endpoint should be used instead of // `propertiesOverwrite` when property groups are being updated via a // "delta" instead of via a "snapshot" . In other words, this endpoint will // not delete any omitted fields from a property group, whereas // `propertiesOverwrite` will delete any fields that are omitted from a // property group. PropertiesUpdate(arg *UpdatePropertiesArg) (err error) // TemplatesAddForTeam : Add a template associated with a team. See // `propertiesAdd` to add properties to a file or folder. Note: this // endpoint will create team-owned templates. TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) // TemplatesAddForUser : Add a template associated with a user. See // `propertiesAdd` to add properties to a file. This endpoint can't be // called on a team member or admin's behalf. TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) // TemplatesGetForTeam : Get the schema for a specified template. TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) // TemplatesGetForUser : Get the schema for a specified template. This // endpoint can't be called on a team member or admin's behalf. TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) // TemplatesListForTeam : Get the template identifiers for a team. To get // the schema of each template use `templatesGetForTeam`. TemplatesListForTeam() (res *ListTemplateResult, err error) // TemplatesListForUser : Get the template identifiers for a team. To get // the schema of each template use `templatesGetForUser`. This endpoint // can't be called on a team member or admin's behalf. TemplatesListForUser() (res *ListTemplateResult, err error) // TemplatesRemoveForTeam : Permanently removes the specified template // created from `templatesAddForUser`. All properties associated with the // template will also be removed. This action cannot be undone. TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) // TemplatesRemoveForUser : Permanently removes the specified template // created from `templatesAddForUser`. All properties associated with the // template will also be removed. This action cannot be undone. TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) // TemplatesUpdateForTeam : Update a template associated with a team. This // route can update the template name, the template description and add // optional properties to templates. TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) // TemplatesUpdateForUser : Update a template associated with a user. This // route can update the template name, the template description and add // optional properties to templates. This endpoint can't be called on a team // member or admin's behalf. TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) } type apiImpl dropbox.Context //PropertiesAddAPIError is an error-wrapper for the properties/add route type PropertiesAddAPIError struct { dropbox.APIError EndpointError *AddPropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesAdd(arg *AddPropertiesArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route type PropertiesOverwriteAPIError struct { dropbox.APIError EndpointError *InvalidPropertyGroupError `json:"error"` } func (dbx *apiImpl) PropertiesOverwrite(arg *OverwritePropertyGroupArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/overwrite", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesOverwriteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route type PropertiesRemoveAPIError struct { dropbox.APIError EndpointError *RemovePropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesRemove(arg *RemovePropertiesArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesSearchAPIError is an error-wrapper for the properties/search route type PropertiesSearchAPIError struct { dropbox.APIError EndpointError *PropertiesSearchError `json:"error"` } func (dbx *apiImpl) PropertiesSearch(arg *PropertiesSearchArg) (res *PropertiesSearchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/search", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesSearchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesSearchContinueAPIError is an error-wrapper for the properties/search/continue route type PropertiesSearchContinueAPIError struct { dropbox.APIError EndpointError *PropertiesSearchContinueError `json:"error"` } func (dbx *apiImpl) PropertiesSearchContinue(arg *PropertiesSearchContinueArg) (res *PropertiesSearchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/search/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesSearchContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesUpdateAPIError is an error-wrapper for the properties/update route type PropertiesUpdateAPIError struct { dropbox.APIError EndpointError *UpdatePropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesUpdate(arg *UpdatePropertiesArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "properties/update", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesUpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesAddForTeamAPIError is an error-wrapper for the templates/add_for_team route type TemplatesAddForTeamAPIError struct { dropbox.APIError EndpointError *ModifyTemplateError `json:"error"` } func (dbx *apiImpl) TemplatesAddForTeam(arg *AddTemplateArg) (res *AddTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/add_for_team", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesAddForTeamAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesAddForUserAPIError is an error-wrapper for the templates/add_for_user route type TemplatesAddForUserAPIError struct { dropbox.APIError EndpointError *ModifyTemplateError `json:"error"` } func (dbx *apiImpl) TemplatesAddForUser(arg *AddTemplateArg) (res *AddTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/add_for_user", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesAddForUserAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesGetForTeamAPIError is an error-wrapper for the templates/get_for_team route type TemplatesGetForTeamAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesGetForTeam(arg *GetTemplateArg) (res *GetTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/get_for_team", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesGetForTeamAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesGetForUserAPIError is an error-wrapper for the templates/get_for_user route type TemplatesGetForUserAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesGetForUser(arg *GetTemplateArg) (res *GetTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/get_for_user", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesGetForUserAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesListForTeamAPIError is an error-wrapper for the templates/list_for_team route type TemplatesListForTeamAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesListForTeam() (res *ListTemplateResult, err error) { cli := dbx.Client headers := map[string]string{} req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/list_for_team", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesListForTeamAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesListForUserAPIError is an error-wrapper for the templates/list_for_user route type TemplatesListForUserAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesListForUser() (res *ListTemplateResult, err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/list_for_user", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesListForUserAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesRemoveForTeamAPIError is an error-wrapper for the templates/remove_for_team route type TemplatesRemoveForTeamAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesRemoveForTeam(arg *RemoveTemplateArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_team", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesRemoveForTeamAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesRemoveForUserAPIError is an error-wrapper for the templates/remove_for_user route type TemplatesRemoveForUserAPIError struct { dropbox.APIError EndpointError *TemplateError `json:"error"` } func (dbx *apiImpl) TemplatesRemoveForUser(arg *RemoveTemplateArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/remove_for_user", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesRemoveForUserAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesUpdateForTeamAPIError is an error-wrapper for the templates/update_for_team route type TemplatesUpdateForTeamAPIError struct { dropbox.APIError EndpointError *ModifyTemplateError `json:"error"` } func (dbx *apiImpl) TemplatesUpdateForTeam(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/update_for_team", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesUpdateForTeamAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TemplatesUpdateForUserAPIError is an error-wrapper for the templates/update_for_user route type TemplatesUpdateForUserAPIError struct { dropbox.APIError EndpointError *ModifyTemplateError `json:"error"` } func (dbx *apiImpl) TemplatesUpdateForUser(arg *UpdateTemplateArg) (res *UpdateTemplateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_properties", "templates/update_for_user", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TemplatesUpdateForUserAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/file_properties/types.go000066400000000000000000000776571340753361200250710ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package file_properties : This namespace contains helpers for property and // template metadata endpoints. These endpoints enable you to tag arbitrary // key/value data to Dropbox files. The most basic unit in this namespace is // the `PropertyField`. These fields encapsulate the actual key/value data. // Fields are added to a Dropbox file using a `PropertyGroup`. Property groups // contain a reference to a Dropbox file and a `PropertyGroupTemplate`. Property // groups are uniquely identified by the combination of their associated Dropbox // file and template. The `PropertyGroupTemplate` is a way of restricting the // possible key names and value types of the data within a property group. The // possible key names and value types are explicitly enumerated using // `PropertyFieldTemplate` objects. You can think of a property group template // as a class definition for a particular key/value metadata object, and the // property groups themselves as the instantiations of these objects. Templates // are owned either by a user/app pair or team/app pair. Templates and their // associated properties can't be accessed by any app other than the app that // created them, and even then, only when the app is linked with the owner of // the template (either a user or team). User-owned templates are accessed via // the user-auth file_properties/templates/*_for_user endpoints, while // team-owned templates are accessed via the team-auth // file_properties/templates/*_for_team endpoints. Properties associated with // either type of template can be accessed via the user-auth properties/* // endpoints. Finally, properties can be accessed from a number of endpoints // that return metadata, including `files/get_metadata`, and // `files/list_folder`. Properties can also be added during upload, using // `files/upload`. package file_properties import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // AddPropertiesArg : has no documentation (yet) type AddPropertiesArg struct { // Path : A unique identifier for the file or folder. Path string `json:"path"` // PropertyGroups : The property groups which are to be added to a Dropbox // file. PropertyGroups []*PropertyGroup `json:"property_groups"` } // NewAddPropertiesArg returns a new AddPropertiesArg instance func NewAddPropertiesArg(Path string, PropertyGroups []*PropertyGroup) *AddPropertiesArg { s := new(AddPropertiesArg) s.Path = Path s.PropertyGroups = PropertyGroups return s } // TemplateError : has no documentation (yet) type TemplateError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` } // Valid tag values for TemplateError const ( TemplateErrorTemplateNotFound = "template_not_found" TemplateErrorRestrictedContent = "restricted_content" TemplateErrorOther = "other" ) // UnmarshalJSON deserializes into a TemplateError instance func (u *TemplateError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } } return nil } // PropertiesError : has no documentation (yet) type PropertiesError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for PropertiesError const ( PropertiesErrorTemplateNotFound = "template_not_found" PropertiesErrorRestrictedContent = "restricted_content" PropertiesErrorOther = "other" PropertiesErrorPath = "path" PropertiesErrorUnsupportedFolder = "unsupported_folder" ) // UnmarshalJSON deserializes into a PropertiesError instance func (u *PropertiesError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // InvalidPropertyGroupError : has no documentation (yet) type InvalidPropertyGroupError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for InvalidPropertyGroupError const ( InvalidPropertyGroupErrorTemplateNotFound = "template_not_found" InvalidPropertyGroupErrorRestrictedContent = "restricted_content" InvalidPropertyGroupErrorOther = "other" InvalidPropertyGroupErrorPath = "path" InvalidPropertyGroupErrorUnsupportedFolder = "unsupported_folder" InvalidPropertyGroupErrorPropertyFieldTooLarge = "property_field_too_large" InvalidPropertyGroupErrorDoesNotFitTemplate = "does_not_fit_template" ) // UnmarshalJSON deserializes into a InvalidPropertyGroupError instance func (u *InvalidPropertyGroupError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // AddPropertiesError : has no documentation (yet) type AddPropertiesError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for AddPropertiesError const ( AddPropertiesErrorTemplateNotFound = "template_not_found" AddPropertiesErrorRestrictedContent = "restricted_content" AddPropertiesErrorOther = "other" AddPropertiesErrorPath = "path" AddPropertiesErrorUnsupportedFolder = "unsupported_folder" AddPropertiesErrorPropertyFieldTooLarge = "property_field_too_large" AddPropertiesErrorDoesNotFitTemplate = "does_not_fit_template" AddPropertiesErrorPropertyGroupAlreadyExists = "property_group_already_exists" ) // UnmarshalJSON deserializes into a AddPropertiesError instance func (u *AddPropertiesError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // PropertyGroupTemplate : Defines how a property group may be structured. type PropertyGroupTemplate struct { // Name : Display name for the template. Template names can be up to 256 // bytes. Name string `json:"name"` // Description : Description for the template. Template descriptions can be // up to 1024 bytes. Description string `json:"description"` // Fields : Definitions of the property fields associated with this // template. There can be up to 32 properties in a single template. Fields []*PropertyFieldTemplate `json:"fields"` } // NewPropertyGroupTemplate returns a new PropertyGroupTemplate instance func NewPropertyGroupTemplate(Name string, Description string, Fields []*PropertyFieldTemplate) *PropertyGroupTemplate { s := new(PropertyGroupTemplate) s.Name = Name s.Description = Description s.Fields = Fields return s } // AddTemplateArg : has no documentation (yet) type AddTemplateArg struct { PropertyGroupTemplate } // NewAddTemplateArg returns a new AddTemplateArg instance func NewAddTemplateArg(Name string, Description string, Fields []*PropertyFieldTemplate) *AddTemplateArg { s := new(AddTemplateArg) s.Name = Name s.Description = Description s.Fields = Fields return s } // AddTemplateResult : has no documentation (yet) type AddTemplateResult struct { // TemplateId : An identifier for template added by See // `templatesAddForUser` or `templatesAddForTeam`. TemplateId string `json:"template_id"` } // NewAddTemplateResult returns a new AddTemplateResult instance func NewAddTemplateResult(TemplateId string) *AddTemplateResult { s := new(AddTemplateResult) s.TemplateId = TemplateId return s } // GetTemplateArg : has no documentation (yet) type GetTemplateArg struct { // TemplateId : An identifier for template added by route See // `templatesAddForUser` or `templatesAddForTeam`. TemplateId string `json:"template_id"` } // NewGetTemplateArg returns a new GetTemplateArg instance func NewGetTemplateArg(TemplateId string) *GetTemplateArg { s := new(GetTemplateArg) s.TemplateId = TemplateId return s } // GetTemplateResult : has no documentation (yet) type GetTemplateResult struct { PropertyGroupTemplate } // NewGetTemplateResult returns a new GetTemplateResult instance func NewGetTemplateResult(Name string, Description string, Fields []*PropertyFieldTemplate) *GetTemplateResult { s := new(GetTemplateResult) s.Name = Name s.Description = Description s.Fields = Fields return s } // ListTemplateResult : has no documentation (yet) type ListTemplateResult struct { // TemplateIds : List of identifiers for templates added by See // `templatesAddForUser` or `templatesAddForTeam`. TemplateIds []string `json:"template_ids"` } // NewListTemplateResult returns a new ListTemplateResult instance func NewListTemplateResult(TemplateIds []string) *ListTemplateResult { s := new(ListTemplateResult) s.TemplateIds = TemplateIds return s } // LogicalOperator : Logical operator to join search queries together. type LogicalOperator struct { dropbox.Tagged } // Valid tag values for LogicalOperator const ( LogicalOperatorOrOperator = "or_operator" LogicalOperatorOther = "other" ) // LookUpPropertiesError : has no documentation (yet) type LookUpPropertiesError struct { dropbox.Tagged } // Valid tag values for LookUpPropertiesError const ( LookUpPropertiesErrorPropertyGroupNotFound = "property_group_not_found" LookUpPropertiesErrorOther = "other" ) // LookupError : has no documentation (yet) type LookupError struct { dropbox.Tagged // MalformedPath : has no documentation (yet) MalformedPath string `json:"malformed_path,omitempty"` } // Valid tag values for LookupError const ( LookupErrorMalformedPath = "malformed_path" LookupErrorNotFound = "not_found" LookupErrorNotFile = "not_file" LookupErrorNotFolder = "not_folder" LookupErrorRestrictedContent = "restricted_content" LookupErrorOther = "other" ) // UnmarshalJSON deserializes into a LookupError instance func (u *LookupError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "malformed_path": err = json.Unmarshal(body, &u.MalformedPath) if err != nil { return err } } return nil } // ModifyTemplateError : has no documentation (yet) type ModifyTemplateError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` } // Valid tag values for ModifyTemplateError const ( ModifyTemplateErrorTemplateNotFound = "template_not_found" ModifyTemplateErrorRestrictedContent = "restricted_content" ModifyTemplateErrorOther = "other" ModifyTemplateErrorConflictingPropertyNames = "conflicting_property_names" ModifyTemplateErrorTooManyProperties = "too_many_properties" ModifyTemplateErrorTooManyTemplates = "too_many_templates" ModifyTemplateErrorTemplateAttributeTooLarge = "template_attribute_too_large" ) // UnmarshalJSON deserializes into a ModifyTemplateError instance func (u *ModifyTemplateError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } } return nil } // OverwritePropertyGroupArg : has no documentation (yet) type OverwritePropertyGroupArg struct { // Path : A unique identifier for the file or folder. Path string `json:"path"` // PropertyGroups : The property groups "snapshot" updates to force apply. PropertyGroups []*PropertyGroup `json:"property_groups"` } // NewOverwritePropertyGroupArg returns a new OverwritePropertyGroupArg instance func NewOverwritePropertyGroupArg(Path string, PropertyGroups []*PropertyGroup) *OverwritePropertyGroupArg { s := new(OverwritePropertyGroupArg) s.Path = Path s.PropertyGroups = PropertyGroups return s } // PropertiesSearchArg : has no documentation (yet) type PropertiesSearchArg struct { // Queries : Queries to search. Queries []*PropertiesSearchQuery `json:"queries"` // TemplateFilter : Filter results to contain only properties associated // with these template IDs. TemplateFilter *TemplateFilter `json:"template_filter"` } // NewPropertiesSearchArg returns a new PropertiesSearchArg instance func NewPropertiesSearchArg(Queries []*PropertiesSearchQuery) *PropertiesSearchArg { s := new(PropertiesSearchArg) s.Queries = Queries s.TemplateFilter = &TemplateFilter{Tagged: dropbox.Tagged{"filter_none"}} return s } // PropertiesSearchContinueArg : has no documentation (yet) type PropertiesSearchContinueArg struct { // Cursor : The cursor returned by your last call to `propertiesSearch` or // `propertiesSearchContinue`. Cursor string `json:"cursor"` } // NewPropertiesSearchContinueArg returns a new PropertiesSearchContinueArg instance func NewPropertiesSearchContinueArg(Cursor string) *PropertiesSearchContinueArg { s := new(PropertiesSearchContinueArg) s.Cursor = Cursor return s } // PropertiesSearchContinueError : has no documentation (yet) type PropertiesSearchContinueError struct { dropbox.Tagged } // Valid tag values for PropertiesSearchContinueError const ( PropertiesSearchContinueErrorReset = "reset" PropertiesSearchContinueErrorOther = "other" ) // PropertiesSearchError : has no documentation (yet) type PropertiesSearchError struct { dropbox.Tagged // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"` } // Valid tag values for PropertiesSearchError const ( PropertiesSearchErrorPropertyGroupLookup = "property_group_lookup" PropertiesSearchErrorOther = "other" ) // UnmarshalJSON deserializes into a PropertiesSearchError instance func (u *PropertiesSearchError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "property_group_lookup": err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup) if err != nil { return err } } return nil } // PropertiesSearchMatch : has no documentation (yet) type PropertiesSearchMatch struct { // Id : The ID for the matched file or folder. Id string `json:"id"` // Path : The path for the matched file or folder. Path string `json:"path"` // IsDeleted : Whether the file or folder is deleted. IsDeleted bool `json:"is_deleted"` // PropertyGroups : List of custom property groups associated with the file. PropertyGroups []*PropertyGroup `json:"property_groups"` } // NewPropertiesSearchMatch returns a new PropertiesSearchMatch instance func NewPropertiesSearchMatch(Id string, Path string, IsDeleted bool, PropertyGroups []*PropertyGroup) *PropertiesSearchMatch { s := new(PropertiesSearchMatch) s.Id = Id s.Path = Path s.IsDeleted = IsDeleted s.PropertyGroups = PropertyGroups return s } // PropertiesSearchMode : has no documentation (yet) type PropertiesSearchMode struct { dropbox.Tagged // FieldName : Search for a value associated with this field name. FieldName string `json:"field_name,omitempty"` } // Valid tag values for PropertiesSearchMode const ( PropertiesSearchModeFieldName = "field_name" PropertiesSearchModeOther = "other" ) // UnmarshalJSON deserializes into a PropertiesSearchMode instance func (u *PropertiesSearchMode) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "field_name": err = json.Unmarshal(body, &u.FieldName) if err != nil { return err } } return nil } // PropertiesSearchQuery : has no documentation (yet) type PropertiesSearchQuery struct { // Query : The property field value for which to search across templates. Query string `json:"query"` // Mode : The mode with which to perform the search. Mode *PropertiesSearchMode `json:"mode"` // LogicalOperator : The logical operator with which to append the query. LogicalOperator *LogicalOperator `json:"logical_operator"` } // NewPropertiesSearchQuery returns a new PropertiesSearchQuery instance func NewPropertiesSearchQuery(Query string, Mode *PropertiesSearchMode) *PropertiesSearchQuery { s := new(PropertiesSearchQuery) s.Query = Query s.Mode = Mode s.LogicalOperator = &LogicalOperator{Tagged: dropbox.Tagged{"or_operator"}} return s } // PropertiesSearchResult : has no documentation (yet) type PropertiesSearchResult struct { // Matches : A list (possibly empty) of matches for the query. Matches []*PropertiesSearchMatch `json:"matches"` // Cursor : Pass the cursor into `propertiesSearchContinue` to continue to // receive search results. Cursor will be null when there are no more // results. Cursor string `json:"cursor,omitempty"` } // NewPropertiesSearchResult returns a new PropertiesSearchResult instance func NewPropertiesSearchResult(Matches []*PropertiesSearchMatch) *PropertiesSearchResult { s := new(PropertiesSearchResult) s.Matches = Matches return s } // PropertyField : Raw key/value data to be associated with a Dropbox file. // Property fields are added to Dropbox files as a `PropertyGroup`. type PropertyField struct { // Name : Key of the property field associated with a file and template. // Keys can be up to 256 bytes. Name string `json:"name"` // Value : Value of the property field associated with a file and template. // Values can be up to 1024 bytes. Value string `json:"value"` } // NewPropertyField returns a new PropertyField instance func NewPropertyField(Name string, Value string) *PropertyField { s := new(PropertyField) s.Name = Name s.Value = Value return s } // PropertyFieldTemplate : Defines how a single property field may be // structured. Used exclusively by `PropertyGroupTemplate`. type PropertyFieldTemplate struct { // Name : Key of the property field being described. Property field keys can // be up to 256 bytes. Name string `json:"name"` // Description : Description of the property field. Property field // descriptions can be up to 1024 bytes. Description string `json:"description"` // Type : Data type of the value of this property field. This type will be // enforced upon property creation and modifications. Type *PropertyType `json:"type"` } // NewPropertyFieldTemplate returns a new PropertyFieldTemplate instance func NewPropertyFieldTemplate(Name string, Description string, Type *PropertyType) *PropertyFieldTemplate { s := new(PropertyFieldTemplate) s.Name = Name s.Description = Description s.Type = Type return s } // PropertyGroup : A subset of the property fields described by the // corresponding `PropertyGroupTemplate`. Properties are always added to a // Dropbox file as a `PropertyGroup`. The possible key names and value types in // this group are defined by the corresponding `PropertyGroupTemplate`. type PropertyGroup struct { // TemplateId : A unique identifier for the associated template. TemplateId string `json:"template_id"` // Fields : The actual properties associated with the template. There can be // up to 32 property types per template. Fields []*PropertyField `json:"fields"` } // NewPropertyGroup returns a new PropertyGroup instance func NewPropertyGroup(TemplateId string, Fields []*PropertyField) *PropertyGroup { s := new(PropertyGroup) s.TemplateId = TemplateId s.Fields = Fields return s } // PropertyGroupUpdate : has no documentation (yet) type PropertyGroupUpdate struct { // TemplateId : A unique identifier for a property template. TemplateId string `json:"template_id"` // AddOrUpdateFields : Property fields to update. If the property field // already exists, it is updated. If the property field doesn't exist, the // property group is added. AddOrUpdateFields []*PropertyField `json:"add_or_update_fields,omitempty"` // RemoveFields : Property fields to remove (by name), provided they exist. RemoveFields []string `json:"remove_fields,omitempty"` } // NewPropertyGroupUpdate returns a new PropertyGroupUpdate instance func NewPropertyGroupUpdate(TemplateId string) *PropertyGroupUpdate { s := new(PropertyGroupUpdate) s.TemplateId = TemplateId return s } // PropertyType : Data type of the given property field added. type PropertyType struct { dropbox.Tagged } // Valid tag values for PropertyType const ( PropertyTypeString = "string" PropertyTypeOther = "other" ) // RemovePropertiesArg : has no documentation (yet) type RemovePropertiesArg struct { // Path : A unique identifier for the file or folder. Path string `json:"path"` // PropertyTemplateIds : A list of identifiers for a template created by // `templatesAddForUser` or `templatesAddForTeam`. PropertyTemplateIds []string `json:"property_template_ids"` } // NewRemovePropertiesArg returns a new RemovePropertiesArg instance func NewRemovePropertiesArg(Path string, PropertyTemplateIds []string) *RemovePropertiesArg { s := new(RemovePropertiesArg) s.Path = Path s.PropertyTemplateIds = PropertyTemplateIds return s } // RemovePropertiesError : has no documentation (yet) type RemovePropertiesError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"` } // Valid tag values for RemovePropertiesError const ( RemovePropertiesErrorTemplateNotFound = "template_not_found" RemovePropertiesErrorRestrictedContent = "restricted_content" RemovePropertiesErrorOther = "other" RemovePropertiesErrorPath = "path" RemovePropertiesErrorUnsupportedFolder = "unsupported_folder" RemovePropertiesErrorPropertyGroupLookup = "property_group_lookup" ) // UnmarshalJSON deserializes into a RemovePropertiesError instance func (u *RemovePropertiesError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } case "property_group_lookup": err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup) if err != nil { return err } } return nil } // RemoveTemplateArg : has no documentation (yet) type RemoveTemplateArg struct { // TemplateId : An identifier for a template created by // `templatesAddForUser` or `templatesAddForTeam`. TemplateId string `json:"template_id"` } // NewRemoveTemplateArg returns a new RemoveTemplateArg instance func NewRemoveTemplateArg(TemplateId string) *RemoveTemplateArg { s := new(RemoveTemplateArg) s.TemplateId = TemplateId return s } // TemplateFilterBase : has no documentation (yet) type TemplateFilterBase struct { dropbox.Tagged // FilterSome : Only templates with an ID in the supplied list will be // returned (a subset of templates will be returned). FilterSome []string `json:"filter_some,omitempty"` } // Valid tag values for TemplateFilterBase const ( TemplateFilterBaseFilterSome = "filter_some" TemplateFilterBaseOther = "other" ) // UnmarshalJSON deserializes into a TemplateFilterBase instance func (u *TemplateFilterBase) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // FilterSome : Only templates with an ID in the supplied list will be // returned (a subset of templates will be returned). FilterSome json.RawMessage `json:"filter_some,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "filter_some": err = json.Unmarshal(body, &u.FilterSome) if err != nil { return err } } return nil } // TemplateFilter : has no documentation (yet) type TemplateFilter struct { dropbox.Tagged // FilterSome : Only templates with an ID in the supplied list will be // returned (a subset of templates will be returned). FilterSome []string `json:"filter_some,omitempty"` } // Valid tag values for TemplateFilter const ( TemplateFilterFilterSome = "filter_some" TemplateFilterOther = "other" TemplateFilterFilterNone = "filter_none" ) // UnmarshalJSON deserializes into a TemplateFilter instance func (u *TemplateFilter) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // FilterSome : Only templates with an ID in the supplied list will be // returned (a subset of templates will be returned). FilterSome json.RawMessage `json:"filter_some,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "filter_some": err = json.Unmarshal(body, &u.FilterSome) if err != nil { return err } } return nil } // TemplateOwnerType : has no documentation (yet) type TemplateOwnerType struct { dropbox.Tagged } // Valid tag values for TemplateOwnerType const ( TemplateOwnerTypeUser = "user" TemplateOwnerTypeTeam = "team" TemplateOwnerTypeOther = "other" ) // UpdatePropertiesArg : has no documentation (yet) type UpdatePropertiesArg struct { // Path : A unique identifier for the file or folder. Path string `json:"path"` // UpdatePropertyGroups : The property groups "delta" updates to apply. UpdatePropertyGroups []*PropertyGroupUpdate `json:"update_property_groups"` } // NewUpdatePropertiesArg returns a new UpdatePropertiesArg instance func NewUpdatePropertiesArg(Path string, UpdatePropertyGroups []*PropertyGroupUpdate) *UpdatePropertiesArg { s := new(UpdatePropertiesArg) s.Path = Path s.UpdatePropertyGroups = UpdatePropertyGroups return s } // UpdatePropertiesError : has no documentation (yet) type UpdatePropertiesError struct { dropbox.Tagged // TemplateNotFound : Template does not exist for the given identifier. TemplateNotFound string `json:"template_not_found,omitempty"` // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup *LookUpPropertiesError `json:"property_group_lookup,omitempty"` } // Valid tag values for UpdatePropertiesError const ( UpdatePropertiesErrorTemplateNotFound = "template_not_found" UpdatePropertiesErrorRestrictedContent = "restricted_content" UpdatePropertiesErrorOther = "other" UpdatePropertiesErrorPath = "path" UpdatePropertiesErrorUnsupportedFolder = "unsupported_folder" UpdatePropertiesErrorPropertyFieldTooLarge = "property_field_too_large" UpdatePropertiesErrorDoesNotFitTemplate = "does_not_fit_template" UpdatePropertiesErrorPropertyGroupLookup = "property_group_lookup" ) // UnmarshalJSON deserializes into a UpdatePropertiesError instance func (u *UpdatePropertiesError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` // PropertyGroupLookup : has no documentation (yet) PropertyGroupLookup json.RawMessage `json:"property_group_lookup,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "template_not_found": err = json.Unmarshal(body, &u.TemplateNotFound) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } case "property_group_lookup": err = json.Unmarshal(w.PropertyGroupLookup, &u.PropertyGroupLookup) if err != nil { return err } } return nil } // UpdateTemplateArg : has no documentation (yet) type UpdateTemplateArg struct { // TemplateId : An identifier for template added by See // `templatesAddForUser` or `templatesAddForTeam`. TemplateId string `json:"template_id"` // Name : A display name for the template. template names can be up to 256 // bytes. Name string `json:"name,omitempty"` // Description : Description for the new template. Template descriptions can // be up to 1024 bytes. Description string `json:"description,omitempty"` // AddFields : Property field templates to be added to the group template. // There can be up to 32 properties in a single template. AddFields []*PropertyFieldTemplate `json:"add_fields,omitempty"` } // NewUpdateTemplateArg returns a new UpdateTemplateArg instance func NewUpdateTemplateArg(TemplateId string) *UpdateTemplateArg { s := new(UpdateTemplateArg) s.TemplateId = TemplateId return s } // UpdateTemplateResult : has no documentation (yet) type UpdateTemplateResult struct { // TemplateId : An identifier for template added by route See // `templatesAddForUser` or `templatesAddForTeam`. TemplateId string `json:"template_id"` } // NewUpdateTemplateResult returns a new UpdateTemplateResult instance func NewUpdateTemplateResult(TemplateId string) *UpdateTemplateResult { s := new(UpdateTemplateResult) s.TemplateId = TemplateId return s } dropbox-sdk-go-unofficial-5.4.0/dropbox/file_requests/000077500000000000000000000000001340753361200230275ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/file_requests/client.go000066400000000000000000000166171340753361200246470ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package file_requests import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // Create : Creates a file request for this user. Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) // Get : Returns the specified file request. Get(arg *GetFileRequestArgs) (res *FileRequest, err error) // List : Returns a list of file requests owned by this user. For apps with // the app folder permission, this will only return file requests with // destinations in the app folder. List() (res *ListFileRequestsResult, err error) // Update : Update a file request. Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) } type apiImpl dropbox.Context //CreateAPIError is an error-wrapper for the create route type CreateAPIError struct { dropbox.APIError EndpointError *CreateFileRequestError `json:"error"` } func (dbx *apiImpl) Create(arg *CreateFileRequestArgs) (res *FileRequest, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "create", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetAPIError is an error-wrapper for the get route type GetAPIError struct { dropbox.APIError EndpointError *GetFileRequestError `json:"error"` } func (dbx *apiImpl) Get(arg *GetFileRequestArgs) (res *FileRequest, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListAPIError is an error-wrapper for the list route type ListAPIError struct { dropbox.APIError EndpointError *ListFileRequestsError `json:"error"` } func (dbx *apiImpl) List() (res *ListFileRequestsResult, err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "list", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UpdateAPIError is an error-wrapper for the update route type UpdateAPIError struct { dropbox.APIError EndpointError *UpdateFileRequestError `json:"error"` } func (dbx *apiImpl) Update(arg *UpdateFileRequestArgs) (res *FileRequest, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "file_requests", "update", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/file_requests/types.go000066400000000000000000000251441340753361200245300ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package file_requests : This namespace contains endpoints and data types for // file request operations. package file_requests import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // CreateFileRequestArgs : Arguments for `create`. type CreateFileRequestArgs struct { // Title : The title of the file request. Must not be empty. Title string `json:"title"` // Destination : The path of the folder in the Dropbox where uploaded files // will be sent. For apps with the app folder permission, this will be // relative to the app folder. Destination string `json:"destination"` // Deadline : The deadline for the file request. Deadlines can only be set // by Professional and Business accounts. Deadline *FileRequestDeadline `json:"deadline,omitempty"` // Open : Whether or not the file request should be open. If the file // request is closed, it will not accept any file submissions, but it can be // opened later. Open bool `json:"open"` } // NewCreateFileRequestArgs returns a new CreateFileRequestArgs instance func NewCreateFileRequestArgs(Title string, Destination string) *CreateFileRequestArgs { s := new(CreateFileRequestArgs) s.Title = Title s.Destination = Destination s.Open = true return s } // GeneralFileRequestsError : There is an error accessing the file requests // functionality. type GeneralFileRequestsError struct { dropbox.Tagged } // Valid tag values for GeneralFileRequestsError const ( GeneralFileRequestsErrorDisabledForTeam = "disabled_for_team" GeneralFileRequestsErrorOther = "other" ) // FileRequestError : There is an error with the file request. type FileRequestError struct { dropbox.Tagged } // Valid tag values for FileRequestError const ( FileRequestErrorDisabledForTeam = "disabled_for_team" FileRequestErrorOther = "other" FileRequestErrorNotFound = "not_found" FileRequestErrorNotAFolder = "not_a_folder" FileRequestErrorAppLacksAccess = "app_lacks_access" FileRequestErrorNoPermission = "no_permission" FileRequestErrorEmailUnverified = "email_unverified" FileRequestErrorValidationError = "validation_error" ) // CreateFileRequestError : There was an error creating the file request. type CreateFileRequestError struct { dropbox.Tagged } // Valid tag values for CreateFileRequestError const ( CreateFileRequestErrorDisabledForTeam = "disabled_for_team" CreateFileRequestErrorOther = "other" CreateFileRequestErrorNotFound = "not_found" CreateFileRequestErrorNotAFolder = "not_a_folder" CreateFileRequestErrorAppLacksAccess = "app_lacks_access" CreateFileRequestErrorNoPermission = "no_permission" CreateFileRequestErrorEmailUnverified = "email_unverified" CreateFileRequestErrorValidationError = "validation_error" CreateFileRequestErrorInvalidLocation = "invalid_location" CreateFileRequestErrorRateLimit = "rate_limit" ) // FileRequest : A `file request` for // receiving files into the user's Dropbox account. type FileRequest struct { // Id : The ID of the file request. Id string `json:"id"` // Url : The URL of the file request. Url string `json:"url"` // Title : The title of the file request. Title string `json:"title"` // Destination : The path of the folder in the Dropbox where uploaded files // will be sent. This can be nil if the destination was removed. For apps // with the app folder permission, this will be relative to the app folder. Destination string `json:"destination,omitempty"` // Created : When this file request was created. Created time.Time `json:"created"` // Deadline : The deadline for this file request. Only set if the request // has a deadline. Deadline *FileRequestDeadline `json:"deadline,omitempty"` // IsOpen : Whether or not the file request is open. If the file request is // closed, it will not accept any more file submissions. IsOpen bool `json:"is_open"` // FileCount : The number of files this file request has received. FileCount int64 `json:"file_count"` } // NewFileRequest returns a new FileRequest instance func NewFileRequest(Id string, Url string, Title string, Created time.Time, IsOpen bool, FileCount int64) *FileRequest { s := new(FileRequest) s.Id = Id s.Url = Url s.Title = Title s.Created = Created s.IsOpen = IsOpen s.FileCount = FileCount return s } // FileRequestDeadline : has no documentation (yet) type FileRequestDeadline struct { // Deadline : The deadline for this file request. Deadline time.Time `json:"deadline"` // AllowLateUploads : If set, allow uploads after the deadline has passed. // These uploads will be marked overdue. AllowLateUploads *GracePeriod `json:"allow_late_uploads,omitempty"` } // NewFileRequestDeadline returns a new FileRequestDeadline instance func NewFileRequestDeadline(Deadline time.Time) *FileRequestDeadline { s := new(FileRequestDeadline) s.Deadline = Deadline return s } // GetFileRequestArgs : Arguments for `get`. type GetFileRequestArgs struct { // Id : The ID of the file request to retrieve. Id string `json:"id"` } // NewGetFileRequestArgs returns a new GetFileRequestArgs instance func NewGetFileRequestArgs(Id string) *GetFileRequestArgs { s := new(GetFileRequestArgs) s.Id = Id return s } // GetFileRequestError : There was an error retrieving the specified file // request. type GetFileRequestError struct { dropbox.Tagged } // Valid tag values for GetFileRequestError const ( GetFileRequestErrorDisabledForTeam = "disabled_for_team" GetFileRequestErrorOther = "other" GetFileRequestErrorNotFound = "not_found" GetFileRequestErrorNotAFolder = "not_a_folder" GetFileRequestErrorAppLacksAccess = "app_lacks_access" GetFileRequestErrorNoPermission = "no_permission" GetFileRequestErrorEmailUnverified = "email_unverified" GetFileRequestErrorValidationError = "validation_error" ) // GracePeriod : has no documentation (yet) type GracePeriod struct { dropbox.Tagged } // Valid tag values for GracePeriod const ( GracePeriodOneDay = "one_day" GracePeriodTwoDays = "two_days" GracePeriodSevenDays = "seven_days" GracePeriodThirtyDays = "thirty_days" GracePeriodAlways = "always" GracePeriodOther = "other" ) // ListFileRequestsError : There was an error retrieving the file requests. type ListFileRequestsError struct { dropbox.Tagged } // Valid tag values for ListFileRequestsError const ( ListFileRequestsErrorDisabledForTeam = "disabled_for_team" ListFileRequestsErrorOther = "other" ) // ListFileRequestsResult : Result for `list`. type ListFileRequestsResult struct { // FileRequests : The file requests owned by this user. Apps with the app // folder permission will only see file requests in their app folder. FileRequests []*FileRequest `json:"file_requests"` } // NewListFileRequestsResult returns a new ListFileRequestsResult instance func NewListFileRequestsResult(FileRequests []*FileRequest) *ListFileRequestsResult { s := new(ListFileRequestsResult) s.FileRequests = FileRequests return s } // UpdateFileRequestArgs : Arguments for `update`. type UpdateFileRequestArgs struct { // Id : The ID of the file request to update. Id string `json:"id"` // Title : The new title of the file request. Must not be empty. Title string `json:"title,omitempty"` // Destination : The new path of the folder in the Dropbox where uploaded // files will be sent. For apps with the app folder permission, this will be // relative to the app folder. Destination string `json:"destination,omitempty"` // Deadline : The new deadline for the file request. Deadlines can only be // set by Professional and Business accounts. Deadline *UpdateFileRequestDeadline `json:"deadline"` // Open : Whether to set this file request as open or closed. Open bool `json:"open,omitempty"` } // NewUpdateFileRequestArgs returns a new UpdateFileRequestArgs instance func NewUpdateFileRequestArgs(Id string) *UpdateFileRequestArgs { s := new(UpdateFileRequestArgs) s.Id = Id s.Deadline = &UpdateFileRequestDeadline{Tagged: dropbox.Tagged{"no_update"}} return s } // UpdateFileRequestDeadline : has no documentation (yet) type UpdateFileRequestDeadline struct { dropbox.Tagged // Update : If nil, the file request's deadline is cleared. Update *FileRequestDeadline `json:"update,omitempty"` } // Valid tag values for UpdateFileRequestDeadline const ( UpdateFileRequestDeadlineNoUpdate = "no_update" UpdateFileRequestDeadlineUpdate = "update" UpdateFileRequestDeadlineOther = "other" ) // UnmarshalJSON deserializes into a UpdateFileRequestDeadline instance func (u *UpdateFileRequestDeadline) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Update : If nil, the file request's deadline is cleared. Update json.RawMessage `json:"update,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "update": err = json.Unmarshal(body, &u.Update) if err != nil { return err } } return nil } // UpdateFileRequestError : There is an error updating the file request. type UpdateFileRequestError struct { dropbox.Tagged } // Valid tag values for UpdateFileRequestError const ( UpdateFileRequestErrorDisabledForTeam = "disabled_for_team" UpdateFileRequestErrorOther = "other" UpdateFileRequestErrorNotFound = "not_found" UpdateFileRequestErrorNotAFolder = "not_a_folder" UpdateFileRequestErrorAppLacksAccess = "app_lacks_access" UpdateFileRequestErrorNoPermission = "no_permission" UpdateFileRequestErrorEmailUnverified = "email_unverified" UpdateFileRequestErrorValidationError = "validation_error" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/files/000077500000000000000000000000001340753361200212575ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/files/client.go000066400000000000000000003200731340753361200230710ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package files import ( "bytes" "encoding/json" "io" "io/ioutil" "log" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties" ) // Client interface describes all routes in this namespace type Client interface { // AlphaGetMetadata : Returns the metadata for a file or folder. This is an // alpha endpoint compatible with the properties API. Note: Metadata for the // root folder is unsupported. // Deprecated: Use `GetMetadata` instead AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) // AlphaUpload : Create a new file with the contents provided in the // request. Note that this endpoint is part of the properties API alpha and // is slightly different from `upload`. Do not use this to upload a file // larger than 150 MB. Instead, create an upload session with // `uploadSessionStart`. // Deprecated: Use `AlphaUpload` instead AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) // Copy : Copy a file or folder to a different location in the user's // Dropbox. If the source path is a folder all its contents will be copied. CopyV2(arg *RelocationArg) (res *RelocationResult, err error) // Copy : Copy a file or folder to a different location in the user's // Dropbox. If the source path is a folder all its contents will be copied. // Deprecated: Use `CopyV2` instead Copy(arg *RelocationArg) (res IsMetadata, err error) // CopyBatch : Copy multiple files or folders to different locations at once // in the user's Dropbox. This route will replace `copyBatch`. The main // difference is this route will return stutus for each entry, while // `copyBatch` raises failure if any entry fails. This route will either // finish synchronously, or return a job ID and do the async copy job in // background. Please use `copyBatchCheck` to check the job status. CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error) // CopyBatch : Copy multiple files or folders to different locations at once // in the user's Dropbox. If `RelocationBatchArg.allow_shared_folder` is // false, this route is atomic. If one entry fails, the whole transaction // will abort. If `RelocationBatchArg.allow_shared_folder` is true, // atomicity is not guaranteed, but it allows you to copy the contents of // shared folders to new locations. This route will return job ID // immediately and do the async copy job in background. Please use // `copyBatchCheck` to check the job status. // Deprecated: Use `CopyBatchV2` instead CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) // CopyBatchCheck : Returns the status of an asynchronous job for // `copyBatch`. It returns list of results for each entry. CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) // CopyBatchCheck : Returns the status of an asynchronous job for // `copyBatch`. If success, it returns list of results for each entry. // Deprecated: Use `CopyBatchCheckV2` instead CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) // CopyReferenceGet : Get a copy reference to a file or folder. This // reference string can be used to save that file or folder to another // user's Dropbox by passing it to `copyReferenceSave`. CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error) // CopyReferenceSave : Save a copy reference returned by `copyReferenceGet` // to the user's Dropbox. CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error) // CreateFolder : Create a folder at a given path. CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error) // CreateFolder : Create a folder at a given path. // Deprecated: Use `CreateFolderV2` instead CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error) // CreateFolderBatch : Create multiple folders at once. This route is // asynchronous for large batches, which returns a job ID immediately and // runs the create folder batch asynchronously. Otherwise, creates the // folders and returns the result synchronously for smaller inputs. You can // force asynchronous behaviour by using the // `CreateFolderBatchArg.force_async` flag. Use `createFolderBatchCheck` to // check the job status. CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error) // CreateFolderBatchCheck : Returns the status of an asynchronous job for // `createFolderBatch`. If success, it returns list of result for each // entry. CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error) // Delete : Delete the file or folder at a given path. If the path is a // folder, all its contents will be deleted too. A successful response // indicates that the file or folder was deleted. The returned metadata will // be the corresponding `FileMetadata` or `FolderMetadata` for the item at // time of deletion, and not a `DeletedMetadata` object. DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) // Delete : Delete the file or folder at a given path. If the path is a // folder, all its contents will be deleted too. A successful response // indicates that the file or folder was deleted. The returned metadata will // be the corresponding `FileMetadata` or `FolderMetadata` for the item at // time of deletion, and not a `DeletedMetadata` object. // Deprecated: Use `DeleteV2` instead Delete(arg *DeleteArg) (res IsMetadata, err error) // DeleteBatch : Delete multiple files/folders at once. This route is // asynchronous, which returns a job ID immediately and runs the delete // batch asynchronously. Use `deleteBatchCheck` to check the job status. DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error) // DeleteBatchCheck : Returns the status of an asynchronous job for // `deleteBatch`. If success, it returns list of result for each entry. DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error) // Download : Download a file from a user's Dropbox. Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error) // DownloadZip : Download a folder from the user's Dropbox, as a zip file. // The folder must be less than 20 GB in size and have fewer than 10,000 // total files. The input cannot be a single file. Any single file must be // less than 4GB in size. DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error) // GetMetadata : Returns the metadata for a file or folder. Note: Metadata // for the root folder is unsupported. GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) // GetPreview : Get a preview for a file. Currently, PDF previews are // generated for files with the following extensions: .ai, .doc, .docm, // .docx, .eps, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. // HTML previews are generated for files with the following extensions: // .csv, .ods, .xls, .xlsm, .xlsx. Other formats will return an unsupported // extension error. GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error) // GetTemporaryLink : Get a temporary link to stream content of a file. This // link will expire in four hours and afterwards you will get 410 Gone. So // this URL should not be used to display content directly in the browser. // Content-Type of the link is determined automatically by the file's mime // type. GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error) // GetTemporaryUploadLink : Get a one-time use temporary upload link to // upload a file to a Dropbox location. This endpoint acts as a delayed // `upload`. The returned temporary upload link may be used to make a POST // request with the data to be uploaded. The upload will then be perfomed // with the `CommitInfo` previously provided to `getTemporaryUploadLink` but // evaluated only upon consumption. Hence, errors stemming from invalid // `CommitInfo` with respect to the state of the user's Dropbox will only be // communicated at consumption time. Additionally, these errors are surfaced // as generic HTTP 409 Conflict responses, potentially hiding issue details. // The maximum temporary upload link duration is 4 hours. Upon consumption // or expiration, a new link will have to be generated. Multiple links may // exist for a specific upload path at any given time. The POST request on // the temporary upload link must have its Content-Type set to // "application/octet-stream". Example temporary upload link consumption // request: curl -X POST // https://dl.dropboxusercontent.com/apitul/1/bNi2uIYF51cVBND --header // "Content-Type: application/octet-stream" --data-binary @local_file.txt A // successful temporary upload link consumption request returns the content // hash of the uploaded data in JSON format. Example succesful temporary // upload link consumption response: {"content-hash": // "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary // upload link consumption request returns any of the following status // codes: HTTP 400 Bad Request: Content-Type is not one of // application/octet-stream and text/plain or request is invalid. HTTP 409 // Conflict: The temporary upload link does not exist or is currently // unavailable, the upload failed, or another error happened. HTTP 410 Gone: // The temporary upload link is expired or consumed. Example unsuccessful // temporary upload link consumption response: Temporary upload link has // been recently consumed. GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error) // GetThumbnail : Get a thumbnail for an image. This method currently // supports files with the following file extensions: jpg, jpeg, png, tiff, // tif, gif and bmp. Photos that are larger than 20MB in size won't be // converted to a thumbnail. GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error) // GetThumbnailBatch : Get thumbnails for a list of images. We allow up to // 25 thumbnails in a single batch. This method currently supports files // with the following file extensions: jpg, jpeg, png, tiff, tif, gif and // bmp. Photos that are larger than 20MB in size won't be converted to a // thumbnail. GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error) // ListFolder : Starts returning the contents of a folder. If the result's // `ListFolderResult.has_more` field is true, call `listFolderContinue` with // the returned `ListFolderResult.cursor` to retrieve more entries. If // you're using `ListFolderArg.recursive` set to true to keep a local cache // of the contents of a Dropbox account, iterate through each entry in order // and process them as follows to keep your local state in sync: For each // `FileMetadata`, store the new entry at the given path in your local // state. If the required parent folders don't exist yet, create them. If // there's already something else at the given path, replace it and remove // all its children. For each `FolderMetadata`, store the new entry at the // given path in your local state. If the required parent folders don't // exist yet, create them. If there's already something else at the given // path, replace it but leave the children as they are. Check the new // entry's `FolderSharingInfo.read_only` and set all its children's // read-only statuses to match. For each `DeletedMetadata`, if your local // state has something at the given path, remove it and all its children. If // there's nothing at the given path, ignore this entry. Note: // `auth.RateLimitError` may be returned if multiple `listFolder` or // `listFolderContinue` calls with same parameters are made simultaneously // by same API app for same user. If your app implements retry logic, please // hold off the retry until the previous request finishes. ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error) // ListFolderContinue : Once a cursor has been retrieved from `listFolder`, // use this to paginate through all files and retrieve updates to the // folder, following the same rules as documented for `listFolder`. ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error) // ListFolderGetLatestCursor : A way to quickly get a cursor for the // folder's state. Unlike `listFolder`, `listFolderGetLatestCursor` doesn't // return any entries. This endpoint is for app which only needs to know // about new files and modifications and doesn't need to know about files // that already exist in Dropbox. ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error) // ListFolderLongpoll : A longpoll endpoint to wait for changes on an // account. In conjunction with `listFolderContinue`, this call gives you a // low-latency way to monitor an account for file changes. The connection // will block until there are changes available or a timeout occurs. This // endpoint is useful mostly for client-side apps. If you're looking for // server-side notifications, check out our `webhooks documentation` // . ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error) // ListRevisions : Returns revisions for files based on a file path or a // file id. The file path or file id is identified from the latest file // entry at the given file path or id. This end point allows your app to // query either by file path or file id by setting the mode parameter // appropriately. In the `ListRevisionsMode.path` (default) mode, all // revisions at the same file path as the latest file entry are returned. If // revisions with the same file id are desired, then mode must be set to // `ListRevisionsMode.id`. The `ListRevisionsMode.id` mode is useful to // retrieve revisions for a given file across moves or renames. ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error) // Move : Move a file or folder to a different location in the user's // Dropbox. If the source path is a folder all its contents will be moved. MoveV2(arg *RelocationArg) (res *RelocationResult, err error) // Move : Move a file or folder to a different location in the user's // Dropbox. If the source path is a folder all its contents will be moved. // Deprecated: Use `MoveV2` instead Move(arg *RelocationArg) (res IsMetadata, err error) // MoveBatch : Move multiple files or folders to different locations at once // in the user's Dropbox. This route will replace `moveBatch`. The main // difference is this route will return stutus for each entry, while // `moveBatch` raises failure if any entry fails. This route will either // finish synchronously, or return a job ID and do the async move job in // background. Please use `moveBatchCheck` to check the job status. MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error) // MoveBatch : Move multiple files or folders to different locations at once // in the user's Dropbox. This route is 'all or nothing', which means if one // entry fails, the whole transaction will abort. This route will return job // ID immediately and do the async moving job in background. Please use // `moveBatchCheck` to check the job status. MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) // MoveBatchCheck : Returns the status of an asynchronous job for // `moveBatch`. It returns list of results for each entry. MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) // MoveBatchCheck : Returns the status of an asynchronous job for // `moveBatch`. If success, it returns list of results for each entry. MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) // PermanentlyDelete : Permanently delete the file or folder at a given path // (see https://www.dropbox.com/en/help/40). Note: This endpoint is only // available for Dropbox Business apps. PermanentlyDelete(arg *DeleteArg) (err error) // PropertiesAdd : has no documentation (yet) // Deprecated: PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error) // PropertiesOverwrite : has no documentation (yet) // Deprecated: PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error) // PropertiesRemove : has no documentation (yet) // Deprecated: PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error) // PropertiesTemplateGet : has no documentation (yet) // Deprecated: PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) // PropertiesTemplateList : has no documentation (yet) // Deprecated: PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) // PropertiesUpdate : has no documentation (yet) // Deprecated: PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error) // Restore : Restore a specific revision of a file to the given path. Restore(arg *RestoreArg) (res *FileMetadata, err error) // SaveUrl : Save the data from a specified URL into a file in user's // Dropbox. Note that the transfer from the URL must complete within 5 // minutes, or the operation will time out and the job will fail. If the // given path already exists, the file will be renamed to avoid the conflict // (e.g. myfile (1).txt). SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) // SaveUrlCheckJobStatus : Check the status of a `saveUrl` job. SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error) // Search : Searches for files and folders. Note: Recent changes may not // immediately be reflected in search results due to a short delay in // indexing. Search(arg *SearchArg) (res *SearchResult, err error) // Upload : Create a new file with the contents provided in the request. Do // not use this to upload a file larger than 150 MB. Instead, create an // upload session with `uploadSessionStart`. Calls to this endpoint will // count as data transport calls for any Dropbox Business teams with a limit // on the number of data transport calls allowed per month. For more // information, see the `Data transport limit page` // . Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error) // UploadSessionAppend : Append more data to an upload session. When the // parameter close is set, this call will close the session. A single // request should not upload more than 150 MB. The maximum size of a file // one can upload to an upload session is 350 GB. Calls to this endpoint // will count as data transport calls for any Dropbox Business teams with a // limit on the number of data transport calls allowed per month. For more // information, see the `Data transport limit page` // . UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error) // UploadSessionAppend : Append more data to an upload session. A single // request should not upload more than 150 MB. The maximum size of a file // one can upload to an upload session is 350 GB. Calls to this endpoint // will count as data transport calls for any Dropbox Business teams with a // limit on the number of data transport calls allowed per month. For more // information, see the `Data transport limit page` // . // Deprecated: Use `UploadSessionAppendV2` instead UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error) // UploadSessionFinish : Finish an upload session and save the uploaded data // to the given file path. A single request should not upload more than 150 // MB. The maximum size of a file one can upload to an upload session is 350 // GB. Calls to this endpoint will count as data transport calls for any // Dropbox Business teams with a limit on the number of data transport calls // allowed per month. For more information, see the `Data transport limit // page` // . UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error) // UploadSessionFinishBatch : This route helps you commit many files at once // into a user's Dropbox. Use `uploadSessionStart` and `uploadSessionAppend` // to upload file contents. We recommend uploading many files in parallel to // increase throughput. Once the file contents have been uploaded, rather // than calling `uploadSessionFinish`, use this route to finish all your // upload sessions in a single request. `UploadSessionStartArg.close` or // `UploadSessionAppendArg.close` needs to be true for the last // `uploadSessionStart` or `uploadSessionAppend` call. The maximum size of a // file one can upload to an upload session is 350 GB. This route will // return a job_id immediately and do the async commit job in background. // Use `uploadSessionFinishBatchCheck` to check the job status. For the same // account, this route should be executed serially. That means you should // not start the next job before current job finishes. We allow up to 1000 // entries in a single request. Calls to this endpoint will count as data // transport calls for any Dropbox Business teams with a limit on the number // of data transport calls allowed per month. For more information, see the // `Data transport limit page` // . UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error) // UploadSessionFinishBatchCheck : Returns the status of an asynchronous job // for `uploadSessionFinishBatch`. If success, it returns list of result for // each entry. UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error) // UploadSessionStart : Upload sessions allow you to upload a single file in // one or more requests, for example where the size of the file is greater // than 150 MB. This call starts a new upload session with the given data. // You can then use `uploadSessionAppend` to add more data and // `uploadSessionFinish` to save all the data to a file in Dropbox. A single // request should not upload more than 150 MB. The maximum size of a file // one can upload to an upload session is 350 GB. An upload session can be // used for a maximum of 48 hours. Attempting to use an // `UploadSessionStartResult.session_id` with `uploadSessionAppend` or // `uploadSessionFinish` more than 48 hours after its creation will return a // `UploadSessionLookupError.not_found`. Calls to this endpoint will count // as data transport calls for any Dropbox Business teams with a limit on // the number of data transport calls allowed per month. For more // information, see the `Data transport limit page` // . UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error) } type apiImpl dropbox.Context //AlphaGetMetadataAPIError is an error-wrapper for the alpha/get_metadata route type AlphaGetMetadataAPIError struct { dropbox.APIError EndpointError *AlphaGetMetadataError `json:"error"` } func (dbx *apiImpl) AlphaGetMetadata(arg *AlphaGetMetadataArg) (res IsMetadata, err error) { log.Printf("WARNING: API `AlphaGetMetadata` is deprecated") log.Printf("Use API `GetMetadata` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "alpha/get_metadata", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } return } if resp.StatusCode == http.StatusConflict { var apiError AlphaGetMetadataAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //AlphaUploadAPIError is an error-wrapper for the alpha/upload route type AlphaUploadAPIError struct { dropbox.APIError EndpointError *UploadErrorWithProperties `json:"error"` } func (dbx *apiImpl) AlphaUpload(arg *CommitInfoWithProperties, content io.Reader) (res *FileMetadata, err error) { log.Printf("WARNING: API `AlphaUpload` is deprecated") log.Printf("Use API `AlphaUpload` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "alpha/upload", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError AlphaUploadAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyV2APIError is an error-wrapper for the copy route type CopyV2APIError struct { dropbox.APIError EndpointError *RelocationError `json:"error"` } func (dbx *apiImpl) CopyV2(arg *RelocationArg) (res *RelocationResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyAPIError is an error-wrapper for the copy route type CopyAPIError struct { dropbox.APIError EndpointError *RelocationError `json:"error"` } func (dbx *apiImpl) Copy(arg *RelocationArg) (res IsMetadata, err error) { log.Printf("WARNING: API `Copy` is deprecated") log.Printf("Use API `Copy` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } return } if resp.StatusCode == http.StatusConflict { var apiError CopyAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyBatchV2APIError is an error-wrapper for the copy_batch route type CopyBatchV2APIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) CopyBatchV2(arg *RelocationBatchArgBase) (res *RelocationBatchV2Launch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyBatchAPIError is an error-wrapper for the copy_batch route type CopyBatchAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) CopyBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) { log.Printf("WARNING: API `CopyBatch` is deprecated") log.Printf("Use API `CopyBatch` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyBatchCheckV2APIError is an error-wrapper for the copy_batch/check route type CopyBatchCheckV2APIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CopyBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch/check_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyBatchCheckAPIError is an error-wrapper for the copy_batch/check route type CopyBatchCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CopyBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) { log.Printf("WARNING: API `CopyBatchCheck` is deprecated") log.Printf("Use API `CopyBatchCheck` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_batch/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyReferenceGetAPIError is an error-wrapper for the copy_reference/get route type CopyReferenceGetAPIError struct { dropbox.APIError EndpointError *GetCopyReferenceError `json:"error"` } func (dbx *apiImpl) CopyReferenceGet(arg *GetCopyReferenceArg) (res *GetCopyReferenceResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_reference/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyReferenceGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CopyReferenceSaveAPIError is an error-wrapper for the copy_reference/save route type CopyReferenceSaveAPIError struct { dropbox.APIError EndpointError *SaveCopyReferenceError `json:"error"` } func (dbx *apiImpl) CopyReferenceSave(arg *SaveCopyReferenceArg) (res *SaveCopyReferenceResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "copy_reference/save", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CopyReferenceSaveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateFolderV2APIError is an error-wrapper for the create_folder route type CreateFolderV2APIError struct { dropbox.APIError EndpointError *CreateFolderError `json:"error"` } func (dbx *apiImpl) CreateFolderV2(arg *CreateFolderArg) (res *CreateFolderResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateFolderAPIError is an error-wrapper for the create_folder route type CreateFolderAPIError struct { dropbox.APIError EndpointError *CreateFolderError `json:"error"` } func (dbx *apiImpl) CreateFolder(arg *CreateFolderArg) (res *FolderMetadata, err error) { log.Printf("WARNING: API `CreateFolder` is deprecated") log.Printf("Use API `CreateFolder` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateFolderBatchAPIError is an error-wrapper for the create_folder_batch route type CreateFolderBatchAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) CreateFolderBatch(arg *CreateFolderBatchArg) (res *CreateFolderBatchLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateFolderBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateFolderBatchCheckAPIError is an error-wrapper for the create_folder_batch/check route type CreateFolderBatchCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CreateFolderBatchCheck(arg *async.PollArg) (res *CreateFolderBatchJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "create_folder_batch/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateFolderBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DeleteV2APIError is an error-wrapper for the delete route type DeleteV2APIError struct { dropbox.APIError EndpointError *DeleteError `json:"error"` } func (dbx *apiImpl) DeleteV2(arg *DeleteArg) (res *DeleteResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DeleteAPIError is an error-wrapper for the delete route type DeleteAPIError struct { dropbox.APIError EndpointError *DeleteError `json:"error"` } func (dbx *apiImpl) Delete(arg *DeleteArg) (res IsMetadata, err error) { log.Printf("WARNING: API `Delete` is deprecated") log.Printf("Use API `Delete` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } return } if resp.StatusCode == http.StatusConflict { var apiError DeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DeleteBatchAPIError is an error-wrapper for the delete_batch route type DeleteBatchAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) DeleteBatch(arg *DeleteBatchArg) (res *DeleteBatchLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DeleteBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DeleteBatchCheckAPIError is an error-wrapper for the delete_batch/check route type DeleteBatchCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) DeleteBatchCheck(arg *async.PollArg) (res *DeleteBatchJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "delete_batch/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DeleteBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DownloadAPIError is an error-wrapper for the download route type DownloadAPIError struct { dropbox.APIError EndpointError *DownloadError `json:"error"` } func (dbx *apiImpl) Download(arg *DownloadArg) (res *FileMetadata, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } for k, v := range arg.ExtraHeaders { headers[k] = v } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "download", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusPartialContent { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError DownloadAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DownloadZipAPIError is an error-wrapper for the download_zip route type DownloadZipAPIError struct { dropbox.APIError EndpointError *DownloadZipError `json:"error"` } func (dbx *apiImpl) DownloadZip(arg *DownloadZipArg) (res *DownloadZipResult, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "download_zip", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError DownloadZipAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetMetadataAPIError is an error-wrapper for the get_metadata route type GetMetadataAPIError struct { dropbox.APIError EndpointError *GetMetadataError `json:"error"` } func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_metadata", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } return } if resp.StatusCode == http.StatusConflict { var apiError GetMetadataAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetPreviewAPIError is an error-wrapper for the get_preview route type GetPreviewAPIError struct { dropbox.APIError EndpointError *PreviewError `json:"error"` } func (dbx *apiImpl) GetPreview(arg *PreviewArg) (res *FileMetadata, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "get_preview", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError GetPreviewAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetTemporaryLinkAPIError is an error-wrapper for the get_temporary_link route type GetTemporaryLinkAPIError struct { dropbox.APIError EndpointError *GetTemporaryLinkError `json:"error"` } func (dbx *apiImpl) GetTemporaryLink(arg *GetTemporaryLinkArg) (res *GetTemporaryLinkResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_temporary_link", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetTemporaryLinkAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetTemporaryUploadLinkAPIError is an error-wrapper for the get_temporary_upload_link route type GetTemporaryUploadLinkAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) GetTemporaryUploadLink(arg *GetTemporaryUploadLinkArg) (res *GetTemporaryUploadLinkResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "get_temporary_upload_link", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetTemporaryUploadLinkAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetThumbnailAPIError is an error-wrapper for the get_thumbnail route type GetThumbnailAPIError struct { dropbox.APIError EndpointError *ThumbnailError `json:"error"` } func (dbx *apiImpl) GetThumbnail(arg *ThumbnailArg) (res *FileMetadata, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "files", "get_thumbnail", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError GetThumbnailAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetThumbnailBatchAPIError is an error-wrapper for the get_thumbnail_batch route type GetThumbnailBatchAPIError struct { dropbox.APIError EndpointError *GetThumbnailBatchError `json:"error"` } func (dbx *apiImpl) GetThumbnailBatch(arg *GetThumbnailBatchArg) (res *GetThumbnailBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "rpc", true, "files", "get_thumbnail_batch", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetThumbnailBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderAPIError is an error-wrapper for the list_folder route type ListFolderAPIError struct { dropbox.APIError EndpointError *ListFolderError `json:"error"` } func (dbx *apiImpl) ListFolder(arg *ListFolderArg) (res *ListFolderResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderContinueAPIError is an error-wrapper for the list_folder/continue route type ListFolderContinueAPIError struct { dropbox.APIError EndpointError *ListFolderContinueError `json:"error"` } func (dbx *apiImpl) ListFolderContinue(arg *ListFolderContinueArg) (res *ListFolderResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderGetLatestCursorAPIError is an error-wrapper for the list_folder/get_latest_cursor route type ListFolderGetLatestCursorAPIError struct { dropbox.APIError EndpointError *ListFolderError `json:"error"` } func (dbx *apiImpl) ListFolderGetLatestCursor(arg *ListFolderArg) (res *ListFolderGetLatestCursorResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_folder/get_latest_cursor", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderGetLatestCursorAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderLongpollAPIError is an error-wrapper for the list_folder/longpoll route type ListFolderLongpollAPIError struct { dropbox.APIError EndpointError *ListFolderLongpollError `json:"error"` } func (dbx *apiImpl) ListFolderLongpoll(arg *ListFolderLongpollArg) (res *ListFolderLongpollResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("notify", "rpc", false, "files", "list_folder/longpoll", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderLongpollAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListRevisionsAPIError is an error-wrapper for the list_revisions route type ListRevisionsAPIError struct { dropbox.APIError EndpointError *ListRevisionsError `json:"error"` } func (dbx *apiImpl) ListRevisions(arg *ListRevisionsArg) (res *ListRevisionsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "list_revisions", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListRevisionsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveV2APIError is an error-wrapper for the move route type MoveV2APIError struct { dropbox.APIError EndpointError *RelocationError `json:"error"` } func (dbx *apiImpl) MoveV2(arg *RelocationArg) (res *RelocationResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveAPIError is an error-wrapper for the move route type MoveAPIError struct { dropbox.APIError EndpointError *RelocationError `json:"error"` } func (dbx *apiImpl) Move(arg *RelocationArg) (res IsMetadata, err error) { log.Printf("WARNING: API `Move` is deprecated") log.Printf("Use API `Move` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } return } if resp.StatusCode == http.StatusConflict { var apiError MoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveBatchV2APIError is an error-wrapper for the move_batch route type MoveBatchV2APIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) MoveBatchV2(arg *MoveBatchArg) (res *RelocationBatchV2Launch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MoveBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveBatchAPIError is an error-wrapper for the move_batch route type MoveBatchAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) MoveBatch(arg *RelocationBatchArg) (res *RelocationBatchLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MoveBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveBatchCheckV2APIError is an error-wrapper for the move_batch/check route type MoveBatchCheckV2APIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) MoveBatchCheckV2(arg *async.PollArg) (res *RelocationBatchV2JobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch/check_v2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MoveBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MoveBatchCheckAPIError is an error-wrapper for the move_batch/check route type MoveBatchCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) MoveBatchCheck(arg *async.PollArg) (res *RelocationBatchJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "move_batch/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MoveBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PermanentlyDeleteAPIError is an error-wrapper for the permanently_delete route type PermanentlyDeleteAPIError struct { dropbox.APIError EndpointError *DeleteError `json:"error"` } func (dbx *apiImpl) PermanentlyDelete(arg *DeleteArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "permanently_delete", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PermanentlyDeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesAddAPIError is an error-wrapper for the properties/add route type PropertiesAddAPIError struct { dropbox.APIError EndpointError *file_properties.AddPropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesAdd(arg *file_properties.AddPropertiesArg) (err error) { log.Printf("WARNING: API `PropertiesAdd` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesOverwriteAPIError is an error-wrapper for the properties/overwrite route type PropertiesOverwriteAPIError struct { dropbox.APIError EndpointError *file_properties.InvalidPropertyGroupError `json:"error"` } func (dbx *apiImpl) PropertiesOverwrite(arg *file_properties.OverwritePropertyGroupArg) (err error) { log.Printf("WARNING: API `PropertiesOverwrite` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/overwrite", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesOverwriteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesRemoveAPIError is an error-wrapper for the properties/remove route type PropertiesRemoveAPIError struct { dropbox.APIError EndpointError *file_properties.RemovePropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesRemove(arg *file_properties.RemovePropertiesArg) (err error) { log.Printf("WARNING: API `PropertiesRemove` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route type PropertiesTemplateGetAPIError struct { dropbox.APIError EndpointError *file_properties.TemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/template/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route type PropertiesTemplateListAPIError struct { dropbox.APIError EndpointError *file_properties.TemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateList` is deprecated") cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/template/list", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesUpdateAPIError is an error-wrapper for the properties/update route type PropertiesUpdateAPIError struct { dropbox.APIError EndpointError *file_properties.UpdatePropertiesError `json:"error"` } func (dbx *apiImpl) PropertiesUpdate(arg *file_properties.UpdatePropertiesArg) (err error) { log.Printf("WARNING: API `PropertiesUpdate` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "properties/update", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesUpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RestoreAPIError is an error-wrapper for the restore route type RestoreAPIError struct { dropbox.APIError EndpointError *RestoreError `json:"error"` } func (dbx *apiImpl) Restore(arg *RestoreArg) (res *FileMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "restore", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError RestoreAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //SaveUrlAPIError is an error-wrapper for the save_url route type SaveUrlAPIError struct { dropbox.APIError EndpointError *SaveUrlError `json:"error"` } func (dbx *apiImpl) SaveUrl(arg *SaveUrlArg) (res *SaveUrlResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "save_url", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError SaveUrlAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //SaveUrlCheckJobStatusAPIError is an error-wrapper for the save_url/check_job_status route type SaveUrlCheckJobStatusAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) SaveUrlCheckJobStatus(arg *async.PollArg) (res *SaveUrlJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "save_url/check_job_status", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError SaveUrlCheckJobStatusAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //SearchAPIError is an error-wrapper for the search route type SearchAPIError struct { dropbox.APIError EndpointError *SearchError `json:"error"` } func (dbx *apiImpl) Search(arg *SearchArg) (res *SearchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "search", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError SearchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadAPIError is an error-wrapper for the upload route type UploadAPIError struct { dropbox.APIError EndpointError *UploadError `json:"error"` } func (dbx *apiImpl) Upload(arg *CommitInfo, content io.Reader) (res *FileMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UploadAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionAppendV2APIError is an error-wrapper for the upload_session/append route type UploadSessionAppendV2APIError struct { dropbox.APIError EndpointError *UploadSessionLookupError `json:"error"` } func (dbx *apiImpl) UploadSessionAppendV2(arg *UploadSessionAppendArg, content io.Reader) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/append_v2", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionAppendAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionAppendAPIError is an error-wrapper for the upload_session/append route type UploadSessionAppendAPIError struct { dropbox.APIError EndpointError *UploadSessionLookupError `json:"error"` } func (dbx *apiImpl) UploadSessionAppend(arg *UploadSessionCursor, content io.Reader) (err error) { log.Printf("WARNING: API `UploadSessionAppend` is deprecated") log.Printf("Use API `UploadSessionAppend` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/append", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionAppendAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionFinishAPIError is an error-wrapper for the upload_session/finish route type UploadSessionFinishAPIError struct { dropbox.APIError EndpointError *UploadSessionFinishError `json:"error"` } func (dbx *apiImpl) UploadSessionFinish(arg *UploadSessionFinishArg, content io.Reader) (res *FileMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/finish", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionFinishAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionFinishBatchAPIError is an error-wrapper for the upload_session/finish_batch route type UploadSessionFinishBatchAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) UploadSessionFinishBatch(arg *UploadSessionFinishBatchArg) (res *UploadSessionFinishBatchLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "upload_session/finish_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionFinishBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionFinishBatchCheckAPIError is an error-wrapper for the upload_session/finish_batch/check route type UploadSessionFinishBatchCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) UploadSessionFinishBatchCheck(arg *async.PollArg) (res *UploadSessionFinishBatchJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "files", "upload_session/finish_batch/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionFinishBatchCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UploadSessionStartAPIError is an error-wrapper for the upload_session/start route type UploadSessionStartAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) UploadSessionStart(arg *UploadSessionStartArg, content io.Reader) (res *UploadSessionStartResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "upload", true, "files", "upload_session/start", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UploadSessionStartAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/files/types.go000066400000000000000000003501251340753361200227600ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package files : This namespace contains endpoints and data types for basic // file operations. package files import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties" ) // GetMetadataArg : has no documentation (yet) type GetMetadataArg struct { // Path : The path of a file or folder on Dropbox. Path string `json:"path"` // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo // and video. IncludeMediaInfo bool `json:"include_media_info"` // IncludeDeleted : If true, `DeletedMetadata` will be returned for deleted // file or folder, otherwise `LookupError.not_found` will be returned. IncludeDeleted bool `json:"include_deleted"` // IncludeHasExplicitSharedMembers : If true, the results will include a // flag for each file indicating whether or not that file has any explicit // members. IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"` // IncludePropertyGroups : If set to a valid list of template IDs, // `FileMetadata.property_groups` is set if there exists property data // associated with the file and each of the listed templates. IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"` } // NewGetMetadataArg returns a new GetMetadataArg instance func NewGetMetadataArg(Path string) *GetMetadataArg { s := new(GetMetadataArg) s.Path = Path s.IncludeMediaInfo = false s.IncludeDeleted = false s.IncludeHasExplicitSharedMembers = false return s } // AlphaGetMetadataArg : has no documentation (yet) type AlphaGetMetadataArg struct { GetMetadataArg // IncludePropertyTemplates : If set to a valid list of template IDs, // `FileMetadata.property_groups` is set for files with custom properties. IncludePropertyTemplates []string `json:"include_property_templates,omitempty"` } // NewAlphaGetMetadataArg returns a new AlphaGetMetadataArg instance func NewAlphaGetMetadataArg(Path string) *AlphaGetMetadataArg { s := new(AlphaGetMetadataArg) s.Path = Path s.IncludeMediaInfo = false s.IncludeDeleted = false s.IncludeHasExplicitSharedMembers = false return s } // GetMetadataError : has no documentation (yet) type GetMetadataError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for GetMetadataError const ( GetMetadataErrorPath = "path" ) // UnmarshalJSON deserializes into a GetMetadataError instance func (u *GetMetadataError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // AlphaGetMetadataError : has no documentation (yet) type AlphaGetMetadataError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` // PropertiesError : has no documentation (yet) PropertiesError *file_properties.LookUpPropertiesError `json:"properties_error,omitempty"` } // Valid tag values for AlphaGetMetadataError const ( AlphaGetMetadataErrorPath = "path" AlphaGetMetadataErrorPropertiesError = "properties_error" ) // UnmarshalJSON deserializes into a AlphaGetMetadataError instance func (u *AlphaGetMetadataError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` // PropertiesError : has no documentation (yet) PropertiesError json.RawMessage `json:"properties_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } case "properties_error": err = json.Unmarshal(w.PropertiesError, &u.PropertiesError) if err != nil { return err } } return nil } // CommitInfo : has no documentation (yet) type CommitInfo struct { // Path : Path in the user's Dropbox to save the file. Path string `json:"path"` // Mode : Selects what to do if the file already exists. Mode *WriteMode `json:"mode"` // Autorename : If there's a conflict, as determined by `mode`, have the // Dropbox server try to autorename the file to avoid conflict. Autorename bool `json:"autorename"` // ClientModified : The value to store as the `client_modified` timestamp. // Dropbox automatically records the time at which the file was written to // the Dropbox servers. It can also record an additional timestamp, provided // by Dropbox desktop clients, mobile clients, and API apps of when the file // was actually created or modified. ClientModified time.Time `json:"client_modified,omitempty"` // Mute : Normally, users are made aware of any file modifications in their // Dropbox account via notifications in the client software. If true, this // tells the clients that this modification shouldn't result in a user // notification. Mute bool `json:"mute"` // PropertyGroups : List of custom properties to add to file. PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"` // StrictConflict : Be more strict about how each `WriteMode` detects // conflict. For example, always return a conflict error when `mode` = // `WriteMode.update` and the given "rev" doesn't match the existing file's // "rev", even if the existing file has been deleted. StrictConflict bool `json:"strict_conflict"` } // NewCommitInfo returns a new CommitInfo instance func NewCommitInfo(Path string) *CommitInfo { s := new(CommitInfo) s.Path = Path s.Mode = &WriteMode{Tagged: dropbox.Tagged{"add"}} s.Autorename = false s.Mute = false s.StrictConflict = false return s } // CommitInfoWithProperties : has no documentation (yet) type CommitInfoWithProperties struct { CommitInfo } // NewCommitInfoWithProperties returns a new CommitInfoWithProperties instance func NewCommitInfoWithProperties(Path string) *CommitInfoWithProperties { s := new(CommitInfoWithProperties) s.Path = Path s.Mode = &WriteMode{Tagged: dropbox.Tagged{"add"}} s.Autorename = false s.Mute = false s.StrictConflict = false return s } // ContentSyncSetting : has no documentation (yet) type ContentSyncSetting struct { // Id : Id of the item this setting is applied to. Id string `json:"id"` // SyncSetting : Setting for this item. SyncSetting *SyncSetting `json:"sync_setting"` } // NewContentSyncSetting returns a new ContentSyncSetting instance func NewContentSyncSetting(Id string, SyncSetting *SyncSetting) *ContentSyncSetting { s := new(ContentSyncSetting) s.Id = Id s.SyncSetting = SyncSetting return s } // ContentSyncSettingArg : has no documentation (yet) type ContentSyncSettingArg struct { // Id : Id of the item this setting is applied to. Id string `json:"id"` // SyncSetting : Setting for this item. SyncSetting *SyncSettingArg `json:"sync_setting"` } // NewContentSyncSettingArg returns a new ContentSyncSettingArg instance func NewContentSyncSettingArg(Id string, SyncSetting *SyncSettingArg) *ContentSyncSettingArg { s := new(ContentSyncSettingArg) s.Id = Id s.SyncSetting = SyncSetting return s } // CreateFolderArg : has no documentation (yet) type CreateFolderArg struct { // Path : Path in the user's Dropbox to create. Path string `json:"path"` // Autorename : If there's a conflict, have the Dropbox server try to // autorename the folder to avoid the conflict. Autorename bool `json:"autorename"` } // NewCreateFolderArg returns a new CreateFolderArg instance func NewCreateFolderArg(Path string) *CreateFolderArg { s := new(CreateFolderArg) s.Path = Path s.Autorename = false return s } // CreateFolderBatchArg : has no documentation (yet) type CreateFolderBatchArg struct { // Paths : List of paths to be created in the user's Dropbox. Duplicate path // arguments in the batch are considered only once. Paths []string `json:"paths"` // Autorename : If there's a conflict, have the Dropbox server try to // autorename the folder to avoid the conflict. Autorename bool `json:"autorename"` // ForceAsync : Whether to force the create to happen asynchronously. ForceAsync bool `json:"force_async"` } // NewCreateFolderBatchArg returns a new CreateFolderBatchArg instance func NewCreateFolderBatchArg(Paths []string) *CreateFolderBatchArg { s := new(CreateFolderBatchArg) s.Paths = Paths s.Autorename = false s.ForceAsync = false return s } // CreateFolderBatchError : has no documentation (yet) type CreateFolderBatchError struct { dropbox.Tagged } // Valid tag values for CreateFolderBatchError const ( CreateFolderBatchErrorTooManyFiles = "too_many_files" CreateFolderBatchErrorOther = "other" ) // CreateFolderBatchJobStatus : has no documentation (yet) type CreateFolderBatchJobStatus struct { dropbox.Tagged // Complete : The batch create folder has finished. Complete *CreateFolderBatchResult `json:"complete,omitempty"` // Failed : The batch create folder has failed. Failed *CreateFolderBatchError `json:"failed,omitempty"` } // Valid tag values for CreateFolderBatchJobStatus const ( CreateFolderBatchJobStatusInProgress = "in_progress" CreateFolderBatchJobStatusComplete = "complete" CreateFolderBatchJobStatusFailed = "failed" CreateFolderBatchJobStatusOther = "other" ) // UnmarshalJSON deserializes into a CreateFolderBatchJobStatus instance func (u *CreateFolderBatchJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The batch create folder has finished. Complete json.RawMessage `json:"complete,omitempty"` // Failed : The batch create folder has failed. Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // CreateFolderBatchLaunch : Result returned by `createFolderBatch` that may // either launch an asynchronous job or complete synchronously. type CreateFolderBatchLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *CreateFolderBatchResult `json:"complete,omitempty"` } // Valid tag values for CreateFolderBatchLaunch const ( CreateFolderBatchLaunchAsyncJobId = "async_job_id" CreateFolderBatchLaunchComplete = "complete" CreateFolderBatchLaunchOther = "other" ) // UnmarshalJSON deserializes into a CreateFolderBatchLaunch instance func (u *CreateFolderBatchLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // FileOpsResult : has no documentation (yet) type FileOpsResult struct { } // NewFileOpsResult returns a new FileOpsResult instance func NewFileOpsResult() *FileOpsResult { s := new(FileOpsResult) return s } // CreateFolderBatchResult : has no documentation (yet) type CreateFolderBatchResult struct { FileOpsResult // Entries : Each entry in `CreateFolderBatchArg.paths` will appear at the // same position inside `CreateFolderBatchResult.entries`. Entries []*CreateFolderBatchResultEntry `json:"entries"` } // NewCreateFolderBatchResult returns a new CreateFolderBatchResult instance func NewCreateFolderBatchResult(Entries []*CreateFolderBatchResultEntry) *CreateFolderBatchResult { s := new(CreateFolderBatchResult) s.Entries = Entries return s } // CreateFolderBatchResultEntry : has no documentation (yet) type CreateFolderBatchResultEntry struct { dropbox.Tagged // Success : has no documentation (yet) Success *CreateFolderEntryResult `json:"success,omitempty"` // Failure : has no documentation (yet) Failure *CreateFolderEntryError `json:"failure,omitempty"` } // Valid tag values for CreateFolderBatchResultEntry const ( CreateFolderBatchResultEntrySuccess = "success" CreateFolderBatchResultEntryFailure = "failure" ) // UnmarshalJSON deserializes into a CreateFolderBatchResultEntry instance func (u *CreateFolderBatchResultEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : has no documentation (yet) Success json.RawMessage `json:"success,omitempty"` // Failure : has no documentation (yet) Failure json.RawMessage `json:"failure,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "failure": err = json.Unmarshal(w.Failure, &u.Failure) if err != nil { return err } } return nil } // CreateFolderEntryError : has no documentation (yet) type CreateFolderEntryError struct { dropbox.Tagged // Path : has no documentation (yet) Path *WriteError `json:"path,omitempty"` } // Valid tag values for CreateFolderEntryError const ( CreateFolderEntryErrorPath = "path" CreateFolderEntryErrorOther = "other" ) // UnmarshalJSON deserializes into a CreateFolderEntryError instance func (u *CreateFolderEntryError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // CreateFolderEntryResult : has no documentation (yet) type CreateFolderEntryResult struct { // Metadata : Metadata of the created folder. Metadata *FolderMetadata `json:"metadata"` } // NewCreateFolderEntryResult returns a new CreateFolderEntryResult instance func NewCreateFolderEntryResult(Metadata *FolderMetadata) *CreateFolderEntryResult { s := new(CreateFolderEntryResult) s.Metadata = Metadata return s } // CreateFolderError : has no documentation (yet) type CreateFolderError struct { dropbox.Tagged // Path : has no documentation (yet) Path *WriteError `json:"path,omitempty"` } // Valid tag values for CreateFolderError const ( CreateFolderErrorPath = "path" ) // UnmarshalJSON deserializes into a CreateFolderError instance func (u *CreateFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // CreateFolderResult : has no documentation (yet) type CreateFolderResult struct { FileOpsResult // Metadata : Metadata of the created folder. Metadata *FolderMetadata `json:"metadata"` } // NewCreateFolderResult returns a new CreateFolderResult instance func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult { s := new(CreateFolderResult) s.Metadata = Metadata return s } // DeleteArg : has no documentation (yet) type DeleteArg struct { // Path : Path in the user's Dropbox to delete. Path string `json:"path"` // ParentRev : Perform delete if given "rev" matches the existing file's // latest "rev". This field does not support deleting a folder. ParentRev string `json:"parent_rev,omitempty"` } // NewDeleteArg returns a new DeleteArg instance func NewDeleteArg(Path string) *DeleteArg { s := new(DeleteArg) s.Path = Path return s } // DeleteBatchArg : has no documentation (yet) type DeleteBatchArg struct { // Entries : has no documentation (yet) Entries []*DeleteArg `json:"entries"` } // NewDeleteBatchArg returns a new DeleteBatchArg instance func NewDeleteBatchArg(Entries []*DeleteArg) *DeleteBatchArg { s := new(DeleteBatchArg) s.Entries = Entries return s } // DeleteBatchError : has no documentation (yet) type DeleteBatchError struct { dropbox.Tagged } // Valid tag values for DeleteBatchError const ( DeleteBatchErrorTooManyWriteOperations = "too_many_write_operations" DeleteBatchErrorOther = "other" ) // DeleteBatchJobStatus : has no documentation (yet) type DeleteBatchJobStatus struct { dropbox.Tagged // Complete : The batch delete has finished. Complete *DeleteBatchResult `json:"complete,omitempty"` // Failed : The batch delete has failed. Failed *DeleteBatchError `json:"failed,omitempty"` } // Valid tag values for DeleteBatchJobStatus const ( DeleteBatchJobStatusInProgress = "in_progress" DeleteBatchJobStatusComplete = "complete" DeleteBatchJobStatusFailed = "failed" DeleteBatchJobStatusOther = "other" ) // UnmarshalJSON deserializes into a DeleteBatchJobStatus instance func (u *DeleteBatchJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The batch delete has finished. Complete json.RawMessage `json:"complete,omitempty"` // Failed : The batch delete has failed. Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // DeleteBatchLaunch : Result returned by `deleteBatch` that may either launch // an asynchronous job or complete synchronously. type DeleteBatchLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *DeleteBatchResult `json:"complete,omitempty"` } // Valid tag values for DeleteBatchLaunch const ( DeleteBatchLaunchAsyncJobId = "async_job_id" DeleteBatchLaunchComplete = "complete" DeleteBatchLaunchOther = "other" ) // UnmarshalJSON deserializes into a DeleteBatchLaunch instance func (u *DeleteBatchLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // DeleteBatchResult : has no documentation (yet) type DeleteBatchResult struct { FileOpsResult // Entries : Each entry in `DeleteBatchArg.entries` will appear at the same // position inside `DeleteBatchResult.entries`. Entries []*DeleteBatchResultEntry `json:"entries"` } // NewDeleteBatchResult returns a new DeleteBatchResult instance func NewDeleteBatchResult(Entries []*DeleteBatchResultEntry) *DeleteBatchResult { s := new(DeleteBatchResult) s.Entries = Entries return s } // DeleteBatchResultData : has no documentation (yet) type DeleteBatchResultData struct { // Metadata : Metadata of the deleted object. Metadata IsMetadata `json:"metadata"` } // NewDeleteBatchResultData returns a new DeleteBatchResultData instance func NewDeleteBatchResultData(Metadata IsMetadata) *DeleteBatchResultData { s := new(DeleteBatchResultData) s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a DeleteBatchResultData instance func (u *DeleteBatchResultData) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : Metadata of the deleted object. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // DeleteBatchResultEntry : has no documentation (yet) type DeleteBatchResultEntry struct { dropbox.Tagged // Success : has no documentation (yet) Success *DeleteBatchResultData `json:"success,omitempty"` // Failure : has no documentation (yet) Failure *DeleteError `json:"failure,omitempty"` } // Valid tag values for DeleteBatchResultEntry const ( DeleteBatchResultEntrySuccess = "success" DeleteBatchResultEntryFailure = "failure" ) // UnmarshalJSON deserializes into a DeleteBatchResultEntry instance func (u *DeleteBatchResultEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : has no documentation (yet) Success json.RawMessage `json:"success,omitempty"` // Failure : has no documentation (yet) Failure json.RawMessage `json:"failure,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "failure": err = json.Unmarshal(w.Failure, &u.Failure) if err != nil { return err } } return nil } // DeleteError : has no documentation (yet) type DeleteError struct { dropbox.Tagged // PathLookup : has no documentation (yet) PathLookup *LookupError `json:"path_lookup,omitempty"` // PathWrite : has no documentation (yet) PathWrite *WriteError `json:"path_write,omitempty"` } // Valid tag values for DeleteError const ( DeleteErrorPathLookup = "path_lookup" DeleteErrorPathWrite = "path_write" DeleteErrorTooManyWriteOperations = "too_many_write_operations" DeleteErrorTooManyFiles = "too_many_files" DeleteErrorOther = "other" ) // UnmarshalJSON deserializes into a DeleteError instance func (u *DeleteError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // PathLookup : has no documentation (yet) PathLookup json.RawMessage `json:"path_lookup,omitempty"` // PathWrite : has no documentation (yet) PathWrite json.RawMessage `json:"path_write,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path_lookup": err = json.Unmarshal(w.PathLookup, &u.PathLookup) if err != nil { return err } case "path_write": err = json.Unmarshal(w.PathWrite, &u.PathWrite) if err != nil { return err } } return nil } // DeleteResult : has no documentation (yet) type DeleteResult struct { FileOpsResult // Metadata : Metadata of the deleted object. Metadata IsMetadata `json:"metadata"` } // NewDeleteResult returns a new DeleteResult instance func NewDeleteResult(Metadata IsMetadata) *DeleteResult { s := new(DeleteResult) s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a DeleteResult instance func (u *DeleteResult) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : Metadata of the deleted object. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // Metadata : Metadata for a file or folder. type Metadata struct { // Name : The last component of the path (including extension). This never // contains a slash. Name string `json:"name"` // PathLower : The lowercased full path in the user's Dropbox. This always // starts with a slash. This field will be null if the file or folder is not // mounted. PathLower string `json:"path_lower,omitempty"` // PathDisplay : The cased path to be used for display purposes only. In // rare instances the casing will not correctly match the user's filesystem, // but this behavior will match the path provided in the Core API v1, and at // least the last path component will have the correct casing. Changes to // only the casing of paths won't be returned by `listFolderContinue`. This // field will be null if the file or folder is not mounted. PathDisplay string `json:"path_display,omitempty"` // ParentSharedFolderId : Please use // `FileSharingInfo.parent_shared_folder_id` or // `FolderSharingInfo.parent_shared_folder_id` instead. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` } // NewMetadata returns a new Metadata instance func NewMetadata(Name string) *Metadata { s := new(Metadata) s.Name = Name return s } // IsMetadata is the interface type for Metadata and its subtypes type IsMetadata interface { IsMetadata() } // IsMetadata implements the IsMetadata interface func (u *Metadata) IsMetadata() {} type metadataUnion struct { dropbox.Tagged // File : has no documentation (yet) File *FileMetadata `json:"file,omitempty"` // Folder : has no documentation (yet) Folder *FolderMetadata `json:"folder,omitempty"` // Deleted : has no documentation (yet) Deleted *DeletedMetadata `json:"deleted,omitempty"` } // Valid tag values for Metadata const ( MetadataFile = "file" MetadataFolder = "folder" MetadataDeleted = "deleted" ) // UnmarshalJSON deserializes into a metadataUnion instance func (u *metadataUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // File : has no documentation (yet) File json.RawMessage `json:"file,omitempty"` // Folder : has no documentation (yet) Folder json.RawMessage `json:"folder,omitempty"` // Deleted : has no documentation (yet) Deleted json.RawMessage `json:"deleted,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "file": err = json.Unmarshal(body, &u.File) if err != nil { return err } case "folder": err = json.Unmarshal(body, &u.Folder) if err != nil { return err } case "deleted": err = json.Unmarshal(body, &u.Deleted) if err != nil { return err } } return nil } // IsMetadataFromJSON converts JSON to a concrete IsMetadata instance func IsMetadataFromJSON(data []byte) (IsMetadata, error) { var t metadataUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "file": return t.File, nil case "folder": return t.Folder, nil case "deleted": return t.Deleted, nil } return nil, nil } // DeletedMetadata : Indicates that there used to be a file or folder at this // path, but it no longer exists. type DeletedMetadata struct { Metadata } // NewDeletedMetadata returns a new DeletedMetadata instance func NewDeletedMetadata(Name string) *DeletedMetadata { s := new(DeletedMetadata) s.Name = Name return s } // Dimensions : Dimensions for a photo or video. type Dimensions struct { // Height : Height of the photo/video. Height uint64 `json:"height"` // Width : Width of the photo/video. Width uint64 `json:"width"` } // NewDimensions returns a new Dimensions instance func NewDimensions(Height uint64, Width uint64) *Dimensions { s := new(Dimensions) s.Height = Height s.Width = Width return s } // DownloadArg : has no documentation (yet) type DownloadArg struct { // Path : The path of the file to download. Path string `json:"path"` // Rev : Please specify revision in `path` instead. Rev string `json:"rev,omitempty"` // ExtraHeaders can be used to pass Range, If-None-Match headers ExtraHeaders map[string]string `json:"-"` } // NewDownloadArg returns a new DownloadArg instance func NewDownloadArg(Path string) *DownloadArg { s := new(DownloadArg) s.Path = Path return s } // DownloadError : has no documentation (yet) type DownloadError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for DownloadError const ( DownloadErrorPath = "path" DownloadErrorOther = "other" ) // UnmarshalJSON deserializes into a DownloadError instance func (u *DownloadError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // DownloadZipArg : has no documentation (yet) type DownloadZipArg struct { // Path : The path of the folder to download. Path string `json:"path"` } // NewDownloadZipArg returns a new DownloadZipArg instance func NewDownloadZipArg(Path string) *DownloadZipArg { s := new(DownloadZipArg) s.Path = Path return s } // DownloadZipError : has no documentation (yet) type DownloadZipError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for DownloadZipError const ( DownloadZipErrorPath = "path" DownloadZipErrorTooLarge = "too_large" DownloadZipErrorTooManyFiles = "too_many_files" DownloadZipErrorOther = "other" ) // UnmarshalJSON deserializes into a DownloadZipError instance func (u *DownloadZipError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // DownloadZipResult : has no documentation (yet) type DownloadZipResult struct { // Metadata : has no documentation (yet) Metadata *FolderMetadata `json:"metadata"` } // NewDownloadZipResult returns a new DownloadZipResult instance func NewDownloadZipResult(Metadata *FolderMetadata) *DownloadZipResult { s := new(DownloadZipResult) s.Metadata = Metadata return s } // FileMetadata : has no documentation (yet) type FileMetadata struct { Metadata // Id : A unique identifier for the file. Id string `json:"id"` // ClientModified : For files, this is the modification time set by the // desktop client when the file was added to Dropbox. Since this time is not // verified (the Dropbox server stores whatever the desktop client sends // up), this should only be used for display purposes (such as sorting) and // not, for example, to determine if a file has changed or not. ClientModified time.Time `json:"client_modified"` // ServerModified : The last time the file was modified on Dropbox. ServerModified time.Time `json:"server_modified"` // Rev : A unique identifier for the current revision of a file. This field // is the same rev as elsewhere in the API and can be used to detect changes // and avoid conflicts. Rev string `json:"rev"` // Size : The file size in bytes. Size uint64 `json:"size"` // MediaInfo : Additional information if the file is a photo or video. MediaInfo *MediaInfo `json:"media_info,omitempty"` // SymlinkInfo : Set if this file is a symlink. SymlinkInfo *SymlinkInfo `json:"symlink_info,omitempty"` // SharingInfo : Set if this file is contained in a shared folder. SharingInfo *FileSharingInfo `json:"sharing_info,omitempty"` // PropertyGroups : Additional information if the file has custom properties // with the property template specified. PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"` // HasExplicitSharedMembers : This flag will only be present if // include_has_explicit_shared_members is true in `listFolder` or // `getMetadata`. If this flag is present, it will be true if this file has // any explicit shared members. This is different from sharing_info in that // this could be true in the case where a file has explicit members but is // not contained within a shared folder. HasExplicitSharedMembers bool `json:"has_explicit_shared_members,omitempty"` // ContentHash : A hash of the file content. This field can be used to // verify data integrity. For more information see our `Content hash` // page. ContentHash string `json:"content_hash,omitempty"` } // NewFileMetadata returns a new FileMetadata instance func NewFileMetadata(Name string, Id string, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileMetadata { s := new(FileMetadata) s.Name = Name s.Id = Id s.ClientModified = ClientModified s.ServerModified = ServerModified s.Rev = Rev s.Size = Size return s } // SharingInfo : Sharing info for a file or folder. type SharingInfo struct { // ReadOnly : True if the file or folder is inside a read-only shared // folder. ReadOnly bool `json:"read_only"` } // NewSharingInfo returns a new SharingInfo instance func NewSharingInfo(ReadOnly bool) *SharingInfo { s := new(SharingInfo) s.ReadOnly = ReadOnly return s } // FileSharingInfo : Sharing info for a file which is contained by a shared // folder. type FileSharingInfo struct { SharingInfo // ParentSharedFolderId : ID of shared folder that holds this file. ParentSharedFolderId string `json:"parent_shared_folder_id"` // ModifiedBy : The last user who modified the file. This field will be null // if the user's account has been deleted. ModifiedBy string `json:"modified_by,omitempty"` } // NewFileSharingInfo returns a new FileSharingInfo instance func NewFileSharingInfo(ReadOnly bool, ParentSharedFolderId string) *FileSharingInfo { s := new(FileSharingInfo) s.ReadOnly = ReadOnly s.ParentSharedFolderId = ParentSharedFolderId return s } // FolderMetadata : has no documentation (yet) type FolderMetadata struct { Metadata // Id : A unique identifier for the folder. Id string `json:"id"` // SharedFolderId : Please use `sharing_info` instead. SharedFolderId string `json:"shared_folder_id,omitempty"` // SharingInfo : Set if the folder is contained in a shared folder or is a // shared folder mount point. SharingInfo *FolderSharingInfo `json:"sharing_info,omitempty"` // PropertyGroups : Additional information if the file has custom properties // with the property template specified. Note that only properties // associated with user-owned templates, not team-owned templates, can be // attached to folders. PropertyGroups []*file_properties.PropertyGroup `json:"property_groups,omitempty"` } // NewFolderMetadata returns a new FolderMetadata instance func NewFolderMetadata(Name string, Id string) *FolderMetadata { s := new(FolderMetadata) s.Name = Name s.Id = Id return s } // FolderSharingInfo : Sharing info for a folder which is contained in a shared // folder or is a shared folder mount point. type FolderSharingInfo struct { SharingInfo // ParentSharedFolderId : Set if the folder is contained by a shared folder. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` // SharedFolderId : If this folder is a shared folder mount point, the ID of // the shared folder mounted at this location. SharedFolderId string `json:"shared_folder_id,omitempty"` // TraverseOnly : Specifies that the folder can only be traversed and the // user can only see a limited subset of the contents of this folder because // they don't have read access to this folder. They do, however, have access // to some sub folder. TraverseOnly bool `json:"traverse_only"` // NoAccess : Specifies that the folder cannot be accessed by the user. NoAccess bool `json:"no_access"` } // NewFolderSharingInfo returns a new FolderSharingInfo instance func NewFolderSharingInfo(ReadOnly bool) *FolderSharingInfo { s := new(FolderSharingInfo) s.ReadOnly = ReadOnly s.TraverseOnly = false s.NoAccess = false return s } // GetCopyReferenceArg : has no documentation (yet) type GetCopyReferenceArg struct { // Path : The path to the file or folder you want to get a copy reference // to. Path string `json:"path"` } // NewGetCopyReferenceArg returns a new GetCopyReferenceArg instance func NewGetCopyReferenceArg(Path string) *GetCopyReferenceArg { s := new(GetCopyReferenceArg) s.Path = Path return s } // GetCopyReferenceError : has no documentation (yet) type GetCopyReferenceError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for GetCopyReferenceError const ( GetCopyReferenceErrorPath = "path" GetCopyReferenceErrorOther = "other" ) // UnmarshalJSON deserializes into a GetCopyReferenceError instance func (u *GetCopyReferenceError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // GetCopyReferenceResult : has no documentation (yet) type GetCopyReferenceResult struct { // Metadata : Metadata of the file or folder. Metadata IsMetadata `json:"metadata"` // CopyReference : A copy reference to the file or folder. CopyReference string `json:"copy_reference"` // Expires : The expiration date of the copy reference. This value is // currently set to be far enough in the future so that expiration is // effectively not an issue. Expires time.Time `json:"expires"` } // NewGetCopyReferenceResult returns a new GetCopyReferenceResult instance func NewGetCopyReferenceResult(Metadata IsMetadata, CopyReference string, Expires time.Time) *GetCopyReferenceResult { s := new(GetCopyReferenceResult) s.Metadata = Metadata s.CopyReference = CopyReference s.Expires = Expires return s } // UnmarshalJSON deserializes into a GetCopyReferenceResult instance func (u *GetCopyReferenceResult) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : Metadata of the file or folder. Metadata json.RawMessage `json:"metadata"` // CopyReference : A copy reference to the file or folder. CopyReference string `json:"copy_reference"` // Expires : The expiration date of the copy reference. This value is // currently set to be far enough in the future so that expiration is // effectively not an issue. Expires time.Time `json:"expires"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata u.CopyReference = w.CopyReference u.Expires = w.Expires return nil } // GetTemporaryLinkArg : has no documentation (yet) type GetTemporaryLinkArg struct { // Path : The path to the file you want a temporary link to. Path string `json:"path"` } // NewGetTemporaryLinkArg returns a new GetTemporaryLinkArg instance func NewGetTemporaryLinkArg(Path string) *GetTemporaryLinkArg { s := new(GetTemporaryLinkArg) s.Path = Path return s } // GetTemporaryLinkError : has no documentation (yet) type GetTemporaryLinkError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for GetTemporaryLinkError const ( GetTemporaryLinkErrorPath = "path" GetTemporaryLinkErrorOther = "other" ) // UnmarshalJSON deserializes into a GetTemporaryLinkError instance func (u *GetTemporaryLinkError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // GetTemporaryLinkResult : has no documentation (yet) type GetTemporaryLinkResult struct { // Metadata : Metadata of the file. Metadata *FileMetadata `json:"metadata"` // Link : The temporary link which can be used to stream content the file. Link string `json:"link"` } // NewGetTemporaryLinkResult returns a new GetTemporaryLinkResult instance func NewGetTemporaryLinkResult(Metadata *FileMetadata, Link string) *GetTemporaryLinkResult { s := new(GetTemporaryLinkResult) s.Metadata = Metadata s.Link = Link return s } // GetTemporaryUploadLinkArg : has no documentation (yet) type GetTemporaryUploadLinkArg struct { // CommitInfo : Contains the path and other optional modifiers for the // future upload commit. Equivalent to the parameters provided to `upload`. CommitInfo *CommitInfo `json:"commit_info"` // Duration : How long before this link expires, in seconds. Attempting to // start an upload with this link longer than this period of time after // link creation will result in an error. Duration float64 `json:"duration"` } // NewGetTemporaryUploadLinkArg returns a new GetTemporaryUploadLinkArg instance func NewGetTemporaryUploadLinkArg(CommitInfo *CommitInfo) *GetTemporaryUploadLinkArg { s := new(GetTemporaryUploadLinkArg) s.CommitInfo = CommitInfo s.Duration = 14400.0 return s } // GetTemporaryUploadLinkResult : has no documentation (yet) type GetTemporaryUploadLinkResult struct { // Link : The temporary link which can be used to stream a file to a Dropbox // location. Link string `json:"link"` } // NewGetTemporaryUploadLinkResult returns a new GetTemporaryUploadLinkResult instance func NewGetTemporaryUploadLinkResult(Link string) *GetTemporaryUploadLinkResult { s := new(GetTemporaryUploadLinkResult) s.Link = Link return s } // GetThumbnailBatchArg : Arguments for `getThumbnailBatch`. type GetThumbnailBatchArg struct { // Entries : List of files to get thumbnails. Entries []*ThumbnailArg `json:"entries"` } // NewGetThumbnailBatchArg returns a new GetThumbnailBatchArg instance func NewGetThumbnailBatchArg(Entries []*ThumbnailArg) *GetThumbnailBatchArg { s := new(GetThumbnailBatchArg) s.Entries = Entries return s } // GetThumbnailBatchError : has no documentation (yet) type GetThumbnailBatchError struct { dropbox.Tagged } // Valid tag values for GetThumbnailBatchError const ( GetThumbnailBatchErrorTooManyFiles = "too_many_files" GetThumbnailBatchErrorOther = "other" ) // GetThumbnailBatchResult : has no documentation (yet) type GetThumbnailBatchResult struct { // Entries : List of files and their thumbnails. Entries []*GetThumbnailBatchResultEntry `json:"entries"` } // NewGetThumbnailBatchResult returns a new GetThumbnailBatchResult instance func NewGetThumbnailBatchResult(Entries []*GetThumbnailBatchResultEntry) *GetThumbnailBatchResult { s := new(GetThumbnailBatchResult) s.Entries = Entries return s } // GetThumbnailBatchResultData : has no documentation (yet) type GetThumbnailBatchResultData struct { // Metadata : has no documentation (yet) Metadata *FileMetadata `json:"metadata"` // Thumbnail : A string containing the base64-encoded thumbnail data for // this file. Thumbnail string `json:"thumbnail"` } // NewGetThumbnailBatchResultData returns a new GetThumbnailBatchResultData instance func NewGetThumbnailBatchResultData(Metadata *FileMetadata, Thumbnail string) *GetThumbnailBatchResultData { s := new(GetThumbnailBatchResultData) s.Metadata = Metadata s.Thumbnail = Thumbnail return s } // GetThumbnailBatchResultEntry : has no documentation (yet) type GetThumbnailBatchResultEntry struct { dropbox.Tagged // Success : has no documentation (yet) Success *GetThumbnailBatchResultData `json:"success,omitempty"` // Failure : The result for this file if it was an error. Failure *ThumbnailError `json:"failure,omitempty"` } // Valid tag values for GetThumbnailBatchResultEntry const ( GetThumbnailBatchResultEntrySuccess = "success" GetThumbnailBatchResultEntryFailure = "failure" GetThumbnailBatchResultEntryOther = "other" ) // UnmarshalJSON deserializes into a GetThumbnailBatchResultEntry instance func (u *GetThumbnailBatchResultEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : has no documentation (yet) Success json.RawMessage `json:"success,omitempty"` // Failure : The result for this file if it was an error. Failure json.RawMessage `json:"failure,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "failure": err = json.Unmarshal(w.Failure, &u.Failure) if err != nil { return err } } return nil } // GpsCoordinates : GPS coordinates for a photo or video. type GpsCoordinates struct { // Latitude : Latitude of the GPS coordinates. Latitude float64 `json:"latitude"` // Longitude : Longitude of the GPS coordinates. Longitude float64 `json:"longitude"` } // NewGpsCoordinates returns a new GpsCoordinates instance func NewGpsCoordinates(Latitude float64, Longitude float64) *GpsCoordinates { s := new(GpsCoordinates) s.Latitude = Latitude s.Longitude = Longitude return s } // ListFolderArg : has no documentation (yet) type ListFolderArg struct { // Path : A unique identifier for the file. Path string `json:"path"` // Recursive : If true, the list folder operation will be applied // recursively to all subfolders and the response will contain contents of // all subfolders. Recursive bool `json:"recursive"` // IncludeMediaInfo : If true, `FileMetadata.media_info` is set for photo // and video. IncludeMediaInfo bool `json:"include_media_info"` // IncludeDeleted : If true, the results will include entries for files and // folders that used to exist but were deleted. IncludeDeleted bool `json:"include_deleted"` // IncludeHasExplicitSharedMembers : If true, the results will include a // flag for each file indicating whether or not that file has any explicit // members. IncludeHasExplicitSharedMembers bool `json:"include_has_explicit_shared_members"` // IncludeMountedFolders : If true, the results will include entries under // mounted folders which includes app folder, shared folder and team folder. IncludeMountedFolders bool `json:"include_mounted_folders"` // Limit : The maximum number of results to return per request. Note: This // is an approximate number and there can be slightly more entries returned // in some cases. Limit uint32 `json:"limit,omitempty"` // SharedLink : A shared link to list the contents of. If the link is // password-protected, the password must be provided. If this field is // present, `ListFolderArg.path` will be relative to root of the shared // link. Only non-recursive mode is supported for shared link. SharedLink *SharedLink `json:"shared_link,omitempty"` // IncludePropertyGroups : If set to a valid list of template IDs, // `FileMetadata.property_groups` is set if there exists property data // associated with the file and each of the listed templates. IncludePropertyGroups *file_properties.TemplateFilterBase `json:"include_property_groups,omitempty"` } // NewListFolderArg returns a new ListFolderArg instance func NewListFolderArg(Path string) *ListFolderArg { s := new(ListFolderArg) s.Path = Path s.Recursive = false s.IncludeMediaInfo = false s.IncludeDeleted = false s.IncludeHasExplicitSharedMembers = false s.IncludeMountedFolders = true return s } // ListFolderContinueArg : has no documentation (yet) type ListFolderContinueArg struct { // Cursor : The cursor returned by your last call to `listFolder` or // `listFolderContinue`. Cursor string `json:"cursor"` } // NewListFolderContinueArg returns a new ListFolderContinueArg instance func NewListFolderContinueArg(Cursor string) *ListFolderContinueArg { s := new(ListFolderContinueArg) s.Cursor = Cursor return s } // ListFolderContinueError : has no documentation (yet) type ListFolderContinueError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for ListFolderContinueError const ( ListFolderContinueErrorPath = "path" ListFolderContinueErrorReset = "reset" ListFolderContinueErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFolderContinueError instance func (u *ListFolderContinueError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ListFolderError : has no documentation (yet) type ListFolderError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for ListFolderError const ( ListFolderErrorPath = "path" ListFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFolderError instance func (u *ListFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ListFolderGetLatestCursorResult : has no documentation (yet) type ListFolderGetLatestCursorResult struct { // Cursor : Pass the cursor into `listFolderContinue` to see what's changed // in the folder since your previous query. Cursor string `json:"cursor"` } // NewListFolderGetLatestCursorResult returns a new ListFolderGetLatestCursorResult instance func NewListFolderGetLatestCursorResult(Cursor string) *ListFolderGetLatestCursorResult { s := new(ListFolderGetLatestCursorResult) s.Cursor = Cursor return s } // ListFolderLongpollArg : has no documentation (yet) type ListFolderLongpollArg struct { // Cursor : A cursor as returned by `listFolder` or `listFolderContinue`. // Cursors retrieved by setting `ListFolderArg.include_media_info` to true // are not supported. Cursor string `json:"cursor"` // Timeout : A timeout in seconds. The request will block for at most this // length of time, plus up to 90 seconds of random jitter added to avoid the // thundering herd problem. Care should be taken when using this parameter, // as some network infrastructure does not support long timeouts. Timeout uint64 `json:"timeout"` } // NewListFolderLongpollArg returns a new ListFolderLongpollArg instance func NewListFolderLongpollArg(Cursor string) *ListFolderLongpollArg { s := new(ListFolderLongpollArg) s.Cursor = Cursor s.Timeout = 30 return s } // ListFolderLongpollError : has no documentation (yet) type ListFolderLongpollError struct { dropbox.Tagged } // Valid tag values for ListFolderLongpollError const ( ListFolderLongpollErrorReset = "reset" ListFolderLongpollErrorOther = "other" ) // ListFolderLongpollResult : has no documentation (yet) type ListFolderLongpollResult struct { // Changes : Indicates whether new changes are available. If true, call // `listFolderContinue` to retrieve the changes. Changes bool `json:"changes"` // Backoff : If present, backoff for at least this many seconds before // calling `listFolderLongpoll` again. Backoff uint64 `json:"backoff,omitempty"` } // NewListFolderLongpollResult returns a new ListFolderLongpollResult instance func NewListFolderLongpollResult(Changes bool) *ListFolderLongpollResult { s := new(ListFolderLongpollResult) s.Changes = Changes return s } // ListFolderResult : has no documentation (yet) type ListFolderResult struct { // Entries : The files and (direct) subfolders in the folder. Entries []IsMetadata `json:"entries"` // Cursor : Pass the cursor into `listFolderContinue` to see what's changed // in the folder since your previous query. Cursor string `json:"cursor"` // HasMore : If true, then there are more entries available. Pass the cursor // to `listFolderContinue` to retrieve the rest. HasMore bool `json:"has_more"` } // NewListFolderResult returns a new ListFolderResult instance func NewListFolderResult(Entries []IsMetadata, Cursor string, HasMore bool) *ListFolderResult { s := new(ListFolderResult) s.Entries = Entries s.Cursor = Cursor s.HasMore = HasMore return s } // UnmarshalJSON deserializes into a ListFolderResult instance func (u *ListFolderResult) UnmarshalJSON(b []byte) error { type wrap struct { // Entries : The files and (direct) subfolders in the folder. Entries []json.RawMessage `json:"entries"` // Cursor : Pass the cursor into `listFolderContinue` to see what's // changed in the folder since your previous query. Cursor string `json:"cursor"` // HasMore : If true, then there are more entries available. Pass the // cursor to `listFolderContinue` to retrieve the rest. HasMore bool `json:"has_more"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } u.Entries = make([]IsMetadata, len(w.Entries)) for i, e := range w.Entries { v, err := IsMetadataFromJSON(e) if err != nil { return err } u.Entries[i] = v } u.Cursor = w.Cursor u.HasMore = w.HasMore return nil } // ListRevisionsArg : has no documentation (yet) type ListRevisionsArg struct { // Path : The path to the file you want to see the revisions of. Path string `json:"path"` // Mode : Determines the behavior of the API in listing the revisions for a // given file path or id. Mode *ListRevisionsMode `json:"mode"` // Limit : The maximum number of revision entries returned. Limit uint64 `json:"limit"` } // NewListRevisionsArg returns a new ListRevisionsArg instance func NewListRevisionsArg(Path string) *ListRevisionsArg { s := new(ListRevisionsArg) s.Path = Path s.Mode = &ListRevisionsMode{Tagged: dropbox.Tagged{"path"}} s.Limit = 10 return s } // ListRevisionsError : has no documentation (yet) type ListRevisionsError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for ListRevisionsError const ( ListRevisionsErrorPath = "path" ListRevisionsErrorOther = "other" ) // UnmarshalJSON deserializes into a ListRevisionsError instance func (u *ListRevisionsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ListRevisionsMode : has no documentation (yet) type ListRevisionsMode struct { dropbox.Tagged } // Valid tag values for ListRevisionsMode const ( ListRevisionsModePath = "path" ListRevisionsModeId = "id" ListRevisionsModeOther = "other" ) // ListRevisionsResult : has no documentation (yet) type ListRevisionsResult struct { // IsDeleted : If the file identified by the latest revision in the response // is either deleted or moved. IsDeleted bool `json:"is_deleted"` // ServerDeleted : The time of deletion if the file was deleted. ServerDeleted time.Time `json:"server_deleted,omitempty"` // Entries : The revisions for the file. Only revisions that are not deleted // will show up here. Entries []*FileMetadata `json:"entries"` } // NewListRevisionsResult returns a new ListRevisionsResult instance func NewListRevisionsResult(IsDeleted bool, Entries []*FileMetadata) *ListRevisionsResult { s := new(ListRevisionsResult) s.IsDeleted = IsDeleted s.Entries = Entries return s } // LookupError : has no documentation (yet) type LookupError struct { dropbox.Tagged // MalformedPath : The given path does not satisfy the required path format. // Please refer to the `Path formats documentation` // // for more information. MalformedPath string `json:"malformed_path,omitempty"` } // Valid tag values for LookupError const ( LookupErrorMalformedPath = "malformed_path" LookupErrorNotFound = "not_found" LookupErrorNotFile = "not_file" LookupErrorNotFolder = "not_folder" LookupErrorRestrictedContent = "restricted_content" LookupErrorOther = "other" ) // UnmarshalJSON deserializes into a LookupError instance func (u *LookupError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MalformedPath : The given path does not satisfy the required path // format. Please refer to the `Path formats documentation` // // for more information. MalformedPath json.RawMessage `json:"malformed_path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "malformed_path": err = json.Unmarshal(body, &u.MalformedPath) if err != nil { return err } } return nil } // MediaInfo : has no documentation (yet) type MediaInfo struct { dropbox.Tagged // Metadata : The metadata for the photo/video. Metadata IsMediaMetadata `json:"metadata,omitempty"` } // Valid tag values for MediaInfo const ( MediaInfoPending = "pending" MediaInfoMetadata = "metadata" ) // UnmarshalJSON deserializes into a MediaInfo instance func (u *MediaInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Metadata : The metadata for the photo/video. Metadata json.RawMessage `json:"metadata,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "metadata": u.Metadata, err = IsMediaMetadataFromJSON(body) if err != nil { return err } } return nil } // MediaMetadata : Metadata for a photo or video. type MediaMetadata struct { // Dimensions : Dimension of the photo/video. Dimensions *Dimensions `json:"dimensions,omitempty"` // Location : The GPS coordinate of the photo/video. Location *GpsCoordinates `json:"location,omitempty"` // TimeTaken : The timestamp when the photo/video is taken. TimeTaken time.Time `json:"time_taken,omitempty"` } // NewMediaMetadata returns a new MediaMetadata instance func NewMediaMetadata() *MediaMetadata { s := new(MediaMetadata) return s } // IsMediaMetadata is the interface type for MediaMetadata and its subtypes type IsMediaMetadata interface { IsMediaMetadata() } // IsMediaMetadata implements the IsMediaMetadata interface func (u *MediaMetadata) IsMediaMetadata() {} type mediaMetadataUnion struct { dropbox.Tagged // Photo : has no documentation (yet) Photo *PhotoMetadata `json:"photo,omitempty"` // Video : has no documentation (yet) Video *VideoMetadata `json:"video,omitempty"` } // Valid tag values for MediaMetadata const ( MediaMetadataPhoto = "photo" MediaMetadataVideo = "video" ) // UnmarshalJSON deserializes into a mediaMetadataUnion instance func (u *mediaMetadataUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Photo : has no documentation (yet) Photo json.RawMessage `json:"photo,omitempty"` // Video : has no documentation (yet) Video json.RawMessage `json:"video,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "photo": err = json.Unmarshal(body, &u.Photo) if err != nil { return err } case "video": err = json.Unmarshal(body, &u.Video) if err != nil { return err } } return nil } // IsMediaMetadataFromJSON converts JSON to a concrete IsMediaMetadata instance func IsMediaMetadataFromJSON(data []byte) (IsMediaMetadata, error) { var t mediaMetadataUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "photo": return t.Photo, nil case "video": return t.Video, nil } return nil, nil } // RelocationBatchArgBase : has no documentation (yet) type RelocationBatchArgBase struct { // Entries : List of entries to be moved or copied. Each entry is // `RelocationPath`. Entries []*RelocationPath `json:"entries"` // Autorename : If there's a conflict with any file, have the Dropbox server // try to autorename that file to avoid the conflict. Autorename bool `json:"autorename"` } // NewRelocationBatchArgBase returns a new RelocationBatchArgBase instance func NewRelocationBatchArgBase(Entries []*RelocationPath) *RelocationBatchArgBase { s := new(RelocationBatchArgBase) s.Entries = Entries s.Autorename = false return s } // MoveBatchArg : has no documentation (yet) type MoveBatchArg struct { RelocationBatchArgBase // AllowOwnershipTransfer : Allow moves by owner even if it would result in // an ownership transfer for the content being moved. This does not apply to // copies. AllowOwnershipTransfer bool `json:"allow_ownership_transfer"` } // NewMoveBatchArg returns a new MoveBatchArg instance func NewMoveBatchArg(Entries []*RelocationPath) *MoveBatchArg { s := new(MoveBatchArg) s.Entries = Entries s.Autorename = false s.AllowOwnershipTransfer = false return s } // PhotoMetadata : Metadata for a photo. type PhotoMetadata struct { MediaMetadata } // NewPhotoMetadata returns a new PhotoMetadata instance func NewPhotoMetadata() *PhotoMetadata { s := new(PhotoMetadata) return s } // PreviewArg : has no documentation (yet) type PreviewArg struct { // Path : The path of the file to preview. Path string `json:"path"` // Rev : Please specify revision in `path` instead. Rev string `json:"rev,omitempty"` } // NewPreviewArg returns a new PreviewArg instance func NewPreviewArg(Path string) *PreviewArg { s := new(PreviewArg) s.Path = Path return s } // PreviewError : has no documentation (yet) type PreviewError struct { dropbox.Tagged // Path : An error occurs when downloading metadata for the file. Path *LookupError `json:"path,omitempty"` } // Valid tag values for PreviewError const ( PreviewErrorPath = "path" PreviewErrorInProgress = "in_progress" PreviewErrorUnsupportedExtension = "unsupported_extension" PreviewErrorUnsupportedContent = "unsupported_content" ) // UnmarshalJSON deserializes into a PreviewError instance func (u *PreviewError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : An error occurs when downloading metadata for the file. Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // RelocationPath : has no documentation (yet) type RelocationPath struct { // FromPath : Path in the user's Dropbox to be copied or moved. FromPath string `json:"from_path"` // ToPath : Path in the user's Dropbox that is the destination. ToPath string `json:"to_path"` } // NewRelocationPath returns a new RelocationPath instance func NewRelocationPath(FromPath string, ToPath string) *RelocationPath { s := new(RelocationPath) s.FromPath = FromPath s.ToPath = ToPath return s } // RelocationArg : has no documentation (yet) type RelocationArg struct { RelocationPath // AllowSharedFolder : If true, `copy` will copy contents in shared folder, // otherwise `RelocationError.cant_copy_shared_folder` will be returned if // `from_path` contains shared folder. This field is always true for `move`. AllowSharedFolder bool `json:"allow_shared_folder"` // Autorename : If there's a conflict, have the Dropbox server try to // autorename the file to avoid the conflict. Autorename bool `json:"autorename"` // AllowOwnershipTransfer : Allow moves by owner even if it would result in // an ownership transfer for the content being moved. This does not apply to // copies. AllowOwnershipTransfer bool `json:"allow_ownership_transfer"` } // NewRelocationArg returns a new RelocationArg instance func NewRelocationArg(FromPath string, ToPath string) *RelocationArg { s := new(RelocationArg) s.FromPath = FromPath s.ToPath = ToPath s.AllowSharedFolder = false s.Autorename = false s.AllowOwnershipTransfer = false return s } // RelocationBatchArg : has no documentation (yet) type RelocationBatchArg struct { RelocationBatchArgBase // AllowSharedFolder : If true, `copyBatch` will copy contents in shared // folder, otherwise `RelocationError.cant_copy_shared_folder` will be // returned if `RelocationPath.from_path` contains shared folder. This field // is always true for `moveBatch`. AllowSharedFolder bool `json:"allow_shared_folder"` // AllowOwnershipTransfer : Allow moves by owner even if it would result in // an ownership transfer for the content being moved. This does not apply to // copies. AllowOwnershipTransfer bool `json:"allow_ownership_transfer"` } // NewRelocationBatchArg returns a new RelocationBatchArg instance func NewRelocationBatchArg(Entries []*RelocationPath) *RelocationBatchArg { s := new(RelocationBatchArg) s.Entries = Entries s.Autorename = false s.AllowSharedFolder = false s.AllowOwnershipTransfer = false return s } // RelocationError : has no documentation (yet) type RelocationError struct { dropbox.Tagged // FromLookup : has no documentation (yet) FromLookup *LookupError `json:"from_lookup,omitempty"` // FromWrite : has no documentation (yet) FromWrite *WriteError `json:"from_write,omitempty"` // To : has no documentation (yet) To *WriteError `json:"to,omitempty"` } // Valid tag values for RelocationError const ( RelocationErrorFromLookup = "from_lookup" RelocationErrorFromWrite = "from_write" RelocationErrorTo = "to" RelocationErrorCantCopySharedFolder = "cant_copy_shared_folder" RelocationErrorCantNestSharedFolder = "cant_nest_shared_folder" RelocationErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself" RelocationErrorTooManyFiles = "too_many_files" RelocationErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths" RelocationErrorCantTransferOwnership = "cant_transfer_ownership" RelocationErrorInsufficientQuota = "insufficient_quota" RelocationErrorInternalError = "internal_error" RelocationErrorOther = "other" ) // UnmarshalJSON deserializes into a RelocationError instance func (u *RelocationError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // FromLookup : has no documentation (yet) FromLookup json.RawMessage `json:"from_lookup,omitempty"` // FromWrite : has no documentation (yet) FromWrite json.RawMessage `json:"from_write,omitempty"` // To : has no documentation (yet) To json.RawMessage `json:"to,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "from_lookup": err = json.Unmarshal(w.FromLookup, &u.FromLookup) if err != nil { return err } case "from_write": err = json.Unmarshal(w.FromWrite, &u.FromWrite) if err != nil { return err } case "to": err = json.Unmarshal(w.To, &u.To) if err != nil { return err } } return nil } // RelocationBatchError : has no documentation (yet) type RelocationBatchError struct { dropbox.Tagged // FromLookup : has no documentation (yet) FromLookup *LookupError `json:"from_lookup,omitempty"` // FromWrite : has no documentation (yet) FromWrite *WriteError `json:"from_write,omitempty"` // To : has no documentation (yet) To *WriteError `json:"to,omitempty"` } // Valid tag values for RelocationBatchError const ( RelocationBatchErrorFromLookup = "from_lookup" RelocationBatchErrorFromWrite = "from_write" RelocationBatchErrorTo = "to" RelocationBatchErrorCantCopySharedFolder = "cant_copy_shared_folder" RelocationBatchErrorCantNestSharedFolder = "cant_nest_shared_folder" RelocationBatchErrorCantMoveFolderIntoItself = "cant_move_folder_into_itself" RelocationBatchErrorTooManyFiles = "too_many_files" RelocationBatchErrorDuplicatedOrNestedPaths = "duplicated_or_nested_paths" RelocationBatchErrorCantTransferOwnership = "cant_transfer_ownership" RelocationBatchErrorInsufficientQuota = "insufficient_quota" RelocationBatchErrorInternalError = "internal_error" RelocationBatchErrorOther = "other" RelocationBatchErrorTooManyWriteOperations = "too_many_write_operations" ) // UnmarshalJSON deserializes into a RelocationBatchError instance func (u *RelocationBatchError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // FromLookup : has no documentation (yet) FromLookup json.RawMessage `json:"from_lookup,omitempty"` // FromWrite : has no documentation (yet) FromWrite json.RawMessage `json:"from_write,omitempty"` // To : has no documentation (yet) To json.RawMessage `json:"to,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "from_lookup": err = json.Unmarshal(w.FromLookup, &u.FromLookup) if err != nil { return err } case "from_write": err = json.Unmarshal(w.FromWrite, &u.FromWrite) if err != nil { return err } case "to": err = json.Unmarshal(w.To, &u.To) if err != nil { return err } } return nil } // RelocationBatchErrorEntry : has no documentation (yet) type RelocationBatchErrorEntry struct { dropbox.Tagged // RelocationError : User errors that retry won't help. RelocationError *RelocationError `json:"relocation_error,omitempty"` } // Valid tag values for RelocationBatchErrorEntry const ( RelocationBatchErrorEntryRelocationError = "relocation_error" RelocationBatchErrorEntryInternalError = "internal_error" RelocationBatchErrorEntryTooManyWriteOperations = "too_many_write_operations" RelocationBatchErrorEntryOther = "other" ) // UnmarshalJSON deserializes into a RelocationBatchErrorEntry instance func (u *RelocationBatchErrorEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // RelocationError : User errors that retry won't help. RelocationError json.RawMessage `json:"relocation_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "relocation_error": err = json.Unmarshal(w.RelocationError, &u.RelocationError) if err != nil { return err } } return nil } // RelocationBatchJobStatus : has no documentation (yet) type RelocationBatchJobStatus struct { dropbox.Tagged // Complete : The copy or move batch job has finished. Complete *RelocationBatchResult `json:"complete,omitempty"` // Failed : The copy or move batch job has failed with exception. Failed *RelocationBatchError `json:"failed,omitempty"` } // Valid tag values for RelocationBatchJobStatus const ( RelocationBatchJobStatusInProgress = "in_progress" RelocationBatchJobStatusComplete = "complete" RelocationBatchJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a RelocationBatchJobStatus instance func (u *RelocationBatchJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The copy or move batch job has finished. Complete json.RawMessage `json:"complete,omitempty"` // Failed : The copy or move batch job has failed with exception. Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // RelocationBatchLaunch : Result returned by `copyBatch` or `moveBatch` that // may either launch an asynchronous job or complete synchronously. type RelocationBatchLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *RelocationBatchResult `json:"complete,omitempty"` } // Valid tag values for RelocationBatchLaunch const ( RelocationBatchLaunchAsyncJobId = "async_job_id" RelocationBatchLaunchComplete = "complete" RelocationBatchLaunchOther = "other" ) // UnmarshalJSON deserializes into a RelocationBatchLaunch instance func (u *RelocationBatchLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // RelocationBatchResult : has no documentation (yet) type RelocationBatchResult struct { FileOpsResult // Entries : has no documentation (yet) Entries []*RelocationBatchResultData `json:"entries"` } // NewRelocationBatchResult returns a new RelocationBatchResult instance func NewRelocationBatchResult(Entries []*RelocationBatchResultData) *RelocationBatchResult { s := new(RelocationBatchResult) s.Entries = Entries return s } // RelocationBatchResultData : has no documentation (yet) type RelocationBatchResultData struct { // Metadata : Metadata of the relocated object. Metadata IsMetadata `json:"metadata"` } // NewRelocationBatchResultData returns a new RelocationBatchResultData instance func NewRelocationBatchResultData(Metadata IsMetadata) *RelocationBatchResultData { s := new(RelocationBatchResultData) s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a RelocationBatchResultData instance func (u *RelocationBatchResultData) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : Metadata of the relocated object. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // RelocationBatchResultEntry : has no documentation (yet) type RelocationBatchResultEntry struct { dropbox.Tagged // Success : has no documentation (yet) Success IsMetadata `json:"success,omitempty"` // Failure : has no documentation (yet) Failure *RelocationBatchErrorEntry `json:"failure,omitempty"` } // Valid tag values for RelocationBatchResultEntry const ( RelocationBatchResultEntrySuccess = "success" RelocationBatchResultEntryFailure = "failure" RelocationBatchResultEntryOther = "other" ) // UnmarshalJSON deserializes into a RelocationBatchResultEntry instance func (u *RelocationBatchResultEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : has no documentation (yet) Success json.RawMessage `json:"success,omitempty"` // Failure : has no documentation (yet) Failure json.RawMessage `json:"failure,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": u.Success, err = IsMetadataFromJSON(body) if err != nil { return err } case "failure": err = json.Unmarshal(w.Failure, &u.Failure) if err != nil { return err } } return nil } // RelocationBatchV2JobStatus : Result returned by `copyBatch` or `moveBatch` // that may either launch an asynchronous job or complete synchronously. type RelocationBatchV2JobStatus struct { dropbox.Tagged // Complete : The copy or move batch job has finished. Complete *RelocationBatchV2Result `json:"complete,omitempty"` } // Valid tag values for RelocationBatchV2JobStatus const ( RelocationBatchV2JobStatusInProgress = "in_progress" RelocationBatchV2JobStatusComplete = "complete" ) // UnmarshalJSON deserializes into a RelocationBatchV2JobStatus instance func (u *RelocationBatchV2JobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The copy or move batch job has finished. Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // RelocationBatchV2Launch : Result returned by `copyBatch` or `moveBatch` that // may either launch an asynchronous job or complete synchronously. type RelocationBatchV2Launch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *RelocationBatchV2Result `json:"complete,omitempty"` } // Valid tag values for RelocationBatchV2Launch const ( RelocationBatchV2LaunchAsyncJobId = "async_job_id" RelocationBatchV2LaunchComplete = "complete" ) // UnmarshalJSON deserializes into a RelocationBatchV2Launch instance func (u *RelocationBatchV2Launch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // RelocationBatchV2Result : has no documentation (yet) type RelocationBatchV2Result struct { FileOpsResult // Entries : Each entry in CopyBatchArg.entries or `MoveBatchArg.entries` // will appear at the same position inside // `RelocationBatchV2Result.entries`. Entries []*RelocationBatchResultEntry `json:"entries"` } // NewRelocationBatchV2Result returns a new RelocationBatchV2Result instance func NewRelocationBatchV2Result(Entries []*RelocationBatchResultEntry) *RelocationBatchV2Result { s := new(RelocationBatchV2Result) s.Entries = Entries return s } // RelocationResult : has no documentation (yet) type RelocationResult struct { FileOpsResult // Metadata : Metadata of the relocated object. Metadata IsMetadata `json:"metadata"` } // NewRelocationResult returns a new RelocationResult instance func NewRelocationResult(Metadata IsMetadata) *RelocationResult { s := new(RelocationResult) s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a RelocationResult instance func (u *RelocationResult) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : Metadata of the relocated object. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // RestoreArg : has no documentation (yet) type RestoreArg struct { // Path : The path to save the restored file. Path string `json:"path"` // Rev : The revision to restore. Rev string `json:"rev"` } // NewRestoreArg returns a new RestoreArg instance func NewRestoreArg(Path string, Rev string) *RestoreArg { s := new(RestoreArg) s.Path = Path s.Rev = Rev return s } // RestoreError : has no documentation (yet) type RestoreError struct { dropbox.Tagged // PathLookup : An error occurs when downloading metadata for the file. PathLookup *LookupError `json:"path_lookup,omitempty"` // PathWrite : An error occurs when trying to restore the file to that path. PathWrite *WriteError `json:"path_write,omitempty"` } // Valid tag values for RestoreError const ( RestoreErrorPathLookup = "path_lookup" RestoreErrorPathWrite = "path_write" RestoreErrorInvalidRevision = "invalid_revision" RestoreErrorOther = "other" ) // UnmarshalJSON deserializes into a RestoreError instance func (u *RestoreError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // PathLookup : An error occurs when downloading metadata for the file. PathLookup json.RawMessage `json:"path_lookup,omitempty"` // PathWrite : An error occurs when trying to restore the file to that // path. PathWrite json.RawMessage `json:"path_write,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path_lookup": err = json.Unmarshal(w.PathLookup, &u.PathLookup) if err != nil { return err } case "path_write": err = json.Unmarshal(w.PathWrite, &u.PathWrite) if err != nil { return err } } return nil } // SaveCopyReferenceArg : has no documentation (yet) type SaveCopyReferenceArg struct { // CopyReference : A copy reference returned by `copyReferenceGet`. CopyReference string `json:"copy_reference"` // Path : Path in the user's Dropbox that is the destination. Path string `json:"path"` } // NewSaveCopyReferenceArg returns a new SaveCopyReferenceArg instance func NewSaveCopyReferenceArg(CopyReference string, Path string) *SaveCopyReferenceArg { s := new(SaveCopyReferenceArg) s.CopyReference = CopyReference s.Path = Path return s } // SaveCopyReferenceError : has no documentation (yet) type SaveCopyReferenceError struct { dropbox.Tagged // Path : has no documentation (yet) Path *WriteError `json:"path,omitempty"` } // Valid tag values for SaveCopyReferenceError const ( SaveCopyReferenceErrorPath = "path" SaveCopyReferenceErrorInvalidCopyReference = "invalid_copy_reference" SaveCopyReferenceErrorNoPermission = "no_permission" SaveCopyReferenceErrorNotFound = "not_found" SaveCopyReferenceErrorTooManyFiles = "too_many_files" SaveCopyReferenceErrorOther = "other" ) // UnmarshalJSON deserializes into a SaveCopyReferenceError instance func (u *SaveCopyReferenceError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // SaveCopyReferenceResult : has no documentation (yet) type SaveCopyReferenceResult struct { // Metadata : The metadata of the saved file or folder in the user's // Dropbox. Metadata IsMetadata `json:"metadata"` } // NewSaveCopyReferenceResult returns a new SaveCopyReferenceResult instance func NewSaveCopyReferenceResult(Metadata IsMetadata) *SaveCopyReferenceResult { s := new(SaveCopyReferenceResult) s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a SaveCopyReferenceResult instance func (u *SaveCopyReferenceResult) UnmarshalJSON(b []byte) error { type wrap struct { // Metadata : The metadata of the saved file or folder in the user's // Dropbox. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // SaveUrlArg : has no documentation (yet) type SaveUrlArg struct { // Path : The path in Dropbox where the URL will be saved to. Path string `json:"path"` // Url : The URL to be saved. Url string `json:"url"` } // NewSaveUrlArg returns a new SaveUrlArg instance func NewSaveUrlArg(Path string, Url string) *SaveUrlArg { s := new(SaveUrlArg) s.Path = Path s.Url = Url return s } // SaveUrlError : has no documentation (yet) type SaveUrlError struct { dropbox.Tagged // Path : has no documentation (yet) Path *WriteError `json:"path,omitempty"` } // Valid tag values for SaveUrlError const ( SaveUrlErrorPath = "path" SaveUrlErrorDownloadFailed = "download_failed" SaveUrlErrorInvalidUrl = "invalid_url" SaveUrlErrorNotFound = "not_found" SaveUrlErrorOther = "other" ) // UnmarshalJSON deserializes into a SaveUrlError instance func (u *SaveUrlError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // SaveUrlJobStatus : has no documentation (yet) type SaveUrlJobStatus struct { dropbox.Tagged // Complete : Metadata of the file where the URL is saved to. Complete *FileMetadata `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed *SaveUrlError `json:"failed,omitempty"` } // Valid tag values for SaveUrlJobStatus const ( SaveUrlJobStatusInProgress = "in_progress" SaveUrlJobStatusComplete = "complete" SaveUrlJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a SaveUrlJobStatus instance func (u *SaveUrlJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : Metadata of the file where the URL is saved to. Complete json.RawMessage `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // SaveUrlResult : has no documentation (yet) type SaveUrlResult struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : Metadata of the file where the URL is saved to. Complete *FileMetadata `json:"complete,omitempty"` } // Valid tag values for SaveUrlResult const ( SaveUrlResultAsyncJobId = "async_job_id" SaveUrlResultComplete = "complete" ) // UnmarshalJSON deserializes into a SaveUrlResult instance func (u *SaveUrlResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : Metadata of the file where the URL is saved to. Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // SearchArg : has no documentation (yet) type SearchArg struct { // Path : The path in the user's Dropbox to search. Should probably be a // folder. Path string `json:"path"` // Query : The string to search for. The search string is split on spaces // into multiple tokens. For file name searching, the last token is used for // prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). Query string `json:"query"` // Start : The starting index within the search results (used for paging). Start uint64 `json:"start"` // MaxResults : The maximum number of search results to return. MaxResults uint64 `json:"max_results"` // Mode : The search mode (filename, filename_and_content, or // deleted_filename). Note that searching file content is only available for // Dropbox Business accounts. Mode *SearchMode `json:"mode"` } // NewSearchArg returns a new SearchArg instance func NewSearchArg(Path string, Query string) *SearchArg { s := new(SearchArg) s.Path = Path s.Query = Query s.Start = 0 s.MaxResults = 100 s.Mode = &SearchMode{Tagged: dropbox.Tagged{"filename"}} return s } // SearchError : has no documentation (yet) type SearchError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for SearchError const ( SearchErrorPath = "path" SearchErrorOther = "other" ) // UnmarshalJSON deserializes into a SearchError instance func (u *SearchError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // SearchMatch : has no documentation (yet) type SearchMatch struct { // MatchType : The type of the match. MatchType *SearchMatchType `json:"match_type"` // Metadata : The metadata for the matched file or folder. Metadata IsMetadata `json:"metadata"` } // NewSearchMatch returns a new SearchMatch instance func NewSearchMatch(MatchType *SearchMatchType, Metadata IsMetadata) *SearchMatch { s := new(SearchMatch) s.MatchType = MatchType s.Metadata = Metadata return s } // UnmarshalJSON deserializes into a SearchMatch instance func (u *SearchMatch) UnmarshalJSON(b []byte) error { type wrap struct { // MatchType : The type of the match. MatchType *SearchMatchType `json:"match_type"` // Metadata : The metadata for the matched file or folder. Metadata json.RawMessage `json:"metadata"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } u.MatchType = w.MatchType Metadata, err := IsMetadataFromJSON(w.Metadata) if err != nil { return err } u.Metadata = Metadata return nil } // SearchMatchType : Indicates what type of match was found for a given item. type SearchMatchType struct { dropbox.Tagged } // Valid tag values for SearchMatchType const ( SearchMatchTypeFilename = "filename" SearchMatchTypeContent = "content" SearchMatchTypeBoth = "both" ) // SearchMode : has no documentation (yet) type SearchMode struct { dropbox.Tagged } // Valid tag values for SearchMode const ( SearchModeFilename = "filename" SearchModeFilenameAndContent = "filename_and_content" SearchModeDeletedFilename = "deleted_filename" ) // SearchResult : has no documentation (yet) type SearchResult struct { // Matches : A list (possibly empty) of matches for the query. Matches []*SearchMatch `json:"matches"` // More : Used for paging. If true, indicates there is another page of // results available that can be fetched by calling `search` again. More bool `json:"more"` // Start : Used for paging. Value to set the start argument to when calling // `search` to fetch the next page of results. Start uint64 `json:"start"` } // NewSearchResult returns a new SearchResult instance func NewSearchResult(Matches []*SearchMatch, More bool, Start uint64) *SearchResult { s := new(SearchResult) s.Matches = Matches s.More = More s.Start = Start return s } // SharedLink : has no documentation (yet) type SharedLink struct { // Url : Shared link url. Url string `json:"url"` // Password : Password for the shared link. Password string `json:"password,omitempty"` } // NewSharedLink returns a new SharedLink instance func NewSharedLink(Url string) *SharedLink { s := new(SharedLink) s.Url = Url return s } // SymlinkInfo : has no documentation (yet) type SymlinkInfo struct { // Target : The target this symlink points to. Target string `json:"target"` } // NewSymlinkInfo returns a new SymlinkInfo instance func NewSymlinkInfo(Target string) *SymlinkInfo { s := new(SymlinkInfo) s.Target = Target return s } // SyncSetting : has no documentation (yet) type SyncSetting struct { dropbox.Tagged } // Valid tag values for SyncSetting const ( SyncSettingDefault = "default" SyncSettingNotSynced = "not_synced" SyncSettingNotSyncedInactive = "not_synced_inactive" SyncSettingOther = "other" ) // SyncSettingArg : has no documentation (yet) type SyncSettingArg struct { dropbox.Tagged } // Valid tag values for SyncSettingArg const ( SyncSettingArgDefault = "default" SyncSettingArgNotSynced = "not_synced" SyncSettingArgOther = "other" ) // SyncSettingsError : has no documentation (yet) type SyncSettingsError struct { dropbox.Tagged // Path : has no documentation (yet) Path *LookupError `json:"path,omitempty"` } // Valid tag values for SyncSettingsError const ( SyncSettingsErrorPath = "path" SyncSettingsErrorUnsupportedCombination = "unsupported_combination" SyncSettingsErrorUnsupportedConfiguration = "unsupported_configuration" SyncSettingsErrorOther = "other" ) // UnmarshalJSON deserializes into a SyncSettingsError instance func (u *SyncSettingsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ThumbnailArg : has no documentation (yet) type ThumbnailArg struct { // Path : The path to the image file you want to thumbnail. Path string `json:"path"` // Format : The format for the thumbnail image, jpeg (default) or png. For // images that are photos, jpeg should be preferred, while png is better // for screenshots and digital arts. Format *ThumbnailFormat `json:"format"` // Size : The size for the thumbnail image. Size *ThumbnailSize `json:"size"` // Mode : How to resize and crop the image to achieve the desired size. Mode *ThumbnailMode `json:"mode"` } // NewThumbnailArg returns a new ThumbnailArg instance func NewThumbnailArg(Path string) *ThumbnailArg { s := new(ThumbnailArg) s.Path = Path s.Format = &ThumbnailFormat{Tagged: dropbox.Tagged{"jpeg"}} s.Size = &ThumbnailSize{Tagged: dropbox.Tagged{"w64h64"}} s.Mode = &ThumbnailMode{Tagged: dropbox.Tagged{"strict"}} return s } // ThumbnailError : has no documentation (yet) type ThumbnailError struct { dropbox.Tagged // Path : An error occurs when downloading metadata for the image. Path *LookupError `json:"path,omitempty"` } // Valid tag values for ThumbnailError const ( ThumbnailErrorPath = "path" ThumbnailErrorUnsupportedExtension = "unsupported_extension" ThumbnailErrorUnsupportedImage = "unsupported_image" ThumbnailErrorConversionError = "conversion_error" ) // UnmarshalJSON deserializes into a ThumbnailError instance func (u *ThumbnailError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : An error occurs when downloading metadata for the image. Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ThumbnailFormat : has no documentation (yet) type ThumbnailFormat struct { dropbox.Tagged } // Valid tag values for ThumbnailFormat const ( ThumbnailFormatJpeg = "jpeg" ThumbnailFormatPng = "png" ) // ThumbnailMode : has no documentation (yet) type ThumbnailMode struct { dropbox.Tagged } // Valid tag values for ThumbnailMode const ( ThumbnailModeStrict = "strict" ThumbnailModeBestfit = "bestfit" ThumbnailModeFitoneBestfit = "fitone_bestfit" ) // ThumbnailSize : has no documentation (yet) type ThumbnailSize struct { dropbox.Tagged } // Valid tag values for ThumbnailSize const ( ThumbnailSizeW32h32 = "w32h32" ThumbnailSizeW64h64 = "w64h64" ThumbnailSizeW128h128 = "w128h128" ThumbnailSizeW256h256 = "w256h256" ThumbnailSizeW480h320 = "w480h320" ThumbnailSizeW640h480 = "w640h480" ThumbnailSizeW960h640 = "w960h640" ThumbnailSizeW1024h768 = "w1024h768" ThumbnailSizeW2048h1536 = "w2048h1536" ) // UploadError : has no documentation (yet) type UploadError struct { dropbox.Tagged // Path : Unable to save the uploaded contents to a file. Path *UploadWriteFailed `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file has // uploaded without property groups. PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"` } // Valid tag values for UploadError const ( UploadErrorPath = "path" UploadErrorPropertiesError = "properties_error" UploadErrorOther = "other" ) // UnmarshalJSON deserializes into a UploadError instance func (u *UploadError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : Unable to save the uploaded contents to a file. Path json.RawMessage `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file // has uploaded without property groups. PropertiesError json.RawMessage `json:"properties_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(body, &u.Path) if err != nil { return err } case "properties_error": err = json.Unmarshal(w.PropertiesError, &u.PropertiesError) if err != nil { return err } } return nil } // UploadErrorWithProperties : has no documentation (yet) type UploadErrorWithProperties struct { dropbox.Tagged // Path : Unable to save the uploaded contents to a file. Path *UploadWriteFailed `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file has // uploaded without property groups. PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"` } // Valid tag values for UploadErrorWithProperties const ( UploadErrorWithPropertiesPath = "path" UploadErrorWithPropertiesPropertiesError = "properties_error" UploadErrorWithPropertiesOther = "other" ) // UnmarshalJSON deserializes into a UploadErrorWithProperties instance func (u *UploadErrorWithProperties) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : Unable to save the uploaded contents to a file. Path json.RawMessage `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file // has uploaded without property groups. PropertiesError json.RawMessage `json:"properties_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(body, &u.Path) if err != nil { return err } case "properties_error": err = json.Unmarshal(w.PropertiesError, &u.PropertiesError) if err != nil { return err } } return nil } // UploadSessionAppendArg : has no documentation (yet) type UploadSessionAppendArg struct { // Cursor : Contains the upload session ID and the offset. Cursor *UploadSessionCursor `json:"cursor"` // Close : If true, the current session will be closed, at which point you // won't be able to call `uploadSessionAppend` anymore with the current // session. Close bool `json:"close"` } // NewUploadSessionAppendArg returns a new UploadSessionAppendArg instance func NewUploadSessionAppendArg(Cursor *UploadSessionCursor) *UploadSessionAppendArg { s := new(UploadSessionAppendArg) s.Cursor = Cursor s.Close = false return s } // UploadSessionCursor : has no documentation (yet) type UploadSessionCursor struct { // SessionId : The upload session ID (returned by `uploadSessionStart`). SessionId string `json:"session_id"` // Offset : The amount of data that has been uploaded so far. We use this to // make sure upload data isn't lost or duplicated in the event of a network // error. Offset uint64 `json:"offset"` } // NewUploadSessionCursor returns a new UploadSessionCursor instance func NewUploadSessionCursor(SessionId string, Offset uint64) *UploadSessionCursor { s := new(UploadSessionCursor) s.SessionId = SessionId s.Offset = Offset return s } // UploadSessionFinishArg : has no documentation (yet) type UploadSessionFinishArg struct { // Cursor : Contains the upload session ID and the offset. Cursor *UploadSessionCursor `json:"cursor"` // Commit : Contains the path and other optional modifiers for the commit. Commit *CommitInfo `json:"commit"` } // NewUploadSessionFinishArg returns a new UploadSessionFinishArg instance func NewUploadSessionFinishArg(Cursor *UploadSessionCursor, Commit *CommitInfo) *UploadSessionFinishArg { s := new(UploadSessionFinishArg) s.Cursor = Cursor s.Commit = Commit return s } // UploadSessionFinishBatchArg : has no documentation (yet) type UploadSessionFinishBatchArg struct { // Entries : Commit information for each file in the batch. Entries []*UploadSessionFinishArg `json:"entries"` } // NewUploadSessionFinishBatchArg returns a new UploadSessionFinishBatchArg instance func NewUploadSessionFinishBatchArg(Entries []*UploadSessionFinishArg) *UploadSessionFinishBatchArg { s := new(UploadSessionFinishBatchArg) s.Entries = Entries return s } // UploadSessionFinishBatchJobStatus : has no documentation (yet) type UploadSessionFinishBatchJobStatus struct { dropbox.Tagged // Complete : The `uploadSessionFinishBatch` has finished. Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"` } // Valid tag values for UploadSessionFinishBatchJobStatus const ( UploadSessionFinishBatchJobStatusInProgress = "in_progress" UploadSessionFinishBatchJobStatusComplete = "complete" ) // UnmarshalJSON deserializes into a UploadSessionFinishBatchJobStatus instance func (u *UploadSessionFinishBatchJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The `uploadSessionFinishBatch` has finished. Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // UploadSessionFinishBatchLaunch : Result returned by // `uploadSessionFinishBatch` that may either launch an asynchronous job or // complete synchronously. type UploadSessionFinishBatchLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *UploadSessionFinishBatchResult `json:"complete,omitempty"` } // Valid tag values for UploadSessionFinishBatchLaunch const ( UploadSessionFinishBatchLaunchAsyncJobId = "async_job_id" UploadSessionFinishBatchLaunchComplete = "complete" UploadSessionFinishBatchLaunchOther = "other" ) // UnmarshalJSON deserializes into a UploadSessionFinishBatchLaunch instance func (u *UploadSessionFinishBatchLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // UploadSessionFinishBatchResult : has no documentation (yet) type UploadSessionFinishBatchResult struct { // Entries : Each entry in `UploadSessionFinishBatchArg.entries` will appear // at the same position inside `UploadSessionFinishBatchResult.entries`. Entries []*UploadSessionFinishBatchResultEntry `json:"entries"` } // NewUploadSessionFinishBatchResult returns a new UploadSessionFinishBatchResult instance func NewUploadSessionFinishBatchResult(Entries []*UploadSessionFinishBatchResultEntry) *UploadSessionFinishBatchResult { s := new(UploadSessionFinishBatchResult) s.Entries = Entries return s } // UploadSessionFinishBatchResultEntry : has no documentation (yet) type UploadSessionFinishBatchResultEntry struct { dropbox.Tagged // Success : has no documentation (yet) Success *FileMetadata `json:"success,omitempty"` // Failure : has no documentation (yet) Failure *UploadSessionFinishError `json:"failure,omitempty"` } // Valid tag values for UploadSessionFinishBatchResultEntry const ( UploadSessionFinishBatchResultEntrySuccess = "success" UploadSessionFinishBatchResultEntryFailure = "failure" ) // UnmarshalJSON deserializes into a UploadSessionFinishBatchResultEntry instance func (u *UploadSessionFinishBatchResultEntry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : has no documentation (yet) Success json.RawMessage `json:"success,omitempty"` // Failure : has no documentation (yet) Failure json.RawMessage `json:"failure,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "failure": err = json.Unmarshal(w.Failure, &u.Failure) if err != nil { return err } } return nil } // UploadSessionFinishError : has no documentation (yet) type UploadSessionFinishError struct { dropbox.Tagged // LookupFailed : The session arguments are incorrect; the value explains // the reason. LookupFailed *UploadSessionLookupError `json:"lookup_failed,omitempty"` // Path : Unable to save the uploaded contents to a file. Data has already // been appended to the upload session. Please retry with empty data body // and updated offset. Path *WriteError `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file has // uploaded without property groups. PropertiesError *file_properties.InvalidPropertyGroupError `json:"properties_error,omitempty"` } // Valid tag values for UploadSessionFinishError const ( UploadSessionFinishErrorLookupFailed = "lookup_failed" UploadSessionFinishErrorPath = "path" UploadSessionFinishErrorPropertiesError = "properties_error" UploadSessionFinishErrorTooManySharedFolderTargets = "too_many_shared_folder_targets" UploadSessionFinishErrorTooManyWriteOperations = "too_many_write_operations" UploadSessionFinishErrorOther = "other" ) // UnmarshalJSON deserializes into a UploadSessionFinishError instance func (u *UploadSessionFinishError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // LookupFailed : The session arguments are incorrect; the value // explains the reason. LookupFailed json.RawMessage `json:"lookup_failed,omitempty"` // Path : Unable to save the uploaded contents to a file. Data has // already been appended to the upload session. Please retry with empty // data body and updated offset. Path json.RawMessage `json:"path,omitempty"` // PropertiesError : The supplied property group is invalid. The file // has uploaded without property groups. PropertiesError json.RawMessage `json:"properties_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "lookup_failed": err = json.Unmarshal(w.LookupFailed, &u.LookupFailed) if err != nil { return err } case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } case "properties_error": err = json.Unmarshal(w.PropertiesError, &u.PropertiesError) if err != nil { return err } } return nil } // UploadSessionLookupError : has no documentation (yet) type UploadSessionLookupError struct { dropbox.Tagged // IncorrectOffset : The specified offset was incorrect. See the value for // the correct offset. This error may occur when a previous request was // received and processed successfully but the client did not receive the // response, e.g. due to a network error. IncorrectOffset *UploadSessionOffsetError `json:"incorrect_offset,omitempty"` } // Valid tag values for UploadSessionLookupError const ( UploadSessionLookupErrorNotFound = "not_found" UploadSessionLookupErrorIncorrectOffset = "incorrect_offset" UploadSessionLookupErrorClosed = "closed" UploadSessionLookupErrorNotClosed = "not_closed" UploadSessionLookupErrorTooLarge = "too_large" UploadSessionLookupErrorOther = "other" ) // UnmarshalJSON deserializes into a UploadSessionLookupError instance func (u *UploadSessionLookupError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // IncorrectOffset : The specified offset was incorrect. See the value // for the correct offset. This error may occur when a previous request // was received and processed successfully but the client did not // receive the response, e.g. due to a network error. IncorrectOffset json.RawMessage `json:"incorrect_offset,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "incorrect_offset": err = json.Unmarshal(body, &u.IncorrectOffset) if err != nil { return err } } return nil } // UploadSessionOffsetError : has no documentation (yet) type UploadSessionOffsetError struct { // CorrectOffset : The offset up to which data has been collected. CorrectOffset uint64 `json:"correct_offset"` } // NewUploadSessionOffsetError returns a new UploadSessionOffsetError instance func NewUploadSessionOffsetError(CorrectOffset uint64) *UploadSessionOffsetError { s := new(UploadSessionOffsetError) s.CorrectOffset = CorrectOffset return s } // UploadSessionStartArg : has no documentation (yet) type UploadSessionStartArg struct { // Close : If true, the current session will be closed, at which point you // won't be able to call `uploadSessionAppend` anymore with the current // session. Close bool `json:"close"` } // NewUploadSessionStartArg returns a new UploadSessionStartArg instance func NewUploadSessionStartArg() *UploadSessionStartArg { s := new(UploadSessionStartArg) s.Close = false return s } // UploadSessionStartResult : has no documentation (yet) type UploadSessionStartResult struct { // SessionId : A unique identifier for the upload session. Pass this to // `uploadSessionAppend` and `uploadSessionFinish`. SessionId string `json:"session_id"` } // NewUploadSessionStartResult returns a new UploadSessionStartResult instance func NewUploadSessionStartResult(SessionId string) *UploadSessionStartResult { s := new(UploadSessionStartResult) s.SessionId = SessionId return s } // UploadWriteFailed : has no documentation (yet) type UploadWriteFailed struct { // Reason : The reason why the file couldn't be saved. Reason *WriteError `json:"reason"` // UploadSessionId : The upload session ID; data has already been uploaded // to the corresponding upload session and this ID may be used to retry the // commit with `uploadSessionFinish`. UploadSessionId string `json:"upload_session_id"` } // NewUploadWriteFailed returns a new UploadWriteFailed instance func NewUploadWriteFailed(Reason *WriteError, UploadSessionId string) *UploadWriteFailed { s := new(UploadWriteFailed) s.Reason = Reason s.UploadSessionId = UploadSessionId return s } // VideoMetadata : Metadata for a video. type VideoMetadata struct { MediaMetadata // Duration : The duration of the video in milliseconds. Duration uint64 `json:"duration,omitempty"` } // NewVideoMetadata returns a new VideoMetadata instance func NewVideoMetadata() *VideoMetadata { s := new(VideoMetadata) return s } // WriteConflictError : has no documentation (yet) type WriteConflictError struct { dropbox.Tagged } // Valid tag values for WriteConflictError const ( WriteConflictErrorFile = "file" WriteConflictErrorFolder = "folder" WriteConflictErrorFileAncestor = "file_ancestor" WriteConflictErrorOther = "other" ) // WriteError : has no documentation (yet) type WriteError struct { dropbox.Tagged // MalformedPath : The given path does not satisfy the required path format. // Please refer to the `Path formats documentation` // // for more information. MalformedPath string `json:"malformed_path,omitempty"` // Conflict : Couldn't write to the target path because there was something // in the way. Conflict *WriteConflictError `json:"conflict,omitempty"` } // Valid tag values for WriteError const ( WriteErrorMalformedPath = "malformed_path" WriteErrorConflict = "conflict" WriteErrorNoWritePermission = "no_write_permission" WriteErrorInsufficientSpace = "insufficient_space" WriteErrorDisallowedName = "disallowed_name" WriteErrorTeamFolder = "team_folder" WriteErrorTooManyWriteOperations = "too_many_write_operations" WriteErrorOther = "other" ) // UnmarshalJSON deserializes into a WriteError instance func (u *WriteError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MalformedPath : The given path does not satisfy the required path // format. Please refer to the `Path formats documentation` // // for more information. MalformedPath json.RawMessage `json:"malformed_path,omitempty"` // Conflict : Couldn't write to the target path because there was // something in the way. Conflict json.RawMessage `json:"conflict,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "malformed_path": err = json.Unmarshal(body, &u.MalformedPath) if err != nil { return err } case "conflict": err = json.Unmarshal(w.Conflict, &u.Conflict) if err != nil { return err } } return nil } // WriteMode : Your intent when writing a file to some path. This is used to // determine what constitutes a conflict and what the autorename strategy is. In // some situations, the conflict behavior is identical: (a) If the target path // doesn't refer to anything, the file is always written; no conflict. (b) If // the target path refers to a folder, it's always a conflict. (c) If the target // path refers to a file with identical contents, nothing gets written; no // conflict. The conflict checking differs in the case where there's a file at // the target path with contents different from the contents you're trying to // write. type WriteMode struct { dropbox.Tagged // Update : Overwrite if the given "rev" matches the existing file's "rev". // The autorename strategy is to append the string "conflicted copy" to the // file name. For example, "document.txt" might become "document (conflicted // copy).txt" or "document (Panda's conflicted copy).txt". Update string `json:"update,omitempty"` } // Valid tag values for WriteMode const ( WriteModeAdd = "add" WriteModeOverwrite = "overwrite" WriteModeUpdate = "update" ) // UnmarshalJSON deserializes into a WriteMode instance func (u *WriteMode) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "update": err = json.Unmarshal(body, &u.Update) if err != nil { return err } } return nil } dropbox-sdk-go-unofficial-5.4.0/dropbox/paper/000077500000000000000000000000001340753361200212645ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/paper/client.go000066400000000000000000000710601340753361200230750ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package paper import ( "bytes" "encoding/json" "io" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // DocsArchive : Marks the given Paper doc as archived. Note: This action // can be performed or undone by anyone with edit permissions to the doc. DocsArchive(arg *RefPaperDoc) (err error) // DocsCreate : Creates a new Paper doc with the provided content. DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) // DocsDownload : Exports and downloads Paper doc either as HTML or // markdown. DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) // DocsFolderUsersList : Lists the users who are explicitly invited to the // Paper folder in which the Paper doc is contained. For private folders all // users (including owner) shared on the folder are listed and for team // folders all non-team users shared on the folder are returned. DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) // DocsFolderUsersListContinue : Once a cursor has been retrieved from // `docsFolderUsersList`, use this to paginate through all users on the // Paper folder. DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) // DocsGetFolderInfo : Retrieves folder information for the given Paper doc. // This includes: - folder sharing policy; permissions for subfolders are // set by the top-level folder. - full 'filepath', i.e. the list of // folders (both folderId and folderName) from the root folder to the // folder directly containing the Paper doc. Note: If the Paper doc is not // in any folder (aka unfiled) the response will be empty. DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) // DocsList : Return the list of all Paper docs according to the argument // specifications. To iterate over through the full pagination, pass the // cursor to `docsListContinue`. DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) // DocsListContinue : Once a cursor has been retrieved from `docsList`, use // this to paginate through all Paper doc. DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) // DocsPermanentlyDelete : Permanently deletes the given Paper doc. This // operation is final as the doc cannot be recovered. Note: This action can // be performed only by the doc owner. DocsPermanentlyDelete(arg *RefPaperDoc) (err error) // DocsSharingPolicyGet : Gets the default sharing policy for the given // Paper doc. DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) // DocsSharingPolicySet : Sets the default sharing policy for the given // Paper doc. The default 'team_sharing_policy' can be changed only by // teams, omit this field for personal accounts. Note: // 'public_sharing_policy' cannot be set to the value 'disabled' because // this setting can be changed only via the team admin console. DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) // DocsUpdate : Updates an existing Paper doc with the provided content. DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) // DocsUsersAdd : Allows an owner or editor to add users to a Paper doc or // change their permissions using their email address or Dropbox account ID. // Note: The Doc owner's permissions cannot be changed. DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) // DocsUsersList : Lists all users who visited the Paper doc or users with // explicit access. This call excludes users who have been removed. The list // is sorted by the date of the visit or the share date. The list will // include both users, the explicitly shared ones as well as those who came // in using the Paper url link. DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) // DocsUsersListContinue : Once a cursor has been retrieved from // `docsUsersList`, use this to paginate through all users on the Paper doc. DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) // DocsUsersRemove : Allows an owner or editor to remove users from a Paper // doc using their email address or Dropbox account ID. Note: Doc owner // cannot be removed. DocsUsersRemove(arg *RemovePaperDocUser) (err error) } type apiImpl dropbox.Context //DocsArchiveAPIError is an error-wrapper for the docs/archive route type DocsArchiveAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsArchive(arg *RefPaperDoc) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/archive", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DocsArchiveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsCreateAPIError is an error-wrapper for the docs/create route type DocsCreateAPIError struct { dropbox.APIError EndpointError *PaperDocCreateError `json:"error"` } func (dbx *apiImpl) DocsCreate(arg *PaperDocCreateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "upload", true, "paper", "docs/create", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsCreateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsDownloadAPIError is an error-wrapper for the docs/download route type DocsDownloadAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsDownload(arg *PaperDocExport) (res *PaperDocExportResult, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "download", true, "paper", "docs/download", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError DocsDownloadAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsFolderUsersListAPIError is an error-wrapper for the docs/folder_users/list route type DocsFolderUsersListAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsFolderUsersList(arg *ListUsersOnFolderArgs) (res *ListUsersOnFolderResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/folder_users/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsFolderUsersListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsFolderUsersListContinueAPIError is an error-wrapper for the docs/folder_users/list/continue route type DocsFolderUsersListContinueAPIError struct { dropbox.APIError EndpointError *ListUsersCursorError `json:"error"` } func (dbx *apiImpl) DocsFolderUsersListContinue(arg *ListUsersOnFolderContinueArgs) (res *ListUsersOnFolderResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/folder_users/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsFolderUsersListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsGetFolderInfoAPIError is an error-wrapper for the docs/get_folder_info route type DocsGetFolderInfoAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsGetFolderInfo(arg *RefPaperDoc) (res *FoldersContainingPaperDoc, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/get_folder_info", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsGetFolderInfoAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsListAPIError is an error-wrapper for the docs/list route type DocsListAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) DocsList(arg *ListPaperDocsArgs) (res *ListPaperDocsResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsListContinueAPIError is an error-wrapper for the docs/list/continue route type DocsListContinueAPIError struct { dropbox.APIError EndpointError *ListDocsCursorError `json:"error"` } func (dbx *apiImpl) DocsListContinue(arg *ListPaperDocsContinueArgs) (res *ListPaperDocsResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsPermanentlyDeleteAPIError is an error-wrapper for the docs/permanently_delete route type DocsPermanentlyDeleteAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsPermanentlyDelete(arg *RefPaperDoc) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/permanently_delete", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DocsPermanentlyDeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsSharingPolicyGetAPIError is an error-wrapper for the docs/sharing_policy/get route type DocsSharingPolicyGetAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsSharingPolicyGet(arg *RefPaperDoc) (res *SharingPolicy, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/sharing_policy/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsSharingPolicyGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsSharingPolicySetAPIError is an error-wrapper for the docs/sharing_policy/set route type DocsSharingPolicySetAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsSharingPolicySet(arg *PaperDocSharingPolicy) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/sharing_policy/set", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DocsSharingPolicySetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsUpdateAPIError is an error-wrapper for the docs/update route type DocsUpdateAPIError struct { dropbox.APIError EndpointError *PaperDocUpdateError `json:"error"` } func (dbx *apiImpl) DocsUpdate(arg *PaperDocUpdateArgs, content io.Reader) (res *PaperDocCreateUpdateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/octet-stream", "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "upload", true, "paper", "docs/update", headers, content) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsUpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsUsersAddAPIError is an error-wrapper for the docs/users/add route type DocsUsersAddAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsUsersAdd(arg *AddPaperDocUser) (res []*AddPaperDocUserMemberResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsUsersAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsUsersListAPIError is an error-wrapper for the docs/users/list route type DocsUsersListAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsUsersList(arg *ListUsersOnPaperDocArgs) (res *ListUsersOnPaperDocResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsUsersListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsUsersListContinueAPIError is an error-wrapper for the docs/users/list/continue route type DocsUsersListContinueAPIError struct { dropbox.APIError EndpointError *ListUsersCursorError `json:"error"` } func (dbx *apiImpl) DocsUsersListContinue(arg *ListUsersOnPaperDocContinueArgs) (res *ListUsersOnPaperDocResponse, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DocsUsersListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DocsUsersRemoveAPIError is an error-wrapper for the docs/users/remove route type DocsUsersRemoveAPIError struct { dropbox.APIError EndpointError *DocLookupError `json:"error"` } func (dbx *apiImpl) DocsUsersRemove(arg *RemovePaperDocUser) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "paper", "docs/users/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DocsUsersRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/paper/types.go000066400000000000000000000713531340753361200227700ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package paper : This namespace contains endpoints and data types for managing // docs and folders in Dropbox Paper. package paper import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing" ) // AddMember : has no documentation (yet) type AddMember struct { // PermissionLevel : Permission for the user. PermissionLevel *PaperDocPermissionLevel `json:"permission_level"` // Member : User which should be added to the Paper doc. Specify only email // address or Dropbox account ID. Member *sharing.MemberSelector `json:"member"` } // NewAddMember returns a new AddMember instance func NewAddMember(Member *sharing.MemberSelector) *AddMember { s := new(AddMember) s.Member = Member s.PermissionLevel = &PaperDocPermissionLevel{Tagged: dropbox.Tagged{"edit"}} return s } // RefPaperDoc : has no documentation (yet) type RefPaperDoc struct { // DocId : The Paper doc ID. DocId string `json:"doc_id"` } // NewRefPaperDoc returns a new RefPaperDoc instance func NewRefPaperDoc(DocId string) *RefPaperDoc { s := new(RefPaperDoc) s.DocId = DocId return s } // AddPaperDocUser : has no documentation (yet) type AddPaperDocUser struct { RefPaperDoc // Members : User which should be added to the Paper doc. Specify only email // address or Dropbox account ID. Members []*AddMember `json:"members"` // CustomMessage : A personal message that will be emailed to each // successfully added member. CustomMessage string `json:"custom_message,omitempty"` // Quiet : Clients should set this to true if no email message shall be sent // to added users. Quiet bool `json:"quiet"` } // NewAddPaperDocUser returns a new AddPaperDocUser instance func NewAddPaperDocUser(DocId string, Members []*AddMember) *AddPaperDocUser { s := new(AddPaperDocUser) s.DocId = DocId s.Members = Members s.Quiet = false return s } // AddPaperDocUserMemberResult : Per-member result for `docsUsersAdd`. type AddPaperDocUserMemberResult struct { // Member : One of specified input members. Member *sharing.MemberSelector `json:"member"` // Result : The outcome of the action on this member. Result *AddPaperDocUserResult `json:"result"` } // NewAddPaperDocUserMemberResult returns a new AddPaperDocUserMemberResult instance func NewAddPaperDocUserMemberResult(Member *sharing.MemberSelector, Result *AddPaperDocUserResult) *AddPaperDocUserMemberResult { s := new(AddPaperDocUserMemberResult) s.Member = Member s.Result = Result return s } // AddPaperDocUserResult : has no documentation (yet) type AddPaperDocUserResult struct { dropbox.Tagged } // Valid tag values for AddPaperDocUserResult const ( AddPaperDocUserResultSuccess = "success" AddPaperDocUserResultUnknownError = "unknown_error" AddPaperDocUserResultSharingOutsideTeamDisabled = "sharing_outside_team_disabled" AddPaperDocUserResultDailyLimitReached = "daily_limit_reached" AddPaperDocUserResultUserIsOwner = "user_is_owner" AddPaperDocUserResultFailedUserDataRetrieval = "failed_user_data_retrieval" AddPaperDocUserResultPermissionAlreadyGranted = "permission_already_granted" AddPaperDocUserResultOther = "other" ) // Cursor : has no documentation (yet) type Cursor struct { // Value : The actual cursor value. Value string `json:"value"` // Expiration : Expiration time of `value`. Some cursors might have // expiration time assigned. This is a UTC value after which the cursor is // no longer valid and the API starts returning an error. If cursor expires // a new one needs to be obtained and pagination needs to be restarted. Some // cursors might be short-lived some cursors might be long-lived. This // really depends on the sorting type and order, e.g.: 1. on one hand, // listing docs created by the user, sorted by the created time ascending // will have undefinite expiration because the results cannot change while // the iteration is happening. This cursor would be suitable for long term // polling. 2. on the other hand, listing docs sorted by the last modified // time will have a very short expiration as docs do get modified very often // and the modified time can be changed while the iteration is happening // thus altering the results. Expiration time.Time `json:"expiration,omitempty"` } // NewCursor returns a new Cursor instance func NewCursor(Value string) *Cursor { s := new(Cursor) s.Value = Value return s } // PaperApiBaseError : has no documentation (yet) type PaperApiBaseError struct { dropbox.Tagged } // Valid tag values for PaperApiBaseError const ( PaperApiBaseErrorInsufficientPermissions = "insufficient_permissions" PaperApiBaseErrorOther = "other" ) // DocLookupError : has no documentation (yet) type DocLookupError struct { dropbox.Tagged } // Valid tag values for DocLookupError const ( DocLookupErrorInsufficientPermissions = "insufficient_permissions" DocLookupErrorOther = "other" DocLookupErrorDocNotFound = "doc_not_found" ) // DocSubscriptionLevel : The subscription level of a Paper doc. type DocSubscriptionLevel struct { dropbox.Tagged } // Valid tag values for DocSubscriptionLevel const ( DocSubscriptionLevelDefault = "default" DocSubscriptionLevelIgnore = "ignore" DocSubscriptionLevelEvery = "every" DocSubscriptionLevelNoEmail = "no_email" ) // ExportFormat : The desired export format of the Paper doc. type ExportFormat struct { dropbox.Tagged } // Valid tag values for ExportFormat const ( ExportFormatHtml = "html" ExportFormatMarkdown = "markdown" ExportFormatOther = "other" ) // Folder : Data structure representing a Paper folder. type Folder struct { // Id : Paper folder ID. This ID uniquely identifies the folder. Id string `json:"id"` // Name : Paper folder name. Name string `json:"name"` } // NewFolder returns a new Folder instance func NewFolder(Id string, Name string) *Folder { s := new(Folder) s.Id = Id s.Name = Name return s } // FolderSharingPolicyType : The sharing policy of a Paper folder. Note: The // sharing policy of subfolders is inherited from the root folder. type FolderSharingPolicyType struct { dropbox.Tagged } // Valid tag values for FolderSharingPolicyType const ( FolderSharingPolicyTypeTeam = "team" FolderSharingPolicyTypeInviteOnly = "invite_only" ) // FolderSubscriptionLevel : The subscription level of a Paper folder. type FolderSubscriptionLevel struct { dropbox.Tagged } // Valid tag values for FolderSubscriptionLevel const ( FolderSubscriptionLevelNone = "none" FolderSubscriptionLevelActivityOnly = "activity_only" FolderSubscriptionLevelDailyEmails = "daily_emails" FolderSubscriptionLevelWeeklyEmails = "weekly_emails" ) // FoldersContainingPaperDoc : Metadata about Paper folders containing the // specififed Paper doc. type FoldersContainingPaperDoc struct { // FolderSharingPolicyType : The sharing policy of the folder containing the // Paper doc. FolderSharingPolicyType *FolderSharingPolicyType `json:"folder_sharing_policy_type,omitempty"` // Folders : The folder path. If present the first folder is the root // folder. Folders []*Folder `json:"folders,omitempty"` } // NewFoldersContainingPaperDoc returns a new FoldersContainingPaperDoc instance func NewFoldersContainingPaperDoc() *FoldersContainingPaperDoc { s := new(FoldersContainingPaperDoc) return s } // ImportFormat : The import format of the incoming data. type ImportFormat struct { dropbox.Tagged } // Valid tag values for ImportFormat const ( ImportFormatHtml = "html" ImportFormatMarkdown = "markdown" ImportFormatPlainText = "plain_text" ImportFormatOther = "other" ) // InviteeInfoWithPermissionLevel : has no documentation (yet) type InviteeInfoWithPermissionLevel struct { // Invitee : Email address invited to the Paper doc. Invitee *sharing.InviteeInfo `json:"invitee"` // PermissionLevel : Permission level for the invitee. PermissionLevel *PaperDocPermissionLevel `json:"permission_level"` } // NewInviteeInfoWithPermissionLevel returns a new InviteeInfoWithPermissionLevel instance func NewInviteeInfoWithPermissionLevel(Invitee *sharing.InviteeInfo, PermissionLevel *PaperDocPermissionLevel) *InviteeInfoWithPermissionLevel { s := new(InviteeInfoWithPermissionLevel) s.Invitee = Invitee s.PermissionLevel = PermissionLevel return s } // ListDocsCursorError : has no documentation (yet) type ListDocsCursorError struct { dropbox.Tagged // CursorError : has no documentation (yet) CursorError *PaperApiCursorError `json:"cursor_error,omitempty"` } // Valid tag values for ListDocsCursorError const ( ListDocsCursorErrorCursorError = "cursor_error" ListDocsCursorErrorOther = "other" ) // UnmarshalJSON deserializes into a ListDocsCursorError instance func (u *ListDocsCursorError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // CursorError : has no documentation (yet) CursorError json.RawMessage `json:"cursor_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "cursor_error": err = json.Unmarshal(w.CursorError, &u.CursorError) if err != nil { return err } } return nil } // ListPaperDocsArgs : has no documentation (yet) type ListPaperDocsArgs struct { // FilterBy : Allows user to specify how the Paper docs should be filtered. FilterBy *ListPaperDocsFilterBy `json:"filter_by"` // SortBy : Allows user to specify how the Paper docs should be sorted. SortBy *ListPaperDocsSortBy `json:"sort_by"` // SortOrder : Allows user to specify the sort order of the result. SortOrder *ListPaperDocsSortOrder `json:"sort_order"` // Limit : Size limit per batch. The maximum number of docs that can be // retrieved per batch is 1000. Higher value results in invalid arguments // error. Limit int32 `json:"limit"` } // NewListPaperDocsArgs returns a new ListPaperDocsArgs instance func NewListPaperDocsArgs() *ListPaperDocsArgs { s := new(ListPaperDocsArgs) s.FilterBy = &ListPaperDocsFilterBy{Tagged: dropbox.Tagged{"docs_accessed"}} s.SortBy = &ListPaperDocsSortBy{Tagged: dropbox.Tagged{"accessed"}} s.SortOrder = &ListPaperDocsSortOrder{Tagged: dropbox.Tagged{"ascending"}} s.Limit = 1000 return s } // ListPaperDocsContinueArgs : has no documentation (yet) type ListPaperDocsContinueArgs struct { // Cursor : The cursor obtained from `docsList` or `docsListContinue`. // Allows for pagination. Cursor string `json:"cursor"` } // NewListPaperDocsContinueArgs returns a new ListPaperDocsContinueArgs instance func NewListPaperDocsContinueArgs(Cursor string) *ListPaperDocsContinueArgs { s := new(ListPaperDocsContinueArgs) s.Cursor = Cursor return s } // ListPaperDocsFilterBy : has no documentation (yet) type ListPaperDocsFilterBy struct { dropbox.Tagged } // Valid tag values for ListPaperDocsFilterBy const ( ListPaperDocsFilterByDocsAccessed = "docs_accessed" ListPaperDocsFilterByDocsCreated = "docs_created" ListPaperDocsFilterByOther = "other" ) // ListPaperDocsResponse : has no documentation (yet) type ListPaperDocsResponse struct { // DocIds : The list of Paper doc IDs that can be used to access the given // Paper docs or supplied to other API methods. The list is sorted in the // order specified by the initial call to `docsList`. DocIds []string `json:"doc_ids"` // Cursor : Pass the cursor into `docsListContinue` to paginate through all // files. The cursor preserves all properties as specified in the original // call to `docsList`. Cursor *Cursor `json:"cursor"` // HasMore : Will be set to True if a subsequent call with the provided // cursor to `docsListContinue` returns immediately with some results. If // set to False please allow some delay before making another call to // `docsListContinue`. HasMore bool `json:"has_more"` } // NewListPaperDocsResponse returns a new ListPaperDocsResponse instance func NewListPaperDocsResponse(DocIds []string, Cursor *Cursor, HasMore bool) *ListPaperDocsResponse { s := new(ListPaperDocsResponse) s.DocIds = DocIds s.Cursor = Cursor s.HasMore = HasMore return s } // ListPaperDocsSortBy : has no documentation (yet) type ListPaperDocsSortBy struct { dropbox.Tagged } // Valid tag values for ListPaperDocsSortBy const ( ListPaperDocsSortByAccessed = "accessed" ListPaperDocsSortByModified = "modified" ListPaperDocsSortByCreated = "created" ListPaperDocsSortByOther = "other" ) // ListPaperDocsSortOrder : has no documentation (yet) type ListPaperDocsSortOrder struct { dropbox.Tagged } // Valid tag values for ListPaperDocsSortOrder const ( ListPaperDocsSortOrderAscending = "ascending" ListPaperDocsSortOrderDescending = "descending" ListPaperDocsSortOrderOther = "other" ) // ListUsersCursorError : has no documentation (yet) type ListUsersCursorError struct { dropbox.Tagged // CursorError : has no documentation (yet) CursorError *PaperApiCursorError `json:"cursor_error,omitempty"` } // Valid tag values for ListUsersCursorError const ( ListUsersCursorErrorInsufficientPermissions = "insufficient_permissions" ListUsersCursorErrorOther = "other" ListUsersCursorErrorDocNotFound = "doc_not_found" ListUsersCursorErrorCursorError = "cursor_error" ) // UnmarshalJSON deserializes into a ListUsersCursorError instance func (u *ListUsersCursorError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // CursorError : has no documentation (yet) CursorError json.RawMessage `json:"cursor_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "cursor_error": err = json.Unmarshal(w.CursorError, &u.CursorError) if err != nil { return err } } return nil } // ListUsersOnFolderArgs : has no documentation (yet) type ListUsersOnFolderArgs struct { RefPaperDoc // Limit : Size limit per batch. The maximum number of users that can be // retrieved per batch is 1000. Higher value results in invalid arguments // error. Limit int32 `json:"limit"` } // NewListUsersOnFolderArgs returns a new ListUsersOnFolderArgs instance func NewListUsersOnFolderArgs(DocId string) *ListUsersOnFolderArgs { s := new(ListUsersOnFolderArgs) s.DocId = DocId s.Limit = 1000 return s } // ListUsersOnFolderContinueArgs : has no documentation (yet) type ListUsersOnFolderContinueArgs struct { RefPaperDoc // Cursor : The cursor obtained from `docsFolderUsersList` or // `docsFolderUsersListContinue`. Allows for pagination. Cursor string `json:"cursor"` } // NewListUsersOnFolderContinueArgs returns a new ListUsersOnFolderContinueArgs instance func NewListUsersOnFolderContinueArgs(DocId string, Cursor string) *ListUsersOnFolderContinueArgs { s := new(ListUsersOnFolderContinueArgs) s.DocId = DocId s.Cursor = Cursor return s } // ListUsersOnFolderResponse : has no documentation (yet) type ListUsersOnFolderResponse struct { // Invitees : List of email addresses that are invited on the Paper folder. Invitees []*sharing.InviteeInfo `json:"invitees"` // Users : List of users that are invited on the Paper folder. Users []*sharing.UserInfo `json:"users"` // Cursor : Pass the cursor into `docsFolderUsersListContinue` to paginate // through all users. The cursor preserves all properties as specified in // the original call to `docsFolderUsersList`. Cursor *Cursor `json:"cursor"` // HasMore : Will be set to True if a subsequent call with the provided // cursor to `docsFolderUsersListContinue` returns immediately with some // results. If set to False please allow some delay before making another // call to `docsFolderUsersListContinue`. HasMore bool `json:"has_more"` } // NewListUsersOnFolderResponse returns a new ListUsersOnFolderResponse instance func NewListUsersOnFolderResponse(Invitees []*sharing.InviteeInfo, Users []*sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnFolderResponse { s := new(ListUsersOnFolderResponse) s.Invitees = Invitees s.Users = Users s.Cursor = Cursor s.HasMore = HasMore return s } // ListUsersOnPaperDocArgs : has no documentation (yet) type ListUsersOnPaperDocArgs struct { RefPaperDoc // Limit : Size limit per batch. The maximum number of users that can be // retrieved per batch is 1000. Higher value results in invalid arguments // error. Limit int32 `json:"limit"` // FilterBy : Specify this attribute if you want to obtain users that have // already accessed the Paper doc. FilterBy *UserOnPaperDocFilter `json:"filter_by"` } // NewListUsersOnPaperDocArgs returns a new ListUsersOnPaperDocArgs instance func NewListUsersOnPaperDocArgs(DocId string) *ListUsersOnPaperDocArgs { s := new(ListUsersOnPaperDocArgs) s.DocId = DocId s.Limit = 1000 s.FilterBy = &UserOnPaperDocFilter{Tagged: dropbox.Tagged{"shared"}} return s } // ListUsersOnPaperDocContinueArgs : has no documentation (yet) type ListUsersOnPaperDocContinueArgs struct { RefPaperDoc // Cursor : The cursor obtained from `docsUsersList` or // `docsUsersListContinue`. Allows for pagination. Cursor string `json:"cursor"` } // NewListUsersOnPaperDocContinueArgs returns a new ListUsersOnPaperDocContinueArgs instance func NewListUsersOnPaperDocContinueArgs(DocId string, Cursor string) *ListUsersOnPaperDocContinueArgs { s := new(ListUsersOnPaperDocContinueArgs) s.DocId = DocId s.Cursor = Cursor return s } // ListUsersOnPaperDocResponse : has no documentation (yet) type ListUsersOnPaperDocResponse struct { // Invitees : List of email addresses with their respective permission // levels that are invited on the Paper doc. Invitees []*InviteeInfoWithPermissionLevel `json:"invitees"` // Users : List of users with their respective permission levels that are // invited on the Paper folder. Users []*UserInfoWithPermissionLevel `json:"users"` // DocOwner : The Paper doc owner. This field is populated on every single // response. DocOwner *sharing.UserInfo `json:"doc_owner"` // Cursor : Pass the cursor into `docsUsersListContinue` to paginate through // all users. The cursor preserves all properties as specified in the // original call to `docsUsersList`. Cursor *Cursor `json:"cursor"` // HasMore : Will be set to True if a subsequent call with the provided // cursor to `docsUsersListContinue` returns immediately with some results. // If set to False please allow some delay before making another call to // `docsUsersListContinue`. HasMore bool `json:"has_more"` } // NewListUsersOnPaperDocResponse returns a new ListUsersOnPaperDocResponse instance func NewListUsersOnPaperDocResponse(Invitees []*InviteeInfoWithPermissionLevel, Users []*UserInfoWithPermissionLevel, DocOwner *sharing.UserInfo, Cursor *Cursor, HasMore bool) *ListUsersOnPaperDocResponse { s := new(ListUsersOnPaperDocResponse) s.Invitees = Invitees s.Users = Users s.DocOwner = DocOwner s.Cursor = Cursor s.HasMore = HasMore return s } // PaperApiCursorError : has no documentation (yet) type PaperApiCursorError struct { dropbox.Tagged } // Valid tag values for PaperApiCursorError const ( PaperApiCursorErrorExpiredCursor = "expired_cursor" PaperApiCursorErrorInvalidCursor = "invalid_cursor" PaperApiCursorErrorWrongUserInCursor = "wrong_user_in_cursor" PaperApiCursorErrorReset = "reset" PaperApiCursorErrorOther = "other" ) // PaperDocCreateArgs : has no documentation (yet) type PaperDocCreateArgs struct { // ParentFolderId : The Paper folder ID where the Paper document should be // created. The API user has to have write access to this folder or error is // thrown. ParentFolderId string `json:"parent_folder_id,omitempty"` // ImportFormat : The format of provided data. ImportFormat *ImportFormat `json:"import_format"` } // NewPaperDocCreateArgs returns a new PaperDocCreateArgs instance func NewPaperDocCreateArgs(ImportFormat *ImportFormat) *PaperDocCreateArgs { s := new(PaperDocCreateArgs) s.ImportFormat = ImportFormat return s } // PaperDocCreateError : has no documentation (yet) type PaperDocCreateError struct { dropbox.Tagged } // Valid tag values for PaperDocCreateError const ( PaperDocCreateErrorInsufficientPermissions = "insufficient_permissions" PaperDocCreateErrorOther = "other" PaperDocCreateErrorContentMalformed = "content_malformed" PaperDocCreateErrorFolderNotFound = "folder_not_found" PaperDocCreateErrorDocLengthExceeded = "doc_length_exceeded" PaperDocCreateErrorImageSizeExceeded = "image_size_exceeded" ) // PaperDocCreateUpdateResult : has no documentation (yet) type PaperDocCreateUpdateResult struct { // DocId : Doc ID of the newly created doc. DocId string `json:"doc_id"` // Revision : The Paper doc revision. Simply an ever increasing number. Revision int64 `json:"revision"` // Title : The Paper doc title. Title string `json:"title"` } // NewPaperDocCreateUpdateResult returns a new PaperDocCreateUpdateResult instance func NewPaperDocCreateUpdateResult(DocId string, Revision int64, Title string) *PaperDocCreateUpdateResult { s := new(PaperDocCreateUpdateResult) s.DocId = DocId s.Revision = Revision s.Title = Title return s } // PaperDocExport : has no documentation (yet) type PaperDocExport struct { RefPaperDoc // ExportFormat : has no documentation (yet) ExportFormat *ExportFormat `json:"export_format"` } // NewPaperDocExport returns a new PaperDocExport instance func NewPaperDocExport(DocId string, ExportFormat *ExportFormat) *PaperDocExport { s := new(PaperDocExport) s.DocId = DocId s.ExportFormat = ExportFormat return s } // PaperDocExportResult : has no documentation (yet) type PaperDocExportResult struct { // Owner : The Paper doc owner's email address. Owner string `json:"owner"` // Title : The Paper doc title. Title string `json:"title"` // Revision : The Paper doc revision. Simply an ever increasing number. Revision int64 `json:"revision"` // MimeType : MIME type of the export. This corresponds to `ExportFormat` // specified in the request. MimeType string `json:"mime_type"` } // NewPaperDocExportResult returns a new PaperDocExportResult instance func NewPaperDocExportResult(Owner string, Title string, Revision int64, MimeType string) *PaperDocExportResult { s := new(PaperDocExportResult) s.Owner = Owner s.Title = Title s.Revision = Revision s.MimeType = MimeType return s } // PaperDocPermissionLevel : has no documentation (yet) type PaperDocPermissionLevel struct { dropbox.Tagged } // Valid tag values for PaperDocPermissionLevel const ( PaperDocPermissionLevelEdit = "edit" PaperDocPermissionLevelViewAndComment = "view_and_comment" PaperDocPermissionLevelOther = "other" ) // PaperDocSharingPolicy : has no documentation (yet) type PaperDocSharingPolicy struct { RefPaperDoc // SharingPolicy : The default sharing policy to be set for the Paper doc. SharingPolicy *SharingPolicy `json:"sharing_policy"` } // NewPaperDocSharingPolicy returns a new PaperDocSharingPolicy instance func NewPaperDocSharingPolicy(DocId string, SharingPolicy *SharingPolicy) *PaperDocSharingPolicy { s := new(PaperDocSharingPolicy) s.DocId = DocId s.SharingPolicy = SharingPolicy return s } // PaperDocUpdateArgs : has no documentation (yet) type PaperDocUpdateArgs struct { RefPaperDoc // DocUpdatePolicy : The policy used for the current update call. DocUpdatePolicy *PaperDocUpdatePolicy `json:"doc_update_policy"` // Revision : The latest doc revision. This value must match the head // revision or an error code will be returned. This is to prevent colliding // writes. Revision int64 `json:"revision"` // ImportFormat : The format of provided data. ImportFormat *ImportFormat `json:"import_format"` } // NewPaperDocUpdateArgs returns a new PaperDocUpdateArgs instance func NewPaperDocUpdateArgs(DocId string, DocUpdatePolicy *PaperDocUpdatePolicy, Revision int64, ImportFormat *ImportFormat) *PaperDocUpdateArgs { s := new(PaperDocUpdateArgs) s.DocId = DocId s.DocUpdatePolicy = DocUpdatePolicy s.Revision = Revision s.ImportFormat = ImportFormat return s } // PaperDocUpdateError : has no documentation (yet) type PaperDocUpdateError struct { dropbox.Tagged } // Valid tag values for PaperDocUpdateError const ( PaperDocUpdateErrorInsufficientPermissions = "insufficient_permissions" PaperDocUpdateErrorOther = "other" PaperDocUpdateErrorDocNotFound = "doc_not_found" PaperDocUpdateErrorContentMalformed = "content_malformed" PaperDocUpdateErrorRevisionMismatch = "revision_mismatch" PaperDocUpdateErrorDocLengthExceeded = "doc_length_exceeded" PaperDocUpdateErrorImageSizeExceeded = "image_size_exceeded" PaperDocUpdateErrorDocArchived = "doc_archived" PaperDocUpdateErrorDocDeleted = "doc_deleted" ) // PaperDocUpdatePolicy : has no documentation (yet) type PaperDocUpdatePolicy struct { dropbox.Tagged } // Valid tag values for PaperDocUpdatePolicy const ( PaperDocUpdatePolicyAppend = "append" PaperDocUpdatePolicyPrepend = "prepend" PaperDocUpdatePolicyOverwriteAll = "overwrite_all" PaperDocUpdatePolicyOther = "other" ) // RemovePaperDocUser : has no documentation (yet) type RemovePaperDocUser struct { RefPaperDoc // Member : User which should be removed from the Paper doc. Specify only // email address or Dropbox account ID. Member *sharing.MemberSelector `json:"member"` } // NewRemovePaperDocUser returns a new RemovePaperDocUser instance func NewRemovePaperDocUser(DocId string, Member *sharing.MemberSelector) *RemovePaperDocUser { s := new(RemovePaperDocUser) s.DocId = DocId s.Member = Member return s } // SharingPolicy : Sharing policy of Paper doc. type SharingPolicy struct { // PublicSharingPolicy : This value applies to the non-team members. PublicSharingPolicy *SharingPublicPolicyType `json:"public_sharing_policy,omitempty"` // TeamSharingPolicy : This value applies to the team members only. The // value is null for all personal accounts. TeamSharingPolicy *SharingTeamPolicyType `json:"team_sharing_policy,omitempty"` } // NewSharingPolicy returns a new SharingPolicy instance func NewSharingPolicy() *SharingPolicy { s := new(SharingPolicy) return s } // SharingTeamPolicyType : The sharing policy type of the Paper doc. type SharingTeamPolicyType struct { dropbox.Tagged } // Valid tag values for SharingTeamPolicyType const ( SharingTeamPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit" SharingTeamPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment" SharingTeamPolicyTypeInviteOnly = "invite_only" ) // SharingPublicPolicyType : has no documentation (yet) type SharingPublicPolicyType struct { dropbox.Tagged } // Valid tag values for SharingPublicPolicyType const ( SharingPublicPolicyTypePeopleWithLinkCanEdit = "people_with_link_can_edit" SharingPublicPolicyTypePeopleWithLinkCanViewAndComment = "people_with_link_can_view_and_comment" SharingPublicPolicyTypeInviteOnly = "invite_only" SharingPublicPolicyTypeDisabled = "disabled" ) // UserInfoWithPermissionLevel : has no documentation (yet) type UserInfoWithPermissionLevel struct { // User : User shared on the Paper doc. User *sharing.UserInfo `json:"user"` // PermissionLevel : Permission level for the user. PermissionLevel *PaperDocPermissionLevel `json:"permission_level"` } // NewUserInfoWithPermissionLevel returns a new UserInfoWithPermissionLevel instance func NewUserInfoWithPermissionLevel(User *sharing.UserInfo, PermissionLevel *PaperDocPermissionLevel) *UserInfoWithPermissionLevel { s := new(UserInfoWithPermissionLevel) s.User = User s.PermissionLevel = PermissionLevel return s } // UserOnPaperDocFilter : has no documentation (yet) type UserOnPaperDocFilter struct { dropbox.Tagged } // Valid tag values for UserOnPaperDocFilter const ( UserOnPaperDocFilterVisited = "visited" UserOnPaperDocFilterShared = "shared" UserOnPaperDocFilterOther = "other" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/sdk.go000066400000000000000000000147471340753361200213020ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package dropbox import ( "encoding/json" "fmt" "io" "log" "net/http" "golang.org/x/net/context" "golang.org/x/oauth2" ) const ( apiVersion = 2 defaultDomain = ".dropboxapi.com" hostAPI = "api" hostContent = "content" hostNotify = "notify" sdkVersion = "5.4.0" specVersion = "097e9ba" ) // Version returns the current SDK version and API Spec version func Version() (string, string) { return sdkVersion, specVersion } // Config contains parameters for configuring the SDK. type Config struct { // OAuth2 access token Token string // Logging level for SDK generated logs LogLevel LogLevel // Logging target for verbose SDK logging Logger *log.Logger // Used with APIs that support operations as another user AsMemberID string // No need to set -- for testing only Domain string // No need to set -- for testing only Client *http.Client // No need to set -- for testing only HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string // No need to set -- for testing only URLGenerator func(hostType string, style string, namespace string, route string) string } // LogLevel defines a type that can set the desired level of logging the SDK will generate. type LogLevel uint const ( // LogOff will disable all SDK logging. This is the default log level LogOff LogLevel = iota * (1 << 8) // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments), // response and body contents. LogDebug // LogInfo will log SDK request (not including arguments) and responses. LogInfo ) func (l LogLevel) shouldLog(v LogLevel) bool { return l > v || l&v == v } func (c *Config) doLog(l LogLevel, format string, v ...interface{}) { if !c.LogLevel.shouldLog(l) { return } if c.Logger != nil { c.Logger.Printf(format, v...) } else { log.Printf(format, v...) } } // LogDebug emits a debug level SDK log if config's log level is at least LogDebug func (c *Config) LogDebug(format string, v ...interface{}) { c.doLog(LogDebug, format, v...) } // LogInfo emits an info level SDK log if config's log level is at least LogInfo func (c *Config) LogInfo(format string, v ...interface{}) { c.doLog(LogInfo, format, v...) } // Context is the base client context used to implement per-namespace clients. type Context struct { Config Config Client *http.Client HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string URLGenerator func(hostType string, style string, namespace string, route string) string } // NewRequest returns an appropriate Request object for the given namespace/route. func (c *Context) NewRequest( hostType string, style string, authed bool, namespace string, route string, headers map[string]string, body io.Reader, ) (*http.Request, error) { url := c.URLGenerator(hostType, style, namespace, route) req, err := http.NewRequest("POST", url, body) if err != nil { return nil, err } for k, v := range headers { req.Header.Add(k, v) } for k, v := range c.HeaderGenerator(hostType, style, namespace, route) { req.Header.Add(k, v) } if req.Header.Get("Host") != "" { req.Host = req.Header.Get("Host") } if !authed { req.Header.Del("Authorization") } return req, nil } // NewContext returns a new Context with the given Config. func NewContext(c Config) Context { domain := c.Domain if domain == "" { domain = defaultDomain } client := c.Client if client == nil { var conf = &oauth2.Config{Endpoint: OAuthEndpoint(domain)} tok := &oauth2.Token{AccessToken: c.Token} client = conf.Client(context.Background(), tok) } headerGenerator := c.HeaderGenerator if headerGenerator == nil { headerGenerator = func(hostType string, style string, namespace string, route string) map[string]string { return map[string]string{} } } urlGenerator := c.URLGenerator if urlGenerator == nil { hostMap := map[string]string{ hostAPI: hostAPI + domain, hostContent: hostContent + domain, hostNotify: hostNotify + domain, } urlGenerator = func(hostType string, style string, namespace string, route string) string { fqHost := hostMap[hostType] return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route) } } return Context{c, client, headerGenerator, urlGenerator} } // OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain func OAuthEndpoint(domain string) oauth2.Endpoint { if domain == "" { domain = defaultDomain } authURL := fmt.Sprintf("https://meta%s/1/oauth2/authorize", domain) tokenURL := fmt.Sprintf("https://api%s/1/oauth2/token", domain) if domain == defaultDomain { authURL = "https://www.dropbox.com/1/oauth2/authorize" } return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL} } // Tagged is used for tagged unions. type Tagged struct { Tag string `json:".tag"` } // APIError is the base type for endpoint-specific errors. type APIError struct { ErrorSummary string `json:"error_summary"` } func (e APIError) Error() string { return e.ErrorSummary } // HandleCommonAPIErrors handles common API errors func HandleCommonAPIErrors(c Config, resp *http.Response, body []byte) error { var apiError APIError if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError { apiError.ErrorSummary = string(body) return apiError } e := json.Unmarshal(body, &apiError) if e != nil { c.LogDebug("%v", e) return e } return apiError } dropbox-sdk-go-unofficial-5.4.0/dropbox/sdk_test.go000066400000000000000000000142121340753361200223240ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package dropbox_test import ( "fmt" "net/http" "net/http/httptest" "strings" "testing" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users" ) func generateURL(base string, namespace string, route string) string { return fmt.Sprintf("%s/%s/%s", base, namespace, route) } func TestInternalError(t *testing.T) { eString := "internal server error" ts := httptest.NewServer(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { http.Error(w, eString, http.StatusInternalServerError) })) defer ts.Close() config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug, URLGenerator: func(hostType string, style string, namespace string, route string) string { return generateURL(ts.URL, namespace, route) }} client := users.New(config) v, e := client.GetCurrentAccount() if v != nil || strings.Trim(e.Error(), "\n") != eString { t.Errorf("v: %v e: '%s'\n", v, e.Error()) } } func TestRateLimitPlainText(t *testing.T) { eString := "too_many_requests" ts := httptest.NewServer(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Header().Set("Retry-After", "10") http.Error(w, eString, http.StatusTooManyRequests) })) defer ts.Close() config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug, URLGenerator: func(hostType string, style string, namespace string, route string) string { return generateURL(ts.URL, namespace, route) }} client := users.New(config) _, e := client.GetCurrentAccount() re, ok := e.(auth.RateLimitAPIError) if !ok { t.Errorf("Unexpected error type: %T\n", e) } if re.RateLimitError.RetryAfter != 10 { t.Errorf("Unexpected retry-after value: %d\n", re.RateLimitError.RetryAfter) } if re.RateLimitError.Reason.Tag != auth.RateLimitReasonTooManyRequests { t.Errorf("Unexpected reason: %v\n", re.RateLimitError.Reason) } } func TestRateLimitJSON(t *testing.T) { eString := `{"error_summary": "too_many_requests/..", "error": {"reason": {".tag": "too_many_requests"}, "retry_after": 300}}` ts := httptest.NewServer(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Retry-After", "10") w.WriteHeader(http.StatusTooManyRequests) w.Write([]byte(eString)) })) defer ts.Close() config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug, URLGenerator: func(hostType string, style string, namespace string, route string) string { return generateURL(ts.URL, namespace, route) }} client := users.New(config) _, e := client.GetCurrentAccount() re, ok := e.(auth.RateLimitAPIError) if !ok { t.Errorf("Unexpected error type: %T\n", e) } if re.RateLimitError.RetryAfter != 300 { t.Errorf("Unexpected retry-after value: %d\n", re.RateLimitError.RetryAfter) } if re.RateLimitError.Reason.Tag != auth.RateLimitReasonTooManyRequests { t.Errorf("Unexpected reason: %v\n", re.RateLimitError.Reason) } } func TestAuthError(t *testing.T) { eString := `{"error_summary": "user_suspended/...", "error": {".tag": "user_suspended"}}` ts := httptest.NewServer(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") w.WriteHeader(http.StatusUnauthorized) w.Write([]byte(eString)) })) defer ts.Close() config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug, URLGenerator: func(hostType string, style string, namespace string, route string) string { return generateURL(ts.URL, namespace, route) }} client := users.New(config) _, e := client.GetCurrentAccount() re, ok := e.(auth.AuthAPIError) if !ok { t.Errorf("Unexpected error type: %T\n", e) } fmt.Printf("ERROR is %v\n", re) if re.AuthError.Tag != auth.AuthErrorUserSuspended { t.Errorf("Unexpected tag: %s\n", re.AuthError.Tag) } } func TestAccessError(t *testing.T) { eString := `{"error_summary": "access_error/...", "error": { ".tag": "paper_access_denied", "paper_access_denied": {".tag": "not_paper_user"} }}` ts := httptest.NewServer(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json; charset=utf-8") w.WriteHeader(http.StatusForbidden) w.Write([]byte(eString)) })) defer ts.Close() config := dropbox.Config{Client: ts.Client(), LogLevel: dropbox.LogDebug, URLGenerator: func(hostType string, style string, namespace string, route string) string { return generateURL(ts.URL, namespace, route) }} client := users.New(config) _, e := client.GetCurrentAccount() re, ok := e.(auth.AccessAPIError) if !ok { t.Errorf("Unexpected error type: %T\n", e) } if re.AccessError.Tag != auth.AccessErrorPaperAccessDenied { t.Errorf("Unexpected tag: %s\n", re.AccessError.Tag) } if re.AccessError.PaperAccessDenied.Tag != auth.PaperAccessErrorNotPaperUser { t.Errorf("Unexpected tag: %s\n", re.AccessError.PaperAccessDenied.Tag) } } dropbox-sdk-go-unofficial-5.4.0/dropbox/seen_state/000077500000000000000000000000001340753361200223075ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/seen_state/types.go000066400000000000000000000030331340753361200240010ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package seen_state : has no documentation (yet) package seen_state import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" // PlatformType : Possible platforms on which a user may view content. type PlatformType struct { dropbox.Tagged } // Valid tag values for PlatformType const ( PlatformTypeWeb = "web" PlatformTypeMobile = "mobile" PlatformTypeDesktop = "desktop" PlatformTypeUnknown = "unknown" PlatformTypeOther = "other" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/sharing/000077500000000000000000000000001340753361200216105ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/sharing/client.go000066400000000000000000002302471340753361200234250ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package sharing import ( "bytes" "encoding/json" "io" "io/ioutil" "log" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // AddFileMember : Adds specified members to a file. AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error) // AddFolderMember : Allows an owner or editor (if the ACL update policy // allows) of a shared folder to add another member. For the new member to // get access to all the functionality for this folder, you will need to // call `mountFolder` on their behalf. AddFolderMember(arg *AddFolderMemberArg) (err error) // ChangeFileMemberAccess : Identical to update_file_member but with less // information returned. // Deprecated: Use `UpdateFileMember` instead ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error) // CheckJobStatus : Returns the status of an asynchronous job. CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) // CheckRemoveMemberJobStatus : Returns the status of an asynchronous job // for sharing a folder. CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error) // CheckShareJobStatus : Returns the status of an asynchronous job for // sharing a folder. CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) // CreateSharedLink : Create a shared link. If a shared link already exists // for the given path, that link is returned. Note that in the returned // `PathLinkMetadata`, the `PathLinkMetadata.url` field is the shortened URL // if `CreateSharedLinkArg.short_url` argument is set to true. Previously, // it was technically possible to break a shared link by moving or renaming // the corresponding file or folder. In the future, this will no longer be // the case, so your app shouldn't rely on this behavior. Instead, if your // app needs to revoke a shared link, use `revokeSharedLink`. // Deprecated: Use `CreateSharedLinkWithSettings` instead CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error) // CreateSharedLinkWithSettings : Create a shared link with custom settings. // If no settings are given then the default visibility is // `RequestedVisibility.public` (The resolved visibility, though, may depend // on other aspects such as team and shared folder settings). CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error) // GetFileMetadata : Returns shared file metadata. GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error) // GetFileMetadataBatch : Returns shared file metadata. GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error) // GetFolderMetadata : Returns shared folder metadata by its folder ID. GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) // GetSharedLinkFile : Download the shared link's file from a user's // Dropbox. GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error) // GetSharedLinkMetadata : Get the shared link's metadata. GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error) // GetSharedLinks : Returns a list of `LinkMetadata` objects for this user, // including collection links. If no path is given, returns a list of all // shared links for the current user, including collection links, up to a // maximum of 1000 links. If a non-empty path is given, returns a list of // all shared links that allow access to the given path. Collection links // are never returned in this case. Note that the url field in the response // is never the shortened URL. // Deprecated: Use `ListSharedLinks` instead GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error) // ListFileMembers : Use to obtain the members who have been invited to a // file, both inherited and uninherited members. ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error) // ListFileMembersBatch : Get members of multiple files at once. The // arguments to this route are more limited, and the limit on query result // size per file is more strict. To customize the results more, use the // individual file endpoint. Inherited users and groups are not included in // the result, and permissions are not returned for this endpoint. ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error) // ListFileMembersContinue : Once a cursor has been retrieved from // `listFileMembers` or `listFileMembersBatch`, use this to paginate through // all shared file members. ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error) // ListFolderMembers : Returns shared folder membership by its folder ID. ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) // ListFolderMembersContinue : Once a cursor has been retrieved from // `listFolderMembers`, use this to paginate through all shared folder // members. ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) // ListFolders : Return the list of all shared folders the current user has // access to. ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) // ListFoldersContinue : Once a cursor has been retrieved from // `listFolders`, use this to paginate through all shared folders. The // cursor must come from a previous call to `listFolders` or // `listFoldersContinue`. ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) // ListMountableFolders : Return the list of all shared folders the current // user can mount or unmount. ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) // ListMountableFoldersContinue : Once a cursor has been retrieved from // `listMountableFolders`, use this to paginate through all mountable shared // folders. The cursor must come from a previous call to // `listMountableFolders` or `listMountableFoldersContinue`. ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) // ListReceivedFiles : Returns a list of all files shared with current user. // Does not include files the user has received via shared folders, and does // not include unclaimed invitations. ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error) // ListReceivedFilesContinue : Get more results with a cursor from // `listReceivedFiles`. ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error) // ListSharedLinks : List shared links of this user. If no path is given, // returns a list of all shared links for the current user. If a non-empty // path is given, returns a list of all shared links that allow access to // the given path - direct links to the given path and links to parent // folders of the given path. Links to parent folders can be suppressed by // setting direct_only to true. ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) // ModifySharedLinkSettings : Modify the shared link's settings. If the // requested visibility conflict with the shared links policy of the team or // the shared folder (in case the linked file is part of a shared folder) // then the `LinkPermissions.resolved_visibility` of the returned // `SharedLinkMetadata` will reflect the actual visibility of the shared // link and the `LinkPermissions.requested_visibility` will reflect the // requested visibility. ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error) // MountFolder : The current user mounts the designated folder. Mount a // shared folder for a user after they have been added as a member. Once // mounted, the shared folder will appear in their Dropbox. MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) // RelinquishFileMembership : The current user relinquishes their membership // in the designated file. Note that the current user may still have // inherited access to this file through the parent folder. RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error) // RelinquishFolderMembership : The current user relinquishes their // membership in the designated shared folder and will no longer have access // to the folder. A folder owner cannot relinquish membership in their own // folder. This will run synchronously if leave_a_copy is false, and // asynchronously if leave_a_copy is true. RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error) // RemoveFileMember : Identical to remove_file_member_2 but with less // information returned. // Deprecated: Use `RemoveFileMember2` instead RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error) // RemoveFileMember2 : Removes a specified member from the file. RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error) // RemoveFolderMember : Allows an owner or editor (if the ACL update policy // allows) of a shared folder to remove another member. RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error) // RevokeSharedLink : Revoke a shared link. Note that even after revoking a // shared link to a file, the file may be accessible if there are shared // links leading to any of the file parent folders. To list all shared links // that enable access to a specific file, you can use the `listSharedLinks` // with the file as the `ListSharedLinksArg.path` argument. RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) // SetAccessInheritance : Change the inheritance policy of an existing // Shared Folder. Only permitted for shared folders in a shared team root. // If a `ShareFolderLaunch.async_job_id` is returned, you'll need to call // `checkShareJobStatus` until the action completes to get the metadata for // the folder. SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error) // ShareFolder : Share a folder with collaborators. Most sharing will be // completed synchronously. Large folders will be completed asynchronously. // To make testing the async case repeatable, set // `ShareFolderArg.force_async`. If a `ShareFolderLaunch.async_job_id` is // returned, you'll need to call `checkShareJobStatus` until the action // completes to get the metadata for the folder. ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) // TransferFolder : Transfer ownership of a shared folder to a member of the // shared folder. User must have `AccessLevel.owner` access to the shared // folder to perform a transfer. TransferFolder(arg *TransferFolderArg) (err error) // UnmountFolder : The current user unmounts the designated folder. They can // re-mount the folder at a later time using `mountFolder`. UnmountFolder(arg *UnmountFolderArg) (err error) // UnshareFile : Remove all members from this file. Does not remove // inherited members. UnshareFile(arg *UnshareFileArg) (err error) // UnshareFolder : Allows a shared folder owner to unshare the folder. // You'll need to call `checkJobStatus` to determine if the action has // completed successfully. UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) // UpdateFileMember : Changes a member's access on a shared file. UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error) // UpdateFolderMember : Allows an owner or editor of a shared folder to // update another member's permissions. UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error) // UpdateFolderPolicy : Update the sharing policies for a shared folder. // User must have `AccessLevel.owner` access to the shared folder to update // its policies. UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) } type apiImpl dropbox.Context //AddFileMemberAPIError is an error-wrapper for the add_file_member route type AddFileMemberAPIError struct { dropbox.APIError EndpointError *AddFileMemberError `json:"error"` } func (dbx *apiImpl) AddFileMember(arg *AddFileMemberArgs) (res []*FileMemberActionResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "add_file_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError AddFileMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //AddFolderMemberAPIError is an error-wrapper for the add_folder_member route type AddFolderMemberAPIError struct { dropbox.APIError EndpointError *AddFolderMemberError `json:"error"` } func (dbx *apiImpl) AddFolderMember(arg *AddFolderMemberArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "add_folder_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError AddFolderMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ChangeFileMemberAccessAPIError is an error-wrapper for the change_file_member_access route type ChangeFileMemberAccessAPIError struct { dropbox.APIError EndpointError *FileMemberActionError `json:"error"` } func (dbx *apiImpl) ChangeFileMemberAccess(arg *ChangeFileMemberAccessArgs) (res *FileMemberActionResult, err error) { log.Printf("WARNING: API `ChangeFileMemberAccess` is deprecated") log.Printf("Use API `UpdateFileMember` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "change_file_member_access", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ChangeFileMemberAccessAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CheckJobStatusAPIError is an error-wrapper for the check_job_status route type CheckJobStatusAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CheckJobStatus(arg *async.PollArg) (res *JobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_job_status", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CheckJobStatusAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CheckRemoveMemberJobStatusAPIError is an error-wrapper for the check_remove_member_job_status route type CheckRemoveMemberJobStatusAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CheckRemoveMemberJobStatus(arg *async.PollArg) (res *RemoveMemberJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_remove_member_job_status", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CheckRemoveMemberJobStatusAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CheckShareJobStatusAPIError is an error-wrapper for the check_share_job_status route type CheckShareJobStatusAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) CheckShareJobStatus(arg *async.PollArg) (res *ShareFolderJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "check_share_job_status", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CheckShareJobStatusAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateSharedLinkAPIError is an error-wrapper for the create_shared_link route type CreateSharedLinkAPIError struct { dropbox.APIError EndpointError *CreateSharedLinkError `json:"error"` } func (dbx *apiImpl) CreateSharedLink(arg *CreateSharedLinkArg) (res *PathLinkMetadata, err error) { log.Printf("WARNING: API `CreateSharedLink` is deprecated") log.Printf("Use API `CreateSharedLinkWithSettings` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "create_shared_link", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError CreateSharedLinkAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //CreateSharedLinkWithSettingsAPIError is an error-wrapper for the create_shared_link_with_settings route type CreateSharedLinkWithSettingsAPIError struct { dropbox.APIError EndpointError *CreateSharedLinkWithSettingsError `json:"error"` } func (dbx *apiImpl) CreateSharedLinkWithSettings(arg *CreateSharedLinkWithSettingsArg) (res IsSharedLinkMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "create_shared_link_with_settings", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp sharedLinkMetadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder } return } if resp.StatusCode == http.StatusConflict { var apiError CreateSharedLinkWithSettingsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetFileMetadataAPIError is an error-wrapper for the get_file_metadata route type GetFileMetadataAPIError struct { dropbox.APIError EndpointError *GetFileMetadataError `json:"error"` } func (dbx *apiImpl) GetFileMetadata(arg *GetFileMetadataArg) (res *SharedFileMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_file_metadata", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetFileMetadataAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetFileMetadataBatchAPIError is an error-wrapper for the get_file_metadata/batch route type GetFileMetadataBatchAPIError struct { dropbox.APIError EndpointError *SharingUserError `json:"error"` } func (dbx *apiImpl) GetFileMetadataBatch(arg *GetFileMetadataBatchArg) (res []*GetFileMetadataBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_file_metadata/batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetFileMetadataBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetFolderMetadataAPIError is an error-wrapper for the get_folder_metadata route type GetFolderMetadataAPIError struct { dropbox.APIError EndpointError *SharedFolderAccessError `json:"error"` } func (dbx *apiImpl) GetFolderMetadata(arg *GetMetadataArgs) (res *SharedFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_folder_metadata", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetFolderMetadataAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetSharedLinkFileAPIError is an error-wrapper for the get_shared_link_file route type GetSharedLinkFileAPIError struct { dropbox.APIError EndpointError *GetSharedLinkFileError `json:"error"` } func (dbx *apiImpl) GetSharedLinkFile(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, content io.ReadCloser, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Dropbox-API-Arg": string(b), } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("content", "download", true, "sharing", "get_shared_link_file", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) body := []byte(resp.Header.Get("Dropbox-API-Result")) content = resp.Body dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp sharedLinkMetadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder } return } if resp.StatusCode == http.StatusConflict { defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return } var apiError GetSharedLinkFileAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetSharedLinkMetadataAPIError is an error-wrapper for the get_shared_link_metadata route type GetSharedLinkMetadataAPIError struct { dropbox.APIError EndpointError *SharedLinkError `json:"error"` } func (dbx *apiImpl) GetSharedLinkMetadata(arg *GetSharedLinkMetadataArg) (res IsSharedLinkMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_shared_link_metadata", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp sharedLinkMetadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder } return } if resp.StatusCode == http.StatusConflict { var apiError GetSharedLinkMetadataAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetSharedLinksAPIError is an error-wrapper for the get_shared_links route type GetSharedLinksAPIError struct { dropbox.APIError EndpointError *GetSharedLinksError `json:"error"` } func (dbx *apiImpl) GetSharedLinks(arg *GetSharedLinksArg) (res *GetSharedLinksResult, err error) { log.Printf("WARNING: API `GetSharedLinks` is deprecated") log.Printf("Use API `ListSharedLinks` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "get_shared_links", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetSharedLinksAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFileMembersAPIError is an error-wrapper for the list_file_members route type ListFileMembersAPIError struct { dropbox.APIError EndpointError *ListFileMembersError `json:"error"` } func (dbx *apiImpl) ListFileMembers(arg *ListFileMembersArg) (res *SharedFileMembers, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFileMembersAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFileMembersBatchAPIError is an error-wrapper for the list_file_members/batch route type ListFileMembersBatchAPIError struct { dropbox.APIError EndpointError *SharingUserError `json:"error"` } func (dbx *apiImpl) ListFileMembersBatch(arg *ListFileMembersBatchArg) (res []*ListFileMembersBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members/batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFileMembersBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFileMembersContinueAPIError is an error-wrapper for the list_file_members/continue route type ListFileMembersContinueAPIError struct { dropbox.APIError EndpointError *ListFileMembersContinueError `json:"error"` } func (dbx *apiImpl) ListFileMembersContinue(arg *ListFileMembersContinueArg) (res *SharedFileMembers, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_file_members/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFileMembersContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderMembersAPIError is an error-wrapper for the list_folder_members route type ListFolderMembersAPIError struct { dropbox.APIError EndpointError *SharedFolderAccessError `json:"error"` } func (dbx *apiImpl) ListFolderMembers(arg *ListFolderMembersArgs) (res *SharedFolderMembers, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folder_members", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderMembersAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFolderMembersContinueAPIError is an error-wrapper for the list_folder_members/continue route type ListFolderMembersContinueAPIError struct { dropbox.APIError EndpointError *ListFolderMembersContinueError `json:"error"` } func (dbx *apiImpl) ListFolderMembersContinue(arg *ListFolderMembersContinueArg) (res *SharedFolderMembers, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folder_members/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFolderMembersContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFoldersAPIError is an error-wrapper for the list_folders route type ListFoldersAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) ListFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folders", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFoldersAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListFoldersContinueAPIError is an error-wrapper for the list_folders/continue route type ListFoldersContinueAPIError struct { dropbox.APIError EndpointError *ListFoldersContinueError `json:"error"` } func (dbx *apiImpl) ListFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_folders/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListFoldersContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListMountableFoldersAPIError is an error-wrapper for the list_mountable_folders route type ListMountableFoldersAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) ListMountableFolders(arg *ListFoldersArgs) (res *ListFoldersResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_mountable_folders", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListMountableFoldersAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListMountableFoldersContinueAPIError is an error-wrapper for the list_mountable_folders/continue route type ListMountableFoldersContinueAPIError struct { dropbox.APIError EndpointError *ListFoldersContinueError `json:"error"` } func (dbx *apiImpl) ListMountableFoldersContinue(arg *ListFoldersContinueArg) (res *ListFoldersResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_mountable_folders/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListMountableFoldersContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListReceivedFilesAPIError is an error-wrapper for the list_received_files route type ListReceivedFilesAPIError struct { dropbox.APIError EndpointError *SharingUserError `json:"error"` } func (dbx *apiImpl) ListReceivedFiles(arg *ListFilesArg) (res *ListFilesResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_received_files", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListReceivedFilesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListReceivedFilesContinueAPIError is an error-wrapper for the list_received_files/continue route type ListReceivedFilesContinueAPIError struct { dropbox.APIError EndpointError *ListFilesContinueError `json:"error"` } func (dbx *apiImpl) ListReceivedFilesContinue(arg *ListFilesContinueArg) (res *ListFilesResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_received_files/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListReceivedFilesContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ListSharedLinksAPIError is an error-wrapper for the list_shared_links route type ListSharedLinksAPIError struct { dropbox.APIError EndpointError *ListSharedLinksError `json:"error"` } func (dbx *apiImpl) ListSharedLinks(arg *ListSharedLinksArg) (res *ListSharedLinksResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "list_shared_links", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ListSharedLinksAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ModifySharedLinkSettingsAPIError is an error-wrapper for the modify_shared_link_settings route type ModifySharedLinkSettingsAPIError struct { dropbox.APIError EndpointError *ModifySharedLinkSettingsError `json:"error"` } func (dbx *apiImpl) ModifySharedLinkSettings(arg *ModifySharedLinkSettingsArgs) (res IsSharedLinkMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "modify_shared_link_settings", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { var tmp sharedLinkMetadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder } return } if resp.StatusCode == http.StatusConflict { var apiError ModifySharedLinkSettingsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MountFolderAPIError is an error-wrapper for the mount_folder route type MountFolderAPIError struct { dropbox.APIError EndpointError *MountFolderError `json:"error"` } func (dbx *apiImpl) MountFolder(arg *MountFolderArg) (res *SharedFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "mount_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MountFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RelinquishFileMembershipAPIError is an error-wrapper for the relinquish_file_membership route type RelinquishFileMembershipAPIError struct { dropbox.APIError EndpointError *RelinquishFileMembershipError `json:"error"` } func (dbx *apiImpl) RelinquishFileMembership(arg *RelinquishFileMembershipArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "relinquish_file_membership", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError RelinquishFileMembershipAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RelinquishFolderMembershipAPIError is an error-wrapper for the relinquish_folder_membership route type RelinquishFolderMembershipAPIError struct { dropbox.APIError EndpointError *RelinquishFolderMembershipError `json:"error"` } func (dbx *apiImpl) RelinquishFolderMembership(arg *RelinquishFolderMembershipArg) (res *async.LaunchEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "relinquish_folder_membership", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError RelinquishFolderMembershipAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RemoveFileMemberAPIError is an error-wrapper for the remove_file_member route type RemoveFileMemberAPIError struct { dropbox.APIError EndpointError *RemoveFileMemberError `json:"error"` } func (dbx *apiImpl) RemoveFileMember(arg *RemoveFileMemberArg) (res *FileMemberActionIndividualResult, err error) { log.Printf("WARNING: API `RemoveFileMember` is deprecated") log.Printf("Use API `RemoveFileMember2` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_file_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError RemoveFileMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RemoveFileMember2APIError is an error-wrapper for the remove_file_member_2 route type RemoveFileMember2APIError struct { dropbox.APIError EndpointError *RemoveFileMemberError `json:"error"` } func (dbx *apiImpl) RemoveFileMember2(arg *RemoveFileMemberArg) (res *FileMemberRemoveActionResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_file_member_2", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError RemoveFileMember2APIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RemoveFolderMemberAPIError is an error-wrapper for the remove_folder_member route type RemoveFolderMemberAPIError struct { dropbox.APIError EndpointError *RemoveFolderMemberError `json:"error"` } func (dbx *apiImpl) RemoveFolderMember(arg *RemoveFolderMemberArg) (res *async.LaunchResultBase, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "remove_folder_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError RemoveFolderMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //RevokeSharedLinkAPIError is an error-wrapper for the revoke_shared_link route type RevokeSharedLinkAPIError struct { dropbox.APIError EndpointError *RevokeSharedLinkError `json:"error"` } func (dbx *apiImpl) RevokeSharedLink(arg *RevokeSharedLinkArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "revoke_shared_link", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError RevokeSharedLinkAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //SetAccessInheritanceAPIError is an error-wrapper for the set_access_inheritance route type SetAccessInheritanceAPIError struct { dropbox.APIError EndpointError *SetAccessInheritanceError `json:"error"` } func (dbx *apiImpl) SetAccessInheritance(arg *SetAccessInheritanceArg) (res *ShareFolderLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "set_access_inheritance", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError SetAccessInheritanceAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ShareFolderAPIError is an error-wrapper for the share_folder route type ShareFolderAPIError struct { dropbox.APIError EndpointError *ShareFolderError `json:"error"` } func (dbx *apiImpl) ShareFolder(arg *ShareFolderArg) (res *ShareFolderLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "share_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ShareFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TransferFolderAPIError is an error-wrapper for the transfer_folder route type TransferFolderAPIError struct { dropbox.APIError EndpointError *TransferFolderError `json:"error"` } func (dbx *apiImpl) TransferFolder(arg *TransferFolderArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "transfer_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError TransferFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UnmountFolderAPIError is an error-wrapper for the unmount_folder route type UnmountFolderAPIError struct { dropbox.APIError EndpointError *UnmountFolderError `json:"error"` } func (dbx *apiImpl) UnmountFolder(arg *UnmountFolderArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unmount_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError UnmountFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UnshareFileAPIError is an error-wrapper for the unshare_file route type UnshareFileAPIError struct { dropbox.APIError EndpointError *UnshareFileError `json:"error"` } func (dbx *apiImpl) UnshareFile(arg *UnshareFileArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unshare_file", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError UnshareFileAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UnshareFolderAPIError is an error-wrapper for the unshare_folder route type UnshareFolderAPIError struct { dropbox.APIError EndpointError *UnshareFolderError `json:"error"` } func (dbx *apiImpl) UnshareFolder(arg *UnshareFolderArg) (res *async.LaunchEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "unshare_folder", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UnshareFolderAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UpdateFileMemberAPIError is an error-wrapper for the update_file_member route type UpdateFileMemberAPIError struct { dropbox.APIError EndpointError *FileMemberActionError `json:"error"` } func (dbx *apiImpl) UpdateFileMember(arg *UpdateFileMemberArgs) (res *MemberAccessLevelResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_file_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UpdateFileMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UpdateFolderMemberAPIError is an error-wrapper for the update_folder_member route type UpdateFolderMemberAPIError struct { dropbox.APIError EndpointError *UpdateFolderMemberError `json:"error"` } func (dbx *apiImpl) UpdateFolderMember(arg *UpdateFolderMemberArg) (res *MemberAccessLevelResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_folder_member", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UpdateFolderMemberAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //UpdateFolderPolicyAPIError is an error-wrapper for the update_folder_policy route type UpdateFolderPolicyAPIError struct { dropbox.APIError EndpointError *UpdateFolderPolicyError `json:"error"` } func (dbx *apiImpl) UpdateFolderPolicy(arg *UpdateFolderPolicyArg) (res *SharedFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "sharing", "update_folder_policy", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError UpdateFolderPolicyAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/sharing/types.go000066400000000000000000004326231340753361200233150ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package sharing : This namespace contains endpoints and data types for // creating and managing shared links and shared folders. package sharing import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/seen_state" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users" ) // AccessInheritance : Information about the inheritance policy of a shared // folder. type AccessInheritance struct { dropbox.Tagged } // Valid tag values for AccessInheritance const ( AccessInheritanceInherit = "inherit" AccessInheritanceNoInherit = "no_inherit" AccessInheritanceOther = "other" ) // AccessLevel : Defines the access levels for collaborators. type AccessLevel struct { dropbox.Tagged } // Valid tag values for AccessLevel const ( AccessLevelOwner = "owner" AccessLevelEditor = "editor" AccessLevelViewer = "viewer" AccessLevelViewerNoComment = "viewer_no_comment" AccessLevelOther = "other" ) // AclUpdatePolicy : Who can change a shared folder's access control list (ACL). // In other words, who can add, remove, or change the privileges of members. type AclUpdatePolicy struct { dropbox.Tagged } // Valid tag values for AclUpdatePolicy const ( AclUpdatePolicyOwner = "owner" AclUpdatePolicyEditors = "editors" AclUpdatePolicyOther = "other" ) // AddFileMemberArgs : Arguments for `addFileMember`. type AddFileMemberArgs struct { // File : File to which to add members. File string `json:"file"` // Members : Members to add. Note that even an email address is given, this // may result in a user being directy added to the membership if that email // is the user's main account email. Members []*MemberSelector `json:"members"` // CustomMessage : Message to send to added members in their invitation. CustomMessage string `json:"custom_message,omitempty"` // Quiet : Whether added members should be notified via device notifications // of their invitation. Quiet bool `json:"quiet"` // AccessLevel : AccessLevel union object, describing what access level we // want to give new members. AccessLevel *AccessLevel `json:"access_level"` // AddMessageAsComment : If the custom message should be added as a comment // on the file. AddMessageAsComment bool `json:"add_message_as_comment"` } // NewAddFileMemberArgs returns a new AddFileMemberArgs instance func NewAddFileMemberArgs(File string, Members []*MemberSelector) *AddFileMemberArgs { s := new(AddFileMemberArgs) s.File = File s.Members = Members s.Quiet = false s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{"viewer"}} s.AddMessageAsComment = false return s } // AddFileMemberError : Errors for `addFileMember`. type AddFileMemberError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for AddFileMemberError const ( AddFileMemberErrorUserError = "user_error" AddFileMemberErrorAccessError = "access_error" AddFileMemberErrorRateLimit = "rate_limit" AddFileMemberErrorInvalidComment = "invalid_comment" AddFileMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a AddFileMemberError instance func (u *AddFileMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // AddFolderMemberArg : has no documentation (yet) type AddFolderMemberArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // Members : The intended list of members to add. Added members will // receive invites to join the shared folder. Members []*AddMember `json:"members"` // Quiet : Whether added members should be notified via email and device // notifications of their invite. Quiet bool `json:"quiet"` // CustomMessage : Optional message to display to added members in their // invitation. CustomMessage string `json:"custom_message,omitempty"` } // NewAddFolderMemberArg returns a new AddFolderMemberArg instance func NewAddFolderMemberArg(SharedFolderId string, Members []*AddMember) *AddFolderMemberArg { s := new(AddFolderMemberArg) s.SharedFolderId = SharedFolderId s.Members = Members s.Quiet = false return s } // AddFolderMemberError : has no documentation (yet) type AddFolderMemberError struct { dropbox.Tagged // AccessError : Unable to access shared folder. AccessError *SharedFolderAccessError `json:"access_error,omitempty"` // BadMember : `AddFolderMemberArg.members` contains a bad invitation // recipient. BadMember *AddMemberSelectorError `json:"bad_member,omitempty"` // TooManyMembers : The value is the member limit that was reached. TooManyMembers uint64 `json:"too_many_members,omitempty"` // TooManyPendingInvites : The value is the pending invite limit that was // reached. TooManyPendingInvites uint64 `json:"too_many_pending_invites,omitempty"` } // Valid tag values for AddFolderMemberError const ( AddFolderMemberErrorAccessError = "access_error" AddFolderMemberErrorEmailUnverified = "email_unverified" AddFolderMemberErrorBadMember = "bad_member" AddFolderMemberErrorCantShareOutsideTeam = "cant_share_outside_team" AddFolderMemberErrorTooManyMembers = "too_many_members" AddFolderMemberErrorTooManyPendingInvites = "too_many_pending_invites" AddFolderMemberErrorRateLimit = "rate_limit" AddFolderMemberErrorTooManyInvitees = "too_many_invitees" AddFolderMemberErrorInsufficientPlan = "insufficient_plan" AddFolderMemberErrorTeamFolder = "team_folder" AddFolderMemberErrorNoPermission = "no_permission" AddFolderMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a AddFolderMemberError instance func (u *AddFolderMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : Unable to access shared folder. AccessError json.RawMessage `json:"access_error,omitempty"` // BadMember : `AddFolderMemberArg.members` contains a bad invitation // recipient. BadMember json.RawMessage `json:"bad_member,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "bad_member": err = json.Unmarshal(w.BadMember, &u.BadMember) if err != nil { return err } case "too_many_members": err = json.Unmarshal(body, &u.TooManyMembers) if err != nil { return err } case "too_many_pending_invites": err = json.Unmarshal(body, &u.TooManyPendingInvites) if err != nil { return err } } return nil } // AddMember : The member and type of access the member should have when added // to a shared folder. type AddMember struct { // Member : The member to add to the shared folder. Member *MemberSelector `json:"member"` // AccessLevel : The access level to grant `member` to the shared folder. // `AccessLevel.owner` is disallowed. AccessLevel *AccessLevel `json:"access_level"` } // NewAddMember returns a new AddMember instance func NewAddMember(Member *MemberSelector) *AddMember { s := new(AddMember) s.Member = Member s.AccessLevel = &AccessLevel{Tagged: dropbox.Tagged{"viewer"}} return s } // AddMemberSelectorError : has no documentation (yet) type AddMemberSelectorError struct { dropbox.Tagged // InvalidDropboxId : The value is the ID that could not be identified. InvalidDropboxId string `json:"invalid_dropbox_id,omitempty"` // InvalidEmail : The value is the e-email address that is malformed. InvalidEmail string `json:"invalid_email,omitempty"` // UnverifiedDropboxId : The value is the ID of the Dropbox user with an // unverified e-mail address. Invite unverified users by e-mail address // instead of by their Dropbox ID. UnverifiedDropboxId string `json:"unverified_dropbox_id,omitempty"` } // Valid tag values for AddMemberSelectorError const ( AddMemberSelectorErrorAutomaticGroup = "automatic_group" AddMemberSelectorErrorInvalidDropboxId = "invalid_dropbox_id" AddMemberSelectorErrorInvalidEmail = "invalid_email" AddMemberSelectorErrorUnverifiedDropboxId = "unverified_dropbox_id" AddMemberSelectorErrorGroupDeleted = "group_deleted" AddMemberSelectorErrorGroupNotOnTeam = "group_not_on_team" AddMemberSelectorErrorOther = "other" ) // UnmarshalJSON deserializes into a AddMemberSelectorError instance func (u *AddMemberSelectorError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "invalid_dropbox_id": err = json.Unmarshal(body, &u.InvalidDropboxId) if err != nil { return err } case "invalid_email": err = json.Unmarshal(body, &u.InvalidEmail) if err != nil { return err } case "unverified_dropbox_id": err = json.Unmarshal(body, &u.UnverifiedDropboxId) if err != nil { return err } } return nil } // AudienceExceptionContentInfo : Information about the content that has a link // audience different than that of this folder. type AudienceExceptionContentInfo struct { // Name : The name of the content, which is either a file or a folder. Name string `json:"name"` } // NewAudienceExceptionContentInfo returns a new AudienceExceptionContentInfo instance func NewAudienceExceptionContentInfo(Name string) *AudienceExceptionContentInfo { s := new(AudienceExceptionContentInfo) s.Name = Name return s } // AudienceExceptions : The total count and truncated list of information of // content inside this folder that has a different audience than the link on // this folder. This is only returned for folders. type AudienceExceptions struct { // Count : has no documentation (yet) Count uint32 `json:"count"` // Exceptions : A truncated list of some of the content that is an // exception. The length of this list could be smaller than the count since // it is only a sample but will not be empty as long as count is not 0. Exceptions []*AudienceExceptionContentInfo `json:"exceptions"` } // NewAudienceExceptions returns a new AudienceExceptions instance func NewAudienceExceptions(Count uint32, Exceptions []*AudienceExceptionContentInfo) *AudienceExceptions { s := new(AudienceExceptions) s.Count = Count s.Exceptions = Exceptions return s } // AudienceRestrictingSharedFolder : Information about the shared folder that // prevents the link audience for this link from being more restrictive. type AudienceRestrictingSharedFolder struct { // SharedFolderId : The ID of the shared folder. SharedFolderId string `json:"shared_folder_id"` // Name : The name of the shared folder. Name string `json:"name"` // Audience : The link audience of the shared folder. Audience *LinkAudience `json:"audience"` } // NewAudienceRestrictingSharedFolder returns a new AudienceRestrictingSharedFolder instance func NewAudienceRestrictingSharedFolder(SharedFolderId string, Name string, Audience *LinkAudience) *AudienceRestrictingSharedFolder { s := new(AudienceRestrictingSharedFolder) s.SharedFolderId = SharedFolderId s.Name = Name s.Audience = Audience return s } // ChangeFileMemberAccessArgs : Arguments for `changeFileMemberAccess`. type ChangeFileMemberAccessArgs struct { // File : File for which we are changing a member's access. File string `json:"file"` // Member : The member whose access we are changing. Member *MemberSelector `json:"member"` // AccessLevel : The new access level for the member. AccessLevel *AccessLevel `json:"access_level"` } // NewChangeFileMemberAccessArgs returns a new ChangeFileMemberAccessArgs instance func NewChangeFileMemberAccessArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *ChangeFileMemberAccessArgs { s := new(ChangeFileMemberAccessArgs) s.File = File s.Member = Member s.AccessLevel = AccessLevel return s } // LinkMetadata : Metadata for a shared link. This can be either a // `PathLinkMetadata` or `CollectionLinkMetadata`. type LinkMetadata struct { // Url : URL of the shared link. Url string `json:"url"` // Visibility : Who can access the link. Visibility *Visibility `json:"visibility"` // Expires : Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` } // NewLinkMetadata returns a new LinkMetadata instance func NewLinkMetadata(Url string, Visibility *Visibility) *LinkMetadata { s := new(LinkMetadata) s.Url = Url s.Visibility = Visibility return s } // IsLinkMetadata is the interface type for LinkMetadata and its subtypes type IsLinkMetadata interface { IsLinkMetadata() } // IsLinkMetadata implements the IsLinkMetadata interface func (u *LinkMetadata) IsLinkMetadata() {} type linkMetadataUnion struct { dropbox.Tagged // Path : has no documentation (yet) Path *PathLinkMetadata `json:"path,omitempty"` // Collection : has no documentation (yet) Collection *CollectionLinkMetadata `json:"collection,omitempty"` } // Valid tag values for LinkMetadata const ( LinkMetadataPath = "path" LinkMetadataCollection = "collection" ) // UnmarshalJSON deserializes into a linkMetadataUnion instance func (u *linkMetadataUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` // Collection : has no documentation (yet) Collection json.RawMessage `json:"collection,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(body, &u.Path) if err != nil { return err } case "collection": err = json.Unmarshal(body, &u.Collection) if err != nil { return err } } return nil } // IsLinkMetadataFromJSON converts JSON to a concrete IsLinkMetadata instance func IsLinkMetadataFromJSON(data []byte) (IsLinkMetadata, error) { var t linkMetadataUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "path": return t.Path, nil case "collection": return t.Collection, nil } return nil, nil } // CollectionLinkMetadata : Metadata for a collection-based shared link. type CollectionLinkMetadata struct { LinkMetadata } // NewCollectionLinkMetadata returns a new CollectionLinkMetadata instance func NewCollectionLinkMetadata(Url string, Visibility *Visibility) *CollectionLinkMetadata { s := new(CollectionLinkMetadata) s.Url = Url s.Visibility = Visibility return s } // CreateSharedLinkArg : has no documentation (yet) type CreateSharedLinkArg struct { // Path : The path to share. Path string `json:"path"` // ShortUrl : Whether to return a shortened URL. ShortUrl bool `json:"short_url"` // PendingUpload : If it's okay to share a path that does not yet exist, set // this to either `PendingUploadMode.file` or `PendingUploadMode.folder` to // indicate whether to assume it's a file or folder. PendingUpload *PendingUploadMode `json:"pending_upload,omitempty"` } // NewCreateSharedLinkArg returns a new CreateSharedLinkArg instance func NewCreateSharedLinkArg(Path string) *CreateSharedLinkArg { s := new(CreateSharedLinkArg) s.Path = Path s.ShortUrl = false return s } // CreateSharedLinkError : has no documentation (yet) type CreateSharedLinkError struct { dropbox.Tagged // Path : has no documentation (yet) Path *files.LookupError `json:"path,omitempty"` } // Valid tag values for CreateSharedLinkError const ( CreateSharedLinkErrorPath = "path" CreateSharedLinkErrorOther = "other" ) // UnmarshalJSON deserializes into a CreateSharedLinkError instance func (u *CreateSharedLinkError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // CreateSharedLinkWithSettingsArg : has no documentation (yet) type CreateSharedLinkWithSettingsArg struct { // Path : The path to be shared by the shared link. Path string `json:"path"` // Settings : The requested settings for the newly created shared link. Settings *SharedLinkSettings `json:"settings,omitempty"` } // NewCreateSharedLinkWithSettingsArg returns a new CreateSharedLinkWithSettingsArg instance func NewCreateSharedLinkWithSettingsArg(Path string) *CreateSharedLinkWithSettingsArg { s := new(CreateSharedLinkWithSettingsArg) s.Path = Path return s } // CreateSharedLinkWithSettingsError : has no documentation (yet) type CreateSharedLinkWithSettingsError struct { dropbox.Tagged // Path : has no documentation (yet) Path *files.LookupError `json:"path,omitempty"` // SettingsError : There is an error with the given settings. SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"` } // Valid tag values for CreateSharedLinkWithSettingsError const ( CreateSharedLinkWithSettingsErrorPath = "path" CreateSharedLinkWithSettingsErrorEmailNotVerified = "email_not_verified" CreateSharedLinkWithSettingsErrorSharedLinkAlreadyExists = "shared_link_already_exists" CreateSharedLinkWithSettingsErrorSettingsError = "settings_error" CreateSharedLinkWithSettingsErrorAccessDenied = "access_denied" ) // UnmarshalJSON deserializes into a CreateSharedLinkWithSettingsError instance func (u *CreateSharedLinkWithSettingsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` // SettingsError : There is an error with the given settings. SettingsError json.RawMessage `json:"settings_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } case "settings_error": err = json.Unmarshal(w.SettingsError, &u.SettingsError) if err != nil { return err } } return nil } // SharedContentLinkMetadataBase : has no documentation (yet) type SharedContentLinkMetadataBase struct { // AccessLevel : The access level on the link for this file. AccessLevel *AccessLevel `json:"access_level,omitempty"` // AudienceOptions : The audience options that are available for the // content. Some audience options may be unavailable. For example, team_only // may be unavailable if the content is not owned by a user on a team. The // 'default' audience option is always available if the user can modify link // settings. AudienceOptions []*LinkAudience `json:"audience_options"` // AudienceRestrictingSharedFolder : The shared folder that prevents the // link audience for this link from being more restrictive. AudienceRestrictingSharedFolder *AudienceRestrictingSharedFolder `json:"audience_restricting_shared_folder,omitempty"` // CurrentAudience : The current audience of the link. CurrentAudience *LinkAudience `json:"current_audience"` // Expiry : Whether the link has an expiry set on it. A link with an expiry // will have its audience changed to members when the expiry is reached. Expiry time.Time `json:"expiry,omitempty"` // LinkPermissions : A list of permissions for actions you can perform on // the link. LinkPermissions []*LinkPermission `json:"link_permissions"` // PasswordProtected : Whether the link is protected by a password. PasswordProtected bool `json:"password_protected"` } // NewSharedContentLinkMetadataBase returns a new SharedContentLinkMetadataBase instance func NewSharedContentLinkMetadataBase(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *SharedContentLinkMetadataBase { s := new(SharedContentLinkMetadataBase) s.AudienceOptions = AudienceOptions s.CurrentAudience = CurrentAudience s.LinkPermissions = LinkPermissions s.PasswordProtected = PasswordProtected return s } // ExpectedSharedContentLinkMetadata : The expected metadata of a shared link // for a file or folder when a link is first created for the content. Absent if // the link already exists. type ExpectedSharedContentLinkMetadata struct { SharedContentLinkMetadataBase } // NewExpectedSharedContentLinkMetadata returns a new ExpectedSharedContentLinkMetadata instance func NewExpectedSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool) *ExpectedSharedContentLinkMetadata { s := new(ExpectedSharedContentLinkMetadata) s.AudienceOptions = AudienceOptions s.CurrentAudience = CurrentAudience s.LinkPermissions = LinkPermissions s.PasswordProtected = PasswordProtected return s } // FileAction : Sharing actions that may be taken on files. type FileAction struct { dropbox.Tagged } // Valid tag values for FileAction const ( FileActionDisableViewerInfo = "disable_viewer_info" FileActionEditContents = "edit_contents" FileActionEnableViewerInfo = "enable_viewer_info" FileActionInviteViewer = "invite_viewer" FileActionInviteViewerNoComment = "invite_viewer_no_comment" FileActionInviteEditor = "invite_editor" FileActionUnshare = "unshare" FileActionRelinquishMembership = "relinquish_membership" FileActionShareLink = "share_link" FileActionCreateLink = "create_link" FileActionOther = "other" ) // FileErrorResult : has no documentation (yet) type FileErrorResult struct { dropbox.Tagged // FileNotFoundError : File specified by id was not found. FileNotFoundError string `json:"file_not_found_error,omitempty"` // InvalidFileActionError : User does not have permission to take the // specified action on the file. InvalidFileActionError string `json:"invalid_file_action_error,omitempty"` // PermissionDeniedError : User does not have permission to access file // specified by file.Id. PermissionDeniedError string `json:"permission_denied_error,omitempty"` } // Valid tag values for FileErrorResult const ( FileErrorResultFileNotFoundError = "file_not_found_error" FileErrorResultInvalidFileActionError = "invalid_file_action_error" FileErrorResultPermissionDeniedError = "permission_denied_error" FileErrorResultOther = "other" ) // UnmarshalJSON deserializes into a FileErrorResult instance func (u *FileErrorResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "file_not_found_error": err = json.Unmarshal(body, &u.FileNotFoundError) if err != nil { return err } case "invalid_file_action_error": err = json.Unmarshal(body, &u.InvalidFileActionError) if err != nil { return err } case "permission_denied_error": err = json.Unmarshal(body, &u.PermissionDeniedError) if err != nil { return err } } return nil } // SharedLinkMetadata : The metadata of a shared link. type SharedLinkMetadata struct { // Url : URL of the shared link. Url string `json:"url"` // Id : A unique identifier for the linked file. Id string `json:"id,omitempty"` // Name : The linked file name (including extension). This never contains a // slash. Name string `json:"name"` // Expires : Expiration time, if set. By default the link won't expire. Expires time.Time `json:"expires,omitempty"` // PathLower : The lowercased full path in the user's Dropbox. This always // starts with a slash. This field will only be present only if the linked // file is in the authenticated user's dropbox. PathLower string `json:"path_lower,omitempty"` // LinkPermissions : The link's access permissions. LinkPermissions *LinkPermissions `json:"link_permissions"` // TeamMemberInfo : The team membership information of the link's owner. // This field will only be present if the link's owner is a team member. TeamMemberInfo *TeamMemberInfo `json:"team_member_info,omitempty"` // ContentOwnerTeamInfo : The team information of the content's owner. This // field will only be present if the content's owner is a team member and // the content's owner team is different from the link's owner team. ContentOwnerTeamInfo *users.Team `json:"content_owner_team_info,omitempty"` } // NewSharedLinkMetadata returns a new SharedLinkMetadata instance func NewSharedLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *SharedLinkMetadata { s := new(SharedLinkMetadata) s.Url = Url s.Name = Name s.LinkPermissions = LinkPermissions return s } // IsSharedLinkMetadata is the interface type for SharedLinkMetadata and its subtypes type IsSharedLinkMetadata interface { IsSharedLinkMetadata() } // IsSharedLinkMetadata implements the IsSharedLinkMetadata interface func (u *SharedLinkMetadata) IsSharedLinkMetadata() {} type sharedLinkMetadataUnion struct { dropbox.Tagged // File : has no documentation (yet) File *FileLinkMetadata `json:"file,omitempty"` // Folder : has no documentation (yet) Folder *FolderLinkMetadata `json:"folder,omitempty"` } // Valid tag values for SharedLinkMetadata const ( SharedLinkMetadataFile = "file" SharedLinkMetadataFolder = "folder" ) // UnmarshalJSON deserializes into a sharedLinkMetadataUnion instance func (u *sharedLinkMetadataUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // File : has no documentation (yet) File json.RawMessage `json:"file,omitempty"` // Folder : has no documentation (yet) Folder json.RawMessage `json:"folder,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "file": err = json.Unmarshal(body, &u.File) if err != nil { return err } case "folder": err = json.Unmarshal(body, &u.Folder) if err != nil { return err } } return nil } // IsSharedLinkMetadataFromJSON converts JSON to a concrete IsSharedLinkMetadata instance func IsSharedLinkMetadataFromJSON(data []byte) (IsSharedLinkMetadata, error) { var t sharedLinkMetadataUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "file": return t.File, nil case "folder": return t.Folder, nil } return nil, nil } // FileLinkMetadata : The metadata of a file shared link. type FileLinkMetadata struct { SharedLinkMetadata // ClientModified : The modification time set by the desktop client when the // file was added to Dropbox. Since this time is not verified (the Dropbox // server stores whatever the desktop client sends up), this should only be // used for display purposes (such as sorting) and not, for example, to // determine if a file has changed or not. ClientModified time.Time `json:"client_modified"` // ServerModified : The last time the file was modified on Dropbox. ServerModified time.Time `json:"server_modified"` // Rev : A unique identifier for the current revision of a file. This field // is the same rev as elsewhere in the API and can be used to detect changes // and avoid conflicts. Rev string `json:"rev"` // Size : The file size in bytes. Size uint64 `json:"size"` } // NewFileLinkMetadata returns a new FileLinkMetadata instance func NewFileLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions, ClientModified time.Time, ServerModified time.Time, Rev string, Size uint64) *FileLinkMetadata { s := new(FileLinkMetadata) s.Url = Url s.Name = Name s.LinkPermissions = LinkPermissions s.ClientModified = ClientModified s.ServerModified = ServerModified s.Rev = Rev s.Size = Size return s } // FileMemberActionError : has no documentation (yet) type FileMemberActionError struct { dropbox.Tagged // AccessError : Specified file was invalid or user does not have access. AccessError *SharingFileAccessError `json:"access_error,omitempty"` // NoExplicitAccess : The action cannot be completed because the target // member does not have explicit access to the file. The return value is the // access that the member has to the file from a parent folder. NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"` } // Valid tag values for FileMemberActionError const ( FileMemberActionErrorInvalidMember = "invalid_member" FileMemberActionErrorNoPermission = "no_permission" FileMemberActionErrorAccessError = "access_error" FileMemberActionErrorNoExplicitAccess = "no_explicit_access" FileMemberActionErrorOther = "other" ) // UnmarshalJSON deserializes into a FileMemberActionError instance func (u *FileMemberActionError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : Specified file was invalid or user does not have // access. AccessError json.RawMessage `json:"access_error,omitempty"` // NoExplicitAccess : The action cannot be completed because the target // member does not have explicit access to the file. The return value is // the access that the member has to the file from a parent folder. NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "no_explicit_access": err = json.Unmarshal(body, &u.NoExplicitAccess) if err != nil { return err } } return nil } // FileMemberActionIndividualResult : has no documentation (yet) type FileMemberActionIndividualResult struct { dropbox.Tagged // Success : Member was successfully removed from this file. If AccessLevel // is given, the member still has access via a parent shared folder. Success *AccessLevel `json:"success,omitempty"` // MemberError : User was not able to perform this action. MemberError *FileMemberActionError `json:"member_error,omitempty"` } // Valid tag values for FileMemberActionIndividualResult const ( FileMemberActionIndividualResultSuccess = "success" FileMemberActionIndividualResultMemberError = "member_error" ) // UnmarshalJSON deserializes into a FileMemberActionIndividualResult instance func (u *FileMemberActionIndividualResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : Member was successfully removed from this file. If // AccessLevel is given, the member still has access via a parent shared // folder. Success json.RawMessage `json:"success,omitempty"` // MemberError : User was not able to perform this action. MemberError json.RawMessage `json:"member_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "member_error": err = json.Unmarshal(w.MemberError, &u.MemberError) if err != nil { return err } } return nil } // FileMemberActionResult : Per-member result for `addFileMember` or // `changeFileMemberAccess`. type FileMemberActionResult struct { // Member : One of specified input members. Member *MemberSelector `json:"member"` // Result : The outcome of the action on this member. Result *FileMemberActionIndividualResult `json:"result"` } // NewFileMemberActionResult returns a new FileMemberActionResult instance func NewFileMemberActionResult(Member *MemberSelector, Result *FileMemberActionIndividualResult) *FileMemberActionResult { s := new(FileMemberActionResult) s.Member = Member s.Result = Result return s } // FileMemberRemoveActionResult : has no documentation (yet) type FileMemberRemoveActionResult struct { dropbox.Tagged // Success : Member was successfully removed from this file. Success *MemberAccessLevelResult `json:"success,omitempty"` // MemberError : User was not able to remove this member. MemberError *FileMemberActionError `json:"member_error,omitempty"` } // Valid tag values for FileMemberRemoveActionResult const ( FileMemberRemoveActionResultSuccess = "success" FileMemberRemoveActionResultMemberError = "member_error" FileMemberRemoveActionResultOther = "other" ) // UnmarshalJSON deserializes into a FileMemberRemoveActionResult instance func (u *FileMemberRemoveActionResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : Member was successfully removed from this file. Success json.RawMessage `json:"success,omitempty"` // MemberError : User was not able to remove this member. MemberError json.RawMessage `json:"member_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "member_error": err = json.Unmarshal(w.MemberError, &u.MemberError) if err != nil { return err } } return nil } // FilePermission : Whether the user is allowed to take the sharing action on // the file. type FilePermission struct { // Action : The action that the user may wish to take on the file. Action *FileAction `json:"action"` // Allow : True if the user is allowed to take the action. Allow bool `json:"allow"` // Reason : The reason why the user is denied the permission. Not present if // the action is allowed. Reason *PermissionDeniedReason `json:"reason,omitempty"` } // NewFilePermission returns a new FilePermission instance func NewFilePermission(Action *FileAction, Allow bool) *FilePermission { s := new(FilePermission) s.Action = Action s.Allow = Allow return s } // FolderAction : Actions that may be taken on shared folders. type FolderAction struct { dropbox.Tagged } // Valid tag values for FolderAction const ( FolderActionChangeOptions = "change_options" FolderActionDisableViewerInfo = "disable_viewer_info" FolderActionEditContents = "edit_contents" FolderActionEnableViewerInfo = "enable_viewer_info" FolderActionInviteEditor = "invite_editor" FolderActionInviteViewer = "invite_viewer" FolderActionInviteViewerNoComment = "invite_viewer_no_comment" FolderActionRelinquishMembership = "relinquish_membership" FolderActionUnmount = "unmount" FolderActionUnshare = "unshare" FolderActionLeaveACopy = "leave_a_copy" FolderActionShareLink = "share_link" FolderActionCreateLink = "create_link" FolderActionSetAccessInheritance = "set_access_inheritance" FolderActionOther = "other" ) // FolderLinkMetadata : The metadata of a folder shared link. type FolderLinkMetadata struct { SharedLinkMetadata } // NewFolderLinkMetadata returns a new FolderLinkMetadata instance func NewFolderLinkMetadata(Url string, Name string, LinkPermissions *LinkPermissions) *FolderLinkMetadata { s := new(FolderLinkMetadata) s.Url = Url s.Name = Name s.LinkPermissions = LinkPermissions return s } // FolderPermission : Whether the user is allowed to take the action on the // shared folder. type FolderPermission struct { // Action : The action that the user may wish to take on the folder. Action *FolderAction `json:"action"` // Allow : True if the user is allowed to take the action. Allow bool `json:"allow"` // Reason : The reason why the user is denied the permission. Not present if // the action is allowed, or if no reason is available. Reason *PermissionDeniedReason `json:"reason,omitempty"` } // NewFolderPermission returns a new FolderPermission instance func NewFolderPermission(Action *FolderAction, Allow bool) *FolderPermission { s := new(FolderPermission) s.Action = Action s.Allow = Allow return s } // FolderPolicy : A set of policies governing membership and privileges for a // shared folder. type FolderPolicy struct { // MemberPolicy : Who can be a member of this shared folder, as set on the // folder itself. The effective policy may differ from this value if the // team-wide policy is more restrictive. Present only if the folder is owned // by a team. MemberPolicy *MemberPolicy `json:"member_policy,omitempty"` // ResolvedMemberPolicy : Who can be a member of this shared folder, taking // into account both the folder and the team-wide policy. This value may // differ from that of member_policy if the team-wide policy is more // restrictive than the folder policy. Present only if the folder is owned // by a team. ResolvedMemberPolicy *MemberPolicy `json:"resolved_member_policy,omitempty"` // AclUpdatePolicy : Who can add and remove members from this shared folder. AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy"` // SharedLinkPolicy : Who links can be shared with. SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy"` // ViewerInfoPolicy : Who can enable/disable viewer info for this shared // folder. ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"` } // NewFolderPolicy returns a new FolderPolicy instance func NewFolderPolicy(AclUpdatePolicy *AclUpdatePolicy, SharedLinkPolicy *SharedLinkPolicy) *FolderPolicy { s := new(FolderPolicy) s.AclUpdatePolicy = AclUpdatePolicy s.SharedLinkPolicy = SharedLinkPolicy return s } // GetFileMetadataArg : Arguments of `getFileMetadata`. type GetFileMetadataArg struct { // File : The file to query. File string `json:"file"` // Actions : A list of `FileAction`s corresponding to `FilePermission`s that // should appear in the response's `SharedFileMetadata.permissions` field // describing the actions the authenticated user can perform on the file. Actions []*FileAction `json:"actions,omitempty"` } // NewGetFileMetadataArg returns a new GetFileMetadataArg instance func NewGetFileMetadataArg(File string) *GetFileMetadataArg { s := new(GetFileMetadataArg) s.File = File return s } // GetFileMetadataBatchArg : Arguments of `getFileMetadataBatch`. type GetFileMetadataBatchArg struct { // Files : The files to query. Files []string `json:"files"` // Actions : A list of `FileAction`s corresponding to `FilePermission`s that // should appear in the response's `SharedFileMetadata.permissions` field // describing the actions the authenticated user can perform on the file. Actions []*FileAction `json:"actions,omitempty"` } // NewGetFileMetadataBatchArg returns a new GetFileMetadataBatchArg instance func NewGetFileMetadataBatchArg(Files []string) *GetFileMetadataBatchArg { s := new(GetFileMetadataBatchArg) s.Files = Files return s } // GetFileMetadataBatchResult : Per file results of `getFileMetadataBatch`. type GetFileMetadataBatchResult struct { // File : This is the input file identifier corresponding to one of // `GetFileMetadataBatchArg.files`. File string `json:"file"` // Result : The result for this particular file. Result *GetFileMetadataIndividualResult `json:"result"` } // NewGetFileMetadataBatchResult returns a new GetFileMetadataBatchResult instance func NewGetFileMetadataBatchResult(File string, Result *GetFileMetadataIndividualResult) *GetFileMetadataBatchResult { s := new(GetFileMetadataBatchResult) s.File = File s.Result = Result return s } // GetFileMetadataError : Error result for `getFileMetadata`. type GetFileMetadataError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for GetFileMetadataError const ( GetFileMetadataErrorUserError = "user_error" GetFileMetadataErrorAccessError = "access_error" GetFileMetadataErrorOther = "other" ) // UnmarshalJSON deserializes into a GetFileMetadataError instance func (u *GetFileMetadataError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // GetFileMetadataIndividualResult : has no documentation (yet) type GetFileMetadataIndividualResult struct { dropbox.Tagged // Metadata : The result for this file if it was successful. Metadata *SharedFileMetadata `json:"metadata,omitempty"` // AccessError : The result for this file if it was an error. AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for GetFileMetadataIndividualResult const ( GetFileMetadataIndividualResultMetadata = "metadata" GetFileMetadataIndividualResultAccessError = "access_error" GetFileMetadataIndividualResultOther = "other" ) // UnmarshalJSON deserializes into a GetFileMetadataIndividualResult instance func (u *GetFileMetadataIndividualResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Metadata : The result for this file if it was successful. Metadata json.RawMessage `json:"metadata,omitempty"` // AccessError : The result for this file if it was an error. AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "metadata": err = json.Unmarshal(body, &u.Metadata) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // GetMetadataArgs : has no documentation (yet) type GetMetadataArgs struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s // that should appear in the response's `SharedFolderMetadata.permissions` // field describing the actions the authenticated user can perform on the // folder. Actions []*FolderAction `json:"actions,omitempty"` } // NewGetMetadataArgs returns a new GetMetadataArgs instance func NewGetMetadataArgs(SharedFolderId string) *GetMetadataArgs { s := new(GetMetadataArgs) s.SharedFolderId = SharedFolderId return s } // SharedLinkError : has no documentation (yet) type SharedLinkError struct { dropbox.Tagged } // Valid tag values for SharedLinkError const ( SharedLinkErrorSharedLinkNotFound = "shared_link_not_found" SharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied" SharedLinkErrorUnsupportedLinkType = "unsupported_link_type" SharedLinkErrorOther = "other" ) // GetSharedLinkFileError : has no documentation (yet) type GetSharedLinkFileError struct { dropbox.Tagged } // Valid tag values for GetSharedLinkFileError const ( GetSharedLinkFileErrorSharedLinkNotFound = "shared_link_not_found" GetSharedLinkFileErrorSharedLinkAccessDenied = "shared_link_access_denied" GetSharedLinkFileErrorUnsupportedLinkType = "unsupported_link_type" GetSharedLinkFileErrorOther = "other" GetSharedLinkFileErrorSharedLinkIsDirectory = "shared_link_is_directory" ) // GetSharedLinkMetadataArg : has no documentation (yet) type GetSharedLinkMetadataArg struct { // Url : URL of the shared link. Url string `json:"url"` // Path : If the shared link is to a folder, this parameter can be used to // retrieve the metadata for a specific file or sub-folder in this folder. A // relative path should be used. Path string `json:"path,omitempty"` // LinkPassword : If the shared link has a password, this parameter can be // used. LinkPassword string `json:"link_password,omitempty"` } // NewGetSharedLinkMetadataArg returns a new GetSharedLinkMetadataArg instance func NewGetSharedLinkMetadataArg(Url string) *GetSharedLinkMetadataArg { s := new(GetSharedLinkMetadataArg) s.Url = Url return s } // GetSharedLinksArg : has no documentation (yet) type GetSharedLinksArg struct { // Path : See `getSharedLinks` description. Path string `json:"path,omitempty"` } // NewGetSharedLinksArg returns a new GetSharedLinksArg instance func NewGetSharedLinksArg() *GetSharedLinksArg { s := new(GetSharedLinksArg) return s } // GetSharedLinksError : has no documentation (yet) type GetSharedLinksError struct { dropbox.Tagged // Path : has no documentation (yet) Path string `json:"path,omitempty"` } // Valid tag values for GetSharedLinksError const ( GetSharedLinksErrorPath = "path" GetSharedLinksErrorOther = "other" ) // UnmarshalJSON deserializes into a GetSharedLinksError instance func (u *GetSharedLinksError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(body, &u.Path) if err != nil { return err } } return nil } // GetSharedLinksResult : has no documentation (yet) type GetSharedLinksResult struct { // Links : Shared links applicable to the path argument. Links []IsLinkMetadata `json:"links"` } // NewGetSharedLinksResult returns a new GetSharedLinksResult instance func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResult { s := new(GetSharedLinksResult) s.Links = Links return s } // UnmarshalJSON deserializes into a GetSharedLinksResult instance func (u *GetSharedLinksResult) UnmarshalJSON(b []byte) error { type wrap struct { // Links : Shared links applicable to the path argument. Links []json.RawMessage `json:"links"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } u.Links = make([]IsLinkMetadata, len(w.Links)) for i, e := range w.Links { v, err := IsLinkMetadataFromJSON(e) if err != nil { return err } u.Links[i] = v } return nil } // GroupInfo : The information about a group. Groups is a way to manage a list // of users who need same access permission to the shared folder. type GroupInfo struct { team_common.GroupSummary // GroupType : The type of group. GroupType *team_common.GroupType `json:"group_type"` // IsMember : If the current user is a member of the group. IsMember bool `json:"is_member"` // IsOwner : If the current user is an owner of the group. IsOwner bool `json:"is_owner"` // SameTeam : If the group is owned by the current user's team. SameTeam bool `json:"same_team"` } // NewGroupInfo returns a new GroupInfo instance func NewGroupInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, GroupType *team_common.GroupType, IsMember bool, IsOwner bool, SameTeam bool) *GroupInfo { s := new(GroupInfo) s.GroupName = GroupName s.GroupId = GroupId s.GroupManagementType = GroupManagementType s.GroupType = GroupType s.IsMember = IsMember s.IsOwner = IsOwner s.SameTeam = SameTeam return s } // MembershipInfo : The information about a member of the shared content. type MembershipInfo struct { // AccessType : The access type for this member. It contains inherited // access type from parent folder, and acquired access type from this // folder. AccessType *AccessLevel `json:"access_type"` // Permissions : The permissions that requesting user has on this member. // The set of permissions corresponds to the MemberActions in the request. Permissions []*MemberPermission `json:"permissions,omitempty"` // Initials : Never set. Initials string `json:"initials,omitempty"` // IsInherited : True if the member has access from a parent folder. IsInherited bool `json:"is_inherited"` } // NewMembershipInfo returns a new MembershipInfo instance func NewMembershipInfo(AccessType *AccessLevel) *MembershipInfo { s := new(MembershipInfo) s.AccessType = AccessType s.IsInherited = false return s } // GroupMembershipInfo : The information about a group member of the shared // content. type GroupMembershipInfo struct { MembershipInfo // Group : The information about the membership group. Group *GroupInfo `json:"group"` } // NewGroupMembershipInfo returns a new GroupMembershipInfo instance func NewGroupMembershipInfo(AccessType *AccessLevel, Group *GroupInfo) *GroupMembershipInfo { s := new(GroupMembershipInfo) s.AccessType = AccessType s.Group = Group s.IsInherited = false return s } // InsufficientPlan : has no documentation (yet) type InsufficientPlan struct { // Message : A message to tell the user to upgrade in order to support // expected action. Message string `json:"message"` // UpsellUrl : A URL to send the user to in order to obtain the account type // they need, e.g. upgrading. Absent if there is no action the user can take // to upgrade. UpsellUrl string `json:"upsell_url,omitempty"` } // NewInsufficientPlan returns a new InsufficientPlan instance func NewInsufficientPlan(Message string) *InsufficientPlan { s := new(InsufficientPlan) s.Message = Message return s } // InsufficientQuotaAmounts : has no documentation (yet) type InsufficientQuotaAmounts struct { // SpaceNeeded : The amount of space needed to add the item (the size of the // item). SpaceNeeded uint64 `json:"space_needed"` // SpaceShortage : The amount of extra space needed to add the item. SpaceShortage uint64 `json:"space_shortage"` // SpaceLeft : The amount of space left in the user's Dropbox, less than // space_needed. SpaceLeft uint64 `json:"space_left"` } // NewInsufficientQuotaAmounts returns a new InsufficientQuotaAmounts instance func NewInsufficientQuotaAmounts(SpaceNeeded uint64, SpaceShortage uint64, SpaceLeft uint64) *InsufficientQuotaAmounts { s := new(InsufficientQuotaAmounts) s.SpaceNeeded = SpaceNeeded s.SpaceShortage = SpaceShortage s.SpaceLeft = SpaceLeft return s } // InviteeInfo : Information about the recipient of a shared content invitation. type InviteeInfo struct { dropbox.Tagged // Email : E-mail address of invited user. Email string `json:"email,omitempty"` } // Valid tag values for InviteeInfo const ( InviteeInfoEmail = "email" InviteeInfoOther = "other" ) // UnmarshalJSON deserializes into a InviteeInfo instance func (u *InviteeInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "email": err = json.Unmarshal(body, &u.Email) if err != nil { return err } } return nil } // InviteeMembershipInfo : Information about an invited member of a shared // content. type InviteeMembershipInfo struct { MembershipInfo // Invitee : Recipient of the invitation. Invitee *InviteeInfo `json:"invitee"` // User : The user this invitation is tied to, if available. User *UserInfo `json:"user,omitempty"` } // NewInviteeMembershipInfo returns a new InviteeMembershipInfo instance func NewInviteeMembershipInfo(AccessType *AccessLevel, Invitee *InviteeInfo) *InviteeMembershipInfo { s := new(InviteeMembershipInfo) s.AccessType = AccessType s.Invitee = Invitee s.IsInherited = false return s } // JobError : Error occurred while performing an asynchronous job from // `unshareFolder` or `removeFolderMember`. type JobError struct { dropbox.Tagged // UnshareFolderError : Error occurred while performing `unshareFolder` // action. UnshareFolderError *UnshareFolderError `json:"unshare_folder_error,omitempty"` // RemoveFolderMemberError : Error occurred while performing // `removeFolderMember` action. RemoveFolderMemberError *RemoveFolderMemberError `json:"remove_folder_member_error,omitempty"` // RelinquishFolderMembershipError : Error occurred while performing // `relinquishFolderMembership` action. RelinquishFolderMembershipError *RelinquishFolderMembershipError `json:"relinquish_folder_membership_error,omitempty"` } // Valid tag values for JobError const ( JobErrorUnshareFolderError = "unshare_folder_error" JobErrorRemoveFolderMemberError = "remove_folder_member_error" JobErrorRelinquishFolderMembershipError = "relinquish_folder_membership_error" JobErrorOther = "other" ) // UnmarshalJSON deserializes into a JobError instance func (u *JobError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UnshareFolderError : Error occurred while performing `unshareFolder` // action. UnshareFolderError json.RawMessage `json:"unshare_folder_error,omitempty"` // RemoveFolderMemberError : Error occurred while performing // `removeFolderMember` action. RemoveFolderMemberError json.RawMessage `json:"remove_folder_member_error,omitempty"` // RelinquishFolderMembershipError : Error occurred while performing // `relinquishFolderMembership` action. RelinquishFolderMembershipError json.RawMessage `json:"relinquish_folder_membership_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "unshare_folder_error": err = json.Unmarshal(w.UnshareFolderError, &u.UnshareFolderError) if err != nil { return err } case "remove_folder_member_error": err = json.Unmarshal(w.RemoveFolderMemberError, &u.RemoveFolderMemberError) if err != nil { return err } case "relinquish_folder_membership_error": err = json.Unmarshal(w.RelinquishFolderMembershipError, &u.RelinquishFolderMembershipError) if err != nil { return err } } return nil } // JobStatus : has no documentation (yet) type JobStatus struct { dropbox.Tagged // Failed : The asynchronous job returned an error. Failed *JobError `json:"failed,omitempty"` } // Valid tag values for JobStatus const ( JobStatusInProgress = "in_progress" JobStatusComplete = "complete" JobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a JobStatus instance func (u *JobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Failed : The asynchronous job returned an error. Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // LinkAction : Actions that can be performed on a link. type LinkAction struct { dropbox.Tagged } // Valid tag values for LinkAction const ( LinkActionChangeAccessLevel = "change_access_level" LinkActionChangeAudience = "change_audience" LinkActionRemoveExpiry = "remove_expiry" LinkActionRemovePassword = "remove_password" LinkActionSetExpiry = "set_expiry" LinkActionSetPassword = "set_password" LinkActionOther = "other" ) // LinkAudience : has no documentation (yet) type LinkAudience struct { dropbox.Tagged } // Valid tag values for LinkAudience const ( LinkAudiencePublic = "public" LinkAudienceTeam = "team" LinkAudienceNoOne = "no_one" LinkAudienceMembers = "members" LinkAudienceOther = "other" ) // LinkExpiry : has no documentation (yet) type LinkExpiry struct { dropbox.Tagged // SetExpiry : Set a new expiry or change an existing expiry. SetExpiry time.Time `json:"set_expiry,omitempty"` } // Valid tag values for LinkExpiry const ( LinkExpiryRemoveExpiry = "remove_expiry" LinkExpirySetExpiry = "set_expiry" LinkExpiryOther = "other" ) // UnmarshalJSON deserializes into a LinkExpiry instance func (u *LinkExpiry) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "set_expiry": err = json.Unmarshal(body, &u.SetExpiry) if err != nil { return err } } return nil } // LinkPassword : has no documentation (yet) type LinkPassword struct { dropbox.Tagged // SetPassword : Set a new password or change an existing password. SetPassword string `json:"set_password,omitempty"` } // Valid tag values for LinkPassword const ( LinkPasswordRemovePassword = "remove_password" LinkPasswordSetPassword = "set_password" LinkPasswordOther = "other" ) // UnmarshalJSON deserializes into a LinkPassword instance func (u *LinkPassword) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "set_password": err = json.Unmarshal(body, &u.SetPassword) if err != nil { return err } } return nil } // LinkPermission : Permissions for actions that can be performed on a link. type LinkPermission struct { // Action : has no documentation (yet) Action *LinkAction `json:"action"` // Allow : has no documentation (yet) Allow bool `json:"allow"` // Reason : has no documentation (yet) Reason *PermissionDeniedReason `json:"reason,omitempty"` } // NewLinkPermission returns a new LinkPermission instance func NewLinkPermission(Action *LinkAction, Allow bool) *LinkPermission { s := new(LinkPermission) s.Action = Action s.Allow = Allow return s } // LinkPermissions : has no documentation (yet) type LinkPermissions struct { // ResolvedVisibility : The current visibility of the link after considering // the shared links policies of the the team (in case the link's owner is // part of a team) and the shared folder (in case the linked file is part of // a shared folder). This field is shown only if the caller has access to // this info (the link's owner always has access to this data). ResolvedVisibility *ResolvedVisibility `json:"resolved_visibility,omitempty"` // RequestedVisibility : The shared link's requested visibility. This can be // overridden by the team and shared folder policies. The final visibility, // after considering these policies, can be found in `resolved_visibility`. // This is shown only if the caller is the link's owner. RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"` // CanRevoke : Whether the caller can revoke the shared link. CanRevoke bool `json:"can_revoke"` // RevokeFailureReason : The failure reason for revoking the link. This // field will only be present if the `can_revoke` is false. RevokeFailureReason *SharedLinkAccessFailureReason `json:"revoke_failure_reason,omitempty"` } // NewLinkPermissions returns a new LinkPermissions instance func NewLinkPermissions(CanRevoke bool) *LinkPermissions { s := new(LinkPermissions) s.CanRevoke = CanRevoke return s } // LinkSettings : Settings that apply to a link. type LinkSettings struct { // AccessLevel : The access level on the link for this file. Currently, it // only accepts 'viewer' and 'viewer_no_comment'. AccessLevel *AccessLevel `json:"access_level,omitempty"` // Audience : The type of audience on the link for this file. Audience *LinkAudience `json:"audience,omitempty"` // Expiry : An expiry timestamp to set on a link. Expiry *LinkExpiry `json:"expiry,omitempty"` // Password : The password for the link. Password *LinkPassword `json:"password,omitempty"` } // NewLinkSettings returns a new LinkSettings instance func NewLinkSettings() *LinkSettings { s := new(LinkSettings) return s } // ListFileMembersArg : Arguments for `listFileMembers`. type ListFileMembersArg struct { // File : The file for which you want to see members. File string `json:"file"` // Actions : The actions for which to return permissions on a member. Actions []*MemberAction `json:"actions,omitempty"` // IncludeInherited : Whether to include members who only have access from a // parent shared folder. IncludeInherited bool `json:"include_inherited"` // Limit : Number of members to return max per query. Defaults to 100 if no // limit is specified. Limit uint32 `json:"limit"` } // NewListFileMembersArg returns a new ListFileMembersArg instance func NewListFileMembersArg(File string) *ListFileMembersArg { s := new(ListFileMembersArg) s.File = File s.IncludeInherited = true s.Limit = 100 return s } // ListFileMembersBatchArg : Arguments for `listFileMembersBatch`. type ListFileMembersBatchArg struct { // Files : Files for which to return members. Files []string `json:"files"` // Limit : Number of members to return max per query. Defaults to 10 if no // limit is specified. Limit uint32 `json:"limit"` } // NewListFileMembersBatchArg returns a new ListFileMembersBatchArg instance func NewListFileMembersBatchArg(Files []string) *ListFileMembersBatchArg { s := new(ListFileMembersBatchArg) s.Files = Files s.Limit = 10 return s } // ListFileMembersBatchResult : Per-file result for `listFileMembersBatch`. type ListFileMembersBatchResult struct { // File : This is the input file identifier, whether an ID or a path. File string `json:"file"` // Result : The result for this particular file. Result *ListFileMembersIndividualResult `json:"result"` } // NewListFileMembersBatchResult returns a new ListFileMembersBatchResult instance func NewListFileMembersBatchResult(File string, Result *ListFileMembersIndividualResult) *ListFileMembersBatchResult { s := new(ListFileMembersBatchResult) s.File = File s.Result = Result return s } // ListFileMembersContinueArg : Arguments for `listFileMembersContinue`. type ListFileMembersContinueArg struct { // Cursor : The cursor returned by your last call to `listFileMembers`, // `listFileMembersContinue`, or `listFileMembersBatch`. Cursor string `json:"cursor"` } // NewListFileMembersContinueArg returns a new ListFileMembersContinueArg instance func NewListFileMembersContinueArg(Cursor string) *ListFileMembersContinueArg { s := new(ListFileMembersContinueArg) s.Cursor = Cursor return s } // ListFileMembersContinueError : Error for `listFileMembersContinue`. type ListFileMembersContinueError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for ListFileMembersContinueError const ( ListFileMembersContinueErrorUserError = "user_error" ListFileMembersContinueErrorAccessError = "access_error" ListFileMembersContinueErrorInvalidCursor = "invalid_cursor" ListFileMembersContinueErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFileMembersContinueError instance func (u *ListFileMembersContinueError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // ListFileMembersCountResult : has no documentation (yet) type ListFileMembersCountResult struct { // Members : A list of members on this file. Members *SharedFileMembers `json:"members"` // MemberCount : The number of members on this file. This does not include // inherited members. MemberCount uint32 `json:"member_count"` } // NewListFileMembersCountResult returns a new ListFileMembersCountResult instance func NewListFileMembersCountResult(Members *SharedFileMembers, MemberCount uint32) *ListFileMembersCountResult { s := new(ListFileMembersCountResult) s.Members = Members s.MemberCount = MemberCount return s } // ListFileMembersError : Error for `listFileMembers`. type ListFileMembersError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for ListFileMembersError const ( ListFileMembersErrorUserError = "user_error" ListFileMembersErrorAccessError = "access_error" ListFileMembersErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFileMembersError instance func (u *ListFileMembersError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // ListFileMembersIndividualResult : has no documentation (yet) type ListFileMembersIndividualResult struct { dropbox.Tagged // Result : The results of the query for this file if it was successful. Result *ListFileMembersCountResult `json:"result,omitempty"` // AccessError : The result of the query for this file if it was an error. AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for ListFileMembersIndividualResult const ( ListFileMembersIndividualResultResult = "result" ListFileMembersIndividualResultAccessError = "access_error" ListFileMembersIndividualResultOther = "other" ) // UnmarshalJSON deserializes into a ListFileMembersIndividualResult instance func (u *ListFileMembersIndividualResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Result : The results of the query for this file if it was successful. Result json.RawMessage `json:"result,omitempty"` // AccessError : The result of the query for this file if it was an // error. AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "result": err = json.Unmarshal(body, &u.Result) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // ListFilesArg : Arguments for `listReceivedFiles`. type ListFilesArg struct { // Limit : Number of files to return max per query. Defaults to 100 if no // limit is specified. Limit uint32 `json:"limit"` // Actions : A list of `FileAction`s corresponding to `FilePermission`s that // should appear in the response's `SharedFileMetadata.permissions` field // describing the actions the authenticated user can perform on the file. Actions []*FileAction `json:"actions,omitempty"` } // NewListFilesArg returns a new ListFilesArg instance func NewListFilesArg() *ListFilesArg { s := new(ListFilesArg) s.Limit = 100 return s } // ListFilesContinueArg : Arguments for `listReceivedFilesContinue`. type ListFilesContinueArg struct { // Cursor : Cursor in `ListFilesResult.cursor`. Cursor string `json:"cursor"` } // NewListFilesContinueArg returns a new ListFilesContinueArg instance func NewListFilesContinueArg(Cursor string) *ListFilesContinueArg { s := new(ListFilesContinueArg) s.Cursor = Cursor return s } // ListFilesContinueError : Error results for `listReceivedFilesContinue`. type ListFilesContinueError struct { dropbox.Tagged // UserError : User account had a problem. UserError *SharingUserError `json:"user_error,omitempty"` } // Valid tag values for ListFilesContinueError const ( ListFilesContinueErrorUserError = "user_error" ListFilesContinueErrorInvalidCursor = "invalid_cursor" ListFilesContinueErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFilesContinueError instance func (u *ListFilesContinueError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : User account had a problem. UserError json.RawMessage `json:"user_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } } return nil } // ListFilesResult : Success results for `listReceivedFiles`. type ListFilesResult struct { // Entries : Information about the files shared with current user. Entries []*SharedFileMetadata `json:"entries"` // Cursor : Cursor used to obtain additional shared files. Cursor string `json:"cursor,omitempty"` } // NewListFilesResult returns a new ListFilesResult instance func NewListFilesResult(Entries []*SharedFileMetadata) *ListFilesResult { s := new(ListFilesResult) s.Entries = Entries return s } // ListFolderMembersCursorArg : has no documentation (yet) type ListFolderMembersCursorArg struct { // Actions : This is a list indicating whether each returned member will // include a boolean value `MemberPermission.allow` that describes whether // the current user can perform the MemberAction on the member. Actions []*MemberAction `json:"actions,omitempty"` // Limit : The maximum number of results that include members, groups and // invitees to return per request. Limit uint32 `json:"limit"` } // NewListFolderMembersCursorArg returns a new ListFolderMembersCursorArg instance func NewListFolderMembersCursorArg() *ListFolderMembersCursorArg { s := new(ListFolderMembersCursorArg) s.Limit = 1000 return s } // ListFolderMembersArgs : has no documentation (yet) type ListFolderMembersArgs struct { ListFolderMembersCursorArg // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` } // NewListFolderMembersArgs returns a new ListFolderMembersArgs instance func NewListFolderMembersArgs(SharedFolderId string) *ListFolderMembersArgs { s := new(ListFolderMembersArgs) s.SharedFolderId = SharedFolderId s.Limit = 1000 return s } // ListFolderMembersContinueArg : has no documentation (yet) type ListFolderMembersContinueArg struct { // Cursor : The cursor returned by your last call to `listFolderMembers` or // `listFolderMembersContinue`. Cursor string `json:"cursor"` } // NewListFolderMembersContinueArg returns a new ListFolderMembersContinueArg instance func NewListFolderMembersContinueArg(Cursor string) *ListFolderMembersContinueArg { s := new(ListFolderMembersContinueArg) s.Cursor = Cursor return s } // ListFolderMembersContinueError : has no documentation (yet) type ListFolderMembersContinueError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for ListFolderMembersContinueError const ( ListFolderMembersContinueErrorAccessError = "access_error" ListFolderMembersContinueErrorInvalidCursor = "invalid_cursor" ListFolderMembersContinueErrorOther = "other" ) // UnmarshalJSON deserializes into a ListFolderMembersContinueError instance func (u *ListFolderMembersContinueError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // ListFoldersArgs : has no documentation (yet) type ListFoldersArgs struct { // Limit : The maximum number of results to return per request. Limit uint32 `json:"limit"` // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s // that should appear in the response's `SharedFolderMetadata.permissions` // field describing the actions the authenticated user can perform on the // folder. Actions []*FolderAction `json:"actions,omitempty"` } // NewListFoldersArgs returns a new ListFoldersArgs instance func NewListFoldersArgs() *ListFoldersArgs { s := new(ListFoldersArgs) s.Limit = 1000 return s } // ListFoldersContinueArg : has no documentation (yet) type ListFoldersContinueArg struct { // Cursor : The cursor returned by the previous API call specified in the // endpoint description. Cursor string `json:"cursor"` } // NewListFoldersContinueArg returns a new ListFoldersContinueArg instance func NewListFoldersContinueArg(Cursor string) *ListFoldersContinueArg { s := new(ListFoldersContinueArg) s.Cursor = Cursor return s } // ListFoldersContinueError : has no documentation (yet) type ListFoldersContinueError struct { dropbox.Tagged } // Valid tag values for ListFoldersContinueError const ( ListFoldersContinueErrorInvalidCursor = "invalid_cursor" ListFoldersContinueErrorOther = "other" ) // ListFoldersResult : Result for `listFolders` or `listMountableFolders`, // depending on which endpoint was requested. Unmounted shared folders can be // identified by the absence of `SharedFolderMetadata.path_lower`. type ListFoldersResult struct { // Entries : List of all shared folders the authenticated user has access // to. Entries []*SharedFolderMetadata `json:"entries"` // Cursor : Present if there are additional shared folders that have not // been returned yet. Pass the cursor into the corresponding continue // endpoint (either `listFoldersContinue` or `listMountableFoldersContinue`) // to list additional folders. Cursor string `json:"cursor,omitempty"` } // NewListFoldersResult returns a new ListFoldersResult instance func NewListFoldersResult(Entries []*SharedFolderMetadata) *ListFoldersResult { s := new(ListFoldersResult) s.Entries = Entries return s } // ListSharedLinksArg : has no documentation (yet) type ListSharedLinksArg struct { // Path : See `listSharedLinks` description. Path string `json:"path,omitempty"` // Cursor : The cursor returned by your last call to `listSharedLinks`. Cursor string `json:"cursor,omitempty"` // DirectOnly : See `listSharedLinks` description. DirectOnly bool `json:"direct_only,omitempty"` } // NewListSharedLinksArg returns a new ListSharedLinksArg instance func NewListSharedLinksArg() *ListSharedLinksArg { s := new(ListSharedLinksArg) return s } // ListSharedLinksError : has no documentation (yet) type ListSharedLinksError struct { dropbox.Tagged // Path : has no documentation (yet) Path *files.LookupError `json:"path,omitempty"` } // Valid tag values for ListSharedLinksError const ( ListSharedLinksErrorPath = "path" ListSharedLinksErrorReset = "reset" ListSharedLinksErrorOther = "other" ) // UnmarshalJSON deserializes into a ListSharedLinksError instance func (u *ListSharedLinksError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Path : has no documentation (yet) Path json.RawMessage `json:"path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "path": err = json.Unmarshal(w.Path, &u.Path) if err != nil { return err } } return nil } // ListSharedLinksResult : has no documentation (yet) type ListSharedLinksResult struct { // Links : Shared links applicable to the path argument. Links []IsSharedLinkMetadata `json:"links"` // HasMore : Is true if there are additional shared links that have not been // returned yet. Pass the cursor into `listSharedLinks` to retrieve them. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `listSharedLinks` to obtain the additional // links. Cursor is returned only if no path is given. Cursor string `json:"cursor,omitempty"` } // NewListSharedLinksResult returns a new ListSharedLinksResult instance func NewListSharedLinksResult(Links []IsSharedLinkMetadata, HasMore bool) *ListSharedLinksResult { s := new(ListSharedLinksResult) s.Links = Links s.HasMore = HasMore return s } // UnmarshalJSON deserializes into a ListSharedLinksResult instance func (u *ListSharedLinksResult) UnmarshalJSON(b []byte) error { type wrap struct { // Links : Shared links applicable to the path argument. Links []json.RawMessage `json:"links"` // HasMore : Is true if there are additional shared links that have not // been returned yet. Pass the cursor into `listSharedLinks` to retrieve // them. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `listSharedLinks` to obtain the // additional links. Cursor is returned only if no path is given. Cursor string `json:"cursor,omitempty"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } u.Links = make([]IsSharedLinkMetadata, len(w.Links)) for i, e := range w.Links { v, err := IsSharedLinkMetadataFromJSON(e) if err != nil { return err } u.Links[i] = v } u.HasMore = w.HasMore u.Cursor = w.Cursor return nil } // MemberAccessLevelResult : Contains information about a member's access level // to content after an operation. type MemberAccessLevelResult struct { // AccessLevel : The member still has this level of access to the content // through a parent folder. AccessLevel *AccessLevel `json:"access_level,omitempty"` // Warning : A localized string with additional information about why the // user has this access level to the content. Warning string `json:"warning,omitempty"` // AccessDetails : The parent folders that a member has access to. The field // is present if the user has access to the first parent folder where the // member gains access. AccessDetails []*ParentFolderAccessInfo `json:"access_details,omitempty"` } // NewMemberAccessLevelResult returns a new MemberAccessLevelResult instance func NewMemberAccessLevelResult() *MemberAccessLevelResult { s := new(MemberAccessLevelResult) return s } // MemberAction : Actions that may be taken on members of a shared folder. type MemberAction struct { dropbox.Tagged } // Valid tag values for MemberAction const ( MemberActionLeaveACopy = "leave_a_copy" MemberActionMakeEditor = "make_editor" MemberActionMakeOwner = "make_owner" MemberActionMakeViewer = "make_viewer" MemberActionMakeViewerNoComment = "make_viewer_no_comment" MemberActionRemove = "remove" MemberActionOther = "other" ) // MemberPermission : Whether the user is allowed to take the action on the // associated member. type MemberPermission struct { // Action : The action that the user may wish to take on the member. Action *MemberAction `json:"action"` // Allow : True if the user is allowed to take the action. Allow bool `json:"allow"` // Reason : The reason why the user is denied the permission. Not present if // the action is allowed. Reason *PermissionDeniedReason `json:"reason,omitempty"` } // NewMemberPermission returns a new MemberPermission instance func NewMemberPermission(Action *MemberAction, Allow bool) *MemberPermission { s := new(MemberPermission) s.Action = Action s.Allow = Allow return s } // MemberPolicy : Policy governing who can be a member of a shared folder. Only // applicable to folders owned by a user on a team. type MemberPolicy struct { dropbox.Tagged } // Valid tag values for MemberPolicy const ( MemberPolicyTeam = "team" MemberPolicyAnyone = "anyone" MemberPolicyOther = "other" ) // MemberSelector : Includes different ways to identify a member of a shared // folder. type MemberSelector struct { dropbox.Tagged // DropboxId : Dropbox account, team member, or group ID of member. DropboxId string `json:"dropbox_id,omitempty"` // Email : E-mail address of member. Email string `json:"email,omitempty"` } // Valid tag values for MemberSelector const ( MemberSelectorDropboxId = "dropbox_id" MemberSelectorEmail = "email" MemberSelectorOther = "other" ) // UnmarshalJSON deserializes into a MemberSelector instance func (u *MemberSelector) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "dropbox_id": err = json.Unmarshal(body, &u.DropboxId) if err != nil { return err } case "email": err = json.Unmarshal(body, &u.Email) if err != nil { return err } } return nil } // ModifySharedLinkSettingsArgs : has no documentation (yet) type ModifySharedLinkSettingsArgs struct { // Url : URL of the shared link to change its settings. Url string `json:"url"` // Settings : Set of settings for the shared link. Settings *SharedLinkSettings `json:"settings"` // RemoveExpiration : If set to true, removes the expiration of the shared // link. RemoveExpiration bool `json:"remove_expiration"` } // NewModifySharedLinkSettingsArgs returns a new ModifySharedLinkSettingsArgs instance func NewModifySharedLinkSettingsArgs(Url string, Settings *SharedLinkSettings) *ModifySharedLinkSettingsArgs { s := new(ModifySharedLinkSettingsArgs) s.Url = Url s.Settings = Settings s.RemoveExpiration = false return s } // ModifySharedLinkSettingsError : has no documentation (yet) type ModifySharedLinkSettingsError struct { dropbox.Tagged // SettingsError : There is an error with the given settings. SettingsError *SharedLinkSettingsError `json:"settings_error,omitempty"` } // Valid tag values for ModifySharedLinkSettingsError const ( ModifySharedLinkSettingsErrorSharedLinkNotFound = "shared_link_not_found" ModifySharedLinkSettingsErrorSharedLinkAccessDenied = "shared_link_access_denied" ModifySharedLinkSettingsErrorUnsupportedLinkType = "unsupported_link_type" ModifySharedLinkSettingsErrorOther = "other" ModifySharedLinkSettingsErrorSettingsError = "settings_error" ModifySharedLinkSettingsErrorEmailNotVerified = "email_not_verified" ) // UnmarshalJSON deserializes into a ModifySharedLinkSettingsError instance func (u *ModifySharedLinkSettingsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // SettingsError : There is an error with the given settings. SettingsError json.RawMessage `json:"settings_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "settings_error": err = json.Unmarshal(w.SettingsError, &u.SettingsError) if err != nil { return err } } return nil } // MountFolderArg : has no documentation (yet) type MountFolderArg struct { // SharedFolderId : The ID of the shared folder to mount. SharedFolderId string `json:"shared_folder_id"` } // NewMountFolderArg returns a new MountFolderArg instance func NewMountFolderArg(SharedFolderId string) *MountFolderArg { s := new(MountFolderArg) s.SharedFolderId = SharedFolderId return s } // MountFolderError : has no documentation (yet) type MountFolderError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` // InsufficientQuota : The current user does not have enough space to mount // the shared folder. InsufficientQuota *InsufficientQuotaAmounts `json:"insufficient_quota,omitempty"` } // Valid tag values for MountFolderError const ( MountFolderErrorAccessError = "access_error" MountFolderErrorInsideSharedFolder = "inside_shared_folder" MountFolderErrorInsufficientQuota = "insufficient_quota" MountFolderErrorAlreadyMounted = "already_mounted" MountFolderErrorNoPermission = "no_permission" MountFolderErrorNotMountable = "not_mountable" MountFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a MountFolderError instance func (u *MountFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // InsufficientQuota : The current user does not have enough space to // mount the shared folder. InsufficientQuota json.RawMessage `json:"insufficient_quota,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "insufficient_quota": err = json.Unmarshal(body, &u.InsufficientQuota) if err != nil { return err } } return nil } // ParentFolderAccessInfo : Contains information about a parent folder that a // member has access to. type ParentFolderAccessInfo struct { // FolderName : Display name for the folder. FolderName string `json:"folder_name"` // SharedFolderId : The identifier of the parent shared folder. SharedFolderId string `json:"shared_folder_id"` // Permissions : The user's permissions for the parent shared folder. Permissions []*MemberPermission `json:"permissions"` // Path : The full path to the parent shared folder relative to the acting // user's root. Path string `json:"path"` } // NewParentFolderAccessInfo returns a new ParentFolderAccessInfo instance func NewParentFolderAccessInfo(FolderName string, SharedFolderId string, Permissions []*MemberPermission, Path string) *ParentFolderAccessInfo { s := new(ParentFolderAccessInfo) s.FolderName = FolderName s.SharedFolderId = SharedFolderId s.Permissions = Permissions s.Path = Path return s } // PathLinkMetadata : Metadata for a path-based shared link. type PathLinkMetadata struct { LinkMetadata // Path : Path in user's Dropbox. Path string `json:"path"` } // NewPathLinkMetadata returns a new PathLinkMetadata instance func NewPathLinkMetadata(Url string, Visibility *Visibility, Path string) *PathLinkMetadata { s := new(PathLinkMetadata) s.Url = Url s.Visibility = Visibility s.Path = Path return s } // PendingUploadMode : Flag to indicate pending upload default (for linking to // not-yet-existing paths). type PendingUploadMode struct { dropbox.Tagged } // Valid tag values for PendingUploadMode const ( PendingUploadModeFile = "file" PendingUploadModeFolder = "folder" ) // PermissionDeniedReason : Possible reasons the user is denied a permission. type PermissionDeniedReason struct { dropbox.Tagged // InsufficientPlan : has no documentation (yet) InsufficientPlan *InsufficientPlan `json:"insufficient_plan,omitempty"` } // Valid tag values for PermissionDeniedReason const ( PermissionDeniedReasonUserNotSameTeamAsOwner = "user_not_same_team_as_owner" PermissionDeniedReasonUserNotAllowedByOwner = "user_not_allowed_by_owner" PermissionDeniedReasonTargetIsIndirectMember = "target_is_indirect_member" PermissionDeniedReasonTargetIsOwner = "target_is_owner" PermissionDeniedReasonTargetIsSelf = "target_is_self" PermissionDeniedReasonTargetNotActive = "target_not_active" PermissionDeniedReasonFolderIsLimitedTeamFolder = "folder_is_limited_team_folder" PermissionDeniedReasonOwnerNotOnTeam = "owner_not_on_team" PermissionDeniedReasonPermissionDenied = "permission_denied" PermissionDeniedReasonRestrictedByTeam = "restricted_by_team" PermissionDeniedReasonUserAccountType = "user_account_type" PermissionDeniedReasonUserNotOnTeam = "user_not_on_team" PermissionDeniedReasonFolderIsInsideSharedFolder = "folder_is_inside_shared_folder" PermissionDeniedReasonRestrictedByParentFolder = "restricted_by_parent_folder" PermissionDeniedReasonInsufficientPlan = "insufficient_plan" PermissionDeniedReasonOther = "other" ) // UnmarshalJSON deserializes into a PermissionDeniedReason instance func (u *PermissionDeniedReason) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // InsufficientPlan : has no documentation (yet) InsufficientPlan json.RawMessage `json:"insufficient_plan,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "insufficient_plan": err = json.Unmarshal(body, &u.InsufficientPlan) if err != nil { return err } } return nil } // RelinquishFileMembershipArg : has no documentation (yet) type RelinquishFileMembershipArg struct { // File : The path or id for the file. File string `json:"file"` } // NewRelinquishFileMembershipArg returns a new RelinquishFileMembershipArg instance func NewRelinquishFileMembershipArg(File string) *RelinquishFileMembershipArg { s := new(RelinquishFileMembershipArg) s.File = File return s } // RelinquishFileMembershipError : has no documentation (yet) type RelinquishFileMembershipError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for RelinquishFileMembershipError const ( RelinquishFileMembershipErrorAccessError = "access_error" RelinquishFileMembershipErrorGroupAccess = "group_access" RelinquishFileMembershipErrorNoPermission = "no_permission" RelinquishFileMembershipErrorOther = "other" ) // UnmarshalJSON deserializes into a RelinquishFileMembershipError instance func (u *RelinquishFileMembershipError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // RelinquishFolderMembershipArg : has no documentation (yet) type RelinquishFolderMembershipArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // LeaveACopy : Keep a copy of the folder's contents upon relinquishing // membership. LeaveACopy bool `json:"leave_a_copy"` } // NewRelinquishFolderMembershipArg returns a new RelinquishFolderMembershipArg instance func NewRelinquishFolderMembershipArg(SharedFolderId string) *RelinquishFolderMembershipArg { s := new(RelinquishFolderMembershipArg) s.SharedFolderId = SharedFolderId s.LeaveACopy = false return s } // RelinquishFolderMembershipError : has no documentation (yet) type RelinquishFolderMembershipError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for RelinquishFolderMembershipError const ( RelinquishFolderMembershipErrorAccessError = "access_error" RelinquishFolderMembershipErrorFolderOwner = "folder_owner" RelinquishFolderMembershipErrorMounted = "mounted" RelinquishFolderMembershipErrorGroupAccess = "group_access" RelinquishFolderMembershipErrorTeamFolder = "team_folder" RelinquishFolderMembershipErrorNoPermission = "no_permission" RelinquishFolderMembershipErrorNoExplicitAccess = "no_explicit_access" RelinquishFolderMembershipErrorOther = "other" ) // UnmarshalJSON deserializes into a RelinquishFolderMembershipError instance func (u *RelinquishFolderMembershipError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // RemoveFileMemberArg : Arguments for `removeFileMember2`. type RemoveFileMemberArg struct { // File : File from which to remove members. File string `json:"file"` // Member : Member to remove from this file. Note that even if an email is // specified, it may result in the removal of a user (not an invitee) if the // user's main account corresponds to that email address. Member *MemberSelector `json:"member"` } // NewRemoveFileMemberArg returns a new RemoveFileMemberArg instance func NewRemoveFileMemberArg(File string, Member *MemberSelector) *RemoveFileMemberArg { s := new(RemoveFileMemberArg) s.File = File s.Member = Member return s } // RemoveFileMemberError : Errors for `removeFileMember2`. type RemoveFileMemberError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` // NoExplicitAccess : This member does not have explicit access to the file // and therefore cannot be removed. The return value is the access that a // user might have to the file from a parent folder. NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"` } // Valid tag values for RemoveFileMemberError const ( RemoveFileMemberErrorUserError = "user_error" RemoveFileMemberErrorAccessError = "access_error" RemoveFileMemberErrorNoExplicitAccess = "no_explicit_access" RemoveFileMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a RemoveFileMemberError instance func (u *RemoveFileMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // NoExplicitAccess : This member does not have explicit access to the // file and therefore cannot be removed. The return value is the access // that a user might have to the file from a parent folder. NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "no_explicit_access": err = json.Unmarshal(body, &u.NoExplicitAccess) if err != nil { return err } } return nil } // RemoveFolderMemberArg : has no documentation (yet) type RemoveFolderMemberArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // Member : The member to remove from the folder. Member *MemberSelector `json:"member"` // LeaveACopy : If true, the removed user will keep their copy of the folder // after it's unshared, assuming it was mounted. Otherwise, it will be // removed from their Dropbox. Also, this must be set to false when kicking // a group. LeaveACopy bool `json:"leave_a_copy"` } // NewRemoveFolderMemberArg returns a new RemoveFolderMemberArg instance func NewRemoveFolderMemberArg(SharedFolderId string, Member *MemberSelector, LeaveACopy bool) *RemoveFolderMemberArg { s := new(RemoveFolderMemberArg) s.SharedFolderId = SharedFolderId s.Member = Member s.LeaveACopy = LeaveACopy return s } // RemoveFolderMemberError : has no documentation (yet) type RemoveFolderMemberError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` // MemberError : has no documentation (yet) MemberError *SharedFolderMemberError `json:"member_error,omitempty"` } // Valid tag values for RemoveFolderMemberError const ( RemoveFolderMemberErrorAccessError = "access_error" RemoveFolderMemberErrorMemberError = "member_error" RemoveFolderMemberErrorFolderOwner = "folder_owner" RemoveFolderMemberErrorGroupAccess = "group_access" RemoveFolderMemberErrorTeamFolder = "team_folder" RemoveFolderMemberErrorNoPermission = "no_permission" RemoveFolderMemberErrorTooManyFiles = "too_many_files" RemoveFolderMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a RemoveFolderMemberError instance func (u *RemoveFolderMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // MemberError : has no documentation (yet) MemberError json.RawMessage `json:"member_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "member_error": err = json.Unmarshal(w.MemberError, &u.MemberError) if err != nil { return err } } return nil } // RemoveMemberJobStatus : has no documentation (yet) type RemoveMemberJobStatus struct { dropbox.Tagged // Complete : Removing the folder member has finished. The value is // information about whether the member has another form of access. Complete *MemberAccessLevelResult `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed *RemoveFolderMemberError `json:"failed,omitempty"` } // Valid tag values for RemoveMemberJobStatus const ( RemoveMemberJobStatusInProgress = "in_progress" RemoveMemberJobStatusComplete = "complete" RemoveMemberJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a RemoveMemberJobStatus instance func (u *RemoveMemberJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : Removing the folder member has finished. The value is // information about whether the member has another form of access. Complete json.RawMessage `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // RequestedVisibility : The access permission that can be requested by the // caller for the shared link. Note that the final resolved visibility of the // shared link takes into account other aspects, such as team and shared folder // settings. Check the `ResolvedVisibility` for more info on the possible // resolved visibility values of shared links. type RequestedVisibility struct { dropbox.Tagged } // Valid tag values for RequestedVisibility const ( RequestedVisibilityPublic = "public" RequestedVisibilityTeamOnly = "team_only" RequestedVisibilityPassword = "password" ) // ResolvedVisibility : The actual access permissions values of shared links // after taking into account user preferences and the team and shared folder // settings. Check the `RequestedVisibility` for more info on the possible // visibility values that can be set by the shared link's owner. type ResolvedVisibility struct { dropbox.Tagged } // Valid tag values for ResolvedVisibility const ( ResolvedVisibilityPublic = "public" ResolvedVisibilityTeamOnly = "team_only" ResolvedVisibilityPassword = "password" ResolvedVisibilityTeamAndPassword = "team_and_password" ResolvedVisibilitySharedFolderOnly = "shared_folder_only" ResolvedVisibilityOther = "other" ) // RevokeSharedLinkArg : has no documentation (yet) type RevokeSharedLinkArg struct { // Url : URL of the shared link. Url string `json:"url"` } // NewRevokeSharedLinkArg returns a new RevokeSharedLinkArg instance func NewRevokeSharedLinkArg(Url string) *RevokeSharedLinkArg { s := new(RevokeSharedLinkArg) s.Url = Url return s } // RevokeSharedLinkError : has no documentation (yet) type RevokeSharedLinkError struct { dropbox.Tagged } // Valid tag values for RevokeSharedLinkError const ( RevokeSharedLinkErrorSharedLinkNotFound = "shared_link_not_found" RevokeSharedLinkErrorSharedLinkAccessDenied = "shared_link_access_denied" RevokeSharedLinkErrorUnsupportedLinkType = "unsupported_link_type" RevokeSharedLinkErrorOther = "other" RevokeSharedLinkErrorSharedLinkMalformed = "shared_link_malformed" ) // SetAccessInheritanceArg : has no documentation (yet) type SetAccessInheritanceArg struct { // AccessInheritance : The access inheritance settings for the folder. AccessInheritance *AccessInheritance `json:"access_inheritance"` // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` } // NewSetAccessInheritanceArg returns a new SetAccessInheritanceArg instance func NewSetAccessInheritanceArg(SharedFolderId string) *SetAccessInheritanceArg { s := new(SetAccessInheritanceArg) s.SharedFolderId = SharedFolderId s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}} return s } // SetAccessInheritanceError : has no documentation (yet) type SetAccessInheritanceError struct { dropbox.Tagged // AccessError : Unable to access shared folder. AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for SetAccessInheritanceError const ( SetAccessInheritanceErrorAccessError = "access_error" SetAccessInheritanceErrorNoPermission = "no_permission" SetAccessInheritanceErrorOther = "other" ) // UnmarshalJSON deserializes into a SetAccessInheritanceError instance func (u *SetAccessInheritanceError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : Unable to access shared folder. AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // ShareFolderArgBase : has no documentation (yet) type ShareFolderArgBase struct { // AclUpdatePolicy : Who can add and remove members of this shared folder. AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"` // ForceAsync : Whether to force the share to happen asynchronously. ForceAsync bool `json:"force_async"` // MemberPolicy : Who can be a member of this shared folder. Only applicable // if the current user is on a team. MemberPolicy *MemberPolicy `json:"member_policy,omitempty"` // Path : The path to the folder to share. If it does not exist, then a new // one is created. Path string `json:"path"` // SharedLinkPolicy : The policy to apply to shared links created for // content inside this shared folder. The current user must be on a team to // set this policy to `SharedLinkPolicy.members`. SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"` // ViewerInfoPolicy : Who can enable/disable viewer info for this shared // folder. ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"` // AccessInheritance : The access inheritance settings for the folder. AccessInheritance *AccessInheritance `json:"access_inheritance"` } // NewShareFolderArgBase returns a new ShareFolderArgBase instance func NewShareFolderArgBase(Path string) *ShareFolderArgBase { s := new(ShareFolderArgBase) s.Path = Path s.ForceAsync = false s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}} return s } // ShareFolderArg : has no documentation (yet) type ShareFolderArg struct { ShareFolderArgBase // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s // that should appear in the response's `SharedFolderMetadata.permissions` // field describing the actions the authenticated user can perform on the // folder. Actions []*FolderAction `json:"actions,omitempty"` // LinkSettings : Settings on the link for this folder. LinkSettings *LinkSettings `json:"link_settings,omitempty"` } // NewShareFolderArg returns a new ShareFolderArg instance func NewShareFolderArg(Path string) *ShareFolderArg { s := new(ShareFolderArg) s.Path = Path s.ForceAsync = false s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}} return s } // ShareFolderErrorBase : has no documentation (yet) type ShareFolderErrorBase struct { dropbox.Tagged // BadPath : `ShareFolderArg.path` is invalid. BadPath *SharePathError `json:"bad_path,omitempty"` } // Valid tag values for ShareFolderErrorBase const ( ShareFolderErrorBaseEmailUnverified = "email_unverified" ShareFolderErrorBaseBadPath = "bad_path" ShareFolderErrorBaseTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy" ShareFolderErrorBaseDisallowedSharedLinkPolicy = "disallowed_shared_link_policy" ShareFolderErrorBaseOther = "other" ) // UnmarshalJSON deserializes into a ShareFolderErrorBase instance func (u *ShareFolderErrorBase) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // BadPath : `ShareFolderArg.path` is invalid. BadPath json.RawMessage `json:"bad_path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "bad_path": err = json.Unmarshal(w.BadPath, &u.BadPath) if err != nil { return err } } return nil } // ShareFolderError : has no documentation (yet) type ShareFolderError struct { dropbox.Tagged // BadPath : `ShareFolderArg.path` is invalid. BadPath *SharePathError `json:"bad_path,omitempty"` } // Valid tag values for ShareFolderError const ( ShareFolderErrorEmailUnverified = "email_unverified" ShareFolderErrorBadPath = "bad_path" ShareFolderErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy" ShareFolderErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy" ShareFolderErrorOther = "other" ShareFolderErrorNoPermission = "no_permission" ) // UnmarshalJSON deserializes into a ShareFolderError instance func (u *ShareFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // BadPath : `ShareFolderArg.path` is invalid. BadPath json.RawMessage `json:"bad_path,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "bad_path": err = json.Unmarshal(w.BadPath, &u.BadPath) if err != nil { return err } } return nil } // ShareFolderJobStatus : has no documentation (yet) type ShareFolderJobStatus struct { dropbox.Tagged // Complete : The share job has finished. The value is the metadata for the // folder. Complete *SharedFolderMetadata `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed *ShareFolderError `json:"failed,omitempty"` } // Valid tag values for ShareFolderJobStatus const ( ShareFolderJobStatusInProgress = "in_progress" ShareFolderJobStatusComplete = "complete" ShareFolderJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a ShareFolderJobStatus instance func (u *ShareFolderJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The share job has finished. The value is the metadata for // the folder. Complete json.RawMessage `json:"complete,omitempty"` // Failed : has no documentation (yet) Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // ShareFolderLaunch : has no documentation (yet) type ShareFolderLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *SharedFolderMetadata `json:"complete,omitempty"` } // Valid tag values for ShareFolderLaunch const ( ShareFolderLaunchAsyncJobId = "async_job_id" ShareFolderLaunchComplete = "complete" ) // UnmarshalJSON deserializes into a ShareFolderLaunch instance func (u *ShareFolderLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // SharePathError : has no documentation (yet) type SharePathError struct { dropbox.Tagged // AlreadyShared : Folder is already shared. Contains metadata about the // existing shared folder. AlreadyShared *SharedFolderMetadata `json:"already_shared,omitempty"` } // Valid tag values for SharePathError const ( SharePathErrorIsFile = "is_file" SharePathErrorInsideSharedFolder = "inside_shared_folder" SharePathErrorContainsSharedFolder = "contains_shared_folder" SharePathErrorContainsAppFolder = "contains_app_folder" SharePathErrorContainsTeamFolder = "contains_team_folder" SharePathErrorIsAppFolder = "is_app_folder" SharePathErrorInsideAppFolder = "inside_app_folder" SharePathErrorIsPublicFolder = "is_public_folder" SharePathErrorInsidePublicFolder = "inside_public_folder" SharePathErrorAlreadyShared = "already_shared" SharePathErrorInvalidPath = "invalid_path" SharePathErrorIsOsxPackage = "is_osx_package" SharePathErrorInsideOsxPackage = "inside_osx_package" SharePathErrorOther = "other" ) // UnmarshalJSON deserializes into a SharePathError instance func (u *SharePathError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AlreadyShared : Folder is already shared. Contains metadata about the // existing shared folder. AlreadyShared json.RawMessage `json:"already_shared,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "already_shared": err = json.Unmarshal(body, &u.AlreadyShared) if err != nil { return err } } return nil } // SharedContentLinkMetadata : Metadata of a shared link for a file or folder. type SharedContentLinkMetadata struct { SharedContentLinkMetadataBase // AudienceExceptions : The content inside this folder with link audience // different than this folder's. This is only returned when an endpoint that // returns metadata for a single shared folder is called, e.g. // /get_folder_metadata. AudienceExceptions *AudienceExceptions `json:"audience_exceptions,omitempty"` // Url : The URL of the link. Url string `json:"url"` } // NewSharedContentLinkMetadata returns a new SharedContentLinkMetadata instance func NewSharedContentLinkMetadata(AudienceOptions []*LinkAudience, CurrentAudience *LinkAudience, LinkPermissions []*LinkPermission, PasswordProtected bool, Url string) *SharedContentLinkMetadata { s := new(SharedContentLinkMetadata) s.AudienceOptions = AudienceOptions s.CurrentAudience = CurrentAudience s.LinkPermissions = LinkPermissions s.PasswordProtected = PasswordProtected s.Url = Url return s } // SharedFileMembers : Shared file user, group, and invitee membership. Used for // the results of `listFileMembers` and `listFileMembersContinue`, and used as // part of the results for `listFileMembersBatch`. type SharedFileMembers struct { // Users : The list of user members of the shared file. Users []*UserFileMembershipInfo `json:"users"` // Groups : The list of group members of the shared file. Groups []*GroupMembershipInfo `json:"groups"` // Invitees : The list of invited members of a file, but have not logged in // and claimed this. Invitees []*InviteeMembershipInfo `json:"invitees"` // Cursor : Present if there are additional shared file members that have // not been returned yet. Pass the cursor into `listFileMembersContinue` to // list additional members. Cursor string `json:"cursor,omitempty"` } // NewSharedFileMembers returns a new SharedFileMembers instance func NewSharedFileMembers(Users []*UserFileMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFileMembers { s := new(SharedFileMembers) s.Users = Users s.Groups = Groups s.Invitees = Invitees return s } // SharedFileMetadata : Properties of the shared file. type SharedFileMetadata struct { // AccessType : The current user's access level for this shared file. AccessType *AccessLevel `json:"access_type,omitempty"` // Id : The ID of the file. Id string `json:"id"` // ExpectedLinkMetadata : The expected metadata of the link associated for // the file when it is first shared. Absent if the link already exists. This // is for an unreleased feature so it may not be returned yet. ExpectedLinkMetadata *ExpectedSharedContentLinkMetadata `json:"expected_link_metadata,omitempty"` // LinkMetadata : The metadata of the link associated for the file. This is // for an unreleased feature so it may not be returned yet. LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"` // Name : The name of this file. Name string `json:"name"` // OwnerDisplayNames : The display names of the users that own the file. If // the file is part of a team folder, the display names of the team admins // are also included. Absent if the owner display names cannot be fetched. OwnerDisplayNames []string `json:"owner_display_names,omitempty"` // OwnerTeam : The team that owns the file. This field is not present if the // file is not owned by a team. OwnerTeam *users.Team `json:"owner_team,omitempty"` // ParentSharedFolderId : The ID of the parent shared folder. This field is // present only if the file is contained within a shared folder. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` // PathDisplay : The cased path to be used for display purposes only. In // rare instances the casing will not correctly match the user's filesystem, // but this behavior will match the path provided in the Core API v1. Absent // for unmounted files. PathDisplay string `json:"path_display,omitempty"` // PathLower : The lower-case full path of this file. Absent for unmounted // files. PathLower string `json:"path_lower,omitempty"` // Permissions : The sharing permissions that requesting user has on this // file. This corresponds to the entries given in // `GetFileMetadataBatchArg.actions` or `GetFileMetadataArg.actions`. Permissions []*FilePermission `json:"permissions,omitempty"` // Policy : Policies governing this shared file. Policy *FolderPolicy `json:"policy"` // PreviewUrl : URL for displaying a web preview of the shared file. PreviewUrl string `json:"preview_url"` // TimeInvited : Timestamp indicating when the current user was invited to // this shared file. If the user was not invited to the shared file, the // timestamp will indicate when the user was invited to the parent shared // folder. This value may be absent. TimeInvited time.Time `json:"time_invited,omitempty"` } // NewSharedFileMetadata returns a new SharedFileMetadata instance func NewSharedFileMetadata(Id string, Name string, Policy *FolderPolicy, PreviewUrl string) *SharedFileMetadata { s := new(SharedFileMetadata) s.Id = Id s.Name = Name s.Policy = Policy s.PreviewUrl = PreviewUrl return s } // SharedFolderAccessError : There is an error accessing the shared folder. type SharedFolderAccessError struct { dropbox.Tagged } // Valid tag values for SharedFolderAccessError const ( SharedFolderAccessErrorInvalidId = "invalid_id" SharedFolderAccessErrorNotAMember = "not_a_member" SharedFolderAccessErrorEmailUnverified = "email_unverified" SharedFolderAccessErrorUnmounted = "unmounted" SharedFolderAccessErrorOther = "other" ) // SharedFolderMemberError : has no documentation (yet) type SharedFolderMemberError struct { dropbox.Tagged // NoExplicitAccess : The target member only has inherited access to the // shared folder. NoExplicitAccess *MemberAccessLevelResult `json:"no_explicit_access,omitempty"` } // Valid tag values for SharedFolderMemberError const ( SharedFolderMemberErrorInvalidDropboxId = "invalid_dropbox_id" SharedFolderMemberErrorNotAMember = "not_a_member" SharedFolderMemberErrorNoExplicitAccess = "no_explicit_access" SharedFolderMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a SharedFolderMemberError instance func (u *SharedFolderMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // NoExplicitAccess : The target member only has inherited access to the // shared folder. NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "no_explicit_access": err = json.Unmarshal(body, &u.NoExplicitAccess) if err != nil { return err } } return nil } // SharedFolderMembers : Shared folder user and group membership. type SharedFolderMembers struct { // Users : The list of user members of the shared folder. Users []*UserMembershipInfo `json:"users"` // Groups : The list of group members of the shared folder. Groups []*GroupMembershipInfo `json:"groups"` // Invitees : The list of invitees to the shared folder. Invitees []*InviteeMembershipInfo `json:"invitees"` // Cursor : Present if there are additional shared folder members that have // not been returned yet. Pass the cursor into `listFolderMembersContinue` // to list additional members. Cursor string `json:"cursor,omitempty"` } // NewSharedFolderMembers returns a new SharedFolderMembers instance func NewSharedFolderMembers(Users []*UserMembershipInfo, Groups []*GroupMembershipInfo, Invitees []*InviteeMembershipInfo) *SharedFolderMembers { s := new(SharedFolderMembers) s.Users = Users s.Groups = Groups s.Invitees = Invitees return s } // SharedFolderMetadataBase : Properties of the shared folder. type SharedFolderMetadataBase struct { // AccessType : The current user's access level for this shared folder. AccessType *AccessLevel `json:"access_type"` // IsInsideTeamFolder : Whether this folder is inside of a team folder. IsInsideTeamFolder bool `json:"is_inside_team_folder"` // IsTeamFolder : Whether this folder is a `team folder` // . IsTeamFolder bool `json:"is_team_folder"` // OwnerDisplayNames : The display names of the users that own the folder. // If the folder is part of a team folder, the display names of the team // admins are also included. Absent if the owner display names cannot be // fetched. OwnerDisplayNames []string `json:"owner_display_names,omitempty"` // OwnerTeam : The team that owns the folder. This field is not present if // the folder is not owned by a team. OwnerTeam *users.Team `json:"owner_team,omitempty"` // ParentSharedFolderId : The ID of the parent shared folder. This field is // present only if the folder is contained within another shared folder. ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` // PathLower : The lower-cased full path of this shared folder. Absent for // unmounted folders. PathLower string `json:"path_lower,omitempty"` } // NewSharedFolderMetadataBase returns a new SharedFolderMetadataBase instance func NewSharedFolderMetadataBase(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool) *SharedFolderMetadataBase { s := new(SharedFolderMetadataBase) s.AccessType = AccessType s.IsInsideTeamFolder = IsInsideTeamFolder s.IsTeamFolder = IsTeamFolder return s } // SharedFolderMetadata : The metadata which includes basic information about // the shared folder. type SharedFolderMetadata struct { SharedFolderMetadataBase // LinkMetadata : The metadata of the shared content link to this shared // folder. Absent if there is no link on the folder. This is for an // unreleased feature so it may not be returned yet. LinkMetadata *SharedContentLinkMetadata `json:"link_metadata,omitempty"` // Name : The name of the this shared folder. Name string `json:"name"` // Permissions : Actions the current user may perform on the folder and its // contents. The set of permissions corresponds to the FolderActions in the // request. Permissions []*FolderPermission `json:"permissions,omitempty"` // Policy : Policies governing this shared folder. Policy *FolderPolicy `json:"policy"` // PreviewUrl : URL for displaying a web preview of the shared folder. PreviewUrl string `json:"preview_url"` // SharedFolderId : The ID of the shared folder. SharedFolderId string `json:"shared_folder_id"` // TimeInvited : Timestamp indicating when the current user was invited to // this shared folder. TimeInvited time.Time `json:"time_invited"` // AccessInheritance : Whether the folder inherits its members from its // parent. AccessInheritance *AccessInheritance `json:"access_inheritance"` } // NewSharedFolderMetadata returns a new SharedFolderMetadata instance func NewSharedFolderMetadata(AccessType *AccessLevel, IsInsideTeamFolder bool, IsTeamFolder bool, Name string, Policy *FolderPolicy, PreviewUrl string, SharedFolderId string, TimeInvited time.Time) *SharedFolderMetadata { s := new(SharedFolderMetadata) s.AccessType = AccessType s.IsInsideTeamFolder = IsInsideTeamFolder s.IsTeamFolder = IsTeamFolder s.Name = Name s.Policy = Policy s.PreviewUrl = PreviewUrl s.SharedFolderId = SharedFolderId s.TimeInvited = TimeInvited s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}} return s } // SharedLinkAccessFailureReason : has no documentation (yet) type SharedLinkAccessFailureReason struct { dropbox.Tagged } // Valid tag values for SharedLinkAccessFailureReason const ( SharedLinkAccessFailureReasonLoginRequired = "login_required" SharedLinkAccessFailureReasonEmailVerifyRequired = "email_verify_required" SharedLinkAccessFailureReasonPasswordRequired = "password_required" SharedLinkAccessFailureReasonTeamOnly = "team_only" SharedLinkAccessFailureReasonOwnerOnly = "owner_only" SharedLinkAccessFailureReasonOther = "other" ) // SharedLinkPolicy : Who can view shared links in this folder. type SharedLinkPolicy struct { dropbox.Tagged } // Valid tag values for SharedLinkPolicy const ( SharedLinkPolicyAnyone = "anyone" SharedLinkPolicyTeam = "team" SharedLinkPolicyMembers = "members" SharedLinkPolicyOther = "other" ) // SharedLinkSettings : has no documentation (yet) type SharedLinkSettings struct { // RequestedVisibility : The requested access for this shared link. RequestedVisibility *RequestedVisibility `json:"requested_visibility,omitempty"` // LinkPassword : If `requested_visibility` is // `RequestedVisibility.password` this is needed to specify the password to // access the link. LinkPassword string `json:"link_password,omitempty"` // Expires : Expiration time of the shared link. By default the link won't // expire. Expires time.Time `json:"expires,omitempty"` } // NewSharedLinkSettings returns a new SharedLinkSettings instance func NewSharedLinkSettings() *SharedLinkSettings { s := new(SharedLinkSettings) return s } // SharedLinkSettingsError : has no documentation (yet) type SharedLinkSettingsError struct { dropbox.Tagged } // Valid tag values for SharedLinkSettingsError const ( SharedLinkSettingsErrorInvalidSettings = "invalid_settings" SharedLinkSettingsErrorNotAuthorized = "not_authorized" ) // SharingFileAccessError : User could not access this file. type SharingFileAccessError struct { dropbox.Tagged } // Valid tag values for SharingFileAccessError const ( SharingFileAccessErrorNoPermission = "no_permission" SharingFileAccessErrorInvalidFile = "invalid_file" SharingFileAccessErrorIsFolder = "is_folder" SharingFileAccessErrorInsidePublicFolder = "inside_public_folder" SharingFileAccessErrorInsideOsxPackage = "inside_osx_package" SharingFileAccessErrorOther = "other" ) // SharingUserError : User account had a problem preventing this action. type SharingUserError struct { dropbox.Tagged } // Valid tag values for SharingUserError const ( SharingUserErrorEmailUnverified = "email_unverified" SharingUserErrorOther = "other" ) // TeamMemberInfo : Information about a team member. type TeamMemberInfo struct { // TeamInfo : Information about the member's team. TeamInfo *users.Team `json:"team_info"` // DisplayName : The display name of the user. DisplayName string `json:"display_name"` // MemberId : ID of user as a member of a team. This field will only be // present if the member is in the same team as current user. MemberId string `json:"member_id,omitempty"` } // NewTeamMemberInfo returns a new TeamMemberInfo instance func NewTeamMemberInfo(TeamInfo *users.Team, DisplayName string) *TeamMemberInfo { s := new(TeamMemberInfo) s.TeamInfo = TeamInfo s.DisplayName = DisplayName return s } // TransferFolderArg : has no documentation (yet) type TransferFolderArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // ToDropboxId : A account or team member ID to transfer ownership to. ToDropboxId string `json:"to_dropbox_id"` } // NewTransferFolderArg returns a new TransferFolderArg instance func NewTransferFolderArg(SharedFolderId string, ToDropboxId string) *TransferFolderArg { s := new(TransferFolderArg) s.SharedFolderId = SharedFolderId s.ToDropboxId = ToDropboxId return s } // TransferFolderError : has no documentation (yet) type TransferFolderError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for TransferFolderError const ( TransferFolderErrorAccessError = "access_error" TransferFolderErrorInvalidDropboxId = "invalid_dropbox_id" TransferFolderErrorNewOwnerNotAMember = "new_owner_not_a_member" TransferFolderErrorNewOwnerUnmounted = "new_owner_unmounted" TransferFolderErrorNewOwnerEmailUnverified = "new_owner_email_unverified" TransferFolderErrorTeamFolder = "team_folder" TransferFolderErrorNoPermission = "no_permission" TransferFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a TransferFolderError instance func (u *TransferFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // UnmountFolderArg : has no documentation (yet) type UnmountFolderArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` } // NewUnmountFolderArg returns a new UnmountFolderArg instance func NewUnmountFolderArg(SharedFolderId string) *UnmountFolderArg { s := new(UnmountFolderArg) s.SharedFolderId = SharedFolderId return s } // UnmountFolderError : has no documentation (yet) type UnmountFolderError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for UnmountFolderError const ( UnmountFolderErrorAccessError = "access_error" UnmountFolderErrorNoPermission = "no_permission" UnmountFolderErrorNotUnmountable = "not_unmountable" UnmountFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a UnmountFolderError instance func (u *UnmountFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // UnshareFileArg : Arguments for `unshareFile`. type UnshareFileArg struct { // File : The file to unshare. File string `json:"file"` } // NewUnshareFileArg returns a new UnshareFileArg instance func NewUnshareFileArg(File string) *UnshareFileArg { s := new(UnshareFileArg) s.File = File return s } // UnshareFileError : Error result for `unshareFile`. type UnshareFileError struct { dropbox.Tagged // UserError : has no documentation (yet) UserError *SharingUserError `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError *SharingFileAccessError `json:"access_error,omitempty"` } // Valid tag values for UnshareFileError const ( UnshareFileErrorUserError = "user_error" UnshareFileErrorAccessError = "access_error" UnshareFileErrorOther = "other" ) // UnmarshalJSON deserializes into a UnshareFileError instance func (u *UnshareFileError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserError : has no documentation (yet) UserError json.RawMessage `json:"user_error,omitempty"` // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_error": err = json.Unmarshal(w.UserError, &u.UserError) if err != nil { return err } case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // UnshareFolderArg : has no documentation (yet) type UnshareFolderArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // LeaveACopy : If true, members of this shared folder will get a copy of // this folder after it's unshared. Otherwise, it will be removed from their // Dropbox. The current user, who is an owner, will always retain their // copy. LeaveACopy bool `json:"leave_a_copy"` } // NewUnshareFolderArg returns a new UnshareFolderArg instance func NewUnshareFolderArg(SharedFolderId string) *UnshareFolderArg { s := new(UnshareFolderArg) s.SharedFolderId = SharedFolderId s.LeaveACopy = false return s } // UnshareFolderError : has no documentation (yet) type UnshareFolderError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for UnshareFolderError const ( UnshareFolderErrorAccessError = "access_error" UnshareFolderErrorTeamFolder = "team_folder" UnshareFolderErrorNoPermission = "no_permission" UnshareFolderErrorTooManyFiles = "too_many_files" UnshareFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a UnshareFolderError instance func (u *UnshareFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // UpdateFileMemberArgs : Arguments for `updateFileMember`. type UpdateFileMemberArgs struct { ChangeFileMemberAccessArgs } // NewUpdateFileMemberArgs returns a new UpdateFileMemberArgs instance func NewUpdateFileMemberArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFileMemberArgs { s := new(UpdateFileMemberArgs) s.File = File s.Member = Member s.AccessLevel = AccessLevel return s } // UpdateFolderMemberArg : has no documentation (yet) type UpdateFolderMemberArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // Member : The member of the shared folder to update. Only the // `MemberSelector.dropbox_id` may be set at this time. Member *MemberSelector `json:"member"` // AccessLevel : The new access level for `member`. `AccessLevel.owner` is // disallowed. AccessLevel *AccessLevel `json:"access_level"` } // NewUpdateFolderMemberArg returns a new UpdateFolderMemberArg instance func NewUpdateFolderMemberArg(SharedFolderId string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFolderMemberArg { s := new(UpdateFolderMemberArg) s.SharedFolderId = SharedFolderId s.Member = Member s.AccessLevel = AccessLevel return s } // UpdateFolderMemberError : has no documentation (yet) type UpdateFolderMemberError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` // MemberError : has no documentation (yet) MemberError *SharedFolderMemberError `json:"member_error,omitempty"` // NoExplicitAccess : If updating the access type required the member to be // added to the shared folder and there was an error when adding the member. NoExplicitAccess *AddFolderMemberError `json:"no_explicit_access,omitempty"` } // Valid tag values for UpdateFolderMemberError const ( UpdateFolderMemberErrorAccessError = "access_error" UpdateFolderMemberErrorMemberError = "member_error" UpdateFolderMemberErrorNoExplicitAccess = "no_explicit_access" UpdateFolderMemberErrorInsufficientPlan = "insufficient_plan" UpdateFolderMemberErrorNoPermission = "no_permission" UpdateFolderMemberErrorOther = "other" ) // UnmarshalJSON deserializes into a UpdateFolderMemberError instance func (u *UpdateFolderMemberError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // MemberError : has no documentation (yet) MemberError json.RawMessage `json:"member_error,omitempty"` // NoExplicitAccess : If updating the access type required the member to // be added to the shared folder and there was an error when adding the // member. NoExplicitAccess json.RawMessage `json:"no_explicit_access,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "member_error": err = json.Unmarshal(w.MemberError, &u.MemberError) if err != nil { return err } case "no_explicit_access": err = json.Unmarshal(w.NoExplicitAccess, &u.NoExplicitAccess) if err != nil { return err } } return nil } // UpdateFolderPolicyArg : If any of the policies are unset, then they retain // their current setting. type UpdateFolderPolicyArg struct { // SharedFolderId : The ID for the shared folder. SharedFolderId string `json:"shared_folder_id"` // MemberPolicy : Who can be a member of this shared folder. Only applicable // if the current user is on a team. MemberPolicy *MemberPolicy `json:"member_policy,omitempty"` // AclUpdatePolicy : Who can add and remove members of this shared folder. AclUpdatePolicy *AclUpdatePolicy `json:"acl_update_policy,omitempty"` // ViewerInfoPolicy : Who can enable/disable viewer info for this shared // folder. ViewerInfoPolicy *ViewerInfoPolicy `json:"viewer_info_policy,omitempty"` // SharedLinkPolicy : The policy to apply to shared links created for // content inside this shared folder. The current user must be on a team to // set this policy to `SharedLinkPolicy.members`. SharedLinkPolicy *SharedLinkPolicy `json:"shared_link_policy,omitempty"` // LinkSettings : Settings on the link for this folder. LinkSettings *LinkSettings `json:"link_settings,omitempty"` // Actions : A list of `FolderAction`s corresponding to `FolderPermission`s // that should appear in the response's `SharedFolderMetadata.permissions` // field describing the actions the authenticated user can perform on the // folder. Actions []*FolderAction `json:"actions,omitempty"` } // NewUpdateFolderPolicyArg returns a new UpdateFolderPolicyArg instance func NewUpdateFolderPolicyArg(SharedFolderId string) *UpdateFolderPolicyArg { s := new(UpdateFolderPolicyArg) s.SharedFolderId = SharedFolderId return s } // UpdateFolderPolicyError : has no documentation (yet) type UpdateFolderPolicyError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *SharedFolderAccessError `json:"access_error,omitempty"` } // Valid tag values for UpdateFolderPolicyError const ( UpdateFolderPolicyErrorAccessError = "access_error" UpdateFolderPolicyErrorNotOnTeam = "not_on_team" UpdateFolderPolicyErrorTeamPolicyDisallowsMemberPolicy = "team_policy_disallows_member_policy" UpdateFolderPolicyErrorDisallowedSharedLinkPolicy = "disallowed_shared_link_policy" UpdateFolderPolicyErrorNoPermission = "no_permission" UpdateFolderPolicyErrorTeamFolder = "team_folder" UpdateFolderPolicyErrorOther = "other" ) // UnmarshalJSON deserializes into a UpdateFolderPolicyError instance func (u *UpdateFolderPolicyError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } } return nil } // UserMembershipInfo : The information about a user member of the shared // content. type UserMembershipInfo struct { MembershipInfo // User : The account information for the membership user. User *UserInfo `json:"user"` } // NewUserMembershipInfo returns a new UserMembershipInfo instance func NewUserMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserMembershipInfo { s := new(UserMembershipInfo) s.AccessType = AccessType s.User = User s.IsInherited = false return s } // UserFileMembershipInfo : The information about a user member of the shared // content with an appended last seen timestamp. type UserFileMembershipInfo struct { UserMembershipInfo // TimeLastSeen : The UTC timestamp of when the user has last seen the // content, if they have. TimeLastSeen time.Time `json:"time_last_seen,omitempty"` // PlatformType : The platform on which the user has last seen the content, // or unknown. PlatformType *seen_state.PlatformType `json:"platform_type,omitempty"` } // NewUserFileMembershipInfo returns a new UserFileMembershipInfo instance func NewUserFileMembershipInfo(AccessType *AccessLevel, User *UserInfo) *UserFileMembershipInfo { s := new(UserFileMembershipInfo) s.AccessType = AccessType s.User = User s.IsInherited = false return s } // UserInfo : Basic information about a user. Use `usersAccount` and // `usersAccountBatch` to obtain more detailed information. type UserInfo struct { // AccountId : The account ID of the user. AccountId string `json:"account_id"` // Email : Email address of user. Email string `json:"email"` // DisplayName : The display name of the user. DisplayName string `json:"display_name"` // SameTeam : If the user is in the same team as current user. SameTeam bool `json:"same_team"` // TeamMemberId : The team member ID of the shared folder member. Only // present if `same_team` is true. TeamMemberId string `json:"team_member_id,omitempty"` } // NewUserInfo returns a new UserInfo instance func NewUserInfo(AccountId string, Email string, DisplayName string, SameTeam bool) *UserInfo { s := new(UserInfo) s.AccountId = AccountId s.Email = Email s.DisplayName = DisplayName s.SameTeam = SameTeam return s } // ViewerInfoPolicy : has no documentation (yet) type ViewerInfoPolicy struct { dropbox.Tagged } // Valid tag values for ViewerInfoPolicy const ( ViewerInfoPolicyEnabled = "enabled" ViewerInfoPolicyDisabled = "disabled" ViewerInfoPolicyOther = "other" ) // Visibility : Who can access a shared link. The most open visibility is // `public`. The default depends on many aspects, such as team and user // preferences and shared folder settings. type Visibility struct { dropbox.Tagged } // Valid tag values for Visibility const ( VisibilityPublic = "public" VisibilityTeamOnly = "team_only" VisibilityPassword = "password" VisibilityTeamAndPassword = "team_and_password" VisibilitySharedFolderOnly = "shared_folder_only" VisibilityOther = "other" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/team/000077500000000000000000000000001340753361200211035ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/team/client.go000066400000000000000000003342071340753361200227210ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package team import ( "bytes" "encoding/json" "io/ioutil" "log" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/async" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/file_properties" ) // Client interface describes all routes in this namespace type Client interface { // DevicesListMemberDevices : List all device sessions of a team's member. DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error) // DevicesListMembersDevices : List all device sessions of a team. // Permission : Team member file access. DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error) // DevicesListTeamDevices : List all device sessions of a team. Permission : // Team member file access. // Deprecated: Use `DevicesListMembersDevices` instead DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error) // DevicesRevokeDeviceSession : Revoke a device session of a team's member. DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error) // DevicesRevokeDeviceSessionBatch : Revoke a list of device sessions of // team members. DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error) // FeaturesGetValues : Get the values for one or more featues. This route // allows you to check your account's capability for what feature you can // access or what value you have for certain features. Permission : Team // information. FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error) // GetInfo : Retrieves information about a team. GetInfo() (res *TeamGetInfoResult, err error) // GroupsCreate : Creates a new, empty group, with a requested name. // Permission : Team member management. GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error) // GroupsDelete : Deletes a group. The group is deleted immediately. However // the revoking of group-owned resources may take additional time. Use the // `groupsJobStatusGet` to determine whether this process has completed. // Permission : Team member management. GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error) // GroupsGetInfo : Retrieves information about one or more groups. Note that // the optional field `GroupFullInfo.members` is not returned for // system-managed groups. Permission : Team Information. GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error) // GroupsJobStatusGet : Once an async_job_id is returned from // `groupsDelete`, `groupsMembersAdd` , or `groupsMembersRemove` use this // method to poll the status of granting/revoking group members' access to // group-owned resources. Permission : Team member management. GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) // GroupsList : Lists groups on a team. Permission : Team Information. GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error) // GroupsListContinue : Once a cursor has been retrieved from `groupsList`, // use this to paginate through all groups. Permission : Team Information. GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error) // GroupsMembersAdd : Adds members to a group. The members are added // immediately. However the granting of group-owned resources may take // additional time. Use the `groupsJobStatusGet` to determine whether this // process has completed. Permission : Team member management. GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error) // GroupsMembersList : Lists members of a group. Permission : Team // Information. GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error) // GroupsMembersListContinue : Once a cursor has been retrieved from // `groupsMembersList`, use this to paginate through all members of the // group. Permission : Team information. GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error) // GroupsMembersRemove : Removes members from a group. The members are // removed immediately. However the revoking of group-owned resources may // take additional time. Use the `groupsJobStatusGet` to determine whether // this process has completed. This method permits removing the only owner // of a group, even in cases where this is not possible via the web client. // Permission : Team member management. GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error) // GroupsMembersSetAccessType : Sets a member's access type in a group. // Permission : Team member management. GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error) // GroupsUpdate : Updates a group's name and/or external ID. Permission : // Team member management. GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error) // LinkedAppsListMemberLinkedApps : List all linked applications of the team // member. Note, this endpoint does not list any team-linked applications. LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error) // LinkedAppsListMembersLinkedApps : List all applications linked to the // team members' accounts. Note, this endpoint does not list any team-linked // applications. LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error) // LinkedAppsListTeamLinkedApps : List all applications linked to the team // members' accounts. Note, this endpoint doesn't list any team-linked // applications. // Deprecated: Use `LinkedAppsListMembersLinkedApps` instead LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error) // LinkedAppsRevokeLinkedApp : Revoke a linked application of the team // member. LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error) // LinkedAppsRevokeLinkedAppBatch : Revoke a list of linked applications of // the team members. LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error) // MemberSpaceLimitsExcludedUsersAdd : Add users to member space limits // excluded users list. MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) // MemberSpaceLimitsExcludedUsersList : List member space limits excluded // users. MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error) // MemberSpaceLimitsExcludedUsersListContinue : Continue listing member // space limits excluded users. MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error) // MemberSpaceLimitsExcludedUsersRemove : Remove users from member space // limits excluded users list. MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) // MemberSpaceLimitsGetCustomQuota : Get users custom quota. Returns none as // the custom quota if none was set. A maximum of 1000 members can be // specified in a single call. MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error) // MemberSpaceLimitsRemoveCustomQuota : Remove users custom quota. A maximum // of 1000 members can be specified in a single call. MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error) // MemberSpaceLimitsSetCustomQuota : Set users custom quota. Custom quota // has to be at least 15GB. A maximum of 1000 members can be specified in a // single call. MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) // MembersAdd : Adds members to a team. Permission : Team member management // A maximum of 20 members can be specified in a single call. If no Dropbox // account exists with the email address specified, a new Dropbox account // will be created with the given email address, and that account will be // invited to the team. If a personal Dropbox account exists with the email // address specified in the call, this call will create a placeholder // Dropbox account for the user on the team and send an email inviting the // user to migrate their existing personal account onto the team. Team // member management apps are required to set an initial given_name and // surname for a user to use in the team invitation and for 'Perform as team // member' actions taken on the user before they become 'active'. MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error) // MembersAddJobStatusGet : Once an async_job_id is returned from // `membersAdd` , use this to poll the status of the asynchronous request. // Permission : Team member management. MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error) // MembersGetInfo : Returns information about multiple team members. // Permission : Team information This endpoint will return // `MembersGetInfoItem.id_not_found`, for IDs (or emails) that cannot be // matched to a valid team member. MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error) // MembersList : Lists members of a team. Permission : Team information. MembersList(arg *MembersListArg) (res *MembersListResult, err error) // MembersListContinue : Once a cursor has been retrieved from // `membersList`, use this to paginate through all team members. Permission // : Team information. MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error) // MembersMoveFormerMemberFiles : Moves removed member's files to a // different member. This endpoint initiates an asynchronous job. To obtain // the final result of the job, the client should periodically poll // `membersMoveFormerMemberFilesJobStatusCheck`. Permission : Team member // management. MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error) // MembersMoveFormerMemberFilesJobStatusCheck : Once an async_job_id is // returned from `membersMoveFormerMemberFiles` , use this to poll the // status of the asynchronous request. Permission : Team member management. MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error) // MembersRecover : Recover a deleted member. Permission : Team member // management Exactly one of team_member_id, email, or external_id must be // provided to identify the user account. MembersRecover(arg *MembersRecoverArg) (err error) // MembersRemove : Removes a member from a team. Permission : Team member // management Exactly one of team_member_id, email, or external_id must be // provided to identify the user account. Accounts can be recovered via // `membersRecover` for a 7 day period or until the account has been // permanently deleted or transferred to another account (whichever comes // first). Calling `membersAdd` while a user is still recoverable on your // team will return with `MemberAddResult.user_already_on_team`. Accounts // can have their files transferred via the admin console for a limited // time, based on the version history length associated with the team (120 // days for most teams). This endpoint may initiate an asynchronous job. To // obtain the final result of the job, the client should periodically poll // `membersRemoveJobStatusGet`. MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error) // MembersRemoveJobStatusGet : Once an async_job_id is returned from // `membersRemove` , use this to poll the status of the asynchronous // request. Permission : Team member management. MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) // MembersSendWelcomeEmail : Sends welcome email to pending team member. // Permission : Team member management Exactly one of team_member_id, email, // or external_id must be provided to identify the user account. No-op if // team member is not pending. MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) // MembersSetAdminPermissions : Updates a team member's permissions. // Permission : Team member management. MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error) // MembersSetProfile : Updates a team member's profile. Permission : Team // member management. MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error) // MembersSuspend : Suspend a member from a team. Permission : Team member // management Exactly one of team_member_id, email, or external_id must be // provided to identify the user account. MembersSuspend(arg *MembersDeactivateArg) (err error) // MembersUnsuspend : Unsuspend a member from a team. Permission : Team // member management Exactly one of team_member_id, email, or external_id // must be provided to identify the user account. MembersUnsuspend(arg *MembersUnsuspendArg) (err error) // NamespacesList : Returns a list of all team-accessible namespaces. This // list includes team folders, shared folders containing team members, team // members' home namespaces, and team members' app folders. Home namespaces // and app folders are always owned by this team or members of the team, but // shared folders may be owned by other users or other teams. Duplicates may // occur in the list. NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error) // NamespacesListContinue : Once a cursor has been retrieved from // `namespacesList`, use this to paginate through all team-accessible // namespaces. Duplicates may occur in the list. NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error) // PropertiesTemplateAdd : Permission : Team member file access. // Deprecated: PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error) // PropertiesTemplateGet : Permission : Team member file access. // Deprecated: PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) // PropertiesTemplateList : Permission : Team member file access. // Deprecated: PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) // PropertiesTemplateUpdate : Permission : Team member file access. // Deprecated: PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error) // ReportsGetActivity : Retrieves reporting data about a team's user // activity. ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error) // ReportsGetDevices : Retrieves reporting data about a team's linked // devices. ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error) // ReportsGetMembership : Retrieves reporting data about a team's // membership. ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error) // ReportsGetStorage : Retrieves reporting data about a team's storage // usage. ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error) // TeamFolderActivate : Sets an archived team folder's status to active. // Permission : Team member file access. TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error) // TeamFolderArchive : Sets an active team folder's status to archived and // removes all folder and file members. Permission : Team member file // access. TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error) // TeamFolderArchiveCheck : Returns the status of an asynchronous job for // archiving a team folder. Permission : Team member file access. TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error) // TeamFolderCreate : Creates a new, active, team folder with no members. // Permission : Team member file access. TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error) // TeamFolderGetInfo : Retrieves metadata for team folders. Permission : // Team member file access. TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error) // TeamFolderList : Lists all team folders. Permission : Team member file // access. TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error) // TeamFolderListContinue : Once a cursor has been retrieved from // `teamFolderList`, use this to paginate through all team folders. // Permission : Team member file access. TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error) // TeamFolderPermanentlyDelete : Permanently deletes an archived team // folder. Permission : Team member file access. TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error) // TeamFolderRename : Changes an active team folder's name. Permission : // Team member file access. TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error) // TeamFolderUpdateSyncSettings : Updates the sync settings on a team folder // or its contents. Use of this endpoint requires that the team has team // selective sync enabled. TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error) // TokenGetAuthenticatedAdmin : Returns the member profile of the admin who // generated the team access token used to make the call. TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error) } type apiImpl dropbox.Context //DevicesListMemberDevicesAPIError is an error-wrapper for the devices/list_member_devices route type DevicesListMemberDevicesAPIError struct { dropbox.APIError EndpointError *ListMemberDevicesError `json:"error"` } func (dbx *apiImpl) DevicesListMemberDevices(arg *ListMemberDevicesArg) (res *ListMemberDevicesResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_member_devices", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DevicesListMemberDevicesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DevicesListMembersDevicesAPIError is an error-wrapper for the devices/list_members_devices route type DevicesListMembersDevicesAPIError struct { dropbox.APIError EndpointError *ListMembersDevicesError `json:"error"` } func (dbx *apiImpl) DevicesListMembersDevices(arg *ListMembersDevicesArg) (res *ListMembersDevicesResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_members_devices", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DevicesListMembersDevicesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DevicesListTeamDevicesAPIError is an error-wrapper for the devices/list_team_devices route type DevicesListTeamDevicesAPIError struct { dropbox.APIError EndpointError *ListTeamDevicesError `json:"error"` } func (dbx *apiImpl) DevicesListTeamDevices(arg *ListTeamDevicesArg) (res *ListTeamDevicesResult, err error) { log.Printf("WARNING: API `DevicesListTeamDevices` is deprecated") log.Printf("Use API `DevicesListMembersDevices` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/list_team_devices", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DevicesListTeamDevicesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DevicesRevokeDeviceSessionAPIError is an error-wrapper for the devices/revoke_device_session route type DevicesRevokeDeviceSessionAPIError struct { dropbox.APIError EndpointError *RevokeDeviceSessionError `json:"error"` } func (dbx *apiImpl) DevicesRevokeDeviceSession(arg *RevokeDeviceSessionArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/revoke_device_session", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError DevicesRevokeDeviceSessionAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //DevicesRevokeDeviceSessionBatchAPIError is an error-wrapper for the devices/revoke_device_session_batch route type DevicesRevokeDeviceSessionBatchAPIError struct { dropbox.APIError EndpointError *RevokeDeviceSessionBatchError `json:"error"` } func (dbx *apiImpl) DevicesRevokeDeviceSessionBatch(arg *RevokeDeviceSessionBatchArg) (res *RevokeDeviceSessionBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "devices/revoke_device_session_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError DevicesRevokeDeviceSessionBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //FeaturesGetValuesAPIError is an error-wrapper for the features/get_values route type FeaturesGetValuesAPIError struct { dropbox.APIError EndpointError *FeaturesGetValuesBatchError `json:"error"` } func (dbx *apiImpl) FeaturesGetValues(arg *FeaturesGetValuesBatchArg) (res *FeaturesGetValuesBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "features/get_values", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError FeaturesGetValuesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetInfoAPIError is an error-wrapper for the get_info route type GetInfoAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) GetInfo() (res *TeamGetInfoResult, err error) { cli := dbx.Client headers := map[string]string{} req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "get_info", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetInfoAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsCreateAPIError is an error-wrapper for the groups/create route type GroupsCreateAPIError struct { dropbox.APIError EndpointError *GroupCreateError `json:"error"` } func (dbx *apiImpl) GroupsCreate(arg *GroupCreateArg) (res *GroupFullInfo, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/create", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsCreateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsDeleteAPIError is an error-wrapper for the groups/delete route type GroupsDeleteAPIError struct { dropbox.APIError EndpointError *GroupDeleteError `json:"error"` } func (dbx *apiImpl) GroupsDelete(arg *GroupSelector) (res *async.LaunchEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/delete", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsDeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsGetInfoAPIError is an error-wrapper for the groups/get_info route type GroupsGetInfoAPIError struct { dropbox.APIError EndpointError *GroupsGetInfoError `json:"error"` } func (dbx *apiImpl) GroupsGetInfo(arg *GroupsSelector) (res []*GroupsGetInfoItem, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/get_info", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsGetInfoAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsJobStatusGetAPIError is an error-wrapper for the groups/job_status/get route type GroupsJobStatusGetAPIError struct { dropbox.APIError EndpointError *GroupsPollError `json:"error"` } func (dbx *apiImpl) GroupsJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/job_status/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsJobStatusGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsListAPIError is an error-wrapper for the groups/list route type GroupsListAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) GroupsList(arg *GroupsListArg) (res *GroupsListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsListContinueAPIError is an error-wrapper for the groups/list/continue route type GroupsListContinueAPIError struct { dropbox.APIError EndpointError *GroupsListContinueError `json:"error"` } func (dbx *apiImpl) GroupsListContinue(arg *GroupsListContinueArg) (res *GroupsListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsMembersAddAPIError is an error-wrapper for the groups/members/add route type GroupsMembersAddAPIError struct { dropbox.APIError EndpointError *GroupMembersAddError `json:"error"` } func (dbx *apiImpl) GroupsMembersAdd(arg *GroupMembersAddArg) (res *GroupMembersChangeResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsMembersAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsMembersListAPIError is an error-wrapper for the groups/members/list route type GroupsMembersListAPIError struct { dropbox.APIError EndpointError *GroupSelectorError `json:"error"` } func (dbx *apiImpl) GroupsMembersList(arg *GroupsMembersListArg) (res *GroupsMembersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsMembersListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsMembersListContinueAPIError is an error-wrapper for the groups/members/list/continue route type GroupsMembersListContinueAPIError struct { dropbox.APIError EndpointError *GroupsMembersListContinueError `json:"error"` } func (dbx *apiImpl) GroupsMembersListContinue(arg *GroupsMembersListContinueArg) (res *GroupsMembersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsMembersListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsMembersRemoveAPIError is an error-wrapper for the groups/members/remove route type GroupsMembersRemoveAPIError struct { dropbox.APIError EndpointError *GroupMembersRemoveError `json:"error"` } func (dbx *apiImpl) GroupsMembersRemove(arg *GroupMembersRemoveArg) (res *GroupMembersChangeResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsMembersRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsMembersSetAccessTypeAPIError is an error-wrapper for the groups/members/set_access_type route type GroupsMembersSetAccessTypeAPIError struct { dropbox.APIError EndpointError *GroupMemberSetAccessTypeError `json:"error"` } func (dbx *apiImpl) GroupsMembersSetAccessType(arg *GroupMembersSetAccessTypeArg) (res []*GroupsGetInfoItem, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/members/set_access_type", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsMembersSetAccessTypeAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GroupsUpdateAPIError is an error-wrapper for the groups/update route type GroupsUpdateAPIError struct { dropbox.APIError EndpointError *GroupUpdateError `json:"error"` } func (dbx *apiImpl) GroupsUpdate(arg *GroupUpdateArgs) (res *GroupFullInfo, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "groups/update", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GroupsUpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //LinkedAppsListMemberLinkedAppsAPIError is an error-wrapper for the linked_apps/list_member_linked_apps route type LinkedAppsListMemberLinkedAppsAPIError struct { dropbox.APIError EndpointError *ListMemberAppsError `json:"error"` } func (dbx *apiImpl) LinkedAppsListMemberLinkedApps(arg *ListMemberAppsArg) (res *ListMemberAppsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_member_linked_apps", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError LinkedAppsListMemberLinkedAppsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //LinkedAppsListMembersLinkedAppsAPIError is an error-wrapper for the linked_apps/list_members_linked_apps route type LinkedAppsListMembersLinkedAppsAPIError struct { dropbox.APIError EndpointError *ListMembersAppsError `json:"error"` } func (dbx *apiImpl) LinkedAppsListMembersLinkedApps(arg *ListMembersAppsArg) (res *ListMembersAppsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_members_linked_apps", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError LinkedAppsListMembersLinkedAppsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //LinkedAppsListTeamLinkedAppsAPIError is an error-wrapper for the linked_apps/list_team_linked_apps route type LinkedAppsListTeamLinkedAppsAPIError struct { dropbox.APIError EndpointError *ListTeamAppsError `json:"error"` } func (dbx *apiImpl) LinkedAppsListTeamLinkedApps(arg *ListTeamAppsArg) (res *ListTeamAppsResult, err error) { log.Printf("WARNING: API `LinkedAppsListTeamLinkedApps` is deprecated") log.Printf("Use API `LinkedAppsListMembersLinkedApps` instead") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/list_team_linked_apps", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError LinkedAppsListTeamLinkedAppsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //LinkedAppsRevokeLinkedAppAPIError is an error-wrapper for the linked_apps/revoke_linked_app route type LinkedAppsRevokeLinkedAppAPIError struct { dropbox.APIError EndpointError *RevokeLinkedAppError `json:"error"` } func (dbx *apiImpl) LinkedAppsRevokeLinkedApp(arg *RevokeLinkedApiAppArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/revoke_linked_app", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError LinkedAppsRevokeLinkedAppAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //LinkedAppsRevokeLinkedAppBatchAPIError is an error-wrapper for the linked_apps/revoke_linked_app_batch route type LinkedAppsRevokeLinkedAppBatchAPIError struct { dropbox.APIError EndpointError *RevokeLinkedAppBatchError `json:"error"` } func (dbx *apiImpl) LinkedAppsRevokeLinkedAppBatch(arg *RevokeLinkedApiAppBatchArg) (res *RevokeLinkedAppBatchResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "linked_apps/revoke_linked_app_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError LinkedAppsRevokeLinkedAppBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsExcludedUsersAddAPIError is an error-wrapper for the member_space_limits/excluded_users/add route type MemberSpaceLimitsExcludedUsersAddAPIError struct { dropbox.APIError EndpointError *ExcludedUsersUpdateError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersAdd(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsExcludedUsersAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsExcludedUsersListAPIError is an error-wrapper for the member_space_limits/excluded_users/list route type MemberSpaceLimitsExcludedUsersListAPIError struct { dropbox.APIError EndpointError *ExcludedUsersListError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersList(arg *ExcludedUsersListArg) (res *ExcludedUsersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsExcludedUsersListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsExcludedUsersListContinueAPIError is an error-wrapper for the member_space_limits/excluded_users/list/continue route type MemberSpaceLimitsExcludedUsersListContinueAPIError struct { dropbox.APIError EndpointError *ExcludedUsersListContinueError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersListContinue(arg *ExcludedUsersListContinueArg) (res *ExcludedUsersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsExcludedUsersListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsExcludedUsersRemoveAPIError is an error-wrapper for the member_space_limits/excluded_users/remove route type MemberSpaceLimitsExcludedUsersRemoveAPIError struct { dropbox.APIError EndpointError *ExcludedUsersUpdateError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsExcludedUsersRemove(arg *ExcludedUsersUpdateArg) (res *ExcludedUsersUpdateResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/excluded_users/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsExcludedUsersRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsGetCustomQuotaAPIError is an error-wrapper for the member_space_limits/get_custom_quota route type MemberSpaceLimitsGetCustomQuotaAPIError struct { dropbox.APIError EndpointError *CustomQuotaError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsGetCustomQuota(arg *CustomQuotaUsersArg) (res []*CustomQuotaResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/get_custom_quota", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsGetCustomQuotaAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsRemoveCustomQuotaAPIError is an error-wrapper for the member_space_limits/remove_custom_quota route type MemberSpaceLimitsRemoveCustomQuotaAPIError struct { dropbox.APIError EndpointError *CustomQuotaError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsRemoveCustomQuota(arg *CustomQuotaUsersArg) (res []*RemoveCustomQuotaResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/remove_custom_quota", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsRemoveCustomQuotaAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MemberSpaceLimitsSetCustomQuotaAPIError is an error-wrapper for the member_space_limits/set_custom_quota route type MemberSpaceLimitsSetCustomQuotaAPIError struct { dropbox.APIError EndpointError *SetCustomQuotaError `json:"error"` } func (dbx *apiImpl) MemberSpaceLimitsSetCustomQuota(arg *SetCustomQuotaArg) (res []*CustomQuotaResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "member_space_limits/set_custom_quota", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MemberSpaceLimitsSetCustomQuotaAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersAddAPIError is an error-wrapper for the members/add route type MembersAddAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) MembersAdd(arg *MembersAddArg) (res *MembersAddLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersAddJobStatusGetAPIError is an error-wrapper for the members/add/job_status/get route type MembersAddJobStatusGetAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) MembersAddJobStatusGet(arg *async.PollArg) (res *MembersAddJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/add/job_status/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersAddJobStatusGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersGetInfoAPIError is an error-wrapper for the members/get_info route type MembersGetInfoAPIError struct { dropbox.APIError EndpointError *MembersGetInfoError `json:"error"` } func (dbx *apiImpl) MembersGetInfo(arg *MembersGetInfoArgs) (res []*MembersGetInfoItem, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/get_info", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersGetInfoAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersListAPIError is an error-wrapper for the members/list route type MembersListAPIError struct { dropbox.APIError EndpointError *MembersListError `json:"error"` } func (dbx *apiImpl) MembersList(arg *MembersListArg) (res *MembersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersListContinueAPIError is an error-wrapper for the members/list/continue route type MembersListContinueAPIError struct { dropbox.APIError EndpointError *MembersListContinueError `json:"error"` } func (dbx *apiImpl) MembersListContinue(arg *MembersListContinueArg) (res *MembersListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersMoveFormerMemberFilesAPIError is an error-wrapper for the members/move_former_member_files route type MembersMoveFormerMemberFilesAPIError struct { dropbox.APIError EndpointError *MembersTransferFormerMembersFilesError `json:"error"` } func (dbx *apiImpl) MembersMoveFormerMemberFiles(arg *MembersDataTransferArg) (res *async.LaunchEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/move_former_member_files", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersMoveFormerMemberFilesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersMoveFormerMemberFilesJobStatusCheckAPIError is an error-wrapper for the members/move_former_member_files/job_status/check route type MembersMoveFormerMemberFilesJobStatusCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) MembersMoveFormerMemberFilesJobStatusCheck(arg *async.PollArg) (res *async.PollEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/move_former_member_files/job_status/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersMoveFormerMemberFilesJobStatusCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersRecoverAPIError is an error-wrapper for the members/recover route type MembersRecoverAPIError struct { dropbox.APIError EndpointError *MembersRecoverError `json:"error"` } func (dbx *apiImpl) MembersRecover(arg *MembersRecoverArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/recover", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError MembersRecoverAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersRemoveAPIError is an error-wrapper for the members/remove route type MembersRemoveAPIError struct { dropbox.APIError EndpointError *MembersRemoveError `json:"error"` } func (dbx *apiImpl) MembersRemove(arg *MembersRemoveArg) (res *async.LaunchEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/remove", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersRemoveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersRemoveJobStatusGetAPIError is an error-wrapper for the members/remove/job_status/get route type MembersRemoveJobStatusGetAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) MembersRemoveJobStatusGet(arg *async.PollArg) (res *async.PollEmptyResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/remove/job_status/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersRemoveJobStatusGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersSendWelcomeEmailAPIError is an error-wrapper for the members/send_welcome_email route type MembersSendWelcomeEmailAPIError struct { dropbox.APIError EndpointError *MembersSendWelcomeError `json:"error"` } func (dbx *apiImpl) MembersSendWelcomeEmail(arg *UserSelectorArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/send_welcome_email", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError MembersSendWelcomeEmailAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersSetAdminPermissionsAPIError is an error-wrapper for the members/set_admin_permissions route type MembersSetAdminPermissionsAPIError struct { dropbox.APIError EndpointError *MembersSetPermissionsError `json:"error"` } func (dbx *apiImpl) MembersSetAdminPermissions(arg *MembersSetPermissionsArg) (res *MembersSetPermissionsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/set_admin_permissions", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersSetAdminPermissionsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersSetProfileAPIError is an error-wrapper for the members/set_profile route type MembersSetProfileAPIError struct { dropbox.APIError EndpointError *MembersSetProfileError `json:"error"` } func (dbx *apiImpl) MembersSetProfile(arg *MembersSetProfileArg) (res *TeamMemberInfo, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/set_profile", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError MembersSetProfileAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersSuspendAPIError is an error-wrapper for the members/suspend route type MembersSuspendAPIError struct { dropbox.APIError EndpointError *MembersSuspendError `json:"error"` } func (dbx *apiImpl) MembersSuspend(arg *MembersDeactivateArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/suspend", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError MembersSuspendAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //MembersUnsuspendAPIError is an error-wrapper for the members/unsuspend route type MembersUnsuspendAPIError struct { dropbox.APIError EndpointError *MembersUnsuspendError `json:"error"` } func (dbx *apiImpl) MembersUnsuspend(arg *MembersUnsuspendArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "members/unsuspend", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError MembersUnsuspendAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //NamespacesListAPIError is an error-wrapper for the namespaces/list route type NamespacesListAPIError struct { dropbox.APIError EndpointError *TeamNamespacesListError `json:"error"` } func (dbx *apiImpl) NamespacesList(arg *TeamNamespacesListArg) (res *TeamNamespacesListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "namespaces/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError NamespacesListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //NamespacesListContinueAPIError is an error-wrapper for the namespaces/list/continue route type NamespacesListContinueAPIError struct { dropbox.APIError EndpointError *TeamNamespacesListContinueError `json:"error"` } func (dbx *apiImpl) NamespacesListContinue(arg *TeamNamespacesListContinueArg) (res *TeamNamespacesListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "namespaces/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError NamespacesListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateAddAPIError is an error-wrapper for the properties/template/add route type PropertiesTemplateAddAPIError struct { dropbox.APIError EndpointError *file_properties.ModifyTemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateAdd(arg *file_properties.AddTemplateArg) (res *file_properties.AddTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateAdd` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/add", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateAddAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateGetAPIError is an error-wrapper for the properties/template/get route type PropertiesTemplateGetAPIError struct { dropbox.APIError EndpointError *file_properties.TemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateGet(arg *file_properties.GetTemplateArg) (res *file_properties.GetTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateGet` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/get", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateGetAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateListAPIError is an error-wrapper for the properties/template/list route type PropertiesTemplateListAPIError struct { dropbox.APIError EndpointError *file_properties.TemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateList() (res *file_properties.ListTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateList` is deprecated") cli := dbx.Client headers := map[string]string{} req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/list", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //PropertiesTemplateUpdateAPIError is an error-wrapper for the properties/template/update route type PropertiesTemplateUpdateAPIError struct { dropbox.APIError EndpointError *file_properties.ModifyTemplateError `json:"error"` } func (dbx *apiImpl) PropertiesTemplateUpdate(arg *file_properties.UpdateTemplateArg) (res *file_properties.UpdateTemplateResult, err error) { log.Printf("WARNING: API `PropertiesTemplateUpdate` is deprecated") cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "properties/template/update", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError PropertiesTemplateUpdateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ReportsGetActivityAPIError is an error-wrapper for the reports/get_activity route type ReportsGetActivityAPIError struct { dropbox.APIError EndpointError *DateRangeError `json:"error"` } func (dbx *apiImpl) ReportsGetActivity(arg *DateRange) (res *GetActivityReport, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_activity", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ReportsGetActivityAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ReportsGetDevicesAPIError is an error-wrapper for the reports/get_devices route type ReportsGetDevicesAPIError struct { dropbox.APIError EndpointError *DateRangeError `json:"error"` } func (dbx *apiImpl) ReportsGetDevices(arg *DateRange) (res *GetDevicesReport, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_devices", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ReportsGetDevicesAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ReportsGetMembershipAPIError is an error-wrapper for the reports/get_membership route type ReportsGetMembershipAPIError struct { dropbox.APIError EndpointError *DateRangeError `json:"error"` } func (dbx *apiImpl) ReportsGetMembership(arg *DateRange) (res *GetMembershipReport, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_membership", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ReportsGetMembershipAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //ReportsGetStorageAPIError is an error-wrapper for the reports/get_storage route type ReportsGetStorageAPIError struct { dropbox.APIError EndpointError *DateRangeError `json:"error"` } func (dbx *apiImpl) ReportsGetStorage(arg *DateRange) (res *GetStorageReport, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "reports/get_storage", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError ReportsGetStorageAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderActivateAPIError is an error-wrapper for the team_folder/activate route type TeamFolderActivateAPIError struct { dropbox.APIError EndpointError *TeamFolderActivateError `json:"error"` } func (dbx *apiImpl) TeamFolderActivate(arg *TeamFolderIdArg) (res *TeamFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/activate", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderActivateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderArchiveAPIError is an error-wrapper for the team_folder/archive route type TeamFolderArchiveAPIError struct { dropbox.APIError EndpointError *TeamFolderArchiveError `json:"error"` } func (dbx *apiImpl) TeamFolderArchive(arg *TeamFolderArchiveArg) (res *TeamFolderArchiveLaunch, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/archive", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderArchiveAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderArchiveCheckAPIError is an error-wrapper for the team_folder/archive/check route type TeamFolderArchiveCheckAPIError struct { dropbox.APIError EndpointError *async.PollError `json:"error"` } func (dbx *apiImpl) TeamFolderArchiveCheck(arg *async.PollArg) (res *TeamFolderArchiveJobStatus, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/archive/check", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderArchiveCheckAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderCreateAPIError is an error-wrapper for the team_folder/create route type TeamFolderCreateAPIError struct { dropbox.APIError EndpointError *TeamFolderCreateError `json:"error"` } func (dbx *apiImpl) TeamFolderCreate(arg *TeamFolderCreateArg) (res *TeamFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/create", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderCreateAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderGetInfoAPIError is an error-wrapper for the team_folder/get_info route type TeamFolderGetInfoAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) TeamFolderGetInfo(arg *TeamFolderIdListArg) (res []*TeamFolderGetInfoItem, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/get_info", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderGetInfoAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderListAPIError is an error-wrapper for the team_folder/list route type TeamFolderListAPIError struct { dropbox.APIError EndpointError *TeamFolderListError `json:"error"` } func (dbx *apiImpl) TeamFolderList(arg *TeamFolderListArg) (res *TeamFolderListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/list", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderListAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderListContinueAPIError is an error-wrapper for the team_folder/list/continue route type TeamFolderListContinueAPIError struct { dropbox.APIError EndpointError *TeamFolderListContinueError `json:"error"` } func (dbx *apiImpl) TeamFolderListContinue(arg *TeamFolderListContinueArg) (res *TeamFolderListResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/list/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderListContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderPermanentlyDeleteAPIError is an error-wrapper for the team_folder/permanently_delete route type TeamFolderPermanentlyDeleteAPIError struct { dropbox.APIError EndpointError *TeamFolderPermanentlyDeleteError `json:"error"` } func (dbx *apiImpl) TeamFolderPermanentlyDelete(arg *TeamFolderIdArg) (err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/permanently_delete", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderPermanentlyDeleteAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderRenameAPIError is an error-wrapper for the team_folder/rename route type TeamFolderRenameAPIError struct { dropbox.APIError EndpointError *TeamFolderRenameError `json:"error"` } func (dbx *apiImpl) TeamFolderRename(arg *TeamFolderRenameArg) (res *TeamFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/rename", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderRenameAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TeamFolderUpdateSyncSettingsAPIError is an error-wrapper for the team_folder/update_sync_settings route type TeamFolderUpdateSyncSettingsAPIError struct { dropbox.APIError EndpointError *TeamFolderUpdateSyncSettingsError `json:"error"` } func (dbx *apiImpl) TeamFolderUpdateSyncSettings(arg *TeamFolderUpdateSyncSettingsArg) (res *TeamFolderMetadata, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "team_folder/update_sync_settings", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TeamFolderUpdateSyncSettingsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //TokenGetAuthenticatedAdminAPIError is an error-wrapper for the token/get_authenticated_admin route type TokenGetAuthenticatedAdminAPIError struct { dropbox.APIError EndpointError *TokenGetAuthenticatedAdminError `json:"error"` } func (dbx *apiImpl) TokenGetAuthenticatedAdmin() (res *TokenGetAuthenticatedAdminResult, err error) { cli := dbx.Client headers := map[string]string{} req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team", "token/get_authenticated_admin", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError TokenGetAuthenticatedAdminAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/team/types.go000066400000000000000000004362531340753361200226130ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package team : has no documentation (yet) package team import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users" ) // DeviceSession : has no documentation (yet) type DeviceSession struct { // SessionId : The session id. SessionId string `json:"session_id"` // IpAddress : The IP address of the last activity from this session. IpAddress string `json:"ip_address,omitempty"` // Country : The country from which the last activity from this session was // made. Country string `json:"country,omitempty"` // Created : The time this session was created. Created time.Time `json:"created,omitempty"` // Updated : The time of the last activity from this session. Updated time.Time `json:"updated,omitempty"` } // NewDeviceSession returns a new DeviceSession instance func NewDeviceSession(SessionId string) *DeviceSession { s := new(DeviceSession) s.SessionId = SessionId return s } // ActiveWebSession : Information on active web sessions. type ActiveWebSession struct { DeviceSession // UserAgent : Information on the hosting device. UserAgent string `json:"user_agent"` // Os : Information on the hosting operating system. Os string `json:"os"` // Browser : Information on the browser used for this web session. Browser string `json:"browser"` // Expires : The time this session expires. Expires time.Time `json:"expires,omitempty"` } // NewActiveWebSession returns a new ActiveWebSession instance func NewActiveWebSession(SessionId string, UserAgent string, Os string, Browser string) *ActiveWebSession { s := new(ActiveWebSession) s.SessionId = SessionId s.UserAgent = UserAgent s.Os = Os s.Browser = Browser return s } // AdminTier : Describes which team-related admin permissions a user has. type AdminTier struct { dropbox.Tagged } // Valid tag values for AdminTier const ( AdminTierTeamAdmin = "team_admin" AdminTierUserManagementAdmin = "user_management_admin" AdminTierSupportAdmin = "support_admin" AdminTierMemberOnly = "member_only" ) // ApiApp : Information on linked third party applications. type ApiApp struct { // AppId : The application unique id. AppId string `json:"app_id"` // AppName : The application name. AppName string `json:"app_name"` // Publisher : The application publisher name. Publisher string `json:"publisher,omitempty"` // PublisherUrl : The publisher's URL. PublisherUrl string `json:"publisher_url,omitempty"` // Linked : The time this application was linked. Linked time.Time `json:"linked,omitempty"` // IsAppFolder : Whether the linked application uses a dedicated folder. IsAppFolder bool `json:"is_app_folder"` } // NewApiApp returns a new ApiApp instance func NewApiApp(AppId string, AppName string, IsAppFolder bool) *ApiApp { s := new(ApiApp) s.AppId = AppId s.AppName = AppName s.IsAppFolder = IsAppFolder return s } // BaseDfbReport : Base report structure. type BaseDfbReport struct { // StartDate : First date present in the results as 'YYYY-MM-DD' or None. StartDate string `json:"start_date"` } // NewBaseDfbReport returns a new BaseDfbReport instance func NewBaseDfbReport(StartDate string) *BaseDfbReport { s := new(BaseDfbReport) s.StartDate = StartDate return s } // BaseTeamFolderError : Base error that all errors for existing team folders // should extend. type BaseTeamFolderError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` } // Valid tag values for BaseTeamFolderError const ( BaseTeamFolderErrorAccessError = "access_error" BaseTeamFolderErrorStatusError = "status_error" BaseTeamFolderErrorTeamSharedDropboxError = "team_shared_dropbox_error" BaseTeamFolderErrorOther = "other" ) // UnmarshalJSON deserializes into a BaseTeamFolderError instance func (u *BaseTeamFolderError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } } return nil } // CustomQuotaError : Error returned when getting member custom quota. type CustomQuotaError struct { dropbox.Tagged } // Valid tag values for CustomQuotaError const ( CustomQuotaErrorTooManyUsers = "too_many_users" CustomQuotaErrorOther = "other" ) // CustomQuotaResult : User custom quota. type CustomQuotaResult struct { dropbox.Tagged // Success : User's custom quota. Success *UserCustomQuotaResult `json:"success,omitempty"` // InvalidUser : Invalid user (not in team). InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"` } // Valid tag values for CustomQuotaResult const ( CustomQuotaResultSuccess = "success" CustomQuotaResultInvalidUser = "invalid_user" CustomQuotaResultOther = "other" ) // UnmarshalJSON deserializes into a CustomQuotaResult instance func (u *CustomQuotaResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : User's custom quota. Success json.RawMessage `json:"success,omitempty"` // InvalidUser : Invalid user (not in team). InvalidUser json.RawMessage `json:"invalid_user,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "invalid_user": err = json.Unmarshal(w.InvalidUser, &u.InvalidUser) if err != nil { return err } } return nil } // CustomQuotaUsersArg : has no documentation (yet) type CustomQuotaUsersArg struct { // Users : List of users. Users []*UserSelectorArg `json:"users"` } // NewCustomQuotaUsersArg returns a new CustomQuotaUsersArg instance func NewCustomQuotaUsersArg(Users []*UserSelectorArg) *CustomQuotaUsersArg { s := new(CustomQuotaUsersArg) s.Users = Users return s } // DateRange : Input arguments that can be provided for most reports. type DateRange struct { // StartDate : Optional starting date (inclusive). StartDate time.Time `json:"start_date,omitempty"` // EndDate : Optional ending date (exclusive). EndDate time.Time `json:"end_date,omitempty"` } // NewDateRange returns a new DateRange instance func NewDateRange() *DateRange { s := new(DateRange) return s } // DateRangeError : Errors that can originate from problems in input arguments // to reports. type DateRangeError struct { dropbox.Tagged } // Valid tag values for DateRangeError const ( DateRangeErrorOther = "other" ) // DesktopClientSession : Information about linked Dropbox desktop client // sessions. type DesktopClientSession struct { DeviceSession // HostName : Name of the hosting desktop. HostName string `json:"host_name"` // ClientType : The Dropbox desktop client type. ClientType *DesktopPlatform `json:"client_type"` // ClientVersion : The Dropbox client version. ClientVersion string `json:"client_version"` // Platform : Information on the hosting platform. Platform string `json:"platform"` // IsDeleteOnUnlinkSupported : Whether it's possible to delete all of the // account files upon unlinking. IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"` } // NewDesktopClientSession returns a new DesktopClientSession instance func NewDesktopClientSession(SessionId string, HostName string, ClientType *DesktopPlatform, ClientVersion string, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopClientSession { s := new(DesktopClientSession) s.SessionId = SessionId s.HostName = HostName s.ClientType = ClientType s.ClientVersion = ClientVersion s.Platform = Platform s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported return s } // DesktopPlatform : has no documentation (yet) type DesktopPlatform struct { dropbox.Tagged } // Valid tag values for DesktopPlatform const ( DesktopPlatformWindows = "windows" DesktopPlatformMac = "mac" DesktopPlatformLinux = "linux" DesktopPlatformOther = "other" ) // DeviceSessionArg : has no documentation (yet) type DeviceSessionArg struct { // SessionId : The session id. SessionId string `json:"session_id"` // TeamMemberId : The unique id of the member owning the device. TeamMemberId string `json:"team_member_id"` } // NewDeviceSessionArg returns a new DeviceSessionArg instance func NewDeviceSessionArg(SessionId string, TeamMemberId string) *DeviceSessionArg { s := new(DeviceSessionArg) s.SessionId = SessionId s.TeamMemberId = TeamMemberId return s } // DevicesActive : Each of the items is an array of values, one value per day. // The value is the number of devices active within a time window, ending with // that day. If there is no data for a day, then the value will be None. type DevicesActive struct { // Windows : Array of number of linked windows (desktop) clients with // activity. Windows []uint64 `json:"windows"` // Macos : Array of number of linked mac (desktop) clients with activity. Macos []uint64 `json:"macos"` // Linux : Array of number of linked linus (desktop) clients with activity. Linux []uint64 `json:"linux"` // Ios : Array of number of linked ios devices with activity. Ios []uint64 `json:"ios"` // Android : Array of number of linked android devices with activity. Android []uint64 `json:"android"` // Other : Array of number of other linked devices (blackberry, windows // phone, etc) with activity. Other []uint64 `json:"other"` // Total : Array of total number of linked clients with activity. Total []uint64 `json:"total"` } // NewDevicesActive returns a new DevicesActive instance func NewDevicesActive(Windows []uint64, Macos []uint64, Linux []uint64, Ios []uint64, Android []uint64, Other []uint64, Total []uint64) *DevicesActive { s := new(DevicesActive) s.Windows = Windows s.Macos = Macos s.Linux = Linux s.Ios = Ios s.Android = Android s.Other = Other s.Total = Total return s } // ExcludedUsersListArg : Excluded users list argument. type ExcludedUsersListArg struct { // Limit : Number of results to return per call. Limit uint32 `json:"limit"` } // NewExcludedUsersListArg returns a new ExcludedUsersListArg instance func NewExcludedUsersListArg() *ExcludedUsersListArg { s := new(ExcludedUsersListArg) s.Limit = 1000 return s } // ExcludedUsersListContinueArg : Excluded users list continue argument. type ExcludedUsersListContinueArg struct { // Cursor : Indicates from what point to get the next set of users. Cursor string `json:"cursor"` } // NewExcludedUsersListContinueArg returns a new ExcludedUsersListContinueArg instance func NewExcludedUsersListContinueArg(Cursor string) *ExcludedUsersListContinueArg { s := new(ExcludedUsersListContinueArg) s.Cursor = Cursor return s } // ExcludedUsersListContinueError : Excluded users list continue error. type ExcludedUsersListContinueError struct { dropbox.Tagged } // Valid tag values for ExcludedUsersListContinueError const ( ExcludedUsersListContinueErrorInvalidCursor = "invalid_cursor" ExcludedUsersListContinueErrorOther = "other" ) // ExcludedUsersListError : Excluded users list error. type ExcludedUsersListError struct { dropbox.Tagged } // Valid tag values for ExcludedUsersListError const ( ExcludedUsersListErrorListError = "list_error" ExcludedUsersListErrorOther = "other" ) // ExcludedUsersListResult : Excluded users list result. type ExcludedUsersListResult struct { // Users : has no documentation (yet) Users []*MemberProfile `json:"users"` // Cursor : Pass the cursor into // `memberSpaceLimitsExcludedUsersListContinue` to obtain additional // excluded users. Cursor string `json:"cursor,omitempty"` // HasMore : Is true if there are additional excluded users that have not // been returned yet. An additional call to // `memberSpaceLimitsExcludedUsersListContinue` can retrieve them. HasMore bool `json:"has_more"` } // NewExcludedUsersListResult returns a new ExcludedUsersListResult instance func NewExcludedUsersListResult(Users []*MemberProfile, HasMore bool) *ExcludedUsersListResult { s := new(ExcludedUsersListResult) s.Users = Users s.HasMore = HasMore return s } // ExcludedUsersUpdateArg : Argument of excluded users update operation. Should // include a list of users to add/remove (according to endpoint), Maximum size // of the list is 1000 users. type ExcludedUsersUpdateArg struct { // Users : List of users to be added/removed. Users []*UserSelectorArg `json:"users,omitempty"` } // NewExcludedUsersUpdateArg returns a new ExcludedUsersUpdateArg instance func NewExcludedUsersUpdateArg() *ExcludedUsersUpdateArg { s := new(ExcludedUsersUpdateArg) return s } // ExcludedUsersUpdateError : Excluded users update error. type ExcludedUsersUpdateError struct { dropbox.Tagged } // Valid tag values for ExcludedUsersUpdateError const ( ExcludedUsersUpdateErrorUsersNotInTeam = "users_not_in_team" ExcludedUsersUpdateErrorTooManyUsers = "too_many_users" ExcludedUsersUpdateErrorOther = "other" ) // ExcludedUsersUpdateResult : Excluded users update result. type ExcludedUsersUpdateResult struct { // Status : Update status. Status *ExcludedUsersUpdateStatus `json:"status"` } // NewExcludedUsersUpdateResult returns a new ExcludedUsersUpdateResult instance func NewExcludedUsersUpdateResult(Status *ExcludedUsersUpdateStatus) *ExcludedUsersUpdateResult { s := new(ExcludedUsersUpdateResult) s.Status = Status return s } // ExcludedUsersUpdateStatus : Excluded users update operation status. type ExcludedUsersUpdateStatus struct { dropbox.Tagged } // Valid tag values for ExcludedUsersUpdateStatus const ( ExcludedUsersUpdateStatusSuccess = "success" ExcludedUsersUpdateStatusOther = "other" ) // Feature : A set of features that a Dropbox Business account may support. type Feature struct { dropbox.Tagged } // Valid tag values for Feature const ( FeatureUploadApiRateLimit = "upload_api_rate_limit" FeatureHasTeamSharedDropbox = "has_team_shared_dropbox" FeatureHasTeamFileEvents = "has_team_file_events" FeatureHasTeamSelectiveSync = "has_team_selective_sync" FeatureOther = "other" ) // FeatureValue : The values correspond to entries in `Feature`. You may get // different value according to your Dropbox Business plan. type FeatureValue struct { dropbox.Tagged // UploadApiRateLimit : has no documentation (yet) UploadApiRateLimit *UploadApiRateLimitValue `json:"upload_api_rate_limit,omitempty"` // HasTeamSharedDropbox : has no documentation (yet) HasTeamSharedDropbox *HasTeamSharedDropboxValue `json:"has_team_shared_dropbox,omitempty"` // HasTeamFileEvents : has no documentation (yet) HasTeamFileEvents *HasTeamFileEventsValue `json:"has_team_file_events,omitempty"` // HasTeamSelectiveSync : has no documentation (yet) HasTeamSelectiveSync *HasTeamSelectiveSyncValue `json:"has_team_selective_sync,omitempty"` } // Valid tag values for FeatureValue const ( FeatureValueUploadApiRateLimit = "upload_api_rate_limit" FeatureValueHasTeamSharedDropbox = "has_team_shared_dropbox" FeatureValueHasTeamFileEvents = "has_team_file_events" FeatureValueHasTeamSelectiveSync = "has_team_selective_sync" FeatureValueOther = "other" ) // UnmarshalJSON deserializes into a FeatureValue instance func (u *FeatureValue) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UploadApiRateLimit : has no documentation (yet) UploadApiRateLimit json.RawMessage `json:"upload_api_rate_limit,omitempty"` // HasTeamSharedDropbox : has no documentation (yet) HasTeamSharedDropbox json.RawMessage `json:"has_team_shared_dropbox,omitempty"` // HasTeamFileEvents : has no documentation (yet) HasTeamFileEvents json.RawMessage `json:"has_team_file_events,omitempty"` // HasTeamSelectiveSync : has no documentation (yet) HasTeamSelectiveSync json.RawMessage `json:"has_team_selective_sync,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "upload_api_rate_limit": err = json.Unmarshal(w.UploadApiRateLimit, &u.UploadApiRateLimit) if err != nil { return err } case "has_team_shared_dropbox": err = json.Unmarshal(w.HasTeamSharedDropbox, &u.HasTeamSharedDropbox) if err != nil { return err } case "has_team_file_events": err = json.Unmarshal(w.HasTeamFileEvents, &u.HasTeamFileEvents) if err != nil { return err } case "has_team_selective_sync": err = json.Unmarshal(w.HasTeamSelectiveSync, &u.HasTeamSelectiveSync) if err != nil { return err } } return nil } // FeaturesGetValuesBatchArg : has no documentation (yet) type FeaturesGetValuesBatchArg struct { // Features : A list of features in `Feature`. If the list is empty, this // route will return `FeaturesGetValuesBatchError`. Features []*Feature `json:"features"` } // NewFeaturesGetValuesBatchArg returns a new FeaturesGetValuesBatchArg instance func NewFeaturesGetValuesBatchArg(Features []*Feature) *FeaturesGetValuesBatchArg { s := new(FeaturesGetValuesBatchArg) s.Features = Features return s } // FeaturesGetValuesBatchError : has no documentation (yet) type FeaturesGetValuesBatchError struct { dropbox.Tagged } // Valid tag values for FeaturesGetValuesBatchError const ( FeaturesGetValuesBatchErrorEmptyFeaturesList = "empty_features_list" FeaturesGetValuesBatchErrorOther = "other" ) // FeaturesGetValuesBatchResult : has no documentation (yet) type FeaturesGetValuesBatchResult struct { // Values : has no documentation (yet) Values []*FeatureValue `json:"values"` } // NewFeaturesGetValuesBatchResult returns a new FeaturesGetValuesBatchResult instance func NewFeaturesGetValuesBatchResult(Values []*FeatureValue) *FeaturesGetValuesBatchResult { s := new(FeaturesGetValuesBatchResult) s.Values = Values return s } // GetActivityReport : Activity Report Result. Each of the items in the storage // report is an array of values, one value per day. If there is no data for a // day, then the value will be None. type GetActivityReport struct { BaseDfbReport // Adds : Array of total number of adds by team members. Adds []uint64 `json:"adds"` // Edits : Array of number of edits by team members. If the same user edits // the same file multiple times this is counted as a single edit. Edits []uint64 `json:"edits"` // Deletes : Array of total number of deletes by team members. Deletes []uint64 `json:"deletes"` // ActiveUsers28Day : Array of the number of users who have been active in // the last 28 days. ActiveUsers28Day []uint64 `json:"active_users_28_day"` // ActiveUsers7Day : Array of the number of users who have been active in // the last week. ActiveUsers7Day []uint64 `json:"active_users_7_day"` // ActiveUsers1Day : Array of the number of users who have been active in // the last day. ActiveUsers1Day []uint64 `json:"active_users_1_day"` // ActiveSharedFolders28Day : Array of the number of shared folders with // some activity in the last 28 days. ActiveSharedFolders28Day []uint64 `json:"active_shared_folders_28_day"` // ActiveSharedFolders7Day : Array of the number of shared folders with some // activity in the last week. ActiveSharedFolders7Day []uint64 `json:"active_shared_folders_7_day"` // ActiveSharedFolders1Day : Array of the number of shared folders with some // activity in the last day. ActiveSharedFolders1Day []uint64 `json:"active_shared_folders_1_day"` // SharedLinksCreated : Array of the number of shared links created. SharedLinksCreated []uint64 `json:"shared_links_created"` // SharedLinksViewedByTeam : Array of the number of views by team users to // shared links created by the team. SharedLinksViewedByTeam []uint64 `json:"shared_links_viewed_by_team"` // SharedLinksViewedByOutsideUser : Array of the number of views by users // outside of the team to shared links created by the team. SharedLinksViewedByOutsideUser []uint64 `json:"shared_links_viewed_by_outside_user"` // SharedLinksViewedByNotLoggedIn : Array of the number of views by // non-logged-in users to shared links created by the team. SharedLinksViewedByNotLoggedIn []uint64 `json:"shared_links_viewed_by_not_logged_in"` // SharedLinksViewedTotal : Array of the total number of views to shared // links created by the team. SharedLinksViewedTotal []uint64 `json:"shared_links_viewed_total"` } // NewGetActivityReport returns a new GetActivityReport instance 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 { s := new(GetActivityReport) s.StartDate = StartDate s.Adds = Adds s.Edits = Edits s.Deletes = Deletes s.ActiveUsers28Day = ActiveUsers28Day s.ActiveUsers7Day = ActiveUsers7Day s.ActiveUsers1Day = ActiveUsers1Day s.ActiveSharedFolders28Day = ActiveSharedFolders28Day s.ActiveSharedFolders7Day = ActiveSharedFolders7Day s.ActiveSharedFolders1Day = ActiveSharedFolders1Day s.SharedLinksCreated = SharedLinksCreated s.SharedLinksViewedByTeam = SharedLinksViewedByTeam s.SharedLinksViewedByOutsideUser = SharedLinksViewedByOutsideUser s.SharedLinksViewedByNotLoggedIn = SharedLinksViewedByNotLoggedIn s.SharedLinksViewedTotal = SharedLinksViewedTotal return s } // GetDevicesReport : Devices Report Result. Contains subsections for different // time ranges of activity. Each of the items in each subsection of the storage // report is an array of values, one value per day. If there is no data for a // day, then the value will be None. type GetDevicesReport struct { BaseDfbReport // Active1Day : Report of the number of devices active in the last day. Active1Day *DevicesActive `json:"active_1_day"` // Active7Day : Report of the number of devices active in the last 7 days. Active7Day *DevicesActive `json:"active_7_day"` // Active28Day : Report of the number of devices active in the last 28 days. Active28Day *DevicesActive `json:"active_28_day"` } // NewGetDevicesReport returns a new GetDevicesReport instance func NewGetDevicesReport(StartDate string, Active1Day *DevicesActive, Active7Day *DevicesActive, Active28Day *DevicesActive) *GetDevicesReport { s := new(GetDevicesReport) s.StartDate = StartDate s.Active1Day = Active1Day s.Active7Day = Active7Day s.Active28Day = Active28Day return s } // GetMembershipReport : Membership Report Result. Each of the items in the // storage report is an array of values, one value per day. If there is no data // for a day, then the value will be None. type GetMembershipReport struct { BaseDfbReport // TeamSize : Team size, for each day. TeamSize []uint64 `json:"team_size"` // PendingInvites : The number of pending invites to the team, for each day. PendingInvites []uint64 `json:"pending_invites"` // MembersJoined : The number of members that joined the team, for each day. MembersJoined []uint64 `json:"members_joined"` // SuspendedMembers : The number of suspended team members, for each day. SuspendedMembers []uint64 `json:"suspended_members"` // Licenses : The total number of licenses the team has, for each day. Licenses []uint64 `json:"licenses"` } // NewGetMembershipReport returns a new GetMembershipReport instance func NewGetMembershipReport(StartDate string, TeamSize []uint64, PendingInvites []uint64, MembersJoined []uint64, SuspendedMembers []uint64, Licenses []uint64) *GetMembershipReport { s := new(GetMembershipReport) s.StartDate = StartDate s.TeamSize = TeamSize s.PendingInvites = PendingInvites s.MembersJoined = MembersJoined s.SuspendedMembers = SuspendedMembers s.Licenses = Licenses return s } // GetStorageReport : Storage Report Result. Each of the items in the storage // report is an array of values, one value per day. If there is no data for a // day, then the value will be None. type GetStorageReport struct { BaseDfbReport // TotalUsage : Sum of the shared, unshared, and datastore usages, for each // day. TotalUsage []uint64 `json:"total_usage"` // SharedUsage : Array of the combined size (bytes) of team members' shared // folders, for each day. SharedUsage []uint64 `json:"shared_usage"` // UnsharedUsage : Array of the combined size (bytes) of team members' root // namespaces, for each day. UnsharedUsage []uint64 `json:"unshared_usage"` // SharedFolders : Array of the number of shared folders owned by team // members, for each day. SharedFolders []uint64 `json:"shared_folders"` // MemberStorageMap : Array of storage summaries of team members' account // sizes. Each storage summary is an array of key, value pairs, where each // pair describes a storage bucket. The key indicates the upper bound of the // bucket and the value is the number of users in that bucket. There is one // such summary per day. If there is no data for a day, the storage summary // will be empty. MemberStorageMap [][]*StorageBucket `json:"member_storage_map"` } // NewGetStorageReport returns a new GetStorageReport instance func NewGetStorageReport(StartDate string, TotalUsage []uint64, SharedUsage []uint64, UnsharedUsage []uint64, SharedFolders []uint64, MemberStorageMap [][]*StorageBucket) *GetStorageReport { s := new(GetStorageReport) s.StartDate = StartDate s.TotalUsage = TotalUsage s.SharedUsage = SharedUsage s.UnsharedUsage = UnsharedUsage s.SharedFolders = SharedFolders s.MemberStorageMap = MemberStorageMap return s } // GroupAccessType : Role of a user in group. type GroupAccessType struct { dropbox.Tagged } // Valid tag values for GroupAccessType const ( GroupAccessTypeMember = "member" GroupAccessTypeOwner = "owner" ) // GroupCreateArg : has no documentation (yet) type GroupCreateArg struct { // GroupName : Group name. GroupName string `json:"group_name"` // GroupExternalId : The creator of a team can associate an arbitrary // external ID to the group. GroupExternalId string `json:"group_external_id,omitempty"` // GroupManagementType : Whether the team can be managed by selected users, // or only by team admins. GroupManagementType *team_common.GroupManagementType `json:"group_management_type,omitempty"` } // NewGroupCreateArg returns a new GroupCreateArg instance func NewGroupCreateArg(GroupName string) *GroupCreateArg { s := new(GroupCreateArg) s.GroupName = GroupName return s } // GroupCreateError : has no documentation (yet) type GroupCreateError struct { dropbox.Tagged } // Valid tag values for GroupCreateError const ( GroupCreateErrorGroupNameAlreadyUsed = "group_name_already_used" GroupCreateErrorGroupNameInvalid = "group_name_invalid" GroupCreateErrorExternalIdAlreadyInUse = "external_id_already_in_use" GroupCreateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupCreateErrorOther = "other" ) // GroupSelectorError : Error that can be raised when `GroupSelector` is used. type GroupSelectorError struct { dropbox.Tagged } // Valid tag values for GroupSelectorError const ( GroupSelectorErrorGroupNotFound = "group_not_found" GroupSelectorErrorOther = "other" ) // GroupSelectorWithTeamGroupError : Error that can be raised when // `GroupSelector` is used and team groups are disallowed from being used. type GroupSelectorWithTeamGroupError struct { dropbox.Tagged } // Valid tag values for GroupSelectorWithTeamGroupError const ( GroupSelectorWithTeamGroupErrorGroupNotFound = "group_not_found" GroupSelectorWithTeamGroupErrorOther = "other" GroupSelectorWithTeamGroupErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" ) // GroupDeleteError : has no documentation (yet) type GroupDeleteError struct { dropbox.Tagged } // Valid tag values for GroupDeleteError const ( GroupDeleteErrorGroupNotFound = "group_not_found" GroupDeleteErrorOther = "other" GroupDeleteErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupDeleteErrorGroupAlreadyDeleted = "group_already_deleted" ) // GroupFullInfo : Full description of a group. type GroupFullInfo struct { team_common.GroupSummary // Members : List of group members. Members []*GroupMemberInfo `json:"members,omitempty"` // Created : The group creation time as a UTC timestamp in milliseconds // since the Unix epoch. Created uint64 `json:"created"` } // NewGroupFullInfo returns a new GroupFullInfo instance func NewGroupFullInfo(GroupName string, GroupId string, GroupManagementType *team_common.GroupManagementType, Created uint64) *GroupFullInfo { s := new(GroupFullInfo) s.GroupName = GroupName s.GroupId = GroupId s.GroupManagementType = GroupManagementType s.Created = Created return s } // GroupMemberInfo : Profile of group member, and role in group. type GroupMemberInfo struct { // Profile : Profile of group member. Profile *MemberProfile `json:"profile"` // AccessType : The role that the user has in the group. AccessType *GroupAccessType `json:"access_type"` } // NewGroupMemberInfo returns a new GroupMemberInfo instance func NewGroupMemberInfo(Profile *MemberProfile, AccessType *GroupAccessType) *GroupMemberInfo { s := new(GroupMemberInfo) s.Profile = Profile s.AccessType = AccessType return s } // GroupMemberSelector : Argument for selecting a group and a single user. type GroupMemberSelector struct { // Group : Specify a group. Group *GroupSelector `json:"group"` // User : Identity of a user that is a member of `group`. User *UserSelectorArg `json:"user"` } // NewGroupMemberSelector returns a new GroupMemberSelector instance func NewGroupMemberSelector(Group *GroupSelector, User *UserSelectorArg) *GroupMemberSelector { s := new(GroupMemberSelector) s.Group = Group s.User = User return s } // GroupMemberSelectorError : Error that can be raised when // `GroupMemberSelector` is used, and the user is required to be a member of the // specified group. type GroupMemberSelectorError struct { dropbox.Tagged } // Valid tag values for GroupMemberSelectorError const ( GroupMemberSelectorErrorGroupNotFound = "group_not_found" GroupMemberSelectorErrorOther = "other" GroupMemberSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupMemberSelectorErrorMemberNotInGroup = "member_not_in_group" ) // GroupMemberSetAccessTypeError : has no documentation (yet) type GroupMemberSetAccessTypeError struct { dropbox.Tagged } // Valid tag values for GroupMemberSetAccessTypeError const ( GroupMemberSetAccessTypeErrorGroupNotFound = "group_not_found" GroupMemberSetAccessTypeErrorOther = "other" GroupMemberSetAccessTypeErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupMemberSetAccessTypeErrorMemberNotInGroup = "member_not_in_group" GroupMemberSetAccessTypeErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group" ) // IncludeMembersArg : has no documentation (yet) type IncludeMembersArg struct { // ReturnMembers : Whether to return the list of members in the group. Note // that the default value will cause all the group members to be returned // in the response. This may take a long time for large groups. ReturnMembers bool `json:"return_members"` } // NewIncludeMembersArg returns a new IncludeMembersArg instance func NewIncludeMembersArg() *IncludeMembersArg { s := new(IncludeMembersArg) s.ReturnMembers = true return s } // GroupMembersAddArg : has no documentation (yet) type GroupMembersAddArg struct { IncludeMembersArg // Group : Group to which users will be added. Group *GroupSelector `json:"group"` // Members : List of users to be added to the group. Members []*MemberAccess `json:"members"` } // NewGroupMembersAddArg returns a new GroupMembersAddArg instance func NewGroupMembersAddArg(Group *GroupSelector, Members []*MemberAccess) *GroupMembersAddArg { s := new(GroupMembersAddArg) s.Group = Group s.Members = Members s.ReturnMembers = true return s } // GroupMembersAddError : has no documentation (yet) type GroupMembersAddError struct { dropbox.Tagged // MembersNotInTeam : These members are not part of your team. Currently, // you cannot add members to a group if they are not part of your team, // though this may change in a subsequent version. To add new members to // your Dropbox Business team, use the `membersAdd` endpoint. MembersNotInTeam []string `json:"members_not_in_team,omitempty"` // UsersNotFound : These users were not found in Dropbox. UsersNotFound []string `json:"users_not_found,omitempty"` // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group cannot // be managed by a user. UserCannotBeManagerOfCompanyManagedGroup []string `json:"user_cannot_be_manager_of_company_managed_group,omitempty"` } // Valid tag values for GroupMembersAddError const ( GroupMembersAddErrorGroupNotFound = "group_not_found" GroupMembersAddErrorOther = "other" GroupMembersAddErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupMembersAddErrorDuplicateUser = "duplicate_user" GroupMembersAddErrorGroupNotInTeam = "group_not_in_team" GroupMembersAddErrorMembersNotInTeam = "members_not_in_team" GroupMembersAddErrorUsersNotFound = "users_not_found" GroupMembersAddErrorUserMustBeActiveToBeOwner = "user_must_be_active_to_be_owner" GroupMembersAddErrorUserCannotBeManagerOfCompanyManagedGroup = "user_cannot_be_manager_of_company_managed_group" ) // UnmarshalJSON deserializes into a GroupMembersAddError instance func (u *GroupMembersAddError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MembersNotInTeam : These members are not part of your team. // Currently, you cannot add members to a group if they are not part of // your team, though this may change in a subsequent version. To add new // members to your Dropbox Business team, use the `membersAdd` endpoint. MembersNotInTeam json.RawMessage `json:"members_not_in_team,omitempty"` // UsersNotFound : These users were not found in Dropbox. UsersNotFound json.RawMessage `json:"users_not_found,omitempty"` // UserCannotBeManagerOfCompanyManagedGroup : A company-managed group // cannot be managed by a user. UserCannotBeManagerOfCompanyManagedGroup json.RawMessage `json:"user_cannot_be_manager_of_company_managed_group,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "members_not_in_team": err = json.Unmarshal(body, &u.MembersNotInTeam) if err != nil { return err } case "users_not_found": err = json.Unmarshal(body, &u.UsersNotFound) if err != nil { return err } case "user_cannot_be_manager_of_company_managed_group": err = json.Unmarshal(body, &u.UserCannotBeManagerOfCompanyManagedGroup) if err != nil { return err } } return nil } // GroupMembersChangeResult : Result returned by `groupsMembersAdd` and // `groupsMembersRemove`. type GroupMembersChangeResult struct { // GroupInfo : The group info after member change operation has been // performed. GroupInfo *GroupFullInfo `json:"group_info"` // AsyncJobId : An ID that can be used to obtain the status of // granting/revoking group-owned resources. AsyncJobId string `json:"async_job_id"` } // NewGroupMembersChangeResult returns a new GroupMembersChangeResult instance func NewGroupMembersChangeResult(GroupInfo *GroupFullInfo, AsyncJobId string) *GroupMembersChangeResult { s := new(GroupMembersChangeResult) s.GroupInfo = GroupInfo s.AsyncJobId = AsyncJobId return s } // GroupMembersRemoveArg : has no documentation (yet) type GroupMembersRemoveArg struct { IncludeMembersArg // Group : Group from which users will be removed. Group *GroupSelector `json:"group"` // Users : List of users to be removed from the group. Users []*UserSelectorArg `json:"users"` } // NewGroupMembersRemoveArg returns a new GroupMembersRemoveArg instance func NewGroupMembersRemoveArg(Group *GroupSelector, Users []*UserSelectorArg) *GroupMembersRemoveArg { s := new(GroupMembersRemoveArg) s.Group = Group s.Users = Users s.ReturnMembers = true return s } // GroupMembersSelectorError : Error that can be raised when // `GroupMembersSelector` is used, and the users are required to be members of // the specified group. type GroupMembersSelectorError struct { dropbox.Tagged } // Valid tag values for GroupMembersSelectorError const ( GroupMembersSelectorErrorGroupNotFound = "group_not_found" GroupMembersSelectorErrorOther = "other" GroupMembersSelectorErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupMembersSelectorErrorMemberNotInGroup = "member_not_in_group" ) // GroupMembersRemoveError : has no documentation (yet) type GroupMembersRemoveError struct { dropbox.Tagged // MembersNotInTeam : These members are not part of your team. MembersNotInTeam []string `json:"members_not_in_team,omitempty"` // UsersNotFound : These users were not found in Dropbox. UsersNotFound []string `json:"users_not_found,omitempty"` } // Valid tag values for GroupMembersRemoveError const ( GroupMembersRemoveErrorGroupNotFound = "group_not_found" GroupMembersRemoveErrorOther = "other" GroupMembersRemoveErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupMembersRemoveErrorMemberNotInGroup = "member_not_in_group" GroupMembersRemoveErrorGroupNotInTeam = "group_not_in_team" GroupMembersRemoveErrorMembersNotInTeam = "members_not_in_team" GroupMembersRemoveErrorUsersNotFound = "users_not_found" ) // UnmarshalJSON deserializes into a GroupMembersRemoveError instance func (u *GroupMembersRemoveError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MembersNotInTeam : These members are not part of your team. MembersNotInTeam json.RawMessage `json:"members_not_in_team,omitempty"` // UsersNotFound : These users were not found in Dropbox. UsersNotFound json.RawMessage `json:"users_not_found,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "members_not_in_team": err = json.Unmarshal(body, &u.MembersNotInTeam) if err != nil { return err } case "users_not_found": err = json.Unmarshal(body, &u.UsersNotFound) if err != nil { return err } } return nil } // GroupMembersSelector : Argument for selecting a group and a list of users. type GroupMembersSelector struct { // Group : Specify a group. Group *GroupSelector `json:"group"` // Users : A list of users that are members of `group`. Users *UsersSelectorArg `json:"users"` } // NewGroupMembersSelector returns a new GroupMembersSelector instance func NewGroupMembersSelector(Group *GroupSelector, Users *UsersSelectorArg) *GroupMembersSelector { s := new(GroupMembersSelector) s.Group = Group s.Users = Users return s } // GroupMembersSetAccessTypeArg : has no documentation (yet) type GroupMembersSetAccessTypeArg struct { GroupMemberSelector // AccessType : New group access type the user will have. AccessType *GroupAccessType `json:"access_type"` // ReturnMembers : Whether to return the list of members in the group. Note // that the default value will cause all the group members to be returned // in the response. This may take a long time for large groups. ReturnMembers bool `json:"return_members"` } // NewGroupMembersSetAccessTypeArg returns a new GroupMembersSetAccessTypeArg instance func NewGroupMembersSetAccessTypeArg(Group *GroupSelector, User *UserSelectorArg, AccessType *GroupAccessType) *GroupMembersSetAccessTypeArg { s := new(GroupMembersSetAccessTypeArg) s.Group = Group s.User = User s.AccessType = AccessType s.ReturnMembers = true return s } // GroupSelector : Argument for selecting a single group, either by group_id or // by external group ID. type GroupSelector struct { dropbox.Tagged // GroupId : Group ID. GroupId string `json:"group_id,omitempty"` // GroupExternalId : External ID of the group. GroupExternalId string `json:"group_external_id,omitempty"` } // Valid tag values for GroupSelector const ( GroupSelectorGroupId = "group_id" GroupSelectorGroupExternalId = "group_external_id" ) // UnmarshalJSON deserializes into a GroupSelector instance func (u *GroupSelector) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "group_id": err = json.Unmarshal(body, &u.GroupId) if err != nil { return err } case "group_external_id": err = json.Unmarshal(body, &u.GroupExternalId) if err != nil { return err } } return nil } // GroupUpdateArgs : has no documentation (yet) type GroupUpdateArgs struct { IncludeMembersArg // Group : Specify a group. Group *GroupSelector `json:"group"` // NewGroupName : Optional argument. Set group name to this if provided. NewGroupName string `json:"new_group_name,omitempty"` // NewGroupExternalId : Optional argument. New group external ID. If the // argument is None, the group's external_id won't be updated. If the // argument is empty string, the group's external id will be cleared. NewGroupExternalId string `json:"new_group_external_id,omitempty"` // NewGroupManagementType : Set new group management type, if provided. NewGroupManagementType *team_common.GroupManagementType `json:"new_group_management_type,omitempty"` } // NewGroupUpdateArgs returns a new GroupUpdateArgs instance func NewGroupUpdateArgs(Group *GroupSelector) *GroupUpdateArgs { s := new(GroupUpdateArgs) s.Group = Group s.ReturnMembers = true return s } // GroupUpdateError : has no documentation (yet) type GroupUpdateError struct { dropbox.Tagged } // Valid tag values for GroupUpdateError const ( GroupUpdateErrorGroupNotFound = "group_not_found" GroupUpdateErrorOther = "other" GroupUpdateErrorSystemManagedGroupDisallowed = "system_managed_group_disallowed" GroupUpdateErrorGroupNameAlreadyUsed = "group_name_already_used" GroupUpdateErrorGroupNameInvalid = "group_name_invalid" GroupUpdateErrorExternalIdAlreadyInUse = "external_id_already_in_use" ) // GroupsGetInfoError : has no documentation (yet) type GroupsGetInfoError struct { dropbox.Tagged } // Valid tag values for GroupsGetInfoError const ( GroupsGetInfoErrorGroupNotOnTeam = "group_not_on_team" GroupsGetInfoErrorOther = "other" ) // GroupsGetInfoItem : has no documentation (yet) type GroupsGetInfoItem struct { dropbox.Tagged // IdNotFound : An ID that was provided as a parameter to `groupsGetInfo`, // and did not match a corresponding group. The ID can be a group ID, or an // external ID, depending on how the method was called. IdNotFound string `json:"id_not_found,omitempty"` // GroupInfo : Info about a group. GroupInfo *GroupFullInfo `json:"group_info,omitempty"` } // Valid tag values for GroupsGetInfoItem const ( GroupsGetInfoItemIdNotFound = "id_not_found" GroupsGetInfoItemGroupInfo = "group_info" ) // UnmarshalJSON deserializes into a GroupsGetInfoItem instance func (u *GroupsGetInfoItem) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // GroupInfo : Info about a group. GroupInfo json.RawMessage `json:"group_info,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "id_not_found": err = json.Unmarshal(body, &u.IdNotFound) if err != nil { return err } case "group_info": err = json.Unmarshal(body, &u.GroupInfo) if err != nil { return err } } return nil } // GroupsListArg : has no documentation (yet) type GroupsListArg struct { // Limit : Number of results to return per call. Limit uint32 `json:"limit"` } // NewGroupsListArg returns a new GroupsListArg instance func NewGroupsListArg() *GroupsListArg { s := new(GroupsListArg) s.Limit = 1000 return s } // GroupsListContinueArg : has no documentation (yet) type GroupsListContinueArg struct { // Cursor : Indicates from what point to get the next set of groups. Cursor string `json:"cursor"` } // NewGroupsListContinueArg returns a new GroupsListContinueArg instance func NewGroupsListContinueArg(Cursor string) *GroupsListContinueArg { s := new(GroupsListContinueArg) s.Cursor = Cursor return s } // GroupsListContinueError : has no documentation (yet) type GroupsListContinueError struct { dropbox.Tagged } // Valid tag values for GroupsListContinueError const ( GroupsListContinueErrorInvalidCursor = "invalid_cursor" GroupsListContinueErrorOther = "other" ) // GroupsListResult : has no documentation (yet) type GroupsListResult struct { // Groups : has no documentation (yet) Groups []*team_common.GroupSummary `json:"groups"` // Cursor : Pass the cursor into `groupsListContinue` to obtain the // additional groups. Cursor string `json:"cursor"` // HasMore : Is true if there are additional groups that have not been // returned yet. An additional call to `groupsListContinue` can retrieve // them. HasMore bool `json:"has_more"` } // NewGroupsListResult returns a new GroupsListResult instance func NewGroupsListResult(Groups []*team_common.GroupSummary, Cursor string, HasMore bool) *GroupsListResult { s := new(GroupsListResult) s.Groups = Groups s.Cursor = Cursor s.HasMore = HasMore return s } // GroupsMembersListArg : has no documentation (yet) type GroupsMembersListArg struct { // Group : The group whose members are to be listed. Group *GroupSelector `json:"group"` // Limit : Number of results to return per call. Limit uint32 `json:"limit"` } // NewGroupsMembersListArg returns a new GroupsMembersListArg instance func NewGroupsMembersListArg(Group *GroupSelector) *GroupsMembersListArg { s := new(GroupsMembersListArg) s.Group = Group s.Limit = 1000 return s } // GroupsMembersListContinueArg : has no documentation (yet) type GroupsMembersListContinueArg struct { // Cursor : Indicates from what point to get the next set of groups. Cursor string `json:"cursor"` } // NewGroupsMembersListContinueArg returns a new GroupsMembersListContinueArg instance func NewGroupsMembersListContinueArg(Cursor string) *GroupsMembersListContinueArg { s := new(GroupsMembersListContinueArg) s.Cursor = Cursor return s } // GroupsMembersListContinueError : has no documentation (yet) type GroupsMembersListContinueError struct { dropbox.Tagged } // Valid tag values for GroupsMembersListContinueError const ( GroupsMembersListContinueErrorInvalidCursor = "invalid_cursor" GroupsMembersListContinueErrorOther = "other" ) // GroupsMembersListResult : has no documentation (yet) type GroupsMembersListResult struct { // Members : has no documentation (yet) Members []*GroupMemberInfo `json:"members"` // Cursor : Pass the cursor into `groupsMembersListContinue` to obtain // additional group members. Cursor string `json:"cursor"` // HasMore : Is true if there are additional group members that have not // been returned yet. An additional call to `groupsMembersListContinue` can // retrieve them. HasMore bool `json:"has_more"` } // NewGroupsMembersListResult returns a new GroupsMembersListResult instance func NewGroupsMembersListResult(Members []*GroupMemberInfo, Cursor string, HasMore bool) *GroupsMembersListResult { s := new(GroupsMembersListResult) s.Members = Members s.Cursor = Cursor s.HasMore = HasMore return s } // GroupsPollError : has no documentation (yet) type GroupsPollError struct { dropbox.Tagged } // Valid tag values for GroupsPollError const ( GroupsPollErrorInvalidAsyncJobId = "invalid_async_job_id" GroupsPollErrorInternalError = "internal_error" GroupsPollErrorOther = "other" GroupsPollErrorAccessDenied = "access_denied" ) // GroupsSelector : Argument for selecting a list of groups, either by // group_ids, or external group IDs. type GroupsSelector struct { dropbox.Tagged // GroupIds : List of group IDs. GroupIds []string `json:"group_ids,omitempty"` // GroupExternalIds : List of external IDs of groups. GroupExternalIds []string `json:"group_external_ids,omitempty"` } // Valid tag values for GroupsSelector const ( GroupsSelectorGroupIds = "group_ids" GroupsSelectorGroupExternalIds = "group_external_ids" ) // UnmarshalJSON deserializes into a GroupsSelector instance func (u *GroupsSelector) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // GroupIds : List of group IDs. GroupIds json.RawMessage `json:"group_ids,omitempty"` // GroupExternalIds : List of external IDs of groups. GroupExternalIds json.RawMessage `json:"group_external_ids,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "group_ids": err = json.Unmarshal(body, &u.GroupIds) if err != nil { return err } case "group_external_ids": err = json.Unmarshal(body, &u.GroupExternalIds) if err != nil { return err } } return nil } // HasTeamFileEventsValue : The value for `Feature.has_team_file_events`. type HasTeamFileEventsValue struct { dropbox.Tagged // Enabled : Does this team have file events. Enabled bool `json:"enabled,omitempty"` } // Valid tag values for HasTeamFileEventsValue const ( HasTeamFileEventsValueEnabled = "enabled" HasTeamFileEventsValueOther = "other" ) // UnmarshalJSON deserializes into a HasTeamFileEventsValue instance func (u *HasTeamFileEventsValue) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "enabled": err = json.Unmarshal(body, &u.Enabled) if err != nil { return err } } return nil } // HasTeamSelectiveSyncValue : The value for `Feature.has_team_selective_sync`. type HasTeamSelectiveSyncValue struct { dropbox.Tagged // HasTeamSelectiveSync : Does this team have team selective sync enabled. HasTeamSelectiveSync bool `json:"has_team_selective_sync,omitempty"` } // Valid tag values for HasTeamSelectiveSyncValue const ( HasTeamSelectiveSyncValueHasTeamSelectiveSync = "has_team_selective_sync" HasTeamSelectiveSyncValueOther = "other" ) // UnmarshalJSON deserializes into a HasTeamSelectiveSyncValue instance func (u *HasTeamSelectiveSyncValue) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "has_team_selective_sync": err = json.Unmarshal(body, &u.HasTeamSelectiveSync) if err != nil { return err } } return nil } // HasTeamSharedDropboxValue : The value for `Feature.has_team_shared_dropbox`. type HasTeamSharedDropboxValue struct { dropbox.Tagged // HasTeamSharedDropbox : Does this team have a shared team root. HasTeamSharedDropbox bool `json:"has_team_shared_dropbox,omitempty"` } // Valid tag values for HasTeamSharedDropboxValue const ( HasTeamSharedDropboxValueHasTeamSharedDropbox = "has_team_shared_dropbox" HasTeamSharedDropboxValueOther = "other" ) // UnmarshalJSON deserializes into a HasTeamSharedDropboxValue instance func (u *HasTeamSharedDropboxValue) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "has_team_shared_dropbox": err = json.Unmarshal(body, &u.HasTeamSharedDropbox) if err != nil { return err } } return nil } // ListMemberAppsArg : has no documentation (yet) type ListMemberAppsArg struct { // TeamMemberId : The team member id. TeamMemberId string `json:"team_member_id"` } // NewListMemberAppsArg returns a new ListMemberAppsArg instance func NewListMemberAppsArg(TeamMemberId string) *ListMemberAppsArg { s := new(ListMemberAppsArg) s.TeamMemberId = TeamMemberId return s } // ListMemberAppsError : Error returned by `linkedAppsListMemberLinkedApps`. type ListMemberAppsError struct { dropbox.Tagged } // Valid tag values for ListMemberAppsError const ( ListMemberAppsErrorMemberNotFound = "member_not_found" ListMemberAppsErrorOther = "other" ) // ListMemberAppsResult : has no documentation (yet) type ListMemberAppsResult struct { // LinkedApiApps : List of third party applications linked by this team // member. LinkedApiApps []*ApiApp `json:"linked_api_apps"` } // NewListMemberAppsResult returns a new ListMemberAppsResult instance func NewListMemberAppsResult(LinkedApiApps []*ApiApp) *ListMemberAppsResult { s := new(ListMemberAppsResult) s.LinkedApiApps = LinkedApiApps return s } // ListMemberDevicesArg : has no documentation (yet) type ListMemberDevicesArg struct { // TeamMemberId : The team's member id. TeamMemberId string `json:"team_member_id"` // IncludeWebSessions : Whether to list web sessions of the team's member. IncludeWebSessions bool `json:"include_web_sessions"` // IncludeDesktopClients : Whether to list linked desktop devices of the // team's member. IncludeDesktopClients bool `json:"include_desktop_clients"` // IncludeMobileClients : Whether to list linked mobile devices of the // team's member. IncludeMobileClients bool `json:"include_mobile_clients"` } // NewListMemberDevicesArg returns a new ListMemberDevicesArg instance func NewListMemberDevicesArg(TeamMemberId string) *ListMemberDevicesArg { s := new(ListMemberDevicesArg) s.TeamMemberId = TeamMemberId s.IncludeWebSessions = true s.IncludeDesktopClients = true s.IncludeMobileClients = true return s } // ListMemberDevicesError : has no documentation (yet) type ListMemberDevicesError struct { dropbox.Tagged } // Valid tag values for ListMemberDevicesError const ( ListMemberDevicesErrorMemberNotFound = "member_not_found" ListMemberDevicesErrorOther = "other" ) // ListMemberDevicesResult : has no documentation (yet) type ListMemberDevicesResult struct { // ActiveWebSessions : List of web sessions made by this team member. ActiveWebSessions []*ActiveWebSession `json:"active_web_sessions,omitempty"` // DesktopClientSessions : List of desktop clients used by this team member. DesktopClientSessions []*DesktopClientSession `json:"desktop_client_sessions,omitempty"` // MobileClientSessions : List of mobile client used by this team member. MobileClientSessions []*MobileClientSession `json:"mobile_client_sessions,omitempty"` } // NewListMemberDevicesResult returns a new ListMemberDevicesResult instance func NewListMemberDevicesResult() *ListMemberDevicesResult { s := new(ListMemberDevicesResult) return s } // ListMembersAppsArg : Arguments for `linkedAppsListMembersLinkedApps`. type ListMembersAppsArg struct { // Cursor : At the first call to the `linkedAppsListMembersLinkedApps` the // cursor shouldn't be passed. Then, if the result of the call includes a // cursor, the following requests should include the received cursors in // order to receive the next sub list of the team applications. Cursor string `json:"cursor,omitempty"` } // NewListMembersAppsArg returns a new ListMembersAppsArg instance func NewListMembersAppsArg() *ListMembersAppsArg { s := new(ListMembersAppsArg) return s } // ListMembersAppsError : Error returned by `linkedAppsListMembersLinkedApps`. type ListMembersAppsError struct { dropbox.Tagged } // Valid tag values for ListMembersAppsError const ( ListMembersAppsErrorReset = "reset" ListMembersAppsErrorOther = "other" ) // ListMembersAppsResult : Information returned by // `linkedAppsListMembersLinkedApps`. type ListMembersAppsResult struct { // Apps : The linked applications of each member of the team. Apps []*MemberLinkedApps `json:"apps"` // HasMore : If true, then there are more apps available. Pass the cursor to // `linkedAppsListMembersLinkedApps` to retrieve the rest. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `linkedAppsListMembersLinkedApps` to // receive the next sub list of team's applications. Cursor string `json:"cursor,omitempty"` } // NewListMembersAppsResult returns a new ListMembersAppsResult instance func NewListMembersAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListMembersAppsResult { s := new(ListMembersAppsResult) s.Apps = Apps s.HasMore = HasMore return s } // ListMembersDevicesArg : has no documentation (yet) type ListMembersDevicesArg struct { // Cursor : At the first call to the `devicesListMembersDevices` the cursor // shouldn't be passed. Then, if the result of the call includes a cursor, // the following requests should include the received cursors in order to // receive the next sub list of team devices. Cursor string `json:"cursor,omitempty"` // IncludeWebSessions : Whether to list web sessions of the team members. IncludeWebSessions bool `json:"include_web_sessions"` // IncludeDesktopClients : Whether to list desktop clients of the team // members. IncludeDesktopClients bool `json:"include_desktop_clients"` // IncludeMobileClients : Whether to list mobile clients of the team // members. IncludeMobileClients bool `json:"include_mobile_clients"` } // NewListMembersDevicesArg returns a new ListMembersDevicesArg instance func NewListMembersDevicesArg() *ListMembersDevicesArg { s := new(ListMembersDevicesArg) s.IncludeWebSessions = true s.IncludeDesktopClients = true s.IncludeMobileClients = true return s } // ListMembersDevicesError : has no documentation (yet) type ListMembersDevicesError struct { dropbox.Tagged } // Valid tag values for ListMembersDevicesError const ( ListMembersDevicesErrorReset = "reset" ListMembersDevicesErrorOther = "other" ) // ListMembersDevicesResult : has no documentation (yet) type ListMembersDevicesResult struct { // Devices : The devices of each member of the team. Devices []*MemberDevices `json:"devices"` // HasMore : If true, then there are more devices available. Pass the cursor // to `devicesListMembersDevices` to retrieve the rest. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `devicesListMembersDevices` to receive the // next sub list of team's devices. Cursor string `json:"cursor,omitempty"` } // NewListMembersDevicesResult returns a new ListMembersDevicesResult instance func NewListMembersDevicesResult(Devices []*MemberDevices, HasMore bool) *ListMembersDevicesResult { s := new(ListMembersDevicesResult) s.Devices = Devices s.HasMore = HasMore return s } // ListTeamAppsArg : Arguments for `linkedAppsListTeamLinkedApps`. type ListTeamAppsArg struct { // Cursor : At the first call to the `linkedAppsListTeamLinkedApps` the // cursor shouldn't be passed. Then, if the result of the call includes a // cursor, the following requests should include the received cursors in // order to receive the next sub list of the team applications. Cursor string `json:"cursor,omitempty"` } // NewListTeamAppsArg returns a new ListTeamAppsArg instance func NewListTeamAppsArg() *ListTeamAppsArg { s := new(ListTeamAppsArg) return s } // ListTeamAppsError : Error returned by `linkedAppsListTeamLinkedApps`. type ListTeamAppsError struct { dropbox.Tagged } // Valid tag values for ListTeamAppsError const ( ListTeamAppsErrorReset = "reset" ListTeamAppsErrorOther = "other" ) // ListTeamAppsResult : Information returned by `linkedAppsListTeamLinkedApps`. type ListTeamAppsResult struct { // Apps : The linked applications of each member of the team. Apps []*MemberLinkedApps `json:"apps"` // HasMore : If true, then there are more apps available. Pass the cursor to // `linkedAppsListTeamLinkedApps` to retrieve the rest. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `linkedAppsListTeamLinkedApps` to receive // the next sub list of team's applications. Cursor string `json:"cursor,omitempty"` } // NewListTeamAppsResult returns a new ListTeamAppsResult instance func NewListTeamAppsResult(Apps []*MemberLinkedApps, HasMore bool) *ListTeamAppsResult { s := new(ListTeamAppsResult) s.Apps = Apps s.HasMore = HasMore return s } // ListTeamDevicesArg : has no documentation (yet) type ListTeamDevicesArg struct { // Cursor : At the first call to the `devicesListTeamDevices` the cursor // shouldn't be passed. Then, if the result of the call includes a cursor, // the following requests should include the received cursors in order to // receive the next sub list of team devices. Cursor string `json:"cursor,omitempty"` // IncludeWebSessions : Whether to list web sessions of the team members. IncludeWebSessions bool `json:"include_web_sessions"` // IncludeDesktopClients : Whether to list desktop clients of the team // members. IncludeDesktopClients bool `json:"include_desktop_clients"` // IncludeMobileClients : Whether to list mobile clients of the team // members. IncludeMobileClients bool `json:"include_mobile_clients"` } // NewListTeamDevicesArg returns a new ListTeamDevicesArg instance func NewListTeamDevicesArg() *ListTeamDevicesArg { s := new(ListTeamDevicesArg) s.IncludeWebSessions = true s.IncludeDesktopClients = true s.IncludeMobileClients = true return s } // ListTeamDevicesError : has no documentation (yet) type ListTeamDevicesError struct { dropbox.Tagged } // Valid tag values for ListTeamDevicesError const ( ListTeamDevicesErrorReset = "reset" ListTeamDevicesErrorOther = "other" ) // ListTeamDevicesResult : has no documentation (yet) type ListTeamDevicesResult struct { // Devices : The devices of each member of the team. Devices []*MemberDevices `json:"devices"` // HasMore : If true, then there are more devices available. Pass the cursor // to `devicesListTeamDevices` to retrieve the rest. HasMore bool `json:"has_more"` // Cursor : Pass the cursor into `devicesListTeamDevices` to receive the // next sub list of team's devices. Cursor string `json:"cursor,omitempty"` } // NewListTeamDevicesResult returns a new ListTeamDevicesResult instance func NewListTeamDevicesResult(Devices []*MemberDevices, HasMore bool) *ListTeamDevicesResult { s := new(ListTeamDevicesResult) s.Devices = Devices s.HasMore = HasMore return s } // MemberAccess : Specify access type a member should have when joined to a // group. type MemberAccess struct { // User : Identity of a user. User *UserSelectorArg `json:"user"` // AccessType : Access type. AccessType *GroupAccessType `json:"access_type"` } // NewMemberAccess returns a new MemberAccess instance func NewMemberAccess(User *UserSelectorArg, AccessType *GroupAccessType) *MemberAccess { s := new(MemberAccess) s.User = User s.AccessType = AccessType return s } // MemberAddArg : has no documentation (yet) type MemberAddArg struct { // MemberEmail : has no documentation (yet) MemberEmail string `json:"member_email"` // MemberGivenName : Member's first name. MemberGivenName string `json:"member_given_name,omitempty"` // MemberSurname : Member's last name. MemberSurname string `json:"member_surname,omitempty"` // MemberExternalId : External ID for member. MemberExternalId string `json:"member_external_id,omitempty"` // MemberPersistentId : Persistent ID for member. This field is only // available to teams using persistent ID SAML configuration. MemberPersistentId string `json:"member_persistent_id,omitempty"` // SendWelcomeEmail : Whether to send a welcome email to the member. If // send_welcome_email is false, no email invitation will be sent to the // user. This may be useful for apps using single sign-on (SSO) flows for // onboarding that want to handle announcements themselves. SendWelcomeEmail bool `json:"send_welcome_email"` // Role : has no documentation (yet) Role *AdminTier `json:"role"` // IsDirectoryRestricted : Whether a user is directory restricted. IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"` } // NewMemberAddArg returns a new MemberAddArg instance func NewMemberAddArg(MemberEmail string) *MemberAddArg { s := new(MemberAddArg) s.MemberEmail = MemberEmail s.SendWelcomeEmail = true s.Role = &AdminTier{Tagged: dropbox.Tagged{"member_only"}} return s } // MemberAddResult : Describes the result of attempting to add a single user to // the team. 'success' is the only value indicating that a user was indeed added // to the team - the other values explain the type of failure that occurred, and // include the email of the user for which the operation has failed. type MemberAddResult struct { dropbox.Tagged // Success : Describes a user that was successfully added to the team. Success *TeamMemberInfo `json:"success,omitempty"` // TeamLicenseLimit : Team is already full. The organization has no // available licenses. TeamLicenseLimit string `json:"team_license_limit,omitempty"` // FreeTeamMemberLimitReached : Team is already full. The free team member // limit has been reached. FreeTeamMemberLimitReached string `json:"free_team_member_limit_reached,omitempty"` // UserAlreadyOnTeam : User is already on this team. The provided email // address is associated with a user who is already a member of (including // in recoverable state) or invited to the team. UserAlreadyOnTeam string `json:"user_already_on_team,omitempty"` // UserOnAnotherTeam : User is already on another team. The provided email // address is associated with a user that is already a member or invited to // another team. UserOnAnotherTeam string `json:"user_on_another_team,omitempty"` // UserAlreadyPaired : User is already paired. UserAlreadyPaired string `json:"user_already_paired,omitempty"` // UserMigrationFailed : User migration has failed. UserMigrationFailed string `json:"user_migration_failed,omitempty"` // DuplicateExternalMemberId : A user with the given external member ID // already exists on the team (including in recoverable state). DuplicateExternalMemberId string `json:"duplicate_external_member_id,omitempty"` // DuplicateMemberPersistentId : A user with the given persistent ID already // exists on the team (including in recoverable state). DuplicateMemberPersistentId string `json:"duplicate_member_persistent_id,omitempty"` // PersistentIdDisabled : Persistent ID is only available to teams with // persistent ID SAML configuration. Please contact Dropbox for more // information. PersistentIdDisabled string `json:"persistent_id_disabled,omitempty"` // UserCreationFailed : User creation has failed. UserCreationFailed string `json:"user_creation_failed,omitempty"` } // Valid tag values for MemberAddResult const ( MemberAddResultSuccess = "success" MemberAddResultTeamLicenseLimit = "team_license_limit" MemberAddResultFreeTeamMemberLimitReached = "free_team_member_limit_reached" MemberAddResultUserAlreadyOnTeam = "user_already_on_team" MemberAddResultUserOnAnotherTeam = "user_on_another_team" MemberAddResultUserAlreadyPaired = "user_already_paired" MemberAddResultUserMigrationFailed = "user_migration_failed" MemberAddResultDuplicateExternalMemberId = "duplicate_external_member_id" MemberAddResultDuplicateMemberPersistentId = "duplicate_member_persistent_id" MemberAddResultPersistentIdDisabled = "persistent_id_disabled" MemberAddResultUserCreationFailed = "user_creation_failed" ) // UnmarshalJSON deserializes into a MemberAddResult instance func (u *MemberAddResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : Describes a user that was successfully added to the team. Success json.RawMessage `json:"success,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(body, &u.Success) if err != nil { return err } case "team_license_limit": err = json.Unmarshal(body, &u.TeamLicenseLimit) if err != nil { return err } case "free_team_member_limit_reached": err = json.Unmarshal(body, &u.FreeTeamMemberLimitReached) if err != nil { return err } case "user_already_on_team": err = json.Unmarshal(body, &u.UserAlreadyOnTeam) if err != nil { return err } case "user_on_another_team": err = json.Unmarshal(body, &u.UserOnAnotherTeam) if err != nil { return err } case "user_already_paired": err = json.Unmarshal(body, &u.UserAlreadyPaired) if err != nil { return err } case "user_migration_failed": err = json.Unmarshal(body, &u.UserMigrationFailed) if err != nil { return err } case "duplicate_external_member_id": err = json.Unmarshal(body, &u.DuplicateExternalMemberId) if err != nil { return err } case "duplicate_member_persistent_id": err = json.Unmarshal(body, &u.DuplicateMemberPersistentId) if err != nil { return err } case "persistent_id_disabled": err = json.Unmarshal(body, &u.PersistentIdDisabled) if err != nil { return err } case "user_creation_failed": err = json.Unmarshal(body, &u.UserCreationFailed) if err != nil { return err } } return nil } // MemberDevices : Information on devices of a team's member. type MemberDevices struct { // TeamMemberId : The member unique Id. TeamMemberId string `json:"team_member_id"` // WebSessions : List of web sessions made by this team member. WebSessions []*ActiveWebSession `json:"web_sessions,omitempty"` // DesktopClients : List of desktop clients by this team member. DesktopClients []*DesktopClientSession `json:"desktop_clients,omitempty"` // MobileClients : List of mobile clients by this team member. MobileClients []*MobileClientSession `json:"mobile_clients,omitempty"` } // NewMemberDevices returns a new MemberDevices instance func NewMemberDevices(TeamMemberId string) *MemberDevices { s := new(MemberDevices) s.TeamMemberId = TeamMemberId return s } // MemberLinkedApps : Information on linked applications of a team member. type MemberLinkedApps struct { // TeamMemberId : The member unique Id. TeamMemberId string `json:"team_member_id"` // LinkedApiApps : List of third party applications linked by this team // member. LinkedApiApps []*ApiApp `json:"linked_api_apps"` } // NewMemberLinkedApps returns a new MemberLinkedApps instance func NewMemberLinkedApps(TeamMemberId string, LinkedApiApps []*ApiApp) *MemberLinkedApps { s := new(MemberLinkedApps) s.TeamMemberId = TeamMemberId s.LinkedApiApps = LinkedApiApps return s } // MemberProfile : Basic member profile. type MemberProfile struct { // TeamMemberId : ID of user as a member of a team. TeamMemberId string `json:"team_member_id"` // ExternalId : External ID that a team can attach to the user. An // application using the API may find it easier to use their own IDs instead // of Dropbox IDs like account_id or team_member_id. ExternalId string `json:"external_id,omitempty"` // AccountId : A user's account identifier. AccountId string `json:"account_id,omitempty"` // Email : Email address of user. Email string `json:"email"` // EmailVerified : Is true if the user's email is verified to be owned by // the user. EmailVerified bool `json:"email_verified"` // Status : The user's status as a member of a specific team. Status *TeamMemberStatus `json:"status"` // Name : Representations for a person's name. Name *users.Name `json:"name"` // MembershipType : The user's membership type: full (normal team member) vs // limited (does not use a license; no access to the team's shared quota). MembershipType *TeamMembershipType `json:"membership_type"` // JoinedOn : The date and time the user joined as a member of a specific // team. JoinedOn time.Time `json:"joined_on,omitempty"` // PersistentId : Persistent ID that a team can attach to the user. The // persistent ID is unique ID to be used for SAML authentication. PersistentId string `json:"persistent_id,omitempty"` // IsDirectoryRestricted : Whether the user is a directory restricted user. IsDirectoryRestricted bool `json:"is_directory_restricted,omitempty"` } // NewMemberProfile returns a new MemberProfile instance func NewMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType) *MemberProfile { s := new(MemberProfile) s.TeamMemberId = TeamMemberId s.Email = Email s.EmailVerified = EmailVerified s.Status = Status s.Name = Name s.MembershipType = MembershipType return s } // UserSelectorError : Error that can be returned whenever a struct derived from // `UserSelectorArg` is used. type UserSelectorError struct { dropbox.Tagged } // Valid tag values for UserSelectorError const ( UserSelectorErrorUserNotFound = "user_not_found" ) // MemberSelectorError : has no documentation (yet) type MemberSelectorError struct { dropbox.Tagged } // Valid tag values for MemberSelectorError const ( MemberSelectorErrorUserNotFound = "user_not_found" MemberSelectorErrorUserNotInTeam = "user_not_in_team" ) // MembersAddArg : has no documentation (yet) type MembersAddArg struct { // NewMembers : Details of new members to be added to the team. NewMembers []*MemberAddArg `json:"new_members"` // ForceAsync : Whether to force the add to happen asynchronously. ForceAsync bool `json:"force_async"` } // NewMembersAddArg returns a new MembersAddArg instance func NewMembersAddArg(NewMembers []*MemberAddArg) *MembersAddArg { s := new(MembersAddArg) s.NewMembers = NewMembers s.ForceAsync = false return s } // MembersAddJobStatus : has no documentation (yet) type MembersAddJobStatus struct { dropbox.Tagged // Complete : The asynchronous job has finished. For each member that was // specified in the parameter `MembersAddArg` that was provided to // `membersAdd`, a corresponding item is returned in this list. Complete []*MemberAddResult `json:"complete,omitempty"` // Failed : The asynchronous job returned an error. The string contains an // error message. Failed string `json:"failed,omitempty"` } // Valid tag values for MembersAddJobStatus const ( MembersAddJobStatusInProgress = "in_progress" MembersAddJobStatusComplete = "complete" MembersAddJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a MembersAddJobStatus instance func (u *MembersAddJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The asynchronous job has finished. For each member that // was specified in the parameter `MembersAddArg` that was provided to // `membersAdd`, a corresponding item is returned in this list. Complete []json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(body, &u.Failed) if err != nil { return err } } return nil } // MembersAddLaunch : has no documentation (yet) type MembersAddLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete []*MemberAddResult `json:"complete,omitempty"` } // Valid tag values for MembersAddLaunch const ( MembersAddLaunchAsyncJobId = "async_job_id" MembersAddLaunchComplete = "complete" ) // UnmarshalJSON deserializes into a MembersAddLaunch instance func (u *MembersAddLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete []json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // MembersDeactivateBaseArg : Exactly one of team_member_id, email, or // external_id must be provided to identify the user account. type MembersDeactivateBaseArg struct { // User : Identity of user to remove/suspend/have their files moved. User *UserSelectorArg `json:"user"` } // NewMembersDeactivateBaseArg returns a new MembersDeactivateBaseArg instance func NewMembersDeactivateBaseArg(User *UserSelectorArg) *MembersDeactivateBaseArg { s := new(MembersDeactivateBaseArg) s.User = User return s } // MembersDataTransferArg : has no documentation (yet) type MembersDataTransferArg struct { MembersDeactivateBaseArg // TransferDestId : Files from the deleted member account will be // transferred to this user. TransferDestId *UserSelectorArg `json:"transfer_dest_id"` // TransferAdminId : Errors during the transfer process will be sent via // email to this user. TransferAdminId *UserSelectorArg `json:"transfer_admin_id"` } // NewMembersDataTransferArg returns a new MembersDataTransferArg instance func NewMembersDataTransferArg(User *UserSelectorArg, TransferDestId *UserSelectorArg, TransferAdminId *UserSelectorArg) *MembersDataTransferArg { s := new(MembersDataTransferArg) s.User = User s.TransferDestId = TransferDestId s.TransferAdminId = TransferAdminId return s } // MembersDeactivateArg : has no documentation (yet) type MembersDeactivateArg struct { MembersDeactivateBaseArg // WipeData : If provided, controls if the user's data will be deleted on // their linked devices. WipeData bool `json:"wipe_data"` } // NewMembersDeactivateArg returns a new MembersDeactivateArg instance func NewMembersDeactivateArg(User *UserSelectorArg) *MembersDeactivateArg { s := new(MembersDeactivateArg) s.User = User s.WipeData = true return s } // MembersDeactivateError : has no documentation (yet) type MembersDeactivateError struct { dropbox.Tagged } // Valid tag values for MembersDeactivateError const ( MembersDeactivateErrorUserNotFound = "user_not_found" MembersDeactivateErrorUserNotInTeam = "user_not_in_team" MembersDeactivateErrorOther = "other" ) // MembersGetInfoArgs : has no documentation (yet) type MembersGetInfoArgs struct { // Members : List of team members. Members []*UserSelectorArg `json:"members"` } // NewMembersGetInfoArgs returns a new MembersGetInfoArgs instance func NewMembersGetInfoArgs(Members []*UserSelectorArg) *MembersGetInfoArgs { s := new(MembersGetInfoArgs) s.Members = Members return s } // MembersGetInfoError : type MembersGetInfoError struct { dropbox.Tagged } // Valid tag values for MembersGetInfoError const ( MembersGetInfoErrorOther = "other" ) // MembersGetInfoItem : Describes a result obtained for a single user whose id // was specified in the parameter of `membersGetInfo`. type MembersGetInfoItem struct { dropbox.Tagged // IdNotFound : An ID that was provided as a parameter to `membersGetInfo`, // and did not match a corresponding user. This might be a team_member_id, // an email, or an external ID, depending on how the method was called. IdNotFound string `json:"id_not_found,omitempty"` // MemberInfo : Info about a team member. MemberInfo *TeamMemberInfo `json:"member_info,omitempty"` } // Valid tag values for MembersGetInfoItem const ( MembersGetInfoItemIdNotFound = "id_not_found" MembersGetInfoItemMemberInfo = "member_info" ) // UnmarshalJSON deserializes into a MembersGetInfoItem instance func (u *MembersGetInfoItem) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MemberInfo : Info about a team member. MemberInfo json.RawMessage `json:"member_info,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "id_not_found": err = json.Unmarshal(body, &u.IdNotFound) if err != nil { return err } case "member_info": err = json.Unmarshal(body, &u.MemberInfo) if err != nil { return err } } return nil } // MembersListArg : has no documentation (yet) type MembersListArg struct { // Limit : Number of results to return per call. Limit uint32 `json:"limit"` // IncludeRemoved : Whether to return removed members. IncludeRemoved bool `json:"include_removed"` } // NewMembersListArg returns a new MembersListArg instance func NewMembersListArg() *MembersListArg { s := new(MembersListArg) s.Limit = 1000 s.IncludeRemoved = false return s } // MembersListContinueArg : has no documentation (yet) type MembersListContinueArg struct { // Cursor : Indicates from what point to get the next set of members. Cursor string `json:"cursor"` } // NewMembersListContinueArg returns a new MembersListContinueArg instance func NewMembersListContinueArg(Cursor string) *MembersListContinueArg { s := new(MembersListContinueArg) s.Cursor = Cursor return s } // MembersListContinueError : has no documentation (yet) type MembersListContinueError struct { dropbox.Tagged } // Valid tag values for MembersListContinueError const ( MembersListContinueErrorInvalidCursor = "invalid_cursor" MembersListContinueErrorOther = "other" ) // MembersListError : type MembersListError struct { dropbox.Tagged } // Valid tag values for MembersListError const ( MembersListErrorOther = "other" ) // MembersListResult : has no documentation (yet) type MembersListResult struct { // Members : List of team members. Members []*TeamMemberInfo `json:"members"` // Cursor : Pass the cursor into `membersListContinue` to obtain the // additional members. Cursor string `json:"cursor"` // HasMore : Is true if there are additional team members that have not been // returned yet. An additional call to `membersListContinue` can retrieve // them. HasMore bool `json:"has_more"` } // NewMembersListResult returns a new MembersListResult instance func NewMembersListResult(Members []*TeamMemberInfo, Cursor string, HasMore bool) *MembersListResult { s := new(MembersListResult) s.Members = Members s.Cursor = Cursor s.HasMore = HasMore return s } // MembersRecoverArg : Exactly one of team_member_id, email, or external_id must // be provided to identify the user account. type MembersRecoverArg struct { // User : Identity of user to recover. User *UserSelectorArg `json:"user"` } // NewMembersRecoverArg returns a new MembersRecoverArg instance func NewMembersRecoverArg(User *UserSelectorArg) *MembersRecoverArg { s := new(MembersRecoverArg) s.User = User return s } // MembersRecoverError : has no documentation (yet) type MembersRecoverError struct { dropbox.Tagged } // Valid tag values for MembersRecoverError const ( MembersRecoverErrorUserNotFound = "user_not_found" MembersRecoverErrorUserUnrecoverable = "user_unrecoverable" MembersRecoverErrorUserNotInTeam = "user_not_in_team" MembersRecoverErrorTeamLicenseLimit = "team_license_limit" MembersRecoverErrorOther = "other" ) // MembersRemoveArg : has no documentation (yet) type MembersRemoveArg struct { MembersDeactivateArg // TransferDestId : If provided, files from the deleted member account will // be transferred to this user. TransferDestId *UserSelectorArg `json:"transfer_dest_id,omitempty"` // TransferAdminId : If provided, errors during the transfer process will be // sent via email to this user. If the transfer_dest_id argument was // provided, then this argument must be provided as well. TransferAdminId *UserSelectorArg `json:"transfer_admin_id,omitempty"` // KeepAccount : Downgrade the member to a Basic account. The user will // retain the email address associated with their Dropbox account and data // in their account that is not restricted to team members. In order to keep // the account the argument wipe_data should be set to False. KeepAccount bool `json:"keep_account"` } // NewMembersRemoveArg returns a new MembersRemoveArg instance func NewMembersRemoveArg(User *UserSelectorArg) *MembersRemoveArg { s := new(MembersRemoveArg) s.User = User s.WipeData = true s.KeepAccount = false return s } // MembersTransferFilesError : has no documentation (yet) type MembersTransferFilesError struct { dropbox.Tagged } // Valid tag values for MembersTransferFilesError const ( MembersTransferFilesErrorUserNotFound = "user_not_found" MembersTransferFilesErrorUserNotInTeam = "user_not_in_team" MembersTransferFilesErrorOther = "other" MembersTransferFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ" MembersTransferFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ" MembersTransferFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found" MembersTransferFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team" MembersTransferFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team" MembersTransferFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found" MembersTransferFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id" MembersTransferFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin" MembersTransferFilesErrorRecipientNotVerified = "recipient_not_verified" ) // MembersRemoveError : has no documentation (yet) type MembersRemoveError struct { dropbox.Tagged } // Valid tag values for MembersRemoveError const ( MembersRemoveErrorUserNotFound = "user_not_found" MembersRemoveErrorUserNotInTeam = "user_not_in_team" MembersRemoveErrorOther = "other" MembersRemoveErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ" MembersRemoveErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ" MembersRemoveErrorTransferDestUserNotFound = "transfer_dest_user_not_found" MembersRemoveErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team" MembersRemoveErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team" MembersRemoveErrorTransferAdminUserNotFound = "transfer_admin_user_not_found" MembersRemoveErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id" MembersRemoveErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin" MembersRemoveErrorRecipientNotVerified = "recipient_not_verified" MembersRemoveErrorRemoveLastAdmin = "remove_last_admin" MembersRemoveErrorCannotKeepAccountAndTransfer = "cannot_keep_account_and_transfer" MembersRemoveErrorCannotKeepAccountAndDeleteData = "cannot_keep_account_and_delete_data" MembersRemoveErrorEmailAddressTooLongToBeDisabled = "email_address_too_long_to_be_disabled" MembersRemoveErrorCannotKeepInvitedUserAccount = "cannot_keep_invited_user_account" ) // MembersSendWelcomeError : type MembersSendWelcomeError struct { dropbox.Tagged } // Valid tag values for MembersSendWelcomeError const ( MembersSendWelcomeErrorUserNotFound = "user_not_found" MembersSendWelcomeErrorUserNotInTeam = "user_not_in_team" MembersSendWelcomeErrorOther = "other" ) // MembersSetPermissionsArg : Exactly one of team_member_id, email, or // external_id must be provided to identify the user account. type MembersSetPermissionsArg struct { // User : Identity of user whose role will be set. User *UserSelectorArg `json:"user"` // NewRole : The new role of the member. NewRole *AdminTier `json:"new_role"` } // NewMembersSetPermissionsArg returns a new MembersSetPermissionsArg instance func NewMembersSetPermissionsArg(User *UserSelectorArg, NewRole *AdminTier) *MembersSetPermissionsArg { s := new(MembersSetPermissionsArg) s.User = User s.NewRole = NewRole return s } // MembersSetPermissionsError : has no documentation (yet) type MembersSetPermissionsError struct { dropbox.Tagged } // Valid tag values for MembersSetPermissionsError const ( MembersSetPermissionsErrorUserNotFound = "user_not_found" MembersSetPermissionsErrorLastAdmin = "last_admin" MembersSetPermissionsErrorUserNotInTeam = "user_not_in_team" MembersSetPermissionsErrorCannotSetPermissions = "cannot_set_permissions" MembersSetPermissionsErrorTeamLicenseLimit = "team_license_limit" MembersSetPermissionsErrorOther = "other" ) // MembersSetPermissionsResult : has no documentation (yet) type MembersSetPermissionsResult struct { // TeamMemberId : The member ID of the user to which the change was applied. TeamMemberId string `json:"team_member_id"` // Role : The role after the change. Role *AdminTier `json:"role"` } // NewMembersSetPermissionsResult returns a new MembersSetPermissionsResult instance func NewMembersSetPermissionsResult(TeamMemberId string, Role *AdminTier) *MembersSetPermissionsResult { s := new(MembersSetPermissionsResult) s.TeamMemberId = TeamMemberId s.Role = Role return s } // MembersSetProfileArg : Exactly one of team_member_id, email, or external_id // must be provided to identify the user account. At least one of new_email, // new_external_id, new_given_name, and/or new_surname must be provided. type MembersSetProfileArg struct { // User : Identity of user whose profile will be set. User *UserSelectorArg `json:"user"` // NewEmail : New email for member. NewEmail string `json:"new_email,omitempty"` // NewExternalId : New external ID for member. NewExternalId string `json:"new_external_id,omitempty"` // NewGivenName : New given name for member. NewGivenName string `json:"new_given_name,omitempty"` // NewSurname : New surname for member. NewSurname string `json:"new_surname,omitempty"` // NewPersistentId : New persistent ID. This field only available to teams // using persistent ID SAML configuration. NewPersistentId string `json:"new_persistent_id,omitempty"` // NewIsDirectoryRestricted : New value for whether the user is a directory // restricted user. NewIsDirectoryRestricted bool `json:"new_is_directory_restricted,omitempty"` } // NewMembersSetProfileArg returns a new MembersSetProfileArg instance func NewMembersSetProfileArg(User *UserSelectorArg) *MembersSetProfileArg { s := new(MembersSetProfileArg) s.User = User return s } // MembersSetProfileError : has no documentation (yet) type MembersSetProfileError struct { dropbox.Tagged } // Valid tag values for MembersSetProfileError const ( MembersSetProfileErrorUserNotFound = "user_not_found" MembersSetProfileErrorUserNotInTeam = "user_not_in_team" MembersSetProfileErrorExternalIdAndNewExternalIdUnsafe = "external_id_and_new_external_id_unsafe" MembersSetProfileErrorNoNewDataSpecified = "no_new_data_specified" MembersSetProfileErrorEmailReservedForOtherUser = "email_reserved_for_other_user" MembersSetProfileErrorExternalIdUsedByOtherUser = "external_id_used_by_other_user" MembersSetProfileErrorSetProfileDisallowed = "set_profile_disallowed" MembersSetProfileErrorParamCannotBeEmpty = "param_cannot_be_empty" MembersSetProfileErrorPersistentIdDisabled = "persistent_id_disabled" MembersSetProfileErrorPersistentIdUsedByOtherUser = "persistent_id_used_by_other_user" MembersSetProfileErrorDirectoryRestrictedOff = "directory_restricted_off" MembersSetProfileErrorOther = "other" ) // MembersSuspendError : has no documentation (yet) type MembersSuspendError struct { dropbox.Tagged } // Valid tag values for MembersSuspendError const ( MembersSuspendErrorUserNotFound = "user_not_found" MembersSuspendErrorUserNotInTeam = "user_not_in_team" MembersSuspendErrorOther = "other" MembersSuspendErrorSuspendInactiveUser = "suspend_inactive_user" MembersSuspendErrorSuspendLastAdmin = "suspend_last_admin" MembersSuspendErrorTeamLicenseLimit = "team_license_limit" ) // MembersTransferFormerMembersFilesError : has no documentation (yet) type MembersTransferFormerMembersFilesError struct { dropbox.Tagged } // Valid tag values for MembersTransferFormerMembersFilesError const ( MembersTransferFormerMembersFilesErrorUserNotFound = "user_not_found" MembersTransferFormerMembersFilesErrorUserNotInTeam = "user_not_in_team" MembersTransferFormerMembersFilesErrorOther = "other" MembersTransferFormerMembersFilesErrorRemovedAndTransferDestShouldDiffer = "removed_and_transfer_dest_should_differ" MembersTransferFormerMembersFilesErrorRemovedAndTransferAdminShouldDiffer = "removed_and_transfer_admin_should_differ" MembersTransferFormerMembersFilesErrorTransferDestUserNotFound = "transfer_dest_user_not_found" MembersTransferFormerMembersFilesErrorTransferDestUserNotInTeam = "transfer_dest_user_not_in_team" MembersTransferFormerMembersFilesErrorTransferAdminUserNotInTeam = "transfer_admin_user_not_in_team" MembersTransferFormerMembersFilesErrorTransferAdminUserNotFound = "transfer_admin_user_not_found" MembersTransferFormerMembersFilesErrorUnspecifiedTransferAdminId = "unspecified_transfer_admin_id" MembersTransferFormerMembersFilesErrorTransferAdminIsNotAdmin = "transfer_admin_is_not_admin" MembersTransferFormerMembersFilesErrorRecipientNotVerified = "recipient_not_verified" MembersTransferFormerMembersFilesErrorUserDataIsBeingTransferred = "user_data_is_being_transferred" MembersTransferFormerMembersFilesErrorUserNotRemoved = "user_not_removed" MembersTransferFormerMembersFilesErrorUserDataCannotBeTransferred = "user_data_cannot_be_transferred" MembersTransferFormerMembersFilesErrorUserDataAlreadyTransferred = "user_data_already_transferred" ) // MembersUnsuspendArg : Exactly one of team_member_id, email, or external_id // must be provided to identify the user account. type MembersUnsuspendArg struct { // User : Identity of user to unsuspend. User *UserSelectorArg `json:"user"` } // NewMembersUnsuspendArg returns a new MembersUnsuspendArg instance func NewMembersUnsuspendArg(User *UserSelectorArg) *MembersUnsuspendArg { s := new(MembersUnsuspendArg) s.User = User return s } // MembersUnsuspendError : has no documentation (yet) type MembersUnsuspendError struct { dropbox.Tagged } // Valid tag values for MembersUnsuspendError const ( MembersUnsuspendErrorUserNotFound = "user_not_found" MembersUnsuspendErrorUserNotInTeam = "user_not_in_team" MembersUnsuspendErrorOther = "other" MembersUnsuspendErrorUnsuspendNonSuspendedMember = "unsuspend_non_suspended_member" MembersUnsuspendErrorTeamLicenseLimit = "team_license_limit" ) // MobileClientPlatform : has no documentation (yet) type MobileClientPlatform struct { dropbox.Tagged } // Valid tag values for MobileClientPlatform const ( MobileClientPlatformIphone = "iphone" MobileClientPlatformIpad = "ipad" MobileClientPlatformAndroid = "android" MobileClientPlatformWindowsPhone = "windows_phone" MobileClientPlatformBlackberry = "blackberry" MobileClientPlatformOther = "other" ) // MobileClientSession : Information about linked Dropbox mobile client // sessions. type MobileClientSession struct { DeviceSession // DeviceName : The device name. DeviceName string `json:"device_name"` // ClientType : The mobile application type. ClientType *MobileClientPlatform `json:"client_type"` // ClientVersion : The dropbox client version. ClientVersion string `json:"client_version,omitempty"` // OsVersion : The hosting OS version. OsVersion string `json:"os_version,omitempty"` // LastCarrier : last carrier used by the device. LastCarrier string `json:"last_carrier,omitempty"` } // NewMobileClientSession returns a new MobileClientSession instance func NewMobileClientSession(SessionId string, DeviceName string, ClientType *MobileClientPlatform) *MobileClientSession { s := new(MobileClientSession) s.SessionId = SessionId s.DeviceName = DeviceName s.ClientType = ClientType return s } // NamespaceMetadata : Properties of a namespace. type NamespaceMetadata struct { // Name : The name of this namespace. Name string `json:"name"` // NamespaceId : The ID of this namespace. NamespaceId string `json:"namespace_id"` // NamespaceType : The type of this namespace. NamespaceType *NamespaceType `json:"namespace_type"` // TeamMemberId : If this is a team member or app folder, the ID of the // owning team member. Otherwise, this field is not present. TeamMemberId string `json:"team_member_id,omitempty"` } // NewNamespaceMetadata returns a new NamespaceMetadata instance func NewNamespaceMetadata(Name string, NamespaceId string, NamespaceType *NamespaceType) *NamespaceMetadata { s := new(NamespaceMetadata) s.Name = Name s.NamespaceId = NamespaceId s.NamespaceType = NamespaceType return s } // NamespaceType : has no documentation (yet) type NamespaceType struct { dropbox.Tagged } // Valid tag values for NamespaceType const ( NamespaceTypeAppFolder = "app_folder" NamespaceTypeSharedFolder = "shared_folder" NamespaceTypeTeamFolder = "team_folder" NamespaceTypeTeamMemberFolder = "team_member_folder" NamespaceTypeOther = "other" ) // RemoveCustomQuotaResult : User result for setting member custom quota. type RemoveCustomQuotaResult struct { dropbox.Tagged // Success : Successfully removed user. Success *UserSelectorArg `json:"success,omitempty"` // InvalidUser : Invalid user (not in team). InvalidUser *UserSelectorArg `json:"invalid_user,omitempty"` } // Valid tag values for RemoveCustomQuotaResult const ( RemoveCustomQuotaResultSuccess = "success" RemoveCustomQuotaResultInvalidUser = "invalid_user" RemoveCustomQuotaResultOther = "other" ) // UnmarshalJSON deserializes into a RemoveCustomQuotaResult instance func (u *RemoveCustomQuotaResult) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Success : Successfully removed user. Success json.RawMessage `json:"success,omitempty"` // InvalidUser : Invalid user (not in team). InvalidUser json.RawMessage `json:"invalid_user,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "success": err = json.Unmarshal(w.Success, &u.Success) if err != nil { return err } case "invalid_user": err = json.Unmarshal(w.InvalidUser, &u.InvalidUser) if err != nil { return err } } return nil } // RemovedStatus : has no documentation (yet) type RemovedStatus struct { // IsRecoverable : True if the removed team member is recoverable. IsRecoverable bool `json:"is_recoverable"` // IsDisconnected : True if the team member's account was converted to // individual account. IsDisconnected bool `json:"is_disconnected"` } // NewRemovedStatus returns a new RemovedStatus instance func NewRemovedStatus(IsRecoverable bool, IsDisconnected bool) *RemovedStatus { s := new(RemovedStatus) s.IsRecoverable = IsRecoverable s.IsDisconnected = IsDisconnected return s } // RevokeDesktopClientArg : has no documentation (yet) type RevokeDesktopClientArg struct { DeviceSessionArg // DeleteOnUnlink : Whether to delete all files of the account (this is // possible only if supported by the desktop client and will be made the // next time the client access the account). DeleteOnUnlink bool `json:"delete_on_unlink"` } // NewRevokeDesktopClientArg returns a new RevokeDesktopClientArg instance func NewRevokeDesktopClientArg(SessionId string, TeamMemberId string) *RevokeDesktopClientArg { s := new(RevokeDesktopClientArg) s.SessionId = SessionId s.TeamMemberId = TeamMemberId s.DeleteOnUnlink = false return s } // RevokeDeviceSessionArg : has no documentation (yet) type RevokeDeviceSessionArg struct { dropbox.Tagged // WebSession : End an active session. WebSession *DeviceSessionArg `json:"web_session,omitempty"` // DesktopClient : Unlink a linked desktop device. DesktopClient *RevokeDesktopClientArg `json:"desktop_client,omitempty"` // MobileClient : Unlink a linked mobile device. MobileClient *DeviceSessionArg `json:"mobile_client,omitempty"` } // Valid tag values for RevokeDeviceSessionArg const ( RevokeDeviceSessionArgWebSession = "web_session" RevokeDeviceSessionArgDesktopClient = "desktop_client" RevokeDeviceSessionArgMobileClient = "mobile_client" ) // UnmarshalJSON deserializes into a RevokeDeviceSessionArg instance func (u *RevokeDeviceSessionArg) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // WebSession : End an active session. WebSession json.RawMessage `json:"web_session,omitempty"` // DesktopClient : Unlink a linked desktop device. DesktopClient json.RawMessage `json:"desktop_client,omitempty"` // MobileClient : Unlink a linked mobile device. MobileClient json.RawMessage `json:"mobile_client,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "web_session": err = json.Unmarshal(body, &u.WebSession) if err != nil { return err } case "desktop_client": err = json.Unmarshal(body, &u.DesktopClient) if err != nil { return err } case "mobile_client": err = json.Unmarshal(body, &u.MobileClient) if err != nil { return err } } return nil } // RevokeDeviceSessionBatchArg : has no documentation (yet) type RevokeDeviceSessionBatchArg struct { // RevokeDevices : has no documentation (yet) RevokeDevices []*RevokeDeviceSessionArg `json:"revoke_devices"` } // NewRevokeDeviceSessionBatchArg returns a new RevokeDeviceSessionBatchArg instance func NewRevokeDeviceSessionBatchArg(RevokeDevices []*RevokeDeviceSessionArg) *RevokeDeviceSessionBatchArg { s := new(RevokeDeviceSessionBatchArg) s.RevokeDevices = RevokeDevices return s } // RevokeDeviceSessionBatchError : type RevokeDeviceSessionBatchError struct { dropbox.Tagged } // Valid tag values for RevokeDeviceSessionBatchError const ( RevokeDeviceSessionBatchErrorOther = "other" ) // RevokeDeviceSessionBatchResult : has no documentation (yet) type RevokeDeviceSessionBatchResult struct { // RevokeDevicesStatus : has no documentation (yet) RevokeDevicesStatus []*RevokeDeviceSessionStatus `json:"revoke_devices_status"` } // NewRevokeDeviceSessionBatchResult returns a new RevokeDeviceSessionBatchResult instance func NewRevokeDeviceSessionBatchResult(RevokeDevicesStatus []*RevokeDeviceSessionStatus) *RevokeDeviceSessionBatchResult { s := new(RevokeDeviceSessionBatchResult) s.RevokeDevicesStatus = RevokeDevicesStatus return s } // RevokeDeviceSessionError : has no documentation (yet) type RevokeDeviceSessionError struct { dropbox.Tagged } // Valid tag values for RevokeDeviceSessionError const ( RevokeDeviceSessionErrorDeviceSessionNotFound = "device_session_not_found" RevokeDeviceSessionErrorMemberNotFound = "member_not_found" RevokeDeviceSessionErrorOther = "other" ) // RevokeDeviceSessionStatus : has no documentation (yet) type RevokeDeviceSessionStatus struct { // Success : Result of the revoking request. Success bool `json:"success"` // ErrorType : The error cause in case of a failure. ErrorType *RevokeDeviceSessionError `json:"error_type,omitempty"` } // NewRevokeDeviceSessionStatus returns a new RevokeDeviceSessionStatus instance func NewRevokeDeviceSessionStatus(Success bool) *RevokeDeviceSessionStatus { s := new(RevokeDeviceSessionStatus) s.Success = Success return s } // RevokeLinkedApiAppArg : has no documentation (yet) type RevokeLinkedApiAppArg struct { // AppId : The application's unique id. AppId string `json:"app_id"` // TeamMemberId : The unique id of the member owning the device. TeamMemberId string `json:"team_member_id"` // KeepAppFolder : Whether to keep the application dedicated folder (in case // the application uses one). KeepAppFolder bool `json:"keep_app_folder"` } // NewRevokeLinkedApiAppArg returns a new RevokeLinkedApiAppArg instance func NewRevokeLinkedApiAppArg(AppId string, TeamMemberId string) *RevokeLinkedApiAppArg { s := new(RevokeLinkedApiAppArg) s.AppId = AppId s.TeamMemberId = TeamMemberId s.KeepAppFolder = true return s } // RevokeLinkedApiAppBatchArg : has no documentation (yet) type RevokeLinkedApiAppBatchArg struct { // RevokeLinkedApp : has no documentation (yet) RevokeLinkedApp []*RevokeLinkedApiAppArg `json:"revoke_linked_app"` } // NewRevokeLinkedApiAppBatchArg returns a new RevokeLinkedApiAppBatchArg instance func NewRevokeLinkedApiAppBatchArg(RevokeLinkedApp []*RevokeLinkedApiAppArg) *RevokeLinkedApiAppBatchArg { s := new(RevokeLinkedApiAppBatchArg) s.RevokeLinkedApp = RevokeLinkedApp return s } // RevokeLinkedAppBatchError : Error returned by // `linkedAppsRevokeLinkedAppBatch`. type RevokeLinkedAppBatchError struct { dropbox.Tagged } // Valid tag values for RevokeLinkedAppBatchError const ( RevokeLinkedAppBatchErrorOther = "other" ) // RevokeLinkedAppBatchResult : has no documentation (yet) type RevokeLinkedAppBatchResult struct { // RevokeLinkedAppStatus : has no documentation (yet) RevokeLinkedAppStatus []*RevokeLinkedAppStatus `json:"revoke_linked_app_status"` } // NewRevokeLinkedAppBatchResult returns a new RevokeLinkedAppBatchResult instance func NewRevokeLinkedAppBatchResult(RevokeLinkedAppStatus []*RevokeLinkedAppStatus) *RevokeLinkedAppBatchResult { s := new(RevokeLinkedAppBatchResult) s.RevokeLinkedAppStatus = RevokeLinkedAppStatus return s } // RevokeLinkedAppError : Error returned by `linkedAppsRevokeLinkedApp`. type RevokeLinkedAppError struct { dropbox.Tagged } // Valid tag values for RevokeLinkedAppError const ( RevokeLinkedAppErrorAppNotFound = "app_not_found" RevokeLinkedAppErrorMemberNotFound = "member_not_found" RevokeLinkedAppErrorOther = "other" ) // RevokeLinkedAppStatus : has no documentation (yet) type RevokeLinkedAppStatus struct { // Success : Result of the revoking request. Success bool `json:"success"` // ErrorType : The error cause in case of a failure. ErrorType *RevokeLinkedAppError `json:"error_type,omitempty"` } // NewRevokeLinkedAppStatus returns a new RevokeLinkedAppStatus instance func NewRevokeLinkedAppStatus(Success bool) *RevokeLinkedAppStatus { s := new(RevokeLinkedAppStatus) s.Success = Success return s } // SetCustomQuotaArg : has no documentation (yet) type SetCustomQuotaArg struct { // UsersAndQuotas : List of users and their custom quotas. UsersAndQuotas []*UserCustomQuotaArg `json:"users_and_quotas"` } // NewSetCustomQuotaArg returns a new SetCustomQuotaArg instance func NewSetCustomQuotaArg(UsersAndQuotas []*UserCustomQuotaArg) *SetCustomQuotaArg { s := new(SetCustomQuotaArg) s.UsersAndQuotas = UsersAndQuotas return s } // SetCustomQuotaError : Error returned when setting member custom quota. type SetCustomQuotaError struct { dropbox.Tagged } // Valid tag values for SetCustomQuotaError const ( SetCustomQuotaErrorTooManyUsers = "too_many_users" SetCustomQuotaErrorOther = "other" SetCustomQuotaErrorSomeUsersAreExcluded = "some_users_are_excluded" ) // StorageBucket : Describes the number of users in a specific storage bucket. type StorageBucket struct { // Bucket : The name of the storage bucket. For example, '1G' is a bucket of // users with storage size up to 1 Giga. Bucket string `json:"bucket"` // Users : The number of people whose storage is in the range of this // storage bucket. Users uint64 `json:"users"` } // NewStorageBucket returns a new StorageBucket instance func NewStorageBucket(Bucket string, Users uint64) *StorageBucket { s := new(StorageBucket) s.Bucket = Bucket s.Users = Users return s } // TeamFolderAccessError : has no documentation (yet) type TeamFolderAccessError struct { dropbox.Tagged } // Valid tag values for TeamFolderAccessError const ( TeamFolderAccessErrorInvalidTeamFolderId = "invalid_team_folder_id" TeamFolderAccessErrorNoAccess = "no_access" TeamFolderAccessErrorOther = "other" ) // TeamFolderActivateError : type TeamFolderActivateError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` } // Valid tag values for TeamFolderActivateError const ( TeamFolderActivateErrorAccessError = "access_error" TeamFolderActivateErrorStatusError = "status_error" TeamFolderActivateErrorTeamSharedDropboxError = "team_shared_dropbox_error" TeamFolderActivateErrorOther = "other" ) // UnmarshalJSON deserializes into a TeamFolderActivateError instance func (u *TeamFolderActivateError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } } return nil } // TeamFolderIdArg : has no documentation (yet) type TeamFolderIdArg struct { // TeamFolderId : The ID of the team folder. TeamFolderId string `json:"team_folder_id"` } // NewTeamFolderIdArg returns a new TeamFolderIdArg instance func NewTeamFolderIdArg(TeamFolderId string) *TeamFolderIdArg { s := new(TeamFolderIdArg) s.TeamFolderId = TeamFolderId return s } // TeamFolderArchiveArg : has no documentation (yet) type TeamFolderArchiveArg struct { TeamFolderIdArg // ForceAsyncOff : Whether to force the archive to happen synchronously. ForceAsyncOff bool `json:"force_async_off"` } // NewTeamFolderArchiveArg returns a new TeamFolderArchiveArg instance func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg { s := new(TeamFolderArchiveArg) s.TeamFolderId = TeamFolderId s.ForceAsyncOff = false return s } // TeamFolderArchiveError : type TeamFolderArchiveError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` } // Valid tag values for TeamFolderArchiveError const ( TeamFolderArchiveErrorAccessError = "access_error" TeamFolderArchiveErrorStatusError = "status_error" TeamFolderArchiveErrorTeamSharedDropboxError = "team_shared_dropbox_error" TeamFolderArchiveErrorOther = "other" ) // UnmarshalJSON deserializes into a TeamFolderArchiveError instance func (u *TeamFolderArchiveError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } } return nil } // TeamFolderArchiveJobStatus : has no documentation (yet) type TeamFolderArchiveJobStatus struct { dropbox.Tagged // Complete : The archive job has finished. The value is the metadata for // the resulting team folder. Complete *TeamFolderMetadata `json:"complete,omitempty"` // Failed : Error occurred while performing an asynchronous job from // `teamFolderArchive`. Failed *TeamFolderArchiveError `json:"failed,omitempty"` } // Valid tag values for TeamFolderArchiveJobStatus const ( TeamFolderArchiveJobStatusInProgress = "in_progress" TeamFolderArchiveJobStatusComplete = "complete" TeamFolderArchiveJobStatusFailed = "failed" ) // UnmarshalJSON deserializes into a TeamFolderArchiveJobStatus instance func (u *TeamFolderArchiveJobStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : The archive job has finished. The value is the metadata // for the resulting team folder. Complete json.RawMessage `json:"complete,omitempty"` // Failed : Error occurred while performing an asynchronous job from // `teamFolderArchive`. Failed json.RawMessage `json:"failed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } case "failed": err = json.Unmarshal(w.Failed, &u.Failed) if err != nil { return err } } return nil } // TeamFolderArchiveLaunch : has no documentation (yet) type TeamFolderArchiveLaunch struct { dropbox.Tagged // AsyncJobId : This response indicates that the processing is asynchronous. // The string is an id that can be used to obtain the status of the // asynchronous job. AsyncJobId string `json:"async_job_id,omitempty"` // Complete : has no documentation (yet) Complete *TeamFolderMetadata `json:"complete,omitempty"` } // Valid tag values for TeamFolderArchiveLaunch const ( TeamFolderArchiveLaunchAsyncJobId = "async_job_id" TeamFolderArchiveLaunchComplete = "complete" ) // UnmarshalJSON deserializes into a TeamFolderArchiveLaunch instance func (u *TeamFolderArchiveLaunch) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Complete : has no documentation (yet) Complete json.RawMessage `json:"complete,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "async_job_id": err = json.Unmarshal(body, &u.AsyncJobId) if err != nil { return err } case "complete": err = json.Unmarshal(body, &u.Complete) if err != nil { return err } } return nil } // TeamFolderCreateArg : has no documentation (yet) type TeamFolderCreateArg struct { // Name : Name for the new team folder. Name string `json:"name"` // SyncSetting : The sync setting to apply to this team folder. Only // permitted if the team has team selective sync enabled. SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"` } // NewTeamFolderCreateArg returns a new TeamFolderCreateArg instance func NewTeamFolderCreateArg(Name string) *TeamFolderCreateArg { s := new(TeamFolderCreateArg) s.Name = Name return s } // TeamFolderCreateError : has no documentation (yet) type TeamFolderCreateError struct { dropbox.Tagged // SyncSettingsError : An error occurred setting the sync settings. SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"` } // Valid tag values for TeamFolderCreateError const ( TeamFolderCreateErrorInvalidFolderName = "invalid_folder_name" TeamFolderCreateErrorFolderNameAlreadyUsed = "folder_name_already_used" TeamFolderCreateErrorFolderNameReserved = "folder_name_reserved" TeamFolderCreateErrorSyncSettingsError = "sync_settings_error" TeamFolderCreateErrorOther = "other" ) // UnmarshalJSON deserializes into a TeamFolderCreateError instance func (u *TeamFolderCreateError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // SyncSettingsError : An error occurred setting the sync settings. SyncSettingsError json.RawMessage `json:"sync_settings_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "sync_settings_error": err = json.Unmarshal(w.SyncSettingsError, &u.SyncSettingsError) if err != nil { return err } } return nil } // TeamFolderGetInfoItem : has no documentation (yet) type TeamFolderGetInfoItem struct { dropbox.Tagged // IdNotFound : An ID that was provided as a parameter to // `teamFolderGetInfo` did not match any of the team's team folders. IdNotFound string `json:"id_not_found,omitempty"` // TeamFolderMetadata : Properties of a team folder. TeamFolderMetadata *TeamFolderMetadata `json:"team_folder_metadata,omitempty"` } // Valid tag values for TeamFolderGetInfoItem const ( TeamFolderGetInfoItemIdNotFound = "id_not_found" TeamFolderGetInfoItemTeamFolderMetadata = "team_folder_metadata" ) // UnmarshalJSON deserializes into a TeamFolderGetInfoItem instance func (u *TeamFolderGetInfoItem) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // TeamFolderMetadata : Properties of a team folder. TeamFolderMetadata json.RawMessage `json:"team_folder_metadata,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "id_not_found": err = json.Unmarshal(body, &u.IdNotFound) if err != nil { return err } case "team_folder_metadata": err = json.Unmarshal(body, &u.TeamFolderMetadata) if err != nil { return err } } return nil } // TeamFolderIdListArg : has no documentation (yet) type TeamFolderIdListArg struct { // TeamFolderIds : The list of team folder IDs. TeamFolderIds []string `json:"team_folder_ids"` } // NewTeamFolderIdListArg returns a new TeamFolderIdListArg instance func NewTeamFolderIdListArg(TeamFolderIds []string) *TeamFolderIdListArg { s := new(TeamFolderIdListArg) s.TeamFolderIds = TeamFolderIds return s } // TeamFolderInvalidStatusError : has no documentation (yet) type TeamFolderInvalidStatusError struct { dropbox.Tagged } // Valid tag values for TeamFolderInvalidStatusError const ( TeamFolderInvalidStatusErrorActive = "active" TeamFolderInvalidStatusErrorArchived = "archived" TeamFolderInvalidStatusErrorArchiveInProgress = "archive_in_progress" TeamFolderInvalidStatusErrorOther = "other" ) // TeamFolderListArg : has no documentation (yet) type TeamFolderListArg struct { // Limit : The maximum number of results to return per request. Limit uint32 `json:"limit"` } // NewTeamFolderListArg returns a new TeamFolderListArg instance func NewTeamFolderListArg() *TeamFolderListArg { s := new(TeamFolderListArg) s.Limit = 1000 return s } // TeamFolderListContinueArg : has no documentation (yet) type TeamFolderListContinueArg struct { // Cursor : Indicates from what point to get the next set of team folders. Cursor string `json:"cursor"` } // NewTeamFolderListContinueArg returns a new TeamFolderListContinueArg instance func NewTeamFolderListContinueArg(Cursor string) *TeamFolderListContinueArg { s := new(TeamFolderListContinueArg) s.Cursor = Cursor return s } // TeamFolderListContinueError : has no documentation (yet) type TeamFolderListContinueError struct { dropbox.Tagged } // Valid tag values for TeamFolderListContinueError const ( TeamFolderListContinueErrorInvalidCursor = "invalid_cursor" TeamFolderListContinueErrorOther = "other" ) // TeamFolderListError : has no documentation (yet) type TeamFolderListError struct { // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error"` } // NewTeamFolderListError returns a new TeamFolderListError instance func NewTeamFolderListError(AccessError *TeamFolderAccessError) *TeamFolderListError { s := new(TeamFolderListError) s.AccessError = AccessError return s } // TeamFolderListResult : Result for `teamFolderList` and // `teamFolderListContinue`. type TeamFolderListResult struct { // TeamFolders : List of all team folders in the authenticated team. TeamFolders []*TeamFolderMetadata `json:"team_folders"` // Cursor : Pass the cursor into `teamFolderListContinue` to obtain // additional team folders. Cursor string `json:"cursor"` // HasMore : Is true if there are additional team folders that have not been // returned yet. An additional call to `teamFolderListContinue` can retrieve // them. HasMore bool `json:"has_more"` } // NewTeamFolderListResult returns a new TeamFolderListResult instance func NewTeamFolderListResult(TeamFolders []*TeamFolderMetadata, Cursor string, HasMore bool) *TeamFolderListResult { s := new(TeamFolderListResult) s.TeamFolders = TeamFolders s.Cursor = Cursor s.HasMore = HasMore return s } // TeamFolderMetadata : Properties of a team folder. type TeamFolderMetadata struct { // TeamFolderId : The ID of the team folder. TeamFolderId string `json:"team_folder_id"` // Name : The name of the team folder. Name string `json:"name"` // Status : The status of the team folder. Status *TeamFolderStatus `json:"status"` // IsTeamSharedDropbox : True if this team folder is a shared team root. IsTeamSharedDropbox bool `json:"is_team_shared_dropbox"` // SyncSetting : The sync setting applied to this team folder. SyncSetting *files.SyncSetting `json:"sync_setting"` // ContentSyncSettings : Sync settings applied to contents of this team // folder. ContentSyncSettings []*files.ContentSyncSetting `json:"content_sync_settings"` } // NewTeamFolderMetadata returns a new TeamFolderMetadata instance func NewTeamFolderMetadata(TeamFolderId string, Name string, Status *TeamFolderStatus, IsTeamSharedDropbox bool, SyncSetting *files.SyncSetting, ContentSyncSettings []*files.ContentSyncSetting) *TeamFolderMetadata { s := new(TeamFolderMetadata) s.TeamFolderId = TeamFolderId s.Name = Name s.Status = Status s.IsTeamSharedDropbox = IsTeamSharedDropbox s.SyncSetting = SyncSetting s.ContentSyncSettings = ContentSyncSettings return s } // TeamFolderPermanentlyDeleteError : type TeamFolderPermanentlyDeleteError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` } // Valid tag values for TeamFolderPermanentlyDeleteError const ( TeamFolderPermanentlyDeleteErrorAccessError = "access_error" TeamFolderPermanentlyDeleteErrorStatusError = "status_error" TeamFolderPermanentlyDeleteErrorTeamSharedDropboxError = "team_shared_dropbox_error" TeamFolderPermanentlyDeleteErrorOther = "other" ) // UnmarshalJSON deserializes into a TeamFolderPermanentlyDeleteError instance func (u *TeamFolderPermanentlyDeleteError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } } return nil } // TeamFolderRenameArg : has no documentation (yet) type TeamFolderRenameArg struct { TeamFolderIdArg // Name : New team folder name. Name string `json:"name"` } // NewTeamFolderRenameArg returns a new TeamFolderRenameArg instance func NewTeamFolderRenameArg(TeamFolderId string, Name string) *TeamFolderRenameArg { s := new(TeamFolderRenameArg) s.TeamFolderId = TeamFolderId s.Name = Name return s } // TeamFolderRenameError : has no documentation (yet) type TeamFolderRenameError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` } // Valid tag values for TeamFolderRenameError const ( TeamFolderRenameErrorAccessError = "access_error" TeamFolderRenameErrorStatusError = "status_error" TeamFolderRenameErrorTeamSharedDropboxError = "team_shared_dropbox_error" TeamFolderRenameErrorOther = "other" TeamFolderRenameErrorInvalidFolderName = "invalid_folder_name" TeamFolderRenameErrorFolderNameAlreadyUsed = "folder_name_already_used" TeamFolderRenameErrorFolderNameReserved = "folder_name_reserved" ) // UnmarshalJSON deserializes into a TeamFolderRenameError instance func (u *TeamFolderRenameError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } } return nil } // TeamFolderStatus : has no documentation (yet) type TeamFolderStatus struct { dropbox.Tagged } // Valid tag values for TeamFolderStatus const ( TeamFolderStatusActive = "active" TeamFolderStatusArchived = "archived" TeamFolderStatusArchiveInProgress = "archive_in_progress" TeamFolderStatusOther = "other" ) // TeamFolderTeamSharedDropboxError : has no documentation (yet) type TeamFolderTeamSharedDropboxError struct { dropbox.Tagged } // Valid tag values for TeamFolderTeamSharedDropboxError const ( TeamFolderTeamSharedDropboxErrorDisallowed = "disallowed" TeamFolderTeamSharedDropboxErrorOther = "other" ) // TeamFolderUpdateSyncSettingsArg : has no documentation (yet) type TeamFolderUpdateSyncSettingsArg struct { TeamFolderIdArg // SyncSetting : Sync setting to apply to the team folder itself. Only // meaningful if the team folder is not a shared team root. SyncSetting *files.SyncSettingArg `json:"sync_setting,omitempty"` // ContentSyncSettings : Sync settings to apply to contents of this team // folder. ContentSyncSettings []*files.ContentSyncSettingArg `json:"content_sync_settings,omitempty"` } // NewTeamFolderUpdateSyncSettingsArg returns a new TeamFolderUpdateSyncSettingsArg instance func NewTeamFolderUpdateSyncSettingsArg(TeamFolderId string) *TeamFolderUpdateSyncSettingsArg { s := new(TeamFolderUpdateSyncSettingsArg) s.TeamFolderId = TeamFolderId return s } // TeamFolderUpdateSyncSettingsError : has no documentation (yet) type TeamFolderUpdateSyncSettingsError struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError *TeamFolderAccessError `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError *TeamFolderInvalidStatusError `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError *TeamFolderTeamSharedDropboxError `json:"team_shared_dropbox_error,omitempty"` // SyncSettingsError : An error occurred setting the sync settings. SyncSettingsError *files.SyncSettingsError `json:"sync_settings_error,omitempty"` } // Valid tag values for TeamFolderUpdateSyncSettingsError const ( TeamFolderUpdateSyncSettingsErrorAccessError = "access_error" TeamFolderUpdateSyncSettingsErrorStatusError = "status_error" TeamFolderUpdateSyncSettingsErrorTeamSharedDropboxError = "team_shared_dropbox_error" TeamFolderUpdateSyncSettingsErrorOther = "other" TeamFolderUpdateSyncSettingsErrorSyncSettingsError = "sync_settings_error" ) // UnmarshalJSON deserializes into a TeamFolderUpdateSyncSettingsError instance func (u *TeamFolderUpdateSyncSettingsError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AccessError : has no documentation (yet) AccessError json.RawMessage `json:"access_error,omitempty"` // StatusError : has no documentation (yet) StatusError json.RawMessage `json:"status_error,omitempty"` // TeamSharedDropboxError : has no documentation (yet) TeamSharedDropboxError json.RawMessage `json:"team_shared_dropbox_error,omitempty"` // SyncSettingsError : An error occurred setting the sync settings. SyncSettingsError json.RawMessage `json:"sync_settings_error,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "access_error": err = json.Unmarshal(w.AccessError, &u.AccessError) if err != nil { return err } case "status_error": err = json.Unmarshal(w.StatusError, &u.StatusError) if err != nil { return err } case "team_shared_dropbox_error": err = json.Unmarshal(w.TeamSharedDropboxError, &u.TeamSharedDropboxError) if err != nil { return err } case "sync_settings_error": err = json.Unmarshal(w.SyncSettingsError, &u.SyncSettingsError) if err != nil { return err } } return nil } // TeamGetInfoResult : has no documentation (yet) type TeamGetInfoResult struct { // Name : The name of the team. Name string `json:"name"` // TeamId : The ID of the team. TeamId string `json:"team_id"` // NumLicensedUsers : The number of licenses available to the team. NumLicensedUsers uint32 `json:"num_licensed_users"` // NumProvisionedUsers : The number of accounts that have been invited or // are already active members of the team. NumProvisionedUsers uint32 `json:"num_provisioned_users"` // Policies : has no documentation (yet) Policies *team_policies.TeamMemberPolicies `json:"policies"` } // NewTeamGetInfoResult returns a new TeamGetInfoResult instance func NewTeamGetInfoResult(Name string, TeamId string, NumLicensedUsers uint32, NumProvisionedUsers uint32, Policies *team_policies.TeamMemberPolicies) *TeamGetInfoResult { s := new(TeamGetInfoResult) s.Name = Name s.TeamId = TeamId s.NumLicensedUsers = NumLicensedUsers s.NumProvisionedUsers = NumProvisionedUsers s.Policies = Policies return s } // TeamMemberInfo : Information about a team member. type TeamMemberInfo struct { // Profile : Profile of a user as a member of a team. Profile *TeamMemberProfile `json:"profile"` // Role : The user's role in the team. Role *AdminTier `json:"role"` } // NewTeamMemberInfo returns a new TeamMemberInfo instance func NewTeamMemberInfo(Profile *TeamMemberProfile, Role *AdminTier) *TeamMemberInfo { s := new(TeamMemberInfo) s.Profile = Profile s.Role = Role return s } // TeamMemberProfile : Profile of a user as a member of a team. type TeamMemberProfile struct { MemberProfile // Groups : List of group IDs of groups that the user belongs to. Groups []string `json:"groups"` // MemberFolderId : The namespace id of the user's root folder. MemberFolderId string `json:"member_folder_id"` } // NewTeamMemberProfile returns a new TeamMemberProfile instance func NewTeamMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType, Groups []string, MemberFolderId string) *TeamMemberProfile { s := new(TeamMemberProfile) s.TeamMemberId = TeamMemberId s.Email = Email s.EmailVerified = EmailVerified s.Status = Status s.Name = Name s.MembershipType = MembershipType s.Groups = Groups s.MemberFolderId = MemberFolderId return s } // TeamMemberStatus : The user's status as a member of a specific team. type TeamMemberStatus struct { dropbox.Tagged // Removed : User is no longer a member of the team. Removed users are only // listed when include_removed is true in members/list. Removed *RemovedStatus `json:"removed,omitempty"` } // Valid tag values for TeamMemberStatus const ( TeamMemberStatusActive = "active" TeamMemberStatusInvited = "invited" TeamMemberStatusSuspended = "suspended" TeamMemberStatusRemoved = "removed" ) // UnmarshalJSON deserializes into a TeamMemberStatus instance func (u *TeamMemberStatus) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Removed : User is no longer a member of the team. Removed users are // only listed when include_removed is true in members/list. Removed json.RawMessage `json:"removed,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "removed": err = json.Unmarshal(body, &u.Removed) if err != nil { return err } } return nil } // TeamMembershipType : has no documentation (yet) type TeamMembershipType struct { dropbox.Tagged } // Valid tag values for TeamMembershipType const ( TeamMembershipTypeFull = "full" TeamMembershipTypeLimited = "limited" ) // TeamNamespacesListArg : has no documentation (yet) type TeamNamespacesListArg struct { // Limit : Specifying a value here has no effect. Limit uint32 `json:"limit"` } // NewTeamNamespacesListArg returns a new TeamNamespacesListArg instance func NewTeamNamespacesListArg() *TeamNamespacesListArg { s := new(TeamNamespacesListArg) s.Limit = 1000 return s } // TeamNamespacesListContinueArg : has no documentation (yet) type TeamNamespacesListContinueArg struct { // Cursor : Indicates from what point to get the next set of team-accessible // namespaces. Cursor string `json:"cursor"` } // NewTeamNamespacesListContinueArg returns a new TeamNamespacesListContinueArg instance func NewTeamNamespacesListContinueArg(Cursor string) *TeamNamespacesListContinueArg { s := new(TeamNamespacesListContinueArg) s.Cursor = Cursor return s } // TeamNamespacesListError : has no documentation (yet) type TeamNamespacesListError struct { dropbox.Tagged } // Valid tag values for TeamNamespacesListError const ( TeamNamespacesListErrorInvalidArg = "invalid_arg" TeamNamespacesListErrorOther = "other" ) // TeamNamespacesListContinueError : has no documentation (yet) type TeamNamespacesListContinueError struct { dropbox.Tagged } // Valid tag values for TeamNamespacesListContinueError const ( TeamNamespacesListContinueErrorInvalidArg = "invalid_arg" TeamNamespacesListContinueErrorOther = "other" TeamNamespacesListContinueErrorInvalidCursor = "invalid_cursor" ) // TeamNamespacesListResult : Result for `namespacesList`. type TeamNamespacesListResult struct { // Namespaces : List of all namespaces the team can access. Namespaces []*NamespaceMetadata `json:"namespaces"` // Cursor : Pass the cursor into `namespacesListContinue` to obtain // additional namespaces. Note that duplicate namespaces may be returned. Cursor string `json:"cursor"` // HasMore : Is true if there are additional namespaces that have not been // returned yet. HasMore bool `json:"has_more"` } // NewTeamNamespacesListResult returns a new TeamNamespacesListResult instance func NewTeamNamespacesListResult(Namespaces []*NamespaceMetadata, Cursor string, HasMore bool) *TeamNamespacesListResult { s := new(TeamNamespacesListResult) s.Namespaces = Namespaces s.Cursor = Cursor s.HasMore = HasMore return s } // TokenGetAuthenticatedAdminError : Error returned by // `tokenGetAuthenticatedAdmin`. type TokenGetAuthenticatedAdminError struct { dropbox.Tagged } // Valid tag values for TokenGetAuthenticatedAdminError const ( TokenGetAuthenticatedAdminErrorMappingNotFound = "mapping_not_found" TokenGetAuthenticatedAdminErrorAdminNotActive = "admin_not_active" TokenGetAuthenticatedAdminErrorOther = "other" ) // TokenGetAuthenticatedAdminResult : Results for `tokenGetAuthenticatedAdmin`. type TokenGetAuthenticatedAdminResult struct { // AdminProfile : The admin who authorized the token. AdminProfile *TeamMemberProfile `json:"admin_profile"` } // NewTokenGetAuthenticatedAdminResult returns a new TokenGetAuthenticatedAdminResult instance func NewTokenGetAuthenticatedAdminResult(AdminProfile *TeamMemberProfile) *TokenGetAuthenticatedAdminResult { s := new(TokenGetAuthenticatedAdminResult) s.AdminProfile = AdminProfile return s } // UploadApiRateLimitValue : The value for `Feature.upload_api_rate_limit`. type UploadApiRateLimitValue struct { dropbox.Tagged // Limit : The number of upload API calls allowed per month. Limit uint32 `json:"limit,omitempty"` } // Valid tag values for UploadApiRateLimitValue const ( UploadApiRateLimitValueUnlimited = "unlimited" UploadApiRateLimitValueLimit = "limit" UploadApiRateLimitValueOther = "other" ) // UnmarshalJSON deserializes into a UploadApiRateLimitValue instance func (u *UploadApiRateLimitValue) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "limit": err = json.Unmarshal(body, &u.Limit) if err != nil { return err } } return nil } // UserCustomQuotaArg : User and their required custom quota in GB (1 TB = 1024 // GB). type UserCustomQuotaArg struct { // User : has no documentation (yet) User *UserSelectorArg `json:"user"` // QuotaGb : has no documentation (yet) QuotaGb uint32 `json:"quota_gb"` } // NewUserCustomQuotaArg returns a new UserCustomQuotaArg instance func NewUserCustomQuotaArg(User *UserSelectorArg, QuotaGb uint32) *UserCustomQuotaArg { s := new(UserCustomQuotaArg) s.User = User s.QuotaGb = QuotaGb return s } // UserCustomQuotaResult : User and their custom quota in GB (1 TB = 1024 GB). // No quota returns if the user has no custom quota set. type UserCustomQuotaResult struct { // User : has no documentation (yet) User *UserSelectorArg `json:"user"` // QuotaGb : has no documentation (yet) QuotaGb uint32 `json:"quota_gb,omitempty"` } // NewUserCustomQuotaResult returns a new UserCustomQuotaResult instance func NewUserCustomQuotaResult(User *UserSelectorArg) *UserCustomQuotaResult { s := new(UserCustomQuotaResult) s.User = User return s } // UserSelectorArg : Argument for selecting a single user, either by // team_member_id, external_id or email. type UserSelectorArg struct { dropbox.Tagged // TeamMemberId : has no documentation (yet) TeamMemberId string `json:"team_member_id,omitempty"` // ExternalId : has no documentation (yet) ExternalId string `json:"external_id,omitempty"` // Email : has no documentation (yet) Email string `json:"email,omitempty"` } // Valid tag values for UserSelectorArg const ( UserSelectorArgTeamMemberId = "team_member_id" UserSelectorArgExternalId = "external_id" UserSelectorArgEmail = "email" ) // UnmarshalJSON deserializes into a UserSelectorArg instance func (u *UserSelectorArg) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team_member_id": err = json.Unmarshal(body, &u.TeamMemberId) if err != nil { return err } case "external_id": err = json.Unmarshal(body, &u.ExternalId) if err != nil { return err } case "email": err = json.Unmarshal(body, &u.Email) if err != nil { return err } } return nil } // UsersSelectorArg : Argument for selecting a list of users, either by // team_member_ids, external_ids or emails. type UsersSelectorArg struct { dropbox.Tagged // TeamMemberIds : List of member IDs. TeamMemberIds []string `json:"team_member_ids,omitempty"` // ExternalIds : List of external user IDs. ExternalIds []string `json:"external_ids,omitempty"` // Emails : List of email addresses. Emails []string `json:"emails,omitempty"` } // Valid tag values for UsersSelectorArg const ( UsersSelectorArgTeamMemberIds = "team_member_ids" UsersSelectorArgExternalIds = "external_ids" UsersSelectorArgEmails = "emails" ) // UnmarshalJSON deserializes into a UsersSelectorArg instance func (u *UsersSelectorArg) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // TeamMemberIds : List of member IDs. TeamMemberIds json.RawMessage `json:"team_member_ids,omitempty"` // ExternalIds : List of external user IDs. ExternalIds json.RawMessage `json:"external_ids,omitempty"` // Emails : List of email addresses. Emails json.RawMessage `json:"emails,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team_member_ids": err = json.Unmarshal(body, &u.TeamMemberIds) if err != nil { return err } case "external_ids": err = json.Unmarshal(body, &u.ExternalIds) if err != nil { return err } case "emails": err = json.Unmarshal(body, &u.Emails) if err != nil { return err } } return nil } dropbox-sdk-go-unofficial-5.4.0/dropbox/team_common/000077500000000000000000000000001340753361200224535ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/team_common/types.go000066400000000000000000000067731340753361200241630ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package team_common : has no documentation (yet) package team_common import ( "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" ) // GroupManagementType : The group type determines how a group is managed. type GroupManagementType struct { dropbox.Tagged } // Valid tag values for GroupManagementType const ( GroupManagementTypeUserManaged = "user_managed" GroupManagementTypeCompanyManaged = "company_managed" GroupManagementTypeSystemManaged = "system_managed" GroupManagementTypeOther = "other" ) // GroupSummary : Information about a group. type GroupSummary struct { // GroupName : has no documentation (yet) GroupName string `json:"group_name"` // GroupId : has no documentation (yet) GroupId string `json:"group_id"` // GroupExternalId : External ID of group. This is an arbitrary ID that an // admin can attach to a group. GroupExternalId string `json:"group_external_id,omitempty"` // MemberCount : The number of members in the group. MemberCount uint32 `json:"member_count,omitempty"` // GroupManagementType : Who is allowed to manage the group. GroupManagementType *GroupManagementType `json:"group_management_type"` } // NewGroupSummary returns a new GroupSummary instance func NewGroupSummary(GroupName string, GroupId string, GroupManagementType *GroupManagementType) *GroupSummary { s := new(GroupSummary) s.GroupName = GroupName s.GroupId = GroupId s.GroupManagementType = GroupManagementType return s } // GroupType : The group type determines how a group is created and managed. type GroupType struct { dropbox.Tagged } // Valid tag values for GroupType const ( GroupTypeTeam = "team" GroupTypeUserManaged = "user_managed" GroupTypeOther = "other" ) // MemberSpaceLimitType : The type of the space limit imposed on a team member. type MemberSpaceLimitType struct { dropbox.Tagged } // Valid tag values for MemberSpaceLimitType const ( MemberSpaceLimitTypeOff = "off" MemberSpaceLimitTypeAlertOnly = "alert_only" MemberSpaceLimitTypeStopSync = "stop_sync" MemberSpaceLimitTypeOther = "other" ) // TimeRange : Time range. type TimeRange struct { // StartTime : Optional starting time (inclusive). StartTime time.Time `json:"start_time,omitempty"` // EndTime : Optional ending time (exclusive). EndTime time.Time `json:"end_time,omitempty"` } // NewTimeRange returns a new TimeRange instance func NewTimeRange() *TimeRange { s := new(TimeRange) return s } dropbox-sdk-go-unofficial-5.4.0/dropbox/team_log/000077500000000000000000000000001340753361200217445ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/team_log/client.go000066400000000000000000000117631340753361200235610ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package team_log import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // GetEvents : Retrieves team events. Events have a lifespan of two years. // Events older than two years will not be returned. Many attributes note // 'may be missing due to historical data gap'. Note that the // file_operations category and & analogous paper events are not available // on all Dropbox Business `plans` . Use // `features/get_values` // to check // for this feature. Permission : Team Auditing. GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) // GetEventsContinue : Once a cursor has been retrieved from `getEvents`, // use this to paginate through all events. Permission : Team Auditing. GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) } type apiImpl dropbox.Context //GetEventsAPIError is an error-wrapper for the get_events route type GetEventsAPIError struct { dropbox.APIError EndpointError *GetTeamEventsError `json:"error"` } func (dbx *apiImpl) GetEvents(arg *GetTeamEventsArg) (res *GetTeamEventsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team_log", "get_events", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetEventsAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetEventsContinueAPIError is an error-wrapper for the get_events/continue route type GetEventsContinueAPIError struct { dropbox.APIError EndpointError *GetTeamEventsContinueError `json:"error"` } func (dbx *apiImpl) GetEventsContinue(arg *GetTeamEventsContinueArg) (res *GetTeamEventsResult, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "team_log", "get_events/continue", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetEventsContinueAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/team_log/types.go000066400000000000000000026205101340753361200234450ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package team_log : has no documentation (yet) package team_log import ( "encoding/json" "time" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/sharing" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies" ) // AccessMethodLogInfo : Indicates the method in which the action was performed. type AccessMethodLogInfo struct { dropbox.Tagged // EndUser : End user session details. EndUser IsSessionLogInfo `json:"end_user,omitempty"` // SignInAs : Sign in as session details. SignInAs *WebSessionLogInfo `json:"sign_in_as,omitempty"` // ContentManager : Content manager session details. ContentManager *WebSessionLogInfo `json:"content_manager,omitempty"` // AdminConsole : Admin console session details. AdminConsole *WebSessionLogInfo `json:"admin_console,omitempty"` // Api : Api session details. Api *ApiSessionLogInfo `json:"api,omitempty"` } // Valid tag values for AccessMethodLogInfo const ( AccessMethodLogInfoEndUser = "end_user" AccessMethodLogInfoSignInAs = "sign_in_as" AccessMethodLogInfoContentManager = "content_manager" AccessMethodLogInfoAdminConsole = "admin_console" AccessMethodLogInfoApi = "api" AccessMethodLogInfoOther = "other" ) // UnmarshalJSON deserializes into a AccessMethodLogInfo instance func (u *AccessMethodLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // EndUser : End user session details. EndUser json.RawMessage `json:"end_user,omitempty"` // SignInAs : Sign in as session details. SignInAs json.RawMessage `json:"sign_in_as,omitempty"` // ContentManager : Content manager session details. ContentManager json.RawMessage `json:"content_manager,omitempty"` // AdminConsole : Admin console session details. AdminConsole json.RawMessage `json:"admin_console,omitempty"` // Api : Api session details. Api json.RawMessage `json:"api,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "end_user": u.EndUser, err = IsSessionLogInfoFromJSON(body) if err != nil { return err } case "sign_in_as": err = json.Unmarshal(body, &u.SignInAs) if err != nil { return err } case "content_manager": err = json.Unmarshal(body, &u.ContentManager) if err != nil { return err } case "admin_console": err = json.Unmarshal(body, &u.AdminConsole) if err != nil { return err } case "api": err = json.Unmarshal(body, &u.Api) if err != nil { return err } } return nil } // AccountCaptureAvailability : has no documentation (yet) type AccountCaptureAvailability struct { dropbox.Tagged } // Valid tag values for AccountCaptureAvailability const ( AccountCaptureAvailabilityUnavailable = "unavailable" AccountCaptureAvailabilityAvailable = "available" AccountCaptureAvailabilityOther = "other" ) // AccountCaptureChangeAvailabilityDetails : Granted/revoked option to enable // account capture on team domains. type AccountCaptureChangeAvailabilityDetails struct { // NewValue : New account capture availabilty value. NewValue *AccountCaptureAvailability `json:"new_value"` // PreviousValue : Previous account capture availabilty value. Might be // missing due to historical data gap. PreviousValue *AccountCaptureAvailability `json:"previous_value,omitempty"` } // NewAccountCaptureChangeAvailabilityDetails returns a new AccountCaptureChangeAvailabilityDetails instance func NewAccountCaptureChangeAvailabilityDetails(NewValue *AccountCaptureAvailability) *AccountCaptureChangeAvailabilityDetails { s := new(AccountCaptureChangeAvailabilityDetails) s.NewValue = NewValue return s } // AccountCaptureChangeAvailabilityType : has no documentation (yet) type AccountCaptureChangeAvailabilityType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAccountCaptureChangeAvailabilityType returns a new AccountCaptureChangeAvailabilityType instance func NewAccountCaptureChangeAvailabilityType(Description string) *AccountCaptureChangeAvailabilityType { s := new(AccountCaptureChangeAvailabilityType) s.Description = Description return s } // AccountCaptureChangePolicyDetails : Changed account capture setting on team // domain. type AccountCaptureChangePolicyDetails struct { // NewValue : New account capture policy. NewValue *AccountCapturePolicy `json:"new_value"` // PreviousValue : Previous account capture policy. Might be missing due to // historical data gap. PreviousValue *AccountCapturePolicy `json:"previous_value,omitempty"` } // NewAccountCaptureChangePolicyDetails returns a new AccountCaptureChangePolicyDetails instance func NewAccountCaptureChangePolicyDetails(NewValue *AccountCapturePolicy) *AccountCaptureChangePolicyDetails { s := new(AccountCaptureChangePolicyDetails) s.NewValue = NewValue return s } // AccountCaptureChangePolicyType : has no documentation (yet) type AccountCaptureChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAccountCaptureChangePolicyType returns a new AccountCaptureChangePolicyType instance func NewAccountCaptureChangePolicyType(Description string) *AccountCaptureChangePolicyType { s := new(AccountCaptureChangePolicyType) s.Description = Description return s } // AccountCaptureMigrateAccountDetails : Account-captured user migrated account // to team. type AccountCaptureMigrateAccountDetails struct { // DomainName : Domain name. DomainName string `json:"domain_name"` } // NewAccountCaptureMigrateAccountDetails returns a new AccountCaptureMigrateAccountDetails instance func NewAccountCaptureMigrateAccountDetails(DomainName string) *AccountCaptureMigrateAccountDetails { s := new(AccountCaptureMigrateAccountDetails) s.DomainName = DomainName return s } // AccountCaptureMigrateAccountType : has no documentation (yet) type AccountCaptureMigrateAccountType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAccountCaptureMigrateAccountType returns a new AccountCaptureMigrateAccountType instance func NewAccountCaptureMigrateAccountType(Description string) *AccountCaptureMigrateAccountType { s := new(AccountCaptureMigrateAccountType) s.Description = Description return s } // AccountCaptureNotificationEmailsSentDetails : Sent proactive account capture // email to all unmanaged members. type AccountCaptureNotificationEmailsSentDetails struct { // DomainName : Domain name. DomainName string `json:"domain_name"` } // NewAccountCaptureNotificationEmailsSentDetails returns a new AccountCaptureNotificationEmailsSentDetails instance func NewAccountCaptureNotificationEmailsSentDetails(DomainName string) *AccountCaptureNotificationEmailsSentDetails { s := new(AccountCaptureNotificationEmailsSentDetails) s.DomainName = DomainName return s } // AccountCaptureNotificationEmailsSentType : has no documentation (yet) type AccountCaptureNotificationEmailsSentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAccountCaptureNotificationEmailsSentType returns a new AccountCaptureNotificationEmailsSentType instance func NewAccountCaptureNotificationEmailsSentType(Description string) *AccountCaptureNotificationEmailsSentType { s := new(AccountCaptureNotificationEmailsSentType) s.Description = Description return s } // AccountCapturePolicy : has no documentation (yet) type AccountCapturePolicy struct { dropbox.Tagged } // Valid tag values for AccountCapturePolicy const ( AccountCapturePolicyDisabled = "disabled" AccountCapturePolicyInvitedUsers = "invited_users" AccountCapturePolicyAllUsers = "all_users" AccountCapturePolicyOther = "other" ) // AccountCaptureRelinquishAccountDetails : Account-captured user changed // account email to personal email. type AccountCaptureRelinquishAccountDetails struct { // DomainName : Domain name. DomainName string `json:"domain_name"` } // NewAccountCaptureRelinquishAccountDetails returns a new AccountCaptureRelinquishAccountDetails instance func NewAccountCaptureRelinquishAccountDetails(DomainName string) *AccountCaptureRelinquishAccountDetails { s := new(AccountCaptureRelinquishAccountDetails) s.DomainName = DomainName return s } // AccountCaptureRelinquishAccountType : has no documentation (yet) type AccountCaptureRelinquishAccountType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAccountCaptureRelinquishAccountType returns a new AccountCaptureRelinquishAccountType instance func NewAccountCaptureRelinquishAccountType(Description string) *AccountCaptureRelinquishAccountType { s := new(AccountCaptureRelinquishAccountType) s.Description = Description return s } // ActionDetails : Additional information indicating the action taken that // caused status change. type ActionDetails struct { dropbox.Tagged // TeamJoinDetails : Additional information relevant when a new member joins // the team. TeamJoinDetails *JoinTeamDetails `json:"team_join_details,omitempty"` // RemoveAction : Define how the user was removed from the team. RemoveAction *MemberRemoveActionType `json:"remove_action,omitempty"` } // Valid tag values for ActionDetails const ( ActionDetailsTeamJoinDetails = "team_join_details" ActionDetailsRemoveAction = "remove_action" ActionDetailsOther = "other" ) // UnmarshalJSON deserializes into a ActionDetails instance func (u *ActionDetails) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // TeamJoinDetails : Additional information relevant when a new member // joins the team. TeamJoinDetails json.RawMessage `json:"team_join_details,omitempty"` // RemoveAction : Define how the user was removed from the team. RemoveAction json.RawMessage `json:"remove_action,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team_join_details": err = json.Unmarshal(body, &u.TeamJoinDetails) if err != nil { return err } case "remove_action": err = json.Unmarshal(w.RemoveAction, &u.RemoveAction) if err != nil { return err } } return nil } // ActorLogInfo : The entity who performed the action. type ActorLogInfo struct { dropbox.Tagged // User : The user who did the action. User IsUserLogInfo `json:"user,omitempty"` // Admin : The admin who did the action. Admin IsUserLogInfo `json:"admin,omitempty"` // App : The application who did the action. App IsAppLogInfo `json:"app,omitempty"` // Reseller : Action done by reseller. Reseller *ResellerLogInfo `json:"reseller,omitempty"` } // Valid tag values for ActorLogInfo const ( ActorLogInfoUser = "user" ActorLogInfoAdmin = "admin" ActorLogInfoApp = "app" ActorLogInfoReseller = "reseller" ActorLogInfoDropbox = "dropbox" ActorLogInfoAnonymous = "anonymous" ActorLogInfoOther = "other" ) // UnmarshalJSON deserializes into a ActorLogInfo instance func (u *ActorLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // User : The user who did the action. User json.RawMessage `json:"user,omitempty"` // Admin : The admin who did the action. Admin json.RawMessage `json:"admin,omitempty"` // App : The application who did the action. App json.RawMessage `json:"app,omitempty"` // Reseller : Action done by reseller. Reseller json.RawMessage `json:"reseller,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user": u.User, err = IsUserLogInfoFromJSON(body) if err != nil { return err } case "admin": u.Admin, err = IsUserLogInfoFromJSON(body) if err != nil { return err } case "app": u.App, err = IsAppLogInfoFromJSON(body) if err != nil { return err } case "reseller": err = json.Unmarshal(body, &u.Reseller) if err != nil { return err } } return nil } // AdminRole : has no documentation (yet) type AdminRole struct { dropbox.Tagged } // Valid tag values for AdminRole const ( AdminRoleTeamAdmin = "team_admin" AdminRoleUserManagementAdmin = "user_management_admin" AdminRoleSupportAdmin = "support_admin" AdminRoleLimitedAdmin = "limited_admin" AdminRoleMemberOnly = "member_only" AdminRoleOther = "other" ) // AllowDownloadDisabledDetails : Disabled downloads. type AllowDownloadDisabledDetails struct { } // NewAllowDownloadDisabledDetails returns a new AllowDownloadDisabledDetails instance func NewAllowDownloadDisabledDetails() *AllowDownloadDisabledDetails { s := new(AllowDownloadDisabledDetails) return s } // AllowDownloadDisabledType : has no documentation (yet) type AllowDownloadDisabledType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAllowDownloadDisabledType returns a new AllowDownloadDisabledType instance func NewAllowDownloadDisabledType(Description string) *AllowDownloadDisabledType { s := new(AllowDownloadDisabledType) s.Description = Description return s } // AllowDownloadEnabledDetails : Enabled downloads. type AllowDownloadEnabledDetails struct { } // NewAllowDownloadEnabledDetails returns a new AllowDownloadEnabledDetails instance func NewAllowDownloadEnabledDetails() *AllowDownloadEnabledDetails { s := new(AllowDownloadEnabledDetails) return s } // AllowDownloadEnabledType : has no documentation (yet) type AllowDownloadEnabledType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAllowDownloadEnabledType returns a new AllowDownloadEnabledType instance func NewAllowDownloadEnabledType(Description string) *AllowDownloadEnabledType { s := new(AllowDownloadEnabledType) s.Description = Description return s } // ApiSessionLogInfo : Api session. type ApiSessionLogInfo struct { // RequestId : Api request ID. RequestId string `json:"request_id"` } // NewApiSessionLogInfo returns a new ApiSessionLogInfo instance func NewApiSessionLogInfo(RequestId string) *ApiSessionLogInfo { s := new(ApiSessionLogInfo) s.RequestId = RequestId return s } // AppLinkTeamDetails : Linked app for team. type AppLinkTeamDetails struct { // AppInfo : Relevant application details. AppInfo IsAppLogInfo `json:"app_info"` } // NewAppLinkTeamDetails returns a new AppLinkTeamDetails instance func NewAppLinkTeamDetails(AppInfo IsAppLogInfo) *AppLinkTeamDetails { s := new(AppLinkTeamDetails) s.AppInfo = AppInfo return s } // UnmarshalJSON deserializes into a AppLinkTeamDetails instance func (u *AppLinkTeamDetails) UnmarshalJSON(b []byte) error { type wrap struct { // AppInfo : Relevant application details. AppInfo json.RawMessage `json:"app_info"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo) if err != nil { return err } u.AppInfo = AppInfo return nil } // AppLinkTeamType : has no documentation (yet) type AppLinkTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAppLinkTeamType returns a new AppLinkTeamType instance func NewAppLinkTeamType(Description string) *AppLinkTeamType { s := new(AppLinkTeamType) s.Description = Description return s } // AppLinkUserDetails : Linked app for member. type AppLinkUserDetails struct { // AppInfo : Relevant application details. AppInfo IsAppLogInfo `json:"app_info"` } // NewAppLinkUserDetails returns a new AppLinkUserDetails instance func NewAppLinkUserDetails(AppInfo IsAppLogInfo) *AppLinkUserDetails { s := new(AppLinkUserDetails) s.AppInfo = AppInfo return s } // UnmarshalJSON deserializes into a AppLinkUserDetails instance func (u *AppLinkUserDetails) UnmarshalJSON(b []byte) error { type wrap struct { // AppInfo : Relevant application details. AppInfo json.RawMessage `json:"app_info"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo) if err != nil { return err } u.AppInfo = AppInfo return nil } // AppLinkUserType : has no documentation (yet) type AppLinkUserType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAppLinkUserType returns a new AppLinkUserType instance func NewAppLinkUserType(Description string) *AppLinkUserType { s := new(AppLinkUserType) s.Description = Description return s } // AppLogInfo : App's logged information. type AppLogInfo struct { // AppId : App unique ID. Might be missing due to historical data gap. AppId string `json:"app_id,omitempty"` // DisplayName : App display name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` } // NewAppLogInfo returns a new AppLogInfo instance func NewAppLogInfo() *AppLogInfo { s := new(AppLogInfo) return s } // IsAppLogInfo is the interface type for AppLogInfo and its subtypes type IsAppLogInfo interface { IsAppLogInfo() } // IsAppLogInfo implements the IsAppLogInfo interface func (u *AppLogInfo) IsAppLogInfo() {} type appLogInfoUnion struct { dropbox.Tagged // UserOrTeamLinkedApp : has no documentation (yet) UserOrTeamLinkedApp *UserOrTeamLinkedAppLogInfo `json:"user_or_team_linked_app,omitempty"` // UserLinkedApp : has no documentation (yet) UserLinkedApp *UserLinkedAppLogInfo `json:"user_linked_app,omitempty"` // TeamLinkedApp : has no documentation (yet) TeamLinkedApp *TeamLinkedAppLogInfo `json:"team_linked_app,omitempty"` } // Valid tag values for AppLogInfo const ( AppLogInfoUserOrTeamLinkedApp = "user_or_team_linked_app" AppLogInfoUserLinkedApp = "user_linked_app" AppLogInfoTeamLinkedApp = "team_linked_app" ) // UnmarshalJSON deserializes into a appLogInfoUnion instance func (u *appLogInfoUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // UserOrTeamLinkedApp : has no documentation (yet) UserOrTeamLinkedApp json.RawMessage `json:"user_or_team_linked_app,omitempty"` // UserLinkedApp : has no documentation (yet) UserLinkedApp json.RawMessage `json:"user_linked_app,omitempty"` // TeamLinkedApp : has no documentation (yet) TeamLinkedApp json.RawMessage `json:"team_linked_app,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user_or_team_linked_app": err = json.Unmarshal(body, &u.UserOrTeamLinkedApp) if err != nil { return err } case "user_linked_app": err = json.Unmarshal(body, &u.UserLinkedApp) if err != nil { return err } case "team_linked_app": err = json.Unmarshal(body, &u.TeamLinkedApp) if err != nil { return err } } return nil } // IsAppLogInfoFromJSON converts JSON to a concrete IsAppLogInfo instance func IsAppLogInfoFromJSON(data []byte) (IsAppLogInfo, error) { var t appLogInfoUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "user_or_team_linked_app": return t.UserOrTeamLinkedApp, nil case "user_linked_app": return t.UserLinkedApp, nil case "team_linked_app": return t.TeamLinkedApp, nil } return nil, nil } // AppUnlinkTeamDetails : Unlinked app for team. type AppUnlinkTeamDetails struct { // AppInfo : Relevant application details. AppInfo IsAppLogInfo `json:"app_info"` } // NewAppUnlinkTeamDetails returns a new AppUnlinkTeamDetails instance func NewAppUnlinkTeamDetails(AppInfo IsAppLogInfo) *AppUnlinkTeamDetails { s := new(AppUnlinkTeamDetails) s.AppInfo = AppInfo return s } // UnmarshalJSON deserializes into a AppUnlinkTeamDetails instance func (u *AppUnlinkTeamDetails) UnmarshalJSON(b []byte) error { type wrap struct { // AppInfo : Relevant application details. AppInfo json.RawMessage `json:"app_info"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo) if err != nil { return err } u.AppInfo = AppInfo return nil } // AppUnlinkTeamType : has no documentation (yet) type AppUnlinkTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAppUnlinkTeamType returns a new AppUnlinkTeamType instance func NewAppUnlinkTeamType(Description string) *AppUnlinkTeamType { s := new(AppUnlinkTeamType) s.Description = Description return s } // AppUnlinkUserDetails : Unlinked app for member. type AppUnlinkUserDetails struct { // AppInfo : Relevant application details. AppInfo IsAppLogInfo `json:"app_info"` } // NewAppUnlinkUserDetails returns a new AppUnlinkUserDetails instance func NewAppUnlinkUserDetails(AppInfo IsAppLogInfo) *AppUnlinkUserDetails { s := new(AppUnlinkUserDetails) s.AppInfo = AppInfo return s } // UnmarshalJSON deserializes into a AppUnlinkUserDetails instance func (u *AppUnlinkUserDetails) UnmarshalJSON(b []byte) error { type wrap struct { // AppInfo : Relevant application details. AppInfo json.RawMessage `json:"app_info"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } AppInfo, err := IsAppLogInfoFromJSON(w.AppInfo) if err != nil { return err } u.AppInfo = AppInfo return nil } // AppUnlinkUserType : has no documentation (yet) type AppUnlinkUserType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewAppUnlinkUserType returns a new AppUnlinkUserType instance func NewAppUnlinkUserType(Description string) *AppUnlinkUserType { s := new(AppUnlinkUserType) s.Description = Description return s } // AssetLogInfo : Asset details. type AssetLogInfo struct { dropbox.Tagged // File : File's details. File *FileLogInfo `json:"file,omitempty"` // Folder : Folder's details. Folder *FolderLogInfo `json:"folder,omitempty"` // PaperDocument : Paper docuement's details. PaperDocument *PaperDocumentLogInfo `json:"paper_document,omitempty"` // PaperFolder : Paper folder's details. PaperFolder *PaperFolderLogInfo `json:"paper_folder,omitempty"` // ShowcaseDocument : Showcase document's details. ShowcaseDocument *ShowcaseDocumentLogInfo `json:"showcase_document,omitempty"` } // Valid tag values for AssetLogInfo const ( AssetLogInfoFile = "file" AssetLogInfoFolder = "folder" AssetLogInfoPaperDocument = "paper_document" AssetLogInfoPaperFolder = "paper_folder" AssetLogInfoShowcaseDocument = "showcase_document" AssetLogInfoOther = "other" ) // UnmarshalJSON deserializes into a AssetLogInfo instance func (u *AssetLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // File : File's details. File json.RawMessage `json:"file,omitempty"` // Folder : Folder's details. Folder json.RawMessage `json:"folder,omitempty"` // PaperDocument : Paper docuement's details. PaperDocument json.RawMessage `json:"paper_document,omitempty"` // PaperFolder : Paper folder's details. PaperFolder json.RawMessage `json:"paper_folder,omitempty"` // ShowcaseDocument : Showcase document's details. ShowcaseDocument json.RawMessage `json:"showcase_document,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "file": err = json.Unmarshal(body, &u.File) if err != nil { return err } case "folder": err = json.Unmarshal(body, &u.Folder) if err != nil { return err } case "paper_document": err = json.Unmarshal(body, &u.PaperDocument) if err != nil { return err } case "paper_folder": err = json.Unmarshal(body, &u.PaperFolder) if err != nil { return err } case "showcase_document": err = json.Unmarshal(body, &u.ShowcaseDocument) if err != nil { return err } } return nil } // CameraUploadsPolicy : Policy for controlling if team members can activate // camera uploads type CameraUploadsPolicy struct { dropbox.Tagged } // Valid tag values for CameraUploadsPolicy const ( CameraUploadsPolicyDisabled = "disabled" CameraUploadsPolicyEnabled = "enabled" CameraUploadsPolicyOther = "other" ) // CameraUploadsPolicyChangedDetails : Changed camera uploads setting for team. type CameraUploadsPolicyChangedDetails struct { // NewValue : New camera uploads setting. NewValue *CameraUploadsPolicy `json:"new_value"` // PreviousValue : Previous camera uploads setting. PreviousValue *CameraUploadsPolicy `json:"previous_value"` } // NewCameraUploadsPolicyChangedDetails returns a new CameraUploadsPolicyChangedDetails instance func NewCameraUploadsPolicyChangedDetails(NewValue *CameraUploadsPolicy, PreviousValue *CameraUploadsPolicy) *CameraUploadsPolicyChangedDetails { s := new(CameraUploadsPolicyChangedDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // CameraUploadsPolicyChangedType : has no documentation (yet) type CameraUploadsPolicyChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewCameraUploadsPolicyChangedType returns a new CameraUploadsPolicyChangedType instance func NewCameraUploadsPolicyChangedType(Description string) *CameraUploadsPolicyChangedType { s := new(CameraUploadsPolicyChangedType) s.Description = Description return s } // Certificate : Certificate details. type Certificate struct { // Subject : Certificate subject. Subject string `json:"subject"` // Issuer : Certificate issuer. Issuer string `json:"issuer"` // IssueDate : Certificate issue date. IssueDate string `json:"issue_date"` // ExpirationDate : Certificate expiration date. ExpirationDate string `json:"expiration_date"` // SerialNumber : Certificate serial number. SerialNumber string `json:"serial_number"` // Sha1Fingerprint : Certificate sha1 fingerprint. Sha1Fingerprint string `json:"sha1_fingerprint"` // CommonName : Certificate common name. CommonName string `json:"common_name,omitempty"` } // NewCertificate returns a new Certificate instance func NewCertificate(Subject string, Issuer string, IssueDate string, ExpirationDate string, SerialNumber string, Sha1Fingerprint string) *Certificate { s := new(Certificate) s.Subject = Subject s.Issuer = Issuer s.IssueDate = IssueDate s.ExpirationDate = ExpirationDate s.SerialNumber = SerialNumber s.Sha1Fingerprint = Sha1Fingerprint return s } // CollectionShareDetails : Shared album. type CollectionShareDetails struct { // AlbumName : Album name. AlbumName string `json:"album_name"` } // NewCollectionShareDetails returns a new CollectionShareDetails instance func NewCollectionShareDetails(AlbumName string) *CollectionShareDetails { s := new(CollectionShareDetails) s.AlbumName = AlbumName return s } // CollectionShareType : has no documentation (yet) type CollectionShareType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewCollectionShareType returns a new CollectionShareType instance func NewCollectionShareType(Description string) *CollectionShareType { s := new(CollectionShareType) s.Description = Description return s } // ContentPermanentDeletePolicy : Policy for pemanent content deletion type ContentPermanentDeletePolicy struct { dropbox.Tagged } // Valid tag values for ContentPermanentDeletePolicy const ( ContentPermanentDeletePolicyDisabled = "disabled" ContentPermanentDeletePolicyEnabled = "enabled" ContentPermanentDeletePolicyOther = "other" ) // ContextLogInfo : The primary entity on which the action was done. type ContextLogInfo struct { dropbox.Tagged // TeamMember : Action was done on behalf of a team member. TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"` // NonTeamMember : Action was done on behalf of a non team member. NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"` // TrustedNonTeamMember : Action was done on behalf of a trusted non team // member. TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"` } // Valid tag values for ContextLogInfo const ( ContextLogInfoTeamMember = "team_member" ContextLogInfoNonTeamMember = "non_team_member" ContextLogInfoAnonymous = "anonymous" ContextLogInfoTeam = "team" ContextLogInfoTrustedNonTeamMember = "trusted_non_team_member" ContextLogInfoOther = "other" ) // UnmarshalJSON deserializes into a ContextLogInfo instance func (u *ContextLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // TeamMember : Action was done on behalf of a team member. TeamMember json.RawMessage `json:"team_member,omitempty"` // NonTeamMember : Action was done on behalf of a non team member. NonTeamMember json.RawMessage `json:"non_team_member,omitempty"` // TrustedNonTeamMember : Action was done on behalf of a trusted non // team member. TrustedNonTeamMember json.RawMessage `json:"trusted_non_team_member,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team_member": err = json.Unmarshal(body, &u.TeamMember) if err != nil { return err } case "non_team_member": err = json.Unmarshal(body, &u.NonTeamMember) if err != nil { return err } case "trusted_non_team_member": err = json.Unmarshal(body, &u.TrustedNonTeamMember) if err != nil { return err } } return nil } // CreateFolderDetails : Created folders. type CreateFolderDetails struct { } // NewCreateFolderDetails returns a new CreateFolderDetails instance func NewCreateFolderDetails() *CreateFolderDetails { s := new(CreateFolderDetails) return s } // CreateFolderType : has no documentation (yet) type CreateFolderType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewCreateFolderType returns a new CreateFolderType instance func NewCreateFolderType(Description string) *CreateFolderType { s := new(CreateFolderType) s.Description = Description return s } // DataPlacementRestrictionChangePolicyDetails : Set restrictions on data center // locations where team data resides. type DataPlacementRestrictionChangePolicyDetails struct { // PreviousValue : Previous placement restriction. PreviousValue *PlacementRestriction `json:"previous_value"` // NewValue : New placement restriction. NewValue *PlacementRestriction `json:"new_value"` } // NewDataPlacementRestrictionChangePolicyDetails returns a new DataPlacementRestrictionChangePolicyDetails instance func NewDataPlacementRestrictionChangePolicyDetails(PreviousValue *PlacementRestriction, NewValue *PlacementRestriction) *DataPlacementRestrictionChangePolicyDetails { s := new(DataPlacementRestrictionChangePolicyDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // DataPlacementRestrictionChangePolicyType : has no documentation (yet) type DataPlacementRestrictionChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDataPlacementRestrictionChangePolicyType returns a new DataPlacementRestrictionChangePolicyType instance func NewDataPlacementRestrictionChangePolicyType(Description string) *DataPlacementRestrictionChangePolicyType { s := new(DataPlacementRestrictionChangePolicyType) s.Description = Description return s } // DataPlacementRestrictionSatisfyPolicyDetails : Completed restrictions on data // center locations where team data resides. type DataPlacementRestrictionSatisfyPolicyDetails struct { // PlacementRestriction : Placement restriction. PlacementRestriction *PlacementRestriction `json:"placement_restriction"` } // NewDataPlacementRestrictionSatisfyPolicyDetails returns a new DataPlacementRestrictionSatisfyPolicyDetails instance func NewDataPlacementRestrictionSatisfyPolicyDetails(PlacementRestriction *PlacementRestriction) *DataPlacementRestrictionSatisfyPolicyDetails { s := new(DataPlacementRestrictionSatisfyPolicyDetails) s.PlacementRestriction = PlacementRestriction return s } // DataPlacementRestrictionSatisfyPolicyType : has no documentation (yet) type DataPlacementRestrictionSatisfyPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDataPlacementRestrictionSatisfyPolicyType returns a new DataPlacementRestrictionSatisfyPolicyType instance func NewDataPlacementRestrictionSatisfyPolicyType(Description string) *DataPlacementRestrictionSatisfyPolicyType { s := new(DataPlacementRestrictionSatisfyPolicyType) s.Description = Description return s } // DeviceSessionLogInfo : Device's session logged information. type DeviceSessionLogInfo struct { // IpAddress : The IP address of the last activity from this session. Might // be missing due to historical data gap. IpAddress string `json:"ip_address,omitempty"` // Created : The time this session was created. Might be missing due to // historical data gap. Created time.Time `json:"created,omitempty"` // Updated : The time of the last activity from this session. Might be // missing due to historical data gap. Updated time.Time `json:"updated,omitempty"` } // NewDeviceSessionLogInfo returns a new DeviceSessionLogInfo instance func NewDeviceSessionLogInfo() *DeviceSessionLogInfo { s := new(DeviceSessionLogInfo) return s } // IsDeviceSessionLogInfo is the interface type for DeviceSessionLogInfo and its subtypes type IsDeviceSessionLogInfo interface { IsDeviceSessionLogInfo() } // IsDeviceSessionLogInfo implements the IsDeviceSessionLogInfo interface func (u *DeviceSessionLogInfo) IsDeviceSessionLogInfo() {} type deviceSessionLogInfoUnion struct { dropbox.Tagged // DesktopDeviceSession : has no documentation (yet) DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"` // MobileDeviceSession : has no documentation (yet) MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"` // WebDeviceSession : has no documentation (yet) WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"` // LegacyDeviceSession : has no documentation (yet) LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"` } // Valid tag values for DeviceSessionLogInfo const ( DeviceSessionLogInfoDesktopDeviceSession = "desktop_device_session" DeviceSessionLogInfoMobileDeviceSession = "mobile_device_session" DeviceSessionLogInfoWebDeviceSession = "web_device_session" DeviceSessionLogInfoLegacyDeviceSession = "legacy_device_session" ) // UnmarshalJSON deserializes into a deviceSessionLogInfoUnion instance func (u *deviceSessionLogInfoUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // DesktopDeviceSession : has no documentation (yet) DesktopDeviceSession json.RawMessage `json:"desktop_device_session,omitempty"` // MobileDeviceSession : has no documentation (yet) MobileDeviceSession json.RawMessage `json:"mobile_device_session,omitempty"` // WebDeviceSession : has no documentation (yet) WebDeviceSession json.RawMessage `json:"web_device_session,omitempty"` // LegacyDeviceSession : has no documentation (yet) LegacyDeviceSession json.RawMessage `json:"legacy_device_session,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "desktop_device_session": err = json.Unmarshal(body, &u.DesktopDeviceSession) if err != nil { return err } case "mobile_device_session": err = json.Unmarshal(body, &u.MobileDeviceSession) if err != nil { return err } case "web_device_session": err = json.Unmarshal(body, &u.WebDeviceSession) if err != nil { return err } case "legacy_device_session": err = json.Unmarshal(body, &u.LegacyDeviceSession) if err != nil { return err } } return nil } // IsDeviceSessionLogInfoFromJSON converts JSON to a concrete IsDeviceSessionLogInfo instance func IsDeviceSessionLogInfoFromJSON(data []byte) (IsDeviceSessionLogInfo, error) { var t deviceSessionLogInfoUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "desktop_device_session": return t.DesktopDeviceSession, nil case "mobile_device_session": return t.MobileDeviceSession, nil case "web_device_session": return t.WebDeviceSession, nil case "legacy_device_session": return t.LegacyDeviceSession, nil } return nil, nil } // DesktopDeviceSessionLogInfo : Information about linked Dropbox desktop client // sessions type DesktopDeviceSessionLogInfo struct { DeviceSessionLogInfo // SessionInfo : Desktop session unique id. Might be missing due to // historical data gap. SessionInfo *DesktopSessionLogInfo `json:"session_info,omitempty"` // HostName : Name of the hosting desktop. HostName string `json:"host_name"` // ClientType : The Dropbox desktop client type. ClientType *team.DesktopPlatform `json:"client_type"` // ClientVersion : The Dropbox client version. ClientVersion string `json:"client_version,omitempty"` // Platform : Information on the hosting platform. Platform string `json:"platform"` // IsDeleteOnUnlinkSupported : Whether itu2019s possible to delete all of // the account files upon unlinking. IsDeleteOnUnlinkSupported bool `json:"is_delete_on_unlink_supported"` } // NewDesktopDeviceSessionLogInfo returns a new DesktopDeviceSessionLogInfo instance func NewDesktopDeviceSessionLogInfo(HostName string, ClientType *team.DesktopPlatform, Platform string, IsDeleteOnUnlinkSupported bool) *DesktopDeviceSessionLogInfo { s := new(DesktopDeviceSessionLogInfo) s.HostName = HostName s.ClientType = ClientType s.Platform = Platform s.IsDeleteOnUnlinkSupported = IsDeleteOnUnlinkSupported return s } // SessionLogInfo : Session's logged information. type SessionLogInfo struct { // SessionId : Session ID. Might be missing due to historical data gap. SessionId string `json:"session_id,omitempty"` } // NewSessionLogInfo returns a new SessionLogInfo instance func NewSessionLogInfo() *SessionLogInfo { s := new(SessionLogInfo) return s } // IsSessionLogInfo is the interface type for SessionLogInfo and its subtypes type IsSessionLogInfo interface { IsSessionLogInfo() } // IsSessionLogInfo implements the IsSessionLogInfo interface func (u *SessionLogInfo) IsSessionLogInfo() {} type sessionLogInfoUnion struct { dropbox.Tagged // Web : has no documentation (yet) Web *WebSessionLogInfo `json:"web,omitempty"` // Desktop : has no documentation (yet) Desktop *DesktopSessionLogInfo `json:"desktop,omitempty"` // Mobile : has no documentation (yet) Mobile *MobileSessionLogInfo `json:"mobile,omitempty"` } // Valid tag values for SessionLogInfo const ( SessionLogInfoWeb = "web" SessionLogInfoDesktop = "desktop" SessionLogInfoMobile = "mobile" ) // UnmarshalJSON deserializes into a sessionLogInfoUnion instance func (u *sessionLogInfoUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Web : has no documentation (yet) Web json.RawMessage `json:"web,omitempty"` // Desktop : has no documentation (yet) Desktop json.RawMessage `json:"desktop,omitempty"` // Mobile : has no documentation (yet) Mobile json.RawMessage `json:"mobile,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "web": err = json.Unmarshal(body, &u.Web) if err != nil { return err } case "desktop": err = json.Unmarshal(body, &u.Desktop) if err != nil { return err } case "mobile": err = json.Unmarshal(body, &u.Mobile) if err != nil { return err } } return nil } // IsSessionLogInfoFromJSON converts JSON to a concrete IsSessionLogInfo instance func IsSessionLogInfoFromJSON(data []byte) (IsSessionLogInfo, error) { var t sessionLogInfoUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "web": return t.Web, nil case "desktop": return t.Desktop, nil case "mobile": return t.Mobile, nil } return nil, nil } // DesktopSessionLogInfo : Desktop session. type DesktopSessionLogInfo struct { SessionLogInfo } // NewDesktopSessionLogInfo returns a new DesktopSessionLogInfo instance func NewDesktopSessionLogInfo() *DesktopSessionLogInfo { s := new(DesktopSessionLogInfo) return s } // DeviceApprovalsChangeDesktopPolicyDetails : Set/removed limit on number of // computers member can link to team Dropbox account. type DeviceApprovalsChangeDesktopPolicyDetails struct { // NewValue : New desktop device approvals policy. Might be missing due to // historical data gap. NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"` // PreviousValue : Previous desktop device approvals policy. Might be // missing due to historical data gap. PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"` } // NewDeviceApprovalsChangeDesktopPolicyDetails returns a new DeviceApprovalsChangeDesktopPolicyDetails instance func NewDeviceApprovalsChangeDesktopPolicyDetails() *DeviceApprovalsChangeDesktopPolicyDetails { s := new(DeviceApprovalsChangeDesktopPolicyDetails) return s } // DeviceApprovalsChangeDesktopPolicyType : has no documentation (yet) type DeviceApprovalsChangeDesktopPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceApprovalsChangeDesktopPolicyType returns a new DeviceApprovalsChangeDesktopPolicyType instance func NewDeviceApprovalsChangeDesktopPolicyType(Description string) *DeviceApprovalsChangeDesktopPolicyType { s := new(DeviceApprovalsChangeDesktopPolicyType) s.Description = Description return s } // DeviceApprovalsChangeMobilePolicyDetails : Set/removed limit on number of // mobile devices member can link to team Dropbox account. type DeviceApprovalsChangeMobilePolicyDetails struct { // NewValue : New mobile device approvals policy. Might be missing due to // historical data gap. NewValue *DeviceApprovalsPolicy `json:"new_value,omitempty"` // PreviousValue : Previous mobile device approvals policy. Might be missing // due to historical data gap. PreviousValue *DeviceApprovalsPolicy `json:"previous_value,omitempty"` } // NewDeviceApprovalsChangeMobilePolicyDetails returns a new DeviceApprovalsChangeMobilePolicyDetails instance func NewDeviceApprovalsChangeMobilePolicyDetails() *DeviceApprovalsChangeMobilePolicyDetails { s := new(DeviceApprovalsChangeMobilePolicyDetails) return s } // DeviceApprovalsChangeMobilePolicyType : has no documentation (yet) type DeviceApprovalsChangeMobilePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceApprovalsChangeMobilePolicyType returns a new DeviceApprovalsChangeMobilePolicyType instance func NewDeviceApprovalsChangeMobilePolicyType(Description string) *DeviceApprovalsChangeMobilePolicyType { s := new(DeviceApprovalsChangeMobilePolicyType) s.Description = Description return s } // DeviceApprovalsChangeOverageActionDetails : Changed device approvals setting // when member is over limit. type DeviceApprovalsChangeOverageActionDetails struct { // NewValue : New over the limits policy. Might be missing due to historical // data gap. NewValue *team_policies.RolloutMethod `json:"new_value,omitempty"` // PreviousValue : Previous over the limit policy. Might be missing due to // historical data gap. PreviousValue *team_policies.RolloutMethod `json:"previous_value,omitempty"` } // NewDeviceApprovalsChangeOverageActionDetails returns a new DeviceApprovalsChangeOverageActionDetails instance func NewDeviceApprovalsChangeOverageActionDetails() *DeviceApprovalsChangeOverageActionDetails { s := new(DeviceApprovalsChangeOverageActionDetails) return s } // DeviceApprovalsChangeOverageActionType : has no documentation (yet) type DeviceApprovalsChangeOverageActionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceApprovalsChangeOverageActionType returns a new DeviceApprovalsChangeOverageActionType instance func NewDeviceApprovalsChangeOverageActionType(Description string) *DeviceApprovalsChangeOverageActionType { s := new(DeviceApprovalsChangeOverageActionType) s.Description = Description return s } // DeviceApprovalsChangeUnlinkActionDetails : Changed device approvals setting // when member unlinks approved device. type DeviceApprovalsChangeUnlinkActionDetails struct { // NewValue : New device unlink policy. Might be missing due to historical // data gap. NewValue *DeviceUnlinkPolicy `json:"new_value,omitempty"` // PreviousValue : Previous device unlink policy. Might be missing due to // historical data gap. PreviousValue *DeviceUnlinkPolicy `json:"previous_value,omitempty"` } // NewDeviceApprovalsChangeUnlinkActionDetails returns a new DeviceApprovalsChangeUnlinkActionDetails instance func NewDeviceApprovalsChangeUnlinkActionDetails() *DeviceApprovalsChangeUnlinkActionDetails { s := new(DeviceApprovalsChangeUnlinkActionDetails) return s } // DeviceApprovalsChangeUnlinkActionType : has no documentation (yet) type DeviceApprovalsChangeUnlinkActionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceApprovalsChangeUnlinkActionType returns a new DeviceApprovalsChangeUnlinkActionType instance func NewDeviceApprovalsChangeUnlinkActionType(Description string) *DeviceApprovalsChangeUnlinkActionType { s := new(DeviceApprovalsChangeUnlinkActionType) s.Description = Description return s } // DeviceApprovalsPolicy : has no documentation (yet) type DeviceApprovalsPolicy struct { dropbox.Tagged } // Valid tag values for DeviceApprovalsPolicy const ( DeviceApprovalsPolicyUnlimited = "unlimited" DeviceApprovalsPolicyLimited = "limited" DeviceApprovalsPolicyOther = "other" ) // DeviceChangeIpDesktopDetails : Changed IP address associated with active // desktop session. type DeviceChangeIpDesktopDetails struct { // DeviceSessionInfo : Device's session logged information. DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info"` } // NewDeviceChangeIpDesktopDetails returns a new DeviceChangeIpDesktopDetails instance func NewDeviceChangeIpDesktopDetails(DeviceSessionInfo IsDeviceSessionLogInfo) *DeviceChangeIpDesktopDetails { s := new(DeviceChangeIpDesktopDetails) s.DeviceSessionInfo = DeviceSessionInfo return s } // UnmarshalJSON deserializes into a DeviceChangeIpDesktopDetails instance func (u *DeviceChangeIpDesktopDetails) UnmarshalJSON(b []byte) error { type wrap struct { // DeviceSessionInfo : Device's session logged information. DeviceSessionInfo json.RawMessage `json:"device_session_info"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } DeviceSessionInfo, err := IsDeviceSessionLogInfoFromJSON(w.DeviceSessionInfo) if err != nil { return err } u.DeviceSessionInfo = DeviceSessionInfo return nil } // DeviceChangeIpDesktopType : has no documentation (yet) type DeviceChangeIpDesktopType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceChangeIpDesktopType returns a new DeviceChangeIpDesktopType instance func NewDeviceChangeIpDesktopType(Description string) *DeviceChangeIpDesktopType { s := new(DeviceChangeIpDesktopType) s.Description = Description return s } // DeviceChangeIpMobileDetails : Changed IP address associated with active // mobile session. type DeviceChangeIpMobileDetails struct { // DeviceSessionInfo : Device's session logged information. DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"` } // NewDeviceChangeIpMobileDetails returns a new DeviceChangeIpMobileDetails instance func NewDeviceChangeIpMobileDetails() *DeviceChangeIpMobileDetails { s := new(DeviceChangeIpMobileDetails) return s } // DeviceChangeIpMobileType : has no documentation (yet) type DeviceChangeIpMobileType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceChangeIpMobileType returns a new DeviceChangeIpMobileType instance func NewDeviceChangeIpMobileType(Description string) *DeviceChangeIpMobileType { s := new(DeviceChangeIpMobileType) s.Description = Description return s } // DeviceChangeIpWebDetails : Changed IP address associated with active web // session. type DeviceChangeIpWebDetails struct { // UserAgent : Web browser name. UserAgent string `json:"user_agent"` } // NewDeviceChangeIpWebDetails returns a new DeviceChangeIpWebDetails instance func NewDeviceChangeIpWebDetails(UserAgent string) *DeviceChangeIpWebDetails { s := new(DeviceChangeIpWebDetails) s.UserAgent = UserAgent return s } // DeviceChangeIpWebType : has no documentation (yet) type DeviceChangeIpWebType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceChangeIpWebType returns a new DeviceChangeIpWebType instance func NewDeviceChangeIpWebType(Description string) *DeviceChangeIpWebType { s := new(DeviceChangeIpWebType) s.Description = Description return s } // DeviceDeleteOnUnlinkFailDetails : Failed to delete all files from unlinked // device. type DeviceDeleteOnUnlinkFailDetails struct { // SessionInfo : Session unique id. Might be missing due to historical data // gap. SessionInfo IsSessionLogInfo `json:"session_info,omitempty"` // DisplayName : The device name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` // NumFailures : The number of times that remote file deletion failed. NumFailures int64 `json:"num_failures"` } // NewDeviceDeleteOnUnlinkFailDetails returns a new DeviceDeleteOnUnlinkFailDetails instance func NewDeviceDeleteOnUnlinkFailDetails(NumFailures int64) *DeviceDeleteOnUnlinkFailDetails { s := new(DeviceDeleteOnUnlinkFailDetails) s.NumFailures = NumFailures return s } // DeviceDeleteOnUnlinkFailType : has no documentation (yet) type DeviceDeleteOnUnlinkFailType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceDeleteOnUnlinkFailType returns a new DeviceDeleteOnUnlinkFailType instance func NewDeviceDeleteOnUnlinkFailType(Description string) *DeviceDeleteOnUnlinkFailType { s := new(DeviceDeleteOnUnlinkFailType) s.Description = Description return s } // DeviceDeleteOnUnlinkSuccessDetails : Deleted all files from unlinked device. type DeviceDeleteOnUnlinkSuccessDetails struct { // SessionInfo : Session unique id. Might be missing due to historical data // gap. SessionInfo IsSessionLogInfo `json:"session_info,omitempty"` // DisplayName : The device name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` } // NewDeviceDeleteOnUnlinkSuccessDetails returns a new DeviceDeleteOnUnlinkSuccessDetails instance func NewDeviceDeleteOnUnlinkSuccessDetails() *DeviceDeleteOnUnlinkSuccessDetails { s := new(DeviceDeleteOnUnlinkSuccessDetails) return s } // DeviceDeleteOnUnlinkSuccessType : has no documentation (yet) type DeviceDeleteOnUnlinkSuccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceDeleteOnUnlinkSuccessType returns a new DeviceDeleteOnUnlinkSuccessType instance func NewDeviceDeleteOnUnlinkSuccessType(Description string) *DeviceDeleteOnUnlinkSuccessType { s := new(DeviceDeleteOnUnlinkSuccessType) s.Description = Description return s } // DeviceLinkFailDetails : Failed to link device. type DeviceLinkFailDetails struct { // IpAddress : IP address. Might be missing due to historical data gap. IpAddress string `json:"ip_address,omitempty"` // DeviceType : A description of the device used while user approval // blocked. DeviceType *DeviceType `json:"device_type"` } // NewDeviceLinkFailDetails returns a new DeviceLinkFailDetails instance func NewDeviceLinkFailDetails(DeviceType *DeviceType) *DeviceLinkFailDetails { s := new(DeviceLinkFailDetails) s.DeviceType = DeviceType return s } // DeviceLinkFailType : has no documentation (yet) type DeviceLinkFailType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceLinkFailType returns a new DeviceLinkFailType instance func NewDeviceLinkFailType(Description string) *DeviceLinkFailType { s := new(DeviceLinkFailType) s.Description = Description return s } // DeviceLinkSuccessDetails : Linked device. type DeviceLinkSuccessDetails struct { // DeviceSessionInfo : Device's session logged information. DeviceSessionInfo IsDeviceSessionLogInfo `json:"device_session_info,omitempty"` } // NewDeviceLinkSuccessDetails returns a new DeviceLinkSuccessDetails instance func NewDeviceLinkSuccessDetails() *DeviceLinkSuccessDetails { s := new(DeviceLinkSuccessDetails) return s } // DeviceLinkSuccessType : has no documentation (yet) type DeviceLinkSuccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceLinkSuccessType returns a new DeviceLinkSuccessType instance func NewDeviceLinkSuccessType(Description string) *DeviceLinkSuccessType { s := new(DeviceLinkSuccessType) s.Description = Description return s } // DeviceManagementDisabledDetails : Disabled device management. type DeviceManagementDisabledDetails struct { } // NewDeviceManagementDisabledDetails returns a new DeviceManagementDisabledDetails instance func NewDeviceManagementDisabledDetails() *DeviceManagementDisabledDetails { s := new(DeviceManagementDisabledDetails) return s } // DeviceManagementDisabledType : has no documentation (yet) type DeviceManagementDisabledType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceManagementDisabledType returns a new DeviceManagementDisabledType instance func NewDeviceManagementDisabledType(Description string) *DeviceManagementDisabledType { s := new(DeviceManagementDisabledType) s.Description = Description return s } // DeviceManagementEnabledDetails : Enabled device management. type DeviceManagementEnabledDetails struct { } // NewDeviceManagementEnabledDetails returns a new DeviceManagementEnabledDetails instance func NewDeviceManagementEnabledDetails() *DeviceManagementEnabledDetails { s := new(DeviceManagementEnabledDetails) return s } // DeviceManagementEnabledType : has no documentation (yet) type DeviceManagementEnabledType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceManagementEnabledType returns a new DeviceManagementEnabledType instance func NewDeviceManagementEnabledType(Description string) *DeviceManagementEnabledType { s := new(DeviceManagementEnabledType) s.Description = Description return s } // DeviceType : has no documentation (yet) type DeviceType struct { dropbox.Tagged } // Valid tag values for DeviceType const ( DeviceTypeDesktop = "desktop" DeviceTypeMobile = "mobile" DeviceTypeOther = "other" ) // DeviceUnlinkDetails : Disconnected device. type DeviceUnlinkDetails struct { // SessionInfo : Session unique id. SessionInfo IsSessionLogInfo `json:"session_info,omitempty"` // DisplayName : The device name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` // DeleteData : True if the user requested to delete data after device // unlink, false otherwise. DeleteData bool `json:"delete_data"` } // NewDeviceUnlinkDetails returns a new DeviceUnlinkDetails instance func NewDeviceUnlinkDetails(DeleteData bool) *DeviceUnlinkDetails { s := new(DeviceUnlinkDetails) s.DeleteData = DeleteData return s } // DeviceUnlinkPolicy : has no documentation (yet) type DeviceUnlinkPolicy struct { dropbox.Tagged } // Valid tag values for DeviceUnlinkPolicy const ( DeviceUnlinkPolicyRemove = "remove" DeviceUnlinkPolicyKeep = "keep" DeviceUnlinkPolicyOther = "other" ) // DeviceUnlinkType : has no documentation (yet) type DeviceUnlinkType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDeviceUnlinkType returns a new DeviceUnlinkType instance func NewDeviceUnlinkType(Description string) *DeviceUnlinkType { s := new(DeviceUnlinkType) s.Description = Description return s } // DirectoryRestrictionsAddMembersDetails : Added members to directory // restrictions list. type DirectoryRestrictionsAddMembersDetails struct { } // NewDirectoryRestrictionsAddMembersDetails returns a new DirectoryRestrictionsAddMembersDetails instance func NewDirectoryRestrictionsAddMembersDetails() *DirectoryRestrictionsAddMembersDetails { s := new(DirectoryRestrictionsAddMembersDetails) return s } // DirectoryRestrictionsAddMembersType : has no documentation (yet) type DirectoryRestrictionsAddMembersType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDirectoryRestrictionsAddMembersType returns a new DirectoryRestrictionsAddMembersType instance func NewDirectoryRestrictionsAddMembersType(Description string) *DirectoryRestrictionsAddMembersType { s := new(DirectoryRestrictionsAddMembersType) s.Description = Description return s } // DirectoryRestrictionsRemoveMembersDetails : Removed members from directory // restrictions list. type DirectoryRestrictionsRemoveMembersDetails struct { } // NewDirectoryRestrictionsRemoveMembersDetails returns a new DirectoryRestrictionsRemoveMembersDetails instance func NewDirectoryRestrictionsRemoveMembersDetails() *DirectoryRestrictionsRemoveMembersDetails { s := new(DirectoryRestrictionsRemoveMembersDetails) return s } // DirectoryRestrictionsRemoveMembersType : has no documentation (yet) type DirectoryRestrictionsRemoveMembersType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDirectoryRestrictionsRemoveMembersType returns a new DirectoryRestrictionsRemoveMembersType instance func NewDirectoryRestrictionsRemoveMembersType(Description string) *DirectoryRestrictionsRemoveMembersType { s := new(DirectoryRestrictionsRemoveMembersType) s.Description = Description return s } // DisabledDomainInvitesDetails : Disabled domain invites. type DisabledDomainInvitesDetails struct { } // NewDisabledDomainInvitesDetails returns a new DisabledDomainInvitesDetails instance func NewDisabledDomainInvitesDetails() *DisabledDomainInvitesDetails { s := new(DisabledDomainInvitesDetails) return s } // DisabledDomainInvitesType : has no documentation (yet) type DisabledDomainInvitesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDisabledDomainInvitesType returns a new DisabledDomainInvitesType instance func NewDisabledDomainInvitesType(Description string) *DisabledDomainInvitesType { s := new(DisabledDomainInvitesType) s.Description = Description return s } // DomainInvitesApproveRequestToJoinTeamDetails : Approved user's request to // join team. type DomainInvitesApproveRequestToJoinTeamDetails struct { } // NewDomainInvitesApproveRequestToJoinTeamDetails returns a new DomainInvitesApproveRequestToJoinTeamDetails instance func NewDomainInvitesApproveRequestToJoinTeamDetails() *DomainInvitesApproveRequestToJoinTeamDetails { s := new(DomainInvitesApproveRequestToJoinTeamDetails) return s } // DomainInvitesApproveRequestToJoinTeamType : has no documentation (yet) type DomainInvitesApproveRequestToJoinTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesApproveRequestToJoinTeamType returns a new DomainInvitesApproveRequestToJoinTeamType instance func NewDomainInvitesApproveRequestToJoinTeamType(Description string) *DomainInvitesApproveRequestToJoinTeamType { s := new(DomainInvitesApproveRequestToJoinTeamType) s.Description = Description return s } // DomainInvitesDeclineRequestToJoinTeamDetails : Declined user's request to // join team. type DomainInvitesDeclineRequestToJoinTeamDetails struct { } // NewDomainInvitesDeclineRequestToJoinTeamDetails returns a new DomainInvitesDeclineRequestToJoinTeamDetails instance func NewDomainInvitesDeclineRequestToJoinTeamDetails() *DomainInvitesDeclineRequestToJoinTeamDetails { s := new(DomainInvitesDeclineRequestToJoinTeamDetails) return s } // DomainInvitesDeclineRequestToJoinTeamType : has no documentation (yet) type DomainInvitesDeclineRequestToJoinTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesDeclineRequestToJoinTeamType returns a new DomainInvitesDeclineRequestToJoinTeamType instance func NewDomainInvitesDeclineRequestToJoinTeamType(Description string) *DomainInvitesDeclineRequestToJoinTeamType { s := new(DomainInvitesDeclineRequestToJoinTeamType) s.Description = Description return s } // DomainInvitesEmailExistingUsersDetails : Sent domain invites to existing // domain accounts. type DomainInvitesEmailExistingUsersDetails struct { // DomainName : Domain names. DomainName string `json:"domain_name"` // NumRecipients : Number of recipients. NumRecipients uint64 `json:"num_recipients"` } // NewDomainInvitesEmailExistingUsersDetails returns a new DomainInvitesEmailExistingUsersDetails instance func NewDomainInvitesEmailExistingUsersDetails(DomainName string, NumRecipients uint64) *DomainInvitesEmailExistingUsersDetails { s := new(DomainInvitesEmailExistingUsersDetails) s.DomainName = DomainName s.NumRecipients = NumRecipients return s } // DomainInvitesEmailExistingUsersType : has no documentation (yet) type DomainInvitesEmailExistingUsersType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesEmailExistingUsersType returns a new DomainInvitesEmailExistingUsersType instance func NewDomainInvitesEmailExistingUsersType(Description string) *DomainInvitesEmailExistingUsersType { s := new(DomainInvitesEmailExistingUsersType) s.Description = Description return s } // DomainInvitesRequestToJoinTeamDetails : Requested to join team. type DomainInvitesRequestToJoinTeamDetails struct { } // NewDomainInvitesRequestToJoinTeamDetails returns a new DomainInvitesRequestToJoinTeamDetails instance func NewDomainInvitesRequestToJoinTeamDetails() *DomainInvitesRequestToJoinTeamDetails { s := new(DomainInvitesRequestToJoinTeamDetails) return s } // DomainInvitesRequestToJoinTeamType : has no documentation (yet) type DomainInvitesRequestToJoinTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesRequestToJoinTeamType returns a new DomainInvitesRequestToJoinTeamType instance func NewDomainInvitesRequestToJoinTeamType(Description string) *DomainInvitesRequestToJoinTeamType { s := new(DomainInvitesRequestToJoinTeamType) s.Description = Description return s } // DomainInvitesSetInviteNewUserPrefToNoDetails : Disabled "Automatically invite // new users". type DomainInvitesSetInviteNewUserPrefToNoDetails struct { } // NewDomainInvitesSetInviteNewUserPrefToNoDetails returns a new DomainInvitesSetInviteNewUserPrefToNoDetails instance func NewDomainInvitesSetInviteNewUserPrefToNoDetails() *DomainInvitesSetInviteNewUserPrefToNoDetails { s := new(DomainInvitesSetInviteNewUserPrefToNoDetails) return s } // DomainInvitesSetInviteNewUserPrefToNoType : has no documentation (yet) type DomainInvitesSetInviteNewUserPrefToNoType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesSetInviteNewUserPrefToNoType returns a new DomainInvitesSetInviteNewUserPrefToNoType instance func NewDomainInvitesSetInviteNewUserPrefToNoType(Description string) *DomainInvitesSetInviteNewUserPrefToNoType { s := new(DomainInvitesSetInviteNewUserPrefToNoType) s.Description = Description return s } // DomainInvitesSetInviteNewUserPrefToYesDetails : Enabled "Automatically invite // new users". type DomainInvitesSetInviteNewUserPrefToYesDetails struct { } // NewDomainInvitesSetInviteNewUserPrefToYesDetails returns a new DomainInvitesSetInviteNewUserPrefToYesDetails instance func NewDomainInvitesSetInviteNewUserPrefToYesDetails() *DomainInvitesSetInviteNewUserPrefToYesDetails { s := new(DomainInvitesSetInviteNewUserPrefToYesDetails) return s } // DomainInvitesSetInviteNewUserPrefToYesType : has no documentation (yet) type DomainInvitesSetInviteNewUserPrefToYesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainInvitesSetInviteNewUserPrefToYesType returns a new DomainInvitesSetInviteNewUserPrefToYesType instance func NewDomainInvitesSetInviteNewUserPrefToYesType(Description string) *DomainInvitesSetInviteNewUserPrefToYesType { s := new(DomainInvitesSetInviteNewUserPrefToYesType) s.Description = Description return s } // DomainVerificationAddDomainFailDetails : Failed to verify team domain. type DomainVerificationAddDomainFailDetails struct { // DomainName : Domain name. DomainName string `json:"domain_name"` // VerificationMethod : Domain name verification method. Might be missing // due to historical data gap. VerificationMethod string `json:"verification_method,omitempty"` } // NewDomainVerificationAddDomainFailDetails returns a new DomainVerificationAddDomainFailDetails instance func NewDomainVerificationAddDomainFailDetails(DomainName string) *DomainVerificationAddDomainFailDetails { s := new(DomainVerificationAddDomainFailDetails) s.DomainName = DomainName return s } // DomainVerificationAddDomainFailType : has no documentation (yet) type DomainVerificationAddDomainFailType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainVerificationAddDomainFailType returns a new DomainVerificationAddDomainFailType instance func NewDomainVerificationAddDomainFailType(Description string) *DomainVerificationAddDomainFailType { s := new(DomainVerificationAddDomainFailType) s.Description = Description return s } // DomainVerificationAddDomainSuccessDetails : Verified team domain. type DomainVerificationAddDomainSuccessDetails struct { // DomainNames : Domain names. DomainNames []string `json:"domain_names"` // VerificationMethod : Domain name verification method. Might be missing // due to historical data gap. VerificationMethod string `json:"verification_method,omitempty"` } // NewDomainVerificationAddDomainSuccessDetails returns a new DomainVerificationAddDomainSuccessDetails instance func NewDomainVerificationAddDomainSuccessDetails(DomainNames []string) *DomainVerificationAddDomainSuccessDetails { s := new(DomainVerificationAddDomainSuccessDetails) s.DomainNames = DomainNames return s } // DomainVerificationAddDomainSuccessType : has no documentation (yet) type DomainVerificationAddDomainSuccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainVerificationAddDomainSuccessType returns a new DomainVerificationAddDomainSuccessType instance func NewDomainVerificationAddDomainSuccessType(Description string) *DomainVerificationAddDomainSuccessType { s := new(DomainVerificationAddDomainSuccessType) s.Description = Description return s } // DomainVerificationRemoveDomainDetails : Removed domain from list of verified // team domains. type DomainVerificationRemoveDomainDetails struct { // DomainNames : Domain names. DomainNames []string `json:"domain_names"` } // NewDomainVerificationRemoveDomainDetails returns a new DomainVerificationRemoveDomainDetails instance func NewDomainVerificationRemoveDomainDetails(DomainNames []string) *DomainVerificationRemoveDomainDetails { s := new(DomainVerificationRemoveDomainDetails) s.DomainNames = DomainNames return s } // DomainVerificationRemoveDomainType : has no documentation (yet) type DomainVerificationRemoveDomainType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewDomainVerificationRemoveDomainType returns a new DomainVerificationRemoveDomainType instance func NewDomainVerificationRemoveDomainType(Description string) *DomainVerificationRemoveDomainType { s := new(DomainVerificationRemoveDomainType) s.Description = Description return s } // DownloadPolicyType : Shared content downloads policy type DownloadPolicyType struct { dropbox.Tagged } // Valid tag values for DownloadPolicyType const ( DownloadPolicyTypeAllow = "allow" DownloadPolicyTypeDisallow = "disallow" DownloadPolicyTypeOther = "other" ) // DurationLogInfo : Represents a time duration: unit and amount type DurationLogInfo struct { // Unit : Time unit. Unit *TimeUnit `json:"unit"` // Amount : Amount of time. Amount uint64 `json:"amount"` } // NewDurationLogInfo returns a new DurationLogInfo instance func NewDurationLogInfo(Unit *TimeUnit, Amount uint64) *DurationLogInfo { s := new(DurationLogInfo) s.Unit = Unit s.Amount = Amount return s } // EmmAddExceptionDetails : Added members to EMM exception list. type EmmAddExceptionDetails struct { } // NewEmmAddExceptionDetails returns a new EmmAddExceptionDetails instance func NewEmmAddExceptionDetails() *EmmAddExceptionDetails { s := new(EmmAddExceptionDetails) return s } // EmmAddExceptionType : has no documentation (yet) type EmmAddExceptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmAddExceptionType returns a new EmmAddExceptionType instance func NewEmmAddExceptionType(Description string) *EmmAddExceptionType { s := new(EmmAddExceptionType) s.Description = Description return s } // EmmChangePolicyDetails : Enabled/disabled enterprise mobility management for // members. type EmmChangePolicyDetails struct { // NewValue : New enterprise mobility management policy. NewValue *team_policies.EmmState `json:"new_value"` // PreviousValue : Previous enterprise mobility management policy. Might be // missing due to historical data gap. PreviousValue *team_policies.EmmState `json:"previous_value,omitempty"` } // NewEmmChangePolicyDetails returns a new EmmChangePolicyDetails instance func NewEmmChangePolicyDetails(NewValue *team_policies.EmmState) *EmmChangePolicyDetails { s := new(EmmChangePolicyDetails) s.NewValue = NewValue return s } // EmmChangePolicyType : has no documentation (yet) type EmmChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmChangePolicyType returns a new EmmChangePolicyType instance func NewEmmChangePolicyType(Description string) *EmmChangePolicyType { s := new(EmmChangePolicyType) s.Description = Description return s } // EmmCreateExceptionsReportDetails : Created EMM-excluded users report. type EmmCreateExceptionsReportDetails struct { } // NewEmmCreateExceptionsReportDetails returns a new EmmCreateExceptionsReportDetails instance func NewEmmCreateExceptionsReportDetails() *EmmCreateExceptionsReportDetails { s := new(EmmCreateExceptionsReportDetails) return s } // EmmCreateExceptionsReportType : has no documentation (yet) type EmmCreateExceptionsReportType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmCreateExceptionsReportType returns a new EmmCreateExceptionsReportType instance func NewEmmCreateExceptionsReportType(Description string) *EmmCreateExceptionsReportType { s := new(EmmCreateExceptionsReportType) s.Description = Description return s } // EmmCreateUsageReportDetails : Created EMM mobile app usage report. type EmmCreateUsageReportDetails struct { } // NewEmmCreateUsageReportDetails returns a new EmmCreateUsageReportDetails instance func NewEmmCreateUsageReportDetails() *EmmCreateUsageReportDetails { s := new(EmmCreateUsageReportDetails) return s } // EmmCreateUsageReportType : has no documentation (yet) type EmmCreateUsageReportType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmCreateUsageReportType returns a new EmmCreateUsageReportType instance func NewEmmCreateUsageReportType(Description string) *EmmCreateUsageReportType { s := new(EmmCreateUsageReportType) s.Description = Description return s } // EmmErrorDetails : Failed to sign in via EMM. type EmmErrorDetails struct { // ErrorDetails : Error details. ErrorDetails *FailureDetailsLogInfo `json:"error_details"` } // NewEmmErrorDetails returns a new EmmErrorDetails instance func NewEmmErrorDetails(ErrorDetails *FailureDetailsLogInfo) *EmmErrorDetails { s := new(EmmErrorDetails) s.ErrorDetails = ErrorDetails return s } // EmmErrorType : has no documentation (yet) type EmmErrorType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmErrorType returns a new EmmErrorType instance func NewEmmErrorType(Description string) *EmmErrorType { s := new(EmmErrorType) s.Description = Description return s } // EmmRefreshAuthTokenDetails : Refreshed auth token used for setting up // enterprise mobility management. type EmmRefreshAuthTokenDetails struct { } // NewEmmRefreshAuthTokenDetails returns a new EmmRefreshAuthTokenDetails instance func NewEmmRefreshAuthTokenDetails() *EmmRefreshAuthTokenDetails { s := new(EmmRefreshAuthTokenDetails) return s } // EmmRefreshAuthTokenType : has no documentation (yet) type EmmRefreshAuthTokenType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmRefreshAuthTokenType returns a new EmmRefreshAuthTokenType instance func NewEmmRefreshAuthTokenType(Description string) *EmmRefreshAuthTokenType { s := new(EmmRefreshAuthTokenType) s.Description = Description return s } // EmmRemoveExceptionDetails : Removed members from EMM exception list. type EmmRemoveExceptionDetails struct { } // NewEmmRemoveExceptionDetails returns a new EmmRemoveExceptionDetails instance func NewEmmRemoveExceptionDetails() *EmmRemoveExceptionDetails { s := new(EmmRemoveExceptionDetails) return s } // EmmRemoveExceptionType : has no documentation (yet) type EmmRemoveExceptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEmmRemoveExceptionType returns a new EmmRemoveExceptionType instance func NewEmmRemoveExceptionType(Description string) *EmmRemoveExceptionType { s := new(EmmRemoveExceptionType) s.Description = Description return s } // EnabledDomainInvitesDetails : Enabled domain invites. type EnabledDomainInvitesDetails struct { } // NewEnabledDomainInvitesDetails returns a new EnabledDomainInvitesDetails instance func NewEnabledDomainInvitesDetails() *EnabledDomainInvitesDetails { s := new(EnabledDomainInvitesDetails) return s } // EnabledDomainInvitesType : has no documentation (yet) type EnabledDomainInvitesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewEnabledDomainInvitesType returns a new EnabledDomainInvitesType instance func NewEnabledDomainInvitesType(Description string) *EnabledDomainInvitesType { s := new(EnabledDomainInvitesType) s.Description = Description return s } // EventCategory : Category of events in event audit log. type EventCategory struct { dropbox.Tagged } // Valid tag values for EventCategory const ( EventCategoryApps = "apps" EventCategoryComments = "comments" EventCategoryDevices = "devices" EventCategoryDomains = "domains" EventCategoryFileOperations = "file_operations" EventCategoryFileRequests = "file_requests" EventCategoryGroups = "groups" EventCategoryLogins = "logins" EventCategoryMembers = "members" EventCategoryPaper = "paper" EventCategoryPasswords = "passwords" EventCategoryReports = "reports" EventCategorySharing = "sharing" EventCategoryShowcase = "showcase" EventCategorySso = "sso" EventCategoryTeamFolders = "team_folders" EventCategoryTeamPolicies = "team_policies" EventCategoryTeamProfile = "team_profile" EventCategoryTfa = "tfa" EventCategoryOther = "other" ) // EventDetails : Additional fields depending on the event type. type EventDetails struct { dropbox.Tagged // AppLinkTeamDetails : has no documentation (yet) AppLinkTeamDetails *AppLinkTeamDetails `json:"app_link_team_details,omitempty"` // AppLinkUserDetails : has no documentation (yet) AppLinkUserDetails *AppLinkUserDetails `json:"app_link_user_details,omitempty"` // AppUnlinkTeamDetails : has no documentation (yet) AppUnlinkTeamDetails *AppUnlinkTeamDetails `json:"app_unlink_team_details,omitempty"` // AppUnlinkUserDetails : has no documentation (yet) AppUnlinkUserDetails *AppUnlinkUserDetails `json:"app_unlink_user_details,omitempty"` // FileAddCommentDetails : has no documentation (yet) FileAddCommentDetails *FileAddCommentDetails `json:"file_add_comment_details,omitempty"` // FileChangeCommentSubscriptionDetails : has no documentation (yet) FileChangeCommentSubscriptionDetails *FileChangeCommentSubscriptionDetails `json:"file_change_comment_subscription_details,omitempty"` // FileDeleteCommentDetails : has no documentation (yet) FileDeleteCommentDetails *FileDeleteCommentDetails `json:"file_delete_comment_details,omitempty"` // FileEditCommentDetails : has no documentation (yet) FileEditCommentDetails *FileEditCommentDetails `json:"file_edit_comment_details,omitempty"` // FileLikeCommentDetails : has no documentation (yet) FileLikeCommentDetails *FileLikeCommentDetails `json:"file_like_comment_details,omitempty"` // FileResolveCommentDetails : has no documentation (yet) FileResolveCommentDetails *FileResolveCommentDetails `json:"file_resolve_comment_details,omitempty"` // FileUnlikeCommentDetails : has no documentation (yet) FileUnlikeCommentDetails *FileUnlikeCommentDetails `json:"file_unlike_comment_details,omitempty"` // FileUnresolveCommentDetails : has no documentation (yet) FileUnresolveCommentDetails *FileUnresolveCommentDetails `json:"file_unresolve_comment_details,omitempty"` // DeviceChangeIpDesktopDetails : has no documentation (yet) DeviceChangeIpDesktopDetails *DeviceChangeIpDesktopDetails `json:"device_change_ip_desktop_details,omitempty"` // DeviceChangeIpMobileDetails : has no documentation (yet) DeviceChangeIpMobileDetails *DeviceChangeIpMobileDetails `json:"device_change_ip_mobile_details,omitempty"` // DeviceChangeIpWebDetails : has no documentation (yet) DeviceChangeIpWebDetails *DeviceChangeIpWebDetails `json:"device_change_ip_web_details,omitempty"` // DeviceDeleteOnUnlinkFailDetails : has no documentation (yet) DeviceDeleteOnUnlinkFailDetails *DeviceDeleteOnUnlinkFailDetails `json:"device_delete_on_unlink_fail_details,omitempty"` // DeviceDeleteOnUnlinkSuccessDetails : has no documentation (yet) DeviceDeleteOnUnlinkSuccessDetails *DeviceDeleteOnUnlinkSuccessDetails `json:"device_delete_on_unlink_success_details,omitempty"` // DeviceLinkFailDetails : has no documentation (yet) DeviceLinkFailDetails *DeviceLinkFailDetails `json:"device_link_fail_details,omitempty"` // DeviceLinkSuccessDetails : has no documentation (yet) DeviceLinkSuccessDetails *DeviceLinkSuccessDetails `json:"device_link_success_details,omitempty"` // DeviceManagementDisabledDetails : has no documentation (yet) DeviceManagementDisabledDetails *DeviceManagementDisabledDetails `json:"device_management_disabled_details,omitempty"` // DeviceManagementEnabledDetails : has no documentation (yet) DeviceManagementEnabledDetails *DeviceManagementEnabledDetails `json:"device_management_enabled_details,omitempty"` // DeviceUnlinkDetails : has no documentation (yet) DeviceUnlinkDetails *DeviceUnlinkDetails `json:"device_unlink_details,omitempty"` // EmmRefreshAuthTokenDetails : has no documentation (yet) EmmRefreshAuthTokenDetails *EmmRefreshAuthTokenDetails `json:"emm_refresh_auth_token_details,omitempty"` // AccountCaptureChangeAvailabilityDetails : has no documentation (yet) AccountCaptureChangeAvailabilityDetails *AccountCaptureChangeAvailabilityDetails `json:"account_capture_change_availability_details,omitempty"` // AccountCaptureMigrateAccountDetails : has no documentation (yet) AccountCaptureMigrateAccountDetails *AccountCaptureMigrateAccountDetails `json:"account_capture_migrate_account_details,omitempty"` // AccountCaptureNotificationEmailsSentDetails : has no documentation (yet) AccountCaptureNotificationEmailsSentDetails *AccountCaptureNotificationEmailsSentDetails `json:"account_capture_notification_emails_sent_details,omitempty"` // AccountCaptureRelinquishAccountDetails : has no documentation (yet) AccountCaptureRelinquishAccountDetails *AccountCaptureRelinquishAccountDetails `json:"account_capture_relinquish_account_details,omitempty"` // DisabledDomainInvitesDetails : has no documentation (yet) DisabledDomainInvitesDetails *DisabledDomainInvitesDetails `json:"disabled_domain_invites_details,omitempty"` // DomainInvitesApproveRequestToJoinTeamDetails : has no documentation (yet) DomainInvitesApproveRequestToJoinTeamDetails *DomainInvitesApproveRequestToJoinTeamDetails `json:"domain_invites_approve_request_to_join_team_details,omitempty"` // DomainInvitesDeclineRequestToJoinTeamDetails : has no documentation (yet) DomainInvitesDeclineRequestToJoinTeamDetails *DomainInvitesDeclineRequestToJoinTeamDetails `json:"domain_invites_decline_request_to_join_team_details,omitempty"` // DomainInvitesEmailExistingUsersDetails : has no documentation (yet) DomainInvitesEmailExistingUsersDetails *DomainInvitesEmailExistingUsersDetails `json:"domain_invites_email_existing_users_details,omitempty"` // DomainInvitesRequestToJoinTeamDetails : has no documentation (yet) DomainInvitesRequestToJoinTeamDetails *DomainInvitesRequestToJoinTeamDetails `json:"domain_invites_request_to_join_team_details,omitempty"` // DomainInvitesSetInviteNewUserPrefToNoDetails : has no documentation (yet) DomainInvitesSetInviteNewUserPrefToNoDetails *DomainInvitesSetInviteNewUserPrefToNoDetails `json:"domain_invites_set_invite_new_user_pref_to_no_details,omitempty"` // DomainInvitesSetInviteNewUserPrefToYesDetails : has no documentation // (yet) DomainInvitesSetInviteNewUserPrefToYesDetails *DomainInvitesSetInviteNewUserPrefToYesDetails `json:"domain_invites_set_invite_new_user_pref_to_yes_details,omitempty"` // DomainVerificationAddDomainFailDetails : has no documentation (yet) DomainVerificationAddDomainFailDetails *DomainVerificationAddDomainFailDetails `json:"domain_verification_add_domain_fail_details,omitempty"` // DomainVerificationAddDomainSuccessDetails : has no documentation (yet) DomainVerificationAddDomainSuccessDetails *DomainVerificationAddDomainSuccessDetails `json:"domain_verification_add_domain_success_details,omitempty"` // DomainVerificationRemoveDomainDetails : has no documentation (yet) DomainVerificationRemoveDomainDetails *DomainVerificationRemoveDomainDetails `json:"domain_verification_remove_domain_details,omitempty"` // EnabledDomainInvitesDetails : has no documentation (yet) EnabledDomainInvitesDetails *EnabledDomainInvitesDetails `json:"enabled_domain_invites_details,omitempty"` // CreateFolderDetails : has no documentation (yet) CreateFolderDetails *CreateFolderDetails `json:"create_folder_details,omitempty"` // FileAddDetails : has no documentation (yet) FileAddDetails *FileAddDetails `json:"file_add_details,omitempty"` // FileCopyDetails : has no documentation (yet) FileCopyDetails *FileCopyDetails `json:"file_copy_details,omitempty"` // FileDeleteDetails : has no documentation (yet) FileDeleteDetails *FileDeleteDetails `json:"file_delete_details,omitempty"` // FileDownloadDetails : has no documentation (yet) FileDownloadDetails *FileDownloadDetails `json:"file_download_details,omitempty"` // FileEditDetails : has no documentation (yet) FileEditDetails *FileEditDetails `json:"file_edit_details,omitempty"` // FileGetCopyReferenceDetails : has no documentation (yet) FileGetCopyReferenceDetails *FileGetCopyReferenceDetails `json:"file_get_copy_reference_details,omitempty"` // FileMoveDetails : has no documentation (yet) FileMoveDetails *FileMoveDetails `json:"file_move_details,omitempty"` // FilePermanentlyDeleteDetails : has no documentation (yet) FilePermanentlyDeleteDetails *FilePermanentlyDeleteDetails `json:"file_permanently_delete_details,omitempty"` // FilePreviewDetails : has no documentation (yet) FilePreviewDetails *FilePreviewDetails `json:"file_preview_details,omitempty"` // FileRenameDetails : has no documentation (yet) FileRenameDetails *FileRenameDetails `json:"file_rename_details,omitempty"` // FileRestoreDetails : has no documentation (yet) FileRestoreDetails *FileRestoreDetails `json:"file_restore_details,omitempty"` // FileRevertDetails : has no documentation (yet) FileRevertDetails *FileRevertDetails `json:"file_revert_details,omitempty"` // FileRollbackChangesDetails : has no documentation (yet) FileRollbackChangesDetails *FileRollbackChangesDetails `json:"file_rollback_changes_details,omitempty"` // FileSaveCopyReferenceDetails : has no documentation (yet) FileSaveCopyReferenceDetails *FileSaveCopyReferenceDetails `json:"file_save_copy_reference_details,omitempty"` // FileRequestChangeDetails : has no documentation (yet) FileRequestChangeDetails *FileRequestChangeDetails `json:"file_request_change_details,omitempty"` // FileRequestCloseDetails : has no documentation (yet) FileRequestCloseDetails *FileRequestCloseDetails `json:"file_request_close_details,omitempty"` // FileRequestCreateDetails : has no documentation (yet) FileRequestCreateDetails *FileRequestCreateDetails `json:"file_request_create_details,omitempty"` // FileRequestReceiveFileDetails : has no documentation (yet) FileRequestReceiveFileDetails *FileRequestReceiveFileDetails `json:"file_request_receive_file_details,omitempty"` // GroupAddExternalIdDetails : has no documentation (yet) GroupAddExternalIdDetails *GroupAddExternalIdDetails `json:"group_add_external_id_details,omitempty"` // GroupAddMemberDetails : has no documentation (yet) GroupAddMemberDetails *GroupAddMemberDetails `json:"group_add_member_details,omitempty"` // GroupChangeExternalIdDetails : has no documentation (yet) GroupChangeExternalIdDetails *GroupChangeExternalIdDetails `json:"group_change_external_id_details,omitempty"` // GroupChangeManagementTypeDetails : has no documentation (yet) GroupChangeManagementTypeDetails *GroupChangeManagementTypeDetails `json:"group_change_management_type_details,omitempty"` // GroupChangeMemberRoleDetails : has no documentation (yet) GroupChangeMemberRoleDetails *GroupChangeMemberRoleDetails `json:"group_change_member_role_details,omitempty"` // GroupCreateDetails : has no documentation (yet) GroupCreateDetails *GroupCreateDetails `json:"group_create_details,omitempty"` // GroupDeleteDetails : has no documentation (yet) GroupDeleteDetails *GroupDeleteDetails `json:"group_delete_details,omitempty"` // GroupDescriptionUpdatedDetails : has no documentation (yet) GroupDescriptionUpdatedDetails *GroupDescriptionUpdatedDetails `json:"group_description_updated_details,omitempty"` // GroupJoinPolicyUpdatedDetails : has no documentation (yet) GroupJoinPolicyUpdatedDetails *GroupJoinPolicyUpdatedDetails `json:"group_join_policy_updated_details,omitempty"` // GroupMovedDetails : has no documentation (yet) GroupMovedDetails *GroupMovedDetails `json:"group_moved_details,omitempty"` // GroupRemoveExternalIdDetails : has no documentation (yet) GroupRemoveExternalIdDetails *GroupRemoveExternalIdDetails `json:"group_remove_external_id_details,omitempty"` // GroupRemoveMemberDetails : has no documentation (yet) GroupRemoveMemberDetails *GroupRemoveMemberDetails `json:"group_remove_member_details,omitempty"` // GroupRenameDetails : has no documentation (yet) GroupRenameDetails *GroupRenameDetails `json:"group_rename_details,omitempty"` // EmmErrorDetails : has no documentation (yet) EmmErrorDetails *EmmErrorDetails `json:"emm_error_details,omitempty"` // LoginFailDetails : has no documentation (yet) LoginFailDetails *LoginFailDetails `json:"login_fail_details,omitempty"` // LoginSuccessDetails : has no documentation (yet) LoginSuccessDetails *LoginSuccessDetails `json:"login_success_details,omitempty"` // LogoutDetails : has no documentation (yet) LogoutDetails *LogoutDetails `json:"logout_details,omitempty"` // ResellerSupportSessionEndDetails : has no documentation (yet) ResellerSupportSessionEndDetails *ResellerSupportSessionEndDetails `json:"reseller_support_session_end_details,omitempty"` // ResellerSupportSessionStartDetails : has no documentation (yet) ResellerSupportSessionStartDetails *ResellerSupportSessionStartDetails `json:"reseller_support_session_start_details,omitempty"` // SignInAsSessionEndDetails : has no documentation (yet) SignInAsSessionEndDetails *SignInAsSessionEndDetails `json:"sign_in_as_session_end_details,omitempty"` // SignInAsSessionStartDetails : has no documentation (yet) SignInAsSessionStartDetails *SignInAsSessionStartDetails `json:"sign_in_as_session_start_details,omitempty"` // SsoErrorDetails : has no documentation (yet) SsoErrorDetails *SsoErrorDetails `json:"sso_error_details,omitempty"` // MemberAddNameDetails : has no documentation (yet) MemberAddNameDetails *MemberAddNameDetails `json:"member_add_name_details,omitempty"` // MemberChangeAdminRoleDetails : has no documentation (yet) MemberChangeAdminRoleDetails *MemberChangeAdminRoleDetails `json:"member_change_admin_role_details,omitempty"` // MemberChangeEmailDetails : has no documentation (yet) MemberChangeEmailDetails *MemberChangeEmailDetails `json:"member_change_email_details,omitempty"` // MemberChangeMembershipTypeDetails : has no documentation (yet) MemberChangeMembershipTypeDetails *MemberChangeMembershipTypeDetails `json:"member_change_membership_type_details,omitempty"` // MemberChangeNameDetails : has no documentation (yet) MemberChangeNameDetails *MemberChangeNameDetails `json:"member_change_name_details,omitempty"` // MemberChangeStatusDetails : has no documentation (yet) MemberChangeStatusDetails *MemberChangeStatusDetails `json:"member_change_status_details,omitempty"` // MemberDeleteManualContactsDetails : has no documentation (yet) MemberDeleteManualContactsDetails *MemberDeleteManualContactsDetails `json:"member_delete_manual_contacts_details,omitempty"` // MemberPermanentlyDeleteAccountContentsDetails : has no documentation // (yet) MemberPermanentlyDeleteAccountContentsDetails *MemberPermanentlyDeleteAccountContentsDetails `json:"member_permanently_delete_account_contents_details,omitempty"` // MemberSpaceLimitsAddCustomQuotaDetails : has no documentation (yet) MemberSpaceLimitsAddCustomQuotaDetails *MemberSpaceLimitsAddCustomQuotaDetails `json:"member_space_limits_add_custom_quota_details,omitempty"` // MemberSpaceLimitsChangeCustomQuotaDetails : has no documentation (yet) MemberSpaceLimitsChangeCustomQuotaDetails *MemberSpaceLimitsChangeCustomQuotaDetails `json:"member_space_limits_change_custom_quota_details,omitempty"` // MemberSpaceLimitsChangeStatusDetails : has no documentation (yet) MemberSpaceLimitsChangeStatusDetails *MemberSpaceLimitsChangeStatusDetails `json:"member_space_limits_change_status_details,omitempty"` // MemberSpaceLimitsRemoveCustomQuotaDetails : has no documentation (yet) MemberSpaceLimitsRemoveCustomQuotaDetails *MemberSpaceLimitsRemoveCustomQuotaDetails `json:"member_space_limits_remove_custom_quota_details,omitempty"` // MemberSuggestDetails : has no documentation (yet) MemberSuggestDetails *MemberSuggestDetails `json:"member_suggest_details,omitempty"` // MemberTransferAccountContentsDetails : has no documentation (yet) MemberTransferAccountContentsDetails *MemberTransferAccountContentsDetails `json:"member_transfer_account_contents_details,omitempty"` // SecondaryMailsPolicyChangedDetails : has no documentation (yet) SecondaryMailsPolicyChangedDetails *SecondaryMailsPolicyChangedDetails `json:"secondary_mails_policy_changed_details,omitempty"` // PaperContentAddMemberDetails : has no documentation (yet) PaperContentAddMemberDetails *PaperContentAddMemberDetails `json:"paper_content_add_member_details,omitempty"` // PaperContentAddToFolderDetails : has no documentation (yet) PaperContentAddToFolderDetails *PaperContentAddToFolderDetails `json:"paper_content_add_to_folder_details,omitempty"` // PaperContentArchiveDetails : has no documentation (yet) PaperContentArchiveDetails *PaperContentArchiveDetails `json:"paper_content_archive_details,omitempty"` // PaperContentCreateDetails : has no documentation (yet) PaperContentCreateDetails *PaperContentCreateDetails `json:"paper_content_create_details,omitempty"` // PaperContentPermanentlyDeleteDetails : has no documentation (yet) PaperContentPermanentlyDeleteDetails *PaperContentPermanentlyDeleteDetails `json:"paper_content_permanently_delete_details,omitempty"` // PaperContentRemoveFromFolderDetails : has no documentation (yet) PaperContentRemoveFromFolderDetails *PaperContentRemoveFromFolderDetails `json:"paper_content_remove_from_folder_details,omitempty"` // PaperContentRemoveMemberDetails : has no documentation (yet) PaperContentRemoveMemberDetails *PaperContentRemoveMemberDetails `json:"paper_content_remove_member_details,omitempty"` // PaperContentRenameDetails : has no documentation (yet) PaperContentRenameDetails *PaperContentRenameDetails `json:"paper_content_rename_details,omitempty"` // PaperContentRestoreDetails : has no documentation (yet) PaperContentRestoreDetails *PaperContentRestoreDetails `json:"paper_content_restore_details,omitempty"` // PaperDocAddCommentDetails : has no documentation (yet) PaperDocAddCommentDetails *PaperDocAddCommentDetails `json:"paper_doc_add_comment_details,omitempty"` // PaperDocChangeMemberRoleDetails : has no documentation (yet) PaperDocChangeMemberRoleDetails *PaperDocChangeMemberRoleDetails `json:"paper_doc_change_member_role_details,omitempty"` // PaperDocChangeSharingPolicyDetails : has no documentation (yet) PaperDocChangeSharingPolicyDetails *PaperDocChangeSharingPolicyDetails `json:"paper_doc_change_sharing_policy_details,omitempty"` // PaperDocChangeSubscriptionDetails : has no documentation (yet) PaperDocChangeSubscriptionDetails *PaperDocChangeSubscriptionDetails `json:"paper_doc_change_subscription_details,omitempty"` // PaperDocDeletedDetails : has no documentation (yet) PaperDocDeletedDetails *PaperDocDeletedDetails `json:"paper_doc_deleted_details,omitempty"` // PaperDocDeleteCommentDetails : has no documentation (yet) PaperDocDeleteCommentDetails *PaperDocDeleteCommentDetails `json:"paper_doc_delete_comment_details,omitempty"` // PaperDocDownloadDetails : has no documentation (yet) PaperDocDownloadDetails *PaperDocDownloadDetails `json:"paper_doc_download_details,omitempty"` // PaperDocEditDetails : has no documentation (yet) PaperDocEditDetails *PaperDocEditDetails `json:"paper_doc_edit_details,omitempty"` // PaperDocEditCommentDetails : has no documentation (yet) PaperDocEditCommentDetails *PaperDocEditCommentDetails `json:"paper_doc_edit_comment_details,omitempty"` // PaperDocFollowedDetails : has no documentation (yet) PaperDocFollowedDetails *PaperDocFollowedDetails `json:"paper_doc_followed_details,omitempty"` // PaperDocMentionDetails : has no documentation (yet) PaperDocMentionDetails *PaperDocMentionDetails `json:"paper_doc_mention_details,omitempty"` // PaperDocOwnershipChangedDetails : has no documentation (yet) PaperDocOwnershipChangedDetails *PaperDocOwnershipChangedDetails `json:"paper_doc_ownership_changed_details,omitempty"` // PaperDocRequestAccessDetails : has no documentation (yet) PaperDocRequestAccessDetails *PaperDocRequestAccessDetails `json:"paper_doc_request_access_details,omitempty"` // PaperDocResolveCommentDetails : has no documentation (yet) PaperDocResolveCommentDetails *PaperDocResolveCommentDetails `json:"paper_doc_resolve_comment_details,omitempty"` // PaperDocRevertDetails : has no documentation (yet) PaperDocRevertDetails *PaperDocRevertDetails `json:"paper_doc_revert_details,omitempty"` // PaperDocSlackShareDetails : has no documentation (yet) PaperDocSlackShareDetails *PaperDocSlackShareDetails `json:"paper_doc_slack_share_details,omitempty"` // PaperDocTeamInviteDetails : has no documentation (yet) PaperDocTeamInviteDetails *PaperDocTeamInviteDetails `json:"paper_doc_team_invite_details,omitempty"` // PaperDocTrashedDetails : has no documentation (yet) PaperDocTrashedDetails *PaperDocTrashedDetails `json:"paper_doc_trashed_details,omitempty"` // PaperDocUnresolveCommentDetails : has no documentation (yet) PaperDocUnresolveCommentDetails *PaperDocUnresolveCommentDetails `json:"paper_doc_unresolve_comment_details,omitempty"` // PaperDocUntrashedDetails : has no documentation (yet) PaperDocUntrashedDetails *PaperDocUntrashedDetails `json:"paper_doc_untrashed_details,omitempty"` // PaperDocViewDetails : has no documentation (yet) PaperDocViewDetails *PaperDocViewDetails `json:"paper_doc_view_details,omitempty"` // PaperExternalViewAllowDetails : has no documentation (yet) PaperExternalViewAllowDetails *PaperExternalViewAllowDetails `json:"paper_external_view_allow_details,omitempty"` // PaperExternalViewDefaultTeamDetails : has no documentation (yet) PaperExternalViewDefaultTeamDetails *PaperExternalViewDefaultTeamDetails `json:"paper_external_view_default_team_details,omitempty"` // PaperExternalViewForbidDetails : has no documentation (yet) PaperExternalViewForbidDetails *PaperExternalViewForbidDetails `json:"paper_external_view_forbid_details,omitempty"` // PaperFolderChangeSubscriptionDetails : has no documentation (yet) PaperFolderChangeSubscriptionDetails *PaperFolderChangeSubscriptionDetails `json:"paper_folder_change_subscription_details,omitempty"` // PaperFolderDeletedDetails : has no documentation (yet) PaperFolderDeletedDetails *PaperFolderDeletedDetails `json:"paper_folder_deleted_details,omitempty"` // PaperFolderFollowedDetails : has no documentation (yet) PaperFolderFollowedDetails *PaperFolderFollowedDetails `json:"paper_folder_followed_details,omitempty"` // PaperFolderTeamInviteDetails : has no documentation (yet) PaperFolderTeamInviteDetails *PaperFolderTeamInviteDetails `json:"paper_folder_team_invite_details,omitempty"` // PasswordChangeDetails : has no documentation (yet) PasswordChangeDetails *PasswordChangeDetails `json:"password_change_details,omitempty"` // PasswordResetDetails : has no documentation (yet) PasswordResetDetails *PasswordResetDetails `json:"password_reset_details,omitempty"` // PasswordResetAllDetails : has no documentation (yet) PasswordResetAllDetails *PasswordResetAllDetails `json:"password_reset_all_details,omitempty"` // EmmCreateExceptionsReportDetails : has no documentation (yet) EmmCreateExceptionsReportDetails *EmmCreateExceptionsReportDetails `json:"emm_create_exceptions_report_details,omitempty"` // EmmCreateUsageReportDetails : has no documentation (yet) EmmCreateUsageReportDetails *EmmCreateUsageReportDetails `json:"emm_create_usage_report_details,omitempty"` // ExportMembersReportDetails : has no documentation (yet) ExportMembersReportDetails *ExportMembersReportDetails `json:"export_members_report_details,omitempty"` // PaperAdminExportStartDetails : has no documentation (yet) PaperAdminExportStartDetails *PaperAdminExportStartDetails `json:"paper_admin_export_start_details,omitempty"` // SmartSyncCreateAdminPrivilegeReportDetails : has no documentation (yet) SmartSyncCreateAdminPrivilegeReportDetails *SmartSyncCreateAdminPrivilegeReportDetails `json:"smart_sync_create_admin_privilege_report_details,omitempty"` // TeamActivityCreateReportDetails : has no documentation (yet) TeamActivityCreateReportDetails *TeamActivityCreateReportDetails `json:"team_activity_create_report_details,omitempty"` // CollectionShareDetails : has no documentation (yet) CollectionShareDetails *CollectionShareDetails `json:"collection_share_details,omitempty"` // NoteAclInviteOnlyDetails : has no documentation (yet) NoteAclInviteOnlyDetails *NoteAclInviteOnlyDetails `json:"note_acl_invite_only_details,omitempty"` // NoteAclLinkDetails : has no documentation (yet) NoteAclLinkDetails *NoteAclLinkDetails `json:"note_acl_link_details,omitempty"` // NoteAclTeamLinkDetails : has no documentation (yet) NoteAclTeamLinkDetails *NoteAclTeamLinkDetails `json:"note_acl_team_link_details,omitempty"` // NoteSharedDetails : has no documentation (yet) NoteSharedDetails *NoteSharedDetails `json:"note_shared_details,omitempty"` // NoteShareReceiveDetails : has no documentation (yet) NoteShareReceiveDetails *NoteShareReceiveDetails `json:"note_share_receive_details,omitempty"` // OpenNoteSharedDetails : has no documentation (yet) OpenNoteSharedDetails *OpenNoteSharedDetails `json:"open_note_shared_details,omitempty"` // SfAddGroupDetails : has no documentation (yet) SfAddGroupDetails *SfAddGroupDetails `json:"sf_add_group_details,omitempty"` // SfAllowNonMembersToViewSharedLinksDetails : has no documentation (yet) SfAllowNonMembersToViewSharedLinksDetails *SfAllowNonMembersToViewSharedLinksDetails `json:"sf_allow_non_members_to_view_shared_links_details,omitempty"` // SfExternalInviteWarnDetails : has no documentation (yet) SfExternalInviteWarnDetails *SfExternalInviteWarnDetails `json:"sf_external_invite_warn_details,omitempty"` // SfFbInviteDetails : has no documentation (yet) SfFbInviteDetails *SfFbInviteDetails `json:"sf_fb_invite_details,omitempty"` // SfFbInviteChangeRoleDetails : has no documentation (yet) SfFbInviteChangeRoleDetails *SfFbInviteChangeRoleDetails `json:"sf_fb_invite_change_role_details,omitempty"` // SfFbUninviteDetails : has no documentation (yet) SfFbUninviteDetails *SfFbUninviteDetails `json:"sf_fb_uninvite_details,omitempty"` // SfInviteGroupDetails : has no documentation (yet) SfInviteGroupDetails *SfInviteGroupDetails `json:"sf_invite_group_details,omitempty"` // SfTeamGrantAccessDetails : has no documentation (yet) SfTeamGrantAccessDetails *SfTeamGrantAccessDetails `json:"sf_team_grant_access_details,omitempty"` // SfTeamInviteDetails : has no documentation (yet) SfTeamInviteDetails *SfTeamInviteDetails `json:"sf_team_invite_details,omitempty"` // SfTeamInviteChangeRoleDetails : has no documentation (yet) SfTeamInviteChangeRoleDetails *SfTeamInviteChangeRoleDetails `json:"sf_team_invite_change_role_details,omitempty"` // SfTeamJoinDetails : has no documentation (yet) SfTeamJoinDetails *SfTeamJoinDetails `json:"sf_team_join_details,omitempty"` // SfTeamJoinFromOobLinkDetails : has no documentation (yet) SfTeamJoinFromOobLinkDetails *SfTeamJoinFromOobLinkDetails `json:"sf_team_join_from_oob_link_details,omitempty"` // SfTeamUninviteDetails : has no documentation (yet) SfTeamUninviteDetails *SfTeamUninviteDetails `json:"sf_team_uninvite_details,omitempty"` // SharedContentAddInviteesDetails : has no documentation (yet) SharedContentAddInviteesDetails *SharedContentAddInviteesDetails `json:"shared_content_add_invitees_details,omitempty"` // SharedContentAddLinkExpiryDetails : has no documentation (yet) SharedContentAddLinkExpiryDetails *SharedContentAddLinkExpiryDetails `json:"shared_content_add_link_expiry_details,omitempty"` // SharedContentAddLinkPasswordDetails : has no documentation (yet) SharedContentAddLinkPasswordDetails *SharedContentAddLinkPasswordDetails `json:"shared_content_add_link_password_details,omitempty"` // SharedContentAddMemberDetails : has no documentation (yet) SharedContentAddMemberDetails *SharedContentAddMemberDetails `json:"shared_content_add_member_details,omitempty"` // SharedContentChangeDownloadsPolicyDetails : has no documentation (yet) SharedContentChangeDownloadsPolicyDetails *SharedContentChangeDownloadsPolicyDetails `json:"shared_content_change_downloads_policy_details,omitempty"` // SharedContentChangeInviteeRoleDetails : has no documentation (yet) SharedContentChangeInviteeRoleDetails *SharedContentChangeInviteeRoleDetails `json:"shared_content_change_invitee_role_details,omitempty"` // SharedContentChangeLinkAudienceDetails : has no documentation (yet) SharedContentChangeLinkAudienceDetails *SharedContentChangeLinkAudienceDetails `json:"shared_content_change_link_audience_details,omitempty"` // SharedContentChangeLinkExpiryDetails : has no documentation (yet) SharedContentChangeLinkExpiryDetails *SharedContentChangeLinkExpiryDetails `json:"shared_content_change_link_expiry_details,omitempty"` // SharedContentChangeLinkPasswordDetails : has no documentation (yet) SharedContentChangeLinkPasswordDetails *SharedContentChangeLinkPasswordDetails `json:"shared_content_change_link_password_details,omitempty"` // SharedContentChangeMemberRoleDetails : has no documentation (yet) SharedContentChangeMemberRoleDetails *SharedContentChangeMemberRoleDetails `json:"shared_content_change_member_role_details,omitempty"` // SharedContentChangeViewerInfoPolicyDetails : has no documentation (yet) SharedContentChangeViewerInfoPolicyDetails *SharedContentChangeViewerInfoPolicyDetails `json:"shared_content_change_viewer_info_policy_details,omitempty"` // SharedContentClaimInvitationDetails : has no documentation (yet) SharedContentClaimInvitationDetails *SharedContentClaimInvitationDetails `json:"shared_content_claim_invitation_details,omitempty"` // SharedContentCopyDetails : has no documentation (yet) SharedContentCopyDetails *SharedContentCopyDetails `json:"shared_content_copy_details,omitempty"` // SharedContentDownloadDetails : has no documentation (yet) SharedContentDownloadDetails *SharedContentDownloadDetails `json:"shared_content_download_details,omitempty"` // SharedContentRelinquishMembershipDetails : has no documentation (yet) SharedContentRelinquishMembershipDetails *SharedContentRelinquishMembershipDetails `json:"shared_content_relinquish_membership_details,omitempty"` // SharedContentRemoveInviteesDetails : has no documentation (yet) SharedContentRemoveInviteesDetails *SharedContentRemoveInviteesDetails `json:"shared_content_remove_invitees_details,omitempty"` // SharedContentRemoveLinkExpiryDetails : has no documentation (yet) SharedContentRemoveLinkExpiryDetails *SharedContentRemoveLinkExpiryDetails `json:"shared_content_remove_link_expiry_details,omitempty"` // SharedContentRemoveLinkPasswordDetails : has no documentation (yet) SharedContentRemoveLinkPasswordDetails *SharedContentRemoveLinkPasswordDetails `json:"shared_content_remove_link_password_details,omitempty"` // SharedContentRemoveMemberDetails : has no documentation (yet) SharedContentRemoveMemberDetails *SharedContentRemoveMemberDetails `json:"shared_content_remove_member_details,omitempty"` // SharedContentRequestAccessDetails : has no documentation (yet) SharedContentRequestAccessDetails *SharedContentRequestAccessDetails `json:"shared_content_request_access_details,omitempty"` // SharedContentUnshareDetails : has no documentation (yet) SharedContentUnshareDetails *SharedContentUnshareDetails `json:"shared_content_unshare_details,omitempty"` // SharedContentViewDetails : has no documentation (yet) SharedContentViewDetails *SharedContentViewDetails `json:"shared_content_view_details,omitempty"` // SharedFolderChangeLinkPolicyDetails : has no documentation (yet) SharedFolderChangeLinkPolicyDetails *SharedFolderChangeLinkPolicyDetails `json:"shared_folder_change_link_policy_details,omitempty"` // SharedFolderChangeMembersInheritancePolicyDetails : has no documentation // (yet) SharedFolderChangeMembersInheritancePolicyDetails *SharedFolderChangeMembersInheritancePolicyDetails `json:"shared_folder_change_members_inheritance_policy_details,omitempty"` // SharedFolderChangeMembersManagementPolicyDetails : has no documentation // (yet) SharedFolderChangeMembersManagementPolicyDetails *SharedFolderChangeMembersManagementPolicyDetails `json:"shared_folder_change_members_management_policy_details,omitempty"` // SharedFolderChangeMembersPolicyDetails : has no documentation (yet) SharedFolderChangeMembersPolicyDetails *SharedFolderChangeMembersPolicyDetails `json:"shared_folder_change_members_policy_details,omitempty"` // SharedFolderCreateDetails : has no documentation (yet) SharedFolderCreateDetails *SharedFolderCreateDetails `json:"shared_folder_create_details,omitempty"` // SharedFolderDeclineInvitationDetails : has no documentation (yet) SharedFolderDeclineInvitationDetails *SharedFolderDeclineInvitationDetails `json:"shared_folder_decline_invitation_details,omitempty"` // SharedFolderMountDetails : has no documentation (yet) SharedFolderMountDetails *SharedFolderMountDetails `json:"shared_folder_mount_details,omitempty"` // SharedFolderNestDetails : has no documentation (yet) SharedFolderNestDetails *SharedFolderNestDetails `json:"shared_folder_nest_details,omitempty"` // SharedFolderTransferOwnershipDetails : has no documentation (yet) SharedFolderTransferOwnershipDetails *SharedFolderTransferOwnershipDetails `json:"shared_folder_transfer_ownership_details,omitempty"` // SharedFolderUnmountDetails : has no documentation (yet) SharedFolderUnmountDetails *SharedFolderUnmountDetails `json:"shared_folder_unmount_details,omitempty"` // SharedLinkAddExpiryDetails : has no documentation (yet) SharedLinkAddExpiryDetails *SharedLinkAddExpiryDetails `json:"shared_link_add_expiry_details,omitempty"` // SharedLinkChangeExpiryDetails : has no documentation (yet) SharedLinkChangeExpiryDetails *SharedLinkChangeExpiryDetails `json:"shared_link_change_expiry_details,omitempty"` // SharedLinkChangeVisibilityDetails : has no documentation (yet) SharedLinkChangeVisibilityDetails *SharedLinkChangeVisibilityDetails `json:"shared_link_change_visibility_details,omitempty"` // SharedLinkCopyDetails : has no documentation (yet) SharedLinkCopyDetails *SharedLinkCopyDetails `json:"shared_link_copy_details,omitempty"` // SharedLinkCreateDetails : has no documentation (yet) SharedLinkCreateDetails *SharedLinkCreateDetails `json:"shared_link_create_details,omitempty"` // SharedLinkDisableDetails : has no documentation (yet) SharedLinkDisableDetails *SharedLinkDisableDetails `json:"shared_link_disable_details,omitempty"` // SharedLinkDownloadDetails : has no documentation (yet) SharedLinkDownloadDetails *SharedLinkDownloadDetails `json:"shared_link_download_details,omitempty"` // SharedLinkRemoveExpiryDetails : has no documentation (yet) SharedLinkRemoveExpiryDetails *SharedLinkRemoveExpiryDetails `json:"shared_link_remove_expiry_details,omitempty"` // SharedLinkShareDetails : has no documentation (yet) SharedLinkShareDetails *SharedLinkShareDetails `json:"shared_link_share_details,omitempty"` // SharedLinkViewDetails : has no documentation (yet) SharedLinkViewDetails *SharedLinkViewDetails `json:"shared_link_view_details,omitempty"` // SharedNoteOpenedDetails : has no documentation (yet) SharedNoteOpenedDetails *SharedNoteOpenedDetails `json:"shared_note_opened_details,omitempty"` // ShmodelGroupShareDetails : has no documentation (yet) ShmodelGroupShareDetails *ShmodelGroupShareDetails `json:"shmodel_group_share_details,omitempty"` // ShowcaseAccessGrantedDetails : has no documentation (yet) ShowcaseAccessGrantedDetails *ShowcaseAccessGrantedDetails `json:"showcase_access_granted_details,omitempty"` // ShowcaseAddMemberDetails : has no documentation (yet) ShowcaseAddMemberDetails *ShowcaseAddMemberDetails `json:"showcase_add_member_details,omitempty"` // ShowcaseArchivedDetails : has no documentation (yet) ShowcaseArchivedDetails *ShowcaseArchivedDetails `json:"showcase_archived_details,omitempty"` // ShowcaseCreatedDetails : has no documentation (yet) ShowcaseCreatedDetails *ShowcaseCreatedDetails `json:"showcase_created_details,omitempty"` // ShowcaseDeleteCommentDetails : has no documentation (yet) ShowcaseDeleteCommentDetails *ShowcaseDeleteCommentDetails `json:"showcase_delete_comment_details,omitempty"` // ShowcaseEditedDetails : has no documentation (yet) ShowcaseEditedDetails *ShowcaseEditedDetails `json:"showcase_edited_details,omitempty"` // ShowcaseEditCommentDetails : has no documentation (yet) ShowcaseEditCommentDetails *ShowcaseEditCommentDetails `json:"showcase_edit_comment_details,omitempty"` // ShowcaseFileAddedDetails : has no documentation (yet) ShowcaseFileAddedDetails *ShowcaseFileAddedDetails `json:"showcase_file_added_details,omitempty"` // ShowcaseFileDownloadDetails : has no documentation (yet) ShowcaseFileDownloadDetails *ShowcaseFileDownloadDetails `json:"showcase_file_download_details,omitempty"` // ShowcaseFileRemovedDetails : has no documentation (yet) ShowcaseFileRemovedDetails *ShowcaseFileRemovedDetails `json:"showcase_file_removed_details,omitempty"` // ShowcaseFileViewDetails : has no documentation (yet) ShowcaseFileViewDetails *ShowcaseFileViewDetails `json:"showcase_file_view_details,omitempty"` // ShowcasePermanentlyDeletedDetails : has no documentation (yet) ShowcasePermanentlyDeletedDetails *ShowcasePermanentlyDeletedDetails `json:"showcase_permanently_deleted_details,omitempty"` // ShowcasePostCommentDetails : has no documentation (yet) ShowcasePostCommentDetails *ShowcasePostCommentDetails `json:"showcase_post_comment_details,omitempty"` // ShowcaseRemoveMemberDetails : has no documentation (yet) ShowcaseRemoveMemberDetails *ShowcaseRemoveMemberDetails `json:"showcase_remove_member_details,omitempty"` // ShowcaseRenamedDetails : has no documentation (yet) ShowcaseRenamedDetails *ShowcaseRenamedDetails `json:"showcase_renamed_details,omitempty"` // ShowcaseRequestAccessDetails : has no documentation (yet) ShowcaseRequestAccessDetails *ShowcaseRequestAccessDetails `json:"showcase_request_access_details,omitempty"` // ShowcaseResolveCommentDetails : has no documentation (yet) ShowcaseResolveCommentDetails *ShowcaseResolveCommentDetails `json:"showcase_resolve_comment_details,omitempty"` // ShowcaseRestoredDetails : has no documentation (yet) ShowcaseRestoredDetails *ShowcaseRestoredDetails `json:"showcase_restored_details,omitempty"` // ShowcaseTrashedDetails : has no documentation (yet) ShowcaseTrashedDetails *ShowcaseTrashedDetails `json:"showcase_trashed_details,omitempty"` // ShowcaseTrashedDeprecatedDetails : has no documentation (yet) ShowcaseTrashedDeprecatedDetails *ShowcaseTrashedDeprecatedDetails `json:"showcase_trashed_deprecated_details,omitempty"` // ShowcaseUnresolveCommentDetails : has no documentation (yet) ShowcaseUnresolveCommentDetails *ShowcaseUnresolveCommentDetails `json:"showcase_unresolve_comment_details,omitempty"` // ShowcaseUntrashedDetails : has no documentation (yet) ShowcaseUntrashedDetails *ShowcaseUntrashedDetails `json:"showcase_untrashed_details,omitempty"` // ShowcaseUntrashedDeprecatedDetails : has no documentation (yet) ShowcaseUntrashedDeprecatedDetails *ShowcaseUntrashedDeprecatedDetails `json:"showcase_untrashed_deprecated_details,omitempty"` // ShowcaseViewDetails : has no documentation (yet) ShowcaseViewDetails *ShowcaseViewDetails `json:"showcase_view_details,omitempty"` // SsoAddCertDetails : has no documentation (yet) SsoAddCertDetails *SsoAddCertDetails `json:"sso_add_cert_details,omitempty"` // SsoAddLoginUrlDetails : has no documentation (yet) SsoAddLoginUrlDetails *SsoAddLoginUrlDetails `json:"sso_add_login_url_details,omitempty"` // SsoAddLogoutUrlDetails : has no documentation (yet) SsoAddLogoutUrlDetails *SsoAddLogoutUrlDetails `json:"sso_add_logout_url_details,omitempty"` // SsoChangeCertDetails : has no documentation (yet) SsoChangeCertDetails *SsoChangeCertDetails `json:"sso_change_cert_details,omitempty"` // SsoChangeLoginUrlDetails : has no documentation (yet) SsoChangeLoginUrlDetails *SsoChangeLoginUrlDetails `json:"sso_change_login_url_details,omitempty"` // SsoChangeLogoutUrlDetails : has no documentation (yet) SsoChangeLogoutUrlDetails *SsoChangeLogoutUrlDetails `json:"sso_change_logout_url_details,omitempty"` // SsoChangeSamlIdentityModeDetails : has no documentation (yet) SsoChangeSamlIdentityModeDetails *SsoChangeSamlIdentityModeDetails `json:"sso_change_saml_identity_mode_details,omitempty"` // SsoRemoveCertDetails : has no documentation (yet) SsoRemoveCertDetails *SsoRemoveCertDetails `json:"sso_remove_cert_details,omitempty"` // SsoRemoveLoginUrlDetails : has no documentation (yet) SsoRemoveLoginUrlDetails *SsoRemoveLoginUrlDetails `json:"sso_remove_login_url_details,omitempty"` // SsoRemoveLogoutUrlDetails : has no documentation (yet) SsoRemoveLogoutUrlDetails *SsoRemoveLogoutUrlDetails `json:"sso_remove_logout_url_details,omitempty"` // TeamFolderChangeStatusDetails : has no documentation (yet) TeamFolderChangeStatusDetails *TeamFolderChangeStatusDetails `json:"team_folder_change_status_details,omitempty"` // TeamFolderCreateDetails : has no documentation (yet) TeamFolderCreateDetails *TeamFolderCreateDetails `json:"team_folder_create_details,omitempty"` // TeamFolderDowngradeDetails : has no documentation (yet) TeamFolderDowngradeDetails *TeamFolderDowngradeDetails `json:"team_folder_downgrade_details,omitempty"` // TeamFolderPermanentlyDeleteDetails : has no documentation (yet) TeamFolderPermanentlyDeleteDetails *TeamFolderPermanentlyDeleteDetails `json:"team_folder_permanently_delete_details,omitempty"` // TeamFolderRenameDetails : has no documentation (yet) TeamFolderRenameDetails *TeamFolderRenameDetails `json:"team_folder_rename_details,omitempty"` // TeamSelectiveSyncSettingsChangedDetails : has no documentation (yet) TeamSelectiveSyncSettingsChangedDetails *TeamSelectiveSyncSettingsChangedDetails `json:"team_selective_sync_settings_changed_details,omitempty"` // AccountCaptureChangePolicyDetails : has no documentation (yet) AccountCaptureChangePolicyDetails *AccountCaptureChangePolicyDetails `json:"account_capture_change_policy_details,omitempty"` // AllowDownloadDisabledDetails : has no documentation (yet) AllowDownloadDisabledDetails *AllowDownloadDisabledDetails `json:"allow_download_disabled_details,omitempty"` // AllowDownloadEnabledDetails : has no documentation (yet) AllowDownloadEnabledDetails *AllowDownloadEnabledDetails `json:"allow_download_enabled_details,omitempty"` // CameraUploadsPolicyChangedDetails : has no documentation (yet) CameraUploadsPolicyChangedDetails *CameraUploadsPolicyChangedDetails `json:"camera_uploads_policy_changed_details,omitempty"` // DataPlacementRestrictionChangePolicyDetails : has no documentation (yet) DataPlacementRestrictionChangePolicyDetails *DataPlacementRestrictionChangePolicyDetails `json:"data_placement_restriction_change_policy_details,omitempty"` // DataPlacementRestrictionSatisfyPolicyDetails : has no documentation (yet) DataPlacementRestrictionSatisfyPolicyDetails *DataPlacementRestrictionSatisfyPolicyDetails `json:"data_placement_restriction_satisfy_policy_details,omitempty"` // DeviceApprovalsChangeDesktopPolicyDetails : has no documentation (yet) DeviceApprovalsChangeDesktopPolicyDetails *DeviceApprovalsChangeDesktopPolicyDetails `json:"device_approvals_change_desktop_policy_details,omitempty"` // DeviceApprovalsChangeMobilePolicyDetails : has no documentation (yet) DeviceApprovalsChangeMobilePolicyDetails *DeviceApprovalsChangeMobilePolicyDetails `json:"device_approvals_change_mobile_policy_details,omitempty"` // DeviceApprovalsChangeOverageActionDetails : has no documentation (yet) DeviceApprovalsChangeOverageActionDetails *DeviceApprovalsChangeOverageActionDetails `json:"device_approvals_change_overage_action_details,omitempty"` // DeviceApprovalsChangeUnlinkActionDetails : has no documentation (yet) DeviceApprovalsChangeUnlinkActionDetails *DeviceApprovalsChangeUnlinkActionDetails `json:"device_approvals_change_unlink_action_details,omitempty"` // DirectoryRestrictionsAddMembersDetails : has no documentation (yet) DirectoryRestrictionsAddMembersDetails *DirectoryRestrictionsAddMembersDetails `json:"directory_restrictions_add_members_details,omitempty"` // DirectoryRestrictionsRemoveMembersDetails : has no documentation (yet) DirectoryRestrictionsRemoveMembersDetails *DirectoryRestrictionsRemoveMembersDetails `json:"directory_restrictions_remove_members_details,omitempty"` // EmmAddExceptionDetails : has no documentation (yet) EmmAddExceptionDetails *EmmAddExceptionDetails `json:"emm_add_exception_details,omitempty"` // EmmChangePolicyDetails : has no documentation (yet) EmmChangePolicyDetails *EmmChangePolicyDetails `json:"emm_change_policy_details,omitempty"` // EmmRemoveExceptionDetails : has no documentation (yet) EmmRemoveExceptionDetails *EmmRemoveExceptionDetails `json:"emm_remove_exception_details,omitempty"` // ExtendedVersionHistoryChangePolicyDetails : has no documentation (yet) ExtendedVersionHistoryChangePolicyDetails *ExtendedVersionHistoryChangePolicyDetails `json:"extended_version_history_change_policy_details,omitempty"` // FileCommentsChangePolicyDetails : has no documentation (yet) FileCommentsChangePolicyDetails *FileCommentsChangePolicyDetails `json:"file_comments_change_policy_details,omitempty"` // FileRequestsChangePolicyDetails : has no documentation (yet) FileRequestsChangePolicyDetails *FileRequestsChangePolicyDetails `json:"file_requests_change_policy_details,omitempty"` // FileRequestsEmailsEnabledDetails : has no documentation (yet) FileRequestsEmailsEnabledDetails *FileRequestsEmailsEnabledDetails `json:"file_requests_emails_enabled_details,omitempty"` // FileRequestsEmailsRestrictedToTeamOnlyDetails : has no documentation // (yet) FileRequestsEmailsRestrictedToTeamOnlyDetails *FileRequestsEmailsRestrictedToTeamOnlyDetails `json:"file_requests_emails_restricted_to_team_only_details,omitempty"` // GoogleSsoChangePolicyDetails : has no documentation (yet) GoogleSsoChangePolicyDetails *GoogleSsoChangePolicyDetails `json:"google_sso_change_policy_details,omitempty"` // GroupUserManagementChangePolicyDetails : has no documentation (yet) GroupUserManagementChangePolicyDetails *GroupUserManagementChangePolicyDetails `json:"group_user_management_change_policy_details,omitempty"` // MemberRequestsChangePolicyDetails : has no documentation (yet) MemberRequestsChangePolicyDetails *MemberRequestsChangePolicyDetails `json:"member_requests_change_policy_details,omitempty"` // MemberSpaceLimitsAddExceptionDetails : has no documentation (yet) MemberSpaceLimitsAddExceptionDetails *MemberSpaceLimitsAddExceptionDetails `json:"member_space_limits_add_exception_details,omitempty"` // MemberSpaceLimitsChangeCapsTypePolicyDetails : has no documentation (yet) MemberSpaceLimitsChangeCapsTypePolicyDetails *MemberSpaceLimitsChangeCapsTypePolicyDetails `json:"member_space_limits_change_caps_type_policy_details,omitempty"` // MemberSpaceLimitsChangePolicyDetails : has no documentation (yet) MemberSpaceLimitsChangePolicyDetails *MemberSpaceLimitsChangePolicyDetails `json:"member_space_limits_change_policy_details,omitempty"` // MemberSpaceLimitsRemoveExceptionDetails : has no documentation (yet) MemberSpaceLimitsRemoveExceptionDetails *MemberSpaceLimitsRemoveExceptionDetails `json:"member_space_limits_remove_exception_details,omitempty"` // MemberSuggestionsChangePolicyDetails : has no documentation (yet) MemberSuggestionsChangePolicyDetails *MemberSuggestionsChangePolicyDetails `json:"member_suggestions_change_policy_details,omitempty"` // MicrosoftOfficeAddinChangePolicyDetails : has no documentation (yet) MicrosoftOfficeAddinChangePolicyDetails *MicrosoftOfficeAddinChangePolicyDetails `json:"microsoft_office_addin_change_policy_details,omitempty"` // NetworkControlChangePolicyDetails : has no documentation (yet) NetworkControlChangePolicyDetails *NetworkControlChangePolicyDetails `json:"network_control_change_policy_details,omitempty"` // PaperChangeDeploymentPolicyDetails : has no documentation (yet) PaperChangeDeploymentPolicyDetails *PaperChangeDeploymentPolicyDetails `json:"paper_change_deployment_policy_details,omitempty"` // PaperChangeMemberLinkPolicyDetails : has no documentation (yet) PaperChangeMemberLinkPolicyDetails *PaperChangeMemberLinkPolicyDetails `json:"paper_change_member_link_policy_details,omitempty"` // PaperChangeMemberPolicyDetails : has no documentation (yet) PaperChangeMemberPolicyDetails *PaperChangeMemberPolicyDetails `json:"paper_change_member_policy_details,omitempty"` // PaperChangePolicyDetails : has no documentation (yet) PaperChangePolicyDetails *PaperChangePolicyDetails `json:"paper_change_policy_details,omitempty"` // PaperEnabledUsersGroupAdditionDetails : has no documentation (yet) PaperEnabledUsersGroupAdditionDetails *PaperEnabledUsersGroupAdditionDetails `json:"paper_enabled_users_group_addition_details,omitempty"` // PaperEnabledUsersGroupRemovalDetails : has no documentation (yet) PaperEnabledUsersGroupRemovalDetails *PaperEnabledUsersGroupRemovalDetails `json:"paper_enabled_users_group_removal_details,omitempty"` // PermanentDeleteChangePolicyDetails : has no documentation (yet) PermanentDeleteChangePolicyDetails *PermanentDeleteChangePolicyDetails `json:"permanent_delete_change_policy_details,omitempty"` // SharingChangeFolderJoinPolicyDetails : has no documentation (yet) SharingChangeFolderJoinPolicyDetails *SharingChangeFolderJoinPolicyDetails `json:"sharing_change_folder_join_policy_details,omitempty"` // SharingChangeLinkPolicyDetails : has no documentation (yet) SharingChangeLinkPolicyDetails *SharingChangeLinkPolicyDetails `json:"sharing_change_link_policy_details,omitempty"` // SharingChangeMemberPolicyDetails : has no documentation (yet) SharingChangeMemberPolicyDetails *SharingChangeMemberPolicyDetails `json:"sharing_change_member_policy_details,omitempty"` // ShowcaseChangeDownloadPolicyDetails : has no documentation (yet) ShowcaseChangeDownloadPolicyDetails *ShowcaseChangeDownloadPolicyDetails `json:"showcase_change_download_policy_details,omitempty"` // ShowcaseChangeEnabledPolicyDetails : has no documentation (yet) ShowcaseChangeEnabledPolicyDetails *ShowcaseChangeEnabledPolicyDetails `json:"showcase_change_enabled_policy_details,omitempty"` // ShowcaseChangeExternalSharingPolicyDetails : has no documentation (yet) ShowcaseChangeExternalSharingPolicyDetails *ShowcaseChangeExternalSharingPolicyDetails `json:"showcase_change_external_sharing_policy_details,omitempty"` // SmartSyncChangePolicyDetails : has no documentation (yet) SmartSyncChangePolicyDetails *SmartSyncChangePolicyDetails `json:"smart_sync_change_policy_details,omitempty"` // SmartSyncNotOptOutDetails : has no documentation (yet) SmartSyncNotOptOutDetails *SmartSyncNotOptOutDetails `json:"smart_sync_not_opt_out_details,omitempty"` // SmartSyncOptOutDetails : has no documentation (yet) SmartSyncOptOutDetails *SmartSyncOptOutDetails `json:"smart_sync_opt_out_details,omitempty"` // SsoChangePolicyDetails : has no documentation (yet) SsoChangePolicyDetails *SsoChangePolicyDetails `json:"sso_change_policy_details,omitempty"` // TeamSelectiveSyncPolicyChangedDetails : has no documentation (yet) TeamSelectiveSyncPolicyChangedDetails *TeamSelectiveSyncPolicyChangedDetails `json:"team_selective_sync_policy_changed_details,omitempty"` // TfaChangePolicyDetails : has no documentation (yet) TfaChangePolicyDetails *TfaChangePolicyDetails `json:"tfa_change_policy_details,omitempty"` // TwoAccountChangePolicyDetails : has no documentation (yet) TwoAccountChangePolicyDetails *TwoAccountChangePolicyDetails `json:"two_account_change_policy_details,omitempty"` // ViewerInfoPolicyChangedDetails : has no documentation (yet) ViewerInfoPolicyChangedDetails *ViewerInfoPolicyChangedDetails `json:"viewer_info_policy_changed_details,omitempty"` // WebSessionsChangeFixedLengthPolicyDetails : has no documentation (yet) WebSessionsChangeFixedLengthPolicyDetails *WebSessionsChangeFixedLengthPolicyDetails `json:"web_sessions_change_fixed_length_policy_details,omitempty"` // WebSessionsChangeIdleLengthPolicyDetails : has no documentation (yet) WebSessionsChangeIdleLengthPolicyDetails *WebSessionsChangeIdleLengthPolicyDetails `json:"web_sessions_change_idle_length_policy_details,omitempty"` // TeamMergeFromDetails : has no documentation (yet) TeamMergeFromDetails *TeamMergeFromDetails `json:"team_merge_from_details,omitempty"` // TeamMergeToDetails : has no documentation (yet) TeamMergeToDetails *TeamMergeToDetails `json:"team_merge_to_details,omitempty"` // TeamProfileAddLogoDetails : has no documentation (yet) TeamProfileAddLogoDetails *TeamProfileAddLogoDetails `json:"team_profile_add_logo_details,omitempty"` // TeamProfileChangeDefaultLanguageDetails : has no documentation (yet) TeamProfileChangeDefaultLanguageDetails *TeamProfileChangeDefaultLanguageDetails `json:"team_profile_change_default_language_details,omitempty"` // TeamProfileChangeLogoDetails : has no documentation (yet) TeamProfileChangeLogoDetails *TeamProfileChangeLogoDetails `json:"team_profile_change_logo_details,omitempty"` // TeamProfileChangeNameDetails : has no documentation (yet) TeamProfileChangeNameDetails *TeamProfileChangeNameDetails `json:"team_profile_change_name_details,omitempty"` // TeamProfileRemoveLogoDetails : has no documentation (yet) TeamProfileRemoveLogoDetails *TeamProfileRemoveLogoDetails `json:"team_profile_remove_logo_details,omitempty"` // TfaAddBackupPhoneDetails : has no documentation (yet) TfaAddBackupPhoneDetails *TfaAddBackupPhoneDetails `json:"tfa_add_backup_phone_details,omitempty"` // TfaAddSecurityKeyDetails : has no documentation (yet) TfaAddSecurityKeyDetails *TfaAddSecurityKeyDetails `json:"tfa_add_security_key_details,omitempty"` // TfaChangeBackupPhoneDetails : has no documentation (yet) TfaChangeBackupPhoneDetails *TfaChangeBackupPhoneDetails `json:"tfa_change_backup_phone_details,omitempty"` // TfaChangeStatusDetails : has no documentation (yet) TfaChangeStatusDetails *TfaChangeStatusDetails `json:"tfa_change_status_details,omitempty"` // TfaRemoveBackupPhoneDetails : has no documentation (yet) TfaRemoveBackupPhoneDetails *TfaRemoveBackupPhoneDetails `json:"tfa_remove_backup_phone_details,omitempty"` // TfaRemoveSecurityKeyDetails : has no documentation (yet) TfaRemoveSecurityKeyDetails *TfaRemoveSecurityKeyDetails `json:"tfa_remove_security_key_details,omitempty"` // TfaResetDetails : has no documentation (yet) TfaResetDetails *TfaResetDetails `json:"tfa_reset_details,omitempty"` // MissingDetails : Hints that this event was returned with missing details // due to an internal error. MissingDetails *MissingDetails `json:"missing_details,omitempty"` } // Valid tag values for EventDetails const ( EventDetailsAppLinkTeamDetails = "app_link_team_details" EventDetailsAppLinkUserDetails = "app_link_user_details" EventDetailsAppUnlinkTeamDetails = "app_unlink_team_details" EventDetailsAppUnlinkUserDetails = "app_unlink_user_details" EventDetailsFileAddCommentDetails = "file_add_comment_details" EventDetailsFileChangeCommentSubscriptionDetails = "file_change_comment_subscription_details" EventDetailsFileDeleteCommentDetails = "file_delete_comment_details" EventDetailsFileEditCommentDetails = "file_edit_comment_details" EventDetailsFileLikeCommentDetails = "file_like_comment_details" EventDetailsFileResolveCommentDetails = "file_resolve_comment_details" EventDetailsFileUnlikeCommentDetails = "file_unlike_comment_details" EventDetailsFileUnresolveCommentDetails = "file_unresolve_comment_details" EventDetailsDeviceChangeIpDesktopDetails = "device_change_ip_desktop_details" EventDetailsDeviceChangeIpMobileDetails = "device_change_ip_mobile_details" EventDetailsDeviceChangeIpWebDetails = "device_change_ip_web_details" EventDetailsDeviceDeleteOnUnlinkFailDetails = "device_delete_on_unlink_fail_details" EventDetailsDeviceDeleteOnUnlinkSuccessDetails = "device_delete_on_unlink_success_details" EventDetailsDeviceLinkFailDetails = "device_link_fail_details" EventDetailsDeviceLinkSuccessDetails = "device_link_success_details" EventDetailsDeviceManagementDisabledDetails = "device_management_disabled_details" EventDetailsDeviceManagementEnabledDetails = "device_management_enabled_details" EventDetailsDeviceUnlinkDetails = "device_unlink_details" EventDetailsEmmRefreshAuthTokenDetails = "emm_refresh_auth_token_details" EventDetailsAccountCaptureChangeAvailabilityDetails = "account_capture_change_availability_details" EventDetailsAccountCaptureMigrateAccountDetails = "account_capture_migrate_account_details" EventDetailsAccountCaptureNotificationEmailsSentDetails = "account_capture_notification_emails_sent_details" EventDetailsAccountCaptureRelinquishAccountDetails = "account_capture_relinquish_account_details" EventDetailsDisabledDomainInvitesDetails = "disabled_domain_invites_details" EventDetailsDomainInvitesApproveRequestToJoinTeamDetails = "domain_invites_approve_request_to_join_team_details" EventDetailsDomainInvitesDeclineRequestToJoinTeamDetails = "domain_invites_decline_request_to_join_team_details" EventDetailsDomainInvitesEmailExistingUsersDetails = "domain_invites_email_existing_users_details" EventDetailsDomainInvitesRequestToJoinTeamDetails = "domain_invites_request_to_join_team_details" EventDetailsDomainInvitesSetInviteNewUserPrefToNoDetails = "domain_invites_set_invite_new_user_pref_to_no_details" EventDetailsDomainInvitesSetInviteNewUserPrefToYesDetails = "domain_invites_set_invite_new_user_pref_to_yes_details" EventDetailsDomainVerificationAddDomainFailDetails = "domain_verification_add_domain_fail_details" EventDetailsDomainVerificationAddDomainSuccessDetails = "domain_verification_add_domain_success_details" EventDetailsDomainVerificationRemoveDomainDetails = "domain_verification_remove_domain_details" EventDetailsEnabledDomainInvitesDetails = "enabled_domain_invites_details" EventDetailsCreateFolderDetails = "create_folder_details" EventDetailsFileAddDetails = "file_add_details" EventDetailsFileCopyDetails = "file_copy_details" EventDetailsFileDeleteDetails = "file_delete_details" EventDetailsFileDownloadDetails = "file_download_details" EventDetailsFileEditDetails = "file_edit_details" EventDetailsFileGetCopyReferenceDetails = "file_get_copy_reference_details" EventDetailsFileMoveDetails = "file_move_details" EventDetailsFilePermanentlyDeleteDetails = "file_permanently_delete_details" EventDetailsFilePreviewDetails = "file_preview_details" EventDetailsFileRenameDetails = "file_rename_details" EventDetailsFileRestoreDetails = "file_restore_details" EventDetailsFileRevertDetails = "file_revert_details" EventDetailsFileRollbackChangesDetails = "file_rollback_changes_details" EventDetailsFileSaveCopyReferenceDetails = "file_save_copy_reference_details" EventDetailsFileRequestChangeDetails = "file_request_change_details" EventDetailsFileRequestCloseDetails = "file_request_close_details" EventDetailsFileRequestCreateDetails = "file_request_create_details" EventDetailsFileRequestReceiveFileDetails = "file_request_receive_file_details" EventDetailsGroupAddExternalIdDetails = "group_add_external_id_details" EventDetailsGroupAddMemberDetails = "group_add_member_details" EventDetailsGroupChangeExternalIdDetails = "group_change_external_id_details" EventDetailsGroupChangeManagementTypeDetails = "group_change_management_type_details" EventDetailsGroupChangeMemberRoleDetails = "group_change_member_role_details" EventDetailsGroupCreateDetails = "group_create_details" EventDetailsGroupDeleteDetails = "group_delete_details" EventDetailsGroupDescriptionUpdatedDetails = "group_description_updated_details" EventDetailsGroupJoinPolicyUpdatedDetails = "group_join_policy_updated_details" EventDetailsGroupMovedDetails = "group_moved_details" EventDetailsGroupRemoveExternalIdDetails = "group_remove_external_id_details" EventDetailsGroupRemoveMemberDetails = "group_remove_member_details" EventDetailsGroupRenameDetails = "group_rename_details" EventDetailsEmmErrorDetails = "emm_error_details" EventDetailsLoginFailDetails = "login_fail_details" EventDetailsLoginSuccessDetails = "login_success_details" EventDetailsLogoutDetails = "logout_details" EventDetailsResellerSupportSessionEndDetails = "reseller_support_session_end_details" EventDetailsResellerSupportSessionStartDetails = "reseller_support_session_start_details" EventDetailsSignInAsSessionEndDetails = "sign_in_as_session_end_details" EventDetailsSignInAsSessionStartDetails = "sign_in_as_session_start_details" EventDetailsSsoErrorDetails = "sso_error_details" EventDetailsMemberAddNameDetails = "member_add_name_details" EventDetailsMemberChangeAdminRoleDetails = "member_change_admin_role_details" EventDetailsMemberChangeEmailDetails = "member_change_email_details" EventDetailsMemberChangeMembershipTypeDetails = "member_change_membership_type_details" EventDetailsMemberChangeNameDetails = "member_change_name_details" EventDetailsMemberChangeStatusDetails = "member_change_status_details" EventDetailsMemberDeleteManualContactsDetails = "member_delete_manual_contacts_details" EventDetailsMemberPermanentlyDeleteAccountContentsDetails = "member_permanently_delete_account_contents_details" EventDetailsMemberSpaceLimitsAddCustomQuotaDetails = "member_space_limits_add_custom_quota_details" EventDetailsMemberSpaceLimitsChangeCustomQuotaDetails = "member_space_limits_change_custom_quota_details" EventDetailsMemberSpaceLimitsChangeStatusDetails = "member_space_limits_change_status_details" EventDetailsMemberSpaceLimitsRemoveCustomQuotaDetails = "member_space_limits_remove_custom_quota_details" EventDetailsMemberSuggestDetails = "member_suggest_details" EventDetailsMemberTransferAccountContentsDetails = "member_transfer_account_contents_details" EventDetailsSecondaryMailsPolicyChangedDetails = "secondary_mails_policy_changed_details" EventDetailsPaperContentAddMemberDetails = "paper_content_add_member_details" EventDetailsPaperContentAddToFolderDetails = "paper_content_add_to_folder_details" EventDetailsPaperContentArchiveDetails = "paper_content_archive_details" EventDetailsPaperContentCreateDetails = "paper_content_create_details" EventDetailsPaperContentPermanentlyDeleteDetails = "paper_content_permanently_delete_details" EventDetailsPaperContentRemoveFromFolderDetails = "paper_content_remove_from_folder_details" EventDetailsPaperContentRemoveMemberDetails = "paper_content_remove_member_details" EventDetailsPaperContentRenameDetails = "paper_content_rename_details" EventDetailsPaperContentRestoreDetails = "paper_content_restore_details" EventDetailsPaperDocAddCommentDetails = "paper_doc_add_comment_details" EventDetailsPaperDocChangeMemberRoleDetails = "paper_doc_change_member_role_details" EventDetailsPaperDocChangeSharingPolicyDetails = "paper_doc_change_sharing_policy_details" EventDetailsPaperDocChangeSubscriptionDetails = "paper_doc_change_subscription_details" EventDetailsPaperDocDeletedDetails = "paper_doc_deleted_details" EventDetailsPaperDocDeleteCommentDetails = "paper_doc_delete_comment_details" EventDetailsPaperDocDownloadDetails = "paper_doc_download_details" EventDetailsPaperDocEditDetails = "paper_doc_edit_details" EventDetailsPaperDocEditCommentDetails = "paper_doc_edit_comment_details" EventDetailsPaperDocFollowedDetails = "paper_doc_followed_details" EventDetailsPaperDocMentionDetails = "paper_doc_mention_details" EventDetailsPaperDocOwnershipChangedDetails = "paper_doc_ownership_changed_details" EventDetailsPaperDocRequestAccessDetails = "paper_doc_request_access_details" EventDetailsPaperDocResolveCommentDetails = "paper_doc_resolve_comment_details" EventDetailsPaperDocRevertDetails = "paper_doc_revert_details" EventDetailsPaperDocSlackShareDetails = "paper_doc_slack_share_details" EventDetailsPaperDocTeamInviteDetails = "paper_doc_team_invite_details" EventDetailsPaperDocTrashedDetails = "paper_doc_trashed_details" EventDetailsPaperDocUnresolveCommentDetails = "paper_doc_unresolve_comment_details" EventDetailsPaperDocUntrashedDetails = "paper_doc_untrashed_details" EventDetailsPaperDocViewDetails = "paper_doc_view_details" EventDetailsPaperExternalViewAllowDetails = "paper_external_view_allow_details" EventDetailsPaperExternalViewDefaultTeamDetails = "paper_external_view_default_team_details" EventDetailsPaperExternalViewForbidDetails = "paper_external_view_forbid_details" EventDetailsPaperFolderChangeSubscriptionDetails = "paper_folder_change_subscription_details" EventDetailsPaperFolderDeletedDetails = "paper_folder_deleted_details" EventDetailsPaperFolderFollowedDetails = "paper_folder_followed_details" EventDetailsPaperFolderTeamInviteDetails = "paper_folder_team_invite_details" EventDetailsPasswordChangeDetails = "password_change_details" EventDetailsPasswordResetDetails = "password_reset_details" EventDetailsPasswordResetAllDetails = "password_reset_all_details" EventDetailsEmmCreateExceptionsReportDetails = "emm_create_exceptions_report_details" EventDetailsEmmCreateUsageReportDetails = "emm_create_usage_report_details" EventDetailsExportMembersReportDetails = "export_members_report_details" EventDetailsPaperAdminExportStartDetails = "paper_admin_export_start_details" EventDetailsSmartSyncCreateAdminPrivilegeReportDetails = "smart_sync_create_admin_privilege_report_details" EventDetailsTeamActivityCreateReportDetails = "team_activity_create_report_details" EventDetailsCollectionShareDetails = "collection_share_details" EventDetailsNoteAclInviteOnlyDetails = "note_acl_invite_only_details" EventDetailsNoteAclLinkDetails = "note_acl_link_details" EventDetailsNoteAclTeamLinkDetails = "note_acl_team_link_details" EventDetailsNoteSharedDetails = "note_shared_details" EventDetailsNoteShareReceiveDetails = "note_share_receive_details" EventDetailsOpenNoteSharedDetails = "open_note_shared_details" EventDetailsSfAddGroupDetails = "sf_add_group_details" EventDetailsSfAllowNonMembersToViewSharedLinksDetails = "sf_allow_non_members_to_view_shared_links_details" EventDetailsSfExternalInviteWarnDetails = "sf_external_invite_warn_details" EventDetailsSfFbInviteDetails = "sf_fb_invite_details" EventDetailsSfFbInviteChangeRoleDetails = "sf_fb_invite_change_role_details" EventDetailsSfFbUninviteDetails = "sf_fb_uninvite_details" EventDetailsSfInviteGroupDetails = "sf_invite_group_details" EventDetailsSfTeamGrantAccessDetails = "sf_team_grant_access_details" EventDetailsSfTeamInviteDetails = "sf_team_invite_details" EventDetailsSfTeamInviteChangeRoleDetails = "sf_team_invite_change_role_details" EventDetailsSfTeamJoinDetails = "sf_team_join_details" EventDetailsSfTeamJoinFromOobLinkDetails = "sf_team_join_from_oob_link_details" EventDetailsSfTeamUninviteDetails = "sf_team_uninvite_details" EventDetailsSharedContentAddInviteesDetails = "shared_content_add_invitees_details" EventDetailsSharedContentAddLinkExpiryDetails = "shared_content_add_link_expiry_details" EventDetailsSharedContentAddLinkPasswordDetails = "shared_content_add_link_password_details" EventDetailsSharedContentAddMemberDetails = "shared_content_add_member_details" EventDetailsSharedContentChangeDownloadsPolicyDetails = "shared_content_change_downloads_policy_details" EventDetailsSharedContentChangeInviteeRoleDetails = "shared_content_change_invitee_role_details" EventDetailsSharedContentChangeLinkAudienceDetails = "shared_content_change_link_audience_details" EventDetailsSharedContentChangeLinkExpiryDetails = "shared_content_change_link_expiry_details" EventDetailsSharedContentChangeLinkPasswordDetails = "shared_content_change_link_password_details" EventDetailsSharedContentChangeMemberRoleDetails = "shared_content_change_member_role_details" EventDetailsSharedContentChangeViewerInfoPolicyDetails = "shared_content_change_viewer_info_policy_details" EventDetailsSharedContentClaimInvitationDetails = "shared_content_claim_invitation_details" EventDetailsSharedContentCopyDetails = "shared_content_copy_details" EventDetailsSharedContentDownloadDetails = "shared_content_download_details" EventDetailsSharedContentRelinquishMembershipDetails = "shared_content_relinquish_membership_details" EventDetailsSharedContentRemoveInviteesDetails = "shared_content_remove_invitees_details" EventDetailsSharedContentRemoveLinkExpiryDetails = "shared_content_remove_link_expiry_details" EventDetailsSharedContentRemoveLinkPasswordDetails = "shared_content_remove_link_password_details" EventDetailsSharedContentRemoveMemberDetails = "shared_content_remove_member_details" EventDetailsSharedContentRequestAccessDetails = "shared_content_request_access_details" EventDetailsSharedContentUnshareDetails = "shared_content_unshare_details" EventDetailsSharedContentViewDetails = "shared_content_view_details" EventDetailsSharedFolderChangeLinkPolicyDetails = "shared_folder_change_link_policy_details" EventDetailsSharedFolderChangeMembersInheritancePolicyDetails = "shared_folder_change_members_inheritance_policy_details" EventDetailsSharedFolderChangeMembersManagementPolicyDetails = "shared_folder_change_members_management_policy_details" EventDetailsSharedFolderChangeMembersPolicyDetails = "shared_folder_change_members_policy_details" EventDetailsSharedFolderCreateDetails = "shared_folder_create_details" EventDetailsSharedFolderDeclineInvitationDetails = "shared_folder_decline_invitation_details" EventDetailsSharedFolderMountDetails = "shared_folder_mount_details" EventDetailsSharedFolderNestDetails = "shared_folder_nest_details" EventDetailsSharedFolderTransferOwnershipDetails = "shared_folder_transfer_ownership_details" EventDetailsSharedFolderUnmountDetails = "shared_folder_unmount_details" EventDetailsSharedLinkAddExpiryDetails = "shared_link_add_expiry_details" EventDetailsSharedLinkChangeExpiryDetails = "shared_link_change_expiry_details" EventDetailsSharedLinkChangeVisibilityDetails = "shared_link_change_visibility_details" EventDetailsSharedLinkCopyDetails = "shared_link_copy_details" EventDetailsSharedLinkCreateDetails = "shared_link_create_details" EventDetailsSharedLinkDisableDetails = "shared_link_disable_details" EventDetailsSharedLinkDownloadDetails = "shared_link_download_details" EventDetailsSharedLinkRemoveExpiryDetails = "shared_link_remove_expiry_details" EventDetailsSharedLinkShareDetails = "shared_link_share_details" EventDetailsSharedLinkViewDetails = "shared_link_view_details" EventDetailsSharedNoteOpenedDetails = "shared_note_opened_details" EventDetailsShmodelGroupShareDetails = "shmodel_group_share_details" EventDetailsShowcaseAccessGrantedDetails = "showcase_access_granted_details" EventDetailsShowcaseAddMemberDetails = "showcase_add_member_details" EventDetailsShowcaseArchivedDetails = "showcase_archived_details" EventDetailsShowcaseCreatedDetails = "showcase_created_details" EventDetailsShowcaseDeleteCommentDetails = "showcase_delete_comment_details" EventDetailsShowcaseEditedDetails = "showcase_edited_details" EventDetailsShowcaseEditCommentDetails = "showcase_edit_comment_details" EventDetailsShowcaseFileAddedDetails = "showcase_file_added_details" EventDetailsShowcaseFileDownloadDetails = "showcase_file_download_details" EventDetailsShowcaseFileRemovedDetails = "showcase_file_removed_details" EventDetailsShowcaseFileViewDetails = "showcase_file_view_details" EventDetailsShowcasePermanentlyDeletedDetails = "showcase_permanently_deleted_details" EventDetailsShowcasePostCommentDetails = "showcase_post_comment_details" EventDetailsShowcaseRemoveMemberDetails = "showcase_remove_member_details" EventDetailsShowcaseRenamedDetails = "showcase_renamed_details" EventDetailsShowcaseRequestAccessDetails = "showcase_request_access_details" EventDetailsShowcaseResolveCommentDetails = "showcase_resolve_comment_details" EventDetailsShowcaseRestoredDetails = "showcase_restored_details" EventDetailsShowcaseTrashedDetails = "showcase_trashed_details" EventDetailsShowcaseTrashedDeprecatedDetails = "showcase_trashed_deprecated_details" EventDetailsShowcaseUnresolveCommentDetails = "showcase_unresolve_comment_details" EventDetailsShowcaseUntrashedDetails = "showcase_untrashed_details" EventDetailsShowcaseUntrashedDeprecatedDetails = "showcase_untrashed_deprecated_details" EventDetailsShowcaseViewDetails = "showcase_view_details" EventDetailsSsoAddCertDetails = "sso_add_cert_details" EventDetailsSsoAddLoginUrlDetails = "sso_add_login_url_details" EventDetailsSsoAddLogoutUrlDetails = "sso_add_logout_url_details" EventDetailsSsoChangeCertDetails = "sso_change_cert_details" EventDetailsSsoChangeLoginUrlDetails = "sso_change_login_url_details" EventDetailsSsoChangeLogoutUrlDetails = "sso_change_logout_url_details" EventDetailsSsoChangeSamlIdentityModeDetails = "sso_change_saml_identity_mode_details" EventDetailsSsoRemoveCertDetails = "sso_remove_cert_details" EventDetailsSsoRemoveLoginUrlDetails = "sso_remove_login_url_details" EventDetailsSsoRemoveLogoutUrlDetails = "sso_remove_logout_url_details" EventDetailsTeamFolderChangeStatusDetails = "team_folder_change_status_details" EventDetailsTeamFolderCreateDetails = "team_folder_create_details" EventDetailsTeamFolderDowngradeDetails = "team_folder_downgrade_details" EventDetailsTeamFolderPermanentlyDeleteDetails = "team_folder_permanently_delete_details" EventDetailsTeamFolderRenameDetails = "team_folder_rename_details" EventDetailsTeamSelectiveSyncSettingsChangedDetails = "team_selective_sync_settings_changed_details" EventDetailsAccountCaptureChangePolicyDetails = "account_capture_change_policy_details" EventDetailsAllowDownloadDisabledDetails = "allow_download_disabled_details" EventDetailsAllowDownloadEnabledDetails = "allow_download_enabled_details" EventDetailsCameraUploadsPolicyChangedDetails = "camera_uploads_policy_changed_details" EventDetailsDataPlacementRestrictionChangePolicyDetails = "data_placement_restriction_change_policy_details" EventDetailsDataPlacementRestrictionSatisfyPolicyDetails = "data_placement_restriction_satisfy_policy_details" EventDetailsDeviceApprovalsChangeDesktopPolicyDetails = "device_approvals_change_desktop_policy_details" EventDetailsDeviceApprovalsChangeMobilePolicyDetails = "device_approvals_change_mobile_policy_details" EventDetailsDeviceApprovalsChangeOverageActionDetails = "device_approvals_change_overage_action_details" EventDetailsDeviceApprovalsChangeUnlinkActionDetails = "device_approvals_change_unlink_action_details" EventDetailsDirectoryRestrictionsAddMembersDetails = "directory_restrictions_add_members_details" EventDetailsDirectoryRestrictionsRemoveMembersDetails = "directory_restrictions_remove_members_details" EventDetailsEmmAddExceptionDetails = "emm_add_exception_details" EventDetailsEmmChangePolicyDetails = "emm_change_policy_details" EventDetailsEmmRemoveExceptionDetails = "emm_remove_exception_details" EventDetailsExtendedVersionHistoryChangePolicyDetails = "extended_version_history_change_policy_details" EventDetailsFileCommentsChangePolicyDetails = "file_comments_change_policy_details" EventDetailsFileRequestsChangePolicyDetails = "file_requests_change_policy_details" EventDetailsFileRequestsEmailsEnabledDetails = "file_requests_emails_enabled_details" EventDetailsFileRequestsEmailsRestrictedToTeamOnlyDetails = "file_requests_emails_restricted_to_team_only_details" EventDetailsGoogleSsoChangePolicyDetails = "google_sso_change_policy_details" EventDetailsGroupUserManagementChangePolicyDetails = "group_user_management_change_policy_details" EventDetailsMemberRequestsChangePolicyDetails = "member_requests_change_policy_details" EventDetailsMemberSpaceLimitsAddExceptionDetails = "member_space_limits_add_exception_details" EventDetailsMemberSpaceLimitsChangeCapsTypePolicyDetails = "member_space_limits_change_caps_type_policy_details" EventDetailsMemberSpaceLimitsChangePolicyDetails = "member_space_limits_change_policy_details" EventDetailsMemberSpaceLimitsRemoveExceptionDetails = "member_space_limits_remove_exception_details" EventDetailsMemberSuggestionsChangePolicyDetails = "member_suggestions_change_policy_details" EventDetailsMicrosoftOfficeAddinChangePolicyDetails = "microsoft_office_addin_change_policy_details" EventDetailsNetworkControlChangePolicyDetails = "network_control_change_policy_details" EventDetailsPaperChangeDeploymentPolicyDetails = "paper_change_deployment_policy_details" EventDetailsPaperChangeMemberLinkPolicyDetails = "paper_change_member_link_policy_details" EventDetailsPaperChangeMemberPolicyDetails = "paper_change_member_policy_details" EventDetailsPaperChangePolicyDetails = "paper_change_policy_details" EventDetailsPaperEnabledUsersGroupAdditionDetails = "paper_enabled_users_group_addition_details" EventDetailsPaperEnabledUsersGroupRemovalDetails = "paper_enabled_users_group_removal_details" EventDetailsPermanentDeleteChangePolicyDetails = "permanent_delete_change_policy_details" EventDetailsSharingChangeFolderJoinPolicyDetails = "sharing_change_folder_join_policy_details" EventDetailsSharingChangeLinkPolicyDetails = "sharing_change_link_policy_details" EventDetailsSharingChangeMemberPolicyDetails = "sharing_change_member_policy_details" EventDetailsShowcaseChangeDownloadPolicyDetails = "showcase_change_download_policy_details" EventDetailsShowcaseChangeEnabledPolicyDetails = "showcase_change_enabled_policy_details" EventDetailsShowcaseChangeExternalSharingPolicyDetails = "showcase_change_external_sharing_policy_details" EventDetailsSmartSyncChangePolicyDetails = "smart_sync_change_policy_details" EventDetailsSmartSyncNotOptOutDetails = "smart_sync_not_opt_out_details" EventDetailsSmartSyncOptOutDetails = "smart_sync_opt_out_details" EventDetailsSsoChangePolicyDetails = "sso_change_policy_details" EventDetailsTeamSelectiveSyncPolicyChangedDetails = "team_selective_sync_policy_changed_details" EventDetailsTfaChangePolicyDetails = "tfa_change_policy_details" EventDetailsTwoAccountChangePolicyDetails = "two_account_change_policy_details" EventDetailsViewerInfoPolicyChangedDetails = "viewer_info_policy_changed_details" EventDetailsWebSessionsChangeFixedLengthPolicyDetails = "web_sessions_change_fixed_length_policy_details" EventDetailsWebSessionsChangeIdleLengthPolicyDetails = "web_sessions_change_idle_length_policy_details" EventDetailsTeamMergeFromDetails = "team_merge_from_details" EventDetailsTeamMergeToDetails = "team_merge_to_details" EventDetailsTeamProfileAddLogoDetails = "team_profile_add_logo_details" EventDetailsTeamProfileChangeDefaultLanguageDetails = "team_profile_change_default_language_details" EventDetailsTeamProfileChangeLogoDetails = "team_profile_change_logo_details" EventDetailsTeamProfileChangeNameDetails = "team_profile_change_name_details" EventDetailsTeamProfileRemoveLogoDetails = "team_profile_remove_logo_details" EventDetailsTfaAddBackupPhoneDetails = "tfa_add_backup_phone_details" EventDetailsTfaAddSecurityKeyDetails = "tfa_add_security_key_details" EventDetailsTfaChangeBackupPhoneDetails = "tfa_change_backup_phone_details" EventDetailsTfaChangeStatusDetails = "tfa_change_status_details" EventDetailsTfaRemoveBackupPhoneDetails = "tfa_remove_backup_phone_details" EventDetailsTfaRemoveSecurityKeyDetails = "tfa_remove_security_key_details" EventDetailsTfaResetDetails = "tfa_reset_details" EventDetailsMissingDetails = "missing_details" EventDetailsOther = "other" ) // UnmarshalJSON deserializes into a EventDetails instance func (u *EventDetails) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AppLinkTeamDetails : has no documentation (yet) AppLinkTeamDetails json.RawMessage `json:"app_link_team_details,omitempty"` // AppLinkUserDetails : has no documentation (yet) AppLinkUserDetails json.RawMessage `json:"app_link_user_details,omitempty"` // AppUnlinkTeamDetails : has no documentation (yet) AppUnlinkTeamDetails json.RawMessage `json:"app_unlink_team_details,omitempty"` // AppUnlinkUserDetails : has no documentation (yet) AppUnlinkUserDetails json.RawMessage `json:"app_unlink_user_details,omitempty"` // FileAddCommentDetails : has no documentation (yet) FileAddCommentDetails json.RawMessage `json:"file_add_comment_details,omitempty"` // FileChangeCommentSubscriptionDetails : has no documentation (yet) FileChangeCommentSubscriptionDetails json.RawMessage `json:"file_change_comment_subscription_details,omitempty"` // FileDeleteCommentDetails : has no documentation (yet) FileDeleteCommentDetails json.RawMessage `json:"file_delete_comment_details,omitempty"` // FileEditCommentDetails : has no documentation (yet) FileEditCommentDetails json.RawMessage `json:"file_edit_comment_details,omitempty"` // FileLikeCommentDetails : has no documentation (yet) FileLikeCommentDetails json.RawMessage `json:"file_like_comment_details,omitempty"` // FileResolveCommentDetails : has no documentation (yet) FileResolveCommentDetails json.RawMessage `json:"file_resolve_comment_details,omitempty"` // FileUnlikeCommentDetails : has no documentation (yet) FileUnlikeCommentDetails json.RawMessage `json:"file_unlike_comment_details,omitempty"` // FileUnresolveCommentDetails : has no documentation (yet) FileUnresolveCommentDetails json.RawMessage `json:"file_unresolve_comment_details,omitempty"` // DeviceChangeIpDesktopDetails : has no documentation (yet) DeviceChangeIpDesktopDetails json.RawMessage `json:"device_change_ip_desktop_details,omitempty"` // DeviceChangeIpMobileDetails : has no documentation (yet) DeviceChangeIpMobileDetails json.RawMessage `json:"device_change_ip_mobile_details,omitempty"` // DeviceChangeIpWebDetails : has no documentation (yet) DeviceChangeIpWebDetails json.RawMessage `json:"device_change_ip_web_details,omitempty"` // DeviceDeleteOnUnlinkFailDetails : has no documentation (yet) DeviceDeleteOnUnlinkFailDetails json.RawMessage `json:"device_delete_on_unlink_fail_details,omitempty"` // DeviceDeleteOnUnlinkSuccessDetails : has no documentation (yet) DeviceDeleteOnUnlinkSuccessDetails json.RawMessage `json:"device_delete_on_unlink_success_details,omitempty"` // DeviceLinkFailDetails : has no documentation (yet) DeviceLinkFailDetails json.RawMessage `json:"device_link_fail_details,omitempty"` // DeviceLinkSuccessDetails : has no documentation (yet) DeviceLinkSuccessDetails json.RawMessage `json:"device_link_success_details,omitempty"` // DeviceManagementDisabledDetails : has no documentation (yet) DeviceManagementDisabledDetails json.RawMessage `json:"device_management_disabled_details,omitempty"` // DeviceManagementEnabledDetails : has no documentation (yet) DeviceManagementEnabledDetails json.RawMessage `json:"device_management_enabled_details,omitempty"` // DeviceUnlinkDetails : has no documentation (yet) DeviceUnlinkDetails json.RawMessage `json:"device_unlink_details,omitempty"` // EmmRefreshAuthTokenDetails : has no documentation (yet) EmmRefreshAuthTokenDetails json.RawMessage `json:"emm_refresh_auth_token_details,omitempty"` // AccountCaptureChangeAvailabilityDetails : has no documentation (yet) AccountCaptureChangeAvailabilityDetails json.RawMessage `json:"account_capture_change_availability_details,omitempty"` // AccountCaptureMigrateAccountDetails : has no documentation (yet) AccountCaptureMigrateAccountDetails json.RawMessage `json:"account_capture_migrate_account_details,omitempty"` // AccountCaptureNotificationEmailsSentDetails : has no documentation // (yet) AccountCaptureNotificationEmailsSentDetails json.RawMessage `json:"account_capture_notification_emails_sent_details,omitempty"` // AccountCaptureRelinquishAccountDetails : has no documentation (yet) AccountCaptureRelinquishAccountDetails json.RawMessage `json:"account_capture_relinquish_account_details,omitempty"` // DisabledDomainInvitesDetails : has no documentation (yet) DisabledDomainInvitesDetails json.RawMessage `json:"disabled_domain_invites_details,omitempty"` // DomainInvitesApproveRequestToJoinTeamDetails : has no documentation // (yet) DomainInvitesApproveRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_approve_request_to_join_team_details,omitempty"` // DomainInvitesDeclineRequestToJoinTeamDetails : has no documentation // (yet) DomainInvitesDeclineRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_decline_request_to_join_team_details,omitempty"` // DomainInvitesEmailExistingUsersDetails : has no documentation (yet) DomainInvitesEmailExistingUsersDetails json.RawMessage `json:"domain_invites_email_existing_users_details,omitempty"` // DomainInvitesRequestToJoinTeamDetails : has no documentation (yet) DomainInvitesRequestToJoinTeamDetails json.RawMessage `json:"domain_invites_request_to_join_team_details,omitempty"` // DomainInvitesSetInviteNewUserPrefToNoDetails : has no documentation // (yet) DomainInvitesSetInviteNewUserPrefToNoDetails json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_no_details,omitempty"` // DomainInvitesSetInviteNewUserPrefToYesDetails : has no documentation // (yet) DomainInvitesSetInviteNewUserPrefToYesDetails json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_yes_details,omitempty"` // DomainVerificationAddDomainFailDetails : has no documentation (yet) DomainVerificationAddDomainFailDetails json.RawMessage `json:"domain_verification_add_domain_fail_details,omitempty"` // DomainVerificationAddDomainSuccessDetails : has no documentation // (yet) DomainVerificationAddDomainSuccessDetails json.RawMessage `json:"domain_verification_add_domain_success_details,omitempty"` // DomainVerificationRemoveDomainDetails : has no documentation (yet) DomainVerificationRemoveDomainDetails json.RawMessage `json:"domain_verification_remove_domain_details,omitempty"` // EnabledDomainInvitesDetails : has no documentation (yet) EnabledDomainInvitesDetails json.RawMessage `json:"enabled_domain_invites_details,omitempty"` // CreateFolderDetails : has no documentation (yet) CreateFolderDetails json.RawMessage `json:"create_folder_details,omitempty"` // FileAddDetails : has no documentation (yet) FileAddDetails json.RawMessage `json:"file_add_details,omitempty"` // FileCopyDetails : has no documentation (yet) FileCopyDetails json.RawMessage `json:"file_copy_details,omitempty"` // FileDeleteDetails : has no documentation (yet) FileDeleteDetails json.RawMessage `json:"file_delete_details,omitempty"` // FileDownloadDetails : has no documentation (yet) FileDownloadDetails json.RawMessage `json:"file_download_details,omitempty"` // FileEditDetails : has no documentation (yet) FileEditDetails json.RawMessage `json:"file_edit_details,omitempty"` // FileGetCopyReferenceDetails : has no documentation (yet) FileGetCopyReferenceDetails json.RawMessage `json:"file_get_copy_reference_details,omitempty"` // FileMoveDetails : has no documentation (yet) FileMoveDetails json.RawMessage `json:"file_move_details,omitempty"` // FilePermanentlyDeleteDetails : has no documentation (yet) FilePermanentlyDeleteDetails json.RawMessage `json:"file_permanently_delete_details,omitempty"` // FilePreviewDetails : has no documentation (yet) FilePreviewDetails json.RawMessage `json:"file_preview_details,omitempty"` // FileRenameDetails : has no documentation (yet) FileRenameDetails json.RawMessage `json:"file_rename_details,omitempty"` // FileRestoreDetails : has no documentation (yet) FileRestoreDetails json.RawMessage `json:"file_restore_details,omitempty"` // FileRevertDetails : has no documentation (yet) FileRevertDetails json.RawMessage `json:"file_revert_details,omitempty"` // FileRollbackChangesDetails : has no documentation (yet) FileRollbackChangesDetails json.RawMessage `json:"file_rollback_changes_details,omitempty"` // FileSaveCopyReferenceDetails : has no documentation (yet) FileSaveCopyReferenceDetails json.RawMessage `json:"file_save_copy_reference_details,omitempty"` // FileRequestChangeDetails : has no documentation (yet) FileRequestChangeDetails json.RawMessage `json:"file_request_change_details,omitempty"` // FileRequestCloseDetails : has no documentation (yet) FileRequestCloseDetails json.RawMessage `json:"file_request_close_details,omitempty"` // FileRequestCreateDetails : has no documentation (yet) FileRequestCreateDetails json.RawMessage `json:"file_request_create_details,omitempty"` // FileRequestReceiveFileDetails : has no documentation (yet) FileRequestReceiveFileDetails json.RawMessage `json:"file_request_receive_file_details,omitempty"` // GroupAddExternalIdDetails : has no documentation (yet) GroupAddExternalIdDetails json.RawMessage `json:"group_add_external_id_details,omitempty"` // GroupAddMemberDetails : has no documentation (yet) GroupAddMemberDetails json.RawMessage `json:"group_add_member_details,omitempty"` // GroupChangeExternalIdDetails : has no documentation (yet) GroupChangeExternalIdDetails json.RawMessage `json:"group_change_external_id_details,omitempty"` // GroupChangeManagementTypeDetails : has no documentation (yet) GroupChangeManagementTypeDetails json.RawMessage `json:"group_change_management_type_details,omitempty"` // GroupChangeMemberRoleDetails : has no documentation (yet) GroupChangeMemberRoleDetails json.RawMessage `json:"group_change_member_role_details,omitempty"` // GroupCreateDetails : has no documentation (yet) GroupCreateDetails json.RawMessage `json:"group_create_details,omitempty"` // GroupDeleteDetails : has no documentation (yet) GroupDeleteDetails json.RawMessage `json:"group_delete_details,omitempty"` // GroupDescriptionUpdatedDetails : has no documentation (yet) GroupDescriptionUpdatedDetails json.RawMessage `json:"group_description_updated_details,omitempty"` // GroupJoinPolicyUpdatedDetails : has no documentation (yet) GroupJoinPolicyUpdatedDetails json.RawMessage `json:"group_join_policy_updated_details,omitempty"` // GroupMovedDetails : has no documentation (yet) GroupMovedDetails json.RawMessage `json:"group_moved_details,omitempty"` // GroupRemoveExternalIdDetails : has no documentation (yet) GroupRemoveExternalIdDetails json.RawMessage `json:"group_remove_external_id_details,omitempty"` // GroupRemoveMemberDetails : has no documentation (yet) GroupRemoveMemberDetails json.RawMessage `json:"group_remove_member_details,omitempty"` // GroupRenameDetails : has no documentation (yet) GroupRenameDetails json.RawMessage `json:"group_rename_details,omitempty"` // EmmErrorDetails : has no documentation (yet) EmmErrorDetails json.RawMessage `json:"emm_error_details,omitempty"` // LoginFailDetails : has no documentation (yet) LoginFailDetails json.RawMessage `json:"login_fail_details,omitempty"` // LoginSuccessDetails : has no documentation (yet) LoginSuccessDetails json.RawMessage `json:"login_success_details,omitempty"` // LogoutDetails : has no documentation (yet) LogoutDetails json.RawMessage `json:"logout_details,omitempty"` // ResellerSupportSessionEndDetails : has no documentation (yet) ResellerSupportSessionEndDetails json.RawMessage `json:"reseller_support_session_end_details,omitempty"` // ResellerSupportSessionStartDetails : has no documentation (yet) ResellerSupportSessionStartDetails json.RawMessage `json:"reseller_support_session_start_details,omitempty"` // SignInAsSessionEndDetails : has no documentation (yet) SignInAsSessionEndDetails json.RawMessage `json:"sign_in_as_session_end_details,omitempty"` // SignInAsSessionStartDetails : has no documentation (yet) SignInAsSessionStartDetails json.RawMessage `json:"sign_in_as_session_start_details,omitempty"` // SsoErrorDetails : has no documentation (yet) SsoErrorDetails json.RawMessage `json:"sso_error_details,omitempty"` // MemberAddNameDetails : has no documentation (yet) MemberAddNameDetails json.RawMessage `json:"member_add_name_details,omitempty"` // MemberChangeAdminRoleDetails : has no documentation (yet) MemberChangeAdminRoleDetails json.RawMessage `json:"member_change_admin_role_details,omitempty"` // MemberChangeEmailDetails : has no documentation (yet) MemberChangeEmailDetails json.RawMessage `json:"member_change_email_details,omitempty"` // MemberChangeMembershipTypeDetails : has no documentation (yet) MemberChangeMembershipTypeDetails json.RawMessage `json:"member_change_membership_type_details,omitempty"` // MemberChangeNameDetails : has no documentation (yet) MemberChangeNameDetails json.RawMessage `json:"member_change_name_details,omitempty"` // MemberChangeStatusDetails : has no documentation (yet) MemberChangeStatusDetails json.RawMessage `json:"member_change_status_details,omitempty"` // MemberDeleteManualContactsDetails : has no documentation (yet) MemberDeleteManualContactsDetails json.RawMessage `json:"member_delete_manual_contacts_details,omitempty"` // MemberPermanentlyDeleteAccountContentsDetails : has no documentation // (yet) MemberPermanentlyDeleteAccountContentsDetails json.RawMessage `json:"member_permanently_delete_account_contents_details,omitempty"` // MemberSpaceLimitsAddCustomQuotaDetails : has no documentation (yet) MemberSpaceLimitsAddCustomQuotaDetails json.RawMessage `json:"member_space_limits_add_custom_quota_details,omitempty"` // MemberSpaceLimitsChangeCustomQuotaDetails : has no documentation // (yet) MemberSpaceLimitsChangeCustomQuotaDetails json.RawMessage `json:"member_space_limits_change_custom_quota_details,omitempty"` // MemberSpaceLimitsChangeStatusDetails : has no documentation (yet) MemberSpaceLimitsChangeStatusDetails json.RawMessage `json:"member_space_limits_change_status_details,omitempty"` // MemberSpaceLimitsRemoveCustomQuotaDetails : has no documentation // (yet) MemberSpaceLimitsRemoveCustomQuotaDetails json.RawMessage `json:"member_space_limits_remove_custom_quota_details,omitempty"` // MemberSuggestDetails : has no documentation (yet) MemberSuggestDetails json.RawMessage `json:"member_suggest_details,omitempty"` // MemberTransferAccountContentsDetails : has no documentation (yet) MemberTransferAccountContentsDetails json.RawMessage `json:"member_transfer_account_contents_details,omitempty"` // SecondaryMailsPolicyChangedDetails : has no documentation (yet) SecondaryMailsPolicyChangedDetails json.RawMessage `json:"secondary_mails_policy_changed_details,omitempty"` // PaperContentAddMemberDetails : has no documentation (yet) PaperContentAddMemberDetails json.RawMessage `json:"paper_content_add_member_details,omitempty"` // PaperContentAddToFolderDetails : has no documentation (yet) PaperContentAddToFolderDetails json.RawMessage `json:"paper_content_add_to_folder_details,omitempty"` // PaperContentArchiveDetails : has no documentation (yet) PaperContentArchiveDetails json.RawMessage `json:"paper_content_archive_details,omitempty"` // PaperContentCreateDetails : has no documentation (yet) PaperContentCreateDetails json.RawMessage `json:"paper_content_create_details,omitempty"` // PaperContentPermanentlyDeleteDetails : has no documentation (yet) PaperContentPermanentlyDeleteDetails json.RawMessage `json:"paper_content_permanently_delete_details,omitempty"` // PaperContentRemoveFromFolderDetails : has no documentation (yet) PaperContentRemoveFromFolderDetails json.RawMessage `json:"paper_content_remove_from_folder_details,omitempty"` // PaperContentRemoveMemberDetails : has no documentation (yet) PaperContentRemoveMemberDetails json.RawMessage `json:"paper_content_remove_member_details,omitempty"` // PaperContentRenameDetails : has no documentation (yet) PaperContentRenameDetails json.RawMessage `json:"paper_content_rename_details,omitempty"` // PaperContentRestoreDetails : has no documentation (yet) PaperContentRestoreDetails json.RawMessage `json:"paper_content_restore_details,omitempty"` // PaperDocAddCommentDetails : has no documentation (yet) PaperDocAddCommentDetails json.RawMessage `json:"paper_doc_add_comment_details,omitempty"` // PaperDocChangeMemberRoleDetails : has no documentation (yet) PaperDocChangeMemberRoleDetails json.RawMessage `json:"paper_doc_change_member_role_details,omitempty"` // PaperDocChangeSharingPolicyDetails : has no documentation (yet) PaperDocChangeSharingPolicyDetails json.RawMessage `json:"paper_doc_change_sharing_policy_details,omitempty"` // PaperDocChangeSubscriptionDetails : has no documentation (yet) PaperDocChangeSubscriptionDetails json.RawMessage `json:"paper_doc_change_subscription_details,omitempty"` // PaperDocDeletedDetails : has no documentation (yet) PaperDocDeletedDetails json.RawMessage `json:"paper_doc_deleted_details,omitempty"` // PaperDocDeleteCommentDetails : has no documentation (yet) PaperDocDeleteCommentDetails json.RawMessage `json:"paper_doc_delete_comment_details,omitempty"` // PaperDocDownloadDetails : has no documentation (yet) PaperDocDownloadDetails json.RawMessage `json:"paper_doc_download_details,omitempty"` // PaperDocEditDetails : has no documentation (yet) PaperDocEditDetails json.RawMessage `json:"paper_doc_edit_details,omitempty"` // PaperDocEditCommentDetails : has no documentation (yet) PaperDocEditCommentDetails json.RawMessage `json:"paper_doc_edit_comment_details,omitempty"` // PaperDocFollowedDetails : has no documentation (yet) PaperDocFollowedDetails json.RawMessage `json:"paper_doc_followed_details,omitempty"` // PaperDocMentionDetails : has no documentation (yet) PaperDocMentionDetails json.RawMessage `json:"paper_doc_mention_details,omitempty"` // PaperDocOwnershipChangedDetails : has no documentation (yet) PaperDocOwnershipChangedDetails json.RawMessage `json:"paper_doc_ownership_changed_details,omitempty"` // PaperDocRequestAccessDetails : has no documentation (yet) PaperDocRequestAccessDetails json.RawMessage `json:"paper_doc_request_access_details,omitempty"` // PaperDocResolveCommentDetails : has no documentation (yet) PaperDocResolveCommentDetails json.RawMessage `json:"paper_doc_resolve_comment_details,omitempty"` // PaperDocRevertDetails : has no documentation (yet) PaperDocRevertDetails json.RawMessage `json:"paper_doc_revert_details,omitempty"` // PaperDocSlackShareDetails : has no documentation (yet) PaperDocSlackShareDetails json.RawMessage `json:"paper_doc_slack_share_details,omitempty"` // PaperDocTeamInviteDetails : has no documentation (yet) PaperDocTeamInviteDetails json.RawMessage `json:"paper_doc_team_invite_details,omitempty"` // PaperDocTrashedDetails : has no documentation (yet) PaperDocTrashedDetails json.RawMessage `json:"paper_doc_trashed_details,omitempty"` // PaperDocUnresolveCommentDetails : has no documentation (yet) PaperDocUnresolveCommentDetails json.RawMessage `json:"paper_doc_unresolve_comment_details,omitempty"` // PaperDocUntrashedDetails : has no documentation (yet) PaperDocUntrashedDetails json.RawMessage `json:"paper_doc_untrashed_details,omitempty"` // PaperDocViewDetails : has no documentation (yet) PaperDocViewDetails json.RawMessage `json:"paper_doc_view_details,omitempty"` // PaperExternalViewAllowDetails : has no documentation (yet) PaperExternalViewAllowDetails json.RawMessage `json:"paper_external_view_allow_details,omitempty"` // PaperExternalViewDefaultTeamDetails : has no documentation (yet) PaperExternalViewDefaultTeamDetails json.RawMessage `json:"paper_external_view_default_team_details,omitempty"` // PaperExternalViewForbidDetails : has no documentation (yet) PaperExternalViewForbidDetails json.RawMessage `json:"paper_external_view_forbid_details,omitempty"` // PaperFolderChangeSubscriptionDetails : has no documentation (yet) PaperFolderChangeSubscriptionDetails json.RawMessage `json:"paper_folder_change_subscription_details,omitempty"` // PaperFolderDeletedDetails : has no documentation (yet) PaperFolderDeletedDetails json.RawMessage `json:"paper_folder_deleted_details,omitempty"` // PaperFolderFollowedDetails : has no documentation (yet) PaperFolderFollowedDetails json.RawMessage `json:"paper_folder_followed_details,omitempty"` // PaperFolderTeamInviteDetails : has no documentation (yet) PaperFolderTeamInviteDetails json.RawMessage `json:"paper_folder_team_invite_details,omitempty"` // PasswordChangeDetails : has no documentation (yet) PasswordChangeDetails json.RawMessage `json:"password_change_details,omitempty"` // PasswordResetDetails : has no documentation (yet) PasswordResetDetails json.RawMessage `json:"password_reset_details,omitempty"` // PasswordResetAllDetails : has no documentation (yet) PasswordResetAllDetails json.RawMessage `json:"password_reset_all_details,omitempty"` // EmmCreateExceptionsReportDetails : has no documentation (yet) EmmCreateExceptionsReportDetails json.RawMessage `json:"emm_create_exceptions_report_details,omitempty"` // EmmCreateUsageReportDetails : has no documentation (yet) EmmCreateUsageReportDetails json.RawMessage `json:"emm_create_usage_report_details,omitempty"` // ExportMembersReportDetails : has no documentation (yet) ExportMembersReportDetails json.RawMessage `json:"export_members_report_details,omitempty"` // PaperAdminExportStartDetails : has no documentation (yet) PaperAdminExportStartDetails json.RawMessage `json:"paper_admin_export_start_details,omitempty"` // SmartSyncCreateAdminPrivilegeReportDetails : has no documentation // (yet) SmartSyncCreateAdminPrivilegeReportDetails json.RawMessage `json:"smart_sync_create_admin_privilege_report_details,omitempty"` // TeamActivityCreateReportDetails : has no documentation (yet) TeamActivityCreateReportDetails json.RawMessage `json:"team_activity_create_report_details,omitempty"` // CollectionShareDetails : has no documentation (yet) CollectionShareDetails json.RawMessage `json:"collection_share_details,omitempty"` // NoteAclInviteOnlyDetails : has no documentation (yet) NoteAclInviteOnlyDetails json.RawMessage `json:"note_acl_invite_only_details,omitempty"` // NoteAclLinkDetails : has no documentation (yet) NoteAclLinkDetails json.RawMessage `json:"note_acl_link_details,omitempty"` // NoteAclTeamLinkDetails : has no documentation (yet) NoteAclTeamLinkDetails json.RawMessage `json:"note_acl_team_link_details,omitempty"` // NoteSharedDetails : has no documentation (yet) NoteSharedDetails json.RawMessage `json:"note_shared_details,omitempty"` // NoteShareReceiveDetails : has no documentation (yet) NoteShareReceiveDetails json.RawMessage `json:"note_share_receive_details,omitempty"` // OpenNoteSharedDetails : has no documentation (yet) OpenNoteSharedDetails json.RawMessage `json:"open_note_shared_details,omitempty"` // SfAddGroupDetails : has no documentation (yet) SfAddGroupDetails json.RawMessage `json:"sf_add_group_details,omitempty"` // SfAllowNonMembersToViewSharedLinksDetails : has no documentation // (yet) SfAllowNonMembersToViewSharedLinksDetails json.RawMessage `json:"sf_allow_non_members_to_view_shared_links_details,omitempty"` // SfExternalInviteWarnDetails : has no documentation (yet) SfExternalInviteWarnDetails json.RawMessage `json:"sf_external_invite_warn_details,omitempty"` // SfFbInviteDetails : has no documentation (yet) SfFbInviteDetails json.RawMessage `json:"sf_fb_invite_details,omitempty"` // SfFbInviteChangeRoleDetails : has no documentation (yet) SfFbInviteChangeRoleDetails json.RawMessage `json:"sf_fb_invite_change_role_details,omitempty"` // SfFbUninviteDetails : has no documentation (yet) SfFbUninviteDetails json.RawMessage `json:"sf_fb_uninvite_details,omitempty"` // SfInviteGroupDetails : has no documentation (yet) SfInviteGroupDetails json.RawMessage `json:"sf_invite_group_details,omitempty"` // SfTeamGrantAccessDetails : has no documentation (yet) SfTeamGrantAccessDetails json.RawMessage `json:"sf_team_grant_access_details,omitempty"` // SfTeamInviteDetails : has no documentation (yet) SfTeamInviteDetails json.RawMessage `json:"sf_team_invite_details,omitempty"` // SfTeamInviteChangeRoleDetails : has no documentation (yet) SfTeamInviteChangeRoleDetails json.RawMessage `json:"sf_team_invite_change_role_details,omitempty"` // SfTeamJoinDetails : has no documentation (yet) SfTeamJoinDetails json.RawMessage `json:"sf_team_join_details,omitempty"` // SfTeamJoinFromOobLinkDetails : has no documentation (yet) SfTeamJoinFromOobLinkDetails json.RawMessage `json:"sf_team_join_from_oob_link_details,omitempty"` // SfTeamUninviteDetails : has no documentation (yet) SfTeamUninviteDetails json.RawMessage `json:"sf_team_uninvite_details,omitempty"` // SharedContentAddInviteesDetails : has no documentation (yet) SharedContentAddInviteesDetails json.RawMessage `json:"shared_content_add_invitees_details,omitempty"` // SharedContentAddLinkExpiryDetails : has no documentation (yet) SharedContentAddLinkExpiryDetails json.RawMessage `json:"shared_content_add_link_expiry_details,omitempty"` // SharedContentAddLinkPasswordDetails : has no documentation (yet) SharedContentAddLinkPasswordDetails json.RawMessage `json:"shared_content_add_link_password_details,omitempty"` // SharedContentAddMemberDetails : has no documentation (yet) SharedContentAddMemberDetails json.RawMessage `json:"shared_content_add_member_details,omitempty"` // SharedContentChangeDownloadsPolicyDetails : has no documentation // (yet) SharedContentChangeDownloadsPolicyDetails json.RawMessage `json:"shared_content_change_downloads_policy_details,omitempty"` // SharedContentChangeInviteeRoleDetails : has no documentation (yet) SharedContentChangeInviteeRoleDetails json.RawMessage `json:"shared_content_change_invitee_role_details,omitempty"` // SharedContentChangeLinkAudienceDetails : has no documentation (yet) SharedContentChangeLinkAudienceDetails json.RawMessage `json:"shared_content_change_link_audience_details,omitempty"` // SharedContentChangeLinkExpiryDetails : has no documentation (yet) SharedContentChangeLinkExpiryDetails json.RawMessage `json:"shared_content_change_link_expiry_details,omitempty"` // SharedContentChangeLinkPasswordDetails : has no documentation (yet) SharedContentChangeLinkPasswordDetails json.RawMessage `json:"shared_content_change_link_password_details,omitempty"` // SharedContentChangeMemberRoleDetails : has no documentation (yet) SharedContentChangeMemberRoleDetails json.RawMessage `json:"shared_content_change_member_role_details,omitempty"` // SharedContentChangeViewerInfoPolicyDetails : has no documentation // (yet) SharedContentChangeViewerInfoPolicyDetails json.RawMessage `json:"shared_content_change_viewer_info_policy_details,omitempty"` // SharedContentClaimInvitationDetails : has no documentation (yet) SharedContentClaimInvitationDetails json.RawMessage `json:"shared_content_claim_invitation_details,omitempty"` // SharedContentCopyDetails : has no documentation (yet) SharedContentCopyDetails json.RawMessage `json:"shared_content_copy_details,omitempty"` // SharedContentDownloadDetails : has no documentation (yet) SharedContentDownloadDetails json.RawMessage `json:"shared_content_download_details,omitempty"` // SharedContentRelinquishMembershipDetails : has no documentation (yet) SharedContentRelinquishMembershipDetails json.RawMessage `json:"shared_content_relinquish_membership_details,omitempty"` // SharedContentRemoveInviteesDetails : has no documentation (yet) SharedContentRemoveInviteesDetails json.RawMessage `json:"shared_content_remove_invitees_details,omitempty"` // SharedContentRemoveLinkExpiryDetails : has no documentation (yet) SharedContentRemoveLinkExpiryDetails json.RawMessage `json:"shared_content_remove_link_expiry_details,omitempty"` // SharedContentRemoveLinkPasswordDetails : has no documentation (yet) SharedContentRemoveLinkPasswordDetails json.RawMessage `json:"shared_content_remove_link_password_details,omitempty"` // SharedContentRemoveMemberDetails : has no documentation (yet) SharedContentRemoveMemberDetails json.RawMessage `json:"shared_content_remove_member_details,omitempty"` // SharedContentRequestAccessDetails : has no documentation (yet) SharedContentRequestAccessDetails json.RawMessage `json:"shared_content_request_access_details,omitempty"` // SharedContentUnshareDetails : has no documentation (yet) SharedContentUnshareDetails json.RawMessage `json:"shared_content_unshare_details,omitempty"` // SharedContentViewDetails : has no documentation (yet) SharedContentViewDetails json.RawMessage `json:"shared_content_view_details,omitempty"` // SharedFolderChangeLinkPolicyDetails : has no documentation (yet) SharedFolderChangeLinkPolicyDetails json.RawMessage `json:"shared_folder_change_link_policy_details,omitempty"` // SharedFolderChangeMembersInheritancePolicyDetails : has no // documentation (yet) SharedFolderChangeMembersInheritancePolicyDetails json.RawMessage `json:"shared_folder_change_members_inheritance_policy_details,omitempty"` // SharedFolderChangeMembersManagementPolicyDetails : has no // documentation (yet) SharedFolderChangeMembersManagementPolicyDetails json.RawMessage `json:"shared_folder_change_members_management_policy_details,omitempty"` // SharedFolderChangeMembersPolicyDetails : has no documentation (yet) SharedFolderChangeMembersPolicyDetails json.RawMessage `json:"shared_folder_change_members_policy_details,omitempty"` // SharedFolderCreateDetails : has no documentation (yet) SharedFolderCreateDetails json.RawMessage `json:"shared_folder_create_details,omitempty"` // SharedFolderDeclineInvitationDetails : has no documentation (yet) SharedFolderDeclineInvitationDetails json.RawMessage `json:"shared_folder_decline_invitation_details,omitempty"` // SharedFolderMountDetails : has no documentation (yet) SharedFolderMountDetails json.RawMessage `json:"shared_folder_mount_details,omitempty"` // SharedFolderNestDetails : has no documentation (yet) SharedFolderNestDetails json.RawMessage `json:"shared_folder_nest_details,omitempty"` // SharedFolderTransferOwnershipDetails : has no documentation (yet) SharedFolderTransferOwnershipDetails json.RawMessage `json:"shared_folder_transfer_ownership_details,omitempty"` // SharedFolderUnmountDetails : has no documentation (yet) SharedFolderUnmountDetails json.RawMessage `json:"shared_folder_unmount_details,omitempty"` // SharedLinkAddExpiryDetails : has no documentation (yet) SharedLinkAddExpiryDetails json.RawMessage `json:"shared_link_add_expiry_details,omitempty"` // SharedLinkChangeExpiryDetails : has no documentation (yet) SharedLinkChangeExpiryDetails json.RawMessage `json:"shared_link_change_expiry_details,omitempty"` // SharedLinkChangeVisibilityDetails : has no documentation (yet) SharedLinkChangeVisibilityDetails json.RawMessage `json:"shared_link_change_visibility_details,omitempty"` // SharedLinkCopyDetails : has no documentation (yet) SharedLinkCopyDetails json.RawMessage `json:"shared_link_copy_details,omitempty"` // SharedLinkCreateDetails : has no documentation (yet) SharedLinkCreateDetails json.RawMessage `json:"shared_link_create_details,omitempty"` // SharedLinkDisableDetails : has no documentation (yet) SharedLinkDisableDetails json.RawMessage `json:"shared_link_disable_details,omitempty"` // SharedLinkDownloadDetails : has no documentation (yet) SharedLinkDownloadDetails json.RawMessage `json:"shared_link_download_details,omitempty"` // SharedLinkRemoveExpiryDetails : has no documentation (yet) SharedLinkRemoveExpiryDetails json.RawMessage `json:"shared_link_remove_expiry_details,omitempty"` // SharedLinkShareDetails : has no documentation (yet) SharedLinkShareDetails json.RawMessage `json:"shared_link_share_details,omitempty"` // SharedLinkViewDetails : has no documentation (yet) SharedLinkViewDetails json.RawMessage `json:"shared_link_view_details,omitempty"` // SharedNoteOpenedDetails : has no documentation (yet) SharedNoteOpenedDetails json.RawMessage `json:"shared_note_opened_details,omitempty"` // ShmodelGroupShareDetails : has no documentation (yet) ShmodelGroupShareDetails json.RawMessage `json:"shmodel_group_share_details,omitempty"` // ShowcaseAccessGrantedDetails : has no documentation (yet) ShowcaseAccessGrantedDetails json.RawMessage `json:"showcase_access_granted_details,omitempty"` // ShowcaseAddMemberDetails : has no documentation (yet) ShowcaseAddMemberDetails json.RawMessage `json:"showcase_add_member_details,omitempty"` // ShowcaseArchivedDetails : has no documentation (yet) ShowcaseArchivedDetails json.RawMessage `json:"showcase_archived_details,omitempty"` // ShowcaseCreatedDetails : has no documentation (yet) ShowcaseCreatedDetails json.RawMessage `json:"showcase_created_details,omitempty"` // ShowcaseDeleteCommentDetails : has no documentation (yet) ShowcaseDeleteCommentDetails json.RawMessage `json:"showcase_delete_comment_details,omitempty"` // ShowcaseEditedDetails : has no documentation (yet) ShowcaseEditedDetails json.RawMessage `json:"showcase_edited_details,omitempty"` // ShowcaseEditCommentDetails : has no documentation (yet) ShowcaseEditCommentDetails json.RawMessage `json:"showcase_edit_comment_details,omitempty"` // ShowcaseFileAddedDetails : has no documentation (yet) ShowcaseFileAddedDetails json.RawMessage `json:"showcase_file_added_details,omitempty"` // ShowcaseFileDownloadDetails : has no documentation (yet) ShowcaseFileDownloadDetails json.RawMessage `json:"showcase_file_download_details,omitempty"` // ShowcaseFileRemovedDetails : has no documentation (yet) ShowcaseFileRemovedDetails json.RawMessage `json:"showcase_file_removed_details,omitempty"` // ShowcaseFileViewDetails : has no documentation (yet) ShowcaseFileViewDetails json.RawMessage `json:"showcase_file_view_details,omitempty"` // ShowcasePermanentlyDeletedDetails : has no documentation (yet) ShowcasePermanentlyDeletedDetails json.RawMessage `json:"showcase_permanently_deleted_details,omitempty"` // ShowcasePostCommentDetails : has no documentation (yet) ShowcasePostCommentDetails json.RawMessage `json:"showcase_post_comment_details,omitempty"` // ShowcaseRemoveMemberDetails : has no documentation (yet) ShowcaseRemoveMemberDetails json.RawMessage `json:"showcase_remove_member_details,omitempty"` // ShowcaseRenamedDetails : has no documentation (yet) ShowcaseRenamedDetails json.RawMessage `json:"showcase_renamed_details,omitempty"` // ShowcaseRequestAccessDetails : has no documentation (yet) ShowcaseRequestAccessDetails json.RawMessage `json:"showcase_request_access_details,omitempty"` // ShowcaseResolveCommentDetails : has no documentation (yet) ShowcaseResolveCommentDetails json.RawMessage `json:"showcase_resolve_comment_details,omitempty"` // ShowcaseRestoredDetails : has no documentation (yet) ShowcaseRestoredDetails json.RawMessage `json:"showcase_restored_details,omitempty"` // ShowcaseTrashedDetails : has no documentation (yet) ShowcaseTrashedDetails json.RawMessage `json:"showcase_trashed_details,omitempty"` // ShowcaseTrashedDeprecatedDetails : has no documentation (yet) ShowcaseTrashedDeprecatedDetails json.RawMessage `json:"showcase_trashed_deprecated_details,omitempty"` // ShowcaseUnresolveCommentDetails : has no documentation (yet) ShowcaseUnresolveCommentDetails json.RawMessage `json:"showcase_unresolve_comment_details,omitempty"` // ShowcaseUntrashedDetails : has no documentation (yet) ShowcaseUntrashedDetails json.RawMessage `json:"showcase_untrashed_details,omitempty"` // ShowcaseUntrashedDeprecatedDetails : has no documentation (yet) ShowcaseUntrashedDeprecatedDetails json.RawMessage `json:"showcase_untrashed_deprecated_details,omitempty"` // ShowcaseViewDetails : has no documentation (yet) ShowcaseViewDetails json.RawMessage `json:"showcase_view_details,omitempty"` // SsoAddCertDetails : has no documentation (yet) SsoAddCertDetails json.RawMessage `json:"sso_add_cert_details,omitempty"` // SsoAddLoginUrlDetails : has no documentation (yet) SsoAddLoginUrlDetails json.RawMessage `json:"sso_add_login_url_details,omitempty"` // SsoAddLogoutUrlDetails : has no documentation (yet) SsoAddLogoutUrlDetails json.RawMessage `json:"sso_add_logout_url_details,omitempty"` // SsoChangeCertDetails : has no documentation (yet) SsoChangeCertDetails json.RawMessage `json:"sso_change_cert_details,omitempty"` // SsoChangeLoginUrlDetails : has no documentation (yet) SsoChangeLoginUrlDetails json.RawMessage `json:"sso_change_login_url_details,omitempty"` // SsoChangeLogoutUrlDetails : has no documentation (yet) SsoChangeLogoutUrlDetails json.RawMessage `json:"sso_change_logout_url_details,omitempty"` // SsoChangeSamlIdentityModeDetails : has no documentation (yet) SsoChangeSamlIdentityModeDetails json.RawMessage `json:"sso_change_saml_identity_mode_details,omitempty"` // SsoRemoveCertDetails : has no documentation (yet) SsoRemoveCertDetails json.RawMessage `json:"sso_remove_cert_details,omitempty"` // SsoRemoveLoginUrlDetails : has no documentation (yet) SsoRemoveLoginUrlDetails json.RawMessage `json:"sso_remove_login_url_details,omitempty"` // SsoRemoveLogoutUrlDetails : has no documentation (yet) SsoRemoveLogoutUrlDetails json.RawMessage `json:"sso_remove_logout_url_details,omitempty"` // TeamFolderChangeStatusDetails : has no documentation (yet) TeamFolderChangeStatusDetails json.RawMessage `json:"team_folder_change_status_details,omitempty"` // TeamFolderCreateDetails : has no documentation (yet) TeamFolderCreateDetails json.RawMessage `json:"team_folder_create_details,omitempty"` // TeamFolderDowngradeDetails : has no documentation (yet) TeamFolderDowngradeDetails json.RawMessage `json:"team_folder_downgrade_details,omitempty"` // TeamFolderPermanentlyDeleteDetails : has no documentation (yet) TeamFolderPermanentlyDeleteDetails json.RawMessage `json:"team_folder_permanently_delete_details,omitempty"` // TeamFolderRenameDetails : has no documentation (yet) TeamFolderRenameDetails json.RawMessage `json:"team_folder_rename_details,omitempty"` // TeamSelectiveSyncSettingsChangedDetails : has no documentation (yet) TeamSelectiveSyncSettingsChangedDetails json.RawMessage `json:"team_selective_sync_settings_changed_details,omitempty"` // AccountCaptureChangePolicyDetails : has no documentation (yet) AccountCaptureChangePolicyDetails json.RawMessage `json:"account_capture_change_policy_details,omitempty"` // AllowDownloadDisabledDetails : has no documentation (yet) AllowDownloadDisabledDetails json.RawMessage `json:"allow_download_disabled_details,omitempty"` // AllowDownloadEnabledDetails : has no documentation (yet) AllowDownloadEnabledDetails json.RawMessage `json:"allow_download_enabled_details,omitempty"` // CameraUploadsPolicyChangedDetails : has no documentation (yet) CameraUploadsPolicyChangedDetails json.RawMessage `json:"camera_uploads_policy_changed_details,omitempty"` // DataPlacementRestrictionChangePolicyDetails : has no documentation // (yet) DataPlacementRestrictionChangePolicyDetails json.RawMessage `json:"data_placement_restriction_change_policy_details,omitempty"` // DataPlacementRestrictionSatisfyPolicyDetails : has no documentation // (yet) DataPlacementRestrictionSatisfyPolicyDetails json.RawMessage `json:"data_placement_restriction_satisfy_policy_details,omitempty"` // DeviceApprovalsChangeDesktopPolicyDetails : has no documentation // (yet) DeviceApprovalsChangeDesktopPolicyDetails json.RawMessage `json:"device_approvals_change_desktop_policy_details,omitempty"` // DeviceApprovalsChangeMobilePolicyDetails : has no documentation (yet) DeviceApprovalsChangeMobilePolicyDetails json.RawMessage `json:"device_approvals_change_mobile_policy_details,omitempty"` // DeviceApprovalsChangeOverageActionDetails : has no documentation // (yet) DeviceApprovalsChangeOverageActionDetails json.RawMessage `json:"device_approvals_change_overage_action_details,omitempty"` // DeviceApprovalsChangeUnlinkActionDetails : has no documentation (yet) DeviceApprovalsChangeUnlinkActionDetails json.RawMessage `json:"device_approvals_change_unlink_action_details,omitempty"` // DirectoryRestrictionsAddMembersDetails : has no documentation (yet) DirectoryRestrictionsAddMembersDetails json.RawMessage `json:"directory_restrictions_add_members_details,omitempty"` // DirectoryRestrictionsRemoveMembersDetails : has no documentation // (yet) DirectoryRestrictionsRemoveMembersDetails json.RawMessage `json:"directory_restrictions_remove_members_details,omitempty"` // EmmAddExceptionDetails : has no documentation (yet) EmmAddExceptionDetails json.RawMessage `json:"emm_add_exception_details,omitempty"` // EmmChangePolicyDetails : has no documentation (yet) EmmChangePolicyDetails json.RawMessage `json:"emm_change_policy_details,omitempty"` // EmmRemoveExceptionDetails : has no documentation (yet) EmmRemoveExceptionDetails json.RawMessage `json:"emm_remove_exception_details,omitempty"` // ExtendedVersionHistoryChangePolicyDetails : has no documentation // (yet) ExtendedVersionHistoryChangePolicyDetails json.RawMessage `json:"extended_version_history_change_policy_details,omitempty"` // FileCommentsChangePolicyDetails : has no documentation (yet) FileCommentsChangePolicyDetails json.RawMessage `json:"file_comments_change_policy_details,omitempty"` // FileRequestsChangePolicyDetails : has no documentation (yet) FileRequestsChangePolicyDetails json.RawMessage `json:"file_requests_change_policy_details,omitempty"` // FileRequestsEmailsEnabledDetails : has no documentation (yet) FileRequestsEmailsEnabledDetails json.RawMessage `json:"file_requests_emails_enabled_details,omitempty"` // FileRequestsEmailsRestrictedToTeamOnlyDetails : has no documentation // (yet) FileRequestsEmailsRestrictedToTeamOnlyDetails json.RawMessage `json:"file_requests_emails_restricted_to_team_only_details,omitempty"` // GoogleSsoChangePolicyDetails : has no documentation (yet) GoogleSsoChangePolicyDetails json.RawMessage `json:"google_sso_change_policy_details,omitempty"` // GroupUserManagementChangePolicyDetails : has no documentation (yet) GroupUserManagementChangePolicyDetails json.RawMessage `json:"group_user_management_change_policy_details,omitempty"` // MemberRequestsChangePolicyDetails : has no documentation (yet) MemberRequestsChangePolicyDetails json.RawMessage `json:"member_requests_change_policy_details,omitempty"` // MemberSpaceLimitsAddExceptionDetails : has no documentation (yet) MemberSpaceLimitsAddExceptionDetails json.RawMessage `json:"member_space_limits_add_exception_details,omitempty"` // MemberSpaceLimitsChangeCapsTypePolicyDetails : has no documentation // (yet) MemberSpaceLimitsChangeCapsTypePolicyDetails json.RawMessage `json:"member_space_limits_change_caps_type_policy_details,omitempty"` // MemberSpaceLimitsChangePolicyDetails : has no documentation (yet) MemberSpaceLimitsChangePolicyDetails json.RawMessage `json:"member_space_limits_change_policy_details,omitempty"` // MemberSpaceLimitsRemoveExceptionDetails : has no documentation (yet) MemberSpaceLimitsRemoveExceptionDetails json.RawMessage `json:"member_space_limits_remove_exception_details,omitempty"` // MemberSuggestionsChangePolicyDetails : has no documentation (yet) MemberSuggestionsChangePolicyDetails json.RawMessage `json:"member_suggestions_change_policy_details,omitempty"` // MicrosoftOfficeAddinChangePolicyDetails : has no documentation (yet) MicrosoftOfficeAddinChangePolicyDetails json.RawMessage `json:"microsoft_office_addin_change_policy_details,omitempty"` // NetworkControlChangePolicyDetails : has no documentation (yet) NetworkControlChangePolicyDetails json.RawMessage `json:"network_control_change_policy_details,omitempty"` // PaperChangeDeploymentPolicyDetails : has no documentation (yet) PaperChangeDeploymentPolicyDetails json.RawMessage `json:"paper_change_deployment_policy_details,omitempty"` // PaperChangeMemberLinkPolicyDetails : has no documentation (yet) PaperChangeMemberLinkPolicyDetails json.RawMessage `json:"paper_change_member_link_policy_details,omitempty"` // PaperChangeMemberPolicyDetails : has no documentation (yet) PaperChangeMemberPolicyDetails json.RawMessage `json:"paper_change_member_policy_details,omitempty"` // PaperChangePolicyDetails : has no documentation (yet) PaperChangePolicyDetails json.RawMessage `json:"paper_change_policy_details,omitempty"` // PaperEnabledUsersGroupAdditionDetails : has no documentation (yet) PaperEnabledUsersGroupAdditionDetails json.RawMessage `json:"paper_enabled_users_group_addition_details,omitempty"` // PaperEnabledUsersGroupRemovalDetails : has no documentation (yet) PaperEnabledUsersGroupRemovalDetails json.RawMessage `json:"paper_enabled_users_group_removal_details,omitempty"` // PermanentDeleteChangePolicyDetails : has no documentation (yet) PermanentDeleteChangePolicyDetails json.RawMessage `json:"permanent_delete_change_policy_details,omitempty"` // SharingChangeFolderJoinPolicyDetails : has no documentation (yet) SharingChangeFolderJoinPolicyDetails json.RawMessage `json:"sharing_change_folder_join_policy_details,omitempty"` // SharingChangeLinkPolicyDetails : has no documentation (yet) SharingChangeLinkPolicyDetails json.RawMessage `json:"sharing_change_link_policy_details,omitempty"` // SharingChangeMemberPolicyDetails : has no documentation (yet) SharingChangeMemberPolicyDetails json.RawMessage `json:"sharing_change_member_policy_details,omitempty"` // ShowcaseChangeDownloadPolicyDetails : has no documentation (yet) ShowcaseChangeDownloadPolicyDetails json.RawMessage `json:"showcase_change_download_policy_details,omitempty"` // ShowcaseChangeEnabledPolicyDetails : has no documentation (yet) ShowcaseChangeEnabledPolicyDetails json.RawMessage `json:"showcase_change_enabled_policy_details,omitempty"` // ShowcaseChangeExternalSharingPolicyDetails : has no documentation // (yet) ShowcaseChangeExternalSharingPolicyDetails json.RawMessage `json:"showcase_change_external_sharing_policy_details,omitempty"` // SmartSyncChangePolicyDetails : has no documentation (yet) SmartSyncChangePolicyDetails json.RawMessage `json:"smart_sync_change_policy_details,omitempty"` // SmartSyncNotOptOutDetails : has no documentation (yet) SmartSyncNotOptOutDetails json.RawMessage `json:"smart_sync_not_opt_out_details,omitempty"` // SmartSyncOptOutDetails : has no documentation (yet) SmartSyncOptOutDetails json.RawMessage `json:"smart_sync_opt_out_details,omitempty"` // SsoChangePolicyDetails : has no documentation (yet) SsoChangePolicyDetails json.RawMessage `json:"sso_change_policy_details,omitempty"` // TeamSelectiveSyncPolicyChangedDetails : has no documentation (yet) TeamSelectiveSyncPolicyChangedDetails json.RawMessage `json:"team_selective_sync_policy_changed_details,omitempty"` // TfaChangePolicyDetails : has no documentation (yet) TfaChangePolicyDetails json.RawMessage `json:"tfa_change_policy_details,omitempty"` // TwoAccountChangePolicyDetails : has no documentation (yet) TwoAccountChangePolicyDetails json.RawMessage `json:"two_account_change_policy_details,omitempty"` // ViewerInfoPolicyChangedDetails : has no documentation (yet) ViewerInfoPolicyChangedDetails json.RawMessage `json:"viewer_info_policy_changed_details,omitempty"` // WebSessionsChangeFixedLengthPolicyDetails : has no documentation // (yet) WebSessionsChangeFixedLengthPolicyDetails json.RawMessage `json:"web_sessions_change_fixed_length_policy_details,omitempty"` // WebSessionsChangeIdleLengthPolicyDetails : has no documentation (yet) WebSessionsChangeIdleLengthPolicyDetails json.RawMessage `json:"web_sessions_change_idle_length_policy_details,omitempty"` // TeamMergeFromDetails : has no documentation (yet) TeamMergeFromDetails json.RawMessage `json:"team_merge_from_details,omitempty"` // TeamMergeToDetails : has no documentation (yet) TeamMergeToDetails json.RawMessage `json:"team_merge_to_details,omitempty"` // TeamProfileAddLogoDetails : has no documentation (yet) TeamProfileAddLogoDetails json.RawMessage `json:"team_profile_add_logo_details,omitempty"` // TeamProfileChangeDefaultLanguageDetails : has no documentation (yet) TeamProfileChangeDefaultLanguageDetails json.RawMessage `json:"team_profile_change_default_language_details,omitempty"` // TeamProfileChangeLogoDetails : has no documentation (yet) TeamProfileChangeLogoDetails json.RawMessage `json:"team_profile_change_logo_details,omitempty"` // TeamProfileChangeNameDetails : has no documentation (yet) TeamProfileChangeNameDetails json.RawMessage `json:"team_profile_change_name_details,omitempty"` // TeamProfileRemoveLogoDetails : has no documentation (yet) TeamProfileRemoveLogoDetails json.RawMessage `json:"team_profile_remove_logo_details,omitempty"` // TfaAddBackupPhoneDetails : has no documentation (yet) TfaAddBackupPhoneDetails json.RawMessage `json:"tfa_add_backup_phone_details,omitempty"` // TfaAddSecurityKeyDetails : has no documentation (yet) TfaAddSecurityKeyDetails json.RawMessage `json:"tfa_add_security_key_details,omitempty"` // TfaChangeBackupPhoneDetails : has no documentation (yet) TfaChangeBackupPhoneDetails json.RawMessage `json:"tfa_change_backup_phone_details,omitempty"` // TfaChangeStatusDetails : has no documentation (yet) TfaChangeStatusDetails json.RawMessage `json:"tfa_change_status_details,omitempty"` // TfaRemoveBackupPhoneDetails : has no documentation (yet) TfaRemoveBackupPhoneDetails json.RawMessage `json:"tfa_remove_backup_phone_details,omitempty"` // TfaRemoveSecurityKeyDetails : has no documentation (yet) TfaRemoveSecurityKeyDetails json.RawMessage `json:"tfa_remove_security_key_details,omitempty"` // TfaResetDetails : has no documentation (yet) TfaResetDetails json.RawMessage `json:"tfa_reset_details,omitempty"` // MissingDetails : Hints that this event was returned with missing // details due to an internal error. MissingDetails json.RawMessage `json:"missing_details,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "app_link_team_details": err = json.Unmarshal(body, &u.AppLinkTeamDetails) if err != nil { return err } case "app_link_user_details": err = json.Unmarshal(body, &u.AppLinkUserDetails) if err != nil { return err } case "app_unlink_team_details": err = json.Unmarshal(body, &u.AppUnlinkTeamDetails) if err != nil { return err } case "app_unlink_user_details": err = json.Unmarshal(body, &u.AppUnlinkUserDetails) if err != nil { return err } case "file_add_comment_details": err = json.Unmarshal(body, &u.FileAddCommentDetails) if err != nil { return err } case "file_change_comment_subscription_details": err = json.Unmarshal(body, &u.FileChangeCommentSubscriptionDetails) if err != nil { return err } case "file_delete_comment_details": err = json.Unmarshal(body, &u.FileDeleteCommentDetails) if err != nil { return err } case "file_edit_comment_details": err = json.Unmarshal(body, &u.FileEditCommentDetails) if err != nil { return err } case "file_like_comment_details": err = json.Unmarshal(body, &u.FileLikeCommentDetails) if err != nil { return err } case "file_resolve_comment_details": err = json.Unmarshal(body, &u.FileResolveCommentDetails) if err != nil { return err } case "file_unlike_comment_details": err = json.Unmarshal(body, &u.FileUnlikeCommentDetails) if err != nil { return err } case "file_unresolve_comment_details": err = json.Unmarshal(body, &u.FileUnresolveCommentDetails) if err != nil { return err } case "device_change_ip_desktop_details": err = json.Unmarshal(body, &u.DeviceChangeIpDesktopDetails) if err != nil { return err } case "device_change_ip_mobile_details": err = json.Unmarshal(body, &u.DeviceChangeIpMobileDetails) if err != nil { return err } case "device_change_ip_web_details": err = json.Unmarshal(body, &u.DeviceChangeIpWebDetails) if err != nil { return err } case "device_delete_on_unlink_fail_details": err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFailDetails) if err != nil { return err } case "device_delete_on_unlink_success_details": err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccessDetails) if err != nil { return err } case "device_link_fail_details": err = json.Unmarshal(body, &u.DeviceLinkFailDetails) if err != nil { return err } case "device_link_success_details": err = json.Unmarshal(body, &u.DeviceLinkSuccessDetails) if err != nil { return err } case "device_management_disabled_details": err = json.Unmarshal(body, &u.DeviceManagementDisabledDetails) if err != nil { return err } case "device_management_enabled_details": err = json.Unmarshal(body, &u.DeviceManagementEnabledDetails) if err != nil { return err } case "device_unlink_details": err = json.Unmarshal(body, &u.DeviceUnlinkDetails) if err != nil { return err } case "emm_refresh_auth_token_details": err = json.Unmarshal(body, &u.EmmRefreshAuthTokenDetails) if err != nil { return err } case "account_capture_change_availability_details": err = json.Unmarshal(body, &u.AccountCaptureChangeAvailabilityDetails) if err != nil { return err } case "account_capture_migrate_account_details": err = json.Unmarshal(body, &u.AccountCaptureMigrateAccountDetails) if err != nil { return err } case "account_capture_notification_emails_sent_details": err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSentDetails) if err != nil { return err } case "account_capture_relinquish_account_details": err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccountDetails) if err != nil { return err } case "disabled_domain_invites_details": err = json.Unmarshal(body, &u.DisabledDomainInvitesDetails) if err != nil { return err } case "domain_invites_approve_request_to_join_team_details": err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeamDetails) if err != nil { return err } case "domain_invites_decline_request_to_join_team_details": err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeamDetails) if err != nil { return err } case "domain_invites_email_existing_users_details": err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsersDetails) if err != nil { return err } case "domain_invites_request_to_join_team_details": err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeamDetails) if err != nil { return err } case "domain_invites_set_invite_new_user_pref_to_no_details": err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNoDetails) if err != nil { return err } case "domain_invites_set_invite_new_user_pref_to_yes_details": err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYesDetails) if err != nil { return err } case "domain_verification_add_domain_fail_details": err = json.Unmarshal(body, &u.DomainVerificationAddDomainFailDetails) if err != nil { return err } case "domain_verification_add_domain_success_details": err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccessDetails) if err != nil { return err } case "domain_verification_remove_domain_details": err = json.Unmarshal(body, &u.DomainVerificationRemoveDomainDetails) if err != nil { return err } case "enabled_domain_invites_details": err = json.Unmarshal(body, &u.EnabledDomainInvitesDetails) if err != nil { return err } case "create_folder_details": err = json.Unmarshal(body, &u.CreateFolderDetails) if err != nil { return err } case "file_add_details": err = json.Unmarshal(body, &u.FileAddDetails) if err != nil { return err } case "file_copy_details": err = json.Unmarshal(body, &u.FileCopyDetails) if err != nil { return err } case "file_delete_details": err = json.Unmarshal(body, &u.FileDeleteDetails) if err != nil { return err } case "file_download_details": err = json.Unmarshal(body, &u.FileDownloadDetails) if err != nil { return err } case "file_edit_details": err = json.Unmarshal(body, &u.FileEditDetails) if err != nil { return err } case "file_get_copy_reference_details": err = json.Unmarshal(body, &u.FileGetCopyReferenceDetails) if err != nil { return err } case "file_move_details": err = json.Unmarshal(body, &u.FileMoveDetails) if err != nil { return err } case "file_permanently_delete_details": err = json.Unmarshal(body, &u.FilePermanentlyDeleteDetails) if err != nil { return err } case "file_preview_details": err = json.Unmarshal(body, &u.FilePreviewDetails) if err != nil { return err } case "file_rename_details": err = json.Unmarshal(body, &u.FileRenameDetails) if err != nil { return err } case "file_restore_details": err = json.Unmarshal(body, &u.FileRestoreDetails) if err != nil { return err } case "file_revert_details": err = json.Unmarshal(body, &u.FileRevertDetails) if err != nil { return err } case "file_rollback_changes_details": err = json.Unmarshal(body, &u.FileRollbackChangesDetails) if err != nil { return err } case "file_save_copy_reference_details": err = json.Unmarshal(body, &u.FileSaveCopyReferenceDetails) if err != nil { return err } case "file_request_change_details": err = json.Unmarshal(body, &u.FileRequestChangeDetails) if err != nil { return err } case "file_request_close_details": err = json.Unmarshal(body, &u.FileRequestCloseDetails) if err != nil { return err } case "file_request_create_details": err = json.Unmarshal(body, &u.FileRequestCreateDetails) if err != nil { return err } case "file_request_receive_file_details": err = json.Unmarshal(body, &u.FileRequestReceiveFileDetails) if err != nil { return err } case "group_add_external_id_details": err = json.Unmarshal(body, &u.GroupAddExternalIdDetails) if err != nil { return err } case "group_add_member_details": err = json.Unmarshal(body, &u.GroupAddMemberDetails) if err != nil { return err } case "group_change_external_id_details": err = json.Unmarshal(body, &u.GroupChangeExternalIdDetails) if err != nil { return err } case "group_change_management_type_details": err = json.Unmarshal(body, &u.GroupChangeManagementTypeDetails) if err != nil { return err } case "group_change_member_role_details": err = json.Unmarshal(body, &u.GroupChangeMemberRoleDetails) if err != nil { return err } case "group_create_details": err = json.Unmarshal(body, &u.GroupCreateDetails) if err != nil { return err } case "group_delete_details": err = json.Unmarshal(body, &u.GroupDeleteDetails) if err != nil { return err } case "group_description_updated_details": err = json.Unmarshal(body, &u.GroupDescriptionUpdatedDetails) if err != nil { return err } case "group_join_policy_updated_details": err = json.Unmarshal(body, &u.GroupJoinPolicyUpdatedDetails) if err != nil { return err } case "group_moved_details": err = json.Unmarshal(body, &u.GroupMovedDetails) if err != nil { return err } case "group_remove_external_id_details": err = json.Unmarshal(body, &u.GroupRemoveExternalIdDetails) if err != nil { return err } case "group_remove_member_details": err = json.Unmarshal(body, &u.GroupRemoveMemberDetails) if err != nil { return err } case "group_rename_details": err = json.Unmarshal(body, &u.GroupRenameDetails) if err != nil { return err } case "emm_error_details": err = json.Unmarshal(body, &u.EmmErrorDetails) if err != nil { return err } case "login_fail_details": err = json.Unmarshal(body, &u.LoginFailDetails) if err != nil { return err } case "login_success_details": err = json.Unmarshal(body, &u.LoginSuccessDetails) if err != nil { return err } case "logout_details": err = json.Unmarshal(body, &u.LogoutDetails) if err != nil { return err } case "reseller_support_session_end_details": err = json.Unmarshal(body, &u.ResellerSupportSessionEndDetails) if err != nil { return err } case "reseller_support_session_start_details": err = json.Unmarshal(body, &u.ResellerSupportSessionStartDetails) if err != nil { return err } case "sign_in_as_session_end_details": err = json.Unmarshal(body, &u.SignInAsSessionEndDetails) if err != nil { return err } case "sign_in_as_session_start_details": err = json.Unmarshal(body, &u.SignInAsSessionStartDetails) if err != nil { return err } case "sso_error_details": err = json.Unmarshal(body, &u.SsoErrorDetails) if err != nil { return err } case "member_add_name_details": err = json.Unmarshal(body, &u.MemberAddNameDetails) if err != nil { return err } case "member_change_admin_role_details": err = json.Unmarshal(body, &u.MemberChangeAdminRoleDetails) if err != nil { return err } case "member_change_email_details": err = json.Unmarshal(body, &u.MemberChangeEmailDetails) if err != nil { return err } case "member_change_membership_type_details": err = json.Unmarshal(body, &u.MemberChangeMembershipTypeDetails) if err != nil { return err } case "member_change_name_details": err = json.Unmarshal(body, &u.MemberChangeNameDetails) if err != nil { return err } case "member_change_status_details": err = json.Unmarshal(body, &u.MemberChangeStatusDetails) if err != nil { return err } case "member_delete_manual_contacts_details": err = json.Unmarshal(body, &u.MemberDeleteManualContactsDetails) if err != nil { return err } case "member_permanently_delete_account_contents_details": err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContentsDetails) if err != nil { return err } case "member_space_limits_add_custom_quota_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuotaDetails) if err != nil { return err } case "member_space_limits_change_custom_quota_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuotaDetails) if err != nil { return err } case "member_space_limits_change_status_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatusDetails) if err != nil { return err } case "member_space_limits_remove_custom_quota_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuotaDetails) if err != nil { return err } case "member_suggest_details": err = json.Unmarshal(body, &u.MemberSuggestDetails) if err != nil { return err } case "member_transfer_account_contents_details": err = json.Unmarshal(body, &u.MemberTransferAccountContentsDetails) if err != nil { return err } case "secondary_mails_policy_changed_details": err = json.Unmarshal(body, &u.SecondaryMailsPolicyChangedDetails) if err != nil { return err } case "paper_content_add_member_details": err = json.Unmarshal(body, &u.PaperContentAddMemberDetails) if err != nil { return err } case "paper_content_add_to_folder_details": err = json.Unmarshal(body, &u.PaperContentAddToFolderDetails) if err != nil { return err } case "paper_content_archive_details": err = json.Unmarshal(body, &u.PaperContentArchiveDetails) if err != nil { return err } case "paper_content_create_details": err = json.Unmarshal(body, &u.PaperContentCreateDetails) if err != nil { return err } case "paper_content_permanently_delete_details": err = json.Unmarshal(body, &u.PaperContentPermanentlyDeleteDetails) if err != nil { return err } case "paper_content_remove_from_folder_details": err = json.Unmarshal(body, &u.PaperContentRemoveFromFolderDetails) if err != nil { return err } case "paper_content_remove_member_details": err = json.Unmarshal(body, &u.PaperContentRemoveMemberDetails) if err != nil { return err } case "paper_content_rename_details": err = json.Unmarshal(body, &u.PaperContentRenameDetails) if err != nil { return err } case "paper_content_restore_details": err = json.Unmarshal(body, &u.PaperContentRestoreDetails) if err != nil { return err } case "paper_doc_add_comment_details": err = json.Unmarshal(body, &u.PaperDocAddCommentDetails) if err != nil { return err } case "paper_doc_change_member_role_details": err = json.Unmarshal(body, &u.PaperDocChangeMemberRoleDetails) if err != nil { return err } case "paper_doc_change_sharing_policy_details": err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicyDetails) if err != nil { return err } case "paper_doc_change_subscription_details": err = json.Unmarshal(body, &u.PaperDocChangeSubscriptionDetails) if err != nil { return err } case "paper_doc_deleted_details": err = json.Unmarshal(body, &u.PaperDocDeletedDetails) if err != nil { return err } case "paper_doc_delete_comment_details": err = json.Unmarshal(body, &u.PaperDocDeleteCommentDetails) if err != nil { return err } case "paper_doc_download_details": err = json.Unmarshal(body, &u.PaperDocDownloadDetails) if err != nil { return err } case "paper_doc_edit_details": err = json.Unmarshal(body, &u.PaperDocEditDetails) if err != nil { return err } case "paper_doc_edit_comment_details": err = json.Unmarshal(body, &u.PaperDocEditCommentDetails) if err != nil { return err } case "paper_doc_followed_details": err = json.Unmarshal(body, &u.PaperDocFollowedDetails) if err != nil { return err } case "paper_doc_mention_details": err = json.Unmarshal(body, &u.PaperDocMentionDetails) if err != nil { return err } case "paper_doc_ownership_changed_details": err = json.Unmarshal(body, &u.PaperDocOwnershipChangedDetails) if err != nil { return err } case "paper_doc_request_access_details": err = json.Unmarshal(body, &u.PaperDocRequestAccessDetails) if err != nil { return err } case "paper_doc_resolve_comment_details": err = json.Unmarshal(body, &u.PaperDocResolveCommentDetails) if err != nil { return err } case "paper_doc_revert_details": err = json.Unmarshal(body, &u.PaperDocRevertDetails) if err != nil { return err } case "paper_doc_slack_share_details": err = json.Unmarshal(body, &u.PaperDocSlackShareDetails) if err != nil { return err } case "paper_doc_team_invite_details": err = json.Unmarshal(body, &u.PaperDocTeamInviteDetails) if err != nil { return err } case "paper_doc_trashed_details": err = json.Unmarshal(body, &u.PaperDocTrashedDetails) if err != nil { return err } case "paper_doc_unresolve_comment_details": err = json.Unmarshal(body, &u.PaperDocUnresolveCommentDetails) if err != nil { return err } case "paper_doc_untrashed_details": err = json.Unmarshal(body, &u.PaperDocUntrashedDetails) if err != nil { return err } case "paper_doc_view_details": err = json.Unmarshal(body, &u.PaperDocViewDetails) if err != nil { return err } case "paper_external_view_allow_details": err = json.Unmarshal(body, &u.PaperExternalViewAllowDetails) if err != nil { return err } case "paper_external_view_default_team_details": err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeamDetails) if err != nil { return err } case "paper_external_view_forbid_details": err = json.Unmarshal(body, &u.PaperExternalViewForbidDetails) if err != nil { return err } case "paper_folder_change_subscription_details": err = json.Unmarshal(body, &u.PaperFolderChangeSubscriptionDetails) if err != nil { return err } case "paper_folder_deleted_details": err = json.Unmarshal(body, &u.PaperFolderDeletedDetails) if err != nil { return err } case "paper_folder_followed_details": err = json.Unmarshal(body, &u.PaperFolderFollowedDetails) if err != nil { return err } case "paper_folder_team_invite_details": err = json.Unmarshal(body, &u.PaperFolderTeamInviteDetails) if err != nil { return err } case "password_change_details": err = json.Unmarshal(body, &u.PasswordChangeDetails) if err != nil { return err } case "password_reset_details": err = json.Unmarshal(body, &u.PasswordResetDetails) if err != nil { return err } case "password_reset_all_details": err = json.Unmarshal(body, &u.PasswordResetAllDetails) if err != nil { return err } case "emm_create_exceptions_report_details": err = json.Unmarshal(body, &u.EmmCreateExceptionsReportDetails) if err != nil { return err } case "emm_create_usage_report_details": err = json.Unmarshal(body, &u.EmmCreateUsageReportDetails) if err != nil { return err } case "export_members_report_details": err = json.Unmarshal(body, &u.ExportMembersReportDetails) if err != nil { return err } case "paper_admin_export_start_details": err = json.Unmarshal(body, &u.PaperAdminExportStartDetails) if err != nil { return err } case "smart_sync_create_admin_privilege_report_details": err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReportDetails) if err != nil { return err } case "team_activity_create_report_details": err = json.Unmarshal(body, &u.TeamActivityCreateReportDetails) if err != nil { return err } case "collection_share_details": err = json.Unmarshal(body, &u.CollectionShareDetails) if err != nil { return err } case "note_acl_invite_only_details": err = json.Unmarshal(body, &u.NoteAclInviteOnlyDetails) if err != nil { return err } case "note_acl_link_details": err = json.Unmarshal(body, &u.NoteAclLinkDetails) if err != nil { return err } case "note_acl_team_link_details": err = json.Unmarshal(body, &u.NoteAclTeamLinkDetails) if err != nil { return err } case "note_shared_details": err = json.Unmarshal(body, &u.NoteSharedDetails) if err != nil { return err } case "note_share_receive_details": err = json.Unmarshal(body, &u.NoteShareReceiveDetails) if err != nil { return err } case "open_note_shared_details": err = json.Unmarshal(body, &u.OpenNoteSharedDetails) if err != nil { return err } case "sf_add_group_details": err = json.Unmarshal(body, &u.SfAddGroupDetails) if err != nil { return err } case "sf_allow_non_members_to_view_shared_links_details": err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinksDetails) if err != nil { return err } case "sf_external_invite_warn_details": err = json.Unmarshal(body, &u.SfExternalInviteWarnDetails) if err != nil { return err } case "sf_fb_invite_details": err = json.Unmarshal(body, &u.SfFbInviteDetails) if err != nil { return err } case "sf_fb_invite_change_role_details": err = json.Unmarshal(body, &u.SfFbInviteChangeRoleDetails) if err != nil { return err } case "sf_fb_uninvite_details": err = json.Unmarshal(body, &u.SfFbUninviteDetails) if err != nil { return err } case "sf_invite_group_details": err = json.Unmarshal(body, &u.SfInviteGroupDetails) if err != nil { return err } case "sf_team_grant_access_details": err = json.Unmarshal(body, &u.SfTeamGrantAccessDetails) if err != nil { return err } case "sf_team_invite_details": err = json.Unmarshal(body, &u.SfTeamInviteDetails) if err != nil { return err } case "sf_team_invite_change_role_details": err = json.Unmarshal(body, &u.SfTeamInviteChangeRoleDetails) if err != nil { return err } case "sf_team_join_details": err = json.Unmarshal(body, &u.SfTeamJoinDetails) if err != nil { return err } case "sf_team_join_from_oob_link_details": err = json.Unmarshal(body, &u.SfTeamJoinFromOobLinkDetails) if err != nil { return err } case "sf_team_uninvite_details": err = json.Unmarshal(body, &u.SfTeamUninviteDetails) if err != nil { return err } case "shared_content_add_invitees_details": err = json.Unmarshal(body, &u.SharedContentAddInviteesDetails) if err != nil { return err } case "shared_content_add_link_expiry_details": err = json.Unmarshal(body, &u.SharedContentAddLinkExpiryDetails) if err != nil { return err } case "shared_content_add_link_password_details": err = json.Unmarshal(body, &u.SharedContentAddLinkPasswordDetails) if err != nil { return err } case "shared_content_add_member_details": err = json.Unmarshal(body, &u.SharedContentAddMemberDetails) if err != nil { return err } case "shared_content_change_downloads_policy_details": err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicyDetails) if err != nil { return err } case "shared_content_change_invitee_role_details": err = json.Unmarshal(body, &u.SharedContentChangeInviteeRoleDetails) if err != nil { return err } case "shared_content_change_link_audience_details": err = json.Unmarshal(body, &u.SharedContentChangeLinkAudienceDetails) if err != nil { return err } case "shared_content_change_link_expiry_details": err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiryDetails) if err != nil { return err } case "shared_content_change_link_password_details": err = json.Unmarshal(body, &u.SharedContentChangeLinkPasswordDetails) if err != nil { return err } case "shared_content_change_member_role_details": err = json.Unmarshal(body, &u.SharedContentChangeMemberRoleDetails) if err != nil { return err } case "shared_content_change_viewer_info_policy_details": err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicyDetails) if err != nil { return err } case "shared_content_claim_invitation_details": err = json.Unmarshal(body, &u.SharedContentClaimInvitationDetails) if err != nil { return err } case "shared_content_copy_details": err = json.Unmarshal(body, &u.SharedContentCopyDetails) if err != nil { return err } case "shared_content_download_details": err = json.Unmarshal(body, &u.SharedContentDownloadDetails) if err != nil { return err } case "shared_content_relinquish_membership_details": err = json.Unmarshal(body, &u.SharedContentRelinquishMembershipDetails) if err != nil { return err } case "shared_content_remove_invitees_details": err = json.Unmarshal(body, &u.SharedContentRemoveInviteesDetails) if err != nil { return err } case "shared_content_remove_link_expiry_details": err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiryDetails) if err != nil { return err } case "shared_content_remove_link_password_details": err = json.Unmarshal(body, &u.SharedContentRemoveLinkPasswordDetails) if err != nil { return err } case "shared_content_remove_member_details": err = json.Unmarshal(body, &u.SharedContentRemoveMemberDetails) if err != nil { return err } case "shared_content_request_access_details": err = json.Unmarshal(body, &u.SharedContentRequestAccessDetails) if err != nil { return err } case "shared_content_unshare_details": err = json.Unmarshal(body, &u.SharedContentUnshareDetails) if err != nil { return err } case "shared_content_view_details": err = json.Unmarshal(body, &u.SharedContentViewDetails) if err != nil { return err } case "shared_folder_change_link_policy_details": err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicyDetails) if err != nil { return err } case "shared_folder_change_members_inheritance_policy_details": err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicyDetails) if err != nil { return err } case "shared_folder_change_members_management_policy_details": err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicyDetails) if err != nil { return err } case "shared_folder_change_members_policy_details": err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicyDetails) if err != nil { return err } case "shared_folder_create_details": err = json.Unmarshal(body, &u.SharedFolderCreateDetails) if err != nil { return err } case "shared_folder_decline_invitation_details": err = json.Unmarshal(body, &u.SharedFolderDeclineInvitationDetails) if err != nil { return err } case "shared_folder_mount_details": err = json.Unmarshal(body, &u.SharedFolderMountDetails) if err != nil { return err } case "shared_folder_nest_details": err = json.Unmarshal(body, &u.SharedFolderNestDetails) if err != nil { return err } case "shared_folder_transfer_ownership_details": err = json.Unmarshal(body, &u.SharedFolderTransferOwnershipDetails) if err != nil { return err } case "shared_folder_unmount_details": err = json.Unmarshal(body, &u.SharedFolderUnmountDetails) if err != nil { return err } case "shared_link_add_expiry_details": err = json.Unmarshal(body, &u.SharedLinkAddExpiryDetails) if err != nil { return err } case "shared_link_change_expiry_details": err = json.Unmarshal(body, &u.SharedLinkChangeExpiryDetails) if err != nil { return err } case "shared_link_change_visibility_details": err = json.Unmarshal(body, &u.SharedLinkChangeVisibilityDetails) if err != nil { return err } case "shared_link_copy_details": err = json.Unmarshal(body, &u.SharedLinkCopyDetails) if err != nil { return err } case "shared_link_create_details": err = json.Unmarshal(body, &u.SharedLinkCreateDetails) if err != nil { return err } case "shared_link_disable_details": err = json.Unmarshal(body, &u.SharedLinkDisableDetails) if err != nil { return err } case "shared_link_download_details": err = json.Unmarshal(body, &u.SharedLinkDownloadDetails) if err != nil { return err } case "shared_link_remove_expiry_details": err = json.Unmarshal(body, &u.SharedLinkRemoveExpiryDetails) if err != nil { return err } case "shared_link_share_details": err = json.Unmarshal(body, &u.SharedLinkShareDetails) if err != nil { return err } case "shared_link_view_details": err = json.Unmarshal(body, &u.SharedLinkViewDetails) if err != nil { return err } case "shared_note_opened_details": err = json.Unmarshal(body, &u.SharedNoteOpenedDetails) if err != nil { return err } case "shmodel_group_share_details": err = json.Unmarshal(body, &u.ShmodelGroupShareDetails) if err != nil { return err } case "showcase_access_granted_details": err = json.Unmarshal(body, &u.ShowcaseAccessGrantedDetails) if err != nil { return err } case "showcase_add_member_details": err = json.Unmarshal(body, &u.ShowcaseAddMemberDetails) if err != nil { return err } case "showcase_archived_details": err = json.Unmarshal(body, &u.ShowcaseArchivedDetails) if err != nil { return err } case "showcase_created_details": err = json.Unmarshal(body, &u.ShowcaseCreatedDetails) if err != nil { return err } case "showcase_delete_comment_details": err = json.Unmarshal(body, &u.ShowcaseDeleteCommentDetails) if err != nil { return err } case "showcase_edited_details": err = json.Unmarshal(body, &u.ShowcaseEditedDetails) if err != nil { return err } case "showcase_edit_comment_details": err = json.Unmarshal(body, &u.ShowcaseEditCommentDetails) if err != nil { return err } case "showcase_file_added_details": err = json.Unmarshal(body, &u.ShowcaseFileAddedDetails) if err != nil { return err } case "showcase_file_download_details": err = json.Unmarshal(body, &u.ShowcaseFileDownloadDetails) if err != nil { return err } case "showcase_file_removed_details": err = json.Unmarshal(body, &u.ShowcaseFileRemovedDetails) if err != nil { return err } case "showcase_file_view_details": err = json.Unmarshal(body, &u.ShowcaseFileViewDetails) if err != nil { return err } case "showcase_permanently_deleted_details": err = json.Unmarshal(body, &u.ShowcasePermanentlyDeletedDetails) if err != nil { return err } case "showcase_post_comment_details": err = json.Unmarshal(body, &u.ShowcasePostCommentDetails) if err != nil { return err } case "showcase_remove_member_details": err = json.Unmarshal(body, &u.ShowcaseRemoveMemberDetails) if err != nil { return err } case "showcase_renamed_details": err = json.Unmarshal(body, &u.ShowcaseRenamedDetails) if err != nil { return err } case "showcase_request_access_details": err = json.Unmarshal(body, &u.ShowcaseRequestAccessDetails) if err != nil { return err } case "showcase_resolve_comment_details": err = json.Unmarshal(body, &u.ShowcaseResolveCommentDetails) if err != nil { return err } case "showcase_restored_details": err = json.Unmarshal(body, &u.ShowcaseRestoredDetails) if err != nil { return err } case "showcase_trashed_details": err = json.Unmarshal(body, &u.ShowcaseTrashedDetails) if err != nil { return err } case "showcase_trashed_deprecated_details": err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecatedDetails) if err != nil { return err } case "showcase_unresolve_comment_details": err = json.Unmarshal(body, &u.ShowcaseUnresolveCommentDetails) if err != nil { return err } case "showcase_untrashed_details": err = json.Unmarshal(body, &u.ShowcaseUntrashedDetails) if err != nil { return err } case "showcase_untrashed_deprecated_details": err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecatedDetails) if err != nil { return err } case "showcase_view_details": err = json.Unmarshal(body, &u.ShowcaseViewDetails) if err != nil { return err } case "sso_add_cert_details": err = json.Unmarshal(body, &u.SsoAddCertDetails) if err != nil { return err } case "sso_add_login_url_details": err = json.Unmarshal(body, &u.SsoAddLoginUrlDetails) if err != nil { return err } case "sso_add_logout_url_details": err = json.Unmarshal(body, &u.SsoAddLogoutUrlDetails) if err != nil { return err } case "sso_change_cert_details": err = json.Unmarshal(body, &u.SsoChangeCertDetails) if err != nil { return err } case "sso_change_login_url_details": err = json.Unmarshal(body, &u.SsoChangeLoginUrlDetails) if err != nil { return err } case "sso_change_logout_url_details": err = json.Unmarshal(body, &u.SsoChangeLogoutUrlDetails) if err != nil { return err } case "sso_change_saml_identity_mode_details": err = json.Unmarshal(body, &u.SsoChangeSamlIdentityModeDetails) if err != nil { return err } case "sso_remove_cert_details": err = json.Unmarshal(body, &u.SsoRemoveCertDetails) if err != nil { return err } case "sso_remove_login_url_details": err = json.Unmarshal(body, &u.SsoRemoveLoginUrlDetails) if err != nil { return err } case "sso_remove_logout_url_details": err = json.Unmarshal(body, &u.SsoRemoveLogoutUrlDetails) if err != nil { return err } case "team_folder_change_status_details": err = json.Unmarshal(body, &u.TeamFolderChangeStatusDetails) if err != nil { return err } case "team_folder_create_details": err = json.Unmarshal(body, &u.TeamFolderCreateDetails) if err != nil { return err } case "team_folder_downgrade_details": err = json.Unmarshal(body, &u.TeamFolderDowngradeDetails) if err != nil { return err } case "team_folder_permanently_delete_details": err = json.Unmarshal(body, &u.TeamFolderPermanentlyDeleteDetails) if err != nil { return err } case "team_folder_rename_details": err = json.Unmarshal(body, &u.TeamFolderRenameDetails) if err != nil { return err } case "team_selective_sync_settings_changed_details": err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChangedDetails) if err != nil { return err } case "account_capture_change_policy_details": err = json.Unmarshal(body, &u.AccountCaptureChangePolicyDetails) if err != nil { return err } case "allow_download_disabled_details": err = json.Unmarshal(body, &u.AllowDownloadDisabledDetails) if err != nil { return err } case "allow_download_enabled_details": err = json.Unmarshal(body, &u.AllowDownloadEnabledDetails) if err != nil { return err } case "camera_uploads_policy_changed_details": err = json.Unmarshal(body, &u.CameraUploadsPolicyChangedDetails) if err != nil { return err } case "data_placement_restriction_change_policy_details": err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicyDetails) if err != nil { return err } case "data_placement_restriction_satisfy_policy_details": err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicyDetails) if err != nil { return err } case "device_approvals_change_desktop_policy_details": err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicyDetails) if err != nil { return err } case "device_approvals_change_mobile_policy_details": err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicyDetails) if err != nil { return err } case "device_approvals_change_overage_action_details": err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageActionDetails) if err != nil { return err } case "device_approvals_change_unlink_action_details": err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkActionDetails) if err != nil { return err } case "directory_restrictions_add_members_details": err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembersDetails) if err != nil { return err } case "directory_restrictions_remove_members_details": err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembersDetails) if err != nil { return err } case "emm_add_exception_details": err = json.Unmarshal(body, &u.EmmAddExceptionDetails) if err != nil { return err } case "emm_change_policy_details": err = json.Unmarshal(body, &u.EmmChangePolicyDetails) if err != nil { return err } case "emm_remove_exception_details": err = json.Unmarshal(body, &u.EmmRemoveExceptionDetails) if err != nil { return err } case "extended_version_history_change_policy_details": err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicyDetails) if err != nil { return err } case "file_comments_change_policy_details": err = json.Unmarshal(body, &u.FileCommentsChangePolicyDetails) if err != nil { return err } case "file_requests_change_policy_details": err = json.Unmarshal(body, &u.FileRequestsChangePolicyDetails) if err != nil { return err } case "file_requests_emails_enabled_details": err = json.Unmarshal(body, &u.FileRequestsEmailsEnabledDetails) if err != nil { return err } case "file_requests_emails_restricted_to_team_only_details": err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnlyDetails) if err != nil { return err } case "google_sso_change_policy_details": err = json.Unmarshal(body, &u.GoogleSsoChangePolicyDetails) if err != nil { return err } case "group_user_management_change_policy_details": err = json.Unmarshal(body, &u.GroupUserManagementChangePolicyDetails) if err != nil { return err } case "member_requests_change_policy_details": err = json.Unmarshal(body, &u.MemberRequestsChangePolicyDetails) if err != nil { return err } case "member_space_limits_add_exception_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsAddExceptionDetails) if err != nil { return err } case "member_space_limits_change_caps_type_policy_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicyDetails) if err != nil { return err } case "member_space_limits_change_policy_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicyDetails) if err != nil { return err } case "member_space_limits_remove_exception_details": err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveExceptionDetails) if err != nil { return err } case "member_suggestions_change_policy_details": err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicyDetails) if err != nil { return err } case "microsoft_office_addin_change_policy_details": err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicyDetails) if err != nil { return err } case "network_control_change_policy_details": err = json.Unmarshal(body, &u.NetworkControlChangePolicyDetails) if err != nil { return err } case "paper_change_deployment_policy_details": err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicyDetails) if err != nil { return err } case "paper_change_member_link_policy_details": err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicyDetails) if err != nil { return err } case "paper_change_member_policy_details": err = json.Unmarshal(body, &u.PaperChangeMemberPolicyDetails) if err != nil { return err } case "paper_change_policy_details": err = json.Unmarshal(body, &u.PaperChangePolicyDetails) if err != nil { return err } case "paper_enabled_users_group_addition_details": err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAdditionDetails) if err != nil { return err } case "paper_enabled_users_group_removal_details": err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemovalDetails) if err != nil { return err } case "permanent_delete_change_policy_details": err = json.Unmarshal(body, &u.PermanentDeleteChangePolicyDetails) if err != nil { return err } case "sharing_change_folder_join_policy_details": err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicyDetails) if err != nil { return err } case "sharing_change_link_policy_details": err = json.Unmarshal(body, &u.SharingChangeLinkPolicyDetails) if err != nil { return err } case "sharing_change_member_policy_details": err = json.Unmarshal(body, &u.SharingChangeMemberPolicyDetails) if err != nil { return err } case "showcase_change_download_policy_details": err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicyDetails) if err != nil { return err } case "showcase_change_enabled_policy_details": err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicyDetails) if err != nil { return err } case "showcase_change_external_sharing_policy_details": err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicyDetails) if err != nil { return err } case "smart_sync_change_policy_details": err = json.Unmarshal(body, &u.SmartSyncChangePolicyDetails) if err != nil { return err } case "smart_sync_not_opt_out_details": err = json.Unmarshal(body, &u.SmartSyncNotOptOutDetails) if err != nil { return err } case "smart_sync_opt_out_details": err = json.Unmarshal(body, &u.SmartSyncOptOutDetails) if err != nil { return err } case "sso_change_policy_details": err = json.Unmarshal(body, &u.SsoChangePolicyDetails) if err != nil { return err } case "team_selective_sync_policy_changed_details": err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChangedDetails) if err != nil { return err } case "tfa_change_policy_details": err = json.Unmarshal(body, &u.TfaChangePolicyDetails) if err != nil { return err } case "two_account_change_policy_details": err = json.Unmarshal(body, &u.TwoAccountChangePolicyDetails) if err != nil { return err } case "viewer_info_policy_changed_details": err = json.Unmarshal(body, &u.ViewerInfoPolicyChangedDetails) if err != nil { return err } case "web_sessions_change_fixed_length_policy_details": err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicyDetails) if err != nil { return err } case "web_sessions_change_idle_length_policy_details": err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicyDetails) if err != nil { return err } case "team_merge_from_details": err = json.Unmarshal(body, &u.TeamMergeFromDetails) if err != nil { return err } case "team_merge_to_details": err = json.Unmarshal(body, &u.TeamMergeToDetails) if err != nil { return err } case "team_profile_add_logo_details": err = json.Unmarshal(body, &u.TeamProfileAddLogoDetails) if err != nil { return err } case "team_profile_change_default_language_details": err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguageDetails) if err != nil { return err } case "team_profile_change_logo_details": err = json.Unmarshal(body, &u.TeamProfileChangeLogoDetails) if err != nil { return err } case "team_profile_change_name_details": err = json.Unmarshal(body, &u.TeamProfileChangeNameDetails) if err != nil { return err } case "team_profile_remove_logo_details": err = json.Unmarshal(body, &u.TeamProfileRemoveLogoDetails) if err != nil { return err } case "tfa_add_backup_phone_details": err = json.Unmarshal(body, &u.TfaAddBackupPhoneDetails) if err != nil { return err } case "tfa_add_security_key_details": err = json.Unmarshal(body, &u.TfaAddSecurityKeyDetails) if err != nil { return err } case "tfa_change_backup_phone_details": err = json.Unmarshal(body, &u.TfaChangeBackupPhoneDetails) if err != nil { return err } case "tfa_change_status_details": err = json.Unmarshal(body, &u.TfaChangeStatusDetails) if err != nil { return err } case "tfa_remove_backup_phone_details": err = json.Unmarshal(body, &u.TfaRemoveBackupPhoneDetails) if err != nil { return err } case "tfa_remove_security_key_details": err = json.Unmarshal(body, &u.TfaRemoveSecurityKeyDetails) if err != nil { return err } case "tfa_reset_details": err = json.Unmarshal(body, &u.TfaResetDetails) if err != nil { return err } case "missing_details": err = json.Unmarshal(body, &u.MissingDetails) if err != nil { return err } } return nil } // EventType : The type of the event. type EventType struct { dropbox.Tagged // AppLinkTeam : (apps) Linked app for team AppLinkTeam *AppLinkTeamType `json:"app_link_team,omitempty"` // AppLinkUser : (apps) Linked app for member AppLinkUser *AppLinkUserType `json:"app_link_user,omitempty"` // AppUnlinkTeam : (apps) Unlinked app for team AppUnlinkTeam *AppUnlinkTeamType `json:"app_unlink_team,omitempty"` // AppUnlinkUser : (apps) Unlinked app for member AppUnlinkUser *AppUnlinkUserType `json:"app_unlink_user,omitempty"` // FileAddComment : (comments) Added file comment FileAddComment *FileAddCommentType `json:"file_add_comment,omitempty"` // FileChangeCommentSubscription : (comments) Subscribed to or unsubscribed // from comment notifications for file FileChangeCommentSubscription *FileChangeCommentSubscriptionType `json:"file_change_comment_subscription,omitempty"` // FileDeleteComment : (comments) Deleted file comment FileDeleteComment *FileDeleteCommentType `json:"file_delete_comment,omitempty"` // FileEditComment : (comments) Edited file comment FileEditComment *FileEditCommentType `json:"file_edit_comment,omitempty"` // FileLikeComment : (comments) Liked file comment (deprecated, no longer // logged) FileLikeComment *FileLikeCommentType `json:"file_like_comment,omitempty"` // FileResolveComment : (comments) Resolved file comment FileResolveComment *FileResolveCommentType `json:"file_resolve_comment,omitempty"` // FileUnlikeComment : (comments) Unliked file comment (deprecated, no // longer logged) FileUnlikeComment *FileUnlikeCommentType `json:"file_unlike_comment,omitempty"` // FileUnresolveComment : (comments) Unresolved file comment FileUnresolveComment *FileUnresolveCommentType `json:"file_unresolve_comment,omitempty"` // DeviceChangeIpDesktop : (devices) Changed IP address associated with // active desktop session DeviceChangeIpDesktop *DeviceChangeIpDesktopType `json:"device_change_ip_desktop,omitempty"` // DeviceChangeIpMobile : (devices) Changed IP address associated with // active mobile session DeviceChangeIpMobile *DeviceChangeIpMobileType `json:"device_change_ip_mobile,omitempty"` // DeviceChangeIpWeb : (devices) Changed IP address associated with active // web session DeviceChangeIpWeb *DeviceChangeIpWebType `json:"device_change_ip_web,omitempty"` // DeviceDeleteOnUnlinkFail : (devices) Failed to delete all files from // unlinked device DeviceDeleteOnUnlinkFail *DeviceDeleteOnUnlinkFailType `json:"device_delete_on_unlink_fail,omitempty"` // DeviceDeleteOnUnlinkSuccess : (devices) Deleted all files from unlinked // device DeviceDeleteOnUnlinkSuccess *DeviceDeleteOnUnlinkSuccessType `json:"device_delete_on_unlink_success,omitempty"` // DeviceLinkFail : (devices) Failed to link device DeviceLinkFail *DeviceLinkFailType `json:"device_link_fail,omitempty"` // DeviceLinkSuccess : (devices) Linked device DeviceLinkSuccess *DeviceLinkSuccessType `json:"device_link_success,omitempty"` // DeviceManagementDisabled : (devices) Disabled device management // (deprecated, no longer logged) DeviceManagementDisabled *DeviceManagementDisabledType `json:"device_management_disabled,omitempty"` // DeviceManagementEnabled : (devices) Enabled device management // (deprecated, no longer logged) DeviceManagementEnabled *DeviceManagementEnabledType `json:"device_management_enabled,omitempty"` // DeviceUnlink : (devices) Disconnected device DeviceUnlink *DeviceUnlinkType `json:"device_unlink,omitempty"` // EmmRefreshAuthToken : (devices) Refreshed auth token used for setting up // enterprise mobility management EmmRefreshAuthToken *EmmRefreshAuthTokenType `json:"emm_refresh_auth_token,omitempty"` // AccountCaptureChangeAvailability : (domains) Granted/revoked option to // enable account capture on team domains AccountCaptureChangeAvailability *AccountCaptureChangeAvailabilityType `json:"account_capture_change_availability,omitempty"` // AccountCaptureMigrateAccount : (domains) Account-captured user migrated // account to team AccountCaptureMigrateAccount *AccountCaptureMigrateAccountType `json:"account_capture_migrate_account,omitempty"` // AccountCaptureNotificationEmailsSent : (domains) Sent proactive account // capture email to all unmanaged members AccountCaptureNotificationEmailsSent *AccountCaptureNotificationEmailsSentType `json:"account_capture_notification_emails_sent,omitempty"` // AccountCaptureRelinquishAccount : (domains) Account-captured user changed // account email to personal email AccountCaptureRelinquishAccount *AccountCaptureRelinquishAccountType `json:"account_capture_relinquish_account,omitempty"` // DisabledDomainInvites : (domains) Disabled domain invites (deprecated, no // longer logged) DisabledDomainInvites *DisabledDomainInvitesType `json:"disabled_domain_invites,omitempty"` // DomainInvitesApproveRequestToJoinTeam : (domains) Approved user's request // to join team DomainInvitesApproveRequestToJoinTeam *DomainInvitesApproveRequestToJoinTeamType `json:"domain_invites_approve_request_to_join_team,omitempty"` // DomainInvitesDeclineRequestToJoinTeam : (domains) Declined user's request // to join team DomainInvitesDeclineRequestToJoinTeam *DomainInvitesDeclineRequestToJoinTeamType `json:"domain_invites_decline_request_to_join_team,omitempty"` // DomainInvitesEmailExistingUsers : (domains) Sent domain invites to // existing domain accounts (deprecated, no longer logged) DomainInvitesEmailExistingUsers *DomainInvitesEmailExistingUsersType `json:"domain_invites_email_existing_users,omitempty"` // DomainInvitesRequestToJoinTeam : (domains) Requested to join team DomainInvitesRequestToJoinTeam *DomainInvitesRequestToJoinTeamType `json:"domain_invites_request_to_join_team,omitempty"` // DomainInvitesSetInviteNewUserPrefToNo : (domains) Disabled "Automatically // invite new users" (deprecated, no longer logged) DomainInvitesSetInviteNewUserPrefToNo *DomainInvitesSetInviteNewUserPrefToNoType `json:"domain_invites_set_invite_new_user_pref_to_no,omitempty"` // DomainInvitesSetInviteNewUserPrefToYes : (domains) Enabled "Automatically // invite new users" (deprecated, no longer logged) DomainInvitesSetInviteNewUserPrefToYes *DomainInvitesSetInviteNewUserPrefToYesType `json:"domain_invites_set_invite_new_user_pref_to_yes,omitempty"` // DomainVerificationAddDomainFail : (domains) Failed to verify team domain DomainVerificationAddDomainFail *DomainVerificationAddDomainFailType `json:"domain_verification_add_domain_fail,omitempty"` // DomainVerificationAddDomainSuccess : (domains) Verified team domain DomainVerificationAddDomainSuccess *DomainVerificationAddDomainSuccessType `json:"domain_verification_add_domain_success,omitempty"` // DomainVerificationRemoveDomain : (domains) Removed domain from list of // verified team domains DomainVerificationRemoveDomain *DomainVerificationRemoveDomainType `json:"domain_verification_remove_domain,omitempty"` // EnabledDomainInvites : (domains) Enabled domain invites (deprecated, no // longer logged) EnabledDomainInvites *EnabledDomainInvitesType `json:"enabled_domain_invites,omitempty"` // CreateFolder : (file_operations) Created folders (deprecated, no longer // logged) CreateFolder *CreateFolderType `json:"create_folder,omitempty"` // FileAdd : (file_operations) Added files and/or folders FileAdd *FileAddType `json:"file_add,omitempty"` // FileCopy : (file_operations) Copied files and/or folders FileCopy *FileCopyType `json:"file_copy,omitempty"` // FileDelete : (file_operations) Deleted files and/or folders FileDelete *FileDeleteType `json:"file_delete,omitempty"` // FileDownload : (file_operations) Downloaded files and/or folders FileDownload *FileDownloadType `json:"file_download,omitempty"` // FileEdit : (file_operations) Edited files FileEdit *FileEditType `json:"file_edit,omitempty"` // FileGetCopyReference : (file_operations) Created copy reference to // file/folder FileGetCopyReference *FileGetCopyReferenceType `json:"file_get_copy_reference,omitempty"` // FileMove : (file_operations) Moved files and/or folders FileMove *FileMoveType `json:"file_move,omitempty"` // FilePermanentlyDelete : (file_operations) Permanently deleted files // and/or folders FilePermanentlyDelete *FilePermanentlyDeleteType `json:"file_permanently_delete,omitempty"` // FilePreview : (file_operations) Previewed files and/or folders FilePreview *FilePreviewType `json:"file_preview,omitempty"` // FileRename : (file_operations) Renamed files and/or folders FileRename *FileRenameType `json:"file_rename,omitempty"` // FileRestore : (file_operations) Restored deleted files and/or folders FileRestore *FileRestoreType `json:"file_restore,omitempty"` // FileRevert : (file_operations) Reverted files to previous version FileRevert *FileRevertType `json:"file_revert,omitempty"` // FileRollbackChanges : (file_operations) Rolled back file actions FileRollbackChanges *FileRollbackChangesType `json:"file_rollback_changes,omitempty"` // FileSaveCopyReference : (file_operations) Saved file/folder using copy // reference FileSaveCopyReference *FileSaveCopyReferenceType `json:"file_save_copy_reference,omitempty"` // FileRequestChange : (file_requests) Changed file request FileRequestChange *FileRequestChangeType `json:"file_request_change,omitempty"` // FileRequestClose : (file_requests) Closed file request FileRequestClose *FileRequestCloseType `json:"file_request_close,omitempty"` // FileRequestCreate : (file_requests) Created file request FileRequestCreate *FileRequestCreateType `json:"file_request_create,omitempty"` // FileRequestReceiveFile : (file_requests) Received files for file request FileRequestReceiveFile *FileRequestReceiveFileType `json:"file_request_receive_file,omitempty"` // GroupAddExternalId : (groups) Added external ID for group GroupAddExternalId *GroupAddExternalIdType `json:"group_add_external_id,omitempty"` // GroupAddMember : (groups) Added team members to group GroupAddMember *GroupAddMemberType `json:"group_add_member,omitempty"` // GroupChangeExternalId : (groups) Changed external ID for group GroupChangeExternalId *GroupChangeExternalIdType `json:"group_change_external_id,omitempty"` // GroupChangeManagementType : (groups) Changed group management type GroupChangeManagementType *GroupChangeManagementTypeType `json:"group_change_management_type,omitempty"` // GroupChangeMemberRole : (groups) Changed manager permissions of group // member GroupChangeMemberRole *GroupChangeMemberRoleType `json:"group_change_member_role,omitempty"` // GroupCreate : (groups) Created group GroupCreate *GroupCreateType `json:"group_create,omitempty"` // GroupDelete : (groups) Deleted group GroupDelete *GroupDeleteType `json:"group_delete,omitempty"` // GroupDescriptionUpdated : (groups) Updated group (deprecated, no longer // logged) GroupDescriptionUpdated *GroupDescriptionUpdatedType `json:"group_description_updated,omitempty"` // GroupJoinPolicyUpdated : (groups) Updated group join policy (deprecated, // no longer logged) GroupJoinPolicyUpdated *GroupJoinPolicyUpdatedType `json:"group_join_policy_updated,omitempty"` // GroupMoved : (groups) Moved group (deprecated, no longer logged) GroupMoved *GroupMovedType `json:"group_moved,omitempty"` // GroupRemoveExternalId : (groups) Removed external ID for group GroupRemoveExternalId *GroupRemoveExternalIdType `json:"group_remove_external_id,omitempty"` // GroupRemoveMember : (groups) Removed team members from group GroupRemoveMember *GroupRemoveMemberType `json:"group_remove_member,omitempty"` // GroupRename : (groups) Renamed group GroupRename *GroupRenameType `json:"group_rename,omitempty"` // EmmError : (logins) Failed to sign in via EMM (deprecated, replaced by // 'Failed to sign in') EmmError *EmmErrorType `json:"emm_error,omitempty"` // LoginFail : (logins) Failed to sign in LoginFail *LoginFailType `json:"login_fail,omitempty"` // LoginSuccess : (logins) Signed in LoginSuccess *LoginSuccessType `json:"login_success,omitempty"` // Logout : (logins) Signed out Logout *LogoutType `json:"logout,omitempty"` // ResellerSupportSessionEnd : (logins) Ended reseller support session ResellerSupportSessionEnd *ResellerSupportSessionEndType `json:"reseller_support_session_end,omitempty"` // ResellerSupportSessionStart : (logins) Started reseller support session ResellerSupportSessionStart *ResellerSupportSessionStartType `json:"reseller_support_session_start,omitempty"` // SignInAsSessionEnd : (logins) Ended admin sign-in-as session SignInAsSessionEnd *SignInAsSessionEndType `json:"sign_in_as_session_end,omitempty"` // SignInAsSessionStart : (logins) Started admin sign-in-as session SignInAsSessionStart *SignInAsSessionStartType `json:"sign_in_as_session_start,omitempty"` // SsoError : (logins) Failed to sign in via SSO (deprecated, replaced by // 'Failed to sign in') SsoError *SsoErrorType `json:"sso_error,omitempty"` // MemberAddName : (members) Added team member name MemberAddName *MemberAddNameType `json:"member_add_name,omitempty"` // MemberChangeAdminRole : (members) Changed team member admin role MemberChangeAdminRole *MemberChangeAdminRoleType `json:"member_change_admin_role,omitempty"` // MemberChangeEmail : (members) Changed team member email MemberChangeEmail *MemberChangeEmailType `json:"member_change_email,omitempty"` // MemberChangeMembershipType : (members) Changed membership type // (limited/full) of member (deprecated, no longer logged) MemberChangeMembershipType *MemberChangeMembershipTypeType `json:"member_change_membership_type,omitempty"` // MemberChangeName : (members) Changed team member name MemberChangeName *MemberChangeNameType `json:"member_change_name,omitempty"` // MemberChangeStatus : (members) Changed member status (invited, joined, // suspended, etc.) MemberChangeStatus *MemberChangeStatusType `json:"member_change_status,omitempty"` // MemberDeleteManualContacts : (members) Cleared manually added contacts MemberDeleteManualContacts *MemberDeleteManualContactsType `json:"member_delete_manual_contacts,omitempty"` // MemberPermanentlyDeleteAccountContents : (members) Permanently deleted // contents of deleted team member account MemberPermanentlyDeleteAccountContents *MemberPermanentlyDeleteAccountContentsType `json:"member_permanently_delete_account_contents,omitempty"` // MemberSpaceLimitsAddCustomQuota : (members) Set custom member space limit MemberSpaceLimitsAddCustomQuota *MemberSpaceLimitsAddCustomQuotaType `json:"member_space_limits_add_custom_quota,omitempty"` // MemberSpaceLimitsChangeCustomQuota : (members) Changed custom member // space limit MemberSpaceLimitsChangeCustomQuota *MemberSpaceLimitsChangeCustomQuotaType `json:"member_space_limits_change_custom_quota,omitempty"` // MemberSpaceLimitsChangeStatus : (members) Changed space limit status MemberSpaceLimitsChangeStatus *MemberSpaceLimitsChangeStatusType `json:"member_space_limits_change_status,omitempty"` // MemberSpaceLimitsRemoveCustomQuota : (members) Removed custom member // space limit MemberSpaceLimitsRemoveCustomQuota *MemberSpaceLimitsRemoveCustomQuotaType `json:"member_space_limits_remove_custom_quota,omitempty"` // MemberSuggest : (members) Suggested person to add to team MemberSuggest *MemberSuggestType `json:"member_suggest,omitempty"` // MemberTransferAccountContents : (members) Transferred contents of deleted // member account to another member MemberTransferAccountContents *MemberTransferAccountContentsType `json:"member_transfer_account_contents,omitempty"` // SecondaryMailsPolicyChanged : (members) Secondary mails policy changed SecondaryMailsPolicyChanged *SecondaryMailsPolicyChangedType `json:"secondary_mails_policy_changed,omitempty"` // PaperContentAddMember : (paper) Added team member to Paper doc/folder PaperContentAddMember *PaperContentAddMemberType `json:"paper_content_add_member,omitempty"` // PaperContentAddToFolder : (paper) Added Paper doc/folder to folder PaperContentAddToFolder *PaperContentAddToFolderType `json:"paper_content_add_to_folder,omitempty"` // PaperContentArchive : (paper) Archived Paper doc/folder PaperContentArchive *PaperContentArchiveType `json:"paper_content_archive,omitempty"` // PaperContentCreate : (paper) Created Paper doc/folder PaperContentCreate *PaperContentCreateType `json:"paper_content_create,omitempty"` // PaperContentPermanentlyDelete : (paper) Permanently deleted Paper // doc/folder PaperContentPermanentlyDelete *PaperContentPermanentlyDeleteType `json:"paper_content_permanently_delete,omitempty"` // PaperContentRemoveFromFolder : (paper) Removed Paper doc/folder from // folder PaperContentRemoveFromFolder *PaperContentRemoveFromFolderType `json:"paper_content_remove_from_folder,omitempty"` // PaperContentRemoveMember : (paper) Removed team member from Paper // doc/folder PaperContentRemoveMember *PaperContentRemoveMemberType `json:"paper_content_remove_member,omitempty"` // PaperContentRename : (paper) Renamed Paper doc/folder PaperContentRename *PaperContentRenameType `json:"paper_content_rename,omitempty"` // PaperContentRestore : (paper) Restored archived Paper doc/folder PaperContentRestore *PaperContentRestoreType `json:"paper_content_restore,omitempty"` // PaperDocAddComment : (paper) Added Paper doc comment PaperDocAddComment *PaperDocAddCommentType `json:"paper_doc_add_comment,omitempty"` // PaperDocChangeMemberRole : (paper) Changed team member permissions for // Paper doc PaperDocChangeMemberRole *PaperDocChangeMemberRoleType `json:"paper_doc_change_member_role,omitempty"` // PaperDocChangeSharingPolicy : (paper) Changed sharing setting for Paper // doc PaperDocChangeSharingPolicy *PaperDocChangeSharingPolicyType `json:"paper_doc_change_sharing_policy,omitempty"` // PaperDocChangeSubscription : (paper) Followed/unfollowed Paper doc PaperDocChangeSubscription *PaperDocChangeSubscriptionType `json:"paper_doc_change_subscription,omitempty"` // PaperDocDeleted : (paper) Archived Paper doc (deprecated, no longer // logged) PaperDocDeleted *PaperDocDeletedType `json:"paper_doc_deleted,omitempty"` // PaperDocDeleteComment : (paper) Deleted Paper doc comment PaperDocDeleteComment *PaperDocDeleteCommentType `json:"paper_doc_delete_comment,omitempty"` // PaperDocDownload : (paper) Downloaded Paper doc in specific format PaperDocDownload *PaperDocDownloadType `json:"paper_doc_download,omitempty"` // PaperDocEdit : (paper) Edited Paper doc PaperDocEdit *PaperDocEditType `json:"paper_doc_edit,omitempty"` // PaperDocEditComment : (paper) Edited Paper doc comment PaperDocEditComment *PaperDocEditCommentType `json:"paper_doc_edit_comment,omitempty"` // PaperDocFollowed : (paper) Followed Paper doc (deprecated, replaced by // 'Followed/unfollowed Paper doc') PaperDocFollowed *PaperDocFollowedType `json:"paper_doc_followed,omitempty"` // PaperDocMention : (paper) Mentioned team member in Paper doc PaperDocMention *PaperDocMentionType `json:"paper_doc_mention,omitempty"` // PaperDocOwnershipChanged : (paper) Transferred ownership of Paper doc PaperDocOwnershipChanged *PaperDocOwnershipChangedType `json:"paper_doc_ownership_changed,omitempty"` // PaperDocRequestAccess : (paper) Requested access to Paper doc PaperDocRequestAccess *PaperDocRequestAccessType `json:"paper_doc_request_access,omitempty"` // PaperDocResolveComment : (paper) Resolved Paper doc comment PaperDocResolveComment *PaperDocResolveCommentType `json:"paper_doc_resolve_comment,omitempty"` // PaperDocRevert : (paper) Restored Paper doc to previous version PaperDocRevert *PaperDocRevertType `json:"paper_doc_revert,omitempty"` // PaperDocSlackShare : (paper) Shared Paper doc via Slack PaperDocSlackShare *PaperDocSlackShareType `json:"paper_doc_slack_share,omitempty"` // PaperDocTeamInvite : (paper) Shared Paper doc with team member // (deprecated, no longer logged) PaperDocTeamInvite *PaperDocTeamInviteType `json:"paper_doc_team_invite,omitempty"` // PaperDocTrashed : (paper) Deleted Paper doc PaperDocTrashed *PaperDocTrashedType `json:"paper_doc_trashed,omitempty"` // PaperDocUnresolveComment : (paper) Unresolved Paper doc comment PaperDocUnresolveComment *PaperDocUnresolveCommentType `json:"paper_doc_unresolve_comment,omitempty"` // PaperDocUntrashed : (paper) Restored Paper doc PaperDocUntrashed *PaperDocUntrashedType `json:"paper_doc_untrashed,omitempty"` // PaperDocView : (paper) Viewed Paper doc PaperDocView *PaperDocViewType `json:"paper_doc_view,omitempty"` // PaperExternalViewAllow : (paper) Changed Paper external sharing setting // to anyone (deprecated, no longer logged) PaperExternalViewAllow *PaperExternalViewAllowType `json:"paper_external_view_allow,omitempty"` // PaperExternalViewDefaultTeam : (paper) Changed Paper external sharing // setting to default team (deprecated, no longer logged) PaperExternalViewDefaultTeam *PaperExternalViewDefaultTeamType `json:"paper_external_view_default_team,omitempty"` // PaperExternalViewForbid : (paper) Changed Paper external sharing setting // to team-only (deprecated, no longer logged) PaperExternalViewForbid *PaperExternalViewForbidType `json:"paper_external_view_forbid,omitempty"` // PaperFolderChangeSubscription : (paper) Followed/unfollowed Paper folder PaperFolderChangeSubscription *PaperFolderChangeSubscriptionType `json:"paper_folder_change_subscription,omitempty"` // PaperFolderDeleted : (paper) Archived Paper folder (deprecated, no longer // logged) PaperFolderDeleted *PaperFolderDeletedType `json:"paper_folder_deleted,omitempty"` // PaperFolderFollowed : (paper) Followed Paper folder (deprecated, replaced // by 'Followed/unfollowed Paper folder') PaperFolderFollowed *PaperFolderFollowedType `json:"paper_folder_followed,omitempty"` // PaperFolderTeamInvite : (paper) Shared Paper folder with member // (deprecated, no longer logged) PaperFolderTeamInvite *PaperFolderTeamInviteType `json:"paper_folder_team_invite,omitempty"` // PasswordChange : (passwords) Changed password PasswordChange *PasswordChangeType `json:"password_change,omitempty"` // PasswordReset : (passwords) Reset password PasswordReset *PasswordResetType `json:"password_reset,omitempty"` // PasswordResetAll : (passwords) Reset all team member passwords PasswordResetAll *PasswordResetAllType `json:"password_reset_all,omitempty"` // EmmCreateExceptionsReport : (reports) Created EMM-excluded users report EmmCreateExceptionsReport *EmmCreateExceptionsReportType `json:"emm_create_exceptions_report,omitempty"` // EmmCreateUsageReport : (reports) Created EMM mobile app usage report EmmCreateUsageReport *EmmCreateUsageReportType `json:"emm_create_usage_report,omitempty"` // ExportMembersReport : (reports) Created member data report ExportMembersReport *ExportMembersReportType `json:"export_members_report,omitempty"` // PaperAdminExportStart : (reports) Exported all team Paper docs PaperAdminExportStart *PaperAdminExportStartType `json:"paper_admin_export_start,omitempty"` // SmartSyncCreateAdminPrivilegeReport : (reports) Created Smart Sync // non-admin devices report SmartSyncCreateAdminPrivilegeReport *SmartSyncCreateAdminPrivilegeReportType `json:"smart_sync_create_admin_privilege_report,omitempty"` // TeamActivityCreateReport : (reports) Created team activity report TeamActivityCreateReport *TeamActivityCreateReportType `json:"team_activity_create_report,omitempty"` // CollectionShare : (sharing) Shared album CollectionShare *CollectionShareType `json:"collection_share,omitempty"` // NoteAclInviteOnly : (sharing) Changed Paper doc to invite-only // (deprecated, no longer logged) NoteAclInviteOnly *NoteAclInviteOnlyType `json:"note_acl_invite_only,omitempty"` // NoteAclLink : (sharing) Changed Paper doc to link-accessible (deprecated, // no longer logged) NoteAclLink *NoteAclLinkType `json:"note_acl_link,omitempty"` // NoteAclTeamLink : (sharing) Changed Paper doc to link-accessible for team // (deprecated, no longer logged) NoteAclTeamLink *NoteAclTeamLinkType `json:"note_acl_team_link,omitempty"` // NoteShared : (sharing) Shared Paper doc (deprecated, no longer logged) NoteShared *NoteSharedType `json:"note_shared,omitempty"` // NoteShareReceive : (sharing) Shared received Paper doc (deprecated, no // longer logged) NoteShareReceive *NoteShareReceiveType `json:"note_share_receive,omitempty"` // OpenNoteShared : (sharing) Opened shared Paper doc (deprecated, no longer // logged) OpenNoteShared *OpenNoteSharedType `json:"open_note_shared,omitempty"` // SfAddGroup : (sharing) Added team to shared folder (deprecated, no longer // logged) SfAddGroup *SfAddGroupType `json:"sf_add_group,omitempty"` // SfAllowNonMembersToViewSharedLinks : (sharing) Allowed non-collaborators // to view links to files in shared folder (deprecated, no longer logged) SfAllowNonMembersToViewSharedLinks *SfAllowNonMembersToViewSharedLinksType `json:"sf_allow_non_members_to_view_shared_links,omitempty"` // SfExternalInviteWarn : (sharing) Set team members to see warning before // sharing folders outside team (deprecated, no longer logged) SfExternalInviteWarn *SfExternalInviteWarnType `json:"sf_external_invite_warn,omitempty"` // SfFbInvite : (sharing) Invited Facebook users to shared folder // (deprecated, no longer logged) SfFbInvite *SfFbInviteType `json:"sf_fb_invite,omitempty"` // SfFbInviteChangeRole : (sharing) Changed Facebook user's role in shared // folder (deprecated, no longer logged) SfFbInviteChangeRole *SfFbInviteChangeRoleType `json:"sf_fb_invite_change_role,omitempty"` // SfFbUninvite : (sharing) Uninvited Facebook user from shared folder // (deprecated, no longer logged) SfFbUninvite *SfFbUninviteType `json:"sf_fb_uninvite,omitempty"` // SfInviteGroup : (sharing) Invited group to shared folder (deprecated, no // longer logged) SfInviteGroup *SfInviteGroupType `json:"sf_invite_group,omitempty"` // SfTeamGrantAccess : (sharing) Granted access to shared folder // (deprecated, no longer logged) SfTeamGrantAccess *SfTeamGrantAccessType `json:"sf_team_grant_access,omitempty"` // SfTeamInvite : (sharing) Invited team members to shared folder // (deprecated, replaced by 'Invited user to Dropbox and added them to // shared file/folder') SfTeamInvite *SfTeamInviteType `json:"sf_team_invite,omitempty"` // SfTeamInviteChangeRole : (sharing) Changed team member's role in shared // folder (deprecated, no longer logged) SfTeamInviteChangeRole *SfTeamInviteChangeRoleType `json:"sf_team_invite_change_role,omitempty"` // SfTeamJoin : (sharing) Joined team member's shared folder (deprecated, no // longer logged) SfTeamJoin *SfTeamJoinType `json:"sf_team_join,omitempty"` // SfTeamJoinFromOobLink : (sharing) Joined team member's shared folder from // link (deprecated, no longer logged) SfTeamJoinFromOobLink *SfTeamJoinFromOobLinkType `json:"sf_team_join_from_oob_link,omitempty"` // SfTeamUninvite : (sharing) Unshared folder with team member (deprecated, // replaced by 'Removed invitee from shared file/folder before invite was // accepted') SfTeamUninvite *SfTeamUninviteType `json:"sf_team_uninvite,omitempty"` // SharedContentAddInvitees : (sharing) Invited user to Dropbox and added // them to shared file/folder SharedContentAddInvitees *SharedContentAddInviteesType `json:"shared_content_add_invitees,omitempty"` // SharedContentAddLinkExpiry : (sharing) Added expiration date to link for // shared file/folder SharedContentAddLinkExpiry *SharedContentAddLinkExpiryType `json:"shared_content_add_link_expiry,omitempty"` // SharedContentAddLinkPassword : (sharing) Added password to link for // shared file/folder SharedContentAddLinkPassword *SharedContentAddLinkPasswordType `json:"shared_content_add_link_password,omitempty"` // SharedContentAddMember : (sharing) Added users and/or groups to shared // file/folder SharedContentAddMember *SharedContentAddMemberType `json:"shared_content_add_member,omitempty"` // SharedContentChangeDownloadsPolicy : (sharing) Changed whether members // can download shared file/folder SharedContentChangeDownloadsPolicy *SharedContentChangeDownloadsPolicyType `json:"shared_content_change_downloads_policy,omitempty"` // SharedContentChangeInviteeRole : (sharing) Changed access type of invitee // to shared file/folder before invite was accepted SharedContentChangeInviteeRole *SharedContentChangeInviteeRoleType `json:"shared_content_change_invitee_role,omitempty"` // SharedContentChangeLinkAudience : (sharing) Changed link audience of // shared file/folder SharedContentChangeLinkAudience *SharedContentChangeLinkAudienceType `json:"shared_content_change_link_audience,omitempty"` // SharedContentChangeLinkExpiry : (sharing) Changed link expiration of // shared file/folder SharedContentChangeLinkExpiry *SharedContentChangeLinkExpiryType `json:"shared_content_change_link_expiry,omitempty"` // SharedContentChangeLinkPassword : (sharing) Changed link password of // shared file/folder SharedContentChangeLinkPassword *SharedContentChangeLinkPasswordType `json:"shared_content_change_link_password,omitempty"` // SharedContentChangeMemberRole : (sharing) Changed access type of shared // file/folder member SharedContentChangeMemberRole *SharedContentChangeMemberRoleType `json:"shared_content_change_member_role,omitempty"` // SharedContentChangeViewerInfoPolicy : (sharing) Changed whether members // can see who viewed shared file/folder SharedContentChangeViewerInfoPolicy *SharedContentChangeViewerInfoPolicyType `json:"shared_content_change_viewer_info_policy,omitempty"` // SharedContentClaimInvitation : (sharing) Acquired membership of shared // file/folder by accepting invite SharedContentClaimInvitation *SharedContentClaimInvitationType `json:"shared_content_claim_invitation,omitempty"` // SharedContentCopy : (sharing) Copied shared file/folder to own Dropbox SharedContentCopy *SharedContentCopyType `json:"shared_content_copy,omitempty"` // SharedContentDownload : (sharing) Downloaded shared file/folder SharedContentDownload *SharedContentDownloadType `json:"shared_content_download,omitempty"` // SharedContentRelinquishMembership : (sharing) Left shared file/folder SharedContentRelinquishMembership *SharedContentRelinquishMembershipType `json:"shared_content_relinquish_membership,omitempty"` // SharedContentRemoveInvitees : (sharing) Removed invitee from shared // file/folder before invite was accepted SharedContentRemoveInvitees *SharedContentRemoveInviteesType `json:"shared_content_remove_invitees,omitempty"` // SharedContentRemoveLinkExpiry : (sharing) Removed link expiration date of // shared file/folder SharedContentRemoveLinkExpiry *SharedContentRemoveLinkExpiryType `json:"shared_content_remove_link_expiry,omitempty"` // SharedContentRemoveLinkPassword : (sharing) Removed link password of // shared file/folder SharedContentRemoveLinkPassword *SharedContentRemoveLinkPasswordType `json:"shared_content_remove_link_password,omitempty"` // SharedContentRemoveMember : (sharing) Removed user/group from shared // file/folder SharedContentRemoveMember *SharedContentRemoveMemberType `json:"shared_content_remove_member,omitempty"` // SharedContentRequestAccess : (sharing) Requested access to shared // file/folder SharedContentRequestAccess *SharedContentRequestAccessType `json:"shared_content_request_access,omitempty"` // SharedContentUnshare : (sharing) Unshared file/folder by clearing // membership and turning off link SharedContentUnshare *SharedContentUnshareType `json:"shared_content_unshare,omitempty"` // SharedContentView : (sharing) Previewed shared file/folder SharedContentView *SharedContentViewType `json:"shared_content_view,omitempty"` // SharedFolderChangeLinkPolicy : (sharing) Changed who can access shared // folder via link SharedFolderChangeLinkPolicy *SharedFolderChangeLinkPolicyType `json:"shared_folder_change_link_policy,omitempty"` // SharedFolderChangeMembersInheritancePolicy : (sharing) Changed whether // shared folder inherits members from parent folder SharedFolderChangeMembersInheritancePolicy *SharedFolderChangeMembersInheritancePolicyType `json:"shared_folder_change_members_inheritance_policy,omitempty"` // SharedFolderChangeMembersManagementPolicy : (sharing) Changed who can // add/remove members of shared folder SharedFolderChangeMembersManagementPolicy *SharedFolderChangeMembersManagementPolicyType `json:"shared_folder_change_members_management_policy,omitempty"` // SharedFolderChangeMembersPolicy : (sharing) Changed who can become member // of shared folder SharedFolderChangeMembersPolicy *SharedFolderChangeMembersPolicyType `json:"shared_folder_change_members_policy,omitempty"` // SharedFolderCreate : (sharing) Created shared folder SharedFolderCreate *SharedFolderCreateType `json:"shared_folder_create,omitempty"` // SharedFolderDeclineInvitation : (sharing) Declined team member's invite // to shared folder SharedFolderDeclineInvitation *SharedFolderDeclineInvitationType `json:"shared_folder_decline_invitation,omitempty"` // SharedFolderMount : (sharing) Added shared folder to own Dropbox SharedFolderMount *SharedFolderMountType `json:"shared_folder_mount,omitempty"` // SharedFolderNest : (sharing) Changed parent of shared folder SharedFolderNest *SharedFolderNestType `json:"shared_folder_nest,omitempty"` // SharedFolderTransferOwnership : (sharing) Transferred ownership of shared // folder to another member SharedFolderTransferOwnership *SharedFolderTransferOwnershipType `json:"shared_folder_transfer_ownership,omitempty"` // SharedFolderUnmount : (sharing) Deleted shared folder from Dropbox SharedFolderUnmount *SharedFolderUnmountType `json:"shared_folder_unmount,omitempty"` // SharedLinkAddExpiry : (sharing) Added shared link expiration date SharedLinkAddExpiry *SharedLinkAddExpiryType `json:"shared_link_add_expiry,omitempty"` // SharedLinkChangeExpiry : (sharing) Changed shared link expiration date SharedLinkChangeExpiry *SharedLinkChangeExpiryType `json:"shared_link_change_expiry,omitempty"` // SharedLinkChangeVisibility : (sharing) Changed visibility of shared link SharedLinkChangeVisibility *SharedLinkChangeVisibilityType `json:"shared_link_change_visibility,omitempty"` // SharedLinkCopy : (sharing) Added file/folder to Dropbox from shared link SharedLinkCopy *SharedLinkCopyType `json:"shared_link_copy,omitempty"` // SharedLinkCreate : (sharing) Created shared link SharedLinkCreate *SharedLinkCreateType `json:"shared_link_create,omitempty"` // SharedLinkDisable : (sharing) Removed shared link SharedLinkDisable *SharedLinkDisableType `json:"shared_link_disable,omitempty"` // SharedLinkDownload : (sharing) Downloaded file/folder from shared link SharedLinkDownload *SharedLinkDownloadType `json:"shared_link_download,omitempty"` // SharedLinkRemoveExpiry : (sharing) Removed shared link expiration date SharedLinkRemoveExpiry *SharedLinkRemoveExpiryType `json:"shared_link_remove_expiry,omitempty"` // SharedLinkShare : (sharing) Added members as audience of shared link SharedLinkShare *SharedLinkShareType `json:"shared_link_share,omitempty"` // SharedLinkView : (sharing) Opened shared link SharedLinkView *SharedLinkViewType `json:"shared_link_view,omitempty"` // SharedNoteOpened : (sharing) Opened shared Paper doc (deprecated, no // longer logged) SharedNoteOpened *SharedNoteOpenedType `json:"shared_note_opened,omitempty"` // ShmodelGroupShare : (sharing) Shared link with group (deprecated, no // longer logged) ShmodelGroupShare *ShmodelGroupShareType `json:"shmodel_group_share,omitempty"` // ShowcaseAccessGranted : (showcase) Granted access to showcase ShowcaseAccessGranted *ShowcaseAccessGrantedType `json:"showcase_access_granted,omitempty"` // ShowcaseAddMember : (showcase) Added member to showcase ShowcaseAddMember *ShowcaseAddMemberType `json:"showcase_add_member,omitempty"` // ShowcaseArchived : (showcase) Archived showcase ShowcaseArchived *ShowcaseArchivedType `json:"showcase_archived,omitempty"` // ShowcaseCreated : (showcase) Created showcase ShowcaseCreated *ShowcaseCreatedType `json:"showcase_created,omitempty"` // ShowcaseDeleteComment : (showcase) Deleted showcase comment ShowcaseDeleteComment *ShowcaseDeleteCommentType `json:"showcase_delete_comment,omitempty"` // ShowcaseEdited : (showcase) Edited showcase ShowcaseEdited *ShowcaseEditedType `json:"showcase_edited,omitempty"` // ShowcaseEditComment : (showcase) Edited showcase comment ShowcaseEditComment *ShowcaseEditCommentType `json:"showcase_edit_comment,omitempty"` // ShowcaseFileAdded : (showcase) Added file to showcase ShowcaseFileAdded *ShowcaseFileAddedType `json:"showcase_file_added,omitempty"` // ShowcaseFileDownload : (showcase) Downloaded file from showcase ShowcaseFileDownload *ShowcaseFileDownloadType `json:"showcase_file_download,omitempty"` // ShowcaseFileRemoved : (showcase) Removed file from showcase ShowcaseFileRemoved *ShowcaseFileRemovedType `json:"showcase_file_removed,omitempty"` // ShowcaseFileView : (showcase) Viewed file in showcase ShowcaseFileView *ShowcaseFileViewType `json:"showcase_file_view,omitempty"` // ShowcasePermanentlyDeleted : (showcase) Permanently deleted showcase ShowcasePermanentlyDeleted *ShowcasePermanentlyDeletedType `json:"showcase_permanently_deleted,omitempty"` // ShowcasePostComment : (showcase) Added showcase comment ShowcasePostComment *ShowcasePostCommentType `json:"showcase_post_comment,omitempty"` // ShowcaseRemoveMember : (showcase) Removed member from showcase ShowcaseRemoveMember *ShowcaseRemoveMemberType `json:"showcase_remove_member,omitempty"` // ShowcaseRenamed : (showcase) Renamed showcase ShowcaseRenamed *ShowcaseRenamedType `json:"showcase_renamed,omitempty"` // ShowcaseRequestAccess : (showcase) Requested access to showcase ShowcaseRequestAccess *ShowcaseRequestAccessType `json:"showcase_request_access,omitempty"` // ShowcaseResolveComment : (showcase) Resolved showcase comment ShowcaseResolveComment *ShowcaseResolveCommentType `json:"showcase_resolve_comment,omitempty"` // ShowcaseRestored : (showcase) Unarchived showcase ShowcaseRestored *ShowcaseRestoredType `json:"showcase_restored,omitempty"` // ShowcaseTrashed : (showcase) Deleted showcase ShowcaseTrashed *ShowcaseTrashedType `json:"showcase_trashed,omitempty"` // ShowcaseTrashedDeprecated : (showcase) Deleted showcase (old version) // (deprecated, replaced by 'Deleted showcase') ShowcaseTrashedDeprecated *ShowcaseTrashedDeprecatedType `json:"showcase_trashed_deprecated,omitempty"` // ShowcaseUnresolveComment : (showcase) Unresolved showcase comment ShowcaseUnresolveComment *ShowcaseUnresolveCommentType `json:"showcase_unresolve_comment,omitempty"` // ShowcaseUntrashed : (showcase) Restored showcase ShowcaseUntrashed *ShowcaseUntrashedType `json:"showcase_untrashed,omitempty"` // ShowcaseUntrashedDeprecated : (showcase) Restored showcase (old version) // (deprecated, replaced by 'Restored showcase') ShowcaseUntrashedDeprecated *ShowcaseUntrashedDeprecatedType `json:"showcase_untrashed_deprecated,omitempty"` // ShowcaseView : (showcase) Viewed showcase ShowcaseView *ShowcaseViewType `json:"showcase_view,omitempty"` // SsoAddCert : (sso) Added X.509 certificate for SSO SsoAddCert *SsoAddCertType `json:"sso_add_cert,omitempty"` // SsoAddLoginUrl : (sso) Added sign-in URL for SSO SsoAddLoginUrl *SsoAddLoginUrlType `json:"sso_add_login_url,omitempty"` // SsoAddLogoutUrl : (sso) Added sign-out URL for SSO SsoAddLogoutUrl *SsoAddLogoutUrlType `json:"sso_add_logout_url,omitempty"` // SsoChangeCert : (sso) Changed X.509 certificate for SSO SsoChangeCert *SsoChangeCertType `json:"sso_change_cert,omitempty"` // SsoChangeLoginUrl : (sso) Changed sign-in URL for SSO SsoChangeLoginUrl *SsoChangeLoginUrlType `json:"sso_change_login_url,omitempty"` // SsoChangeLogoutUrl : (sso) Changed sign-out URL for SSO SsoChangeLogoutUrl *SsoChangeLogoutUrlType `json:"sso_change_logout_url,omitempty"` // SsoChangeSamlIdentityMode : (sso) Changed SAML identity mode for SSO SsoChangeSamlIdentityMode *SsoChangeSamlIdentityModeType `json:"sso_change_saml_identity_mode,omitempty"` // SsoRemoveCert : (sso) Removed X.509 certificate for SSO SsoRemoveCert *SsoRemoveCertType `json:"sso_remove_cert,omitempty"` // SsoRemoveLoginUrl : (sso) Removed sign-in URL for SSO SsoRemoveLoginUrl *SsoRemoveLoginUrlType `json:"sso_remove_login_url,omitempty"` // SsoRemoveLogoutUrl : (sso) Removed sign-out URL for SSO SsoRemoveLogoutUrl *SsoRemoveLogoutUrlType `json:"sso_remove_logout_url,omitempty"` // TeamFolderChangeStatus : (team_folders) Changed archival status of team // folder TeamFolderChangeStatus *TeamFolderChangeStatusType `json:"team_folder_change_status,omitempty"` // TeamFolderCreate : (team_folders) Created team folder in active status TeamFolderCreate *TeamFolderCreateType `json:"team_folder_create,omitempty"` // TeamFolderDowngrade : (team_folders) Downgraded team folder to regular // shared folder TeamFolderDowngrade *TeamFolderDowngradeType `json:"team_folder_downgrade,omitempty"` // TeamFolderPermanentlyDelete : (team_folders) Permanently deleted archived // team folder TeamFolderPermanentlyDelete *TeamFolderPermanentlyDeleteType `json:"team_folder_permanently_delete,omitempty"` // TeamFolderRename : (team_folders) Renamed active/archived team folder TeamFolderRename *TeamFolderRenameType `json:"team_folder_rename,omitempty"` // TeamSelectiveSyncSettingsChanged : (team_folders) Changed sync default TeamSelectiveSyncSettingsChanged *TeamSelectiveSyncSettingsChangedType `json:"team_selective_sync_settings_changed,omitempty"` // AccountCaptureChangePolicy : (team_policies) Changed account capture // setting on team domain AccountCaptureChangePolicy *AccountCaptureChangePolicyType `json:"account_capture_change_policy,omitempty"` // AllowDownloadDisabled : (team_policies) Disabled downloads (deprecated, // no longer logged) AllowDownloadDisabled *AllowDownloadDisabledType `json:"allow_download_disabled,omitempty"` // AllowDownloadEnabled : (team_policies) Enabled downloads (deprecated, no // longer logged) AllowDownloadEnabled *AllowDownloadEnabledType `json:"allow_download_enabled,omitempty"` // CameraUploadsPolicyChanged : (team_policies) Changed camera uploads // setting for team CameraUploadsPolicyChanged *CameraUploadsPolicyChangedType `json:"camera_uploads_policy_changed,omitempty"` // DataPlacementRestrictionChangePolicy : (team_policies) Set restrictions // on data center locations where team data resides DataPlacementRestrictionChangePolicy *DataPlacementRestrictionChangePolicyType `json:"data_placement_restriction_change_policy,omitempty"` // DataPlacementRestrictionSatisfyPolicy : (team_policies) Completed // restrictions on data center locations where team data resides DataPlacementRestrictionSatisfyPolicy *DataPlacementRestrictionSatisfyPolicyType `json:"data_placement_restriction_satisfy_policy,omitempty"` // DeviceApprovalsChangeDesktopPolicy : (team_policies) Set/removed limit on // number of computers member can link to team Dropbox account DeviceApprovalsChangeDesktopPolicy *DeviceApprovalsChangeDesktopPolicyType `json:"device_approvals_change_desktop_policy,omitempty"` // DeviceApprovalsChangeMobilePolicy : (team_policies) Set/removed limit on // number of mobile devices member can link to team Dropbox account DeviceApprovalsChangeMobilePolicy *DeviceApprovalsChangeMobilePolicyType `json:"device_approvals_change_mobile_policy,omitempty"` // DeviceApprovalsChangeOverageAction : (team_policies) Changed device // approvals setting when member is over limit DeviceApprovalsChangeOverageAction *DeviceApprovalsChangeOverageActionType `json:"device_approvals_change_overage_action,omitempty"` // DeviceApprovalsChangeUnlinkAction : (team_policies) Changed device // approvals setting when member unlinks approved device DeviceApprovalsChangeUnlinkAction *DeviceApprovalsChangeUnlinkActionType `json:"device_approvals_change_unlink_action,omitempty"` // DirectoryRestrictionsAddMembers : (team_policies) Added members to // directory restrictions list DirectoryRestrictionsAddMembers *DirectoryRestrictionsAddMembersType `json:"directory_restrictions_add_members,omitempty"` // DirectoryRestrictionsRemoveMembers : (team_policies) Removed members from // directory restrictions list DirectoryRestrictionsRemoveMembers *DirectoryRestrictionsRemoveMembersType `json:"directory_restrictions_remove_members,omitempty"` // EmmAddException : (team_policies) Added members to EMM exception list EmmAddException *EmmAddExceptionType `json:"emm_add_exception,omitempty"` // EmmChangePolicy : (team_policies) Enabled/disabled enterprise mobility // management for members EmmChangePolicy *EmmChangePolicyType `json:"emm_change_policy,omitempty"` // EmmRemoveException : (team_policies) Removed members from EMM exception // list EmmRemoveException *EmmRemoveExceptionType `json:"emm_remove_exception,omitempty"` // ExtendedVersionHistoryChangePolicy : (team_policies) Accepted/opted out // of extended version history ExtendedVersionHistoryChangePolicy *ExtendedVersionHistoryChangePolicyType `json:"extended_version_history_change_policy,omitempty"` // FileCommentsChangePolicy : (team_policies) Enabled/disabled commenting on // team files FileCommentsChangePolicy *FileCommentsChangePolicyType `json:"file_comments_change_policy,omitempty"` // FileRequestsChangePolicy : (team_policies) Enabled/disabled file requests FileRequestsChangePolicy *FileRequestsChangePolicyType `json:"file_requests_change_policy,omitempty"` // FileRequestsEmailsEnabled : (team_policies) Enabled file request emails // for everyone (deprecated, no longer logged) FileRequestsEmailsEnabled *FileRequestsEmailsEnabledType `json:"file_requests_emails_enabled,omitempty"` // FileRequestsEmailsRestrictedToTeamOnly : (team_policies) Enabled file // request emails for team (deprecated, no longer logged) FileRequestsEmailsRestrictedToTeamOnly *FileRequestsEmailsRestrictedToTeamOnlyType `json:"file_requests_emails_restricted_to_team_only,omitempty"` // GoogleSsoChangePolicy : (team_policies) Enabled/disabled Google single // sign-on for team GoogleSsoChangePolicy *GoogleSsoChangePolicyType `json:"google_sso_change_policy,omitempty"` // GroupUserManagementChangePolicy : (team_policies) Changed who can create // groups GroupUserManagementChangePolicy *GroupUserManagementChangePolicyType `json:"group_user_management_change_policy,omitempty"` // MemberRequestsChangePolicy : (team_policies) Changed whether users can // find team when not invited MemberRequestsChangePolicy *MemberRequestsChangePolicyType `json:"member_requests_change_policy,omitempty"` // MemberSpaceLimitsAddException : (team_policies) Added members to member // space limit exception list MemberSpaceLimitsAddException *MemberSpaceLimitsAddExceptionType `json:"member_space_limits_add_exception,omitempty"` // MemberSpaceLimitsChangeCapsTypePolicy : (team_policies) Changed member // space limit type for team MemberSpaceLimitsChangeCapsTypePolicy *MemberSpaceLimitsChangeCapsTypePolicyType `json:"member_space_limits_change_caps_type_policy,omitempty"` // MemberSpaceLimitsChangePolicy : (team_policies) Changed team default // member space limit MemberSpaceLimitsChangePolicy *MemberSpaceLimitsChangePolicyType `json:"member_space_limits_change_policy,omitempty"` // MemberSpaceLimitsRemoveException : (team_policies) Removed members from // member space limit exception list MemberSpaceLimitsRemoveException *MemberSpaceLimitsRemoveExceptionType `json:"member_space_limits_remove_exception,omitempty"` // MemberSuggestionsChangePolicy : (team_policies) Enabled/disabled option // for team members to suggest people to add to team MemberSuggestionsChangePolicy *MemberSuggestionsChangePolicyType `json:"member_suggestions_change_policy,omitempty"` // MicrosoftOfficeAddinChangePolicy : (team_policies) Enabled/disabled // Microsoft Office add-in MicrosoftOfficeAddinChangePolicy *MicrosoftOfficeAddinChangePolicyType `json:"microsoft_office_addin_change_policy,omitempty"` // NetworkControlChangePolicy : (team_policies) Enabled/disabled network // control NetworkControlChangePolicy *NetworkControlChangePolicyType `json:"network_control_change_policy,omitempty"` // PaperChangeDeploymentPolicy : (team_policies) Changed whether Dropbox // Paper, when enabled, is deployed to all members or to specific members PaperChangeDeploymentPolicy *PaperChangeDeploymentPolicyType `json:"paper_change_deployment_policy,omitempty"` // PaperChangeMemberLinkPolicy : (team_policies) Changed whether non-members // can view Paper docs with link (deprecated, no longer logged) PaperChangeMemberLinkPolicy *PaperChangeMemberLinkPolicyType `json:"paper_change_member_link_policy,omitempty"` // PaperChangeMemberPolicy : (team_policies) Changed whether members can // share Paper docs outside team, and if docs are accessible only by team // members or anyone by default PaperChangeMemberPolicy *PaperChangeMemberPolicyType `json:"paper_change_member_policy,omitempty"` // PaperChangePolicy : (team_policies) Enabled/disabled Dropbox Paper for // team PaperChangePolicy *PaperChangePolicyType `json:"paper_change_policy,omitempty"` // PaperEnabledUsersGroupAddition : (team_policies) Added users to // Paper-enabled users list PaperEnabledUsersGroupAddition *PaperEnabledUsersGroupAdditionType `json:"paper_enabled_users_group_addition,omitempty"` // PaperEnabledUsersGroupRemoval : (team_policies) Removed users from // Paper-enabled users list PaperEnabledUsersGroupRemoval *PaperEnabledUsersGroupRemovalType `json:"paper_enabled_users_group_removal,omitempty"` // PermanentDeleteChangePolicy : (team_policies) Enabled/disabled ability of // team members to permanently delete content PermanentDeleteChangePolicy *PermanentDeleteChangePolicyType `json:"permanent_delete_change_policy,omitempty"` // SharingChangeFolderJoinPolicy : (team_policies) Changed whether team // members can join shared folders owned outside team SharingChangeFolderJoinPolicy *SharingChangeFolderJoinPolicyType `json:"sharing_change_folder_join_policy,omitempty"` // SharingChangeLinkPolicy : (team_policies) Changed whether members can // share links outside team, and if links are accessible only by team // members or anyone by default SharingChangeLinkPolicy *SharingChangeLinkPolicyType `json:"sharing_change_link_policy,omitempty"` // SharingChangeMemberPolicy : (team_policies) Changed whether members can // share files/folders outside team SharingChangeMemberPolicy *SharingChangeMemberPolicyType `json:"sharing_change_member_policy,omitempty"` // ShowcaseChangeDownloadPolicy : (team_policies) Enabled/disabled // downloading files from Dropbox Showcase for team ShowcaseChangeDownloadPolicy *ShowcaseChangeDownloadPolicyType `json:"showcase_change_download_policy,omitempty"` // ShowcaseChangeEnabledPolicy : (team_policies) Enabled/disabled Dropbox // Showcase for team ShowcaseChangeEnabledPolicy *ShowcaseChangeEnabledPolicyType `json:"showcase_change_enabled_policy,omitempty"` // ShowcaseChangeExternalSharingPolicy : (team_policies) Enabled/disabled // sharing Dropbox Showcase externally for team ShowcaseChangeExternalSharingPolicy *ShowcaseChangeExternalSharingPolicyType `json:"showcase_change_external_sharing_policy,omitempty"` // SmartSyncChangePolicy : (team_policies) Changed default Smart Sync // setting for team members SmartSyncChangePolicy *SmartSyncChangePolicyType `json:"smart_sync_change_policy,omitempty"` // SmartSyncNotOptOut : (team_policies) Opted team into Smart Sync SmartSyncNotOptOut *SmartSyncNotOptOutType `json:"smart_sync_not_opt_out,omitempty"` // SmartSyncOptOut : (team_policies) Opted team out of Smart Sync SmartSyncOptOut *SmartSyncOptOutType `json:"smart_sync_opt_out,omitempty"` // SsoChangePolicy : (team_policies) Changed single sign-on setting for team SsoChangePolicy *SsoChangePolicyType `json:"sso_change_policy,omitempty"` // TeamSelectiveSyncPolicyChanged : (team_policies) Enabled/disabled Team // Selective Sync for team TeamSelectiveSyncPolicyChanged *TeamSelectiveSyncPolicyChangedType `json:"team_selective_sync_policy_changed,omitempty"` // TfaChangePolicy : (team_policies) Changed two-step verification setting // for team TfaChangePolicy *TfaChangePolicyType `json:"tfa_change_policy,omitempty"` // TwoAccountChangePolicy : (team_policies) Enabled/disabled option for // members to link personal Dropbox account and team account to same // computer TwoAccountChangePolicy *TwoAccountChangePolicyType `json:"two_account_change_policy,omitempty"` // ViewerInfoPolicyChanged : (team_policies) Changed team policy for viewer // info ViewerInfoPolicyChanged *ViewerInfoPolicyChangedType `json:"viewer_info_policy_changed,omitempty"` // WebSessionsChangeFixedLengthPolicy : (team_policies) Changed how long // members can stay signed in to Dropbox.com WebSessionsChangeFixedLengthPolicy *WebSessionsChangeFixedLengthPolicyType `json:"web_sessions_change_fixed_length_policy,omitempty"` // WebSessionsChangeIdleLengthPolicy : (team_policies) Changed how long team // members can be idle while signed in to Dropbox.com WebSessionsChangeIdleLengthPolicy *WebSessionsChangeIdleLengthPolicyType `json:"web_sessions_change_idle_length_policy,omitempty"` // TeamMergeFrom : (team_profile) Merged another team into this team TeamMergeFrom *TeamMergeFromType `json:"team_merge_from,omitempty"` // TeamMergeTo : (team_profile) Merged this team into another team TeamMergeTo *TeamMergeToType `json:"team_merge_to,omitempty"` // TeamProfileAddLogo : (team_profile) Added team logo to display on shared // link headers TeamProfileAddLogo *TeamProfileAddLogoType `json:"team_profile_add_logo,omitempty"` // TeamProfileChangeDefaultLanguage : (team_profile) Changed default // language for team TeamProfileChangeDefaultLanguage *TeamProfileChangeDefaultLanguageType `json:"team_profile_change_default_language,omitempty"` // TeamProfileChangeLogo : (team_profile) Changed team logo displayed on // shared link headers TeamProfileChangeLogo *TeamProfileChangeLogoType `json:"team_profile_change_logo,omitempty"` // TeamProfileChangeName : (team_profile) Changed team name TeamProfileChangeName *TeamProfileChangeNameType `json:"team_profile_change_name,omitempty"` // TeamProfileRemoveLogo : (team_profile) Removed team logo displayed on // shared link headers TeamProfileRemoveLogo *TeamProfileRemoveLogoType `json:"team_profile_remove_logo,omitempty"` // TfaAddBackupPhone : (tfa) Added backup phone for two-step verification TfaAddBackupPhone *TfaAddBackupPhoneType `json:"tfa_add_backup_phone,omitempty"` // TfaAddSecurityKey : (tfa) Added security key for two-step verification TfaAddSecurityKey *TfaAddSecurityKeyType `json:"tfa_add_security_key,omitempty"` // TfaChangeBackupPhone : (tfa) Changed backup phone for two-step // verification TfaChangeBackupPhone *TfaChangeBackupPhoneType `json:"tfa_change_backup_phone,omitempty"` // TfaChangeStatus : (tfa) Enabled/disabled/changed two-step verification // setting TfaChangeStatus *TfaChangeStatusType `json:"tfa_change_status,omitempty"` // TfaRemoveBackupPhone : (tfa) Removed backup phone for two-step // verification TfaRemoveBackupPhone *TfaRemoveBackupPhoneType `json:"tfa_remove_backup_phone,omitempty"` // TfaRemoveSecurityKey : (tfa) Removed security key for two-step // verification TfaRemoveSecurityKey *TfaRemoveSecurityKeyType `json:"tfa_remove_security_key,omitempty"` // TfaReset : (tfa) Reset two-step verification for team member TfaReset *TfaResetType `json:"tfa_reset,omitempty"` } // Valid tag values for EventType const ( EventTypeAppLinkTeam = "app_link_team" EventTypeAppLinkUser = "app_link_user" EventTypeAppUnlinkTeam = "app_unlink_team" EventTypeAppUnlinkUser = "app_unlink_user" EventTypeFileAddComment = "file_add_comment" EventTypeFileChangeCommentSubscription = "file_change_comment_subscription" EventTypeFileDeleteComment = "file_delete_comment" EventTypeFileEditComment = "file_edit_comment" EventTypeFileLikeComment = "file_like_comment" EventTypeFileResolveComment = "file_resolve_comment" EventTypeFileUnlikeComment = "file_unlike_comment" EventTypeFileUnresolveComment = "file_unresolve_comment" EventTypeDeviceChangeIpDesktop = "device_change_ip_desktop" EventTypeDeviceChangeIpMobile = "device_change_ip_mobile" EventTypeDeviceChangeIpWeb = "device_change_ip_web" EventTypeDeviceDeleteOnUnlinkFail = "device_delete_on_unlink_fail" EventTypeDeviceDeleteOnUnlinkSuccess = "device_delete_on_unlink_success" EventTypeDeviceLinkFail = "device_link_fail" EventTypeDeviceLinkSuccess = "device_link_success" EventTypeDeviceManagementDisabled = "device_management_disabled" EventTypeDeviceManagementEnabled = "device_management_enabled" EventTypeDeviceUnlink = "device_unlink" EventTypeEmmRefreshAuthToken = "emm_refresh_auth_token" EventTypeAccountCaptureChangeAvailability = "account_capture_change_availability" EventTypeAccountCaptureMigrateAccount = "account_capture_migrate_account" EventTypeAccountCaptureNotificationEmailsSent = "account_capture_notification_emails_sent" EventTypeAccountCaptureRelinquishAccount = "account_capture_relinquish_account" EventTypeDisabledDomainInvites = "disabled_domain_invites" EventTypeDomainInvitesApproveRequestToJoinTeam = "domain_invites_approve_request_to_join_team" EventTypeDomainInvitesDeclineRequestToJoinTeam = "domain_invites_decline_request_to_join_team" EventTypeDomainInvitesEmailExistingUsers = "domain_invites_email_existing_users" EventTypeDomainInvitesRequestToJoinTeam = "domain_invites_request_to_join_team" EventTypeDomainInvitesSetInviteNewUserPrefToNo = "domain_invites_set_invite_new_user_pref_to_no" EventTypeDomainInvitesSetInviteNewUserPrefToYes = "domain_invites_set_invite_new_user_pref_to_yes" EventTypeDomainVerificationAddDomainFail = "domain_verification_add_domain_fail" EventTypeDomainVerificationAddDomainSuccess = "domain_verification_add_domain_success" EventTypeDomainVerificationRemoveDomain = "domain_verification_remove_domain" EventTypeEnabledDomainInvites = "enabled_domain_invites" EventTypeCreateFolder = "create_folder" EventTypeFileAdd = "file_add" EventTypeFileCopy = "file_copy" EventTypeFileDelete = "file_delete" EventTypeFileDownload = "file_download" EventTypeFileEdit = "file_edit" EventTypeFileGetCopyReference = "file_get_copy_reference" EventTypeFileMove = "file_move" EventTypeFilePermanentlyDelete = "file_permanently_delete" EventTypeFilePreview = "file_preview" EventTypeFileRename = "file_rename" EventTypeFileRestore = "file_restore" EventTypeFileRevert = "file_revert" EventTypeFileRollbackChanges = "file_rollback_changes" EventTypeFileSaveCopyReference = "file_save_copy_reference" EventTypeFileRequestChange = "file_request_change" EventTypeFileRequestClose = "file_request_close" EventTypeFileRequestCreate = "file_request_create" EventTypeFileRequestReceiveFile = "file_request_receive_file" EventTypeGroupAddExternalId = "group_add_external_id" EventTypeGroupAddMember = "group_add_member" EventTypeGroupChangeExternalId = "group_change_external_id" EventTypeGroupChangeManagementType = "group_change_management_type" EventTypeGroupChangeMemberRole = "group_change_member_role" EventTypeGroupCreate = "group_create" EventTypeGroupDelete = "group_delete" EventTypeGroupDescriptionUpdated = "group_description_updated" EventTypeGroupJoinPolicyUpdated = "group_join_policy_updated" EventTypeGroupMoved = "group_moved" EventTypeGroupRemoveExternalId = "group_remove_external_id" EventTypeGroupRemoveMember = "group_remove_member" EventTypeGroupRename = "group_rename" EventTypeEmmError = "emm_error" EventTypeLoginFail = "login_fail" EventTypeLoginSuccess = "login_success" EventTypeLogout = "logout" EventTypeResellerSupportSessionEnd = "reseller_support_session_end" EventTypeResellerSupportSessionStart = "reseller_support_session_start" EventTypeSignInAsSessionEnd = "sign_in_as_session_end" EventTypeSignInAsSessionStart = "sign_in_as_session_start" EventTypeSsoError = "sso_error" EventTypeMemberAddName = "member_add_name" EventTypeMemberChangeAdminRole = "member_change_admin_role" EventTypeMemberChangeEmail = "member_change_email" EventTypeMemberChangeMembershipType = "member_change_membership_type" EventTypeMemberChangeName = "member_change_name" EventTypeMemberChangeStatus = "member_change_status" EventTypeMemberDeleteManualContacts = "member_delete_manual_contacts" EventTypeMemberPermanentlyDeleteAccountContents = "member_permanently_delete_account_contents" EventTypeMemberSpaceLimitsAddCustomQuota = "member_space_limits_add_custom_quota" EventTypeMemberSpaceLimitsChangeCustomQuota = "member_space_limits_change_custom_quota" EventTypeMemberSpaceLimitsChangeStatus = "member_space_limits_change_status" EventTypeMemberSpaceLimitsRemoveCustomQuota = "member_space_limits_remove_custom_quota" EventTypeMemberSuggest = "member_suggest" EventTypeMemberTransferAccountContents = "member_transfer_account_contents" EventTypeSecondaryMailsPolicyChanged = "secondary_mails_policy_changed" EventTypePaperContentAddMember = "paper_content_add_member" EventTypePaperContentAddToFolder = "paper_content_add_to_folder" EventTypePaperContentArchive = "paper_content_archive" EventTypePaperContentCreate = "paper_content_create" EventTypePaperContentPermanentlyDelete = "paper_content_permanently_delete" EventTypePaperContentRemoveFromFolder = "paper_content_remove_from_folder" EventTypePaperContentRemoveMember = "paper_content_remove_member" EventTypePaperContentRename = "paper_content_rename" EventTypePaperContentRestore = "paper_content_restore" EventTypePaperDocAddComment = "paper_doc_add_comment" EventTypePaperDocChangeMemberRole = "paper_doc_change_member_role" EventTypePaperDocChangeSharingPolicy = "paper_doc_change_sharing_policy" EventTypePaperDocChangeSubscription = "paper_doc_change_subscription" EventTypePaperDocDeleted = "paper_doc_deleted" EventTypePaperDocDeleteComment = "paper_doc_delete_comment" EventTypePaperDocDownload = "paper_doc_download" EventTypePaperDocEdit = "paper_doc_edit" EventTypePaperDocEditComment = "paper_doc_edit_comment" EventTypePaperDocFollowed = "paper_doc_followed" EventTypePaperDocMention = "paper_doc_mention" EventTypePaperDocOwnershipChanged = "paper_doc_ownership_changed" EventTypePaperDocRequestAccess = "paper_doc_request_access" EventTypePaperDocResolveComment = "paper_doc_resolve_comment" EventTypePaperDocRevert = "paper_doc_revert" EventTypePaperDocSlackShare = "paper_doc_slack_share" EventTypePaperDocTeamInvite = "paper_doc_team_invite" EventTypePaperDocTrashed = "paper_doc_trashed" EventTypePaperDocUnresolveComment = "paper_doc_unresolve_comment" EventTypePaperDocUntrashed = "paper_doc_untrashed" EventTypePaperDocView = "paper_doc_view" EventTypePaperExternalViewAllow = "paper_external_view_allow" EventTypePaperExternalViewDefaultTeam = "paper_external_view_default_team" EventTypePaperExternalViewForbid = "paper_external_view_forbid" EventTypePaperFolderChangeSubscription = "paper_folder_change_subscription" EventTypePaperFolderDeleted = "paper_folder_deleted" EventTypePaperFolderFollowed = "paper_folder_followed" EventTypePaperFolderTeamInvite = "paper_folder_team_invite" EventTypePasswordChange = "password_change" EventTypePasswordReset = "password_reset" EventTypePasswordResetAll = "password_reset_all" EventTypeEmmCreateExceptionsReport = "emm_create_exceptions_report" EventTypeEmmCreateUsageReport = "emm_create_usage_report" EventTypeExportMembersReport = "export_members_report" EventTypePaperAdminExportStart = "paper_admin_export_start" EventTypeSmartSyncCreateAdminPrivilegeReport = "smart_sync_create_admin_privilege_report" EventTypeTeamActivityCreateReport = "team_activity_create_report" EventTypeCollectionShare = "collection_share" EventTypeNoteAclInviteOnly = "note_acl_invite_only" EventTypeNoteAclLink = "note_acl_link" EventTypeNoteAclTeamLink = "note_acl_team_link" EventTypeNoteShared = "note_shared" EventTypeNoteShareReceive = "note_share_receive" EventTypeOpenNoteShared = "open_note_shared" EventTypeSfAddGroup = "sf_add_group" EventTypeSfAllowNonMembersToViewSharedLinks = "sf_allow_non_members_to_view_shared_links" EventTypeSfExternalInviteWarn = "sf_external_invite_warn" EventTypeSfFbInvite = "sf_fb_invite" EventTypeSfFbInviteChangeRole = "sf_fb_invite_change_role" EventTypeSfFbUninvite = "sf_fb_uninvite" EventTypeSfInviteGroup = "sf_invite_group" EventTypeSfTeamGrantAccess = "sf_team_grant_access" EventTypeSfTeamInvite = "sf_team_invite" EventTypeSfTeamInviteChangeRole = "sf_team_invite_change_role" EventTypeSfTeamJoin = "sf_team_join" EventTypeSfTeamJoinFromOobLink = "sf_team_join_from_oob_link" EventTypeSfTeamUninvite = "sf_team_uninvite" EventTypeSharedContentAddInvitees = "shared_content_add_invitees" EventTypeSharedContentAddLinkExpiry = "shared_content_add_link_expiry" EventTypeSharedContentAddLinkPassword = "shared_content_add_link_password" EventTypeSharedContentAddMember = "shared_content_add_member" EventTypeSharedContentChangeDownloadsPolicy = "shared_content_change_downloads_policy" EventTypeSharedContentChangeInviteeRole = "shared_content_change_invitee_role" EventTypeSharedContentChangeLinkAudience = "shared_content_change_link_audience" EventTypeSharedContentChangeLinkExpiry = "shared_content_change_link_expiry" EventTypeSharedContentChangeLinkPassword = "shared_content_change_link_password" EventTypeSharedContentChangeMemberRole = "shared_content_change_member_role" EventTypeSharedContentChangeViewerInfoPolicy = "shared_content_change_viewer_info_policy" EventTypeSharedContentClaimInvitation = "shared_content_claim_invitation" EventTypeSharedContentCopy = "shared_content_copy" EventTypeSharedContentDownload = "shared_content_download" EventTypeSharedContentRelinquishMembership = "shared_content_relinquish_membership" EventTypeSharedContentRemoveInvitees = "shared_content_remove_invitees" EventTypeSharedContentRemoveLinkExpiry = "shared_content_remove_link_expiry" EventTypeSharedContentRemoveLinkPassword = "shared_content_remove_link_password" EventTypeSharedContentRemoveMember = "shared_content_remove_member" EventTypeSharedContentRequestAccess = "shared_content_request_access" EventTypeSharedContentUnshare = "shared_content_unshare" EventTypeSharedContentView = "shared_content_view" EventTypeSharedFolderChangeLinkPolicy = "shared_folder_change_link_policy" EventTypeSharedFolderChangeMembersInheritancePolicy = "shared_folder_change_members_inheritance_policy" EventTypeSharedFolderChangeMembersManagementPolicy = "shared_folder_change_members_management_policy" EventTypeSharedFolderChangeMembersPolicy = "shared_folder_change_members_policy" EventTypeSharedFolderCreate = "shared_folder_create" EventTypeSharedFolderDeclineInvitation = "shared_folder_decline_invitation" EventTypeSharedFolderMount = "shared_folder_mount" EventTypeSharedFolderNest = "shared_folder_nest" EventTypeSharedFolderTransferOwnership = "shared_folder_transfer_ownership" EventTypeSharedFolderUnmount = "shared_folder_unmount" EventTypeSharedLinkAddExpiry = "shared_link_add_expiry" EventTypeSharedLinkChangeExpiry = "shared_link_change_expiry" EventTypeSharedLinkChangeVisibility = "shared_link_change_visibility" EventTypeSharedLinkCopy = "shared_link_copy" EventTypeSharedLinkCreate = "shared_link_create" EventTypeSharedLinkDisable = "shared_link_disable" EventTypeSharedLinkDownload = "shared_link_download" EventTypeSharedLinkRemoveExpiry = "shared_link_remove_expiry" EventTypeSharedLinkShare = "shared_link_share" EventTypeSharedLinkView = "shared_link_view" EventTypeSharedNoteOpened = "shared_note_opened" EventTypeShmodelGroupShare = "shmodel_group_share" EventTypeShowcaseAccessGranted = "showcase_access_granted" EventTypeShowcaseAddMember = "showcase_add_member" EventTypeShowcaseArchived = "showcase_archived" EventTypeShowcaseCreated = "showcase_created" EventTypeShowcaseDeleteComment = "showcase_delete_comment" EventTypeShowcaseEdited = "showcase_edited" EventTypeShowcaseEditComment = "showcase_edit_comment" EventTypeShowcaseFileAdded = "showcase_file_added" EventTypeShowcaseFileDownload = "showcase_file_download" EventTypeShowcaseFileRemoved = "showcase_file_removed" EventTypeShowcaseFileView = "showcase_file_view" EventTypeShowcasePermanentlyDeleted = "showcase_permanently_deleted" EventTypeShowcasePostComment = "showcase_post_comment" EventTypeShowcaseRemoveMember = "showcase_remove_member" EventTypeShowcaseRenamed = "showcase_renamed" EventTypeShowcaseRequestAccess = "showcase_request_access" EventTypeShowcaseResolveComment = "showcase_resolve_comment" EventTypeShowcaseRestored = "showcase_restored" EventTypeShowcaseTrashed = "showcase_trashed" EventTypeShowcaseTrashedDeprecated = "showcase_trashed_deprecated" EventTypeShowcaseUnresolveComment = "showcase_unresolve_comment" EventTypeShowcaseUntrashed = "showcase_untrashed" EventTypeShowcaseUntrashedDeprecated = "showcase_untrashed_deprecated" EventTypeShowcaseView = "showcase_view" EventTypeSsoAddCert = "sso_add_cert" EventTypeSsoAddLoginUrl = "sso_add_login_url" EventTypeSsoAddLogoutUrl = "sso_add_logout_url" EventTypeSsoChangeCert = "sso_change_cert" EventTypeSsoChangeLoginUrl = "sso_change_login_url" EventTypeSsoChangeLogoutUrl = "sso_change_logout_url" EventTypeSsoChangeSamlIdentityMode = "sso_change_saml_identity_mode" EventTypeSsoRemoveCert = "sso_remove_cert" EventTypeSsoRemoveLoginUrl = "sso_remove_login_url" EventTypeSsoRemoveLogoutUrl = "sso_remove_logout_url" EventTypeTeamFolderChangeStatus = "team_folder_change_status" EventTypeTeamFolderCreate = "team_folder_create" EventTypeTeamFolderDowngrade = "team_folder_downgrade" EventTypeTeamFolderPermanentlyDelete = "team_folder_permanently_delete" EventTypeTeamFolderRename = "team_folder_rename" EventTypeTeamSelectiveSyncSettingsChanged = "team_selective_sync_settings_changed" EventTypeAccountCaptureChangePolicy = "account_capture_change_policy" EventTypeAllowDownloadDisabled = "allow_download_disabled" EventTypeAllowDownloadEnabled = "allow_download_enabled" EventTypeCameraUploadsPolicyChanged = "camera_uploads_policy_changed" EventTypeDataPlacementRestrictionChangePolicy = "data_placement_restriction_change_policy" EventTypeDataPlacementRestrictionSatisfyPolicy = "data_placement_restriction_satisfy_policy" EventTypeDeviceApprovalsChangeDesktopPolicy = "device_approvals_change_desktop_policy" EventTypeDeviceApprovalsChangeMobilePolicy = "device_approvals_change_mobile_policy" EventTypeDeviceApprovalsChangeOverageAction = "device_approvals_change_overage_action" EventTypeDeviceApprovalsChangeUnlinkAction = "device_approvals_change_unlink_action" EventTypeDirectoryRestrictionsAddMembers = "directory_restrictions_add_members" EventTypeDirectoryRestrictionsRemoveMembers = "directory_restrictions_remove_members" EventTypeEmmAddException = "emm_add_exception" EventTypeEmmChangePolicy = "emm_change_policy" EventTypeEmmRemoveException = "emm_remove_exception" EventTypeExtendedVersionHistoryChangePolicy = "extended_version_history_change_policy" EventTypeFileCommentsChangePolicy = "file_comments_change_policy" EventTypeFileRequestsChangePolicy = "file_requests_change_policy" EventTypeFileRequestsEmailsEnabled = "file_requests_emails_enabled" EventTypeFileRequestsEmailsRestrictedToTeamOnly = "file_requests_emails_restricted_to_team_only" EventTypeGoogleSsoChangePolicy = "google_sso_change_policy" EventTypeGroupUserManagementChangePolicy = "group_user_management_change_policy" EventTypeMemberRequestsChangePolicy = "member_requests_change_policy" EventTypeMemberSpaceLimitsAddException = "member_space_limits_add_exception" EventTypeMemberSpaceLimitsChangeCapsTypePolicy = "member_space_limits_change_caps_type_policy" EventTypeMemberSpaceLimitsChangePolicy = "member_space_limits_change_policy" EventTypeMemberSpaceLimitsRemoveException = "member_space_limits_remove_exception" EventTypeMemberSuggestionsChangePolicy = "member_suggestions_change_policy" EventTypeMicrosoftOfficeAddinChangePolicy = "microsoft_office_addin_change_policy" EventTypeNetworkControlChangePolicy = "network_control_change_policy" EventTypePaperChangeDeploymentPolicy = "paper_change_deployment_policy" EventTypePaperChangeMemberLinkPolicy = "paper_change_member_link_policy" EventTypePaperChangeMemberPolicy = "paper_change_member_policy" EventTypePaperChangePolicy = "paper_change_policy" EventTypePaperEnabledUsersGroupAddition = "paper_enabled_users_group_addition" EventTypePaperEnabledUsersGroupRemoval = "paper_enabled_users_group_removal" EventTypePermanentDeleteChangePolicy = "permanent_delete_change_policy" EventTypeSharingChangeFolderJoinPolicy = "sharing_change_folder_join_policy" EventTypeSharingChangeLinkPolicy = "sharing_change_link_policy" EventTypeSharingChangeMemberPolicy = "sharing_change_member_policy" EventTypeShowcaseChangeDownloadPolicy = "showcase_change_download_policy" EventTypeShowcaseChangeEnabledPolicy = "showcase_change_enabled_policy" EventTypeShowcaseChangeExternalSharingPolicy = "showcase_change_external_sharing_policy" EventTypeSmartSyncChangePolicy = "smart_sync_change_policy" EventTypeSmartSyncNotOptOut = "smart_sync_not_opt_out" EventTypeSmartSyncOptOut = "smart_sync_opt_out" EventTypeSsoChangePolicy = "sso_change_policy" EventTypeTeamSelectiveSyncPolicyChanged = "team_selective_sync_policy_changed" EventTypeTfaChangePolicy = "tfa_change_policy" EventTypeTwoAccountChangePolicy = "two_account_change_policy" EventTypeViewerInfoPolicyChanged = "viewer_info_policy_changed" EventTypeWebSessionsChangeFixedLengthPolicy = "web_sessions_change_fixed_length_policy" EventTypeWebSessionsChangeIdleLengthPolicy = "web_sessions_change_idle_length_policy" EventTypeTeamMergeFrom = "team_merge_from" EventTypeTeamMergeTo = "team_merge_to" EventTypeTeamProfileAddLogo = "team_profile_add_logo" EventTypeTeamProfileChangeDefaultLanguage = "team_profile_change_default_language" EventTypeTeamProfileChangeLogo = "team_profile_change_logo" EventTypeTeamProfileChangeName = "team_profile_change_name" EventTypeTeamProfileRemoveLogo = "team_profile_remove_logo" EventTypeTfaAddBackupPhone = "tfa_add_backup_phone" EventTypeTfaAddSecurityKey = "tfa_add_security_key" EventTypeTfaChangeBackupPhone = "tfa_change_backup_phone" EventTypeTfaChangeStatus = "tfa_change_status" EventTypeTfaRemoveBackupPhone = "tfa_remove_backup_phone" EventTypeTfaRemoveSecurityKey = "tfa_remove_security_key" EventTypeTfaReset = "tfa_reset" EventTypeOther = "other" ) // UnmarshalJSON deserializes into a EventType instance func (u *EventType) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // AppLinkTeam : (apps) Linked app for team AppLinkTeam json.RawMessage `json:"app_link_team,omitempty"` // AppLinkUser : (apps) Linked app for member AppLinkUser json.RawMessage `json:"app_link_user,omitempty"` // AppUnlinkTeam : (apps) Unlinked app for team AppUnlinkTeam json.RawMessage `json:"app_unlink_team,omitempty"` // AppUnlinkUser : (apps) Unlinked app for member AppUnlinkUser json.RawMessage `json:"app_unlink_user,omitempty"` // FileAddComment : (comments) Added file comment FileAddComment json.RawMessage `json:"file_add_comment,omitempty"` // FileChangeCommentSubscription : (comments) Subscribed to or // unsubscribed from comment notifications for file FileChangeCommentSubscription json.RawMessage `json:"file_change_comment_subscription,omitempty"` // FileDeleteComment : (comments) Deleted file comment FileDeleteComment json.RawMessage `json:"file_delete_comment,omitempty"` // FileEditComment : (comments) Edited file comment FileEditComment json.RawMessage `json:"file_edit_comment,omitempty"` // FileLikeComment : (comments) Liked file comment (deprecated, no // longer logged) FileLikeComment json.RawMessage `json:"file_like_comment,omitempty"` // FileResolveComment : (comments) Resolved file comment FileResolveComment json.RawMessage `json:"file_resolve_comment,omitempty"` // FileUnlikeComment : (comments) Unliked file comment (deprecated, no // longer logged) FileUnlikeComment json.RawMessage `json:"file_unlike_comment,omitempty"` // FileUnresolveComment : (comments) Unresolved file comment FileUnresolveComment json.RawMessage `json:"file_unresolve_comment,omitempty"` // DeviceChangeIpDesktop : (devices) Changed IP address associated with // active desktop session DeviceChangeIpDesktop json.RawMessage `json:"device_change_ip_desktop,omitempty"` // DeviceChangeIpMobile : (devices) Changed IP address associated with // active mobile session DeviceChangeIpMobile json.RawMessage `json:"device_change_ip_mobile,omitempty"` // DeviceChangeIpWeb : (devices) Changed IP address associated with // active web session DeviceChangeIpWeb json.RawMessage `json:"device_change_ip_web,omitempty"` // DeviceDeleteOnUnlinkFail : (devices) Failed to delete all files from // unlinked device DeviceDeleteOnUnlinkFail json.RawMessage `json:"device_delete_on_unlink_fail,omitempty"` // DeviceDeleteOnUnlinkSuccess : (devices) Deleted all files from // unlinked device DeviceDeleteOnUnlinkSuccess json.RawMessage `json:"device_delete_on_unlink_success,omitempty"` // DeviceLinkFail : (devices) Failed to link device DeviceLinkFail json.RawMessage `json:"device_link_fail,omitempty"` // DeviceLinkSuccess : (devices) Linked device DeviceLinkSuccess json.RawMessage `json:"device_link_success,omitempty"` // DeviceManagementDisabled : (devices) Disabled device management // (deprecated, no longer logged) DeviceManagementDisabled json.RawMessage `json:"device_management_disabled,omitempty"` // DeviceManagementEnabled : (devices) Enabled device management // (deprecated, no longer logged) DeviceManagementEnabled json.RawMessage `json:"device_management_enabled,omitempty"` // DeviceUnlink : (devices) Disconnected device DeviceUnlink json.RawMessage `json:"device_unlink,omitempty"` // EmmRefreshAuthToken : (devices) Refreshed auth token used for setting // up enterprise mobility management EmmRefreshAuthToken json.RawMessage `json:"emm_refresh_auth_token,omitempty"` // AccountCaptureChangeAvailability : (domains) Granted/revoked option // to enable account capture on team domains AccountCaptureChangeAvailability json.RawMessage `json:"account_capture_change_availability,omitempty"` // AccountCaptureMigrateAccount : (domains) Account-captured user // migrated account to team AccountCaptureMigrateAccount json.RawMessage `json:"account_capture_migrate_account,omitempty"` // AccountCaptureNotificationEmailsSent : (domains) Sent proactive // account capture email to all unmanaged members AccountCaptureNotificationEmailsSent json.RawMessage `json:"account_capture_notification_emails_sent,omitempty"` // AccountCaptureRelinquishAccount : (domains) Account-captured user // changed account email to personal email AccountCaptureRelinquishAccount json.RawMessage `json:"account_capture_relinquish_account,omitempty"` // DisabledDomainInvites : (domains) Disabled domain invites // (deprecated, no longer logged) DisabledDomainInvites json.RawMessage `json:"disabled_domain_invites,omitempty"` // DomainInvitesApproveRequestToJoinTeam : (domains) Approved user's // request to join team DomainInvitesApproveRequestToJoinTeam json.RawMessage `json:"domain_invites_approve_request_to_join_team,omitempty"` // DomainInvitesDeclineRequestToJoinTeam : (domains) Declined user's // request to join team DomainInvitesDeclineRequestToJoinTeam json.RawMessage `json:"domain_invites_decline_request_to_join_team,omitempty"` // DomainInvitesEmailExistingUsers : (domains) Sent domain invites to // existing domain accounts (deprecated, no longer logged) DomainInvitesEmailExistingUsers json.RawMessage `json:"domain_invites_email_existing_users,omitempty"` // DomainInvitesRequestToJoinTeam : (domains) Requested to join team DomainInvitesRequestToJoinTeam json.RawMessage `json:"domain_invites_request_to_join_team,omitempty"` // DomainInvitesSetInviteNewUserPrefToNo : (domains) Disabled // "Automatically invite new users" (deprecated, no longer logged) DomainInvitesSetInviteNewUserPrefToNo json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_no,omitempty"` // DomainInvitesSetInviteNewUserPrefToYes : (domains) Enabled // "Automatically invite new users" (deprecated, no longer logged) DomainInvitesSetInviteNewUserPrefToYes json.RawMessage `json:"domain_invites_set_invite_new_user_pref_to_yes,omitempty"` // DomainVerificationAddDomainFail : (domains) Failed to verify team // domain DomainVerificationAddDomainFail json.RawMessage `json:"domain_verification_add_domain_fail,omitempty"` // DomainVerificationAddDomainSuccess : (domains) Verified team domain DomainVerificationAddDomainSuccess json.RawMessage `json:"domain_verification_add_domain_success,omitempty"` // DomainVerificationRemoveDomain : (domains) Removed domain from list // of verified team domains DomainVerificationRemoveDomain json.RawMessage `json:"domain_verification_remove_domain,omitempty"` // EnabledDomainInvites : (domains) Enabled domain invites (deprecated, // no longer logged) EnabledDomainInvites json.RawMessage `json:"enabled_domain_invites,omitempty"` // CreateFolder : (file_operations) Created folders (deprecated, no // longer logged) CreateFolder json.RawMessage `json:"create_folder,omitempty"` // FileAdd : (file_operations) Added files and/or folders FileAdd json.RawMessage `json:"file_add,omitempty"` // FileCopy : (file_operations) Copied files and/or folders FileCopy json.RawMessage `json:"file_copy,omitempty"` // FileDelete : (file_operations) Deleted files and/or folders FileDelete json.RawMessage `json:"file_delete,omitempty"` // FileDownload : (file_operations) Downloaded files and/or folders FileDownload json.RawMessage `json:"file_download,omitempty"` // FileEdit : (file_operations) Edited files FileEdit json.RawMessage `json:"file_edit,omitempty"` // FileGetCopyReference : (file_operations) Created copy reference to // file/folder FileGetCopyReference json.RawMessage `json:"file_get_copy_reference,omitempty"` // FileMove : (file_operations) Moved files and/or folders FileMove json.RawMessage `json:"file_move,omitempty"` // FilePermanentlyDelete : (file_operations) Permanently deleted files // and/or folders FilePermanentlyDelete json.RawMessage `json:"file_permanently_delete,omitempty"` // FilePreview : (file_operations) Previewed files and/or folders FilePreview json.RawMessage `json:"file_preview,omitempty"` // FileRename : (file_operations) Renamed files and/or folders FileRename json.RawMessage `json:"file_rename,omitempty"` // FileRestore : (file_operations) Restored deleted files and/or folders FileRestore json.RawMessage `json:"file_restore,omitempty"` // FileRevert : (file_operations) Reverted files to previous version FileRevert json.RawMessage `json:"file_revert,omitempty"` // FileRollbackChanges : (file_operations) Rolled back file actions FileRollbackChanges json.RawMessage `json:"file_rollback_changes,omitempty"` // FileSaveCopyReference : (file_operations) Saved file/folder using // copy reference FileSaveCopyReference json.RawMessage `json:"file_save_copy_reference,omitempty"` // FileRequestChange : (file_requests) Changed file request FileRequestChange json.RawMessage `json:"file_request_change,omitempty"` // FileRequestClose : (file_requests) Closed file request FileRequestClose json.RawMessage `json:"file_request_close,omitempty"` // FileRequestCreate : (file_requests) Created file request FileRequestCreate json.RawMessage `json:"file_request_create,omitempty"` // FileRequestReceiveFile : (file_requests) Received files for file // request FileRequestReceiveFile json.RawMessage `json:"file_request_receive_file,omitempty"` // GroupAddExternalId : (groups) Added external ID for group GroupAddExternalId json.RawMessage `json:"group_add_external_id,omitempty"` // GroupAddMember : (groups) Added team members to group GroupAddMember json.RawMessage `json:"group_add_member,omitempty"` // GroupChangeExternalId : (groups) Changed external ID for group GroupChangeExternalId json.RawMessage `json:"group_change_external_id,omitempty"` // GroupChangeManagementType : (groups) Changed group management type GroupChangeManagementType json.RawMessage `json:"group_change_management_type,omitempty"` // GroupChangeMemberRole : (groups) Changed manager permissions of group // member GroupChangeMemberRole json.RawMessage `json:"group_change_member_role,omitempty"` // GroupCreate : (groups) Created group GroupCreate json.RawMessage `json:"group_create,omitempty"` // GroupDelete : (groups) Deleted group GroupDelete json.RawMessage `json:"group_delete,omitempty"` // GroupDescriptionUpdated : (groups) Updated group (deprecated, no // longer logged) GroupDescriptionUpdated json.RawMessage `json:"group_description_updated,omitempty"` // GroupJoinPolicyUpdated : (groups) Updated group join policy // (deprecated, no longer logged) GroupJoinPolicyUpdated json.RawMessage `json:"group_join_policy_updated,omitempty"` // GroupMoved : (groups) Moved group (deprecated, no longer logged) GroupMoved json.RawMessage `json:"group_moved,omitempty"` // GroupRemoveExternalId : (groups) Removed external ID for group GroupRemoveExternalId json.RawMessage `json:"group_remove_external_id,omitempty"` // GroupRemoveMember : (groups) Removed team members from group GroupRemoveMember json.RawMessage `json:"group_remove_member,omitempty"` // GroupRename : (groups) Renamed group GroupRename json.RawMessage `json:"group_rename,omitempty"` // EmmError : (logins) Failed to sign in via EMM (deprecated, replaced // by 'Failed to sign in') EmmError json.RawMessage `json:"emm_error,omitempty"` // LoginFail : (logins) Failed to sign in LoginFail json.RawMessage `json:"login_fail,omitempty"` // LoginSuccess : (logins) Signed in LoginSuccess json.RawMessage `json:"login_success,omitempty"` // Logout : (logins) Signed out Logout json.RawMessage `json:"logout,omitempty"` // ResellerSupportSessionEnd : (logins) Ended reseller support session ResellerSupportSessionEnd json.RawMessage `json:"reseller_support_session_end,omitempty"` // ResellerSupportSessionStart : (logins) Started reseller support // session ResellerSupportSessionStart json.RawMessage `json:"reseller_support_session_start,omitempty"` // SignInAsSessionEnd : (logins) Ended admin sign-in-as session SignInAsSessionEnd json.RawMessage `json:"sign_in_as_session_end,omitempty"` // SignInAsSessionStart : (logins) Started admin sign-in-as session SignInAsSessionStart json.RawMessage `json:"sign_in_as_session_start,omitempty"` // SsoError : (logins) Failed to sign in via SSO (deprecated, replaced // by 'Failed to sign in') SsoError json.RawMessage `json:"sso_error,omitempty"` // MemberAddName : (members) Added team member name MemberAddName json.RawMessage `json:"member_add_name,omitempty"` // MemberChangeAdminRole : (members) Changed team member admin role MemberChangeAdminRole json.RawMessage `json:"member_change_admin_role,omitempty"` // MemberChangeEmail : (members) Changed team member email MemberChangeEmail json.RawMessage `json:"member_change_email,omitempty"` // MemberChangeMembershipType : (members) Changed membership type // (limited/full) of member (deprecated, no longer logged) MemberChangeMembershipType json.RawMessage `json:"member_change_membership_type,omitempty"` // MemberChangeName : (members) Changed team member name MemberChangeName json.RawMessage `json:"member_change_name,omitempty"` // MemberChangeStatus : (members) Changed member status (invited, // joined, suspended, etc.) MemberChangeStatus json.RawMessage `json:"member_change_status,omitempty"` // MemberDeleteManualContacts : (members) Cleared manually added // contacts MemberDeleteManualContacts json.RawMessage `json:"member_delete_manual_contacts,omitempty"` // MemberPermanentlyDeleteAccountContents : (members) Permanently // deleted contents of deleted team member account MemberPermanentlyDeleteAccountContents json.RawMessage `json:"member_permanently_delete_account_contents,omitempty"` // MemberSpaceLimitsAddCustomQuota : (members) Set custom member space // limit MemberSpaceLimitsAddCustomQuota json.RawMessage `json:"member_space_limits_add_custom_quota,omitempty"` // MemberSpaceLimitsChangeCustomQuota : (members) Changed custom member // space limit MemberSpaceLimitsChangeCustomQuota json.RawMessage `json:"member_space_limits_change_custom_quota,omitempty"` // MemberSpaceLimitsChangeStatus : (members) Changed space limit status MemberSpaceLimitsChangeStatus json.RawMessage `json:"member_space_limits_change_status,omitempty"` // MemberSpaceLimitsRemoveCustomQuota : (members) Removed custom member // space limit MemberSpaceLimitsRemoveCustomQuota json.RawMessage `json:"member_space_limits_remove_custom_quota,omitempty"` // MemberSuggest : (members) Suggested person to add to team MemberSuggest json.RawMessage `json:"member_suggest,omitempty"` // MemberTransferAccountContents : (members) Transferred contents of // deleted member account to another member MemberTransferAccountContents json.RawMessage `json:"member_transfer_account_contents,omitempty"` // SecondaryMailsPolicyChanged : (members) Secondary mails policy // changed SecondaryMailsPolicyChanged json.RawMessage `json:"secondary_mails_policy_changed,omitempty"` // PaperContentAddMember : (paper) Added team member to Paper doc/folder PaperContentAddMember json.RawMessage `json:"paper_content_add_member,omitempty"` // PaperContentAddToFolder : (paper) Added Paper doc/folder to folder PaperContentAddToFolder json.RawMessage `json:"paper_content_add_to_folder,omitempty"` // PaperContentArchive : (paper) Archived Paper doc/folder PaperContentArchive json.RawMessage `json:"paper_content_archive,omitempty"` // PaperContentCreate : (paper) Created Paper doc/folder PaperContentCreate json.RawMessage `json:"paper_content_create,omitempty"` // PaperContentPermanentlyDelete : (paper) Permanently deleted Paper // doc/folder PaperContentPermanentlyDelete json.RawMessage `json:"paper_content_permanently_delete,omitempty"` // PaperContentRemoveFromFolder : (paper) Removed Paper doc/folder from // folder PaperContentRemoveFromFolder json.RawMessage `json:"paper_content_remove_from_folder,omitempty"` // PaperContentRemoveMember : (paper) Removed team member from Paper // doc/folder PaperContentRemoveMember json.RawMessage `json:"paper_content_remove_member,omitempty"` // PaperContentRename : (paper) Renamed Paper doc/folder PaperContentRename json.RawMessage `json:"paper_content_rename,omitempty"` // PaperContentRestore : (paper) Restored archived Paper doc/folder PaperContentRestore json.RawMessage `json:"paper_content_restore,omitempty"` // PaperDocAddComment : (paper) Added Paper doc comment PaperDocAddComment json.RawMessage `json:"paper_doc_add_comment,omitempty"` // PaperDocChangeMemberRole : (paper) Changed team member permissions // for Paper doc PaperDocChangeMemberRole json.RawMessage `json:"paper_doc_change_member_role,omitempty"` // PaperDocChangeSharingPolicy : (paper) Changed sharing setting for // Paper doc PaperDocChangeSharingPolicy json.RawMessage `json:"paper_doc_change_sharing_policy,omitempty"` // PaperDocChangeSubscription : (paper) Followed/unfollowed Paper doc PaperDocChangeSubscription json.RawMessage `json:"paper_doc_change_subscription,omitempty"` // PaperDocDeleted : (paper) Archived Paper doc (deprecated, no longer // logged) PaperDocDeleted json.RawMessage `json:"paper_doc_deleted,omitempty"` // PaperDocDeleteComment : (paper) Deleted Paper doc comment PaperDocDeleteComment json.RawMessage `json:"paper_doc_delete_comment,omitempty"` // PaperDocDownload : (paper) Downloaded Paper doc in specific format PaperDocDownload json.RawMessage `json:"paper_doc_download,omitempty"` // PaperDocEdit : (paper) Edited Paper doc PaperDocEdit json.RawMessage `json:"paper_doc_edit,omitempty"` // PaperDocEditComment : (paper) Edited Paper doc comment PaperDocEditComment json.RawMessage `json:"paper_doc_edit_comment,omitempty"` // PaperDocFollowed : (paper) Followed Paper doc (deprecated, replaced // by 'Followed/unfollowed Paper doc') PaperDocFollowed json.RawMessage `json:"paper_doc_followed,omitempty"` // PaperDocMention : (paper) Mentioned team member in Paper doc PaperDocMention json.RawMessage `json:"paper_doc_mention,omitempty"` // PaperDocOwnershipChanged : (paper) Transferred ownership of Paper doc PaperDocOwnershipChanged json.RawMessage `json:"paper_doc_ownership_changed,omitempty"` // PaperDocRequestAccess : (paper) Requested access to Paper doc PaperDocRequestAccess json.RawMessage `json:"paper_doc_request_access,omitempty"` // PaperDocResolveComment : (paper) Resolved Paper doc comment PaperDocResolveComment json.RawMessage `json:"paper_doc_resolve_comment,omitempty"` // PaperDocRevert : (paper) Restored Paper doc to previous version PaperDocRevert json.RawMessage `json:"paper_doc_revert,omitempty"` // PaperDocSlackShare : (paper) Shared Paper doc via Slack PaperDocSlackShare json.RawMessage `json:"paper_doc_slack_share,omitempty"` // PaperDocTeamInvite : (paper) Shared Paper doc with team member // (deprecated, no longer logged) PaperDocTeamInvite json.RawMessage `json:"paper_doc_team_invite,omitempty"` // PaperDocTrashed : (paper) Deleted Paper doc PaperDocTrashed json.RawMessage `json:"paper_doc_trashed,omitempty"` // PaperDocUnresolveComment : (paper) Unresolved Paper doc comment PaperDocUnresolveComment json.RawMessage `json:"paper_doc_unresolve_comment,omitempty"` // PaperDocUntrashed : (paper) Restored Paper doc PaperDocUntrashed json.RawMessage `json:"paper_doc_untrashed,omitempty"` // PaperDocView : (paper) Viewed Paper doc PaperDocView json.RawMessage `json:"paper_doc_view,omitempty"` // PaperExternalViewAllow : (paper) Changed Paper external sharing // setting to anyone (deprecated, no longer logged) PaperExternalViewAllow json.RawMessage `json:"paper_external_view_allow,omitempty"` // PaperExternalViewDefaultTeam : (paper) Changed Paper external sharing // setting to default team (deprecated, no longer logged) PaperExternalViewDefaultTeam json.RawMessage `json:"paper_external_view_default_team,omitempty"` // PaperExternalViewForbid : (paper) Changed Paper external sharing // setting to team-only (deprecated, no longer logged) PaperExternalViewForbid json.RawMessage `json:"paper_external_view_forbid,omitempty"` // PaperFolderChangeSubscription : (paper) Followed/unfollowed Paper // folder PaperFolderChangeSubscription json.RawMessage `json:"paper_folder_change_subscription,omitempty"` // PaperFolderDeleted : (paper) Archived Paper folder (deprecated, no // longer logged) PaperFolderDeleted json.RawMessage `json:"paper_folder_deleted,omitempty"` // PaperFolderFollowed : (paper) Followed Paper folder (deprecated, // replaced by 'Followed/unfollowed Paper folder') PaperFolderFollowed json.RawMessage `json:"paper_folder_followed,omitempty"` // PaperFolderTeamInvite : (paper) Shared Paper folder with member // (deprecated, no longer logged) PaperFolderTeamInvite json.RawMessage `json:"paper_folder_team_invite,omitempty"` // PasswordChange : (passwords) Changed password PasswordChange json.RawMessage `json:"password_change,omitempty"` // PasswordReset : (passwords) Reset password PasswordReset json.RawMessage `json:"password_reset,omitempty"` // PasswordResetAll : (passwords) Reset all team member passwords PasswordResetAll json.RawMessage `json:"password_reset_all,omitempty"` // EmmCreateExceptionsReport : (reports) Created EMM-excluded users // report EmmCreateExceptionsReport json.RawMessage `json:"emm_create_exceptions_report,omitempty"` // EmmCreateUsageReport : (reports) Created EMM mobile app usage report EmmCreateUsageReport json.RawMessage `json:"emm_create_usage_report,omitempty"` // ExportMembersReport : (reports) Created member data report ExportMembersReport json.RawMessage `json:"export_members_report,omitempty"` // PaperAdminExportStart : (reports) Exported all team Paper docs PaperAdminExportStart json.RawMessage `json:"paper_admin_export_start,omitempty"` // SmartSyncCreateAdminPrivilegeReport : (reports) Created Smart Sync // non-admin devices report SmartSyncCreateAdminPrivilegeReport json.RawMessage `json:"smart_sync_create_admin_privilege_report,omitempty"` // TeamActivityCreateReport : (reports) Created team activity report TeamActivityCreateReport json.RawMessage `json:"team_activity_create_report,omitempty"` // CollectionShare : (sharing) Shared album CollectionShare json.RawMessage `json:"collection_share,omitempty"` // NoteAclInviteOnly : (sharing) Changed Paper doc to invite-only // (deprecated, no longer logged) NoteAclInviteOnly json.RawMessage `json:"note_acl_invite_only,omitempty"` // NoteAclLink : (sharing) Changed Paper doc to link-accessible // (deprecated, no longer logged) NoteAclLink json.RawMessage `json:"note_acl_link,omitempty"` // NoteAclTeamLink : (sharing) Changed Paper doc to link-accessible for // team (deprecated, no longer logged) NoteAclTeamLink json.RawMessage `json:"note_acl_team_link,omitempty"` // NoteShared : (sharing) Shared Paper doc (deprecated, no longer // logged) NoteShared json.RawMessage `json:"note_shared,omitempty"` // NoteShareReceive : (sharing) Shared received Paper doc (deprecated, // no longer logged) NoteShareReceive json.RawMessage `json:"note_share_receive,omitempty"` // OpenNoteShared : (sharing) Opened shared Paper doc (deprecated, no // longer logged) OpenNoteShared json.RawMessage `json:"open_note_shared,omitempty"` // SfAddGroup : (sharing) Added team to shared folder (deprecated, no // longer logged) SfAddGroup json.RawMessage `json:"sf_add_group,omitempty"` // SfAllowNonMembersToViewSharedLinks : (sharing) Allowed // non-collaborators to view links to files in shared folder // (deprecated, no longer logged) SfAllowNonMembersToViewSharedLinks json.RawMessage `json:"sf_allow_non_members_to_view_shared_links,omitempty"` // SfExternalInviteWarn : (sharing) Set team members to see warning // before sharing folders outside team (deprecated, no longer logged) SfExternalInviteWarn json.RawMessage `json:"sf_external_invite_warn,omitempty"` // SfFbInvite : (sharing) Invited Facebook users to shared folder // (deprecated, no longer logged) SfFbInvite json.RawMessage `json:"sf_fb_invite,omitempty"` // SfFbInviteChangeRole : (sharing) Changed Facebook user's role in // shared folder (deprecated, no longer logged) SfFbInviteChangeRole json.RawMessage `json:"sf_fb_invite_change_role,omitempty"` // SfFbUninvite : (sharing) Uninvited Facebook user from shared folder // (deprecated, no longer logged) SfFbUninvite json.RawMessage `json:"sf_fb_uninvite,omitempty"` // SfInviteGroup : (sharing) Invited group to shared folder (deprecated, // no longer logged) SfInviteGroup json.RawMessage `json:"sf_invite_group,omitempty"` // SfTeamGrantAccess : (sharing) Granted access to shared folder // (deprecated, no longer logged) SfTeamGrantAccess json.RawMessage `json:"sf_team_grant_access,omitempty"` // SfTeamInvite : (sharing) Invited team members to shared folder // (deprecated, replaced by 'Invited user to Dropbox and added them to // shared file/folder') SfTeamInvite json.RawMessage `json:"sf_team_invite,omitempty"` // SfTeamInviteChangeRole : (sharing) Changed team member's role in // shared folder (deprecated, no longer logged) SfTeamInviteChangeRole json.RawMessage `json:"sf_team_invite_change_role,omitempty"` // SfTeamJoin : (sharing) Joined team member's shared folder // (deprecated, no longer logged) SfTeamJoin json.RawMessage `json:"sf_team_join,omitempty"` // SfTeamJoinFromOobLink : (sharing) Joined team member's shared folder // from link (deprecated, no longer logged) SfTeamJoinFromOobLink json.RawMessage `json:"sf_team_join_from_oob_link,omitempty"` // SfTeamUninvite : (sharing) Unshared folder with team member // (deprecated, replaced by 'Removed invitee from shared file/folder // before invite was accepted') SfTeamUninvite json.RawMessage `json:"sf_team_uninvite,omitempty"` // SharedContentAddInvitees : (sharing) Invited user to Dropbox and // added them to shared file/folder SharedContentAddInvitees json.RawMessage `json:"shared_content_add_invitees,omitempty"` // SharedContentAddLinkExpiry : (sharing) Added expiration date to link // for shared file/folder SharedContentAddLinkExpiry json.RawMessage `json:"shared_content_add_link_expiry,omitempty"` // SharedContentAddLinkPassword : (sharing) Added password to link for // shared file/folder SharedContentAddLinkPassword json.RawMessage `json:"shared_content_add_link_password,omitempty"` // SharedContentAddMember : (sharing) Added users and/or groups to // shared file/folder SharedContentAddMember json.RawMessage `json:"shared_content_add_member,omitempty"` // SharedContentChangeDownloadsPolicy : (sharing) Changed whether // members can download shared file/folder SharedContentChangeDownloadsPolicy json.RawMessage `json:"shared_content_change_downloads_policy,omitempty"` // SharedContentChangeInviteeRole : (sharing) Changed access type of // invitee to shared file/folder before invite was accepted SharedContentChangeInviteeRole json.RawMessage `json:"shared_content_change_invitee_role,omitempty"` // SharedContentChangeLinkAudience : (sharing) Changed link audience of // shared file/folder SharedContentChangeLinkAudience json.RawMessage `json:"shared_content_change_link_audience,omitempty"` // SharedContentChangeLinkExpiry : (sharing) Changed link expiration of // shared file/folder SharedContentChangeLinkExpiry json.RawMessage `json:"shared_content_change_link_expiry,omitempty"` // SharedContentChangeLinkPassword : (sharing) Changed link password of // shared file/folder SharedContentChangeLinkPassword json.RawMessage `json:"shared_content_change_link_password,omitempty"` // SharedContentChangeMemberRole : (sharing) Changed access type of // shared file/folder member SharedContentChangeMemberRole json.RawMessage `json:"shared_content_change_member_role,omitempty"` // SharedContentChangeViewerInfoPolicy : (sharing) Changed whether // members can see who viewed shared file/folder SharedContentChangeViewerInfoPolicy json.RawMessage `json:"shared_content_change_viewer_info_policy,omitempty"` // SharedContentClaimInvitation : (sharing) Acquired membership of // shared file/folder by accepting invite SharedContentClaimInvitation json.RawMessage `json:"shared_content_claim_invitation,omitempty"` // SharedContentCopy : (sharing) Copied shared file/folder to own // Dropbox SharedContentCopy json.RawMessage `json:"shared_content_copy,omitempty"` // SharedContentDownload : (sharing) Downloaded shared file/folder SharedContentDownload json.RawMessage `json:"shared_content_download,omitempty"` // SharedContentRelinquishMembership : (sharing) Left shared file/folder SharedContentRelinquishMembership json.RawMessage `json:"shared_content_relinquish_membership,omitempty"` // SharedContentRemoveInvitees : (sharing) Removed invitee from shared // file/folder before invite was accepted SharedContentRemoveInvitees json.RawMessage `json:"shared_content_remove_invitees,omitempty"` // SharedContentRemoveLinkExpiry : (sharing) Removed link expiration // date of shared file/folder SharedContentRemoveLinkExpiry json.RawMessage `json:"shared_content_remove_link_expiry,omitempty"` // SharedContentRemoveLinkPassword : (sharing) Removed link password of // shared file/folder SharedContentRemoveLinkPassword json.RawMessage `json:"shared_content_remove_link_password,omitempty"` // SharedContentRemoveMember : (sharing) Removed user/group from shared // file/folder SharedContentRemoveMember json.RawMessage `json:"shared_content_remove_member,omitempty"` // SharedContentRequestAccess : (sharing) Requested access to shared // file/folder SharedContentRequestAccess json.RawMessage `json:"shared_content_request_access,omitempty"` // SharedContentUnshare : (sharing) Unshared file/folder by clearing // membership and turning off link SharedContentUnshare json.RawMessage `json:"shared_content_unshare,omitempty"` // SharedContentView : (sharing) Previewed shared file/folder SharedContentView json.RawMessage `json:"shared_content_view,omitempty"` // SharedFolderChangeLinkPolicy : (sharing) Changed who can access // shared folder via link SharedFolderChangeLinkPolicy json.RawMessage `json:"shared_folder_change_link_policy,omitempty"` // SharedFolderChangeMembersInheritancePolicy : (sharing) Changed // whether shared folder inherits members from parent folder SharedFolderChangeMembersInheritancePolicy json.RawMessage `json:"shared_folder_change_members_inheritance_policy,omitempty"` // SharedFolderChangeMembersManagementPolicy : (sharing) Changed who can // add/remove members of shared folder SharedFolderChangeMembersManagementPolicy json.RawMessage `json:"shared_folder_change_members_management_policy,omitempty"` // SharedFolderChangeMembersPolicy : (sharing) Changed who can become // member of shared folder SharedFolderChangeMembersPolicy json.RawMessage `json:"shared_folder_change_members_policy,omitempty"` // SharedFolderCreate : (sharing) Created shared folder SharedFolderCreate json.RawMessage `json:"shared_folder_create,omitempty"` // SharedFolderDeclineInvitation : (sharing) Declined team member's // invite to shared folder SharedFolderDeclineInvitation json.RawMessage `json:"shared_folder_decline_invitation,omitempty"` // SharedFolderMount : (sharing) Added shared folder to own Dropbox SharedFolderMount json.RawMessage `json:"shared_folder_mount,omitempty"` // SharedFolderNest : (sharing) Changed parent of shared folder SharedFolderNest json.RawMessage `json:"shared_folder_nest,omitempty"` // SharedFolderTransferOwnership : (sharing) Transferred ownership of // shared folder to another member SharedFolderTransferOwnership json.RawMessage `json:"shared_folder_transfer_ownership,omitempty"` // SharedFolderUnmount : (sharing) Deleted shared folder from Dropbox SharedFolderUnmount json.RawMessage `json:"shared_folder_unmount,omitempty"` // SharedLinkAddExpiry : (sharing) Added shared link expiration date SharedLinkAddExpiry json.RawMessage `json:"shared_link_add_expiry,omitempty"` // SharedLinkChangeExpiry : (sharing) Changed shared link expiration // date SharedLinkChangeExpiry json.RawMessage `json:"shared_link_change_expiry,omitempty"` // SharedLinkChangeVisibility : (sharing) Changed visibility of shared // link SharedLinkChangeVisibility json.RawMessage `json:"shared_link_change_visibility,omitempty"` // SharedLinkCopy : (sharing) Added file/folder to Dropbox from shared // link SharedLinkCopy json.RawMessage `json:"shared_link_copy,omitempty"` // SharedLinkCreate : (sharing) Created shared link SharedLinkCreate json.RawMessage `json:"shared_link_create,omitempty"` // SharedLinkDisable : (sharing) Removed shared link SharedLinkDisable json.RawMessage `json:"shared_link_disable,omitempty"` // SharedLinkDownload : (sharing) Downloaded file/folder from shared // link SharedLinkDownload json.RawMessage `json:"shared_link_download,omitempty"` // SharedLinkRemoveExpiry : (sharing) Removed shared link expiration // date SharedLinkRemoveExpiry json.RawMessage `json:"shared_link_remove_expiry,omitempty"` // SharedLinkShare : (sharing) Added members as audience of shared link SharedLinkShare json.RawMessage `json:"shared_link_share,omitempty"` // SharedLinkView : (sharing) Opened shared link SharedLinkView json.RawMessage `json:"shared_link_view,omitempty"` // SharedNoteOpened : (sharing) Opened shared Paper doc (deprecated, no // longer logged) SharedNoteOpened json.RawMessage `json:"shared_note_opened,omitempty"` // ShmodelGroupShare : (sharing) Shared link with group (deprecated, no // longer logged) ShmodelGroupShare json.RawMessage `json:"shmodel_group_share,omitempty"` // ShowcaseAccessGranted : (showcase) Granted access to showcase ShowcaseAccessGranted json.RawMessage `json:"showcase_access_granted,omitempty"` // ShowcaseAddMember : (showcase) Added member to showcase ShowcaseAddMember json.RawMessage `json:"showcase_add_member,omitempty"` // ShowcaseArchived : (showcase) Archived showcase ShowcaseArchived json.RawMessage `json:"showcase_archived,omitempty"` // ShowcaseCreated : (showcase) Created showcase ShowcaseCreated json.RawMessage `json:"showcase_created,omitempty"` // ShowcaseDeleteComment : (showcase) Deleted showcase comment ShowcaseDeleteComment json.RawMessage `json:"showcase_delete_comment,omitempty"` // ShowcaseEdited : (showcase) Edited showcase ShowcaseEdited json.RawMessage `json:"showcase_edited,omitempty"` // ShowcaseEditComment : (showcase) Edited showcase comment ShowcaseEditComment json.RawMessage `json:"showcase_edit_comment,omitempty"` // ShowcaseFileAdded : (showcase) Added file to showcase ShowcaseFileAdded json.RawMessage `json:"showcase_file_added,omitempty"` // ShowcaseFileDownload : (showcase) Downloaded file from showcase ShowcaseFileDownload json.RawMessage `json:"showcase_file_download,omitempty"` // ShowcaseFileRemoved : (showcase) Removed file from showcase ShowcaseFileRemoved json.RawMessage `json:"showcase_file_removed,omitempty"` // ShowcaseFileView : (showcase) Viewed file in showcase ShowcaseFileView json.RawMessage `json:"showcase_file_view,omitempty"` // ShowcasePermanentlyDeleted : (showcase) Permanently deleted showcase ShowcasePermanentlyDeleted json.RawMessage `json:"showcase_permanently_deleted,omitempty"` // ShowcasePostComment : (showcase) Added showcase comment ShowcasePostComment json.RawMessage `json:"showcase_post_comment,omitempty"` // ShowcaseRemoveMember : (showcase) Removed member from showcase ShowcaseRemoveMember json.RawMessage `json:"showcase_remove_member,omitempty"` // ShowcaseRenamed : (showcase) Renamed showcase ShowcaseRenamed json.RawMessage `json:"showcase_renamed,omitempty"` // ShowcaseRequestAccess : (showcase) Requested access to showcase ShowcaseRequestAccess json.RawMessage `json:"showcase_request_access,omitempty"` // ShowcaseResolveComment : (showcase) Resolved showcase comment ShowcaseResolveComment json.RawMessage `json:"showcase_resolve_comment,omitempty"` // ShowcaseRestored : (showcase) Unarchived showcase ShowcaseRestored json.RawMessage `json:"showcase_restored,omitempty"` // ShowcaseTrashed : (showcase) Deleted showcase ShowcaseTrashed json.RawMessage `json:"showcase_trashed,omitempty"` // ShowcaseTrashedDeprecated : (showcase) Deleted showcase (old version) // (deprecated, replaced by 'Deleted showcase') ShowcaseTrashedDeprecated json.RawMessage `json:"showcase_trashed_deprecated,omitempty"` // ShowcaseUnresolveComment : (showcase) Unresolved showcase comment ShowcaseUnresolveComment json.RawMessage `json:"showcase_unresolve_comment,omitempty"` // ShowcaseUntrashed : (showcase) Restored showcase ShowcaseUntrashed json.RawMessage `json:"showcase_untrashed,omitempty"` // ShowcaseUntrashedDeprecated : (showcase) Restored showcase (old // version) (deprecated, replaced by 'Restored showcase') ShowcaseUntrashedDeprecated json.RawMessage `json:"showcase_untrashed_deprecated,omitempty"` // ShowcaseView : (showcase) Viewed showcase ShowcaseView json.RawMessage `json:"showcase_view,omitempty"` // SsoAddCert : (sso) Added X.509 certificate for SSO SsoAddCert json.RawMessage `json:"sso_add_cert,omitempty"` // SsoAddLoginUrl : (sso) Added sign-in URL for SSO SsoAddLoginUrl json.RawMessage `json:"sso_add_login_url,omitempty"` // SsoAddLogoutUrl : (sso) Added sign-out URL for SSO SsoAddLogoutUrl json.RawMessage `json:"sso_add_logout_url,omitempty"` // SsoChangeCert : (sso) Changed X.509 certificate for SSO SsoChangeCert json.RawMessage `json:"sso_change_cert,omitempty"` // SsoChangeLoginUrl : (sso) Changed sign-in URL for SSO SsoChangeLoginUrl json.RawMessage `json:"sso_change_login_url,omitempty"` // SsoChangeLogoutUrl : (sso) Changed sign-out URL for SSO SsoChangeLogoutUrl json.RawMessage `json:"sso_change_logout_url,omitempty"` // SsoChangeSamlIdentityMode : (sso) Changed SAML identity mode for SSO SsoChangeSamlIdentityMode json.RawMessage `json:"sso_change_saml_identity_mode,omitempty"` // SsoRemoveCert : (sso) Removed X.509 certificate for SSO SsoRemoveCert json.RawMessage `json:"sso_remove_cert,omitempty"` // SsoRemoveLoginUrl : (sso) Removed sign-in URL for SSO SsoRemoveLoginUrl json.RawMessage `json:"sso_remove_login_url,omitempty"` // SsoRemoveLogoutUrl : (sso) Removed sign-out URL for SSO SsoRemoveLogoutUrl json.RawMessage `json:"sso_remove_logout_url,omitempty"` // TeamFolderChangeStatus : (team_folders) Changed archival status of // team folder TeamFolderChangeStatus json.RawMessage `json:"team_folder_change_status,omitempty"` // TeamFolderCreate : (team_folders) Created team folder in active // status TeamFolderCreate json.RawMessage `json:"team_folder_create,omitempty"` // TeamFolderDowngrade : (team_folders) Downgraded team folder to // regular shared folder TeamFolderDowngrade json.RawMessage `json:"team_folder_downgrade,omitempty"` // TeamFolderPermanentlyDelete : (team_folders) Permanently deleted // archived team folder TeamFolderPermanentlyDelete json.RawMessage `json:"team_folder_permanently_delete,omitempty"` // TeamFolderRename : (team_folders) Renamed active/archived team folder TeamFolderRename json.RawMessage `json:"team_folder_rename,omitempty"` // TeamSelectiveSyncSettingsChanged : (team_folders) Changed sync // default TeamSelectiveSyncSettingsChanged json.RawMessage `json:"team_selective_sync_settings_changed,omitempty"` // AccountCaptureChangePolicy : (team_policies) Changed account capture // setting on team domain AccountCaptureChangePolicy json.RawMessage `json:"account_capture_change_policy,omitempty"` // AllowDownloadDisabled : (team_policies) Disabled downloads // (deprecated, no longer logged) AllowDownloadDisabled json.RawMessage `json:"allow_download_disabled,omitempty"` // AllowDownloadEnabled : (team_policies) Enabled downloads (deprecated, // no longer logged) AllowDownloadEnabled json.RawMessage `json:"allow_download_enabled,omitempty"` // CameraUploadsPolicyChanged : (team_policies) Changed camera uploads // setting for team CameraUploadsPolicyChanged json.RawMessage `json:"camera_uploads_policy_changed,omitempty"` // DataPlacementRestrictionChangePolicy : (team_policies) Set // restrictions on data center locations where team data resides DataPlacementRestrictionChangePolicy json.RawMessage `json:"data_placement_restriction_change_policy,omitempty"` // DataPlacementRestrictionSatisfyPolicy : (team_policies) Completed // restrictions on data center locations where team data resides DataPlacementRestrictionSatisfyPolicy json.RawMessage `json:"data_placement_restriction_satisfy_policy,omitempty"` // DeviceApprovalsChangeDesktopPolicy : (team_policies) Set/removed // limit on number of computers member can link to team Dropbox account DeviceApprovalsChangeDesktopPolicy json.RawMessage `json:"device_approvals_change_desktop_policy,omitempty"` // DeviceApprovalsChangeMobilePolicy : (team_policies) Set/removed limit // on number of mobile devices member can link to team Dropbox account DeviceApprovalsChangeMobilePolicy json.RawMessage `json:"device_approvals_change_mobile_policy,omitempty"` // DeviceApprovalsChangeOverageAction : (team_policies) Changed device // approvals setting when member is over limit DeviceApprovalsChangeOverageAction json.RawMessage `json:"device_approvals_change_overage_action,omitempty"` // DeviceApprovalsChangeUnlinkAction : (team_policies) Changed device // approvals setting when member unlinks approved device DeviceApprovalsChangeUnlinkAction json.RawMessage `json:"device_approvals_change_unlink_action,omitempty"` // DirectoryRestrictionsAddMembers : (team_policies) Added members to // directory restrictions list DirectoryRestrictionsAddMembers json.RawMessage `json:"directory_restrictions_add_members,omitempty"` // DirectoryRestrictionsRemoveMembers : (team_policies) Removed members // from directory restrictions list DirectoryRestrictionsRemoveMembers json.RawMessage `json:"directory_restrictions_remove_members,omitempty"` // EmmAddException : (team_policies) Added members to EMM exception list EmmAddException json.RawMessage `json:"emm_add_exception,omitempty"` // EmmChangePolicy : (team_policies) Enabled/disabled enterprise // mobility management for members EmmChangePolicy json.RawMessage `json:"emm_change_policy,omitempty"` // EmmRemoveException : (team_policies) Removed members from EMM // exception list EmmRemoveException json.RawMessage `json:"emm_remove_exception,omitempty"` // ExtendedVersionHistoryChangePolicy : (team_policies) Accepted/opted // out of extended version history ExtendedVersionHistoryChangePolicy json.RawMessage `json:"extended_version_history_change_policy,omitempty"` // FileCommentsChangePolicy : (team_policies) Enabled/disabled // commenting on team files FileCommentsChangePolicy json.RawMessage `json:"file_comments_change_policy,omitempty"` // FileRequestsChangePolicy : (team_policies) Enabled/disabled file // requests FileRequestsChangePolicy json.RawMessage `json:"file_requests_change_policy,omitempty"` // FileRequestsEmailsEnabled : (team_policies) Enabled file request // emails for everyone (deprecated, no longer logged) FileRequestsEmailsEnabled json.RawMessage `json:"file_requests_emails_enabled,omitempty"` // FileRequestsEmailsRestrictedToTeamOnly : (team_policies) Enabled file // request emails for team (deprecated, no longer logged) FileRequestsEmailsRestrictedToTeamOnly json.RawMessage `json:"file_requests_emails_restricted_to_team_only,omitempty"` // GoogleSsoChangePolicy : (team_policies) Enabled/disabled Google // single sign-on for team GoogleSsoChangePolicy json.RawMessage `json:"google_sso_change_policy,omitempty"` // GroupUserManagementChangePolicy : (team_policies) Changed who can // create groups GroupUserManagementChangePolicy json.RawMessage `json:"group_user_management_change_policy,omitempty"` // MemberRequestsChangePolicy : (team_policies) Changed whether users // can find team when not invited MemberRequestsChangePolicy json.RawMessage `json:"member_requests_change_policy,omitempty"` // MemberSpaceLimitsAddException : (team_policies) Added members to // member space limit exception list MemberSpaceLimitsAddException json.RawMessage `json:"member_space_limits_add_exception,omitempty"` // MemberSpaceLimitsChangeCapsTypePolicy : (team_policies) Changed // member space limit type for team MemberSpaceLimitsChangeCapsTypePolicy json.RawMessage `json:"member_space_limits_change_caps_type_policy,omitempty"` // MemberSpaceLimitsChangePolicy : (team_policies) Changed team default // member space limit MemberSpaceLimitsChangePolicy json.RawMessage `json:"member_space_limits_change_policy,omitempty"` // MemberSpaceLimitsRemoveException : (team_policies) Removed members // from member space limit exception list MemberSpaceLimitsRemoveException json.RawMessage `json:"member_space_limits_remove_exception,omitempty"` // MemberSuggestionsChangePolicy : (team_policies) Enabled/disabled // option for team members to suggest people to add to team MemberSuggestionsChangePolicy json.RawMessage `json:"member_suggestions_change_policy,omitempty"` // MicrosoftOfficeAddinChangePolicy : (team_policies) Enabled/disabled // Microsoft Office add-in MicrosoftOfficeAddinChangePolicy json.RawMessage `json:"microsoft_office_addin_change_policy,omitempty"` // NetworkControlChangePolicy : (team_policies) Enabled/disabled network // control NetworkControlChangePolicy json.RawMessage `json:"network_control_change_policy,omitempty"` // PaperChangeDeploymentPolicy : (team_policies) Changed whether Dropbox // Paper, when enabled, is deployed to all members or to specific // members PaperChangeDeploymentPolicy json.RawMessage `json:"paper_change_deployment_policy,omitempty"` // PaperChangeMemberLinkPolicy : (team_policies) Changed whether // non-members can view Paper docs with link (deprecated, no longer // logged) PaperChangeMemberLinkPolicy json.RawMessage `json:"paper_change_member_link_policy,omitempty"` // PaperChangeMemberPolicy : (team_policies) Changed whether members can // share Paper docs outside team, and if docs are accessible only by // team members or anyone by default PaperChangeMemberPolicy json.RawMessage `json:"paper_change_member_policy,omitempty"` // PaperChangePolicy : (team_policies) Enabled/disabled Dropbox Paper // for team PaperChangePolicy json.RawMessage `json:"paper_change_policy,omitempty"` // PaperEnabledUsersGroupAddition : (team_policies) Added users to // Paper-enabled users list PaperEnabledUsersGroupAddition json.RawMessage `json:"paper_enabled_users_group_addition,omitempty"` // PaperEnabledUsersGroupRemoval : (team_policies) Removed users from // Paper-enabled users list PaperEnabledUsersGroupRemoval json.RawMessage `json:"paper_enabled_users_group_removal,omitempty"` // PermanentDeleteChangePolicy : (team_policies) Enabled/disabled // ability of team members to permanently delete content PermanentDeleteChangePolicy json.RawMessage `json:"permanent_delete_change_policy,omitempty"` // SharingChangeFolderJoinPolicy : (team_policies) Changed whether team // members can join shared folders owned outside team SharingChangeFolderJoinPolicy json.RawMessage `json:"sharing_change_folder_join_policy,omitempty"` // SharingChangeLinkPolicy : (team_policies) Changed whether members can // share links outside team, and if links are accessible only by team // members or anyone by default SharingChangeLinkPolicy json.RawMessage `json:"sharing_change_link_policy,omitempty"` // SharingChangeMemberPolicy : (team_policies) Changed whether members // can share files/folders outside team SharingChangeMemberPolicy json.RawMessage `json:"sharing_change_member_policy,omitempty"` // ShowcaseChangeDownloadPolicy : (team_policies) Enabled/disabled // downloading files from Dropbox Showcase for team ShowcaseChangeDownloadPolicy json.RawMessage `json:"showcase_change_download_policy,omitempty"` // ShowcaseChangeEnabledPolicy : (team_policies) Enabled/disabled // Dropbox Showcase for team ShowcaseChangeEnabledPolicy json.RawMessage `json:"showcase_change_enabled_policy,omitempty"` // ShowcaseChangeExternalSharingPolicy : (team_policies) // Enabled/disabled sharing Dropbox Showcase externally for team ShowcaseChangeExternalSharingPolicy json.RawMessage `json:"showcase_change_external_sharing_policy,omitempty"` // SmartSyncChangePolicy : (team_policies) Changed default Smart Sync // setting for team members SmartSyncChangePolicy json.RawMessage `json:"smart_sync_change_policy,omitempty"` // SmartSyncNotOptOut : (team_policies) Opted team into Smart Sync SmartSyncNotOptOut json.RawMessage `json:"smart_sync_not_opt_out,omitempty"` // SmartSyncOptOut : (team_policies) Opted team out of Smart Sync SmartSyncOptOut json.RawMessage `json:"smart_sync_opt_out,omitempty"` // SsoChangePolicy : (team_policies) Changed single sign-on setting for // team SsoChangePolicy json.RawMessage `json:"sso_change_policy,omitempty"` // TeamSelectiveSyncPolicyChanged : (team_policies) Enabled/disabled // Team Selective Sync for team TeamSelectiveSyncPolicyChanged json.RawMessage `json:"team_selective_sync_policy_changed,omitempty"` // TfaChangePolicy : (team_policies) Changed two-step verification // setting for team TfaChangePolicy json.RawMessage `json:"tfa_change_policy,omitempty"` // TwoAccountChangePolicy : (team_policies) Enabled/disabled option for // members to link personal Dropbox account and team account to same // computer TwoAccountChangePolicy json.RawMessage `json:"two_account_change_policy,omitempty"` // ViewerInfoPolicyChanged : (team_policies) Changed team policy for // viewer info ViewerInfoPolicyChanged json.RawMessage `json:"viewer_info_policy_changed,omitempty"` // WebSessionsChangeFixedLengthPolicy : (team_policies) Changed how long // members can stay signed in to Dropbox.com WebSessionsChangeFixedLengthPolicy json.RawMessage `json:"web_sessions_change_fixed_length_policy,omitempty"` // WebSessionsChangeIdleLengthPolicy : (team_policies) Changed how long // team members can be idle while signed in to Dropbox.com WebSessionsChangeIdleLengthPolicy json.RawMessage `json:"web_sessions_change_idle_length_policy,omitempty"` // TeamMergeFrom : (team_profile) Merged another team into this team TeamMergeFrom json.RawMessage `json:"team_merge_from,omitempty"` // TeamMergeTo : (team_profile) Merged this team into another team TeamMergeTo json.RawMessage `json:"team_merge_to,omitempty"` // TeamProfileAddLogo : (team_profile) Added team logo to display on // shared link headers TeamProfileAddLogo json.RawMessage `json:"team_profile_add_logo,omitempty"` // TeamProfileChangeDefaultLanguage : (team_profile) Changed default // language for team TeamProfileChangeDefaultLanguage json.RawMessage `json:"team_profile_change_default_language,omitempty"` // TeamProfileChangeLogo : (team_profile) Changed team logo displayed on // shared link headers TeamProfileChangeLogo json.RawMessage `json:"team_profile_change_logo,omitempty"` // TeamProfileChangeName : (team_profile) Changed team name TeamProfileChangeName json.RawMessage `json:"team_profile_change_name,omitempty"` // TeamProfileRemoveLogo : (team_profile) Removed team logo displayed on // shared link headers TeamProfileRemoveLogo json.RawMessage `json:"team_profile_remove_logo,omitempty"` // TfaAddBackupPhone : (tfa) Added backup phone for two-step // verification TfaAddBackupPhone json.RawMessage `json:"tfa_add_backup_phone,omitempty"` // TfaAddSecurityKey : (tfa) Added security key for two-step // verification TfaAddSecurityKey json.RawMessage `json:"tfa_add_security_key,omitempty"` // TfaChangeBackupPhone : (tfa) Changed backup phone for two-step // verification TfaChangeBackupPhone json.RawMessage `json:"tfa_change_backup_phone,omitempty"` // TfaChangeStatus : (tfa) Enabled/disabled/changed two-step // verification setting TfaChangeStatus json.RawMessage `json:"tfa_change_status,omitempty"` // TfaRemoveBackupPhone : (tfa) Removed backup phone for two-step // verification TfaRemoveBackupPhone json.RawMessage `json:"tfa_remove_backup_phone,omitempty"` // TfaRemoveSecurityKey : (tfa) Removed security key for two-step // verification TfaRemoveSecurityKey json.RawMessage `json:"tfa_remove_security_key,omitempty"` // TfaReset : (tfa) Reset two-step verification for team member TfaReset json.RawMessage `json:"tfa_reset,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "app_link_team": err = json.Unmarshal(body, &u.AppLinkTeam) if err != nil { return err } case "app_link_user": err = json.Unmarshal(body, &u.AppLinkUser) if err != nil { return err } case "app_unlink_team": err = json.Unmarshal(body, &u.AppUnlinkTeam) if err != nil { return err } case "app_unlink_user": err = json.Unmarshal(body, &u.AppUnlinkUser) if err != nil { return err } case "file_add_comment": err = json.Unmarshal(body, &u.FileAddComment) if err != nil { return err } case "file_change_comment_subscription": err = json.Unmarshal(body, &u.FileChangeCommentSubscription) if err != nil { return err } case "file_delete_comment": err = json.Unmarshal(body, &u.FileDeleteComment) if err != nil { return err } case "file_edit_comment": err = json.Unmarshal(body, &u.FileEditComment) if err != nil { return err } case "file_like_comment": err = json.Unmarshal(body, &u.FileLikeComment) if err != nil { return err } case "file_resolve_comment": err = json.Unmarshal(body, &u.FileResolveComment) if err != nil { return err } case "file_unlike_comment": err = json.Unmarshal(body, &u.FileUnlikeComment) if err != nil { return err } case "file_unresolve_comment": err = json.Unmarshal(body, &u.FileUnresolveComment) if err != nil { return err } case "device_change_ip_desktop": err = json.Unmarshal(body, &u.DeviceChangeIpDesktop) if err != nil { return err } case "device_change_ip_mobile": err = json.Unmarshal(body, &u.DeviceChangeIpMobile) if err != nil { return err } case "device_change_ip_web": err = json.Unmarshal(body, &u.DeviceChangeIpWeb) if err != nil { return err } case "device_delete_on_unlink_fail": err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkFail) if err != nil { return err } case "device_delete_on_unlink_success": err = json.Unmarshal(body, &u.DeviceDeleteOnUnlinkSuccess) if err != nil { return err } case "device_link_fail": err = json.Unmarshal(body, &u.DeviceLinkFail) if err != nil { return err } case "device_link_success": err = json.Unmarshal(body, &u.DeviceLinkSuccess) if err != nil { return err } case "device_management_disabled": err = json.Unmarshal(body, &u.DeviceManagementDisabled) if err != nil { return err } case "device_management_enabled": err = json.Unmarshal(body, &u.DeviceManagementEnabled) if err != nil { return err } case "device_unlink": err = json.Unmarshal(body, &u.DeviceUnlink) if err != nil { return err } case "emm_refresh_auth_token": err = json.Unmarshal(body, &u.EmmRefreshAuthToken) if err != nil { return err } case "account_capture_change_availability": err = json.Unmarshal(body, &u.AccountCaptureChangeAvailability) if err != nil { return err } case "account_capture_migrate_account": err = json.Unmarshal(body, &u.AccountCaptureMigrateAccount) if err != nil { return err } case "account_capture_notification_emails_sent": err = json.Unmarshal(body, &u.AccountCaptureNotificationEmailsSent) if err != nil { return err } case "account_capture_relinquish_account": err = json.Unmarshal(body, &u.AccountCaptureRelinquishAccount) if err != nil { return err } case "disabled_domain_invites": err = json.Unmarshal(body, &u.DisabledDomainInvites) if err != nil { return err } case "domain_invites_approve_request_to_join_team": err = json.Unmarshal(body, &u.DomainInvitesApproveRequestToJoinTeam) if err != nil { return err } case "domain_invites_decline_request_to_join_team": err = json.Unmarshal(body, &u.DomainInvitesDeclineRequestToJoinTeam) if err != nil { return err } case "domain_invites_email_existing_users": err = json.Unmarshal(body, &u.DomainInvitesEmailExistingUsers) if err != nil { return err } case "domain_invites_request_to_join_team": err = json.Unmarshal(body, &u.DomainInvitesRequestToJoinTeam) if err != nil { return err } case "domain_invites_set_invite_new_user_pref_to_no": err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToNo) if err != nil { return err } case "domain_invites_set_invite_new_user_pref_to_yes": err = json.Unmarshal(body, &u.DomainInvitesSetInviteNewUserPrefToYes) if err != nil { return err } case "domain_verification_add_domain_fail": err = json.Unmarshal(body, &u.DomainVerificationAddDomainFail) if err != nil { return err } case "domain_verification_add_domain_success": err = json.Unmarshal(body, &u.DomainVerificationAddDomainSuccess) if err != nil { return err } case "domain_verification_remove_domain": err = json.Unmarshal(body, &u.DomainVerificationRemoveDomain) if err != nil { return err } case "enabled_domain_invites": err = json.Unmarshal(body, &u.EnabledDomainInvites) if err != nil { return err } case "create_folder": err = json.Unmarshal(body, &u.CreateFolder) if err != nil { return err } case "file_add": err = json.Unmarshal(body, &u.FileAdd) if err != nil { return err } case "file_copy": err = json.Unmarshal(body, &u.FileCopy) if err != nil { return err } case "file_delete": err = json.Unmarshal(body, &u.FileDelete) if err != nil { return err } case "file_download": err = json.Unmarshal(body, &u.FileDownload) if err != nil { return err } case "file_edit": err = json.Unmarshal(body, &u.FileEdit) if err != nil { return err } case "file_get_copy_reference": err = json.Unmarshal(body, &u.FileGetCopyReference) if err != nil { return err } case "file_move": err = json.Unmarshal(body, &u.FileMove) if err != nil { return err } case "file_permanently_delete": err = json.Unmarshal(body, &u.FilePermanentlyDelete) if err != nil { return err } case "file_preview": err = json.Unmarshal(body, &u.FilePreview) if err != nil { return err } case "file_rename": err = json.Unmarshal(body, &u.FileRename) if err != nil { return err } case "file_restore": err = json.Unmarshal(body, &u.FileRestore) if err != nil { return err } case "file_revert": err = json.Unmarshal(body, &u.FileRevert) if err != nil { return err } case "file_rollback_changes": err = json.Unmarshal(body, &u.FileRollbackChanges) if err != nil { return err } case "file_save_copy_reference": err = json.Unmarshal(body, &u.FileSaveCopyReference) if err != nil { return err } case "file_request_change": err = json.Unmarshal(body, &u.FileRequestChange) if err != nil { return err } case "file_request_close": err = json.Unmarshal(body, &u.FileRequestClose) if err != nil { return err } case "file_request_create": err = json.Unmarshal(body, &u.FileRequestCreate) if err != nil { return err } case "file_request_receive_file": err = json.Unmarshal(body, &u.FileRequestReceiveFile) if err != nil { return err } case "group_add_external_id": err = json.Unmarshal(body, &u.GroupAddExternalId) if err != nil { return err } case "group_add_member": err = json.Unmarshal(body, &u.GroupAddMember) if err != nil { return err } case "group_change_external_id": err = json.Unmarshal(body, &u.GroupChangeExternalId) if err != nil { return err } case "group_change_management_type": err = json.Unmarshal(body, &u.GroupChangeManagementType) if err != nil { return err } case "group_change_member_role": err = json.Unmarshal(body, &u.GroupChangeMemberRole) if err != nil { return err } case "group_create": err = json.Unmarshal(body, &u.GroupCreate) if err != nil { return err } case "group_delete": err = json.Unmarshal(body, &u.GroupDelete) if err != nil { return err } case "group_description_updated": err = json.Unmarshal(body, &u.GroupDescriptionUpdated) if err != nil { return err } case "group_join_policy_updated": err = json.Unmarshal(body, &u.GroupJoinPolicyUpdated) if err != nil { return err } case "group_moved": err = json.Unmarshal(body, &u.GroupMoved) if err != nil { return err } case "group_remove_external_id": err = json.Unmarshal(body, &u.GroupRemoveExternalId) if err != nil { return err } case "group_remove_member": err = json.Unmarshal(body, &u.GroupRemoveMember) if err != nil { return err } case "group_rename": err = json.Unmarshal(body, &u.GroupRename) if err != nil { return err } case "emm_error": err = json.Unmarshal(body, &u.EmmError) if err != nil { return err } case "login_fail": err = json.Unmarshal(body, &u.LoginFail) if err != nil { return err } case "login_success": err = json.Unmarshal(body, &u.LoginSuccess) if err != nil { return err } case "logout": err = json.Unmarshal(body, &u.Logout) if err != nil { return err } case "reseller_support_session_end": err = json.Unmarshal(body, &u.ResellerSupportSessionEnd) if err != nil { return err } case "reseller_support_session_start": err = json.Unmarshal(body, &u.ResellerSupportSessionStart) if err != nil { return err } case "sign_in_as_session_end": err = json.Unmarshal(body, &u.SignInAsSessionEnd) if err != nil { return err } case "sign_in_as_session_start": err = json.Unmarshal(body, &u.SignInAsSessionStart) if err != nil { return err } case "sso_error": err = json.Unmarshal(body, &u.SsoError) if err != nil { return err } case "member_add_name": err = json.Unmarshal(body, &u.MemberAddName) if err != nil { return err } case "member_change_admin_role": err = json.Unmarshal(body, &u.MemberChangeAdminRole) if err != nil { return err } case "member_change_email": err = json.Unmarshal(body, &u.MemberChangeEmail) if err != nil { return err } case "member_change_membership_type": err = json.Unmarshal(body, &u.MemberChangeMembershipType) if err != nil { return err } case "member_change_name": err = json.Unmarshal(body, &u.MemberChangeName) if err != nil { return err } case "member_change_status": err = json.Unmarshal(body, &u.MemberChangeStatus) if err != nil { return err } case "member_delete_manual_contacts": err = json.Unmarshal(body, &u.MemberDeleteManualContacts) if err != nil { return err } case "member_permanently_delete_account_contents": err = json.Unmarshal(body, &u.MemberPermanentlyDeleteAccountContents) if err != nil { return err } case "member_space_limits_add_custom_quota": err = json.Unmarshal(body, &u.MemberSpaceLimitsAddCustomQuota) if err != nil { return err } case "member_space_limits_change_custom_quota": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCustomQuota) if err != nil { return err } case "member_space_limits_change_status": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeStatus) if err != nil { return err } case "member_space_limits_remove_custom_quota": err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveCustomQuota) if err != nil { return err } case "member_suggest": err = json.Unmarshal(body, &u.MemberSuggest) if err != nil { return err } case "member_transfer_account_contents": err = json.Unmarshal(body, &u.MemberTransferAccountContents) if err != nil { return err } case "secondary_mails_policy_changed": err = json.Unmarshal(body, &u.SecondaryMailsPolicyChanged) if err != nil { return err } case "paper_content_add_member": err = json.Unmarshal(body, &u.PaperContentAddMember) if err != nil { return err } case "paper_content_add_to_folder": err = json.Unmarshal(body, &u.PaperContentAddToFolder) if err != nil { return err } case "paper_content_archive": err = json.Unmarshal(body, &u.PaperContentArchive) if err != nil { return err } case "paper_content_create": err = json.Unmarshal(body, &u.PaperContentCreate) if err != nil { return err } case "paper_content_permanently_delete": err = json.Unmarshal(body, &u.PaperContentPermanentlyDelete) if err != nil { return err } case "paper_content_remove_from_folder": err = json.Unmarshal(body, &u.PaperContentRemoveFromFolder) if err != nil { return err } case "paper_content_remove_member": err = json.Unmarshal(body, &u.PaperContentRemoveMember) if err != nil { return err } case "paper_content_rename": err = json.Unmarshal(body, &u.PaperContentRename) if err != nil { return err } case "paper_content_restore": err = json.Unmarshal(body, &u.PaperContentRestore) if err != nil { return err } case "paper_doc_add_comment": err = json.Unmarshal(body, &u.PaperDocAddComment) if err != nil { return err } case "paper_doc_change_member_role": err = json.Unmarshal(body, &u.PaperDocChangeMemberRole) if err != nil { return err } case "paper_doc_change_sharing_policy": err = json.Unmarshal(body, &u.PaperDocChangeSharingPolicy) if err != nil { return err } case "paper_doc_change_subscription": err = json.Unmarshal(body, &u.PaperDocChangeSubscription) if err != nil { return err } case "paper_doc_deleted": err = json.Unmarshal(body, &u.PaperDocDeleted) if err != nil { return err } case "paper_doc_delete_comment": err = json.Unmarshal(body, &u.PaperDocDeleteComment) if err != nil { return err } case "paper_doc_download": err = json.Unmarshal(body, &u.PaperDocDownload) if err != nil { return err } case "paper_doc_edit": err = json.Unmarshal(body, &u.PaperDocEdit) if err != nil { return err } case "paper_doc_edit_comment": err = json.Unmarshal(body, &u.PaperDocEditComment) if err != nil { return err } case "paper_doc_followed": err = json.Unmarshal(body, &u.PaperDocFollowed) if err != nil { return err } case "paper_doc_mention": err = json.Unmarshal(body, &u.PaperDocMention) if err != nil { return err } case "paper_doc_ownership_changed": err = json.Unmarshal(body, &u.PaperDocOwnershipChanged) if err != nil { return err } case "paper_doc_request_access": err = json.Unmarshal(body, &u.PaperDocRequestAccess) if err != nil { return err } case "paper_doc_resolve_comment": err = json.Unmarshal(body, &u.PaperDocResolveComment) if err != nil { return err } case "paper_doc_revert": err = json.Unmarshal(body, &u.PaperDocRevert) if err != nil { return err } case "paper_doc_slack_share": err = json.Unmarshal(body, &u.PaperDocSlackShare) if err != nil { return err } case "paper_doc_team_invite": err = json.Unmarshal(body, &u.PaperDocTeamInvite) if err != nil { return err } case "paper_doc_trashed": err = json.Unmarshal(body, &u.PaperDocTrashed) if err != nil { return err } case "paper_doc_unresolve_comment": err = json.Unmarshal(body, &u.PaperDocUnresolveComment) if err != nil { return err } case "paper_doc_untrashed": err = json.Unmarshal(body, &u.PaperDocUntrashed) if err != nil { return err } case "paper_doc_view": err = json.Unmarshal(body, &u.PaperDocView) if err != nil { return err } case "paper_external_view_allow": err = json.Unmarshal(body, &u.PaperExternalViewAllow) if err != nil { return err } case "paper_external_view_default_team": err = json.Unmarshal(body, &u.PaperExternalViewDefaultTeam) if err != nil { return err } case "paper_external_view_forbid": err = json.Unmarshal(body, &u.PaperExternalViewForbid) if err != nil { return err } case "paper_folder_change_subscription": err = json.Unmarshal(body, &u.PaperFolderChangeSubscription) if err != nil { return err } case "paper_folder_deleted": err = json.Unmarshal(body, &u.PaperFolderDeleted) if err != nil { return err } case "paper_folder_followed": err = json.Unmarshal(body, &u.PaperFolderFollowed) if err != nil { return err } case "paper_folder_team_invite": err = json.Unmarshal(body, &u.PaperFolderTeamInvite) if err != nil { return err } case "password_change": err = json.Unmarshal(body, &u.PasswordChange) if err != nil { return err } case "password_reset": err = json.Unmarshal(body, &u.PasswordReset) if err != nil { return err } case "password_reset_all": err = json.Unmarshal(body, &u.PasswordResetAll) if err != nil { return err } case "emm_create_exceptions_report": err = json.Unmarshal(body, &u.EmmCreateExceptionsReport) if err != nil { return err } case "emm_create_usage_report": err = json.Unmarshal(body, &u.EmmCreateUsageReport) if err != nil { return err } case "export_members_report": err = json.Unmarshal(body, &u.ExportMembersReport) if err != nil { return err } case "paper_admin_export_start": err = json.Unmarshal(body, &u.PaperAdminExportStart) if err != nil { return err } case "smart_sync_create_admin_privilege_report": err = json.Unmarshal(body, &u.SmartSyncCreateAdminPrivilegeReport) if err != nil { return err } case "team_activity_create_report": err = json.Unmarshal(body, &u.TeamActivityCreateReport) if err != nil { return err } case "collection_share": err = json.Unmarshal(body, &u.CollectionShare) if err != nil { return err } case "note_acl_invite_only": err = json.Unmarshal(body, &u.NoteAclInviteOnly) if err != nil { return err } case "note_acl_link": err = json.Unmarshal(body, &u.NoteAclLink) if err != nil { return err } case "note_acl_team_link": err = json.Unmarshal(body, &u.NoteAclTeamLink) if err != nil { return err } case "note_shared": err = json.Unmarshal(body, &u.NoteShared) if err != nil { return err } case "note_share_receive": err = json.Unmarshal(body, &u.NoteShareReceive) if err != nil { return err } case "open_note_shared": err = json.Unmarshal(body, &u.OpenNoteShared) if err != nil { return err } case "sf_add_group": err = json.Unmarshal(body, &u.SfAddGroup) if err != nil { return err } case "sf_allow_non_members_to_view_shared_links": err = json.Unmarshal(body, &u.SfAllowNonMembersToViewSharedLinks) if err != nil { return err } case "sf_external_invite_warn": err = json.Unmarshal(body, &u.SfExternalInviteWarn) if err != nil { return err } case "sf_fb_invite": err = json.Unmarshal(body, &u.SfFbInvite) if err != nil { return err } case "sf_fb_invite_change_role": err = json.Unmarshal(body, &u.SfFbInviteChangeRole) if err != nil { return err } case "sf_fb_uninvite": err = json.Unmarshal(body, &u.SfFbUninvite) if err != nil { return err } case "sf_invite_group": err = json.Unmarshal(body, &u.SfInviteGroup) if err != nil { return err } case "sf_team_grant_access": err = json.Unmarshal(body, &u.SfTeamGrantAccess) if err != nil { return err } case "sf_team_invite": err = json.Unmarshal(body, &u.SfTeamInvite) if err != nil { return err } case "sf_team_invite_change_role": err = json.Unmarshal(body, &u.SfTeamInviteChangeRole) if err != nil { return err } case "sf_team_join": err = json.Unmarshal(body, &u.SfTeamJoin) if err != nil { return err } case "sf_team_join_from_oob_link": err = json.Unmarshal(body, &u.SfTeamJoinFromOobLink) if err != nil { return err } case "sf_team_uninvite": err = json.Unmarshal(body, &u.SfTeamUninvite) if err != nil { return err } case "shared_content_add_invitees": err = json.Unmarshal(body, &u.SharedContentAddInvitees) if err != nil { return err } case "shared_content_add_link_expiry": err = json.Unmarshal(body, &u.SharedContentAddLinkExpiry) if err != nil { return err } case "shared_content_add_link_password": err = json.Unmarshal(body, &u.SharedContentAddLinkPassword) if err != nil { return err } case "shared_content_add_member": err = json.Unmarshal(body, &u.SharedContentAddMember) if err != nil { return err } case "shared_content_change_downloads_policy": err = json.Unmarshal(body, &u.SharedContentChangeDownloadsPolicy) if err != nil { return err } case "shared_content_change_invitee_role": err = json.Unmarshal(body, &u.SharedContentChangeInviteeRole) if err != nil { return err } case "shared_content_change_link_audience": err = json.Unmarshal(body, &u.SharedContentChangeLinkAudience) if err != nil { return err } case "shared_content_change_link_expiry": err = json.Unmarshal(body, &u.SharedContentChangeLinkExpiry) if err != nil { return err } case "shared_content_change_link_password": err = json.Unmarshal(body, &u.SharedContentChangeLinkPassword) if err != nil { return err } case "shared_content_change_member_role": err = json.Unmarshal(body, &u.SharedContentChangeMemberRole) if err != nil { return err } case "shared_content_change_viewer_info_policy": err = json.Unmarshal(body, &u.SharedContentChangeViewerInfoPolicy) if err != nil { return err } case "shared_content_claim_invitation": err = json.Unmarshal(body, &u.SharedContentClaimInvitation) if err != nil { return err } case "shared_content_copy": err = json.Unmarshal(body, &u.SharedContentCopy) if err != nil { return err } case "shared_content_download": err = json.Unmarshal(body, &u.SharedContentDownload) if err != nil { return err } case "shared_content_relinquish_membership": err = json.Unmarshal(body, &u.SharedContentRelinquishMembership) if err != nil { return err } case "shared_content_remove_invitees": err = json.Unmarshal(body, &u.SharedContentRemoveInvitees) if err != nil { return err } case "shared_content_remove_link_expiry": err = json.Unmarshal(body, &u.SharedContentRemoveLinkExpiry) if err != nil { return err } case "shared_content_remove_link_password": err = json.Unmarshal(body, &u.SharedContentRemoveLinkPassword) if err != nil { return err } case "shared_content_remove_member": err = json.Unmarshal(body, &u.SharedContentRemoveMember) if err != nil { return err } case "shared_content_request_access": err = json.Unmarshal(body, &u.SharedContentRequestAccess) if err != nil { return err } case "shared_content_unshare": err = json.Unmarshal(body, &u.SharedContentUnshare) if err != nil { return err } case "shared_content_view": err = json.Unmarshal(body, &u.SharedContentView) if err != nil { return err } case "shared_folder_change_link_policy": err = json.Unmarshal(body, &u.SharedFolderChangeLinkPolicy) if err != nil { return err } case "shared_folder_change_members_inheritance_policy": err = json.Unmarshal(body, &u.SharedFolderChangeMembersInheritancePolicy) if err != nil { return err } case "shared_folder_change_members_management_policy": err = json.Unmarshal(body, &u.SharedFolderChangeMembersManagementPolicy) if err != nil { return err } case "shared_folder_change_members_policy": err = json.Unmarshal(body, &u.SharedFolderChangeMembersPolicy) if err != nil { return err } case "shared_folder_create": err = json.Unmarshal(body, &u.SharedFolderCreate) if err != nil { return err } case "shared_folder_decline_invitation": err = json.Unmarshal(body, &u.SharedFolderDeclineInvitation) if err != nil { return err } case "shared_folder_mount": err = json.Unmarshal(body, &u.SharedFolderMount) if err != nil { return err } case "shared_folder_nest": err = json.Unmarshal(body, &u.SharedFolderNest) if err != nil { return err } case "shared_folder_transfer_ownership": err = json.Unmarshal(body, &u.SharedFolderTransferOwnership) if err != nil { return err } case "shared_folder_unmount": err = json.Unmarshal(body, &u.SharedFolderUnmount) if err != nil { return err } case "shared_link_add_expiry": err = json.Unmarshal(body, &u.SharedLinkAddExpiry) if err != nil { return err } case "shared_link_change_expiry": err = json.Unmarshal(body, &u.SharedLinkChangeExpiry) if err != nil { return err } case "shared_link_change_visibility": err = json.Unmarshal(body, &u.SharedLinkChangeVisibility) if err != nil { return err } case "shared_link_copy": err = json.Unmarshal(body, &u.SharedLinkCopy) if err != nil { return err } case "shared_link_create": err = json.Unmarshal(body, &u.SharedLinkCreate) if err != nil { return err } case "shared_link_disable": err = json.Unmarshal(body, &u.SharedLinkDisable) if err != nil { return err } case "shared_link_download": err = json.Unmarshal(body, &u.SharedLinkDownload) if err != nil { return err } case "shared_link_remove_expiry": err = json.Unmarshal(body, &u.SharedLinkRemoveExpiry) if err != nil { return err } case "shared_link_share": err = json.Unmarshal(body, &u.SharedLinkShare) if err != nil { return err } case "shared_link_view": err = json.Unmarshal(body, &u.SharedLinkView) if err != nil { return err } case "shared_note_opened": err = json.Unmarshal(body, &u.SharedNoteOpened) if err != nil { return err } case "shmodel_group_share": err = json.Unmarshal(body, &u.ShmodelGroupShare) if err != nil { return err } case "showcase_access_granted": err = json.Unmarshal(body, &u.ShowcaseAccessGranted) if err != nil { return err } case "showcase_add_member": err = json.Unmarshal(body, &u.ShowcaseAddMember) if err != nil { return err } case "showcase_archived": err = json.Unmarshal(body, &u.ShowcaseArchived) if err != nil { return err } case "showcase_created": err = json.Unmarshal(body, &u.ShowcaseCreated) if err != nil { return err } case "showcase_delete_comment": err = json.Unmarshal(body, &u.ShowcaseDeleteComment) if err != nil { return err } case "showcase_edited": err = json.Unmarshal(body, &u.ShowcaseEdited) if err != nil { return err } case "showcase_edit_comment": err = json.Unmarshal(body, &u.ShowcaseEditComment) if err != nil { return err } case "showcase_file_added": err = json.Unmarshal(body, &u.ShowcaseFileAdded) if err != nil { return err } case "showcase_file_download": err = json.Unmarshal(body, &u.ShowcaseFileDownload) if err != nil { return err } case "showcase_file_removed": err = json.Unmarshal(body, &u.ShowcaseFileRemoved) if err != nil { return err } case "showcase_file_view": err = json.Unmarshal(body, &u.ShowcaseFileView) if err != nil { return err } case "showcase_permanently_deleted": err = json.Unmarshal(body, &u.ShowcasePermanentlyDeleted) if err != nil { return err } case "showcase_post_comment": err = json.Unmarshal(body, &u.ShowcasePostComment) if err != nil { return err } case "showcase_remove_member": err = json.Unmarshal(body, &u.ShowcaseRemoveMember) if err != nil { return err } case "showcase_renamed": err = json.Unmarshal(body, &u.ShowcaseRenamed) if err != nil { return err } case "showcase_request_access": err = json.Unmarshal(body, &u.ShowcaseRequestAccess) if err != nil { return err } case "showcase_resolve_comment": err = json.Unmarshal(body, &u.ShowcaseResolveComment) if err != nil { return err } case "showcase_restored": err = json.Unmarshal(body, &u.ShowcaseRestored) if err != nil { return err } case "showcase_trashed": err = json.Unmarshal(body, &u.ShowcaseTrashed) if err != nil { return err } case "showcase_trashed_deprecated": err = json.Unmarshal(body, &u.ShowcaseTrashedDeprecated) if err != nil { return err } case "showcase_unresolve_comment": err = json.Unmarshal(body, &u.ShowcaseUnresolveComment) if err != nil { return err } case "showcase_untrashed": err = json.Unmarshal(body, &u.ShowcaseUntrashed) if err != nil { return err } case "showcase_untrashed_deprecated": err = json.Unmarshal(body, &u.ShowcaseUntrashedDeprecated) if err != nil { return err } case "showcase_view": err = json.Unmarshal(body, &u.ShowcaseView) if err != nil { return err } case "sso_add_cert": err = json.Unmarshal(body, &u.SsoAddCert) if err != nil { return err } case "sso_add_login_url": err = json.Unmarshal(body, &u.SsoAddLoginUrl) if err != nil { return err } case "sso_add_logout_url": err = json.Unmarshal(body, &u.SsoAddLogoutUrl) if err != nil { return err } case "sso_change_cert": err = json.Unmarshal(body, &u.SsoChangeCert) if err != nil { return err } case "sso_change_login_url": err = json.Unmarshal(body, &u.SsoChangeLoginUrl) if err != nil { return err } case "sso_change_logout_url": err = json.Unmarshal(body, &u.SsoChangeLogoutUrl) if err != nil { return err } case "sso_change_saml_identity_mode": err = json.Unmarshal(body, &u.SsoChangeSamlIdentityMode) if err != nil { return err } case "sso_remove_cert": err = json.Unmarshal(body, &u.SsoRemoveCert) if err != nil { return err } case "sso_remove_login_url": err = json.Unmarshal(body, &u.SsoRemoveLoginUrl) if err != nil { return err } case "sso_remove_logout_url": err = json.Unmarshal(body, &u.SsoRemoveLogoutUrl) if err != nil { return err } case "team_folder_change_status": err = json.Unmarshal(body, &u.TeamFolderChangeStatus) if err != nil { return err } case "team_folder_create": err = json.Unmarshal(body, &u.TeamFolderCreate) if err != nil { return err } case "team_folder_downgrade": err = json.Unmarshal(body, &u.TeamFolderDowngrade) if err != nil { return err } case "team_folder_permanently_delete": err = json.Unmarshal(body, &u.TeamFolderPermanentlyDelete) if err != nil { return err } case "team_folder_rename": err = json.Unmarshal(body, &u.TeamFolderRename) if err != nil { return err } case "team_selective_sync_settings_changed": err = json.Unmarshal(body, &u.TeamSelectiveSyncSettingsChanged) if err != nil { return err } case "account_capture_change_policy": err = json.Unmarshal(body, &u.AccountCaptureChangePolicy) if err != nil { return err } case "allow_download_disabled": err = json.Unmarshal(body, &u.AllowDownloadDisabled) if err != nil { return err } case "allow_download_enabled": err = json.Unmarshal(body, &u.AllowDownloadEnabled) if err != nil { return err } case "camera_uploads_policy_changed": err = json.Unmarshal(body, &u.CameraUploadsPolicyChanged) if err != nil { return err } case "data_placement_restriction_change_policy": err = json.Unmarshal(body, &u.DataPlacementRestrictionChangePolicy) if err != nil { return err } case "data_placement_restriction_satisfy_policy": err = json.Unmarshal(body, &u.DataPlacementRestrictionSatisfyPolicy) if err != nil { return err } case "device_approvals_change_desktop_policy": err = json.Unmarshal(body, &u.DeviceApprovalsChangeDesktopPolicy) if err != nil { return err } case "device_approvals_change_mobile_policy": err = json.Unmarshal(body, &u.DeviceApprovalsChangeMobilePolicy) if err != nil { return err } case "device_approvals_change_overage_action": err = json.Unmarshal(body, &u.DeviceApprovalsChangeOverageAction) if err != nil { return err } case "device_approvals_change_unlink_action": err = json.Unmarshal(body, &u.DeviceApprovalsChangeUnlinkAction) if err != nil { return err } case "directory_restrictions_add_members": err = json.Unmarshal(body, &u.DirectoryRestrictionsAddMembers) if err != nil { return err } case "directory_restrictions_remove_members": err = json.Unmarshal(body, &u.DirectoryRestrictionsRemoveMembers) if err != nil { return err } case "emm_add_exception": err = json.Unmarshal(body, &u.EmmAddException) if err != nil { return err } case "emm_change_policy": err = json.Unmarshal(body, &u.EmmChangePolicy) if err != nil { return err } case "emm_remove_exception": err = json.Unmarshal(body, &u.EmmRemoveException) if err != nil { return err } case "extended_version_history_change_policy": err = json.Unmarshal(body, &u.ExtendedVersionHistoryChangePolicy) if err != nil { return err } case "file_comments_change_policy": err = json.Unmarshal(body, &u.FileCommentsChangePolicy) if err != nil { return err } case "file_requests_change_policy": err = json.Unmarshal(body, &u.FileRequestsChangePolicy) if err != nil { return err } case "file_requests_emails_enabled": err = json.Unmarshal(body, &u.FileRequestsEmailsEnabled) if err != nil { return err } case "file_requests_emails_restricted_to_team_only": err = json.Unmarshal(body, &u.FileRequestsEmailsRestrictedToTeamOnly) if err != nil { return err } case "google_sso_change_policy": err = json.Unmarshal(body, &u.GoogleSsoChangePolicy) if err != nil { return err } case "group_user_management_change_policy": err = json.Unmarshal(body, &u.GroupUserManagementChangePolicy) if err != nil { return err } case "member_requests_change_policy": err = json.Unmarshal(body, &u.MemberRequestsChangePolicy) if err != nil { return err } case "member_space_limits_add_exception": err = json.Unmarshal(body, &u.MemberSpaceLimitsAddException) if err != nil { return err } case "member_space_limits_change_caps_type_policy": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangeCapsTypePolicy) if err != nil { return err } case "member_space_limits_change_policy": err = json.Unmarshal(body, &u.MemberSpaceLimitsChangePolicy) if err != nil { return err } case "member_space_limits_remove_exception": err = json.Unmarshal(body, &u.MemberSpaceLimitsRemoveException) if err != nil { return err } case "member_suggestions_change_policy": err = json.Unmarshal(body, &u.MemberSuggestionsChangePolicy) if err != nil { return err } case "microsoft_office_addin_change_policy": err = json.Unmarshal(body, &u.MicrosoftOfficeAddinChangePolicy) if err != nil { return err } case "network_control_change_policy": err = json.Unmarshal(body, &u.NetworkControlChangePolicy) if err != nil { return err } case "paper_change_deployment_policy": err = json.Unmarshal(body, &u.PaperChangeDeploymentPolicy) if err != nil { return err } case "paper_change_member_link_policy": err = json.Unmarshal(body, &u.PaperChangeMemberLinkPolicy) if err != nil { return err } case "paper_change_member_policy": err = json.Unmarshal(body, &u.PaperChangeMemberPolicy) if err != nil { return err } case "paper_change_policy": err = json.Unmarshal(body, &u.PaperChangePolicy) if err != nil { return err } case "paper_enabled_users_group_addition": err = json.Unmarshal(body, &u.PaperEnabledUsersGroupAddition) if err != nil { return err } case "paper_enabled_users_group_removal": err = json.Unmarshal(body, &u.PaperEnabledUsersGroupRemoval) if err != nil { return err } case "permanent_delete_change_policy": err = json.Unmarshal(body, &u.PermanentDeleteChangePolicy) if err != nil { return err } case "sharing_change_folder_join_policy": err = json.Unmarshal(body, &u.SharingChangeFolderJoinPolicy) if err != nil { return err } case "sharing_change_link_policy": err = json.Unmarshal(body, &u.SharingChangeLinkPolicy) if err != nil { return err } case "sharing_change_member_policy": err = json.Unmarshal(body, &u.SharingChangeMemberPolicy) if err != nil { return err } case "showcase_change_download_policy": err = json.Unmarshal(body, &u.ShowcaseChangeDownloadPolicy) if err != nil { return err } case "showcase_change_enabled_policy": err = json.Unmarshal(body, &u.ShowcaseChangeEnabledPolicy) if err != nil { return err } case "showcase_change_external_sharing_policy": err = json.Unmarshal(body, &u.ShowcaseChangeExternalSharingPolicy) if err != nil { return err } case "smart_sync_change_policy": err = json.Unmarshal(body, &u.SmartSyncChangePolicy) if err != nil { return err } case "smart_sync_not_opt_out": err = json.Unmarshal(body, &u.SmartSyncNotOptOut) if err != nil { return err } case "smart_sync_opt_out": err = json.Unmarshal(body, &u.SmartSyncOptOut) if err != nil { return err } case "sso_change_policy": err = json.Unmarshal(body, &u.SsoChangePolicy) if err != nil { return err } case "team_selective_sync_policy_changed": err = json.Unmarshal(body, &u.TeamSelectiveSyncPolicyChanged) if err != nil { return err } case "tfa_change_policy": err = json.Unmarshal(body, &u.TfaChangePolicy) if err != nil { return err } case "two_account_change_policy": err = json.Unmarshal(body, &u.TwoAccountChangePolicy) if err != nil { return err } case "viewer_info_policy_changed": err = json.Unmarshal(body, &u.ViewerInfoPolicyChanged) if err != nil { return err } case "web_sessions_change_fixed_length_policy": err = json.Unmarshal(body, &u.WebSessionsChangeFixedLengthPolicy) if err != nil { return err } case "web_sessions_change_idle_length_policy": err = json.Unmarshal(body, &u.WebSessionsChangeIdleLengthPolicy) if err != nil { return err } case "team_merge_from": err = json.Unmarshal(body, &u.TeamMergeFrom) if err != nil { return err } case "team_merge_to": err = json.Unmarshal(body, &u.TeamMergeTo) if err != nil { return err } case "team_profile_add_logo": err = json.Unmarshal(body, &u.TeamProfileAddLogo) if err != nil { return err } case "team_profile_change_default_language": err = json.Unmarshal(body, &u.TeamProfileChangeDefaultLanguage) if err != nil { return err } case "team_profile_change_logo": err = json.Unmarshal(body, &u.TeamProfileChangeLogo) if err != nil { return err } case "team_profile_change_name": err = json.Unmarshal(body, &u.TeamProfileChangeName) if err != nil { return err } case "team_profile_remove_logo": err = json.Unmarshal(body, &u.TeamProfileRemoveLogo) if err != nil { return err } case "tfa_add_backup_phone": err = json.Unmarshal(body, &u.TfaAddBackupPhone) if err != nil { return err } case "tfa_add_security_key": err = json.Unmarshal(body, &u.TfaAddSecurityKey) if err != nil { return err } case "tfa_change_backup_phone": err = json.Unmarshal(body, &u.TfaChangeBackupPhone) if err != nil { return err } case "tfa_change_status": err = json.Unmarshal(body, &u.TfaChangeStatus) if err != nil { return err } case "tfa_remove_backup_phone": err = json.Unmarshal(body, &u.TfaRemoveBackupPhone) if err != nil { return err } case "tfa_remove_security_key": err = json.Unmarshal(body, &u.TfaRemoveSecurityKey) if err != nil { return err } case "tfa_reset": err = json.Unmarshal(body, &u.TfaReset) if err != nil { return err } } return nil } // ExportMembersReportDetails : Created member data report. type ExportMembersReportDetails struct { } // NewExportMembersReportDetails returns a new ExportMembersReportDetails instance func NewExportMembersReportDetails() *ExportMembersReportDetails { s := new(ExportMembersReportDetails) return s } // ExportMembersReportType : has no documentation (yet) type ExportMembersReportType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewExportMembersReportType returns a new ExportMembersReportType instance func NewExportMembersReportType(Description string) *ExportMembersReportType { s := new(ExportMembersReportType) s.Description = Description return s } // ExtendedVersionHistoryChangePolicyDetails : Accepted/opted out of extended // version history. type ExtendedVersionHistoryChangePolicyDetails struct { // NewValue : New extended version history policy. NewValue *ExtendedVersionHistoryPolicy `json:"new_value"` // PreviousValue : Previous extended version history policy. Might be // missing due to historical data gap. PreviousValue *ExtendedVersionHistoryPolicy `json:"previous_value,omitempty"` } // NewExtendedVersionHistoryChangePolicyDetails returns a new ExtendedVersionHistoryChangePolicyDetails instance func NewExtendedVersionHistoryChangePolicyDetails(NewValue *ExtendedVersionHistoryPolicy) *ExtendedVersionHistoryChangePolicyDetails { s := new(ExtendedVersionHistoryChangePolicyDetails) s.NewValue = NewValue return s } // ExtendedVersionHistoryChangePolicyType : has no documentation (yet) type ExtendedVersionHistoryChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewExtendedVersionHistoryChangePolicyType returns a new ExtendedVersionHistoryChangePolicyType instance func NewExtendedVersionHistoryChangePolicyType(Description string) *ExtendedVersionHistoryChangePolicyType { s := new(ExtendedVersionHistoryChangePolicyType) s.Description = Description return s } // ExtendedVersionHistoryPolicy : has no documentation (yet) type ExtendedVersionHistoryPolicy struct { dropbox.Tagged } // Valid tag values for ExtendedVersionHistoryPolicy const ( ExtendedVersionHistoryPolicyExplicitlyLimited = "explicitly_limited" ExtendedVersionHistoryPolicyExplicitlyUnlimited = "explicitly_unlimited" ExtendedVersionHistoryPolicyImplicitlyLimited = "implicitly_limited" ExtendedVersionHistoryPolicyImplicitlyUnlimited = "implicitly_unlimited" ExtendedVersionHistoryPolicyOther = "other" ) // ExternalUserLogInfo : A user without a Dropbox account. type ExternalUserLogInfo struct { // UserIdentifier : An external user identifier. UserIdentifier string `json:"user_identifier"` // IdentifierType : Identifier type. IdentifierType *IdentifierType `json:"identifier_type"` } // NewExternalUserLogInfo returns a new ExternalUserLogInfo instance func NewExternalUserLogInfo(UserIdentifier string, IdentifierType *IdentifierType) *ExternalUserLogInfo { s := new(ExternalUserLogInfo) s.UserIdentifier = UserIdentifier s.IdentifierType = IdentifierType return s } // FailureDetailsLogInfo : Provides details about a failure type FailureDetailsLogInfo struct { // UserFriendlyMessage : A user friendly explanation of the error. Might be // missing due to historical data gap. UserFriendlyMessage string `json:"user_friendly_message,omitempty"` // TechnicalErrorMessage : A technical explanation of the error. This is // relevant for some errors. TechnicalErrorMessage string `json:"technical_error_message,omitempty"` } // NewFailureDetailsLogInfo returns a new FailureDetailsLogInfo instance func NewFailureDetailsLogInfo() *FailureDetailsLogInfo { s := new(FailureDetailsLogInfo) return s } // FileAddCommentDetails : Added file comment. type FileAddCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileAddCommentDetails returns a new FileAddCommentDetails instance func NewFileAddCommentDetails() *FileAddCommentDetails { s := new(FileAddCommentDetails) return s } // FileAddCommentType : has no documentation (yet) type FileAddCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileAddCommentType returns a new FileAddCommentType instance func NewFileAddCommentType(Description string) *FileAddCommentType { s := new(FileAddCommentType) s.Description = Description return s } // FileAddDetails : Added files and/or folders. type FileAddDetails struct { } // NewFileAddDetails returns a new FileAddDetails instance func NewFileAddDetails() *FileAddDetails { s := new(FileAddDetails) return s } // FileAddType : has no documentation (yet) type FileAddType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileAddType returns a new FileAddType instance func NewFileAddType(Description string) *FileAddType { s := new(FileAddType) s.Description = Description return s } // FileChangeCommentSubscriptionDetails : Subscribed to or unsubscribed from // comment notifications for file. type FileChangeCommentSubscriptionDetails struct { // NewValue : New file comment subscription. NewValue *FileCommentNotificationPolicy `json:"new_value"` // PreviousValue : Previous file comment subscription. Might be missing due // to historical data gap. PreviousValue *FileCommentNotificationPolicy `json:"previous_value,omitempty"` } // NewFileChangeCommentSubscriptionDetails returns a new FileChangeCommentSubscriptionDetails instance func NewFileChangeCommentSubscriptionDetails(NewValue *FileCommentNotificationPolicy) *FileChangeCommentSubscriptionDetails { s := new(FileChangeCommentSubscriptionDetails) s.NewValue = NewValue return s } // FileChangeCommentSubscriptionType : has no documentation (yet) type FileChangeCommentSubscriptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileChangeCommentSubscriptionType returns a new FileChangeCommentSubscriptionType instance func NewFileChangeCommentSubscriptionType(Description string) *FileChangeCommentSubscriptionType { s := new(FileChangeCommentSubscriptionType) s.Description = Description return s } // FileCommentNotificationPolicy : Enable or disable file comments notifications type FileCommentNotificationPolicy struct { dropbox.Tagged } // Valid tag values for FileCommentNotificationPolicy const ( FileCommentNotificationPolicyDisabled = "disabled" FileCommentNotificationPolicyEnabled = "enabled" FileCommentNotificationPolicyOther = "other" ) // FileCommentsChangePolicyDetails : Enabled/disabled commenting on team files. type FileCommentsChangePolicyDetails struct { // NewValue : New commenting on team files policy. NewValue *FileCommentsPolicy `json:"new_value"` // PreviousValue : Previous commenting on team files policy. Might be // missing due to historical data gap. PreviousValue *FileCommentsPolicy `json:"previous_value,omitempty"` } // NewFileCommentsChangePolicyDetails returns a new FileCommentsChangePolicyDetails instance func NewFileCommentsChangePolicyDetails(NewValue *FileCommentsPolicy) *FileCommentsChangePolicyDetails { s := new(FileCommentsChangePolicyDetails) s.NewValue = NewValue return s } // FileCommentsChangePolicyType : has no documentation (yet) type FileCommentsChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileCommentsChangePolicyType returns a new FileCommentsChangePolicyType instance func NewFileCommentsChangePolicyType(Description string) *FileCommentsChangePolicyType { s := new(FileCommentsChangePolicyType) s.Description = Description return s } // FileCommentsPolicy : File comments policy type FileCommentsPolicy struct { dropbox.Tagged } // Valid tag values for FileCommentsPolicy const ( FileCommentsPolicyDisabled = "disabled" FileCommentsPolicyEnabled = "enabled" FileCommentsPolicyOther = "other" ) // FileCopyDetails : Copied files and/or folders. type FileCopyDetails struct { // RelocateActionDetails : Relocate action details. RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"` } // NewFileCopyDetails returns a new FileCopyDetails instance func NewFileCopyDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileCopyDetails { s := new(FileCopyDetails) s.RelocateActionDetails = RelocateActionDetails return s } // FileCopyType : has no documentation (yet) type FileCopyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileCopyType returns a new FileCopyType instance func NewFileCopyType(Description string) *FileCopyType { s := new(FileCopyType) s.Description = Description return s } // FileDeleteCommentDetails : Deleted file comment. type FileDeleteCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileDeleteCommentDetails returns a new FileDeleteCommentDetails instance func NewFileDeleteCommentDetails() *FileDeleteCommentDetails { s := new(FileDeleteCommentDetails) return s } // FileDeleteCommentType : has no documentation (yet) type FileDeleteCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileDeleteCommentType returns a new FileDeleteCommentType instance func NewFileDeleteCommentType(Description string) *FileDeleteCommentType { s := new(FileDeleteCommentType) s.Description = Description return s } // FileDeleteDetails : Deleted files and/or folders. type FileDeleteDetails struct { } // NewFileDeleteDetails returns a new FileDeleteDetails instance func NewFileDeleteDetails() *FileDeleteDetails { s := new(FileDeleteDetails) return s } // FileDeleteType : has no documentation (yet) type FileDeleteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileDeleteType returns a new FileDeleteType instance func NewFileDeleteType(Description string) *FileDeleteType { s := new(FileDeleteType) s.Description = Description return s } // FileDownloadDetails : Downloaded files and/or folders. type FileDownloadDetails struct { } // NewFileDownloadDetails returns a new FileDownloadDetails instance func NewFileDownloadDetails() *FileDownloadDetails { s := new(FileDownloadDetails) return s } // FileDownloadType : has no documentation (yet) type FileDownloadType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileDownloadType returns a new FileDownloadType instance func NewFileDownloadType(Description string) *FileDownloadType { s := new(FileDownloadType) s.Description = Description return s } // FileEditCommentDetails : Edited file comment. type FileEditCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` // PreviousCommentText : Previous comment text. PreviousCommentText string `json:"previous_comment_text"` } // NewFileEditCommentDetails returns a new FileEditCommentDetails instance func NewFileEditCommentDetails(PreviousCommentText string) *FileEditCommentDetails { s := new(FileEditCommentDetails) s.PreviousCommentText = PreviousCommentText return s } // FileEditCommentType : has no documentation (yet) type FileEditCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileEditCommentType returns a new FileEditCommentType instance func NewFileEditCommentType(Description string) *FileEditCommentType { s := new(FileEditCommentType) s.Description = Description return s } // FileEditDetails : Edited files. type FileEditDetails struct { } // NewFileEditDetails returns a new FileEditDetails instance func NewFileEditDetails() *FileEditDetails { s := new(FileEditDetails) return s } // FileEditType : has no documentation (yet) type FileEditType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileEditType returns a new FileEditType instance func NewFileEditType(Description string) *FileEditType { s := new(FileEditType) s.Description = Description return s } // FileGetCopyReferenceDetails : Created copy reference to file/folder. type FileGetCopyReferenceDetails struct { } // NewFileGetCopyReferenceDetails returns a new FileGetCopyReferenceDetails instance func NewFileGetCopyReferenceDetails() *FileGetCopyReferenceDetails { s := new(FileGetCopyReferenceDetails) return s } // FileGetCopyReferenceType : has no documentation (yet) type FileGetCopyReferenceType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileGetCopyReferenceType returns a new FileGetCopyReferenceType instance func NewFileGetCopyReferenceType(Description string) *FileGetCopyReferenceType { s := new(FileGetCopyReferenceType) s.Description = Description return s } // FileLikeCommentDetails : Liked file comment. type FileLikeCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileLikeCommentDetails returns a new FileLikeCommentDetails instance func NewFileLikeCommentDetails() *FileLikeCommentDetails { s := new(FileLikeCommentDetails) return s } // FileLikeCommentType : has no documentation (yet) type FileLikeCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileLikeCommentType returns a new FileLikeCommentType instance func NewFileLikeCommentType(Description string) *FileLikeCommentType { s := new(FileLikeCommentType) s.Description = Description return s } // FileOrFolderLogInfo : Generic information relevant both for files and folders type FileOrFolderLogInfo struct { // Path : Path relative to event context. Path *PathLogInfo `json:"path"` // DisplayName : Display name. Might be missing due to historical data gap. DisplayName string `json:"display_name,omitempty"` // FileId : Unique ID. Might be missing due to historical data gap. FileId string `json:"file_id,omitempty"` } // NewFileOrFolderLogInfo returns a new FileOrFolderLogInfo instance func NewFileOrFolderLogInfo(Path *PathLogInfo) *FileOrFolderLogInfo { s := new(FileOrFolderLogInfo) s.Path = Path return s } // FileLogInfo : File's logged information. type FileLogInfo struct { FileOrFolderLogInfo } // NewFileLogInfo returns a new FileLogInfo instance func NewFileLogInfo(Path *PathLogInfo) *FileLogInfo { s := new(FileLogInfo) s.Path = Path return s } // FileMoveDetails : Moved files and/or folders. type FileMoveDetails struct { // RelocateActionDetails : Relocate action details. RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"` } // NewFileMoveDetails returns a new FileMoveDetails instance func NewFileMoveDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileMoveDetails { s := new(FileMoveDetails) s.RelocateActionDetails = RelocateActionDetails return s } // FileMoveType : has no documentation (yet) type FileMoveType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileMoveType returns a new FileMoveType instance func NewFileMoveType(Description string) *FileMoveType { s := new(FileMoveType) s.Description = Description return s } // FilePermanentlyDeleteDetails : Permanently deleted files and/or folders. type FilePermanentlyDeleteDetails struct { } // NewFilePermanentlyDeleteDetails returns a new FilePermanentlyDeleteDetails instance func NewFilePermanentlyDeleteDetails() *FilePermanentlyDeleteDetails { s := new(FilePermanentlyDeleteDetails) return s } // FilePermanentlyDeleteType : has no documentation (yet) type FilePermanentlyDeleteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFilePermanentlyDeleteType returns a new FilePermanentlyDeleteType instance func NewFilePermanentlyDeleteType(Description string) *FilePermanentlyDeleteType { s := new(FilePermanentlyDeleteType) s.Description = Description return s } // FilePreviewDetails : Previewed files and/or folders. type FilePreviewDetails struct { } // NewFilePreviewDetails returns a new FilePreviewDetails instance func NewFilePreviewDetails() *FilePreviewDetails { s := new(FilePreviewDetails) return s } // FilePreviewType : has no documentation (yet) type FilePreviewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFilePreviewType returns a new FilePreviewType instance func NewFilePreviewType(Description string) *FilePreviewType { s := new(FilePreviewType) s.Description = Description return s } // FileRenameDetails : Renamed files and/or folders. type FileRenameDetails struct { // RelocateActionDetails : Relocate action details. RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"` } // NewFileRenameDetails returns a new FileRenameDetails instance func NewFileRenameDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileRenameDetails { s := new(FileRenameDetails) s.RelocateActionDetails = RelocateActionDetails return s } // FileRenameType : has no documentation (yet) type FileRenameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRenameType returns a new FileRenameType instance func NewFileRenameType(Description string) *FileRenameType { s := new(FileRenameType) s.Description = Description return s } // FileRequestChangeDetails : Changed file request. type FileRequestChangeDetails struct { // FileRequestId : File request id. Might be missing due to historical data // gap. FileRequestId string `json:"file_request_id,omitempty"` // PreviousDetails : Previous file request details. Might be missing due to // historical data gap. PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"` // NewDetails : New file request details. NewDetails *FileRequestDetails `json:"new_details"` } // NewFileRequestChangeDetails returns a new FileRequestChangeDetails instance func NewFileRequestChangeDetails(NewDetails *FileRequestDetails) *FileRequestChangeDetails { s := new(FileRequestChangeDetails) s.NewDetails = NewDetails return s } // FileRequestChangeType : has no documentation (yet) type FileRequestChangeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestChangeType returns a new FileRequestChangeType instance func NewFileRequestChangeType(Description string) *FileRequestChangeType { s := new(FileRequestChangeType) s.Description = Description return s } // FileRequestCloseDetails : Closed file request. type FileRequestCloseDetails struct { // FileRequestId : File request id. Might be missing due to historical data // gap. FileRequestId string `json:"file_request_id,omitempty"` // PreviousDetails : Previous file request details. Might be missing due to // historical data gap. PreviousDetails *FileRequestDetails `json:"previous_details,omitempty"` } // NewFileRequestCloseDetails returns a new FileRequestCloseDetails instance func NewFileRequestCloseDetails() *FileRequestCloseDetails { s := new(FileRequestCloseDetails) return s } // FileRequestCloseType : has no documentation (yet) type FileRequestCloseType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestCloseType returns a new FileRequestCloseType instance func NewFileRequestCloseType(Description string) *FileRequestCloseType { s := new(FileRequestCloseType) s.Description = Description return s } // FileRequestCreateDetails : Created file request. type FileRequestCreateDetails struct { // FileRequestId : File request id. Might be missing due to historical data // gap. FileRequestId string `json:"file_request_id,omitempty"` // RequestDetails : File request details. Might be missing due to historical // data gap. RequestDetails *FileRequestDetails `json:"request_details,omitempty"` } // NewFileRequestCreateDetails returns a new FileRequestCreateDetails instance func NewFileRequestCreateDetails() *FileRequestCreateDetails { s := new(FileRequestCreateDetails) return s } // FileRequestCreateType : has no documentation (yet) type FileRequestCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestCreateType returns a new FileRequestCreateType instance func NewFileRequestCreateType(Description string) *FileRequestCreateType { s := new(FileRequestCreateType) s.Description = Description return s } // FileRequestDeadline : File request deadline type FileRequestDeadline struct { // Deadline : The deadline for this file request. Might be missing due to // historical data gap. Deadline time.Time `json:"deadline,omitempty"` // AllowLateUploads : If set, allow uploads after the deadline has passed. // Might be missing due to historical data gap. AllowLateUploads string `json:"allow_late_uploads,omitempty"` } // NewFileRequestDeadline returns a new FileRequestDeadline instance func NewFileRequestDeadline() *FileRequestDeadline { s := new(FileRequestDeadline) return s } // FileRequestDetails : File request details type FileRequestDetails struct { // AssetIndex : Asset position in the Assets list. AssetIndex uint64 `json:"asset_index"` // Deadline : File request deadline. Might be missing due to historical data // gap. Deadline *FileRequestDeadline `json:"deadline,omitempty"` } // NewFileRequestDetails returns a new FileRequestDetails instance func NewFileRequestDetails(AssetIndex uint64) *FileRequestDetails { s := new(FileRequestDetails) s.AssetIndex = AssetIndex return s } // FileRequestReceiveFileDetails : Received files for file request. type FileRequestReceiveFileDetails struct { // FileRequestId : File request id. Might be missing due to historical data // gap. FileRequestId string `json:"file_request_id,omitempty"` // FileRequestDetails : File request details. Might be missing due to // historical data gap. FileRequestDetails *FileRequestDetails `json:"file_request_details,omitempty"` // SubmittedFileNames : Submitted file names. SubmittedFileNames []string `json:"submitted_file_names"` // SubmitterName : The name as provided by the submitter. Might be missing // due to historical data gap. SubmitterName string `json:"submitter_name,omitempty"` // SubmitterEmail : The email as provided by the submitter. Might be missing // due to historical data gap. SubmitterEmail string `json:"submitter_email,omitempty"` } // NewFileRequestReceiveFileDetails returns a new FileRequestReceiveFileDetails instance func NewFileRequestReceiveFileDetails(SubmittedFileNames []string) *FileRequestReceiveFileDetails { s := new(FileRequestReceiveFileDetails) s.SubmittedFileNames = SubmittedFileNames return s } // FileRequestReceiveFileType : has no documentation (yet) type FileRequestReceiveFileType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestReceiveFileType returns a new FileRequestReceiveFileType instance func NewFileRequestReceiveFileType(Description string) *FileRequestReceiveFileType { s := new(FileRequestReceiveFileType) s.Description = Description return s } // FileRequestsChangePolicyDetails : Enabled/disabled file requests. type FileRequestsChangePolicyDetails struct { // NewValue : New file requests policy. NewValue *FileRequestsPolicy `json:"new_value"` // PreviousValue : Previous file requests policy. Might be missing due to // historical data gap. PreviousValue *FileRequestsPolicy `json:"previous_value,omitempty"` } // NewFileRequestsChangePolicyDetails returns a new FileRequestsChangePolicyDetails instance func NewFileRequestsChangePolicyDetails(NewValue *FileRequestsPolicy) *FileRequestsChangePolicyDetails { s := new(FileRequestsChangePolicyDetails) s.NewValue = NewValue return s } // FileRequestsChangePolicyType : has no documentation (yet) type FileRequestsChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestsChangePolicyType returns a new FileRequestsChangePolicyType instance func NewFileRequestsChangePolicyType(Description string) *FileRequestsChangePolicyType { s := new(FileRequestsChangePolicyType) s.Description = Description return s } // FileRequestsEmailsEnabledDetails : Enabled file request emails for everyone. type FileRequestsEmailsEnabledDetails struct { } // NewFileRequestsEmailsEnabledDetails returns a new FileRequestsEmailsEnabledDetails instance func NewFileRequestsEmailsEnabledDetails() *FileRequestsEmailsEnabledDetails { s := new(FileRequestsEmailsEnabledDetails) return s } // FileRequestsEmailsEnabledType : has no documentation (yet) type FileRequestsEmailsEnabledType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestsEmailsEnabledType returns a new FileRequestsEmailsEnabledType instance func NewFileRequestsEmailsEnabledType(Description string) *FileRequestsEmailsEnabledType { s := new(FileRequestsEmailsEnabledType) s.Description = Description return s } // FileRequestsEmailsRestrictedToTeamOnlyDetails : Enabled file request emails // for team. type FileRequestsEmailsRestrictedToTeamOnlyDetails struct { } // NewFileRequestsEmailsRestrictedToTeamOnlyDetails returns a new FileRequestsEmailsRestrictedToTeamOnlyDetails instance func NewFileRequestsEmailsRestrictedToTeamOnlyDetails() *FileRequestsEmailsRestrictedToTeamOnlyDetails { s := new(FileRequestsEmailsRestrictedToTeamOnlyDetails) return s } // FileRequestsEmailsRestrictedToTeamOnlyType : has no documentation (yet) type FileRequestsEmailsRestrictedToTeamOnlyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRequestsEmailsRestrictedToTeamOnlyType returns a new FileRequestsEmailsRestrictedToTeamOnlyType instance func NewFileRequestsEmailsRestrictedToTeamOnlyType(Description string) *FileRequestsEmailsRestrictedToTeamOnlyType { s := new(FileRequestsEmailsRestrictedToTeamOnlyType) s.Description = Description return s } // FileRequestsPolicy : File requests policy type FileRequestsPolicy struct { dropbox.Tagged } // Valid tag values for FileRequestsPolicy const ( FileRequestsPolicyDisabled = "disabled" FileRequestsPolicyEnabled = "enabled" FileRequestsPolicyOther = "other" ) // FileResolveCommentDetails : Resolved file comment. type FileResolveCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileResolveCommentDetails returns a new FileResolveCommentDetails instance func NewFileResolveCommentDetails() *FileResolveCommentDetails { s := new(FileResolveCommentDetails) return s } // FileResolveCommentType : has no documentation (yet) type FileResolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileResolveCommentType returns a new FileResolveCommentType instance func NewFileResolveCommentType(Description string) *FileResolveCommentType { s := new(FileResolveCommentType) s.Description = Description return s } // FileRestoreDetails : Restored deleted files and/or folders. type FileRestoreDetails struct { } // NewFileRestoreDetails returns a new FileRestoreDetails instance func NewFileRestoreDetails() *FileRestoreDetails { s := new(FileRestoreDetails) return s } // FileRestoreType : has no documentation (yet) type FileRestoreType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRestoreType returns a new FileRestoreType instance func NewFileRestoreType(Description string) *FileRestoreType { s := new(FileRestoreType) s.Description = Description return s } // FileRevertDetails : Reverted files to previous version. type FileRevertDetails struct { } // NewFileRevertDetails returns a new FileRevertDetails instance func NewFileRevertDetails() *FileRevertDetails { s := new(FileRevertDetails) return s } // FileRevertType : has no documentation (yet) type FileRevertType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRevertType returns a new FileRevertType instance func NewFileRevertType(Description string) *FileRevertType { s := new(FileRevertType) s.Description = Description return s } // FileRollbackChangesDetails : Rolled back file actions. type FileRollbackChangesDetails struct { } // NewFileRollbackChangesDetails returns a new FileRollbackChangesDetails instance func NewFileRollbackChangesDetails() *FileRollbackChangesDetails { s := new(FileRollbackChangesDetails) return s } // FileRollbackChangesType : has no documentation (yet) type FileRollbackChangesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileRollbackChangesType returns a new FileRollbackChangesType instance func NewFileRollbackChangesType(Description string) *FileRollbackChangesType { s := new(FileRollbackChangesType) s.Description = Description return s } // FileSaveCopyReferenceDetails : Saved file/folder using copy reference. type FileSaveCopyReferenceDetails struct { // RelocateActionDetails : Relocate action details. RelocateActionDetails []*RelocateAssetReferencesLogInfo `json:"relocate_action_details"` } // NewFileSaveCopyReferenceDetails returns a new FileSaveCopyReferenceDetails instance func NewFileSaveCopyReferenceDetails(RelocateActionDetails []*RelocateAssetReferencesLogInfo) *FileSaveCopyReferenceDetails { s := new(FileSaveCopyReferenceDetails) s.RelocateActionDetails = RelocateActionDetails return s } // FileSaveCopyReferenceType : has no documentation (yet) type FileSaveCopyReferenceType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileSaveCopyReferenceType returns a new FileSaveCopyReferenceType instance func NewFileSaveCopyReferenceType(Description string) *FileSaveCopyReferenceType { s := new(FileSaveCopyReferenceType) s.Description = Description return s } // FileUnlikeCommentDetails : Unliked file comment. type FileUnlikeCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileUnlikeCommentDetails returns a new FileUnlikeCommentDetails instance func NewFileUnlikeCommentDetails() *FileUnlikeCommentDetails { s := new(FileUnlikeCommentDetails) return s } // FileUnlikeCommentType : has no documentation (yet) type FileUnlikeCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileUnlikeCommentType returns a new FileUnlikeCommentType instance func NewFileUnlikeCommentType(Description string) *FileUnlikeCommentType { s := new(FileUnlikeCommentType) s.Description = Description return s } // FileUnresolveCommentDetails : Unresolved file comment. type FileUnresolveCommentDetails struct { // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewFileUnresolveCommentDetails returns a new FileUnresolveCommentDetails instance func NewFileUnresolveCommentDetails() *FileUnresolveCommentDetails { s := new(FileUnresolveCommentDetails) return s } // FileUnresolveCommentType : has no documentation (yet) type FileUnresolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewFileUnresolveCommentType returns a new FileUnresolveCommentType instance func NewFileUnresolveCommentType(Description string) *FileUnresolveCommentType { s := new(FileUnresolveCommentType) s.Description = Description return s } // FolderLogInfo : Folder's logged information. type FolderLogInfo struct { FileOrFolderLogInfo } // NewFolderLogInfo returns a new FolderLogInfo instance func NewFolderLogInfo(Path *PathLogInfo) *FolderLogInfo { s := new(FolderLogInfo) s.Path = Path return s } // GeoLocationLogInfo : Geographic location details. type GeoLocationLogInfo struct { // City : City name. City string `json:"city,omitempty"` // Region : Region name. Region string `json:"region,omitempty"` // Country : Country code. Country string `json:"country,omitempty"` // IpAddress : IP address. IpAddress string `json:"ip_address"` } // NewGeoLocationLogInfo returns a new GeoLocationLogInfo instance func NewGeoLocationLogInfo(IpAddress string) *GeoLocationLogInfo { s := new(GeoLocationLogInfo) s.IpAddress = IpAddress return s } // GetTeamEventsArg : has no documentation (yet) type GetTeamEventsArg struct { // Limit : The maximal number of results to return per call. Note that some // calls may not return `limit` number of events, and may even return no // events, even with `has_more` set to true. In this case, callers should // fetch again using `getEventsContinue`. Limit uint32 `json:"limit"` // AccountId : Filter the events by account ID. Return ony events with this // account_id as either Actor, Context, or Participants. AccountId string `json:"account_id,omitempty"` // Time : Filter by time range. Time *team_common.TimeRange `json:"time,omitempty"` // Category : Filter the returned events to a single category. Category *EventCategory `json:"category,omitempty"` } // NewGetTeamEventsArg returns a new GetTeamEventsArg instance func NewGetTeamEventsArg() *GetTeamEventsArg { s := new(GetTeamEventsArg) s.Limit = 1000 return s } // GetTeamEventsContinueArg : has no documentation (yet) type GetTeamEventsContinueArg struct { // Cursor : Indicates from what point to get the next set of events. Cursor string `json:"cursor"` } // NewGetTeamEventsContinueArg returns a new GetTeamEventsContinueArg instance func NewGetTeamEventsContinueArg(Cursor string) *GetTeamEventsContinueArg { s := new(GetTeamEventsContinueArg) s.Cursor = Cursor return s } // GetTeamEventsContinueError : Errors that can be raised when calling // `getEventsContinue`. type GetTeamEventsContinueError struct { dropbox.Tagged // Reset : Cursors are intended to be used quickly. Individual cursor values // are normally valid for days, but in rare cases may be reset sooner. // Cursor reset errors should be handled by fetching a new cursor from // `getEvents`. The associated value is the approximate timestamp of the // most recent event returned by the cursor. This should be used as a // resumption point when calling `getEvents` to obtain a new cursor. Reset time.Time `json:"reset,omitempty"` } // Valid tag values for GetTeamEventsContinueError const ( GetTeamEventsContinueErrorBadCursor = "bad_cursor" GetTeamEventsContinueErrorReset = "reset" GetTeamEventsContinueErrorOther = "other" ) // UnmarshalJSON deserializes into a GetTeamEventsContinueError instance func (u *GetTeamEventsContinueError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "reset": err = json.Unmarshal(body, &u.Reset) if err != nil { return err } } return nil } // GetTeamEventsError : Errors that can be raised when calling `getEvents`. type GetTeamEventsError struct { dropbox.Tagged } // Valid tag values for GetTeamEventsError const ( GetTeamEventsErrorAccountIdNotFound = "account_id_not_found" GetTeamEventsErrorInvalidTimeRange = "invalid_time_range" GetTeamEventsErrorOther = "other" ) // GetTeamEventsResult : has no documentation (yet) type GetTeamEventsResult struct { // Events : List of events. Note that events are not guaranteed to be sorted // by their timestamp value. Events []*TeamEvent `json:"events"` // Cursor : Pass the cursor into `getEventsContinue` to obtain additional // events. The value of `cursor` may change for each response from // `getEventsContinue`, regardless of the value of `has_more`; older cursor // strings may expire. Thus, callers should ensure that they update their // cursor based on the latest value of `cursor` after each call, and poll // regularly if they wish to poll for new events. Callers should handle // reset exceptions for expired cursors. Cursor string `json:"cursor"` // HasMore : Is true if there may be additional events that have not been // returned yet. An additional call to `getEventsContinue` can retrieve // them. Note that `has_more` may be true, even if `events` is empty. HasMore bool `json:"has_more"` } // NewGetTeamEventsResult returns a new GetTeamEventsResult instance func NewGetTeamEventsResult(Events []*TeamEvent, Cursor string, HasMore bool) *GetTeamEventsResult { s := new(GetTeamEventsResult) s.Events = Events s.Cursor = Cursor s.HasMore = HasMore return s } // GoogleSsoChangePolicyDetails : Enabled/disabled Google single sign-on for // team. type GoogleSsoChangePolicyDetails struct { // NewValue : New Google single sign-on policy. NewValue *GoogleSsoPolicy `json:"new_value"` // PreviousValue : Previous Google single sign-on policy. Might be missing // due to historical data gap. PreviousValue *GoogleSsoPolicy `json:"previous_value,omitempty"` } // NewGoogleSsoChangePolicyDetails returns a new GoogleSsoChangePolicyDetails instance func NewGoogleSsoChangePolicyDetails(NewValue *GoogleSsoPolicy) *GoogleSsoChangePolicyDetails { s := new(GoogleSsoChangePolicyDetails) s.NewValue = NewValue return s } // GoogleSsoChangePolicyType : has no documentation (yet) type GoogleSsoChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGoogleSsoChangePolicyType returns a new GoogleSsoChangePolicyType instance func NewGoogleSsoChangePolicyType(Description string) *GoogleSsoChangePolicyType { s := new(GoogleSsoChangePolicyType) s.Description = Description return s } // GoogleSsoPolicy : Google SSO policy type GoogleSsoPolicy struct { dropbox.Tagged } // Valid tag values for GoogleSsoPolicy const ( GoogleSsoPolicyDisabled = "disabled" GoogleSsoPolicyEnabled = "enabled" GoogleSsoPolicyOther = "other" ) // GroupAddExternalIdDetails : Added external ID for group. type GroupAddExternalIdDetails struct { // NewValue : Current external id. NewValue string `json:"new_value"` } // NewGroupAddExternalIdDetails returns a new GroupAddExternalIdDetails instance func NewGroupAddExternalIdDetails(NewValue string) *GroupAddExternalIdDetails { s := new(GroupAddExternalIdDetails) s.NewValue = NewValue return s } // GroupAddExternalIdType : has no documentation (yet) type GroupAddExternalIdType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupAddExternalIdType returns a new GroupAddExternalIdType instance func NewGroupAddExternalIdType(Description string) *GroupAddExternalIdType { s := new(GroupAddExternalIdType) s.Description = Description return s } // GroupAddMemberDetails : Added team members to group. type GroupAddMemberDetails struct { // IsGroupOwner : Is group owner. IsGroupOwner bool `json:"is_group_owner"` } // NewGroupAddMemberDetails returns a new GroupAddMemberDetails instance func NewGroupAddMemberDetails(IsGroupOwner bool) *GroupAddMemberDetails { s := new(GroupAddMemberDetails) s.IsGroupOwner = IsGroupOwner return s } // GroupAddMemberType : has no documentation (yet) type GroupAddMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupAddMemberType returns a new GroupAddMemberType instance func NewGroupAddMemberType(Description string) *GroupAddMemberType { s := new(GroupAddMemberType) s.Description = Description return s } // GroupChangeExternalIdDetails : Changed external ID for group. type GroupChangeExternalIdDetails struct { // NewValue : Current external id. NewValue string `json:"new_value"` // PreviousValue : Old external id. PreviousValue string `json:"previous_value"` } // NewGroupChangeExternalIdDetails returns a new GroupChangeExternalIdDetails instance func NewGroupChangeExternalIdDetails(NewValue string, PreviousValue string) *GroupChangeExternalIdDetails { s := new(GroupChangeExternalIdDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // GroupChangeExternalIdType : has no documentation (yet) type GroupChangeExternalIdType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupChangeExternalIdType returns a new GroupChangeExternalIdType instance func NewGroupChangeExternalIdType(Description string) *GroupChangeExternalIdType { s := new(GroupChangeExternalIdType) s.Description = Description return s } // GroupChangeManagementTypeDetails : Changed group management type. type GroupChangeManagementTypeDetails struct { // NewValue : New group management type. NewValue *team_common.GroupManagementType `json:"new_value"` // PreviousValue : Previous group management type. Might be missing due to // historical data gap. PreviousValue *team_common.GroupManagementType `json:"previous_value,omitempty"` } // NewGroupChangeManagementTypeDetails returns a new GroupChangeManagementTypeDetails instance func NewGroupChangeManagementTypeDetails(NewValue *team_common.GroupManagementType) *GroupChangeManagementTypeDetails { s := new(GroupChangeManagementTypeDetails) s.NewValue = NewValue return s } // GroupChangeManagementTypeType : has no documentation (yet) type GroupChangeManagementTypeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupChangeManagementTypeType returns a new GroupChangeManagementTypeType instance func NewGroupChangeManagementTypeType(Description string) *GroupChangeManagementTypeType { s := new(GroupChangeManagementTypeType) s.Description = Description return s } // GroupChangeMemberRoleDetails : Changed manager permissions of group member. type GroupChangeMemberRoleDetails struct { // IsGroupOwner : Is group owner. IsGroupOwner bool `json:"is_group_owner"` } // NewGroupChangeMemberRoleDetails returns a new GroupChangeMemberRoleDetails instance func NewGroupChangeMemberRoleDetails(IsGroupOwner bool) *GroupChangeMemberRoleDetails { s := new(GroupChangeMemberRoleDetails) s.IsGroupOwner = IsGroupOwner return s } // GroupChangeMemberRoleType : has no documentation (yet) type GroupChangeMemberRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupChangeMemberRoleType returns a new GroupChangeMemberRoleType instance func NewGroupChangeMemberRoleType(Description string) *GroupChangeMemberRoleType { s := new(GroupChangeMemberRoleType) s.Description = Description return s } // GroupCreateDetails : Created group. type GroupCreateDetails struct { // IsCompanyManaged : Is company managed group. Might be missing due to // historical data gap. IsCompanyManaged bool `json:"is_company_managed,omitempty"` // JoinPolicy : Group join policy. JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"` } // NewGroupCreateDetails returns a new GroupCreateDetails instance func NewGroupCreateDetails() *GroupCreateDetails { s := new(GroupCreateDetails) return s } // GroupCreateType : has no documentation (yet) type GroupCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupCreateType returns a new GroupCreateType instance func NewGroupCreateType(Description string) *GroupCreateType { s := new(GroupCreateType) s.Description = Description return s } // GroupDeleteDetails : Deleted group. type GroupDeleteDetails struct { // IsCompanyManaged : Is company managed group. Might be missing due to // historical data gap. IsCompanyManaged bool `json:"is_company_managed,omitempty"` } // NewGroupDeleteDetails returns a new GroupDeleteDetails instance func NewGroupDeleteDetails() *GroupDeleteDetails { s := new(GroupDeleteDetails) return s } // GroupDeleteType : has no documentation (yet) type GroupDeleteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupDeleteType returns a new GroupDeleteType instance func NewGroupDeleteType(Description string) *GroupDeleteType { s := new(GroupDeleteType) s.Description = Description return s } // GroupDescriptionUpdatedDetails : Updated group. type GroupDescriptionUpdatedDetails struct { } // NewGroupDescriptionUpdatedDetails returns a new GroupDescriptionUpdatedDetails instance func NewGroupDescriptionUpdatedDetails() *GroupDescriptionUpdatedDetails { s := new(GroupDescriptionUpdatedDetails) return s } // GroupDescriptionUpdatedType : has no documentation (yet) type GroupDescriptionUpdatedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupDescriptionUpdatedType returns a new GroupDescriptionUpdatedType instance func NewGroupDescriptionUpdatedType(Description string) *GroupDescriptionUpdatedType { s := new(GroupDescriptionUpdatedType) s.Description = Description return s } // GroupJoinPolicy : has no documentation (yet) type GroupJoinPolicy struct { dropbox.Tagged } // Valid tag values for GroupJoinPolicy const ( GroupJoinPolicyOpen = "open" GroupJoinPolicyRequestToJoin = "request_to_join" GroupJoinPolicyOther = "other" ) // GroupJoinPolicyUpdatedDetails : Updated group join policy. type GroupJoinPolicyUpdatedDetails struct { // IsCompanyManaged : Is company managed group. Might be missing due to // historical data gap. IsCompanyManaged bool `json:"is_company_managed,omitempty"` // JoinPolicy : Group join policy. JoinPolicy *GroupJoinPolicy `json:"join_policy,omitempty"` } // NewGroupJoinPolicyUpdatedDetails returns a new GroupJoinPolicyUpdatedDetails instance func NewGroupJoinPolicyUpdatedDetails() *GroupJoinPolicyUpdatedDetails { s := new(GroupJoinPolicyUpdatedDetails) return s } // GroupJoinPolicyUpdatedType : has no documentation (yet) type GroupJoinPolicyUpdatedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupJoinPolicyUpdatedType returns a new GroupJoinPolicyUpdatedType instance func NewGroupJoinPolicyUpdatedType(Description string) *GroupJoinPolicyUpdatedType { s := new(GroupJoinPolicyUpdatedType) s.Description = Description return s } // GroupLogInfo : Group's logged information. type GroupLogInfo struct { // GroupId : The unique id of this group. Might be missing due to historical // data gap. GroupId string `json:"group_id,omitempty"` // DisplayName : The name of this group. DisplayName string `json:"display_name"` // ExternalId : External group ID. Might be missing due to historical data // gap. ExternalId string `json:"external_id,omitempty"` } // NewGroupLogInfo returns a new GroupLogInfo instance func NewGroupLogInfo(DisplayName string) *GroupLogInfo { s := new(GroupLogInfo) s.DisplayName = DisplayName return s } // GroupMovedDetails : Moved group. type GroupMovedDetails struct { } // NewGroupMovedDetails returns a new GroupMovedDetails instance func NewGroupMovedDetails() *GroupMovedDetails { s := new(GroupMovedDetails) return s } // GroupMovedType : has no documentation (yet) type GroupMovedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupMovedType returns a new GroupMovedType instance func NewGroupMovedType(Description string) *GroupMovedType { s := new(GroupMovedType) s.Description = Description return s } // GroupRemoveExternalIdDetails : Removed external ID for group. type GroupRemoveExternalIdDetails struct { // PreviousValue : Old external id. PreviousValue string `json:"previous_value"` } // NewGroupRemoveExternalIdDetails returns a new GroupRemoveExternalIdDetails instance func NewGroupRemoveExternalIdDetails(PreviousValue string) *GroupRemoveExternalIdDetails { s := new(GroupRemoveExternalIdDetails) s.PreviousValue = PreviousValue return s } // GroupRemoveExternalIdType : has no documentation (yet) type GroupRemoveExternalIdType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupRemoveExternalIdType returns a new GroupRemoveExternalIdType instance func NewGroupRemoveExternalIdType(Description string) *GroupRemoveExternalIdType { s := new(GroupRemoveExternalIdType) s.Description = Description return s } // GroupRemoveMemberDetails : Removed team members from group. type GroupRemoveMemberDetails struct { } // NewGroupRemoveMemberDetails returns a new GroupRemoveMemberDetails instance func NewGroupRemoveMemberDetails() *GroupRemoveMemberDetails { s := new(GroupRemoveMemberDetails) return s } // GroupRemoveMemberType : has no documentation (yet) type GroupRemoveMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupRemoveMemberType returns a new GroupRemoveMemberType instance func NewGroupRemoveMemberType(Description string) *GroupRemoveMemberType { s := new(GroupRemoveMemberType) s.Description = Description return s } // GroupRenameDetails : Renamed group. type GroupRenameDetails struct { // PreviousValue : Previous display name. PreviousValue string `json:"previous_value"` // NewValue : New display name. NewValue string `json:"new_value"` } // NewGroupRenameDetails returns a new GroupRenameDetails instance func NewGroupRenameDetails(PreviousValue string, NewValue string) *GroupRenameDetails { s := new(GroupRenameDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // GroupRenameType : has no documentation (yet) type GroupRenameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupRenameType returns a new GroupRenameType instance func NewGroupRenameType(Description string) *GroupRenameType { s := new(GroupRenameType) s.Description = Description return s } // GroupUserManagementChangePolicyDetails : Changed who can create groups. type GroupUserManagementChangePolicyDetails struct { // NewValue : New group users management policy. NewValue *team_policies.GroupCreation `json:"new_value"` // PreviousValue : Previous group users management policy. Might be missing // due to historical data gap. PreviousValue *team_policies.GroupCreation `json:"previous_value,omitempty"` } // NewGroupUserManagementChangePolicyDetails returns a new GroupUserManagementChangePolicyDetails instance func NewGroupUserManagementChangePolicyDetails(NewValue *team_policies.GroupCreation) *GroupUserManagementChangePolicyDetails { s := new(GroupUserManagementChangePolicyDetails) s.NewValue = NewValue return s } // GroupUserManagementChangePolicyType : has no documentation (yet) type GroupUserManagementChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewGroupUserManagementChangePolicyType returns a new GroupUserManagementChangePolicyType instance func NewGroupUserManagementChangePolicyType(Description string) *GroupUserManagementChangePolicyType { s := new(GroupUserManagementChangePolicyType) s.Description = Description return s } // IdentifierType : has no documentation (yet) type IdentifierType struct { dropbox.Tagged } // Valid tag values for IdentifierType const ( IdentifierTypeEmail = "email" IdentifierTypeFacebookProfileName = "facebook_profile_name" IdentifierTypeOther = "other" ) // JoinTeamDetails : Additional information relevant when a new member joins the // team. type JoinTeamDetails struct { // LinkedApps : Linked applications. LinkedApps []*UserLinkedAppLogInfo `json:"linked_apps"` // LinkedDevices : Linked devices. LinkedDevices []*LinkedDeviceLogInfo `json:"linked_devices"` // LinkedSharedFolders : Linked shared folders. LinkedSharedFolders []*FolderLogInfo `json:"linked_shared_folders"` } // NewJoinTeamDetails returns a new JoinTeamDetails instance func NewJoinTeamDetails(LinkedApps []*UserLinkedAppLogInfo, LinkedDevices []*LinkedDeviceLogInfo, LinkedSharedFolders []*FolderLogInfo) *JoinTeamDetails { s := new(JoinTeamDetails) s.LinkedApps = LinkedApps s.LinkedDevices = LinkedDevices s.LinkedSharedFolders = LinkedSharedFolders return s } // LegacyDeviceSessionLogInfo : Information on sessions, in legacy format type LegacyDeviceSessionLogInfo struct { DeviceSessionLogInfo // SessionInfo : Session unique id. Might be missing due to historical data // gap. SessionInfo IsSessionLogInfo `json:"session_info,omitempty"` // DisplayName : The device name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` // IsEmmManaged : Is device managed by emm. Might be missing due to // historical data gap. IsEmmManaged bool `json:"is_emm_managed,omitempty"` // Platform : Information on the hosting platform. Might be missing due to // historical data gap. Platform string `json:"platform,omitempty"` // MacAddress : The mac address of the last activity from this session. // Might be missing due to historical data gap. MacAddress string `json:"mac_address,omitempty"` // OsVersion : The hosting OS version. Might be missing due to historical // data gap. OsVersion string `json:"os_version,omitempty"` // DeviceType : Information on the hosting device type. Might be missing due // to historical data gap. DeviceType string `json:"device_type,omitempty"` // ClientVersion : The Dropbox client version. Might be missing due to // historical data gap. ClientVersion string `json:"client_version,omitempty"` // LegacyUniqId : Alternative unique device session id, instead of session // id field. Might be missing due to historical data gap. LegacyUniqId string `json:"legacy_uniq_id,omitempty"` } // NewLegacyDeviceSessionLogInfo returns a new LegacyDeviceSessionLogInfo instance func NewLegacyDeviceSessionLogInfo() *LegacyDeviceSessionLogInfo { s := new(LegacyDeviceSessionLogInfo) return s } // LinkedDeviceLogInfo : The device sessions that user is linked to. type LinkedDeviceLogInfo struct { dropbox.Tagged // MobileDeviceSession : mobile device session's details. MobileDeviceSession *MobileDeviceSessionLogInfo `json:"mobile_device_session,omitempty"` // DesktopDeviceSession : desktop device session's details. DesktopDeviceSession *DesktopDeviceSessionLogInfo `json:"desktop_device_session,omitempty"` // WebDeviceSession : web device session's details. WebDeviceSession *WebDeviceSessionLogInfo `json:"web_device_session,omitempty"` // LegacyDeviceSession : legacy device session's details. LegacyDeviceSession *LegacyDeviceSessionLogInfo `json:"legacy_device_session,omitempty"` } // Valid tag values for LinkedDeviceLogInfo const ( LinkedDeviceLogInfoMobileDeviceSession = "mobile_device_session" LinkedDeviceLogInfoDesktopDeviceSession = "desktop_device_session" LinkedDeviceLogInfoWebDeviceSession = "web_device_session" LinkedDeviceLogInfoLegacyDeviceSession = "legacy_device_session" LinkedDeviceLogInfoOther = "other" ) // UnmarshalJSON deserializes into a LinkedDeviceLogInfo instance func (u *LinkedDeviceLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // MobileDeviceSession : mobile device session's details. MobileDeviceSession json.RawMessage `json:"mobile_device_session,omitempty"` // DesktopDeviceSession : desktop device session's details. DesktopDeviceSession json.RawMessage `json:"desktop_device_session,omitempty"` // WebDeviceSession : web device session's details. WebDeviceSession json.RawMessage `json:"web_device_session,omitempty"` // LegacyDeviceSession : legacy device session's details. LegacyDeviceSession json.RawMessage `json:"legacy_device_session,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "mobile_device_session": err = json.Unmarshal(body, &u.MobileDeviceSession) if err != nil { return err } case "desktop_device_session": err = json.Unmarshal(body, &u.DesktopDeviceSession) if err != nil { return err } case "web_device_session": err = json.Unmarshal(body, &u.WebDeviceSession) if err != nil { return err } case "legacy_device_session": err = json.Unmarshal(body, &u.LegacyDeviceSession) if err != nil { return err } } return nil } // LoginFailDetails : Failed to sign in. type LoginFailDetails struct { // IsEmmManaged : Tells if the login device is EMM managed. Might be missing // due to historical data gap. IsEmmManaged bool `json:"is_emm_managed,omitempty"` // LoginMethod : Login method. LoginMethod *LoginMethod `json:"login_method"` // ErrorDetails : Error details. ErrorDetails *FailureDetailsLogInfo `json:"error_details"` } // NewLoginFailDetails returns a new LoginFailDetails instance func NewLoginFailDetails(LoginMethod *LoginMethod, ErrorDetails *FailureDetailsLogInfo) *LoginFailDetails { s := new(LoginFailDetails) s.LoginMethod = LoginMethod s.ErrorDetails = ErrorDetails return s } // LoginFailType : has no documentation (yet) type LoginFailType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewLoginFailType returns a new LoginFailType instance func NewLoginFailType(Description string) *LoginFailType { s := new(LoginFailType) s.Description = Description return s } // LoginMethod : has no documentation (yet) type LoginMethod struct { dropbox.Tagged } // Valid tag values for LoginMethod const ( LoginMethodPassword = "password" LoginMethodTwoFactorAuthentication = "two_factor_authentication" LoginMethodSaml = "saml" LoginMethodOther = "other" ) // LoginSuccessDetails : Signed in. type LoginSuccessDetails struct { // IsEmmManaged : Tells if the login device is EMM managed. Might be missing // due to historical data gap. IsEmmManaged bool `json:"is_emm_managed,omitempty"` // LoginMethod : Login method. LoginMethod *LoginMethod `json:"login_method"` } // NewLoginSuccessDetails returns a new LoginSuccessDetails instance func NewLoginSuccessDetails(LoginMethod *LoginMethod) *LoginSuccessDetails { s := new(LoginSuccessDetails) s.LoginMethod = LoginMethod return s } // LoginSuccessType : has no documentation (yet) type LoginSuccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewLoginSuccessType returns a new LoginSuccessType instance func NewLoginSuccessType(Description string) *LoginSuccessType { s := new(LoginSuccessType) s.Description = Description return s } // LogoutDetails : Signed out. type LogoutDetails struct { } // NewLogoutDetails returns a new LogoutDetails instance func NewLogoutDetails() *LogoutDetails { s := new(LogoutDetails) return s } // LogoutType : has no documentation (yet) type LogoutType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewLogoutType returns a new LogoutType instance func NewLogoutType(Description string) *LogoutType { s := new(LogoutType) s.Description = Description return s } // MemberAddNameDetails : Added team member name. type MemberAddNameDetails struct { // NewValue : New user's name. NewValue *UserNameLogInfo `json:"new_value"` } // NewMemberAddNameDetails returns a new MemberAddNameDetails instance func NewMemberAddNameDetails(NewValue *UserNameLogInfo) *MemberAddNameDetails { s := new(MemberAddNameDetails) s.NewValue = NewValue return s } // MemberAddNameType : has no documentation (yet) type MemberAddNameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberAddNameType returns a new MemberAddNameType instance func NewMemberAddNameType(Description string) *MemberAddNameType { s := new(MemberAddNameType) s.Description = Description return s } // MemberChangeAdminRoleDetails : Changed team member admin role. type MemberChangeAdminRoleDetails struct { // NewValue : New admin role. This field is relevant when the admin role is // changed or whenthe user role changes from no admin rights to with admin // rights. NewValue *AdminRole `json:"new_value,omitempty"` // PreviousValue : Previous admin role. This field is relevant when the // admin role is changed or when the admin role is removed. PreviousValue *AdminRole `json:"previous_value,omitempty"` } // NewMemberChangeAdminRoleDetails returns a new MemberChangeAdminRoleDetails instance func NewMemberChangeAdminRoleDetails() *MemberChangeAdminRoleDetails { s := new(MemberChangeAdminRoleDetails) return s } // MemberChangeAdminRoleType : has no documentation (yet) type MemberChangeAdminRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberChangeAdminRoleType returns a new MemberChangeAdminRoleType instance func NewMemberChangeAdminRoleType(Description string) *MemberChangeAdminRoleType { s := new(MemberChangeAdminRoleType) s.Description = Description return s } // MemberChangeEmailDetails : Changed team member email. type MemberChangeEmailDetails struct { // NewValue : New email. NewValue string `json:"new_value"` // PreviousValue : Previous email. Might be missing due to historical data // gap. PreviousValue string `json:"previous_value,omitempty"` } // NewMemberChangeEmailDetails returns a new MemberChangeEmailDetails instance func NewMemberChangeEmailDetails(NewValue string) *MemberChangeEmailDetails { s := new(MemberChangeEmailDetails) s.NewValue = NewValue return s } // MemberChangeEmailType : has no documentation (yet) type MemberChangeEmailType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberChangeEmailType returns a new MemberChangeEmailType instance func NewMemberChangeEmailType(Description string) *MemberChangeEmailType { s := new(MemberChangeEmailType) s.Description = Description return s } // MemberChangeMembershipTypeDetails : Changed membership type (limited/full) of // member. type MemberChangeMembershipTypeDetails struct { // PrevValue : Previous membership type. PrevValue *TeamMembershipType `json:"prev_value"` // NewValue : New membership type. NewValue *TeamMembershipType `json:"new_value"` } // NewMemberChangeMembershipTypeDetails returns a new MemberChangeMembershipTypeDetails instance func NewMemberChangeMembershipTypeDetails(PrevValue *TeamMembershipType, NewValue *TeamMembershipType) *MemberChangeMembershipTypeDetails { s := new(MemberChangeMembershipTypeDetails) s.PrevValue = PrevValue s.NewValue = NewValue return s } // MemberChangeMembershipTypeType : has no documentation (yet) type MemberChangeMembershipTypeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberChangeMembershipTypeType returns a new MemberChangeMembershipTypeType instance func NewMemberChangeMembershipTypeType(Description string) *MemberChangeMembershipTypeType { s := new(MemberChangeMembershipTypeType) s.Description = Description return s } // MemberChangeNameDetails : Changed team member name. type MemberChangeNameDetails struct { // NewValue : New user's name. NewValue *UserNameLogInfo `json:"new_value"` // PreviousValue : Previous user's name. Might be missing due to historical // data gap. PreviousValue *UserNameLogInfo `json:"previous_value,omitempty"` } // NewMemberChangeNameDetails returns a new MemberChangeNameDetails instance func NewMemberChangeNameDetails(NewValue *UserNameLogInfo) *MemberChangeNameDetails { s := new(MemberChangeNameDetails) s.NewValue = NewValue return s } // MemberChangeNameType : has no documentation (yet) type MemberChangeNameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberChangeNameType returns a new MemberChangeNameType instance func NewMemberChangeNameType(Description string) *MemberChangeNameType { s := new(MemberChangeNameType) s.Description = Description return s } // MemberChangeStatusDetails : Changed member status (invited, joined, // suspended, etc.). type MemberChangeStatusDetails struct { // PreviousValue : Previous member status. Might be missing due to // historical data gap. PreviousValue *MemberStatus `json:"previous_value,omitempty"` // NewValue : New member status. NewValue *MemberStatus `json:"new_value"` // Action : Additional information indicating the action taken that caused // status change. Action *ActionDetails `json:"action,omitempty"` } // NewMemberChangeStatusDetails returns a new MemberChangeStatusDetails instance func NewMemberChangeStatusDetails(NewValue *MemberStatus) *MemberChangeStatusDetails { s := new(MemberChangeStatusDetails) s.NewValue = NewValue return s } // MemberChangeStatusType : has no documentation (yet) type MemberChangeStatusType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberChangeStatusType returns a new MemberChangeStatusType instance func NewMemberChangeStatusType(Description string) *MemberChangeStatusType { s := new(MemberChangeStatusType) s.Description = Description return s } // MemberDeleteManualContactsDetails : Cleared manually added contacts. type MemberDeleteManualContactsDetails struct { } // NewMemberDeleteManualContactsDetails returns a new MemberDeleteManualContactsDetails instance func NewMemberDeleteManualContactsDetails() *MemberDeleteManualContactsDetails { s := new(MemberDeleteManualContactsDetails) return s } // MemberDeleteManualContactsType : has no documentation (yet) type MemberDeleteManualContactsType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberDeleteManualContactsType returns a new MemberDeleteManualContactsType instance func NewMemberDeleteManualContactsType(Description string) *MemberDeleteManualContactsType { s := new(MemberDeleteManualContactsType) s.Description = Description return s } // MemberPermanentlyDeleteAccountContentsDetails : Permanently deleted contents // of deleted team member account. type MemberPermanentlyDeleteAccountContentsDetails struct { } // NewMemberPermanentlyDeleteAccountContentsDetails returns a new MemberPermanentlyDeleteAccountContentsDetails instance func NewMemberPermanentlyDeleteAccountContentsDetails() *MemberPermanentlyDeleteAccountContentsDetails { s := new(MemberPermanentlyDeleteAccountContentsDetails) return s } // MemberPermanentlyDeleteAccountContentsType : has no documentation (yet) type MemberPermanentlyDeleteAccountContentsType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberPermanentlyDeleteAccountContentsType returns a new MemberPermanentlyDeleteAccountContentsType instance func NewMemberPermanentlyDeleteAccountContentsType(Description string) *MemberPermanentlyDeleteAccountContentsType { s := new(MemberPermanentlyDeleteAccountContentsType) s.Description = Description return s } // MemberRemoveActionType : has no documentation (yet) type MemberRemoveActionType struct { dropbox.Tagged } // Valid tag values for MemberRemoveActionType const ( MemberRemoveActionTypeDelete = "delete" MemberRemoveActionTypeOffboard = "offboard" MemberRemoveActionTypeLeave = "leave" MemberRemoveActionTypeOther = "other" ) // MemberRequestsChangePolicyDetails : Changed whether users can find team when // not invited. type MemberRequestsChangePolicyDetails struct { // NewValue : New member change requests policy. NewValue *MemberRequestsPolicy `json:"new_value"` // PreviousValue : Previous member change requests policy. Might be missing // due to historical data gap. PreviousValue *MemberRequestsPolicy `json:"previous_value,omitempty"` } // NewMemberRequestsChangePolicyDetails returns a new MemberRequestsChangePolicyDetails instance func NewMemberRequestsChangePolicyDetails(NewValue *MemberRequestsPolicy) *MemberRequestsChangePolicyDetails { s := new(MemberRequestsChangePolicyDetails) s.NewValue = NewValue return s } // MemberRequestsChangePolicyType : has no documentation (yet) type MemberRequestsChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberRequestsChangePolicyType returns a new MemberRequestsChangePolicyType instance func NewMemberRequestsChangePolicyType(Description string) *MemberRequestsChangePolicyType { s := new(MemberRequestsChangePolicyType) s.Description = Description return s } // MemberRequestsPolicy : has no documentation (yet) type MemberRequestsPolicy struct { dropbox.Tagged } // Valid tag values for MemberRequestsPolicy const ( MemberRequestsPolicyAutoAccept = "auto_accept" MemberRequestsPolicyDisabled = "disabled" MemberRequestsPolicyRequireApproval = "require_approval" MemberRequestsPolicyOther = "other" ) // MemberSpaceLimitsAddCustomQuotaDetails : Set custom member space limit. type MemberSpaceLimitsAddCustomQuotaDetails struct { // NewValue : New custom quota value in bytes. NewValue uint64 `json:"new_value"` } // NewMemberSpaceLimitsAddCustomQuotaDetails returns a new MemberSpaceLimitsAddCustomQuotaDetails instance func NewMemberSpaceLimitsAddCustomQuotaDetails(NewValue uint64) *MemberSpaceLimitsAddCustomQuotaDetails { s := new(MemberSpaceLimitsAddCustomQuotaDetails) s.NewValue = NewValue return s } // MemberSpaceLimitsAddCustomQuotaType : has no documentation (yet) type MemberSpaceLimitsAddCustomQuotaType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsAddCustomQuotaType returns a new MemberSpaceLimitsAddCustomQuotaType instance func NewMemberSpaceLimitsAddCustomQuotaType(Description string) *MemberSpaceLimitsAddCustomQuotaType { s := new(MemberSpaceLimitsAddCustomQuotaType) s.Description = Description return s } // MemberSpaceLimitsAddExceptionDetails : Added members to member space limit // exception list. type MemberSpaceLimitsAddExceptionDetails struct { } // NewMemberSpaceLimitsAddExceptionDetails returns a new MemberSpaceLimitsAddExceptionDetails instance func NewMemberSpaceLimitsAddExceptionDetails() *MemberSpaceLimitsAddExceptionDetails { s := new(MemberSpaceLimitsAddExceptionDetails) return s } // MemberSpaceLimitsAddExceptionType : has no documentation (yet) type MemberSpaceLimitsAddExceptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsAddExceptionType returns a new MemberSpaceLimitsAddExceptionType instance func NewMemberSpaceLimitsAddExceptionType(Description string) *MemberSpaceLimitsAddExceptionType { s := new(MemberSpaceLimitsAddExceptionType) s.Description = Description return s } // MemberSpaceLimitsChangeCapsTypePolicyDetails : Changed member space limit // type for team. type MemberSpaceLimitsChangeCapsTypePolicyDetails struct { // PreviousValue : Previous space limit type. PreviousValue *SpaceCapsType `json:"previous_value"` // NewValue : New space limit type. NewValue *SpaceCapsType `json:"new_value"` } // NewMemberSpaceLimitsChangeCapsTypePolicyDetails returns a new MemberSpaceLimitsChangeCapsTypePolicyDetails instance func NewMemberSpaceLimitsChangeCapsTypePolicyDetails(PreviousValue *SpaceCapsType, NewValue *SpaceCapsType) *MemberSpaceLimitsChangeCapsTypePolicyDetails { s := new(MemberSpaceLimitsChangeCapsTypePolicyDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // MemberSpaceLimitsChangeCapsTypePolicyType : has no documentation (yet) type MemberSpaceLimitsChangeCapsTypePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsChangeCapsTypePolicyType returns a new MemberSpaceLimitsChangeCapsTypePolicyType instance func NewMemberSpaceLimitsChangeCapsTypePolicyType(Description string) *MemberSpaceLimitsChangeCapsTypePolicyType { s := new(MemberSpaceLimitsChangeCapsTypePolicyType) s.Description = Description return s } // MemberSpaceLimitsChangeCustomQuotaDetails : Changed custom member space // limit. type MemberSpaceLimitsChangeCustomQuotaDetails struct { // PreviousValue : Previous custom quota value in bytes. PreviousValue uint64 `json:"previous_value"` // NewValue : New custom quota value in bytes. NewValue uint64 `json:"new_value"` } // NewMemberSpaceLimitsChangeCustomQuotaDetails returns a new MemberSpaceLimitsChangeCustomQuotaDetails instance func NewMemberSpaceLimitsChangeCustomQuotaDetails(PreviousValue uint64, NewValue uint64) *MemberSpaceLimitsChangeCustomQuotaDetails { s := new(MemberSpaceLimitsChangeCustomQuotaDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // MemberSpaceLimitsChangeCustomQuotaType : has no documentation (yet) type MemberSpaceLimitsChangeCustomQuotaType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsChangeCustomQuotaType returns a new MemberSpaceLimitsChangeCustomQuotaType instance func NewMemberSpaceLimitsChangeCustomQuotaType(Description string) *MemberSpaceLimitsChangeCustomQuotaType { s := new(MemberSpaceLimitsChangeCustomQuotaType) s.Description = Description return s } // MemberSpaceLimitsChangePolicyDetails : Changed team default member space // limit. type MemberSpaceLimitsChangePolicyDetails struct { // PreviousValue : Previous team default limit value in bytes. Might be // missing due to historical data gap. PreviousValue uint64 `json:"previous_value,omitempty"` // NewValue : New team default limit value in bytes. Might be missing due to // historical data gap. NewValue uint64 `json:"new_value,omitempty"` } // NewMemberSpaceLimitsChangePolicyDetails returns a new MemberSpaceLimitsChangePolicyDetails instance func NewMemberSpaceLimitsChangePolicyDetails() *MemberSpaceLimitsChangePolicyDetails { s := new(MemberSpaceLimitsChangePolicyDetails) return s } // MemberSpaceLimitsChangePolicyType : has no documentation (yet) type MemberSpaceLimitsChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsChangePolicyType returns a new MemberSpaceLimitsChangePolicyType instance func NewMemberSpaceLimitsChangePolicyType(Description string) *MemberSpaceLimitsChangePolicyType { s := new(MemberSpaceLimitsChangePolicyType) s.Description = Description return s } // MemberSpaceLimitsChangeStatusDetails : Changed space limit status. type MemberSpaceLimitsChangeStatusDetails struct { // PreviousValue : Previous storage quota status. PreviousValue *SpaceLimitsStatus `json:"previous_value"` // NewValue : New storage quota status. NewValue *SpaceLimitsStatus `json:"new_value"` } // NewMemberSpaceLimitsChangeStatusDetails returns a new MemberSpaceLimitsChangeStatusDetails instance func NewMemberSpaceLimitsChangeStatusDetails(PreviousValue *SpaceLimitsStatus, NewValue *SpaceLimitsStatus) *MemberSpaceLimitsChangeStatusDetails { s := new(MemberSpaceLimitsChangeStatusDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // MemberSpaceLimitsChangeStatusType : has no documentation (yet) type MemberSpaceLimitsChangeStatusType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsChangeStatusType returns a new MemberSpaceLimitsChangeStatusType instance func NewMemberSpaceLimitsChangeStatusType(Description string) *MemberSpaceLimitsChangeStatusType { s := new(MemberSpaceLimitsChangeStatusType) s.Description = Description return s } // MemberSpaceLimitsRemoveCustomQuotaDetails : Removed custom member space // limit. type MemberSpaceLimitsRemoveCustomQuotaDetails struct { } // NewMemberSpaceLimitsRemoveCustomQuotaDetails returns a new MemberSpaceLimitsRemoveCustomQuotaDetails instance func NewMemberSpaceLimitsRemoveCustomQuotaDetails() *MemberSpaceLimitsRemoveCustomQuotaDetails { s := new(MemberSpaceLimitsRemoveCustomQuotaDetails) return s } // MemberSpaceLimitsRemoveCustomQuotaType : has no documentation (yet) type MemberSpaceLimitsRemoveCustomQuotaType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsRemoveCustomQuotaType returns a new MemberSpaceLimitsRemoveCustomQuotaType instance func NewMemberSpaceLimitsRemoveCustomQuotaType(Description string) *MemberSpaceLimitsRemoveCustomQuotaType { s := new(MemberSpaceLimitsRemoveCustomQuotaType) s.Description = Description return s } // MemberSpaceLimitsRemoveExceptionDetails : Removed members from member space // limit exception list. type MemberSpaceLimitsRemoveExceptionDetails struct { } // NewMemberSpaceLimitsRemoveExceptionDetails returns a new MemberSpaceLimitsRemoveExceptionDetails instance func NewMemberSpaceLimitsRemoveExceptionDetails() *MemberSpaceLimitsRemoveExceptionDetails { s := new(MemberSpaceLimitsRemoveExceptionDetails) return s } // MemberSpaceLimitsRemoveExceptionType : has no documentation (yet) type MemberSpaceLimitsRemoveExceptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSpaceLimitsRemoveExceptionType returns a new MemberSpaceLimitsRemoveExceptionType instance func NewMemberSpaceLimitsRemoveExceptionType(Description string) *MemberSpaceLimitsRemoveExceptionType { s := new(MemberSpaceLimitsRemoveExceptionType) s.Description = Description return s } // MemberStatus : has no documentation (yet) type MemberStatus struct { dropbox.Tagged } // Valid tag values for MemberStatus const ( MemberStatusNotJoined = "not_joined" MemberStatusInvited = "invited" MemberStatusActive = "active" MemberStatusSuspended = "suspended" MemberStatusRemoved = "removed" MemberStatusOther = "other" ) // MemberSuggestDetails : Suggested person to add to team. type MemberSuggestDetails struct { // SuggestedMembers : suggested users emails. SuggestedMembers []string `json:"suggested_members"` } // NewMemberSuggestDetails returns a new MemberSuggestDetails instance func NewMemberSuggestDetails(SuggestedMembers []string) *MemberSuggestDetails { s := new(MemberSuggestDetails) s.SuggestedMembers = SuggestedMembers return s } // MemberSuggestType : has no documentation (yet) type MemberSuggestType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSuggestType returns a new MemberSuggestType instance func NewMemberSuggestType(Description string) *MemberSuggestType { s := new(MemberSuggestType) s.Description = Description return s } // MemberSuggestionsChangePolicyDetails : Enabled/disabled option for team // members to suggest people to add to team. type MemberSuggestionsChangePolicyDetails struct { // NewValue : New team member suggestions policy. NewValue *MemberSuggestionsPolicy `json:"new_value"` // PreviousValue : Previous team member suggestions policy. Might be missing // due to historical data gap. PreviousValue *MemberSuggestionsPolicy `json:"previous_value,omitempty"` } // NewMemberSuggestionsChangePolicyDetails returns a new MemberSuggestionsChangePolicyDetails instance func NewMemberSuggestionsChangePolicyDetails(NewValue *MemberSuggestionsPolicy) *MemberSuggestionsChangePolicyDetails { s := new(MemberSuggestionsChangePolicyDetails) s.NewValue = NewValue return s } // MemberSuggestionsChangePolicyType : has no documentation (yet) type MemberSuggestionsChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberSuggestionsChangePolicyType returns a new MemberSuggestionsChangePolicyType instance func NewMemberSuggestionsChangePolicyType(Description string) *MemberSuggestionsChangePolicyType { s := new(MemberSuggestionsChangePolicyType) s.Description = Description return s } // MemberSuggestionsPolicy : Member suggestions policy type MemberSuggestionsPolicy struct { dropbox.Tagged } // Valid tag values for MemberSuggestionsPolicy const ( MemberSuggestionsPolicyDisabled = "disabled" MemberSuggestionsPolicyEnabled = "enabled" MemberSuggestionsPolicyOther = "other" ) // MemberTransferAccountContentsDetails : Transferred contents of deleted member // account to another member. type MemberTransferAccountContentsDetails struct { } // NewMemberTransferAccountContentsDetails returns a new MemberTransferAccountContentsDetails instance func NewMemberTransferAccountContentsDetails() *MemberTransferAccountContentsDetails { s := new(MemberTransferAccountContentsDetails) return s } // MemberTransferAccountContentsType : has no documentation (yet) type MemberTransferAccountContentsType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMemberTransferAccountContentsType returns a new MemberTransferAccountContentsType instance func NewMemberTransferAccountContentsType(Description string) *MemberTransferAccountContentsType { s := new(MemberTransferAccountContentsType) s.Description = Description return s } // MicrosoftOfficeAddinChangePolicyDetails : Enabled/disabled Microsoft Office // add-in. type MicrosoftOfficeAddinChangePolicyDetails struct { // NewValue : New Microsoft Office addin policy. NewValue *MicrosoftOfficeAddinPolicy `json:"new_value"` // PreviousValue : Previous Microsoft Office addin policy. Might be missing // due to historical data gap. PreviousValue *MicrosoftOfficeAddinPolicy `json:"previous_value,omitempty"` } // NewMicrosoftOfficeAddinChangePolicyDetails returns a new MicrosoftOfficeAddinChangePolicyDetails instance func NewMicrosoftOfficeAddinChangePolicyDetails(NewValue *MicrosoftOfficeAddinPolicy) *MicrosoftOfficeAddinChangePolicyDetails { s := new(MicrosoftOfficeAddinChangePolicyDetails) s.NewValue = NewValue return s } // MicrosoftOfficeAddinChangePolicyType : has no documentation (yet) type MicrosoftOfficeAddinChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewMicrosoftOfficeAddinChangePolicyType returns a new MicrosoftOfficeAddinChangePolicyType instance func NewMicrosoftOfficeAddinChangePolicyType(Description string) *MicrosoftOfficeAddinChangePolicyType { s := new(MicrosoftOfficeAddinChangePolicyType) s.Description = Description return s } // MicrosoftOfficeAddinPolicy : Microsoft Office addin policy type MicrosoftOfficeAddinPolicy struct { dropbox.Tagged } // Valid tag values for MicrosoftOfficeAddinPolicy const ( MicrosoftOfficeAddinPolicyDisabled = "disabled" MicrosoftOfficeAddinPolicyEnabled = "enabled" MicrosoftOfficeAddinPolicyOther = "other" ) // MissingDetails : An indication that an error occurred while retrieving the // event. Some attributes of the event may be omitted as a result. type MissingDetails struct { // SourceEventFields : All the data that could be retrieved and converted // from the source event. SourceEventFields string `json:"source_event_fields,omitempty"` } // NewMissingDetails returns a new MissingDetails instance func NewMissingDetails() *MissingDetails { s := new(MissingDetails) return s } // MobileDeviceSessionLogInfo : Information about linked Dropbox mobile client // sessions type MobileDeviceSessionLogInfo struct { DeviceSessionLogInfo // SessionInfo : Mobile session unique id. Might be missing due to // historical data gap. SessionInfo *MobileSessionLogInfo `json:"session_info,omitempty"` // DeviceName : The device name. DeviceName string `json:"device_name"` // ClientType : The mobile application type. ClientType *team.MobileClientPlatform `json:"client_type"` // ClientVersion : The Dropbox client version. ClientVersion string `json:"client_version,omitempty"` // OsVersion : The hosting OS version. OsVersion string `json:"os_version,omitempty"` // LastCarrier : last carrier used by the device. LastCarrier string `json:"last_carrier,omitempty"` } // NewMobileDeviceSessionLogInfo returns a new MobileDeviceSessionLogInfo instance func NewMobileDeviceSessionLogInfo(DeviceName string, ClientType *team.MobileClientPlatform) *MobileDeviceSessionLogInfo { s := new(MobileDeviceSessionLogInfo) s.DeviceName = DeviceName s.ClientType = ClientType return s } // MobileSessionLogInfo : Mobile session. type MobileSessionLogInfo struct { SessionLogInfo } // NewMobileSessionLogInfo returns a new MobileSessionLogInfo instance func NewMobileSessionLogInfo() *MobileSessionLogInfo { s := new(MobileSessionLogInfo) return s } // NamespaceRelativePathLogInfo : Namespace relative path details. type NamespaceRelativePathLogInfo struct { // NsId : Namespace ID. Might be missing due to historical data gap. NsId string `json:"ns_id,omitempty"` // RelativePath : A path relative to the specified namespace ID. Might be // missing due to historical data gap. RelativePath string `json:"relative_path,omitempty"` } // NewNamespaceRelativePathLogInfo returns a new NamespaceRelativePathLogInfo instance func NewNamespaceRelativePathLogInfo() *NamespaceRelativePathLogInfo { s := new(NamespaceRelativePathLogInfo) return s } // NetworkControlChangePolicyDetails : Enabled/disabled network control. type NetworkControlChangePolicyDetails struct { // NewValue : New network control policy. NewValue *NetworkControlPolicy `json:"new_value"` // PreviousValue : Previous network control policy. Might be missing due to // historical data gap. PreviousValue *NetworkControlPolicy `json:"previous_value,omitempty"` } // NewNetworkControlChangePolicyDetails returns a new NetworkControlChangePolicyDetails instance func NewNetworkControlChangePolicyDetails(NewValue *NetworkControlPolicy) *NetworkControlChangePolicyDetails { s := new(NetworkControlChangePolicyDetails) s.NewValue = NewValue return s } // NetworkControlChangePolicyType : has no documentation (yet) type NetworkControlChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNetworkControlChangePolicyType returns a new NetworkControlChangePolicyType instance func NewNetworkControlChangePolicyType(Description string) *NetworkControlChangePolicyType { s := new(NetworkControlChangePolicyType) s.Description = Description return s } // NetworkControlPolicy : Network control policy type NetworkControlPolicy struct { dropbox.Tagged } // Valid tag values for NetworkControlPolicy const ( NetworkControlPolicyDisabled = "disabled" NetworkControlPolicyEnabled = "enabled" NetworkControlPolicyOther = "other" ) // UserLogInfo : User's logged information. type UserLogInfo struct { // AccountId : User unique ID. Might be missing due to historical data gap. AccountId string `json:"account_id,omitempty"` // DisplayName : User display name. Might be missing due to historical data // gap. DisplayName string `json:"display_name,omitempty"` // Email : User email address. Might be missing due to historical data gap. Email string `json:"email,omitempty"` } // NewUserLogInfo returns a new UserLogInfo instance func NewUserLogInfo() *UserLogInfo { s := new(UserLogInfo) return s } // IsUserLogInfo is the interface type for UserLogInfo and its subtypes type IsUserLogInfo interface { IsUserLogInfo() } // IsUserLogInfo implements the IsUserLogInfo interface func (u *UserLogInfo) IsUserLogInfo() {} type userLogInfoUnion struct { dropbox.Tagged // TeamMember : has no documentation (yet) TeamMember *TeamMemberLogInfo `json:"team_member,omitempty"` // TrustedNonTeamMember : has no documentation (yet) TrustedNonTeamMember *TrustedNonTeamMemberLogInfo `json:"trusted_non_team_member,omitempty"` // NonTeamMember : has no documentation (yet) NonTeamMember *NonTeamMemberLogInfo `json:"non_team_member,omitempty"` } // Valid tag values for UserLogInfo const ( UserLogInfoTeamMember = "team_member" UserLogInfoTrustedNonTeamMember = "trusted_non_team_member" UserLogInfoNonTeamMember = "non_team_member" ) // UnmarshalJSON deserializes into a userLogInfoUnion instance func (u *userLogInfoUnion) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // TeamMember : has no documentation (yet) TeamMember json.RawMessage `json:"team_member,omitempty"` // TrustedNonTeamMember : has no documentation (yet) TrustedNonTeamMember json.RawMessage `json:"trusted_non_team_member,omitempty"` // NonTeamMember : has no documentation (yet) NonTeamMember json.RawMessage `json:"non_team_member,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "team_member": err = json.Unmarshal(body, &u.TeamMember) if err != nil { return err } case "trusted_non_team_member": err = json.Unmarshal(body, &u.TrustedNonTeamMember) if err != nil { return err } case "non_team_member": err = json.Unmarshal(body, &u.NonTeamMember) if err != nil { return err } } return nil } // IsUserLogInfoFromJSON converts JSON to a concrete IsUserLogInfo instance func IsUserLogInfoFromJSON(data []byte) (IsUserLogInfo, error) { var t userLogInfoUnion if err := json.Unmarshal(data, &t); err != nil { return nil, err } switch t.Tag { case "team_member": return t.TeamMember, nil case "trusted_non_team_member": return t.TrustedNonTeamMember, nil case "non_team_member": return t.NonTeamMember, nil } return nil, nil } // NonTeamMemberLogInfo : Non team member's logged information. type NonTeamMemberLogInfo struct { UserLogInfo } // NewNonTeamMemberLogInfo returns a new NonTeamMemberLogInfo instance func NewNonTeamMemberLogInfo() *NonTeamMemberLogInfo { s := new(NonTeamMemberLogInfo) return s } // NoteAclInviteOnlyDetails : Changed Paper doc to invite-only. type NoteAclInviteOnlyDetails struct { } // NewNoteAclInviteOnlyDetails returns a new NoteAclInviteOnlyDetails instance func NewNoteAclInviteOnlyDetails() *NoteAclInviteOnlyDetails { s := new(NoteAclInviteOnlyDetails) return s } // NoteAclInviteOnlyType : has no documentation (yet) type NoteAclInviteOnlyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNoteAclInviteOnlyType returns a new NoteAclInviteOnlyType instance func NewNoteAclInviteOnlyType(Description string) *NoteAclInviteOnlyType { s := new(NoteAclInviteOnlyType) s.Description = Description return s } // NoteAclLinkDetails : Changed Paper doc to link-accessible. type NoteAclLinkDetails struct { } // NewNoteAclLinkDetails returns a new NoteAclLinkDetails instance func NewNoteAclLinkDetails() *NoteAclLinkDetails { s := new(NoteAclLinkDetails) return s } // NoteAclLinkType : has no documentation (yet) type NoteAclLinkType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNoteAclLinkType returns a new NoteAclLinkType instance func NewNoteAclLinkType(Description string) *NoteAclLinkType { s := new(NoteAclLinkType) s.Description = Description return s } // NoteAclTeamLinkDetails : Changed Paper doc to link-accessible for team. type NoteAclTeamLinkDetails struct { } // NewNoteAclTeamLinkDetails returns a new NoteAclTeamLinkDetails instance func NewNoteAclTeamLinkDetails() *NoteAclTeamLinkDetails { s := new(NoteAclTeamLinkDetails) return s } // NoteAclTeamLinkType : has no documentation (yet) type NoteAclTeamLinkType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNoteAclTeamLinkType returns a new NoteAclTeamLinkType instance func NewNoteAclTeamLinkType(Description string) *NoteAclTeamLinkType { s := new(NoteAclTeamLinkType) s.Description = Description return s } // NoteShareReceiveDetails : Shared received Paper doc. type NoteShareReceiveDetails struct { } // NewNoteShareReceiveDetails returns a new NoteShareReceiveDetails instance func NewNoteShareReceiveDetails() *NoteShareReceiveDetails { s := new(NoteShareReceiveDetails) return s } // NoteShareReceiveType : has no documentation (yet) type NoteShareReceiveType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNoteShareReceiveType returns a new NoteShareReceiveType instance func NewNoteShareReceiveType(Description string) *NoteShareReceiveType { s := new(NoteShareReceiveType) s.Description = Description return s } // NoteSharedDetails : Shared Paper doc. type NoteSharedDetails struct { } // NewNoteSharedDetails returns a new NoteSharedDetails instance func NewNoteSharedDetails() *NoteSharedDetails { s := new(NoteSharedDetails) return s } // NoteSharedType : has no documentation (yet) type NoteSharedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewNoteSharedType returns a new NoteSharedType instance func NewNoteSharedType(Description string) *NoteSharedType { s := new(NoteSharedType) s.Description = Description return s } // OpenNoteSharedDetails : Opened shared Paper doc. type OpenNoteSharedDetails struct { } // NewOpenNoteSharedDetails returns a new OpenNoteSharedDetails instance func NewOpenNoteSharedDetails() *OpenNoteSharedDetails { s := new(OpenNoteSharedDetails) return s } // OpenNoteSharedType : has no documentation (yet) type OpenNoteSharedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewOpenNoteSharedType returns a new OpenNoteSharedType instance func NewOpenNoteSharedType(Description string) *OpenNoteSharedType { s := new(OpenNoteSharedType) s.Description = Description return s } // OriginLogInfo : The origin from which the actor performed the action. type OriginLogInfo struct { // GeoLocation : Geographic location details. GeoLocation *GeoLocationLogInfo `json:"geo_location,omitempty"` // AccessMethod : The method that was used to perform the action. AccessMethod *AccessMethodLogInfo `json:"access_method"` } // NewOriginLogInfo returns a new OriginLogInfo instance func NewOriginLogInfo(AccessMethod *AccessMethodLogInfo) *OriginLogInfo { s := new(OriginLogInfo) s.AccessMethod = AccessMethod return s } // PaperAccessType : has no documentation (yet) type PaperAccessType struct { dropbox.Tagged } // Valid tag values for PaperAccessType const ( PaperAccessTypeViewer = "viewer" PaperAccessTypeCommenter = "commenter" PaperAccessTypeEditor = "editor" PaperAccessTypeOther = "other" ) // PaperAdminExportStartDetails : Exported all team Paper docs. type PaperAdminExportStartDetails struct { } // NewPaperAdminExportStartDetails returns a new PaperAdminExportStartDetails instance func NewPaperAdminExportStartDetails() *PaperAdminExportStartDetails { s := new(PaperAdminExportStartDetails) return s } // PaperAdminExportStartType : has no documentation (yet) type PaperAdminExportStartType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperAdminExportStartType returns a new PaperAdminExportStartType instance func NewPaperAdminExportStartType(Description string) *PaperAdminExportStartType { s := new(PaperAdminExportStartType) s.Description = Description return s } // PaperChangeDeploymentPolicyDetails : Changed whether Dropbox Paper, when // enabled, is deployed to all members or to specific members. type PaperChangeDeploymentPolicyDetails struct { // NewValue : New Dropbox Paper deployment policy. NewValue *team_policies.PaperDeploymentPolicy `json:"new_value"` // PreviousValue : Previous Dropbox Paper deployment policy. Might be // missing due to historical data gap. PreviousValue *team_policies.PaperDeploymentPolicy `json:"previous_value,omitempty"` } // NewPaperChangeDeploymentPolicyDetails returns a new PaperChangeDeploymentPolicyDetails instance func NewPaperChangeDeploymentPolicyDetails(NewValue *team_policies.PaperDeploymentPolicy) *PaperChangeDeploymentPolicyDetails { s := new(PaperChangeDeploymentPolicyDetails) s.NewValue = NewValue return s } // PaperChangeDeploymentPolicyType : has no documentation (yet) type PaperChangeDeploymentPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperChangeDeploymentPolicyType returns a new PaperChangeDeploymentPolicyType instance func NewPaperChangeDeploymentPolicyType(Description string) *PaperChangeDeploymentPolicyType { s := new(PaperChangeDeploymentPolicyType) s.Description = Description return s } // PaperChangeMemberLinkPolicyDetails : Changed whether non-members can view // Paper docs with link. type PaperChangeMemberLinkPolicyDetails struct { // NewValue : New paper external link accessibility policy. NewValue *PaperMemberPolicy `json:"new_value"` } // NewPaperChangeMemberLinkPolicyDetails returns a new PaperChangeMemberLinkPolicyDetails instance func NewPaperChangeMemberLinkPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberLinkPolicyDetails { s := new(PaperChangeMemberLinkPolicyDetails) s.NewValue = NewValue return s } // PaperChangeMemberLinkPolicyType : has no documentation (yet) type PaperChangeMemberLinkPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperChangeMemberLinkPolicyType returns a new PaperChangeMemberLinkPolicyType instance func NewPaperChangeMemberLinkPolicyType(Description string) *PaperChangeMemberLinkPolicyType { s := new(PaperChangeMemberLinkPolicyType) s.Description = Description return s } // PaperChangeMemberPolicyDetails : Changed whether members can share Paper docs // outside team, and if docs are accessible only by team members or anyone by // default. type PaperChangeMemberPolicyDetails struct { // NewValue : New paper external accessibility policy. NewValue *PaperMemberPolicy `json:"new_value"` // PreviousValue : Previous paper external accessibility policy. Might be // missing due to historical data gap. PreviousValue *PaperMemberPolicy `json:"previous_value,omitempty"` } // NewPaperChangeMemberPolicyDetails returns a new PaperChangeMemberPolicyDetails instance func NewPaperChangeMemberPolicyDetails(NewValue *PaperMemberPolicy) *PaperChangeMemberPolicyDetails { s := new(PaperChangeMemberPolicyDetails) s.NewValue = NewValue return s } // PaperChangeMemberPolicyType : has no documentation (yet) type PaperChangeMemberPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperChangeMemberPolicyType returns a new PaperChangeMemberPolicyType instance func NewPaperChangeMemberPolicyType(Description string) *PaperChangeMemberPolicyType { s := new(PaperChangeMemberPolicyType) s.Description = Description return s } // PaperChangePolicyDetails : Enabled/disabled Dropbox Paper for team. type PaperChangePolicyDetails struct { // NewValue : New Dropbox Paper policy. NewValue *team_policies.PaperEnabledPolicy `json:"new_value"` // PreviousValue : Previous Dropbox Paper policy. Might be missing due to // historical data gap. PreviousValue *team_policies.PaperEnabledPolicy `json:"previous_value,omitempty"` } // NewPaperChangePolicyDetails returns a new PaperChangePolicyDetails instance func NewPaperChangePolicyDetails(NewValue *team_policies.PaperEnabledPolicy) *PaperChangePolicyDetails { s := new(PaperChangePolicyDetails) s.NewValue = NewValue return s } // PaperChangePolicyType : has no documentation (yet) type PaperChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperChangePolicyType returns a new PaperChangePolicyType instance func NewPaperChangePolicyType(Description string) *PaperChangePolicyType { s := new(PaperChangePolicyType) s.Description = Description return s } // PaperContentAddMemberDetails : Added team member to Paper doc/folder. type PaperContentAddMemberDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentAddMemberDetails returns a new PaperContentAddMemberDetails instance func NewPaperContentAddMemberDetails(EventUuid string) *PaperContentAddMemberDetails { s := new(PaperContentAddMemberDetails) s.EventUuid = EventUuid return s } // PaperContentAddMemberType : has no documentation (yet) type PaperContentAddMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentAddMemberType returns a new PaperContentAddMemberType instance func NewPaperContentAddMemberType(Description string) *PaperContentAddMemberType { s := new(PaperContentAddMemberType) s.Description = Description return s } // PaperContentAddToFolderDetails : Added Paper doc/folder to folder. type PaperContentAddToFolderDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // ParentAssetIndex : Parent asset position in the Assets list. ParentAssetIndex uint64 `json:"parent_asset_index"` } // NewPaperContentAddToFolderDetails returns a new PaperContentAddToFolderDetails instance func NewPaperContentAddToFolderDetails(EventUuid string, TargetAssetIndex uint64, ParentAssetIndex uint64) *PaperContentAddToFolderDetails { s := new(PaperContentAddToFolderDetails) s.EventUuid = EventUuid s.TargetAssetIndex = TargetAssetIndex s.ParentAssetIndex = ParentAssetIndex return s } // PaperContentAddToFolderType : has no documentation (yet) type PaperContentAddToFolderType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentAddToFolderType returns a new PaperContentAddToFolderType instance func NewPaperContentAddToFolderType(Description string) *PaperContentAddToFolderType { s := new(PaperContentAddToFolderType) s.Description = Description return s } // PaperContentArchiveDetails : Archived Paper doc/folder. type PaperContentArchiveDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentArchiveDetails returns a new PaperContentArchiveDetails instance func NewPaperContentArchiveDetails(EventUuid string) *PaperContentArchiveDetails { s := new(PaperContentArchiveDetails) s.EventUuid = EventUuid return s } // PaperContentArchiveType : has no documentation (yet) type PaperContentArchiveType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentArchiveType returns a new PaperContentArchiveType instance func NewPaperContentArchiveType(Description string) *PaperContentArchiveType { s := new(PaperContentArchiveType) s.Description = Description return s } // PaperContentCreateDetails : Created Paper doc/folder. type PaperContentCreateDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentCreateDetails returns a new PaperContentCreateDetails instance func NewPaperContentCreateDetails(EventUuid string) *PaperContentCreateDetails { s := new(PaperContentCreateDetails) s.EventUuid = EventUuid return s } // PaperContentCreateType : has no documentation (yet) type PaperContentCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentCreateType returns a new PaperContentCreateType instance func NewPaperContentCreateType(Description string) *PaperContentCreateType { s := new(PaperContentCreateType) s.Description = Description return s } // PaperContentPermanentlyDeleteDetails : Permanently deleted Paper doc/folder. type PaperContentPermanentlyDeleteDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentPermanentlyDeleteDetails returns a new PaperContentPermanentlyDeleteDetails instance func NewPaperContentPermanentlyDeleteDetails(EventUuid string) *PaperContentPermanentlyDeleteDetails { s := new(PaperContentPermanentlyDeleteDetails) s.EventUuid = EventUuid return s } // PaperContentPermanentlyDeleteType : has no documentation (yet) type PaperContentPermanentlyDeleteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentPermanentlyDeleteType returns a new PaperContentPermanentlyDeleteType instance func NewPaperContentPermanentlyDeleteType(Description string) *PaperContentPermanentlyDeleteType { s := new(PaperContentPermanentlyDeleteType) s.Description = Description return s } // PaperContentRemoveFromFolderDetails : Removed Paper doc/folder from folder. type PaperContentRemoveFromFolderDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // ParentAssetIndex : Parent asset position in the Assets list. ParentAssetIndex uint64 `json:"parent_asset_index"` } // NewPaperContentRemoveFromFolderDetails returns a new PaperContentRemoveFromFolderDetails instance func NewPaperContentRemoveFromFolderDetails(EventUuid string, TargetAssetIndex uint64, ParentAssetIndex uint64) *PaperContentRemoveFromFolderDetails { s := new(PaperContentRemoveFromFolderDetails) s.EventUuid = EventUuid s.TargetAssetIndex = TargetAssetIndex s.ParentAssetIndex = ParentAssetIndex return s } // PaperContentRemoveFromFolderType : has no documentation (yet) type PaperContentRemoveFromFolderType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentRemoveFromFolderType returns a new PaperContentRemoveFromFolderType instance func NewPaperContentRemoveFromFolderType(Description string) *PaperContentRemoveFromFolderType { s := new(PaperContentRemoveFromFolderType) s.Description = Description return s } // PaperContentRemoveMemberDetails : Removed team member from Paper doc/folder. type PaperContentRemoveMemberDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentRemoveMemberDetails returns a new PaperContentRemoveMemberDetails instance func NewPaperContentRemoveMemberDetails(EventUuid string) *PaperContentRemoveMemberDetails { s := new(PaperContentRemoveMemberDetails) s.EventUuid = EventUuid return s } // PaperContentRemoveMemberType : has no documentation (yet) type PaperContentRemoveMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentRemoveMemberType returns a new PaperContentRemoveMemberType instance func NewPaperContentRemoveMemberType(Description string) *PaperContentRemoveMemberType { s := new(PaperContentRemoveMemberType) s.Description = Description return s } // PaperContentRenameDetails : Renamed Paper doc/folder. type PaperContentRenameDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentRenameDetails returns a new PaperContentRenameDetails instance func NewPaperContentRenameDetails(EventUuid string) *PaperContentRenameDetails { s := new(PaperContentRenameDetails) s.EventUuid = EventUuid return s } // PaperContentRenameType : has no documentation (yet) type PaperContentRenameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentRenameType returns a new PaperContentRenameType instance func NewPaperContentRenameType(Description string) *PaperContentRenameType { s := new(PaperContentRenameType) s.Description = Description return s } // PaperContentRestoreDetails : Restored archived Paper doc/folder. type PaperContentRestoreDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperContentRestoreDetails returns a new PaperContentRestoreDetails instance func NewPaperContentRestoreDetails(EventUuid string) *PaperContentRestoreDetails { s := new(PaperContentRestoreDetails) s.EventUuid = EventUuid return s } // PaperContentRestoreType : has no documentation (yet) type PaperContentRestoreType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperContentRestoreType returns a new PaperContentRestoreType instance func NewPaperContentRestoreType(Description string) *PaperContentRestoreType { s := new(PaperContentRestoreType) s.Description = Description return s } // PaperDocAddCommentDetails : Added Paper doc comment. type PaperDocAddCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewPaperDocAddCommentDetails returns a new PaperDocAddCommentDetails instance func NewPaperDocAddCommentDetails(EventUuid string) *PaperDocAddCommentDetails { s := new(PaperDocAddCommentDetails) s.EventUuid = EventUuid return s } // PaperDocAddCommentType : has no documentation (yet) type PaperDocAddCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocAddCommentType returns a new PaperDocAddCommentType instance func NewPaperDocAddCommentType(Description string) *PaperDocAddCommentType { s := new(PaperDocAddCommentType) s.Description = Description return s } // PaperDocChangeMemberRoleDetails : Changed team member permissions for Paper // doc. type PaperDocChangeMemberRoleDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // AccessType : Paper doc access type. AccessType *PaperAccessType `json:"access_type"` } // NewPaperDocChangeMemberRoleDetails returns a new PaperDocChangeMemberRoleDetails instance func NewPaperDocChangeMemberRoleDetails(EventUuid string, AccessType *PaperAccessType) *PaperDocChangeMemberRoleDetails { s := new(PaperDocChangeMemberRoleDetails) s.EventUuid = EventUuid s.AccessType = AccessType return s } // PaperDocChangeMemberRoleType : has no documentation (yet) type PaperDocChangeMemberRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocChangeMemberRoleType returns a new PaperDocChangeMemberRoleType instance func NewPaperDocChangeMemberRoleType(Description string) *PaperDocChangeMemberRoleType { s := new(PaperDocChangeMemberRoleType) s.Description = Description return s } // PaperDocChangeSharingPolicyDetails : Changed sharing setting for Paper doc. type PaperDocChangeSharingPolicyDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // PublicSharingPolicy : Sharing policy with external users. Might be // missing due to historical data gap. PublicSharingPolicy string `json:"public_sharing_policy,omitempty"` // TeamSharingPolicy : Sharing policy with team. Might be missing due to // historical data gap. TeamSharingPolicy string `json:"team_sharing_policy,omitempty"` } // NewPaperDocChangeSharingPolicyDetails returns a new PaperDocChangeSharingPolicyDetails instance func NewPaperDocChangeSharingPolicyDetails(EventUuid string) *PaperDocChangeSharingPolicyDetails { s := new(PaperDocChangeSharingPolicyDetails) s.EventUuid = EventUuid return s } // PaperDocChangeSharingPolicyType : has no documentation (yet) type PaperDocChangeSharingPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocChangeSharingPolicyType returns a new PaperDocChangeSharingPolicyType instance func NewPaperDocChangeSharingPolicyType(Description string) *PaperDocChangeSharingPolicyType { s := new(PaperDocChangeSharingPolicyType) s.Description = Description return s } // PaperDocChangeSubscriptionDetails : Followed/unfollowed Paper doc. type PaperDocChangeSubscriptionDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // NewSubscriptionLevel : New doc subscription level. NewSubscriptionLevel string `json:"new_subscription_level"` // PreviousSubscriptionLevel : Previous doc subscription level. Might be // missing due to historical data gap. PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"` } // NewPaperDocChangeSubscriptionDetails returns a new PaperDocChangeSubscriptionDetails instance func NewPaperDocChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperDocChangeSubscriptionDetails { s := new(PaperDocChangeSubscriptionDetails) s.EventUuid = EventUuid s.NewSubscriptionLevel = NewSubscriptionLevel return s } // PaperDocChangeSubscriptionType : has no documentation (yet) type PaperDocChangeSubscriptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocChangeSubscriptionType returns a new PaperDocChangeSubscriptionType instance func NewPaperDocChangeSubscriptionType(Description string) *PaperDocChangeSubscriptionType { s := new(PaperDocChangeSubscriptionType) s.Description = Description return s } // PaperDocDeleteCommentDetails : Deleted Paper doc comment. type PaperDocDeleteCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewPaperDocDeleteCommentDetails returns a new PaperDocDeleteCommentDetails instance func NewPaperDocDeleteCommentDetails(EventUuid string) *PaperDocDeleteCommentDetails { s := new(PaperDocDeleteCommentDetails) s.EventUuid = EventUuid return s } // PaperDocDeleteCommentType : has no documentation (yet) type PaperDocDeleteCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocDeleteCommentType returns a new PaperDocDeleteCommentType instance func NewPaperDocDeleteCommentType(Description string) *PaperDocDeleteCommentType { s := new(PaperDocDeleteCommentType) s.Description = Description return s } // PaperDocDeletedDetails : Archived Paper doc. type PaperDocDeletedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocDeletedDetails returns a new PaperDocDeletedDetails instance func NewPaperDocDeletedDetails(EventUuid string) *PaperDocDeletedDetails { s := new(PaperDocDeletedDetails) s.EventUuid = EventUuid return s } // PaperDocDeletedType : has no documentation (yet) type PaperDocDeletedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocDeletedType returns a new PaperDocDeletedType instance func NewPaperDocDeletedType(Description string) *PaperDocDeletedType { s := new(PaperDocDeletedType) s.Description = Description return s } // PaperDocDownloadDetails : Downloaded Paper doc in specific format. type PaperDocDownloadDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // ExportFileFormat : Export file format. ExportFileFormat *PaperDownloadFormat `json:"export_file_format"` } // NewPaperDocDownloadDetails returns a new PaperDocDownloadDetails instance func NewPaperDocDownloadDetails(EventUuid string, ExportFileFormat *PaperDownloadFormat) *PaperDocDownloadDetails { s := new(PaperDocDownloadDetails) s.EventUuid = EventUuid s.ExportFileFormat = ExportFileFormat return s } // PaperDocDownloadType : has no documentation (yet) type PaperDocDownloadType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocDownloadType returns a new PaperDocDownloadType instance func NewPaperDocDownloadType(Description string) *PaperDocDownloadType { s := new(PaperDocDownloadType) s.Description = Description return s } // PaperDocEditCommentDetails : Edited Paper doc comment. type PaperDocEditCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewPaperDocEditCommentDetails returns a new PaperDocEditCommentDetails instance func NewPaperDocEditCommentDetails(EventUuid string) *PaperDocEditCommentDetails { s := new(PaperDocEditCommentDetails) s.EventUuid = EventUuid return s } // PaperDocEditCommentType : has no documentation (yet) type PaperDocEditCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocEditCommentType returns a new PaperDocEditCommentType instance func NewPaperDocEditCommentType(Description string) *PaperDocEditCommentType { s := new(PaperDocEditCommentType) s.Description = Description return s } // PaperDocEditDetails : Edited Paper doc. type PaperDocEditDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocEditDetails returns a new PaperDocEditDetails instance func NewPaperDocEditDetails(EventUuid string) *PaperDocEditDetails { s := new(PaperDocEditDetails) s.EventUuid = EventUuid return s } // PaperDocEditType : has no documentation (yet) type PaperDocEditType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocEditType returns a new PaperDocEditType instance func NewPaperDocEditType(Description string) *PaperDocEditType { s := new(PaperDocEditType) s.Description = Description return s } // PaperDocFollowedDetails : Followed Paper doc. type PaperDocFollowedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocFollowedDetails returns a new PaperDocFollowedDetails instance func NewPaperDocFollowedDetails(EventUuid string) *PaperDocFollowedDetails { s := new(PaperDocFollowedDetails) s.EventUuid = EventUuid return s } // PaperDocFollowedType : has no documentation (yet) type PaperDocFollowedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocFollowedType returns a new PaperDocFollowedType instance func NewPaperDocFollowedType(Description string) *PaperDocFollowedType { s := new(PaperDocFollowedType) s.Description = Description return s } // PaperDocMentionDetails : Mentioned team member in Paper doc. type PaperDocMentionDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocMentionDetails returns a new PaperDocMentionDetails instance func NewPaperDocMentionDetails(EventUuid string) *PaperDocMentionDetails { s := new(PaperDocMentionDetails) s.EventUuid = EventUuid return s } // PaperDocMentionType : has no documentation (yet) type PaperDocMentionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocMentionType returns a new PaperDocMentionType instance func NewPaperDocMentionType(Description string) *PaperDocMentionType { s := new(PaperDocMentionType) s.Description = Description return s } // PaperDocOwnershipChangedDetails : Transferred ownership of Paper doc. type PaperDocOwnershipChangedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // OldOwnerUserId : Previous owner. OldOwnerUserId string `json:"old_owner_user_id,omitempty"` // NewOwnerUserId : New owner. NewOwnerUserId string `json:"new_owner_user_id"` } // NewPaperDocOwnershipChangedDetails returns a new PaperDocOwnershipChangedDetails instance func NewPaperDocOwnershipChangedDetails(EventUuid string, NewOwnerUserId string) *PaperDocOwnershipChangedDetails { s := new(PaperDocOwnershipChangedDetails) s.EventUuid = EventUuid s.NewOwnerUserId = NewOwnerUserId return s } // PaperDocOwnershipChangedType : has no documentation (yet) type PaperDocOwnershipChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocOwnershipChangedType returns a new PaperDocOwnershipChangedType instance func NewPaperDocOwnershipChangedType(Description string) *PaperDocOwnershipChangedType { s := new(PaperDocOwnershipChangedType) s.Description = Description return s } // PaperDocRequestAccessDetails : Requested access to Paper doc. type PaperDocRequestAccessDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocRequestAccessDetails returns a new PaperDocRequestAccessDetails instance func NewPaperDocRequestAccessDetails(EventUuid string) *PaperDocRequestAccessDetails { s := new(PaperDocRequestAccessDetails) s.EventUuid = EventUuid return s } // PaperDocRequestAccessType : has no documentation (yet) type PaperDocRequestAccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocRequestAccessType returns a new PaperDocRequestAccessType instance func NewPaperDocRequestAccessType(Description string) *PaperDocRequestAccessType { s := new(PaperDocRequestAccessType) s.Description = Description return s } // PaperDocResolveCommentDetails : Resolved Paper doc comment. type PaperDocResolveCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewPaperDocResolveCommentDetails returns a new PaperDocResolveCommentDetails instance func NewPaperDocResolveCommentDetails(EventUuid string) *PaperDocResolveCommentDetails { s := new(PaperDocResolveCommentDetails) s.EventUuid = EventUuid return s } // PaperDocResolveCommentType : has no documentation (yet) type PaperDocResolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocResolveCommentType returns a new PaperDocResolveCommentType instance func NewPaperDocResolveCommentType(Description string) *PaperDocResolveCommentType { s := new(PaperDocResolveCommentType) s.Description = Description return s } // PaperDocRevertDetails : Restored Paper doc to previous version. type PaperDocRevertDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocRevertDetails returns a new PaperDocRevertDetails instance func NewPaperDocRevertDetails(EventUuid string) *PaperDocRevertDetails { s := new(PaperDocRevertDetails) s.EventUuid = EventUuid return s } // PaperDocRevertType : has no documentation (yet) type PaperDocRevertType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocRevertType returns a new PaperDocRevertType instance func NewPaperDocRevertType(Description string) *PaperDocRevertType { s := new(PaperDocRevertType) s.Description = Description return s } // PaperDocSlackShareDetails : Shared Paper doc via Slack. type PaperDocSlackShareDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocSlackShareDetails returns a new PaperDocSlackShareDetails instance func NewPaperDocSlackShareDetails(EventUuid string) *PaperDocSlackShareDetails { s := new(PaperDocSlackShareDetails) s.EventUuid = EventUuid return s } // PaperDocSlackShareType : has no documentation (yet) type PaperDocSlackShareType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocSlackShareType returns a new PaperDocSlackShareType instance func NewPaperDocSlackShareType(Description string) *PaperDocSlackShareType { s := new(PaperDocSlackShareType) s.Description = Description return s } // PaperDocTeamInviteDetails : Shared Paper doc with team member. type PaperDocTeamInviteDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocTeamInviteDetails returns a new PaperDocTeamInviteDetails instance func NewPaperDocTeamInviteDetails(EventUuid string) *PaperDocTeamInviteDetails { s := new(PaperDocTeamInviteDetails) s.EventUuid = EventUuid return s } // PaperDocTeamInviteType : has no documentation (yet) type PaperDocTeamInviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocTeamInviteType returns a new PaperDocTeamInviteType instance func NewPaperDocTeamInviteType(Description string) *PaperDocTeamInviteType { s := new(PaperDocTeamInviteType) s.Description = Description return s } // PaperDocTrashedDetails : Deleted Paper doc. type PaperDocTrashedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocTrashedDetails returns a new PaperDocTrashedDetails instance func NewPaperDocTrashedDetails(EventUuid string) *PaperDocTrashedDetails { s := new(PaperDocTrashedDetails) s.EventUuid = EventUuid return s } // PaperDocTrashedType : has no documentation (yet) type PaperDocTrashedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocTrashedType returns a new PaperDocTrashedType instance func NewPaperDocTrashedType(Description string) *PaperDocTrashedType { s := new(PaperDocTrashedType) s.Description = Description return s } // PaperDocUnresolveCommentDetails : Unresolved Paper doc comment. type PaperDocUnresolveCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. Might be missing due to historical data gap. CommentText string `json:"comment_text,omitempty"` } // NewPaperDocUnresolveCommentDetails returns a new PaperDocUnresolveCommentDetails instance func NewPaperDocUnresolveCommentDetails(EventUuid string) *PaperDocUnresolveCommentDetails { s := new(PaperDocUnresolveCommentDetails) s.EventUuid = EventUuid return s } // PaperDocUnresolveCommentType : has no documentation (yet) type PaperDocUnresolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocUnresolveCommentType returns a new PaperDocUnresolveCommentType instance func NewPaperDocUnresolveCommentType(Description string) *PaperDocUnresolveCommentType { s := new(PaperDocUnresolveCommentType) s.Description = Description return s } // PaperDocUntrashedDetails : Restored Paper doc. type PaperDocUntrashedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocUntrashedDetails returns a new PaperDocUntrashedDetails instance func NewPaperDocUntrashedDetails(EventUuid string) *PaperDocUntrashedDetails { s := new(PaperDocUntrashedDetails) s.EventUuid = EventUuid return s } // PaperDocUntrashedType : has no documentation (yet) type PaperDocUntrashedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocUntrashedType returns a new PaperDocUntrashedType instance func NewPaperDocUntrashedType(Description string) *PaperDocUntrashedType { s := new(PaperDocUntrashedType) s.Description = Description return s } // PaperDocViewDetails : Viewed Paper doc. type PaperDocViewDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperDocViewDetails returns a new PaperDocViewDetails instance func NewPaperDocViewDetails(EventUuid string) *PaperDocViewDetails { s := new(PaperDocViewDetails) s.EventUuid = EventUuid return s } // PaperDocViewType : has no documentation (yet) type PaperDocViewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperDocViewType returns a new PaperDocViewType instance func NewPaperDocViewType(Description string) *PaperDocViewType { s := new(PaperDocViewType) s.Description = Description return s } // PaperDocumentLogInfo : Paper document's logged information. type PaperDocumentLogInfo struct { // DocId : Papers document Id. DocId string `json:"doc_id"` // DocTitle : Paper document title. DocTitle string `json:"doc_title"` } // NewPaperDocumentLogInfo returns a new PaperDocumentLogInfo instance func NewPaperDocumentLogInfo(DocId string, DocTitle string) *PaperDocumentLogInfo { s := new(PaperDocumentLogInfo) s.DocId = DocId s.DocTitle = DocTitle return s } // PaperDownloadFormat : has no documentation (yet) type PaperDownloadFormat struct { dropbox.Tagged } // Valid tag values for PaperDownloadFormat const ( PaperDownloadFormatDocx = "docx" PaperDownloadFormatHtml = "html" PaperDownloadFormatMarkdown = "markdown" PaperDownloadFormatPdf = "pdf" PaperDownloadFormatOther = "other" ) // PaperEnabledUsersGroupAdditionDetails : Added users to Paper-enabled users // list. type PaperEnabledUsersGroupAdditionDetails struct { } // NewPaperEnabledUsersGroupAdditionDetails returns a new PaperEnabledUsersGroupAdditionDetails instance func NewPaperEnabledUsersGroupAdditionDetails() *PaperEnabledUsersGroupAdditionDetails { s := new(PaperEnabledUsersGroupAdditionDetails) return s } // PaperEnabledUsersGroupAdditionType : has no documentation (yet) type PaperEnabledUsersGroupAdditionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperEnabledUsersGroupAdditionType returns a new PaperEnabledUsersGroupAdditionType instance func NewPaperEnabledUsersGroupAdditionType(Description string) *PaperEnabledUsersGroupAdditionType { s := new(PaperEnabledUsersGroupAdditionType) s.Description = Description return s } // PaperEnabledUsersGroupRemovalDetails : Removed users from Paper-enabled users // list. type PaperEnabledUsersGroupRemovalDetails struct { } // NewPaperEnabledUsersGroupRemovalDetails returns a new PaperEnabledUsersGroupRemovalDetails instance func NewPaperEnabledUsersGroupRemovalDetails() *PaperEnabledUsersGroupRemovalDetails { s := new(PaperEnabledUsersGroupRemovalDetails) return s } // PaperEnabledUsersGroupRemovalType : has no documentation (yet) type PaperEnabledUsersGroupRemovalType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperEnabledUsersGroupRemovalType returns a new PaperEnabledUsersGroupRemovalType instance func NewPaperEnabledUsersGroupRemovalType(Description string) *PaperEnabledUsersGroupRemovalType { s := new(PaperEnabledUsersGroupRemovalType) s.Description = Description return s } // PaperExternalViewAllowDetails : Changed Paper external sharing setting to // anyone. type PaperExternalViewAllowDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperExternalViewAllowDetails returns a new PaperExternalViewAllowDetails instance func NewPaperExternalViewAllowDetails(EventUuid string) *PaperExternalViewAllowDetails { s := new(PaperExternalViewAllowDetails) s.EventUuid = EventUuid return s } // PaperExternalViewAllowType : has no documentation (yet) type PaperExternalViewAllowType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperExternalViewAllowType returns a new PaperExternalViewAllowType instance func NewPaperExternalViewAllowType(Description string) *PaperExternalViewAllowType { s := new(PaperExternalViewAllowType) s.Description = Description return s } // PaperExternalViewDefaultTeamDetails : Changed Paper external sharing setting // to default team. type PaperExternalViewDefaultTeamDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperExternalViewDefaultTeamDetails returns a new PaperExternalViewDefaultTeamDetails instance func NewPaperExternalViewDefaultTeamDetails(EventUuid string) *PaperExternalViewDefaultTeamDetails { s := new(PaperExternalViewDefaultTeamDetails) s.EventUuid = EventUuid return s } // PaperExternalViewDefaultTeamType : has no documentation (yet) type PaperExternalViewDefaultTeamType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperExternalViewDefaultTeamType returns a new PaperExternalViewDefaultTeamType instance func NewPaperExternalViewDefaultTeamType(Description string) *PaperExternalViewDefaultTeamType { s := new(PaperExternalViewDefaultTeamType) s.Description = Description return s } // PaperExternalViewForbidDetails : Changed Paper external sharing setting to // team-only. type PaperExternalViewForbidDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperExternalViewForbidDetails returns a new PaperExternalViewForbidDetails instance func NewPaperExternalViewForbidDetails(EventUuid string) *PaperExternalViewForbidDetails { s := new(PaperExternalViewForbidDetails) s.EventUuid = EventUuid return s } // PaperExternalViewForbidType : has no documentation (yet) type PaperExternalViewForbidType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperExternalViewForbidType returns a new PaperExternalViewForbidType instance func NewPaperExternalViewForbidType(Description string) *PaperExternalViewForbidType { s := new(PaperExternalViewForbidType) s.Description = Description return s } // PaperFolderChangeSubscriptionDetails : Followed/unfollowed Paper folder. type PaperFolderChangeSubscriptionDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // NewSubscriptionLevel : New folder subscription level. NewSubscriptionLevel string `json:"new_subscription_level"` // PreviousSubscriptionLevel : Previous folder subscription level. Might be // missing due to historical data gap. PreviousSubscriptionLevel string `json:"previous_subscription_level,omitempty"` } // NewPaperFolderChangeSubscriptionDetails returns a new PaperFolderChangeSubscriptionDetails instance func NewPaperFolderChangeSubscriptionDetails(EventUuid string, NewSubscriptionLevel string) *PaperFolderChangeSubscriptionDetails { s := new(PaperFolderChangeSubscriptionDetails) s.EventUuid = EventUuid s.NewSubscriptionLevel = NewSubscriptionLevel return s } // PaperFolderChangeSubscriptionType : has no documentation (yet) type PaperFolderChangeSubscriptionType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperFolderChangeSubscriptionType returns a new PaperFolderChangeSubscriptionType instance func NewPaperFolderChangeSubscriptionType(Description string) *PaperFolderChangeSubscriptionType { s := new(PaperFolderChangeSubscriptionType) s.Description = Description return s } // PaperFolderDeletedDetails : Archived Paper folder. type PaperFolderDeletedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperFolderDeletedDetails returns a new PaperFolderDeletedDetails instance func NewPaperFolderDeletedDetails(EventUuid string) *PaperFolderDeletedDetails { s := new(PaperFolderDeletedDetails) s.EventUuid = EventUuid return s } // PaperFolderDeletedType : has no documentation (yet) type PaperFolderDeletedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperFolderDeletedType returns a new PaperFolderDeletedType instance func NewPaperFolderDeletedType(Description string) *PaperFolderDeletedType { s := new(PaperFolderDeletedType) s.Description = Description return s } // PaperFolderFollowedDetails : Followed Paper folder. type PaperFolderFollowedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperFolderFollowedDetails returns a new PaperFolderFollowedDetails instance func NewPaperFolderFollowedDetails(EventUuid string) *PaperFolderFollowedDetails { s := new(PaperFolderFollowedDetails) s.EventUuid = EventUuid return s } // PaperFolderFollowedType : has no documentation (yet) type PaperFolderFollowedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperFolderFollowedType returns a new PaperFolderFollowedType instance func NewPaperFolderFollowedType(Description string) *PaperFolderFollowedType { s := new(PaperFolderFollowedType) s.Description = Description return s } // PaperFolderLogInfo : Paper folder's logged information. type PaperFolderLogInfo struct { // FolderId : Papers folder Id. FolderId string `json:"folder_id"` // FolderName : Paper folder name. FolderName string `json:"folder_name"` } // NewPaperFolderLogInfo returns a new PaperFolderLogInfo instance func NewPaperFolderLogInfo(FolderId string, FolderName string) *PaperFolderLogInfo { s := new(PaperFolderLogInfo) s.FolderId = FolderId s.FolderName = FolderName return s } // PaperFolderTeamInviteDetails : Shared Paper folder with member. type PaperFolderTeamInviteDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewPaperFolderTeamInviteDetails returns a new PaperFolderTeamInviteDetails instance func NewPaperFolderTeamInviteDetails(EventUuid string) *PaperFolderTeamInviteDetails { s := new(PaperFolderTeamInviteDetails) s.EventUuid = EventUuid return s } // PaperFolderTeamInviteType : has no documentation (yet) type PaperFolderTeamInviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPaperFolderTeamInviteType returns a new PaperFolderTeamInviteType instance func NewPaperFolderTeamInviteType(Description string) *PaperFolderTeamInviteType { s := new(PaperFolderTeamInviteType) s.Description = Description return s } // PaperMemberPolicy : Policy for controlling if team members can share Paper // documents externally. type PaperMemberPolicy struct { dropbox.Tagged } // Valid tag values for PaperMemberPolicy const ( PaperMemberPolicyAnyoneWithLink = "anyone_with_link" PaperMemberPolicyOnlyTeam = "only_team" PaperMemberPolicyTeamAndExplicitlyShared = "team_and_explicitly_shared" PaperMemberPolicyOther = "other" ) // ParticipantLogInfo : A user or group type ParticipantLogInfo struct { dropbox.Tagged // User : A user with a Dropbox account. User IsUserLogInfo `json:"user,omitempty"` // Group : Group details. Group *GroupLogInfo `json:"group,omitempty"` } // Valid tag values for ParticipantLogInfo const ( ParticipantLogInfoUser = "user" ParticipantLogInfoGroup = "group" ParticipantLogInfoOther = "other" ) // UnmarshalJSON deserializes into a ParticipantLogInfo instance func (u *ParticipantLogInfo) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // User : A user with a Dropbox account. User json.RawMessage `json:"user,omitempty"` // Group : Group details. Group json.RawMessage `json:"group,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "user": u.User, err = IsUserLogInfoFromJSON(body) if err != nil { return err } case "group": err = json.Unmarshal(body, &u.Group) if err != nil { return err } } return nil } // PassPolicy : has no documentation (yet) type PassPolicy struct { dropbox.Tagged } // Valid tag values for PassPolicy const ( PassPolicyEnabled = "enabled" PassPolicyAllow = "allow" PassPolicyDisabled = "disabled" PassPolicyOther = "other" ) // PasswordChangeDetails : Changed password. type PasswordChangeDetails struct { } // NewPasswordChangeDetails returns a new PasswordChangeDetails instance func NewPasswordChangeDetails() *PasswordChangeDetails { s := new(PasswordChangeDetails) return s } // PasswordChangeType : has no documentation (yet) type PasswordChangeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPasswordChangeType returns a new PasswordChangeType instance func NewPasswordChangeType(Description string) *PasswordChangeType { s := new(PasswordChangeType) s.Description = Description return s } // PasswordResetAllDetails : Reset all team member passwords. type PasswordResetAllDetails struct { } // NewPasswordResetAllDetails returns a new PasswordResetAllDetails instance func NewPasswordResetAllDetails() *PasswordResetAllDetails { s := new(PasswordResetAllDetails) return s } // PasswordResetAllType : has no documentation (yet) type PasswordResetAllType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPasswordResetAllType returns a new PasswordResetAllType instance func NewPasswordResetAllType(Description string) *PasswordResetAllType { s := new(PasswordResetAllType) s.Description = Description return s } // PasswordResetDetails : Reset password. type PasswordResetDetails struct { } // NewPasswordResetDetails returns a new PasswordResetDetails instance func NewPasswordResetDetails() *PasswordResetDetails { s := new(PasswordResetDetails) return s } // PasswordResetType : has no documentation (yet) type PasswordResetType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPasswordResetType returns a new PasswordResetType instance func NewPasswordResetType(Description string) *PasswordResetType { s := new(PasswordResetType) s.Description = Description return s } // PathLogInfo : Path's details. type PathLogInfo struct { // Contextual : Fully qualified path relative to event's context. Might be // missing due to historical data gap. Contextual string `json:"contextual,omitempty"` // NamespaceRelative : Path relative to the namespace containing the // content. NamespaceRelative *NamespaceRelativePathLogInfo `json:"namespace_relative"` } // NewPathLogInfo returns a new PathLogInfo instance func NewPathLogInfo(NamespaceRelative *NamespaceRelativePathLogInfo) *PathLogInfo { s := new(PathLogInfo) s.NamespaceRelative = NamespaceRelative return s } // PermanentDeleteChangePolicyDetails : Enabled/disabled ability of team members // to permanently delete content. type PermanentDeleteChangePolicyDetails struct { // NewValue : New permanent delete content policy. NewValue *ContentPermanentDeletePolicy `json:"new_value"` // PreviousValue : Previous permanent delete content policy. Might be // missing due to historical data gap. PreviousValue *ContentPermanentDeletePolicy `json:"previous_value,omitempty"` } // NewPermanentDeleteChangePolicyDetails returns a new PermanentDeleteChangePolicyDetails instance func NewPermanentDeleteChangePolicyDetails(NewValue *ContentPermanentDeletePolicy) *PermanentDeleteChangePolicyDetails { s := new(PermanentDeleteChangePolicyDetails) s.NewValue = NewValue return s } // PermanentDeleteChangePolicyType : has no documentation (yet) type PermanentDeleteChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewPermanentDeleteChangePolicyType returns a new PermanentDeleteChangePolicyType instance func NewPermanentDeleteChangePolicyType(Description string) *PermanentDeleteChangePolicyType { s := new(PermanentDeleteChangePolicyType) s.Description = Description return s } // PlacementRestriction : has no documentation (yet) type PlacementRestriction struct { dropbox.Tagged } // Valid tag values for PlacementRestriction const ( PlacementRestrictionEuropeOnly = "europe_only" PlacementRestrictionNone = "none" PlacementRestrictionOther = "other" ) // QuickActionType : Quick action type. type QuickActionType struct { dropbox.Tagged } // Valid tag values for QuickActionType const ( QuickActionTypeDeleteSharedLink = "delete_shared_link" QuickActionTypeOther = "other" ) // RelocateAssetReferencesLogInfo : Provides the indices of the source asset and // the destination asset for a relocate action. type RelocateAssetReferencesLogInfo struct { // SrcAssetIndex : Source asset position in the Assets list. SrcAssetIndex uint64 `json:"src_asset_index"` // DestAssetIndex : Destination asset position in the Assets list. DestAssetIndex uint64 `json:"dest_asset_index"` } // NewRelocateAssetReferencesLogInfo returns a new RelocateAssetReferencesLogInfo instance func NewRelocateAssetReferencesLogInfo(SrcAssetIndex uint64, DestAssetIndex uint64) *RelocateAssetReferencesLogInfo { s := new(RelocateAssetReferencesLogInfo) s.SrcAssetIndex = SrcAssetIndex s.DestAssetIndex = DestAssetIndex return s } // ResellerLogInfo : Reseller information. type ResellerLogInfo struct { // ResellerName : Reseller name. ResellerName string `json:"reseller_name"` // ResellerEmail : Reseller email. ResellerEmail string `json:"reseller_email"` } // NewResellerLogInfo returns a new ResellerLogInfo instance func NewResellerLogInfo(ResellerName string, ResellerEmail string) *ResellerLogInfo { s := new(ResellerLogInfo) s.ResellerName = ResellerName s.ResellerEmail = ResellerEmail return s } // ResellerSupportSessionEndDetails : Ended reseller support session. type ResellerSupportSessionEndDetails struct { } // NewResellerSupportSessionEndDetails returns a new ResellerSupportSessionEndDetails instance func NewResellerSupportSessionEndDetails() *ResellerSupportSessionEndDetails { s := new(ResellerSupportSessionEndDetails) return s } // ResellerSupportSessionEndType : has no documentation (yet) type ResellerSupportSessionEndType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewResellerSupportSessionEndType returns a new ResellerSupportSessionEndType instance func NewResellerSupportSessionEndType(Description string) *ResellerSupportSessionEndType { s := new(ResellerSupportSessionEndType) s.Description = Description return s } // ResellerSupportSessionStartDetails : Started reseller support session. type ResellerSupportSessionStartDetails struct { } // NewResellerSupportSessionStartDetails returns a new ResellerSupportSessionStartDetails instance func NewResellerSupportSessionStartDetails() *ResellerSupportSessionStartDetails { s := new(ResellerSupportSessionStartDetails) return s } // ResellerSupportSessionStartType : has no documentation (yet) type ResellerSupportSessionStartType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewResellerSupportSessionStartType returns a new ResellerSupportSessionStartType instance func NewResellerSupportSessionStartType(Description string) *ResellerSupportSessionStartType { s := new(ResellerSupportSessionStartType) s.Description = Description return s } // SecondaryMailsPolicy : has no documentation (yet) type SecondaryMailsPolicy struct { dropbox.Tagged } // Valid tag values for SecondaryMailsPolicy const ( SecondaryMailsPolicyDisabled = "disabled" SecondaryMailsPolicyEnabled = "enabled" SecondaryMailsPolicyOther = "other" ) // SecondaryMailsPolicyChangedDetails : Secondary mails policy changed. type SecondaryMailsPolicyChangedDetails struct { // PreviousValue : Previous secondary mails policy. PreviousValue *SecondaryMailsPolicy `json:"previous_value"` // NewValue : New secondary mails policy. NewValue *SecondaryMailsPolicy `json:"new_value"` } // NewSecondaryMailsPolicyChangedDetails returns a new SecondaryMailsPolicyChangedDetails instance func NewSecondaryMailsPolicyChangedDetails(PreviousValue *SecondaryMailsPolicy, NewValue *SecondaryMailsPolicy) *SecondaryMailsPolicyChangedDetails { s := new(SecondaryMailsPolicyChangedDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // SecondaryMailsPolicyChangedType : has no documentation (yet) type SecondaryMailsPolicyChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSecondaryMailsPolicyChangedType returns a new SecondaryMailsPolicyChangedType instance func NewSecondaryMailsPolicyChangedType(Description string) *SecondaryMailsPolicyChangedType { s := new(SecondaryMailsPolicyChangedType) s.Description = Description return s } // SfAddGroupDetails : Added team to shared folder. type SfAddGroupDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // SharingPermission : Sharing permission. Might be missing due to // historical data gap. SharingPermission string `json:"sharing_permission,omitempty"` // TeamName : Team name. TeamName string `json:"team_name"` } // NewSfAddGroupDetails returns a new SfAddGroupDetails instance func NewSfAddGroupDetails(TargetAssetIndex uint64, OriginalFolderName string, TeamName string) *SfAddGroupDetails { s := new(SfAddGroupDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName s.TeamName = TeamName return s } // SfAddGroupType : has no documentation (yet) type SfAddGroupType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfAddGroupType returns a new SfAddGroupType instance func NewSfAddGroupType(Description string) *SfAddGroupType { s := new(SfAddGroupType) s.Description = Description return s } // SfAllowNonMembersToViewSharedLinksDetails : Allowed non-collaborators to view // links to files in shared folder. type SfAllowNonMembersToViewSharedLinksDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // SharedFolderType : Shared folder type. Might be missing due to historical // data gap. SharedFolderType string `json:"shared_folder_type,omitempty"` } // NewSfAllowNonMembersToViewSharedLinksDetails returns a new SfAllowNonMembersToViewSharedLinksDetails instance func NewSfAllowNonMembersToViewSharedLinksDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfAllowNonMembersToViewSharedLinksDetails { s := new(SfAllowNonMembersToViewSharedLinksDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfAllowNonMembersToViewSharedLinksType : has no documentation (yet) type SfAllowNonMembersToViewSharedLinksType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfAllowNonMembersToViewSharedLinksType returns a new SfAllowNonMembersToViewSharedLinksType instance func NewSfAllowNonMembersToViewSharedLinksType(Description string) *SfAllowNonMembersToViewSharedLinksType { s := new(SfAllowNonMembersToViewSharedLinksType) s.Description = Description return s } // SfExternalInviteWarnDetails : Set team members to see warning before sharing // folders outside team. type SfExternalInviteWarnDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // NewSharingPermission : New sharing permission. Might be missing due to // historical data gap. NewSharingPermission string `json:"new_sharing_permission,omitempty"` // PreviousSharingPermission : Previous sharing permission. Might be missing // due to historical data gap. PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"` } // NewSfExternalInviteWarnDetails returns a new SfExternalInviteWarnDetails instance func NewSfExternalInviteWarnDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfExternalInviteWarnDetails { s := new(SfExternalInviteWarnDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfExternalInviteWarnType : has no documentation (yet) type SfExternalInviteWarnType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfExternalInviteWarnType returns a new SfExternalInviteWarnType instance func NewSfExternalInviteWarnType(Description string) *SfExternalInviteWarnType { s := new(SfExternalInviteWarnType) s.Description = Description return s } // SfFbInviteChangeRoleDetails : Changed Facebook user's role in shared folder. type SfFbInviteChangeRoleDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // PreviousSharingPermission : Previous sharing permission. Might be missing // due to historical data gap. PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"` // NewSharingPermission : New sharing permission. Might be missing due to // historical data gap. NewSharingPermission string `json:"new_sharing_permission,omitempty"` } // NewSfFbInviteChangeRoleDetails returns a new SfFbInviteChangeRoleDetails instance func NewSfFbInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteChangeRoleDetails { s := new(SfFbInviteChangeRoleDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfFbInviteChangeRoleType : has no documentation (yet) type SfFbInviteChangeRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfFbInviteChangeRoleType returns a new SfFbInviteChangeRoleType instance func NewSfFbInviteChangeRoleType(Description string) *SfFbInviteChangeRoleType { s := new(SfFbInviteChangeRoleType) s.Description = Description return s } // SfFbInviteDetails : Invited Facebook users to shared folder. type SfFbInviteDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // SharingPermission : Sharing permission. Might be missing due to // historical data gap. SharingPermission string `json:"sharing_permission,omitempty"` } // NewSfFbInviteDetails returns a new SfFbInviteDetails instance func NewSfFbInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbInviteDetails { s := new(SfFbInviteDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfFbInviteType : has no documentation (yet) type SfFbInviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfFbInviteType returns a new SfFbInviteType instance func NewSfFbInviteType(Description string) *SfFbInviteType { s := new(SfFbInviteType) s.Description = Description return s } // SfFbUninviteDetails : Uninvited Facebook user from shared folder. type SfFbUninviteDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` } // NewSfFbUninviteDetails returns a new SfFbUninviteDetails instance func NewSfFbUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfFbUninviteDetails { s := new(SfFbUninviteDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfFbUninviteType : has no documentation (yet) type SfFbUninviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfFbUninviteType returns a new SfFbUninviteType instance func NewSfFbUninviteType(Description string) *SfFbUninviteType { s := new(SfFbUninviteType) s.Description = Description return s } // SfInviteGroupDetails : Invited group to shared folder. type SfInviteGroupDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` } // NewSfInviteGroupDetails returns a new SfInviteGroupDetails instance func NewSfInviteGroupDetails(TargetAssetIndex uint64) *SfInviteGroupDetails { s := new(SfInviteGroupDetails) s.TargetAssetIndex = TargetAssetIndex return s } // SfInviteGroupType : has no documentation (yet) type SfInviteGroupType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfInviteGroupType returns a new SfInviteGroupType instance func NewSfInviteGroupType(Description string) *SfInviteGroupType { s := new(SfInviteGroupType) s.Description = Description return s } // SfTeamGrantAccessDetails : Granted access to shared folder. type SfTeamGrantAccessDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` } // NewSfTeamGrantAccessDetails returns a new SfTeamGrantAccessDetails instance func NewSfTeamGrantAccessDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamGrantAccessDetails { s := new(SfTeamGrantAccessDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamGrantAccessType : has no documentation (yet) type SfTeamGrantAccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamGrantAccessType returns a new SfTeamGrantAccessType instance func NewSfTeamGrantAccessType(Description string) *SfTeamGrantAccessType { s := new(SfTeamGrantAccessType) s.Description = Description return s } // SfTeamInviteChangeRoleDetails : Changed team member's role in shared folder. type SfTeamInviteChangeRoleDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // NewSharingPermission : New sharing permission. Might be missing due to // historical data gap. NewSharingPermission string `json:"new_sharing_permission,omitempty"` // PreviousSharingPermission : Previous sharing permission. Might be missing // due to historical data gap. PreviousSharingPermission string `json:"previous_sharing_permission,omitempty"` } // NewSfTeamInviteChangeRoleDetails returns a new SfTeamInviteChangeRoleDetails instance func NewSfTeamInviteChangeRoleDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteChangeRoleDetails { s := new(SfTeamInviteChangeRoleDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamInviteChangeRoleType : has no documentation (yet) type SfTeamInviteChangeRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamInviteChangeRoleType returns a new SfTeamInviteChangeRoleType instance func NewSfTeamInviteChangeRoleType(Description string) *SfTeamInviteChangeRoleType { s := new(SfTeamInviteChangeRoleType) s.Description = Description return s } // SfTeamInviteDetails : Invited team members to shared folder. type SfTeamInviteDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // SharingPermission : Sharing permission. Might be missing due to // historical data gap. SharingPermission string `json:"sharing_permission,omitempty"` } // NewSfTeamInviteDetails returns a new SfTeamInviteDetails instance func NewSfTeamInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteDetails { s := new(SfTeamInviteDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamInviteType : has no documentation (yet) type SfTeamInviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamInviteType returns a new SfTeamInviteType instance func NewSfTeamInviteType(Description string) *SfTeamInviteType { s := new(SfTeamInviteType) s.Description = Description return s } // SfTeamJoinDetails : Joined team member's shared folder. type SfTeamJoinDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` } // NewSfTeamJoinDetails returns a new SfTeamJoinDetails instance func NewSfTeamJoinDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinDetails { s := new(SfTeamJoinDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamJoinFromOobLinkDetails : Joined team member's shared folder from link. type SfTeamJoinFromOobLinkDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` // TokenKey : Shared link token key. TokenKey string `json:"token_key,omitempty"` // SharingPermission : Sharing permission. Might be missing due to // historical data gap. SharingPermission string `json:"sharing_permission,omitempty"` } // NewSfTeamJoinFromOobLinkDetails returns a new SfTeamJoinFromOobLinkDetails instance func NewSfTeamJoinFromOobLinkDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamJoinFromOobLinkDetails { s := new(SfTeamJoinFromOobLinkDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamJoinFromOobLinkType : has no documentation (yet) type SfTeamJoinFromOobLinkType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamJoinFromOobLinkType returns a new SfTeamJoinFromOobLinkType instance func NewSfTeamJoinFromOobLinkType(Description string) *SfTeamJoinFromOobLinkType { s := new(SfTeamJoinFromOobLinkType) s.Description = Description return s } // SfTeamJoinType : has no documentation (yet) type SfTeamJoinType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamJoinType returns a new SfTeamJoinType instance func NewSfTeamJoinType(Description string) *SfTeamJoinType { s := new(SfTeamJoinType) s.Description = Description return s } // SfTeamUninviteDetails : Unshared folder with team member. type SfTeamUninviteDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` // OriginalFolderName : Original shared folder name. OriginalFolderName string `json:"original_folder_name"` } // NewSfTeamUninviteDetails returns a new SfTeamUninviteDetails instance func NewSfTeamUninviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamUninviteDetails { s := new(SfTeamUninviteDetails) s.TargetAssetIndex = TargetAssetIndex s.OriginalFolderName = OriginalFolderName return s } // SfTeamUninviteType : has no documentation (yet) type SfTeamUninviteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSfTeamUninviteType returns a new SfTeamUninviteType instance func NewSfTeamUninviteType(Description string) *SfTeamUninviteType { s := new(SfTeamUninviteType) s.Description = Description return s } // SharedContentAddInviteesDetails : Invited user to Dropbox and added them to // shared file/folder. type SharedContentAddInviteesDetails struct { // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"` // Invitees : A list of invitees. Invitees []string `json:"invitees"` } // NewSharedContentAddInviteesDetails returns a new SharedContentAddInviteesDetails instance func NewSharedContentAddInviteesDetails(SharedContentAccessLevel *sharing.AccessLevel, Invitees []string) *SharedContentAddInviteesDetails { s := new(SharedContentAddInviteesDetails) s.SharedContentAccessLevel = SharedContentAccessLevel s.Invitees = Invitees return s } // SharedContentAddInviteesType : has no documentation (yet) type SharedContentAddInviteesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentAddInviteesType returns a new SharedContentAddInviteesType instance func NewSharedContentAddInviteesType(Description string) *SharedContentAddInviteesType { s := new(SharedContentAddInviteesType) s.Description = Description return s } // SharedContentAddLinkExpiryDetails : Added expiration date to link for shared // file/folder. type SharedContentAddLinkExpiryDetails struct { // NewValue : New shared content link expiration date. Might be missing due // to historical data gap. NewValue time.Time `json:"new_value,omitempty"` } // NewSharedContentAddLinkExpiryDetails returns a new SharedContentAddLinkExpiryDetails instance func NewSharedContentAddLinkExpiryDetails() *SharedContentAddLinkExpiryDetails { s := new(SharedContentAddLinkExpiryDetails) return s } // SharedContentAddLinkExpiryType : has no documentation (yet) type SharedContentAddLinkExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentAddLinkExpiryType returns a new SharedContentAddLinkExpiryType instance func NewSharedContentAddLinkExpiryType(Description string) *SharedContentAddLinkExpiryType { s := new(SharedContentAddLinkExpiryType) s.Description = Description return s } // SharedContentAddLinkPasswordDetails : Added password to link for shared // file/folder. type SharedContentAddLinkPasswordDetails struct { } // NewSharedContentAddLinkPasswordDetails returns a new SharedContentAddLinkPasswordDetails instance func NewSharedContentAddLinkPasswordDetails() *SharedContentAddLinkPasswordDetails { s := new(SharedContentAddLinkPasswordDetails) return s } // SharedContentAddLinkPasswordType : has no documentation (yet) type SharedContentAddLinkPasswordType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentAddLinkPasswordType returns a new SharedContentAddLinkPasswordType instance func NewSharedContentAddLinkPasswordType(Description string) *SharedContentAddLinkPasswordType { s := new(SharedContentAddLinkPasswordType) s.Description = Description return s } // SharedContentAddMemberDetails : Added users and/or groups to shared // file/folder. type SharedContentAddMemberDetails struct { // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"` } // NewSharedContentAddMemberDetails returns a new SharedContentAddMemberDetails instance func NewSharedContentAddMemberDetails(SharedContentAccessLevel *sharing.AccessLevel) *SharedContentAddMemberDetails { s := new(SharedContentAddMemberDetails) s.SharedContentAccessLevel = SharedContentAccessLevel return s } // SharedContentAddMemberType : has no documentation (yet) type SharedContentAddMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentAddMemberType returns a new SharedContentAddMemberType instance func NewSharedContentAddMemberType(Description string) *SharedContentAddMemberType { s := new(SharedContentAddMemberType) s.Description = Description return s } // SharedContentChangeDownloadsPolicyDetails : Changed whether members can // download shared file/folder. type SharedContentChangeDownloadsPolicyDetails struct { // NewValue : New downloads policy. NewValue *DownloadPolicyType `json:"new_value"` // PreviousValue : Previous downloads policy. Might be missing due to // historical data gap. PreviousValue *DownloadPolicyType `json:"previous_value,omitempty"` } // NewSharedContentChangeDownloadsPolicyDetails returns a new SharedContentChangeDownloadsPolicyDetails instance func NewSharedContentChangeDownloadsPolicyDetails(NewValue *DownloadPolicyType) *SharedContentChangeDownloadsPolicyDetails { s := new(SharedContentChangeDownloadsPolicyDetails) s.NewValue = NewValue return s } // SharedContentChangeDownloadsPolicyType : has no documentation (yet) type SharedContentChangeDownloadsPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeDownloadsPolicyType returns a new SharedContentChangeDownloadsPolicyType instance func NewSharedContentChangeDownloadsPolicyType(Description string) *SharedContentChangeDownloadsPolicyType { s := new(SharedContentChangeDownloadsPolicyType) s.Description = Description return s } // SharedContentChangeInviteeRoleDetails : Changed access type of invitee to // shared file/folder before invite was accepted. type SharedContentChangeInviteeRoleDetails struct { // PreviousAccessLevel : Previous access level. Might be missing due to // historical data gap. PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"` // NewAccessLevel : New access level. NewAccessLevel *sharing.AccessLevel `json:"new_access_level"` // Invitee : The invitee whose role was changed. Invitee string `json:"invitee"` } // NewSharedContentChangeInviteeRoleDetails returns a new SharedContentChangeInviteeRoleDetails instance func NewSharedContentChangeInviteeRoleDetails(NewAccessLevel *sharing.AccessLevel, Invitee string) *SharedContentChangeInviteeRoleDetails { s := new(SharedContentChangeInviteeRoleDetails) s.NewAccessLevel = NewAccessLevel s.Invitee = Invitee return s } // SharedContentChangeInviteeRoleType : has no documentation (yet) type SharedContentChangeInviteeRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeInviteeRoleType returns a new SharedContentChangeInviteeRoleType instance func NewSharedContentChangeInviteeRoleType(Description string) *SharedContentChangeInviteeRoleType { s := new(SharedContentChangeInviteeRoleType) s.Description = Description return s } // SharedContentChangeLinkAudienceDetails : Changed link audience of shared // file/folder. type SharedContentChangeLinkAudienceDetails struct { // NewValue : New link audience value. NewValue *sharing.LinkAudience `json:"new_value"` // PreviousValue : Previous link audience value. PreviousValue *sharing.LinkAudience `json:"previous_value,omitempty"` } // NewSharedContentChangeLinkAudienceDetails returns a new SharedContentChangeLinkAudienceDetails instance func NewSharedContentChangeLinkAudienceDetails(NewValue *sharing.LinkAudience) *SharedContentChangeLinkAudienceDetails { s := new(SharedContentChangeLinkAudienceDetails) s.NewValue = NewValue return s } // SharedContentChangeLinkAudienceType : has no documentation (yet) type SharedContentChangeLinkAudienceType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeLinkAudienceType returns a new SharedContentChangeLinkAudienceType instance func NewSharedContentChangeLinkAudienceType(Description string) *SharedContentChangeLinkAudienceType { s := new(SharedContentChangeLinkAudienceType) s.Description = Description return s } // SharedContentChangeLinkExpiryDetails : Changed link expiration of shared // file/folder. type SharedContentChangeLinkExpiryDetails struct { // NewValue : New shared content link expiration date. Might be missing due // to historical data gap. NewValue time.Time `json:"new_value,omitempty"` // PreviousValue : Previous shared content link expiration date. Might be // missing due to historical data gap. PreviousValue time.Time `json:"previous_value,omitempty"` } // NewSharedContentChangeLinkExpiryDetails returns a new SharedContentChangeLinkExpiryDetails instance func NewSharedContentChangeLinkExpiryDetails() *SharedContentChangeLinkExpiryDetails { s := new(SharedContentChangeLinkExpiryDetails) return s } // SharedContentChangeLinkExpiryType : has no documentation (yet) type SharedContentChangeLinkExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeLinkExpiryType returns a new SharedContentChangeLinkExpiryType instance func NewSharedContentChangeLinkExpiryType(Description string) *SharedContentChangeLinkExpiryType { s := new(SharedContentChangeLinkExpiryType) s.Description = Description return s } // SharedContentChangeLinkPasswordDetails : Changed link password of shared // file/folder. type SharedContentChangeLinkPasswordDetails struct { } // NewSharedContentChangeLinkPasswordDetails returns a new SharedContentChangeLinkPasswordDetails instance func NewSharedContentChangeLinkPasswordDetails() *SharedContentChangeLinkPasswordDetails { s := new(SharedContentChangeLinkPasswordDetails) return s } // SharedContentChangeLinkPasswordType : has no documentation (yet) type SharedContentChangeLinkPasswordType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeLinkPasswordType returns a new SharedContentChangeLinkPasswordType instance func NewSharedContentChangeLinkPasswordType(Description string) *SharedContentChangeLinkPasswordType { s := new(SharedContentChangeLinkPasswordType) s.Description = Description return s } // SharedContentChangeMemberRoleDetails : Changed access type of shared // file/folder member. type SharedContentChangeMemberRoleDetails struct { // PreviousAccessLevel : Previous access level. Might be missing due to // historical data gap. PreviousAccessLevel *sharing.AccessLevel `json:"previous_access_level,omitempty"` // NewAccessLevel : New access level. NewAccessLevel *sharing.AccessLevel `json:"new_access_level"` } // NewSharedContentChangeMemberRoleDetails returns a new SharedContentChangeMemberRoleDetails instance func NewSharedContentChangeMemberRoleDetails(NewAccessLevel *sharing.AccessLevel) *SharedContentChangeMemberRoleDetails { s := new(SharedContentChangeMemberRoleDetails) s.NewAccessLevel = NewAccessLevel return s } // SharedContentChangeMemberRoleType : has no documentation (yet) type SharedContentChangeMemberRoleType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeMemberRoleType returns a new SharedContentChangeMemberRoleType instance func NewSharedContentChangeMemberRoleType(Description string) *SharedContentChangeMemberRoleType { s := new(SharedContentChangeMemberRoleType) s.Description = Description return s } // SharedContentChangeViewerInfoPolicyDetails : Changed whether members can see // who viewed shared file/folder. type SharedContentChangeViewerInfoPolicyDetails struct { // NewValue : New viewer info policy. NewValue *sharing.ViewerInfoPolicy `json:"new_value"` // PreviousValue : Previous view info policy. Might be missing due to // historical data gap. PreviousValue *sharing.ViewerInfoPolicy `json:"previous_value,omitempty"` } // NewSharedContentChangeViewerInfoPolicyDetails returns a new SharedContentChangeViewerInfoPolicyDetails instance func NewSharedContentChangeViewerInfoPolicyDetails(NewValue *sharing.ViewerInfoPolicy) *SharedContentChangeViewerInfoPolicyDetails { s := new(SharedContentChangeViewerInfoPolicyDetails) s.NewValue = NewValue return s } // SharedContentChangeViewerInfoPolicyType : has no documentation (yet) type SharedContentChangeViewerInfoPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentChangeViewerInfoPolicyType returns a new SharedContentChangeViewerInfoPolicyType instance func NewSharedContentChangeViewerInfoPolicyType(Description string) *SharedContentChangeViewerInfoPolicyType { s := new(SharedContentChangeViewerInfoPolicyType) s.Description = Description return s } // SharedContentClaimInvitationDetails : Acquired membership of shared // file/folder by accepting invite. type SharedContentClaimInvitationDetails struct { // SharedContentLink : Shared content link. SharedContentLink string `json:"shared_content_link,omitempty"` } // NewSharedContentClaimInvitationDetails returns a new SharedContentClaimInvitationDetails instance func NewSharedContentClaimInvitationDetails() *SharedContentClaimInvitationDetails { s := new(SharedContentClaimInvitationDetails) return s } // SharedContentClaimInvitationType : has no documentation (yet) type SharedContentClaimInvitationType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentClaimInvitationType returns a new SharedContentClaimInvitationType instance func NewSharedContentClaimInvitationType(Description string) *SharedContentClaimInvitationType { s := new(SharedContentClaimInvitationType) s.Description = Description return s } // SharedContentCopyDetails : Copied shared file/folder to own Dropbox. type SharedContentCopyDetails struct { // SharedContentLink : Shared content link. SharedContentLink string `json:"shared_content_link"` // SharedContentOwner : The shared content owner. SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"` // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"` // DestinationPath : The path where the member saved the content. DestinationPath string `json:"destination_path"` } // NewSharedContentCopyDetails returns a new SharedContentCopyDetails instance func NewSharedContentCopyDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel, DestinationPath string) *SharedContentCopyDetails { s := new(SharedContentCopyDetails) s.SharedContentLink = SharedContentLink s.SharedContentAccessLevel = SharedContentAccessLevel s.DestinationPath = DestinationPath return s } // SharedContentCopyType : has no documentation (yet) type SharedContentCopyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentCopyType returns a new SharedContentCopyType instance func NewSharedContentCopyType(Description string) *SharedContentCopyType { s := new(SharedContentCopyType) s.Description = Description return s } // SharedContentDownloadDetails : Downloaded shared file/folder. type SharedContentDownloadDetails struct { // SharedContentLink : Shared content link. SharedContentLink string `json:"shared_content_link"` // SharedContentOwner : The shared content owner. SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"` // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"` } // NewSharedContentDownloadDetails returns a new SharedContentDownloadDetails instance func NewSharedContentDownloadDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentDownloadDetails { s := new(SharedContentDownloadDetails) s.SharedContentLink = SharedContentLink s.SharedContentAccessLevel = SharedContentAccessLevel return s } // SharedContentDownloadType : has no documentation (yet) type SharedContentDownloadType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentDownloadType returns a new SharedContentDownloadType instance func NewSharedContentDownloadType(Description string) *SharedContentDownloadType { s := new(SharedContentDownloadType) s.Description = Description return s } // SharedContentRelinquishMembershipDetails : Left shared file/folder. type SharedContentRelinquishMembershipDetails struct { } // NewSharedContentRelinquishMembershipDetails returns a new SharedContentRelinquishMembershipDetails instance func NewSharedContentRelinquishMembershipDetails() *SharedContentRelinquishMembershipDetails { s := new(SharedContentRelinquishMembershipDetails) return s } // SharedContentRelinquishMembershipType : has no documentation (yet) type SharedContentRelinquishMembershipType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRelinquishMembershipType returns a new SharedContentRelinquishMembershipType instance func NewSharedContentRelinquishMembershipType(Description string) *SharedContentRelinquishMembershipType { s := new(SharedContentRelinquishMembershipType) s.Description = Description return s } // SharedContentRemoveInviteesDetails : Removed invitee from shared file/folder // before invite was accepted. type SharedContentRemoveInviteesDetails struct { // Invitees : A list of invitees. Invitees []string `json:"invitees"` } // NewSharedContentRemoveInviteesDetails returns a new SharedContentRemoveInviteesDetails instance func NewSharedContentRemoveInviteesDetails(Invitees []string) *SharedContentRemoveInviteesDetails { s := new(SharedContentRemoveInviteesDetails) s.Invitees = Invitees return s } // SharedContentRemoveInviteesType : has no documentation (yet) type SharedContentRemoveInviteesType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRemoveInviteesType returns a new SharedContentRemoveInviteesType instance func NewSharedContentRemoveInviteesType(Description string) *SharedContentRemoveInviteesType { s := new(SharedContentRemoveInviteesType) s.Description = Description return s } // SharedContentRemoveLinkExpiryDetails : Removed link expiration date of shared // file/folder. type SharedContentRemoveLinkExpiryDetails struct { // PreviousValue : Previous shared content link expiration date. Might be // missing due to historical data gap. PreviousValue time.Time `json:"previous_value,omitempty"` } // NewSharedContentRemoveLinkExpiryDetails returns a new SharedContentRemoveLinkExpiryDetails instance func NewSharedContentRemoveLinkExpiryDetails() *SharedContentRemoveLinkExpiryDetails { s := new(SharedContentRemoveLinkExpiryDetails) return s } // SharedContentRemoveLinkExpiryType : has no documentation (yet) type SharedContentRemoveLinkExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRemoveLinkExpiryType returns a new SharedContentRemoveLinkExpiryType instance func NewSharedContentRemoveLinkExpiryType(Description string) *SharedContentRemoveLinkExpiryType { s := new(SharedContentRemoveLinkExpiryType) s.Description = Description return s } // SharedContentRemoveLinkPasswordDetails : Removed link password of shared // file/folder. type SharedContentRemoveLinkPasswordDetails struct { } // NewSharedContentRemoveLinkPasswordDetails returns a new SharedContentRemoveLinkPasswordDetails instance func NewSharedContentRemoveLinkPasswordDetails() *SharedContentRemoveLinkPasswordDetails { s := new(SharedContentRemoveLinkPasswordDetails) return s } // SharedContentRemoveLinkPasswordType : has no documentation (yet) type SharedContentRemoveLinkPasswordType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRemoveLinkPasswordType returns a new SharedContentRemoveLinkPasswordType instance func NewSharedContentRemoveLinkPasswordType(Description string) *SharedContentRemoveLinkPasswordType { s := new(SharedContentRemoveLinkPasswordType) s.Description = Description return s } // SharedContentRemoveMemberDetails : Removed user/group from shared // file/folder. type SharedContentRemoveMemberDetails struct { // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level,omitempty"` } // NewSharedContentRemoveMemberDetails returns a new SharedContentRemoveMemberDetails instance func NewSharedContentRemoveMemberDetails() *SharedContentRemoveMemberDetails { s := new(SharedContentRemoveMemberDetails) return s } // SharedContentRemoveMemberType : has no documentation (yet) type SharedContentRemoveMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRemoveMemberType returns a new SharedContentRemoveMemberType instance func NewSharedContentRemoveMemberType(Description string) *SharedContentRemoveMemberType { s := new(SharedContentRemoveMemberType) s.Description = Description return s } // SharedContentRequestAccessDetails : Requested access to shared file/folder. type SharedContentRequestAccessDetails struct { // SharedContentLink : Shared content link. SharedContentLink string `json:"shared_content_link,omitempty"` } // NewSharedContentRequestAccessDetails returns a new SharedContentRequestAccessDetails instance func NewSharedContentRequestAccessDetails() *SharedContentRequestAccessDetails { s := new(SharedContentRequestAccessDetails) return s } // SharedContentRequestAccessType : has no documentation (yet) type SharedContentRequestAccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentRequestAccessType returns a new SharedContentRequestAccessType instance func NewSharedContentRequestAccessType(Description string) *SharedContentRequestAccessType { s := new(SharedContentRequestAccessType) s.Description = Description return s } // SharedContentUnshareDetails : Unshared file/folder by clearing membership and // turning off link. type SharedContentUnshareDetails struct { } // NewSharedContentUnshareDetails returns a new SharedContentUnshareDetails instance func NewSharedContentUnshareDetails() *SharedContentUnshareDetails { s := new(SharedContentUnshareDetails) return s } // SharedContentUnshareType : has no documentation (yet) type SharedContentUnshareType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentUnshareType returns a new SharedContentUnshareType instance func NewSharedContentUnshareType(Description string) *SharedContentUnshareType { s := new(SharedContentUnshareType) s.Description = Description return s } // SharedContentViewDetails : Previewed shared file/folder. type SharedContentViewDetails struct { // SharedContentLink : Shared content link. SharedContentLink string `json:"shared_content_link"` // SharedContentOwner : The shared content owner. SharedContentOwner IsUserLogInfo `json:"shared_content_owner,omitempty"` // SharedContentAccessLevel : Shared content access level. SharedContentAccessLevel *sharing.AccessLevel `json:"shared_content_access_level"` } // NewSharedContentViewDetails returns a new SharedContentViewDetails instance func NewSharedContentViewDetails(SharedContentLink string, SharedContentAccessLevel *sharing.AccessLevel) *SharedContentViewDetails { s := new(SharedContentViewDetails) s.SharedContentLink = SharedContentLink s.SharedContentAccessLevel = SharedContentAccessLevel return s } // SharedContentViewType : has no documentation (yet) type SharedContentViewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedContentViewType returns a new SharedContentViewType instance func NewSharedContentViewType(Description string) *SharedContentViewType { s := new(SharedContentViewType) s.Description = Description return s } // SharedFolderChangeLinkPolicyDetails : Changed who can access shared folder // via link. type SharedFolderChangeLinkPolicyDetails struct { // NewValue : New shared folder link policy. NewValue *sharing.SharedLinkPolicy `json:"new_value"` // PreviousValue : Previous shared folder link policy. Might be missing due // to historical data gap. PreviousValue *sharing.SharedLinkPolicy `json:"previous_value,omitempty"` } // NewSharedFolderChangeLinkPolicyDetails returns a new SharedFolderChangeLinkPolicyDetails instance func NewSharedFolderChangeLinkPolicyDetails(NewValue *sharing.SharedLinkPolicy) *SharedFolderChangeLinkPolicyDetails { s := new(SharedFolderChangeLinkPolicyDetails) s.NewValue = NewValue return s } // SharedFolderChangeLinkPolicyType : has no documentation (yet) type SharedFolderChangeLinkPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderChangeLinkPolicyType returns a new SharedFolderChangeLinkPolicyType instance func NewSharedFolderChangeLinkPolicyType(Description string) *SharedFolderChangeLinkPolicyType { s := new(SharedFolderChangeLinkPolicyType) s.Description = Description return s } // SharedFolderChangeMembersInheritancePolicyDetails : Changed whether shared // folder inherits members from parent folder. type SharedFolderChangeMembersInheritancePolicyDetails struct { // NewValue : New member inheritance policy. NewValue *SharedFolderMembersInheritancePolicy `json:"new_value"` // PreviousValue : Previous member inheritance policy. Might be missing due // to historical data gap. PreviousValue *SharedFolderMembersInheritancePolicy `json:"previous_value,omitempty"` } // NewSharedFolderChangeMembersInheritancePolicyDetails returns a new SharedFolderChangeMembersInheritancePolicyDetails instance func NewSharedFolderChangeMembersInheritancePolicyDetails(NewValue *SharedFolderMembersInheritancePolicy) *SharedFolderChangeMembersInheritancePolicyDetails { s := new(SharedFolderChangeMembersInheritancePolicyDetails) s.NewValue = NewValue return s } // SharedFolderChangeMembersInheritancePolicyType : has no documentation (yet) type SharedFolderChangeMembersInheritancePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderChangeMembersInheritancePolicyType returns a new SharedFolderChangeMembersInheritancePolicyType instance func NewSharedFolderChangeMembersInheritancePolicyType(Description string) *SharedFolderChangeMembersInheritancePolicyType { s := new(SharedFolderChangeMembersInheritancePolicyType) s.Description = Description return s } // SharedFolderChangeMembersManagementPolicyDetails : Changed who can add/remove // members of shared folder. type SharedFolderChangeMembersManagementPolicyDetails struct { // NewValue : New members management policy. NewValue *sharing.AclUpdatePolicy `json:"new_value"` // PreviousValue : Previous members management policy. Might be missing due // to historical data gap. PreviousValue *sharing.AclUpdatePolicy `json:"previous_value,omitempty"` } // NewSharedFolderChangeMembersManagementPolicyDetails returns a new SharedFolderChangeMembersManagementPolicyDetails instance func NewSharedFolderChangeMembersManagementPolicyDetails(NewValue *sharing.AclUpdatePolicy) *SharedFolderChangeMembersManagementPolicyDetails { s := new(SharedFolderChangeMembersManagementPolicyDetails) s.NewValue = NewValue return s } // SharedFolderChangeMembersManagementPolicyType : has no documentation (yet) type SharedFolderChangeMembersManagementPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderChangeMembersManagementPolicyType returns a new SharedFolderChangeMembersManagementPolicyType instance func NewSharedFolderChangeMembersManagementPolicyType(Description string) *SharedFolderChangeMembersManagementPolicyType { s := new(SharedFolderChangeMembersManagementPolicyType) s.Description = Description return s } // SharedFolderChangeMembersPolicyDetails : Changed who can become member of // shared folder. type SharedFolderChangeMembersPolicyDetails struct { // NewValue : New external invite policy. NewValue *sharing.MemberPolicy `json:"new_value"` // PreviousValue : Previous external invite policy. Might be missing due to // historical data gap. PreviousValue *sharing.MemberPolicy `json:"previous_value,omitempty"` } // NewSharedFolderChangeMembersPolicyDetails returns a new SharedFolderChangeMembersPolicyDetails instance func NewSharedFolderChangeMembersPolicyDetails(NewValue *sharing.MemberPolicy) *SharedFolderChangeMembersPolicyDetails { s := new(SharedFolderChangeMembersPolicyDetails) s.NewValue = NewValue return s } // SharedFolderChangeMembersPolicyType : has no documentation (yet) type SharedFolderChangeMembersPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderChangeMembersPolicyType returns a new SharedFolderChangeMembersPolicyType instance func NewSharedFolderChangeMembersPolicyType(Description string) *SharedFolderChangeMembersPolicyType { s := new(SharedFolderChangeMembersPolicyType) s.Description = Description return s } // SharedFolderCreateDetails : Created shared folder. type SharedFolderCreateDetails struct { // TargetNsId : Target namespace ID. Might be missing due to historical data // gap. TargetNsId string `json:"target_ns_id,omitempty"` } // NewSharedFolderCreateDetails returns a new SharedFolderCreateDetails instance func NewSharedFolderCreateDetails() *SharedFolderCreateDetails { s := new(SharedFolderCreateDetails) return s } // SharedFolderCreateType : has no documentation (yet) type SharedFolderCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderCreateType returns a new SharedFolderCreateType instance func NewSharedFolderCreateType(Description string) *SharedFolderCreateType { s := new(SharedFolderCreateType) s.Description = Description return s } // SharedFolderDeclineInvitationDetails : Declined team member's invite to // shared folder. type SharedFolderDeclineInvitationDetails struct { } // NewSharedFolderDeclineInvitationDetails returns a new SharedFolderDeclineInvitationDetails instance func NewSharedFolderDeclineInvitationDetails() *SharedFolderDeclineInvitationDetails { s := new(SharedFolderDeclineInvitationDetails) return s } // SharedFolderDeclineInvitationType : has no documentation (yet) type SharedFolderDeclineInvitationType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderDeclineInvitationType returns a new SharedFolderDeclineInvitationType instance func NewSharedFolderDeclineInvitationType(Description string) *SharedFolderDeclineInvitationType { s := new(SharedFolderDeclineInvitationType) s.Description = Description return s } // SharedFolderMembersInheritancePolicy : Specifies if a shared folder inherits // its members from the parent folder. type SharedFolderMembersInheritancePolicy struct { dropbox.Tagged } // Valid tag values for SharedFolderMembersInheritancePolicy const ( SharedFolderMembersInheritancePolicyInheritMembers = "inherit_members" SharedFolderMembersInheritancePolicyDontInheritMembers = "dont_inherit_members" SharedFolderMembersInheritancePolicyOther = "other" ) // SharedFolderMountDetails : Added shared folder to own Dropbox. type SharedFolderMountDetails struct { } // NewSharedFolderMountDetails returns a new SharedFolderMountDetails instance func NewSharedFolderMountDetails() *SharedFolderMountDetails { s := new(SharedFolderMountDetails) return s } // SharedFolderMountType : has no documentation (yet) type SharedFolderMountType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderMountType returns a new SharedFolderMountType instance func NewSharedFolderMountType(Description string) *SharedFolderMountType { s := new(SharedFolderMountType) s.Description = Description return s } // SharedFolderNestDetails : Changed parent of shared folder. type SharedFolderNestDetails struct { // PreviousParentNsId : Previous parent namespace ID. Might be missing due // to historical data gap. PreviousParentNsId string `json:"previous_parent_ns_id,omitempty"` // NewParentNsId : New parent namespace ID. Might be missing due to // historical data gap. NewParentNsId string `json:"new_parent_ns_id,omitempty"` // PreviousNsPath : Previous namespace path. Might be missing due to // historical data gap. PreviousNsPath string `json:"previous_ns_path,omitempty"` // NewNsPath : New namespace path. Might be missing due to historical data // gap. NewNsPath string `json:"new_ns_path,omitempty"` } // NewSharedFolderNestDetails returns a new SharedFolderNestDetails instance func NewSharedFolderNestDetails() *SharedFolderNestDetails { s := new(SharedFolderNestDetails) return s } // SharedFolderNestType : has no documentation (yet) type SharedFolderNestType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderNestType returns a new SharedFolderNestType instance func NewSharedFolderNestType(Description string) *SharedFolderNestType { s := new(SharedFolderNestType) s.Description = Description return s } // SharedFolderTransferOwnershipDetails : Transferred ownership of shared folder // to another member. type SharedFolderTransferOwnershipDetails struct { // PreviousOwnerEmail : The email address of the previous shared folder // owner. PreviousOwnerEmail string `json:"previous_owner_email,omitempty"` // NewOwnerEmail : The email address of the new shared folder owner. NewOwnerEmail string `json:"new_owner_email"` } // NewSharedFolderTransferOwnershipDetails returns a new SharedFolderTransferOwnershipDetails instance func NewSharedFolderTransferOwnershipDetails(NewOwnerEmail string) *SharedFolderTransferOwnershipDetails { s := new(SharedFolderTransferOwnershipDetails) s.NewOwnerEmail = NewOwnerEmail return s } // SharedFolderTransferOwnershipType : has no documentation (yet) type SharedFolderTransferOwnershipType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderTransferOwnershipType returns a new SharedFolderTransferOwnershipType instance func NewSharedFolderTransferOwnershipType(Description string) *SharedFolderTransferOwnershipType { s := new(SharedFolderTransferOwnershipType) s.Description = Description return s } // SharedFolderUnmountDetails : Deleted shared folder from Dropbox. type SharedFolderUnmountDetails struct { } // NewSharedFolderUnmountDetails returns a new SharedFolderUnmountDetails instance func NewSharedFolderUnmountDetails() *SharedFolderUnmountDetails { s := new(SharedFolderUnmountDetails) return s } // SharedFolderUnmountType : has no documentation (yet) type SharedFolderUnmountType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedFolderUnmountType returns a new SharedFolderUnmountType instance func NewSharedFolderUnmountType(Description string) *SharedFolderUnmountType { s := new(SharedFolderUnmountType) s.Description = Description return s } // SharedLinkAccessLevel : Shared link access level. type SharedLinkAccessLevel struct { dropbox.Tagged } // Valid tag values for SharedLinkAccessLevel const ( SharedLinkAccessLevelNone = "none" SharedLinkAccessLevelReader = "reader" SharedLinkAccessLevelWriter = "writer" SharedLinkAccessLevelOther = "other" ) // SharedLinkAddExpiryDetails : Added shared link expiration date. type SharedLinkAddExpiryDetails struct { // NewValue : New shared link expiration date. NewValue time.Time `json:"new_value"` } // NewSharedLinkAddExpiryDetails returns a new SharedLinkAddExpiryDetails instance func NewSharedLinkAddExpiryDetails(NewValue time.Time) *SharedLinkAddExpiryDetails { s := new(SharedLinkAddExpiryDetails) s.NewValue = NewValue return s } // SharedLinkAddExpiryType : has no documentation (yet) type SharedLinkAddExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkAddExpiryType returns a new SharedLinkAddExpiryType instance func NewSharedLinkAddExpiryType(Description string) *SharedLinkAddExpiryType { s := new(SharedLinkAddExpiryType) s.Description = Description return s } // SharedLinkChangeExpiryDetails : Changed shared link expiration date. type SharedLinkChangeExpiryDetails struct { // NewValue : New shared link expiration date. Might be missing due to // historical data gap. NewValue time.Time `json:"new_value,omitempty"` // PreviousValue : Previous shared link expiration date. Might be missing // due to historical data gap. PreviousValue time.Time `json:"previous_value,omitempty"` } // NewSharedLinkChangeExpiryDetails returns a new SharedLinkChangeExpiryDetails instance func NewSharedLinkChangeExpiryDetails() *SharedLinkChangeExpiryDetails { s := new(SharedLinkChangeExpiryDetails) return s } // SharedLinkChangeExpiryType : has no documentation (yet) type SharedLinkChangeExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkChangeExpiryType returns a new SharedLinkChangeExpiryType instance func NewSharedLinkChangeExpiryType(Description string) *SharedLinkChangeExpiryType { s := new(SharedLinkChangeExpiryType) s.Description = Description return s } // SharedLinkChangeVisibilityDetails : Changed visibility of shared link. type SharedLinkChangeVisibilityDetails struct { // NewValue : New shared link visibility. NewValue *SharedLinkVisibility `json:"new_value"` // PreviousValue : Previous shared link visibility. Might be missing due to // historical data gap. PreviousValue *SharedLinkVisibility `json:"previous_value,omitempty"` } // NewSharedLinkChangeVisibilityDetails returns a new SharedLinkChangeVisibilityDetails instance func NewSharedLinkChangeVisibilityDetails(NewValue *SharedLinkVisibility) *SharedLinkChangeVisibilityDetails { s := new(SharedLinkChangeVisibilityDetails) s.NewValue = NewValue return s } // SharedLinkChangeVisibilityType : has no documentation (yet) type SharedLinkChangeVisibilityType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkChangeVisibilityType returns a new SharedLinkChangeVisibilityType instance func NewSharedLinkChangeVisibilityType(Description string) *SharedLinkChangeVisibilityType { s := new(SharedLinkChangeVisibilityType) s.Description = Description return s } // SharedLinkCopyDetails : Added file/folder to Dropbox from shared link. type SharedLinkCopyDetails struct { // SharedLinkOwner : Shared link owner details. Might be missing due to // historical data gap. SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"` } // NewSharedLinkCopyDetails returns a new SharedLinkCopyDetails instance func NewSharedLinkCopyDetails() *SharedLinkCopyDetails { s := new(SharedLinkCopyDetails) return s } // SharedLinkCopyType : has no documentation (yet) type SharedLinkCopyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkCopyType returns a new SharedLinkCopyType instance func NewSharedLinkCopyType(Description string) *SharedLinkCopyType { s := new(SharedLinkCopyType) s.Description = Description return s } // SharedLinkCreateDetails : Created shared link. type SharedLinkCreateDetails struct { // SharedLinkAccessLevel : Defines who can access the shared link. Might be // missing due to historical data gap. SharedLinkAccessLevel *SharedLinkAccessLevel `json:"shared_link_access_level,omitempty"` } // NewSharedLinkCreateDetails returns a new SharedLinkCreateDetails instance func NewSharedLinkCreateDetails() *SharedLinkCreateDetails { s := new(SharedLinkCreateDetails) return s } // SharedLinkCreateType : has no documentation (yet) type SharedLinkCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkCreateType returns a new SharedLinkCreateType instance func NewSharedLinkCreateType(Description string) *SharedLinkCreateType { s := new(SharedLinkCreateType) s.Description = Description return s } // SharedLinkDisableDetails : Removed shared link. type SharedLinkDisableDetails struct { // SharedLinkOwner : Shared link owner details. Might be missing due to // historical data gap. SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"` } // NewSharedLinkDisableDetails returns a new SharedLinkDisableDetails instance func NewSharedLinkDisableDetails() *SharedLinkDisableDetails { s := new(SharedLinkDisableDetails) return s } // SharedLinkDisableType : has no documentation (yet) type SharedLinkDisableType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkDisableType returns a new SharedLinkDisableType instance func NewSharedLinkDisableType(Description string) *SharedLinkDisableType { s := new(SharedLinkDisableType) s.Description = Description return s } // SharedLinkDownloadDetails : Downloaded file/folder from shared link. type SharedLinkDownloadDetails struct { // SharedLinkOwner : Shared link owner details. Might be missing due to // historical data gap. SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"` } // NewSharedLinkDownloadDetails returns a new SharedLinkDownloadDetails instance func NewSharedLinkDownloadDetails() *SharedLinkDownloadDetails { s := new(SharedLinkDownloadDetails) return s } // SharedLinkDownloadType : has no documentation (yet) type SharedLinkDownloadType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkDownloadType returns a new SharedLinkDownloadType instance func NewSharedLinkDownloadType(Description string) *SharedLinkDownloadType { s := new(SharedLinkDownloadType) s.Description = Description return s } // SharedLinkRemoveExpiryDetails : Removed shared link expiration date. type SharedLinkRemoveExpiryDetails struct { // PreviousValue : Previous shared link expiration date. Might be missing // due to historical data gap. PreviousValue time.Time `json:"previous_value,omitempty"` } // NewSharedLinkRemoveExpiryDetails returns a new SharedLinkRemoveExpiryDetails instance func NewSharedLinkRemoveExpiryDetails() *SharedLinkRemoveExpiryDetails { s := new(SharedLinkRemoveExpiryDetails) return s } // SharedLinkRemoveExpiryType : has no documentation (yet) type SharedLinkRemoveExpiryType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkRemoveExpiryType returns a new SharedLinkRemoveExpiryType instance func NewSharedLinkRemoveExpiryType(Description string) *SharedLinkRemoveExpiryType { s := new(SharedLinkRemoveExpiryType) s.Description = Description return s } // SharedLinkShareDetails : Added members as audience of shared link. type SharedLinkShareDetails struct { // SharedLinkOwner : Shared link owner details. Might be missing due to // historical data gap. SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"` // ExternalUsers : Users without a Dropbox account that were added as shared // link audience. ExternalUsers []*ExternalUserLogInfo `json:"external_users,omitempty"` } // NewSharedLinkShareDetails returns a new SharedLinkShareDetails instance func NewSharedLinkShareDetails() *SharedLinkShareDetails { s := new(SharedLinkShareDetails) return s } // SharedLinkShareType : has no documentation (yet) type SharedLinkShareType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkShareType returns a new SharedLinkShareType instance func NewSharedLinkShareType(Description string) *SharedLinkShareType { s := new(SharedLinkShareType) s.Description = Description return s } // SharedLinkViewDetails : Opened shared link. type SharedLinkViewDetails struct { // SharedLinkOwner : Shared link owner details. Might be missing due to // historical data gap. SharedLinkOwner IsUserLogInfo `json:"shared_link_owner,omitempty"` } // NewSharedLinkViewDetails returns a new SharedLinkViewDetails instance func NewSharedLinkViewDetails() *SharedLinkViewDetails { s := new(SharedLinkViewDetails) return s } // SharedLinkViewType : has no documentation (yet) type SharedLinkViewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedLinkViewType returns a new SharedLinkViewType instance func NewSharedLinkViewType(Description string) *SharedLinkViewType { s := new(SharedLinkViewType) s.Description = Description return s } // SharedLinkVisibility : Defines who has access to a shared link. type SharedLinkVisibility struct { dropbox.Tagged } // Valid tag values for SharedLinkVisibility const ( SharedLinkVisibilityPassword = "password" SharedLinkVisibilityPublic = "public" SharedLinkVisibilityTeamOnly = "team_only" SharedLinkVisibilityOther = "other" ) // SharedNoteOpenedDetails : Opened shared Paper doc. type SharedNoteOpenedDetails struct { } // NewSharedNoteOpenedDetails returns a new SharedNoteOpenedDetails instance func NewSharedNoteOpenedDetails() *SharedNoteOpenedDetails { s := new(SharedNoteOpenedDetails) return s } // SharedNoteOpenedType : has no documentation (yet) type SharedNoteOpenedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharedNoteOpenedType returns a new SharedNoteOpenedType instance func NewSharedNoteOpenedType(Description string) *SharedNoteOpenedType { s := new(SharedNoteOpenedType) s.Description = Description return s } // SharingChangeFolderJoinPolicyDetails : Changed whether team members can join // shared folders owned outside team. type SharingChangeFolderJoinPolicyDetails struct { // NewValue : New external join policy. NewValue *SharingFolderJoinPolicy `json:"new_value"` // PreviousValue : Previous external join policy. Might be missing due to // historical data gap. PreviousValue *SharingFolderJoinPolicy `json:"previous_value,omitempty"` } // NewSharingChangeFolderJoinPolicyDetails returns a new SharingChangeFolderJoinPolicyDetails instance func NewSharingChangeFolderJoinPolicyDetails(NewValue *SharingFolderJoinPolicy) *SharingChangeFolderJoinPolicyDetails { s := new(SharingChangeFolderJoinPolicyDetails) s.NewValue = NewValue return s } // SharingChangeFolderJoinPolicyType : has no documentation (yet) type SharingChangeFolderJoinPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharingChangeFolderJoinPolicyType returns a new SharingChangeFolderJoinPolicyType instance func NewSharingChangeFolderJoinPolicyType(Description string) *SharingChangeFolderJoinPolicyType { s := new(SharingChangeFolderJoinPolicyType) s.Description = Description return s } // SharingChangeLinkPolicyDetails : Changed whether members can share links // outside team, and if links are accessible only by team members or anyone by // default. type SharingChangeLinkPolicyDetails struct { // NewValue : New external link accessibility policy. NewValue *SharingLinkPolicy `json:"new_value"` // PreviousValue : Previous external link accessibility policy. Might be // missing due to historical data gap. PreviousValue *SharingLinkPolicy `json:"previous_value,omitempty"` } // NewSharingChangeLinkPolicyDetails returns a new SharingChangeLinkPolicyDetails instance func NewSharingChangeLinkPolicyDetails(NewValue *SharingLinkPolicy) *SharingChangeLinkPolicyDetails { s := new(SharingChangeLinkPolicyDetails) s.NewValue = NewValue return s } // SharingChangeLinkPolicyType : has no documentation (yet) type SharingChangeLinkPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharingChangeLinkPolicyType returns a new SharingChangeLinkPolicyType instance func NewSharingChangeLinkPolicyType(Description string) *SharingChangeLinkPolicyType { s := new(SharingChangeLinkPolicyType) s.Description = Description return s } // SharingChangeMemberPolicyDetails : Changed whether members can share // files/folders outside team. type SharingChangeMemberPolicyDetails struct { // NewValue : New external invite policy. NewValue *SharingMemberPolicy `json:"new_value"` // PreviousValue : Previous external invite policy. Might be missing due to // historical data gap. PreviousValue *SharingMemberPolicy `json:"previous_value,omitempty"` } // NewSharingChangeMemberPolicyDetails returns a new SharingChangeMemberPolicyDetails instance func NewSharingChangeMemberPolicyDetails(NewValue *SharingMemberPolicy) *SharingChangeMemberPolicyDetails { s := new(SharingChangeMemberPolicyDetails) s.NewValue = NewValue return s } // SharingChangeMemberPolicyType : has no documentation (yet) type SharingChangeMemberPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSharingChangeMemberPolicyType returns a new SharingChangeMemberPolicyType instance func NewSharingChangeMemberPolicyType(Description string) *SharingChangeMemberPolicyType { s := new(SharingChangeMemberPolicyType) s.Description = Description return s } // SharingFolderJoinPolicy : Policy for controlling if team members can join // shared folders owned by non team members. type SharingFolderJoinPolicy struct { dropbox.Tagged } // Valid tag values for SharingFolderJoinPolicy const ( SharingFolderJoinPolicyFromAnyone = "from_anyone" SharingFolderJoinPolicyFromTeamOnly = "from_team_only" SharingFolderJoinPolicyOther = "other" ) // SharingLinkPolicy : Policy for controlling if team members can share links // externally type SharingLinkPolicy struct { dropbox.Tagged } // Valid tag values for SharingLinkPolicy const ( SharingLinkPolicyDefaultPrivate = "default_private" SharingLinkPolicyDefaultPublic = "default_public" SharingLinkPolicyOnlyPrivate = "only_private" SharingLinkPolicyOther = "other" ) // SharingMemberPolicy : External sharing policy type SharingMemberPolicy struct { dropbox.Tagged } // Valid tag values for SharingMemberPolicy const ( SharingMemberPolicyAllow = "allow" SharingMemberPolicyForbid = "forbid" SharingMemberPolicyOther = "other" ) // ShmodelGroupShareDetails : Shared link with group. type ShmodelGroupShareDetails struct { } // NewShmodelGroupShareDetails returns a new ShmodelGroupShareDetails instance func NewShmodelGroupShareDetails() *ShmodelGroupShareDetails { s := new(ShmodelGroupShareDetails) return s } // ShmodelGroupShareType : has no documentation (yet) type ShmodelGroupShareType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShmodelGroupShareType returns a new ShmodelGroupShareType instance func NewShmodelGroupShareType(Description string) *ShmodelGroupShareType { s := new(ShmodelGroupShareType) s.Description = Description return s } // ShowcaseAccessGrantedDetails : Granted access to showcase. type ShowcaseAccessGrantedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseAccessGrantedDetails returns a new ShowcaseAccessGrantedDetails instance func NewShowcaseAccessGrantedDetails(EventUuid string) *ShowcaseAccessGrantedDetails { s := new(ShowcaseAccessGrantedDetails) s.EventUuid = EventUuid return s } // ShowcaseAccessGrantedType : has no documentation (yet) type ShowcaseAccessGrantedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseAccessGrantedType returns a new ShowcaseAccessGrantedType instance func NewShowcaseAccessGrantedType(Description string) *ShowcaseAccessGrantedType { s := new(ShowcaseAccessGrantedType) s.Description = Description return s } // ShowcaseAddMemberDetails : Added member to showcase. type ShowcaseAddMemberDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseAddMemberDetails returns a new ShowcaseAddMemberDetails instance func NewShowcaseAddMemberDetails(EventUuid string) *ShowcaseAddMemberDetails { s := new(ShowcaseAddMemberDetails) s.EventUuid = EventUuid return s } // ShowcaseAddMemberType : has no documentation (yet) type ShowcaseAddMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseAddMemberType returns a new ShowcaseAddMemberType instance func NewShowcaseAddMemberType(Description string) *ShowcaseAddMemberType { s := new(ShowcaseAddMemberType) s.Description = Description return s } // ShowcaseArchivedDetails : Archived showcase. type ShowcaseArchivedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseArchivedDetails returns a new ShowcaseArchivedDetails instance func NewShowcaseArchivedDetails(EventUuid string) *ShowcaseArchivedDetails { s := new(ShowcaseArchivedDetails) s.EventUuid = EventUuid return s } // ShowcaseArchivedType : has no documentation (yet) type ShowcaseArchivedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseArchivedType returns a new ShowcaseArchivedType instance func NewShowcaseArchivedType(Description string) *ShowcaseArchivedType { s := new(ShowcaseArchivedType) s.Description = Description return s } // ShowcaseChangeDownloadPolicyDetails : Enabled/disabled downloading files from // Dropbox Showcase for team. type ShowcaseChangeDownloadPolicyDetails struct { // NewValue : New Dropbox Showcase download policy. NewValue *ShowcaseDownloadPolicy `json:"new_value"` // PreviousValue : Previous Dropbox Showcase download policy. PreviousValue *ShowcaseDownloadPolicy `json:"previous_value"` } // NewShowcaseChangeDownloadPolicyDetails returns a new ShowcaseChangeDownloadPolicyDetails instance func NewShowcaseChangeDownloadPolicyDetails(NewValue *ShowcaseDownloadPolicy, PreviousValue *ShowcaseDownloadPolicy) *ShowcaseChangeDownloadPolicyDetails { s := new(ShowcaseChangeDownloadPolicyDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // ShowcaseChangeDownloadPolicyType : has no documentation (yet) type ShowcaseChangeDownloadPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseChangeDownloadPolicyType returns a new ShowcaseChangeDownloadPolicyType instance func NewShowcaseChangeDownloadPolicyType(Description string) *ShowcaseChangeDownloadPolicyType { s := new(ShowcaseChangeDownloadPolicyType) s.Description = Description return s } // ShowcaseChangeEnabledPolicyDetails : Enabled/disabled Dropbox Showcase for // team. type ShowcaseChangeEnabledPolicyDetails struct { // NewValue : New Dropbox Showcase policy. NewValue *ShowcaseEnabledPolicy `json:"new_value"` // PreviousValue : Previous Dropbox Showcase policy. PreviousValue *ShowcaseEnabledPolicy `json:"previous_value"` } // NewShowcaseChangeEnabledPolicyDetails returns a new ShowcaseChangeEnabledPolicyDetails instance func NewShowcaseChangeEnabledPolicyDetails(NewValue *ShowcaseEnabledPolicy, PreviousValue *ShowcaseEnabledPolicy) *ShowcaseChangeEnabledPolicyDetails { s := new(ShowcaseChangeEnabledPolicyDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // ShowcaseChangeEnabledPolicyType : has no documentation (yet) type ShowcaseChangeEnabledPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseChangeEnabledPolicyType returns a new ShowcaseChangeEnabledPolicyType instance func NewShowcaseChangeEnabledPolicyType(Description string) *ShowcaseChangeEnabledPolicyType { s := new(ShowcaseChangeEnabledPolicyType) s.Description = Description return s } // ShowcaseChangeExternalSharingPolicyDetails : Enabled/disabled sharing Dropbox // Showcase externally for team. type ShowcaseChangeExternalSharingPolicyDetails struct { // NewValue : New Dropbox Showcase external sharing policy. NewValue *ShowcaseExternalSharingPolicy `json:"new_value"` // PreviousValue : Previous Dropbox Showcase external sharing policy. PreviousValue *ShowcaseExternalSharingPolicy `json:"previous_value"` } // NewShowcaseChangeExternalSharingPolicyDetails returns a new ShowcaseChangeExternalSharingPolicyDetails instance func NewShowcaseChangeExternalSharingPolicyDetails(NewValue *ShowcaseExternalSharingPolicy, PreviousValue *ShowcaseExternalSharingPolicy) *ShowcaseChangeExternalSharingPolicyDetails { s := new(ShowcaseChangeExternalSharingPolicyDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // ShowcaseChangeExternalSharingPolicyType : has no documentation (yet) type ShowcaseChangeExternalSharingPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseChangeExternalSharingPolicyType returns a new ShowcaseChangeExternalSharingPolicyType instance func NewShowcaseChangeExternalSharingPolicyType(Description string) *ShowcaseChangeExternalSharingPolicyType { s := new(ShowcaseChangeExternalSharingPolicyType) s.Description = Description return s } // ShowcaseCreatedDetails : Created showcase. type ShowcaseCreatedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseCreatedDetails returns a new ShowcaseCreatedDetails instance func NewShowcaseCreatedDetails(EventUuid string) *ShowcaseCreatedDetails { s := new(ShowcaseCreatedDetails) s.EventUuid = EventUuid return s } // ShowcaseCreatedType : has no documentation (yet) type ShowcaseCreatedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseCreatedType returns a new ShowcaseCreatedType instance func NewShowcaseCreatedType(Description string) *ShowcaseCreatedType { s := new(ShowcaseCreatedType) s.Description = Description return s } // ShowcaseDeleteCommentDetails : Deleted showcase comment. type ShowcaseDeleteCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. CommentText string `json:"comment_text,omitempty"` } // NewShowcaseDeleteCommentDetails returns a new ShowcaseDeleteCommentDetails instance func NewShowcaseDeleteCommentDetails(EventUuid string) *ShowcaseDeleteCommentDetails { s := new(ShowcaseDeleteCommentDetails) s.EventUuid = EventUuid return s } // ShowcaseDeleteCommentType : has no documentation (yet) type ShowcaseDeleteCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseDeleteCommentType returns a new ShowcaseDeleteCommentType instance func NewShowcaseDeleteCommentType(Description string) *ShowcaseDeleteCommentType { s := new(ShowcaseDeleteCommentType) s.Description = Description return s } // ShowcaseDocumentLogInfo : Showcase document's logged information. type ShowcaseDocumentLogInfo struct { // ShowcaseId : Showcase document Id. ShowcaseId string `json:"showcase_id"` // ShowcaseTitle : Showcase document title. ShowcaseTitle string `json:"showcase_title"` } // NewShowcaseDocumentLogInfo returns a new ShowcaseDocumentLogInfo instance func NewShowcaseDocumentLogInfo(ShowcaseId string, ShowcaseTitle string) *ShowcaseDocumentLogInfo { s := new(ShowcaseDocumentLogInfo) s.ShowcaseId = ShowcaseId s.ShowcaseTitle = ShowcaseTitle return s } // ShowcaseDownloadPolicy : Policy for controlling if files can be downloaded // from Showcases by team members type ShowcaseDownloadPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseDownloadPolicy const ( ShowcaseDownloadPolicyDisabled = "disabled" ShowcaseDownloadPolicyEnabled = "enabled" ShowcaseDownloadPolicyOther = "other" ) // ShowcaseEditCommentDetails : Edited showcase comment. type ShowcaseEditCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. CommentText string `json:"comment_text,omitempty"` } // NewShowcaseEditCommentDetails returns a new ShowcaseEditCommentDetails instance func NewShowcaseEditCommentDetails(EventUuid string) *ShowcaseEditCommentDetails { s := new(ShowcaseEditCommentDetails) s.EventUuid = EventUuid return s } // ShowcaseEditCommentType : has no documentation (yet) type ShowcaseEditCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseEditCommentType returns a new ShowcaseEditCommentType instance func NewShowcaseEditCommentType(Description string) *ShowcaseEditCommentType { s := new(ShowcaseEditCommentType) s.Description = Description return s } // ShowcaseEditedDetails : Edited showcase. type ShowcaseEditedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseEditedDetails returns a new ShowcaseEditedDetails instance func NewShowcaseEditedDetails(EventUuid string) *ShowcaseEditedDetails { s := new(ShowcaseEditedDetails) s.EventUuid = EventUuid return s } // ShowcaseEditedType : has no documentation (yet) type ShowcaseEditedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseEditedType returns a new ShowcaseEditedType instance func NewShowcaseEditedType(Description string) *ShowcaseEditedType { s := new(ShowcaseEditedType) s.Description = Description return s } // ShowcaseEnabledPolicy : Policy for controlling whether Showcase is enabled. type ShowcaseEnabledPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseEnabledPolicy const ( ShowcaseEnabledPolicyDisabled = "disabled" ShowcaseEnabledPolicyEnabled = "enabled" ShowcaseEnabledPolicyOther = "other" ) // ShowcaseExternalSharingPolicy : Policy for controlling if team members can // share Showcases externally. type ShowcaseExternalSharingPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseExternalSharingPolicy const ( ShowcaseExternalSharingPolicyDisabled = "disabled" ShowcaseExternalSharingPolicyEnabled = "enabled" ShowcaseExternalSharingPolicyOther = "other" ) // ShowcaseFileAddedDetails : Added file to showcase. type ShowcaseFileAddedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseFileAddedDetails returns a new ShowcaseFileAddedDetails instance func NewShowcaseFileAddedDetails(EventUuid string) *ShowcaseFileAddedDetails { s := new(ShowcaseFileAddedDetails) s.EventUuid = EventUuid return s } // ShowcaseFileAddedType : has no documentation (yet) type ShowcaseFileAddedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseFileAddedType returns a new ShowcaseFileAddedType instance func NewShowcaseFileAddedType(Description string) *ShowcaseFileAddedType { s := new(ShowcaseFileAddedType) s.Description = Description return s } // ShowcaseFileDownloadDetails : Downloaded file from showcase. type ShowcaseFileDownloadDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // DownloadType : Showcase download type. DownloadType string `json:"download_type"` } // NewShowcaseFileDownloadDetails returns a new ShowcaseFileDownloadDetails instance func NewShowcaseFileDownloadDetails(EventUuid string, DownloadType string) *ShowcaseFileDownloadDetails { s := new(ShowcaseFileDownloadDetails) s.EventUuid = EventUuid s.DownloadType = DownloadType return s } // ShowcaseFileDownloadType : has no documentation (yet) type ShowcaseFileDownloadType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseFileDownloadType returns a new ShowcaseFileDownloadType instance func NewShowcaseFileDownloadType(Description string) *ShowcaseFileDownloadType { s := new(ShowcaseFileDownloadType) s.Description = Description return s } // ShowcaseFileRemovedDetails : Removed file from showcase. type ShowcaseFileRemovedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseFileRemovedDetails returns a new ShowcaseFileRemovedDetails instance func NewShowcaseFileRemovedDetails(EventUuid string) *ShowcaseFileRemovedDetails { s := new(ShowcaseFileRemovedDetails) s.EventUuid = EventUuid return s } // ShowcaseFileRemovedType : has no documentation (yet) type ShowcaseFileRemovedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseFileRemovedType returns a new ShowcaseFileRemovedType instance func NewShowcaseFileRemovedType(Description string) *ShowcaseFileRemovedType { s := new(ShowcaseFileRemovedType) s.Description = Description return s } // ShowcaseFileViewDetails : Viewed file in showcase. type ShowcaseFileViewDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseFileViewDetails returns a new ShowcaseFileViewDetails instance func NewShowcaseFileViewDetails(EventUuid string) *ShowcaseFileViewDetails { s := new(ShowcaseFileViewDetails) s.EventUuid = EventUuid return s } // ShowcaseFileViewType : has no documentation (yet) type ShowcaseFileViewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseFileViewType returns a new ShowcaseFileViewType instance func NewShowcaseFileViewType(Description string) *ShowcaseFileViewType { s := new(ShowcaseFileViewType) s.Description = Description return s } // ShowcasePermanentlyDeletedDetails : Permanently deleted showcase. type ShowcasePermanentlyDeletedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcasePermanentlyDeletedDetails returns a new ShowcasePermanentlyDeletedDetails instance func NewShowcasePermanentlyDeletedDetails(EventUuid string) *ShowcasePermanentlyDeletedDetails { s := new(ShowcasePermanentlyDeletedDetails) s.EventUuid = EventUuid return s } // ShowcasePermanentlyDeletedType : has no documentation (yet) type ShowcasePermanentlyDeletedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcasePermanentlyDeletedType returns a new ShowcasePermanentlyDeletedType instance func NewShowcasePermanentlyDeletedType(Description string) *ShowcasePermanentlyDeletedType { s := new(ShowcasePermanentlyDeletedType) s.Description = Description return s } // ShowcasePostCommentDetails : Added showcase comment. type ShowcasePostCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. CommentText string `json:"comment_text,omitempty"` } // NewShowcasePostCommentDetails returns a new ShowcasePostCommentDetails instance func NewShowcasePostCommentDetails(EventUuid string) *ShowcasePostCommentDetails { s := new(ShowcasePostCommentDetails) s.EventUuid = EventUuid return s } // ShowcasePostCommentType : has no documentation (yet) type ShowcasePostCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcasePostCommentType returns a new ShowcasePostCommentType instance func NewShowcasePostCommentType(Description string) *ShowcasePostCommentType { s := new(ShowcasePostCommentType) s.Description = Description return s } // ShowcaseRemoveMemberDetails : Removed member from showcase. type ShowcaseRemoveMemberDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseRemoveMemberDetails returns a new ShowcaseRemoveMemberDetails instance func NewShowcaseRemoveMemberDetails(EventUuid string) *ShowcaseRemoveMemberDetails { s := new(ShowcaseRemoveMemberDetails) s.EventUuid = EventUuid return s } // ShowcaseRemoveMemberType : has no documentation (yet) type ShowcaseRemoveMemberType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseRemoveMemberType returns a new ShowcaseRemoveMemberType instance func NewShowcaseRemoveMemberType(Description string) *ShowcaseRemoveMemberType { s := new(ShowcaseRemoveMemberType) s.Description = Description return s } // ShowcaseRenamedDetails : Renamed showcase. type ShowcaseRenamedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseRenamedDetails returns a new ShowcaseRenamedDetails instance func NewShowcaseRenamedDetails(EventUuid string) *ShowcaseRenamedDetails { s := new(ShowcaseRenamedDetails) s.EventUuid = EventUuid return s } // ShowcaseRenamedType : has no documentation (yet) type ShowcaseRenamedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseRenamedType returns a new ShowcaseRenamedType instance func NewShowcaseRenamedType(Description string) *ShowcaseRenamedType { s := new(ShowcaseRenamedType) s.Description = Description return s } // ShowcaseRequestAccessDetails : Requested access to showcase. type ShowcaseRequestAccessDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseRequestAccessDetails returns a new ShowcaseRequestAccessDetails instance func NewShowcaseRequestAccessDetails(EventUuid string) *ShowcaseRequestAccessDetails { s := new(ShowcaseRequestAccessDetails) s.EventUuid = EventUuid return s } // ShowcaseRequestAccessType : has no documentation (yet) type ShowcaseRequestAccessType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseRequestAccessType returns a new ShowcaseRequestAccessType instance func NewShowcaseRequestAccessType(Description string) *ShowcaseRequestAccessType { s := new(ShowcaseRequestAccessType) s.Description = Description return s } // ShowcaseResolveCommentDetails : Resolved showcase comment. type ShowcaseResolveCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. CommentText string `json:"comment_text,omitempty"` } // NewShowcaseResolveCommentDetails returns a new ShowcaseResolveCommentDetails instance func NewShowcaseResolveCommentDetails(EventUuid string) *ShowcaseResolveCommentDetails { s := new(ShowcaseResolveCommentDetails) s.EventUuid = EventUuid return s } // ShowcaseResolveCommentType : has no documentation (yet) type ShowcaseResolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseResolveCommentType returns a new ShowcaseResolveCommentType instance func NewShowcaseResolveCommentType(Description string) *ShowcaseResolveCommentType { s := new(ShowcaseResolveCommentType) s.Description = Description return s } // ShowcaseRestoredDetails : Unarchived showcase. type ShowcaseRestoredDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseRestoredDetails returns a new ShowcaseRestoredDetails instance func NewShowcaseRestoredDetails(EventUuid string) *ShowcaseRestoredDetails { s := new(ShowcaseRestoredDetails) s.EventUuid = EventUuid return s } // ShowcaseRestoredType : has no documentation (yet) type ShowcaseRestoredType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseRestoredType returns a new ShowcaseRestoredType instance func NewShowcaseRestoredType(Description string) *ShowcaseRestoredType { s := new(ShowcaseRestoredType) s.Description = Description return s } // ShowcaseTrashedDeprecatedDetails : Deleted showcase (old version). type ShowcaseTrashedDeprecatedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseTrashedDeprecatedDetails returns a new ShowcaseTrashedDeprecatedDetails instance func NewShowcaseTrashedDeprecatedDetails(EventUuid string) *ShowcaseTrashedDeprecatedDetails { s := new(ShowcaseTrashedDeprecatedDetails) s.EventUuid = EventUuid return s } // ShowcaseTrashedDeprecatedType : has no documentation (yet) type ShowcaseTrashedDeprecatedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseTrashedDeprecatedType returns a new ShowcaseTrashedDeprecatedType instance func NewShowcaseTrashedDeprecatedType(Description string) *ShowcaseTrashedDeprecatedType { s := new(ShowcaseTrashedDeprecatedType) s.Description = Description return s } // ShowcaseTrashedDetails : Deleted showcase. type ShowcaseTrashedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseTrashedDetails returns a new ShowcaseTrashedDetails instance func NewShowcaseTrashedDetails(EventUuid string) *ShowcaseTrashedDetails { s := new(ShowcaseTrashedDetails) s.EventUuid = EventUuid return s } // ShowcaseTrashedType : has no documentation (yet) type ShowcaseTrashedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseTrashedType returns a new ShowcaseTrashedType instance func NewShowcaseTrashedType(Description string) *ShowcaseTrashedType { s := new(ShowcaseTrashedType) s.Description = Description return s } // ShowcaseUnresolveCommentDetails : Unresolved showcase comment. type ShowcaseUnresolveCommentDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` // CommentText : Comment text. CommentText string `json:"comment_text,omitempty"` } // NewShowcaseUnresolveCommentDetails returns a new ShowcaseUnresolveCommentDetails instance func NewShowcaseUnresolveCommentDetails(EventUuid string) *ShowcaseUnresolveCommentDetails { s := new(ShowcaseUnresolveCommentDetails) s.EventUuid = EventUuid return s } // ShowcaseUnresolveCommentType : has no documentation (yet) type ShowcaseUnresolveCommentType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseUnresolveCommentType returns a new ShowcaseUnresolveCommentType instance func NewShowcaseUnresolveCommentType(Description string) *ShowcaseUnresolveCommentType { s := new(ShowcaseUnresolveCommentType) s.Description = Description return s } // ShowcaseUntrashedDeprecatedDetails : Restored showcase (old version). type ShowcaseUntrashedDeprecatedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseUntrashedDeprecatedDetails returns a new ShowcaseUntrashedDeprecatedDetails instance func NewShowcaseUntrashedDeprecatedDetails(EventUuid string) *ShowcaseUntrashedDeprecatedDetails { s := new(ShowcaseUntrashedDeprecatedDetails) s.EventUuid = EventUuid return s } // ShowcaseUntrashedDeprecatedType : has no documentation (yet) type ShowcaseUntrashedDeprecatedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseUntrashedDeprecatedType returns a new ShowcaseUntrashedDeprecatedType instance func NewShowcaseUntrashedDeprecatedType(Description string) *ShowcaseUntrashedDeprecatedType { s := new(ShowcaseUntrashedDeprecatedType) s.Description = Description return s } // ShowcaseUntrashedDetails : Restored showcase. type ShowcaseUntrashedDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseUntrashedDetails returns a new ShowcaseUntrashedDetails instance func NewShowcaseUntrashedDetails(EventUuid string) *ShowcaseUntrashedDetails { s := new(ShowcaseUntrashedDetails) s.EventUuid = EventUuid return s } // ShowcaseUntrashedType : has no documentation (yet) type ShowcaseUntrashedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseUntrashedType returns a new ShowcaseUntrashedType instance func NewShowcaseUntrashedType(Description string) *ShowcaseUntrashedType { s := new(ShowcaseUntrashedType) s.Description = Description return s } // ShowcaseViewDetails : Viewed showcase. type ShowcaseViewDetails struct { // EventUuid : Event unique identifier. EventUuid string `json:"event_uuid"` } // NewShowcaseViewDetails returns a new ShowcaseViewDetails instance func NewShowcaseViewDetails(EventUuid string) *ShowcaseViewDetails { s := new(ShowcaseViewDetails) s.EventUuid = EventUuid return s } // ShowcaseViewType : has no documentation (yet) type ShowcaseViewType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewShowcaseViewType returns a new ShowcaseViewType instance func NewShowcaseViewType(Description string) *ShowcaseViewType { s := new(ShowcaseViewType) s.Description = Description return s } // SignInAsSessionEndDetails : Ended admin sign-in-as session. type SignInAsSessionEndDetails struct { } // NewSignInAsSessionEndDetails returns a new SignInAsSessionEndDetails instance func NewSignInAsSessionEndDetails() *SignInAsSessionEndDetails { s := new(SignInAsSessionEndDetails) return s } // SignInAsSessionEndType : has no documentation (yet) type SignInAsSessionEndType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSignInAsSessionEndType returns a new SignInAsSessionEndType instance func NewSignInAsSessionEndType(Description string) *SignInAsSessionEndType { s := new(SignInAsSessionEndType) s.Description = Description return s } // SignInAsSessionStartDetails : Started admin sign-in-as session. type SignInAsSessionStartDetails struct { } // NewSignInAsSessionStartDetails returns a new SignInAsSessionStartDetails instance func NewSignInAsSessionStartDetails() *SignInAsSessionStartDetails { s := new(SignInAsSessionStartDetails) return s } // SignInAsSessionStartType : has no documentation (yet) type SignInAsSessionStartType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSignInAsSessionStartType returns a new SignInAsSessionStartType instance func NewSignInAsSessionStartType(Description string) *SignInAsSessionStartType { s := new(SignInAsSessionStartType) s.Description = Description return s } // SmartSyncChangePolicyDetails : Changed default Smart Sync setting for team // members. type SmartSyncChangePolicyDetails struct { // NewValue : New smart sync policy. NewValue *team_policies.SmartSyncPolicy `json:"new_value,omitempty"` // PreviousValue : Previous smart sync policy. PreviousValue *team_policies.SmartSyncPolicy `json:"previous_value,omitempty"` } // NewSmartSyncChangePolicyDetails returns a new SmartSyncChangePolicyDetails instance func NewSmartSyncChangePolicyDetails() *SmartSyncChangePolicyDetails { s := new(SmartSyncChangePolicyDetails) return s } // SmartSyncChangePolicyType : has no documentation (yet) type SmartSyncChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSmartSyncChangePolicyType returns a new SmartSyncChangePolicyType instance func NewSmartSyncChangePolicyType(Description string) *SmartSyncChangePolicyType { s := new(SmartSyncChangePolicyType) s.Description = Description return s } // SmartSyncCreateAdminPrivilegeReportDetails : Created Smart Sync non-admin // devices report. type SmartSyncCreateAdminPrivilegeReportDetails struct { } // NewSmartSyncCreateAdminPrivilegeReportDetails returns a new SmartSyncCreateAdminPrivilegeReportDetails instance func NewSmartSyncCreateAdminPrivilegeReportDetails() *SmartSyncCreateAdminPrivilegeReportDetails { s := new(SmartSyncCreateAdminPrivilegeReportDetails) return s } // SmartSyncCreateAdminPrivilegeReportType : has no documentation (yet) type SmartSyncCreateAdminPrivilegeReportType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSmartSyncCreateAdminPrivilegeReportType returns a new SmartSyncCreateAdminPrivilegeReportType instance func NewSmartSyncCreateAdminPrivilegeReportType(Description string) *SmartSyncCreateAdminPrivilegeReportType { s := new(SmartSyncCreateAdminPrivilegeReportType) s.Description = Description return s } // SmartSyncNotOptOutDetails : Opted team into Smart Sync. type SmartSyncNotOptOutDetails struct { // PreviousValue : Previous Smart Sync opt out policy. PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"` // NewValue : New Smart Sync opt out policy. NewValue *SmartSyncOptOutPolicy `json:"new_value"` } // NewSmartSyncNotOptOutDetails returns a new SmartSyncNotOptOutDetails instance func NewSmartSyncNotOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncNotOptOutDetails { s := new(SmartSyncNotOptOutDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // SmartSyncNotOptOutType : has no documentation (yet) type SmartSyncNotOptOutType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSmartSyncNotOptOutType returns a new SmartSyncNotOptOutType instance func NewSmartSyncNotOptOutType(Description string) *SmartSyncNotOptOutType { s := new(SmartSyncNotOptOutType) s.Description = Description return s } // SmartSyncOptOutDetails : Opted team out of Smart Sync. type SmartSyncOptOutDetails struct { // PreviousValue : Previous Smart Sync opt out policy. PreviousValue *SmartSyncOptOutPolicy `json:"previous_value"` // NewValue : New Smart Sync opt out policy. NewValue *SmartSyncOptOutPolicy `json:"new_value"` } // NewSmartSyncOptOutDetails returns a new SmartSyncOptOutDetails instance func NewSmartSyncOptOutDetails(PreviousValue *SmartSyncOptOutPolicy, NewValue *SmartSyncOptOutPolicy) *SmartSyncOptOutDetails { s := new(SmartSyncOptOutDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // SmartSyncOptOutPolicy : has no documentation (yet) type SmartSyncOptOutPolicy struct { dropbox.Tagged } // Valid tag values for SmartSyncOptOutPolicy const ( SmartSyncOptOutPolicyDefault = "default" SmartSyncOptOutPolicyOptedOut = "opted_out" SmartSyncOptOutPolicyOther = "other" ) // SmartSyncOptOutType : has no documentation (yet) type SmartSyncOptOutType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSmartSyncOptOutType returns a new SmartSyncOptOutType instance func NewSmartSyncOptOutType(Description string) *SmartSyncOptOutType { s := new(SmartSyncOptOutType) s.Description = Description return s } // SpaceCapsType : Space limit alert policy type SpaceCapsType struct { dropbox.Tagged } // Valid tag values for SpaceCapsType const ( SpaceCapsTypeHard = "hard" SpaceCapsTypeOff = "off" SpaceCapsTypeSoft = "soft" SpaceCapsTypeOther = "other" ) // SpaceLimitsStatus : has no documentation (yet) type SpaceLimitsStatus struct { dropbox.Tagged } // Valid tag values for SpaceLimitsStatus const ( SpaceLimitsStatusWithinQuota = "within_quota" SpaceLimitsStatusNearQuota = "near_quota" SpaceLimitsStatusOverQuota = "over_quota" SpaceLimitsStatusOther = "other" ) // SsoAddCertDetails : Added X.509 certificate for SSO. type SsoAddCertDetails struct { // CertificateDetails : SSO certificate details. CertificateDetails *Certificate `json:"certificate_details"` } // NewSsoAddCertDetails returns a new SsoAddCertDetails instance func NewSsoAddCertDetails(CertificateDetails *Certificate) *SsoAddCertDetails { s := new(SsoAddCertDetails) s.CertificateDetails = CertificateDetails return s } // SsoAddCertType : has no documentation (yet) type SsoAddCertType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoAddCertType returns a new SsoAddCertType instance func NewSsoAddCertType(Description string) *SsoAddCertType { s := new(SsoAddCertType) s.Description = Description return s } // SsoAddLoginUrlDetails : Added sign-in URL for SSO. type SsoAddLoginUrlDetails struct { // NewValue : New single sign-on login URL. NewValue string `json:"new_value"` } // NewSsoAddLoginUrlDetails returns a new SsoAddLoginUrlDetails instance func NewSsoAddLoginUrlDetails(NewValue string) *SsoAddLoginUrlDetails { s := new(SsoAddLoginUrlDetails) s.NewValue = NewValue return s } // SsoAddLoginUrlType : has no documentation (yet) type SsoAddLoginUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoAddLoginUrlType returns a new SsoAddLoginUrlType instance func NewSsoAddLoginUrlType(Description string) *SsoAddLoginUrlType { s := new(SsoAddLoginUrlType) s.Description = Description return s } // SsoAddLogoutUrlDetails : Added sign-out URL for SSO. type SsoAddLogoutUrlDetails struct { // NewValue : New single sign-on logout URL. Might be missing due to // historical data gap. NewValue string `json:"new_value,omitempty"` } // NewSsoAddLogoutUrlDetails returns a new SsoAddLogoutUrlDetails instance func NewSsoAddLogoutUrlDetails() *SsoAddLogoutUrlDetails { s := new(SsoAddLogoutUrlDetails) return s } // SsoAddLogoutUrlType : has no documentation (yet) type SsoAddLogoutUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoAddLogoutUrlType returns a new SsoAddLogoutUrlType instance func NewSsoAddLogoutUrlType(Description string) *SsoAddLogoutUrlType { s := new(SsoAddLogoutUrlType) s.Description = Description return s } // SsoChangeCertDetails : Changed X.509 certificate for SSO. type SsoChangeCertDetails struct { // PreviousCertificateDetails : Previous SSO certificate details. Might be // missing due to historical data gap. PreviousCertificateDetails *Certificate `json:"previous_certificate_details,omitempty"` // NewCertificateDetails : New SSO certificate details. NewCertificateDetails *Certificate `json:"new_certificate_details"` } // NewSsoChangeCertDetails returns a new SsoChangeCertDetails instance func NewSsoChangeCertDetails(NewCertificateDetails *Certificate) *SsoChangeCertDetails { s := new(SsoChangeCertDetails) s.NewCertificateDetails = NewCertificateDetails return s } // SsoChangeCertType : has no documentation (yet) type SsoChangeCertType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoChangeCertType returns a new SsoChangeCertType instance func NewSsoChangeCertType(Description string) *SsoChangeCertType { s := new(SsoChangeCertType) s.Description = Description return s } // SsoChangeLoginUrlDetails : Changed sign-in URL for SSO. type SsoChangeLoginUrlDetails struct { // PreviousValue : Previous single sign-on login URL. PreviousValue string `json:"previous_value"` // NewValue : New single sign-on login URL. NewValue string `json:"new_value"` } // NewSsoChangeLoginUrlDetails returns a new SsoChangeLoginUrlDetails instance func NewSsoChangeLoginUrlDetails(PreviousValue string, NewValue string) *SsoChangeLoginUrlDetails { s := new(SsoChangeLoginUrlDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // SsoChangeLoginUrlType : has no documentation (yet) type SsoChangeLoginUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoChangeLoginUrlType returns a new SsoChangeLoginUrlType instance func NewSsoChangeLoginUrlType(Description string) *SsoChangeLoginUrlType { s := new(SsoChangeLoginUrlType) s.Description = Description return s } // SsoChangeLogoutUrlDetails : Changed sign-out URL for SSO. type SsoChangeLogoutUrlDetails struct { // PreviousValue : Previous single sign-on logout URL. Might be missing due // to historical data gap. PreviousValue string `json:"previous_value,omitempty"` // NewValue : New single sign-on logout URL. Might be missing due to // historical data gap. NewValue string `json:"new_value,omitempty"` } // NewSsoChangeLogoutUrlDetails returns a new SsoChangeLogoutUrlDetails instance func NewSsoChangeLogoutUrlDetails() *SsoChangeLogoutUrlDetails { s := new(SsoChangeLogoutUrlDetails) return s } // SsoChangeLogoutUrlType : has no documentation (yet) type SsoChangeLogoutUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoChangeLogoutUrlType returns a new SsoChangeLogoutUrlType instance func NewSsoChangeLogoutUrlType(Description string) *SsoChangeLogoutUrlType { s := new(SsoChangeLogoutUrlType) s.Description = Description return s } // SsoChangePolicyDetails : Changed single sign-on setting for team. type SsoChangePolicyDetails struct { // NewValue : New single sign-on policy. NewValue *team_policies.SsoPolicy `json:"new_value"` // PreviousValue : Previous single sign-on policy. Might be missing due to // historical data gap. PreviousValue *team_policies.SsoPolicy `json:"previous_value,omitempty"` } // NewSsoChangePolicyDetails returns a new SsoChangePolicyDetails instance func NewSsoChangePolicyDetails(NewValue *team_policies.SsoPolicy) *SsoChangePolicyDetails { s := new(SsoChangePolicyDetails) s.NewValue = NewValue return s } // SsoChangePolicyType : has no documentation (yet) type SsoChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoChangePolicyType returns a new SsoChangePolicyType instance func NewSsoChangePolicyType(Description string) *SsoChangePolicyType { s := new(SsoChangePolicyType) s.Description = Description return s } // SsoChangeSamlIdentityModeDetails : Changed SAML identity mode for SSO. type SsoChangeSamlIdentityModeDetails struct { // PreviousValue : Previous single sign-on identity mode. PreviousValue int64 `json:"previous_value"` // NewValue : New single sign-on identity mode. NewValue int64 `json:"new_value"` } // NewSsoChangeSamlIdentityModeDetails returns a new SsoChangeSamlIdentityModeDetails instance func NewSsoChangeSamlIdentityModeDetails(PreviousValue int64, NewValue int64) *SsoChangeSamlIdentityModeDetails { s := new(SsoChangeSamlIdentityModeDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // SsoChangeSamlIdentityModeType : has no documentation (yet) type SsoChangeSamlIdentityModeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoChangeSamlIdentityModeType returns a new SsoChangeSamlIdentityModeType instance func NewSsoChangeSamlIdentityModeType(Description string) *SsoChangeSamlIdentityModeType { s := new(SsoChangeSamlIdentityModeType) s.Description = Description return s } // SsoErrorDetails : Failed to sign in via SSO. type SsoErrorDetails struct { // ErrorDetails : Error details. ErrorDetails *FailureDetailsLogInfo `json:"error_details"` } // NewSsoErrorDetails returns a new SsoErrorDetails instance func NewSsoErrorDetails(ErrorDetails *FailureDetailsLogInfo) *SsoErrorDetails { s := new(SsoErrorDetails) s.ErrorDetails = ErrorDetails return s } // SsoErrorType : has no documentation (yet) type SsoErrorType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoErrorType returns a new SsoErrorType instance func NewSsoErrorType(Description string) *SsoErrorType { s := new(SsoErrorType) s.Description = Description return s } // SsoRemoveCertDetails : Removed X.509 certificate for SSO. type SsoRemoveCertDetails struct { } // NewSsoRemoveCertDetails returns a new SsoRemoveCertDetails instance func NewSsoRemoveCertDetails() *SsoRemoveCertDetails { s := new(SsoRemoveCertDetails) return s } // SsoRemoveCertType : has no documentation (yet) type SsoRemoveCertType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoRemoveCertType returns a new SsoRemoveCertType instance func NewSsoRemoveCertType(Description string) *SsoRemoveCertType { s := new(SsoRemoveCertType) s.Description = Description return s } // SsoRemoveLoginUrlDetails : Removed sign-in URL for SSO. type SsoRemoveLoginUrlDetails struct { // PreviousValue : Previous single sign-on login URL. PreviousValue string `json:"previous_value"` } // NewSsoRemoveLoginUrlDetails returns a new SsoRemoveLoginUrlDetails instance func NewSsoRemoveLoginUrlDetails(PreviousValue string) *SsoRemoveLoginUrlDetails { s := new(SsoRemoveLoginUrlDetails) s.PreviousValue = PreviousValue return s } // SsoRemoveLoginUrlType : has no documentation (yet) type SsoRemoveLoginUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoRemoveLoginUrlType returns a new SsoRemoveLoginUrlType instance func NewSsoRemoveLoginUrlType(Description string) *SsoRemoveLoginUrlType { s := new(SsoRemoveLoginUrlType) s.Description = Description return s } // SsoRemoveLogoutUrlDetails : Removed sign-out URL for SSO. type SsoRemoveLogoutUrlDetails struct { // PreviousValue : Previous single sign-on logout URL. PreviousValue string `json:"previous_value"` } // NewSsoRemoveLogoutUrlDetails returns a new SsoRemoveLogoutUrlDetails instance func NewSsoRemoveLogoutUrlDetails(PreviousValue string) *SsoRemoveLogoutUrlDetails { s := new(SsoRemoveLogoutUrlDetails) s.PreviousValue = PreviousValue return s } // SsoRemoveLogoutUrlType : has no documentation (yet) type SsoRemoveLogoutUrlType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewSsoRemoveLogoutUrlType returns a new SsoRemoveLogoutUrlType instance func NewSsoRemoveLogoutUrlType(Description string) *SsoRemoveLogoutUrlType { s := new(SsoRemoveLogoutUrlType) s.Description = Description return s } // TeamActivityCreateReportDetails : Created team activity report. type TeamActivityCreateReportDetails struct { // StartDate : Report start date. StartDate time.Time `json:"start_date"` // EndDate : Report end date. EndDate time.Time `json:"end_date"` } // NewTeamActivityCreateReportDetails returns a new TeamActivityCreateReportDetails instance func NewTeamActivityCreateReportDetails(StartDate time.Time, EndDate time.Time) *TeamActivityCreateReportDetails { s := new(TeamActivityCreateReportDetails) s.StartDate = StartDate s.EndDate = EndDate return s } // TeamActivityCreateReportType : has no documentation (yet) type TeamActivityCreateReportType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamActivityCreateReportType returns a new TeamActivityCreateReportType instance func NewTeamActivityCreateReportType(Description string) *TeamActivityCreateReportType { s := new(TeamActivityCreateReportType) s.Description = Description return s } // TeamEvent : An audit log event. type TeamEvent struct { // Timestamp : The Dropbox timestamp representing when the action was taken. Timestamp time.Time `json:"timestamp"` // EventCategory : The category that this type of action belongs to. EventCategory *EventCategory `json:"event_category"` // Actor : The entity who actually performed the action. Might be missing // due to historical data gap. Actor *ActorLogInfo `json:"actor,omitempty"` // Origin : The origin from which the actor performed the action including // information about host, ip address, location, session, etc. If the action // was performed programmatically via the API the origin represents the API // client. Origin *OriginLogInfo `json:"origin,omitempty"` // InvolveNonTeamMember : True if the action involved a non team member // either as the actor or as one of the affected users. Might be missing due // to historical data gap. InvolveNonTeamMember bool `json:"involve_non_team_member,omitempty"` // Context : The user or team on whose behalf the actor performed the // action. Might be missing due to historical data gap. Context *ContextLogInfo `json:"context,omitempty"` // Participants : Zero or more users and/or groups that are affected by the // action. Note that this list doesn't include any actors or users in // context. Participants []*ParticipantLogInfo `json:"participants,omitempty"` // Assets : Zero or more content assets involved in the action. Currently // these include Dropbox files and folders but in the future we might add // other asset types such as Paper documents, folders, projects, etc. Assets []*AssetLogInfo `json:"assets,omitempty"` // EventType : The particular type of action taken. EventType *EventType `json:"event_type"` // Details : The variable event schema applicable to this type of action, // instantiated with respect to this particular action. Details *EventDetails `json:"details"` } // NewTeamEvent returns a new TeamEvent instance func NewTeamEvent(Timestamp time.Time, EventCategory *EventCategory, EventType *EventType, Details *EventDetails) *TeamEvent { s := new(TeamEvent) s.Timestamp = Timestamp s.EventCategory = EventCategory s.EventType = EventType s.Details = Details return s } // TeamFolderChangeStatusDetails : Changed archival status of team folder. type TeamFolderChangeStatusDetails struct { // NewValue : New team folder status. NewValue *team.TeamFolderStatus `json:"new_value"` // PreviousValue : Previous team folder status. Might be missing due to // historical data gap. PreviousValue *team.TeamFolderStatus `json:"previous_value,omitempty"` } // NewTeamFolderChangeStatusDetails returns a new TeamFolderChangeStatusDetails instance func NewTeamFolderChangeStatusDetails(NewValue *team.TeamFolderStatus) *TeamFolderChangeStatusDetails { s := new(TeamFolderChangeStatusDetails) s.NewValue = NewValue return s } // TeamFolderChangeStatusType : has no documentation (yet) type TeamFolderChangeStatusType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamFolderChangeStatusType returns a new TeamFolderChangeStatusType instance func NewTeamFolderChangeStatusType(Description string) *TeamFolderChangeStatusType { s := new(TeamFolderChangeStatusType) s.Description = Description return s } // TeamFolderCreateDetails : Created team folder in active status. type TeamFolderCreateDetails struct { } // NewTeamFolderCreateDetails returns a new TeamFolderCreateDetails instance func NewTeamFolderCreateDetails() *TeamFolderCreateDetails { s := new(TeamFolderCreateDetails) return s } // TeamFolderCreateType : has no documentation (yet) type TeamFolderCreateType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamFolderCreateType returns a new TeamFolderCreateType instance func NewTeamFolderCreateType(Description string) *TeamFolderCreateType { s := new(TeamFolderCreateType) s.Description = Description return s } // TeamFolderDowngradeDetails : Downgraded team folder to regular shared folder. type TeamFolderDowngradeDetails struct { // TargetAssetIndex : Target asset position in the Assets list. TargetAssetIndex uint64 `json:"target_asset_index"` } // NewTeamFolderDowngradeDetails returns a new TeamFolderDowngradeDetails instance func NewTeamFolderDowngradeDetails(TargetAssetIndex uint64) *TeamFolderDowngradeDetails { s := new(TeamFolderDowngradeDetails) s.TargetAssetIndex = TargetAssetIndex return s } // TeamFolderDowngradeType : has no documentation (yet) type TeamFolderDowngradeType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamFolderDowngradeType returns a new TeamFolderDowngradeType instance func NewTeamFolderDowngradeType(Description string) *TeamFolderDowngradeType { s := new(TeamFolderDowngradeType) s.Description = Description return s } // TeamFolderPermanentlyDeleteDetails : Permanently deleted archived team // folder. type TeamFolderPermanentlyDeleteDetails struct { } // NewTeamFolderPermanentlyDeleteDetails returns a new TeamFolderPermanentlyDeleteDetails instance func NewTeamFolderPermanentlyDeleteDetails() *TeamFolderPermanentlyDeleteDetails { s := new(TeamFolderPermanentlyDeleteDetails) return s } // TeamFolderPermanentlyDeleteType : has no documentation (yet) type TeamFolderPermanentlyDeleteType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamFolderPermanentlyDeleteType returns a new TeamFolderPermanentlyDeleteType instance func NewTeamFolderPermanentlyDeleteType(Description string) *TeamFolderPermanentlyDeleteType { s := new(TeamFolderPermanentlyDeleteType) s.Description = Description return s } // TeamFolderRenameDetails : Renamed active/archived team folder. type TeamFolderRenameDetails struct { // PreviousFolderName : Previous folder name. PreviousFolderName string `json:"previous_folder_name"` // NewFolderName : New folder name. NewFolderName string `json:"new_folder_name"` } // NewTeamFolderRenameDetails returns a new TeamFolderRenameDetails instance func NewTeamFolderRenameDetails(PreviousFolderName string, NewFolderName string) *TeamFolderRenameDetails { s := new(TeamFolderRenameDetails) s.PreviousFolderName = PreviousFolderName s.NewFolderName = NewFolderName return s } // TeamFolderRenameType : has no documentation (yet) type TeamFolderRenameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamFolderRenameType returns a new TeamFolderRenameType instance func NewTeamFolderRenameType(Description string) *TeamFolderRenameType { s := new(TeamFolderRenameType) s.Description = Description return s } // TeamLinkedAppLogInfo : Team linked app type TeamLinkedAppLogInfo struct { AppLogInfo } // NewTeamLinkedAppLogInfo returns a new TeamLinkedAppLogInfo instance func NewTeamLinkedAppLogInfo() *TeamLinkedAppLogInfo { s := new(TeamLinkedAppLogInfo) return s } // TeamMemberLogInfo : Team member's logged information. type TeamMemberLogInfo struct { UserLogInfo // TeamMemberId : Team member ID. Might be missing due to historical data // gap. TeamMemberId string `json:"team_member_id,omitempty"` // MemberExternalId : Team member external ID. MemberExternalId string `json:"member_external_id,omitempty"` } // NewTeamMemberLogInfo returns a new TeamMemberLogInfo instance func NewTeamMemberLogInfo() *TeamMemberLogInfo { s := new(TeamMemberLogInfo) return s } // TeamMembershipType : has no documentation (yet) type TeamMembershipType struct { dropbox.Tagged } // Valid tag values for TeamMembershipType const ( TeamMembershipTypeFree = "free" TeamMembershipTypeFull = "full" TeamMembershipTypeOther = "other" ) // TeamMergeFromDetails : Merged another team into this team. type TeamMergeFromDetails struct { // TeamName : The name of the team that was merged into this team. TeamName string `json:"team_name"` } // NewTeamMergeFromDetails returns a new TeamMergeFromDetails instance func NewTeamMergeFromDetails(TeamName string) *TeamMergeFromDetails { s := new(TeamMergeFromDetails) s.TeamName = TeamName return s } // TeamMergeFromType : has no documentation (yet) type TeamMergeFromType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamMergeFromType returns a new TeamMergeFromType instance func NewTeamMergeFromType(Description string) *TeamMergeFromType { s := new(TeamMergeFromType) s.Description = Description return s } // TeamMergeToDetails : Merged this team into another team. type TeamMergeToDetails struct { // TeamName : The name of the team that this team was merged into. TeamName string `json:"team_name"` } // NewTeamMergeToDetails returns a new TeamMergeToDetails instance func NewTeamMergeToDetails(TeamName string) *TeamMergeToDetails { s := new(TeamMergeToDetails) s.TeamName = TeamName return s } // TeamMergeToType : has no documentation (yet) type TeamMergeToType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamMergeToType returns a new TeamMergeToType instance func NewTeamMergeToType(Description string) *TeamMergeToType { s := new(TeamMergeToType) s.Description = Description return s } // TeamName : Team name details type TeamName struct { // TeamDisplayName : Team's display name. TeamDisplayName string `json:"team_display_name"` // TeamLegalName : Team's legal name. TeamLegalName string `json:"team_legal_name"` } // NewTeamName returns a new TeamName instance func NewTeamName(TeamDisplayName string, TeamLegalName string) *TeamName { s := new(TeamName) s.TeamDisplayName = TeamDisplayName s.TeamLegalName = TeamLegalName return s } // TeamProfileAddLogoDetails : Added team logo to display on shared link // headers. type TeamProfileAddLogoDetails struct { } // NewTeamProfileAddLogoDetails returns a new TeamProfileAddLogoDetails instance func NewTeamProfileAddLogoDetails() *TeamProfileAddLogoDetails { s := new(TeamProfileAddLogoDetails) return s } // TeamProfileAddLogoType : has no documentation (yet) type TeamProfileAddLogoType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamProfileAddLogoType returns a new TeamProfileAddLogoType instance func NewTeamProfileAddLogoType(Description string) *TeamProfileAddLogoType { s := new(TeamProfileAddLogoType) s.Description = Description return s } // TeamProfileChangeDefaultLanguageDetails : Changed default language for team. type TeamProfileChangeDefaultLanguageDetails struct { // NewValue : New team's default language. NewValue string `json:"new_value"` // PreviousValue : Previous team's default language. PreviousValue string `json:"previous_value"` } // NewTeamProfileChangeDefaultLanguageDetails returns a new TeamProfileChangeDefaultLanguageDetails instance func NewTeamProfileChangeDefaultLanguageDetails(NewValue string, PreviousValue string) *TeamProfileChangeDefaultLanguageDetails { s := new(TeamProfileChangeDefaultLanguageDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // TeamProfileChangeDefaultLanguageType : has no documentation (yet) type TeamProfileChangeDefaultLanguageType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamProfileChangeDefaultLanguageType returns a new TeamProfileChangeDefaultLanguageType instance func NewTeamProfileChangeDefaultLanguageType(Description string) *TeamProfileChangeDefaultLanguageType { s := new(TeamProfileChangeDefaultLanguageType) s.Description = Description return s } // TeamProfileChangeLogoDetails : Changed team logo displayed on shared link // headers. type TeamProfileChangeLogoDetails struct { } // NewTeamProfileChangeLogoDetails returns a new TeamProfileChangeLogoDetails instance func NewTeamProfileChangeLogoDetails() *TeamProfileChangeLogoDetails { s := new(TeamProfileChangeLogoDetails) return s } // TeamProfileChangeLogoType : has no documentation (yet) type TeamProfileChangeLogoType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamProfileChangeLogoType returns a new TeamProfileChangeLogoType instance func NewTeamProfileChangeLogoType(Description string) *TeamProfileChangeLogoType { s := new(TeamProfileChangeLogoType) s.Description = Description return s } // TeamProfileChangeNameDetails : Changed team name. type TeamProfileChangeNameDetails struct { // PreviousValue : Previous teams name. Might be missing due to historical // data gap. PreviousValue *TeamName `json:"previous_value,omitempty"` // NewValue : New team name. NewValue *TeamName `json:"new_value"` } // NewTeamProfileChangeNameDetails returns a new TeamProfileChangeNameDetails instance func NewTeamProfileChangeNameDetails(NewValue *TeamName) *TeamProfileChangeNameDetails { s := new(TeamProfileChangeNameDetails) s.NewValue = NewValue return s } // TeamProfileChangeNameType : has no documentation (yet) type TeamProfileChangeNameType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamProfileChangeNameType returns a new TeamProfileChangeNameType instance func NewTeamProfileChangeNameType(Description string) *TeamProfileChangeNameType { s := new(TeamProfileChangeNameType) s.Description = Description return s } // TeamProfileRemoveLogoDetails : Removed team logo displayed on shared link // headers. type TeamProfileRemoveLogoDetails struct { } // NewTeamProfileRemoveLogoDetails returns a new TeamProfileRemoveLogoDetails instance func NewTeamProfileRemoveLogoDetails() *TeamProfileRemoveLogoDetails { s := new(TeamProfileRemoveLogoDetails) return s } // TeamProfileRemoveLogoType : has no documentation (yet) type TeamProfileRemoveLogoType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamProfileRemoveLogoType returns a new TeamProfileRemoveLogoType instance func NewTeamProfileRemoveLogoType(Description string) *TeamProfileRemoveLogoType { s := new(TeamProfileRemoveLogoType) s.Description = Description return s } // TeamSelectiveSyncPolicy : Policy for controlling whether team selective sync // is enabled for team. type TeamSelectiveSyncPolicy struct { dropbox.Tagged } // Valid tag values for TeamSelectiveSyncPolicy const ( TeamSelectiveSyncPolicyDisabled = "disabled" TeamSelectiveSyncPolicyEnabled = "enabled" TeamSelectiveSyncPolicyOther = "other" ) // TeamSelectiveSyncPolicyChangedDetails : Enabled/disabled Team Selective Sync // for team. type TeamSelectiveSyncPolicyChangedDetails struct { // NewValue : New Team Selective Sync policy. NewValue *TeamSelectiveSyncPolicy `json:"new_value"` // PreviousValue : Previous Team Selective Sync policy. PreviousValue *TeamSelectiveSyncPolicy `json:"previous_value"` } // NewTeamSelectiveSyncPolicyChangedDetails returns a new TeamSelectiveSyncPolicyChangedDetails instance func NewTeamSelectiveSyncPolicyChangedDetails(NewValue *TeamSelectiveSyncPolicy, PreviousValue *TeamSelectiveSyncPolicy) *TeamSelectiveSyncPolicyChangedDetails { s := new(TeamSelectiveSyncPolicyChangedDetails) s.NewValue = NewValue s.PreviousValue = PreviousValue return s } // TeamSelectiveSyncPolicyChangedType : has no documentation (yet) type TeamSelectiveSyncPolicyChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamSelectiveSyncPolicyChangedType returns a new TeamSelectiveSyncPolicyChangedType instance func NewTeamSelectiveSyncPolicyChangedType(Description string) *TeamSelectiveSyncPolicyChangedType { s := new(TeamSelectiveSyncPolicyChangedType) s.Description = Description return s } // TeamSelectiveSyncSettingsChangedDetails : Changed sync default. type TeamSelectiveSyncSettingsChangedDetails struct { // PreviousValue : Previous value. PreviousValue *files.SyncSetting `json:"previous_value"` // NewValue : New value. NewValue *files.SyncSetting `json:"new_value"` } // NewTeamSelectiveSyncSettingsChangedDetails returns a new TeamSelectiveSyncSettingsChangedDetails instance func NewTeamSelectiveSyncSettingsChangedDetails(PreviousValue *files.SyncSetting, NewValue *files.SyncSetting) *TeamSelectiveSyncSettingsChangedDetails { s := new(TeamSelectiveSyncSettingsChangedDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // TeamSelectiveSyncSettingsChangedType : has no documentation (yet) type TeamSelectiveSyncSettingsChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTeamSelectiveSyncSettingsChangedType returns a new TeamSelectiveSyncSettingsChangedType instance func NewTeamSelectiveSyncSettingsChangedType(Description string) *TeamSelectiveSyncSettingsChangedType { s := new(TeamSelectiveSyncSettingsChangedType) s.Description = Description return s } // TfaAddBackupPhoneDetails : Added backup phone for two-step verification. type TfaAddBackupPhoneDetails struct { } // NewTfaAddBackupPhoneDetails returns a new TfaAddBackupPhoneDetails instance func NewTfaAddBackupPhoneDetails() *TfaAddBackupPhoneDetails { s := new(TfaAddBackupPhoneDetails) return s } // TfaAddBackupPhoneType : has no documentation (yet) type TfaAddBackupPhoneType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaAddBackupPhoneType returns a new TfaAddBackupPhoneType instance func NewTfaAddBackupPhoneType(Description string) *TfaAddBackupPhoneType { s := new(TfaAddBackupPhoneType) s.Description = Description return s } // TfaAddSecurityKeyDetails : Added security key for two-step verification. type TfaAddSecurityKeyDetails struct { } // NewTfaAddSecurityKeyDetails returns a new TfaAddSecurityKeyDetails instance func NewTfaAddSecurityKeyDetails() *TfaAddSecurityKeyDetails { s := new(TfaAddSecurityKeyDetails) return s } // TfaAddSecurityKeyType : has no documentation (yet) type TfaAddSecurityKeyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaAddSecurityKeyType returns a new TfaAddSecurityKeyType instance func NewTfaAddSecurityKeyType(Description string) *TfaAddSecurityKeyType { s := new(TfaAddSecurityKeyType) s.Description = Description return s } // TfaChangeBackupPhoneDetails : Changed backup phone for two-step verification. type TfaChangeBackupPhoneDetails struct { } // NewTfaChangeBackupPhoneDetails returns a new TfaChangeBackupPhoneDetails instance func NewTfaChangeBackupPhoneDetails() *TfaChangeBackupPhoneDetails { s := new(TfaChangeBackupPhoneDetails) return s } // TfaChangeBackupPhoneType : has no documentation (yet) type TfaChangeBackupPhoneType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaChangeBackupPhoneType returns a new TfaChangeBackupPhoneType instance func NewTfaChangeBackupPhoneType(Description string) *TfaChangeBackupPhoneType { s := new(TfaChangeBackupPhoneType) s.Description = Description return s } // TfaChangePolicyDetails : Changed two-step verification setting for team. type TfaChangePolicyDetails struct { // NewValue : New change policy. NewValue *team_policies.TwoStepVerificationPolicy `json:"new_value"` // PreviousValue : Previous change policy. Might be missing due to // historical data gap. PreviousValue *team_policies.TwoStepVerificationPolicy `json:"previous_value,omitempty"` } // NewTfaChangePolicyDetails returns a new TfaChangePolicyDetails instance func NewTfaChangePolicyDetails(NewValue *team_policies.TwoStepVerificationPolicy) *TfaChangePolicyDetails { s := new(TfaChangePolicyDetails) s.NewValue = NewValue return s } // TfaChangePolicyType : has no documentation (yet) type TfaChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaChangePolicyType returns a new TfaChangePolicyType instance func NewTfaChangePolicyType(Description string) *TfaChangePolicyType { s := new(TfaChangePolicyType) s.Description = Description return s } // TfaChangeStatusDetails : Enabled/disabled/changed two-step verification // setting. type TfaChangeStatusDetails struct { // NewValue : The new two factor authentication configuration. NewValue *TfaConfiguration `json:"new_value"` // PreviousValue : The previous two factor authentication configuration. // Might be missing due to historical data gap. PreviousValue *TfaConfiguration `json:"previous_value,omitempty"` // UsedRescueCode : Used two factor authentication rescue code. This flag is // relevant when the two factor authentication configuration is disabled. UsedRescueCode bool `json:"used_rescue_code,omitempty"` } // NewTfaChangeStatusDetails returns a new TfaChangeStatusDetails instance func NewTfaChangeStatusDetails(NewValue *TfaConfiguration) *TfaChangeStatusDetails { s := new(TfaChangeStatusDetails) s.NewValue = NewValue return s } // TfaChangeStatusType : has no documentation (yet) type TfaChangeStatusType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaChangeStatusType returns a new TfaChangeStatusType instance func NewTfaChangeStatusType(Description string) *TfaChangeStatusType { s := new(TfaChangeStatusType) s.Description = Description return s } // TfaConfiguration : Two factor authentication configuration. Note: the enabled // option is deprecated. type TfaConfiguration struct { dropbox.Tagged } // Valid tag values for TfaConfiguration const ( TfaConfigurationDisabled = "disabled" TfaConfigurationEnabled = "enabled" TfaConfigurationSms = "sms" TfaConfigurationAuthenticator = "authenticator" TfaConfigurationOther = "other" ) // TfaRemoveBackupPhoneDetails : Removed backup phone for two-step verification. type TfaRemoveBackupPhoneDetails struct { } // NewTfaRemoveBackupPhoneDetails returns a new TfaRemoveBackupPhoneDetails instance func NewTfaRemoveBackupPhoneDetails() *TfaRemoveBackupPhoneDetails { s := new(TfaRemoveBackupPhoneDetails) return s } // TfaRemoveBackupPhoneType : has no documentation (yet) type TfaRemoveBackupPhoneType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaRemoveBackupPhoneType returns a new TfaRemoveBackupPhoneType instance func NewTfaRemoveBackupPhoneType(Description string) *TfaRemoveBackupPhoneType { s := new(TfaRemoveBackupPhoneType) s.Description = Description return s } // TfaRemoveSecurityKeyDetails : Removed security key for two-step verification. type TfaRemoveSecurityKeyDetails struct { } // NewTfaRemoveSecurityKeyDetails returns a new TfaRemoveSecurityKeyDetails instance func NewTfaRemoveSecurityKeyDetails() *TfaRemoveSecurityKeyDetails { s := new(TfaRemoveSecurityKeyDetails) return s } // TfaRemoveSecurityKeyType : has no documentation (yet) type TfaRemoveSecurityKeyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaRemoveSecurityKeyType returns a new TfaRemoveSecurityKeyType instance func NewTfaRemoveSecurityKeyType(Description string) *TfaRemoveSecurityKeyType { s := new(TfaRemoveSecurityKeyType) s.Description = Description return s } // TfaResetDetails : Reset two-step verification for team member. type TfaResetDetails struct { } // NewTfaResetDetails returns a new TfaResetDetails instance func NewTfaResetDetails() *TfaResetDetails { s := new(TfaResetDetails) return s } // TfaResetType : has no documentation (yet) type TfaResetType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTfaResetType returns a new TfaResetType instance func NewTfaResetType(Description string) *TfaResetType { s := new(TfaResetType) s.Description = Description return s } // TimeUnit : has no documentation (yet) type TimeUnit struct { dropbox.Tagged } // Valid tag values for TimeUnit const ( TimeUnitMilliseconds = "milliseconds" TimeUnitSeconds = "seconds" TimeUnitMinutes = "minutes" TimeUnitHours = "hours" TimeUnitDays = "days" TimeUnitWeeks = "weeks" TimeUnitMonths = "months" TimeUnitYears = "years" TimeUnitOther = "other" ) // TrustedNonTeamMemberLogInfo : User that is not a member of the team but // considered trusted. type TrustedNonTeamMemberLogInfo struct { UserLogInfo // TrustedNonTeamMemberType : Indicates the type of the trusted non team // member user. TrustedNonTeamMemberType *TrustedNonTeamMemberType `json:"trusted_non_team_member_type"` } // NewTrustedNonTeamMemberLogInfo returns a new TrustedNonTeamMemberLogInfo instance func NewTrustedNonTeamMemberLogInfo(TrustedNonTeamMemberType *TrustedNonTeamMemberType) *TrustedNonTeamMemberLogInfo { s := new(TrustedNonTeamMemberLogInfo) s.TrustedNonTeamMemberType = TrustedNonTeamMemberType return s } // TrustedNonTeamMemberType : has no documentation (yet) type TrustedNonTeamMemberType struct { dropbox.Tagged } // Valid tag values for TrustedNonTeamMemberType const ( TrustedNonTeamMemberTypeMultiInstanceAdmin = "multi_instance_admin" TrustedNonTeamMemberTypeOther = "other" ) // TwoAccountChangePolicyDetails : Enabled/disabled option for members to link // personal Dropbox account and team account to same computer. type TwoAccountChangePolicyDetails struct { // NewValue : New two account policy. NewValue *TwoAccountPolicy `json:"new_value"` // PreviousValue : Previous two account policy. Might be missing due to // historical data gap. PreviousValue *TwoAccountPolicy `json:"previous_value,omitempty"` } // NewTwoAccountChangePolicyDetails returns a new TwoAccountChangePolicyDetails instance func NewTwoAccountChangePolicyDetails(NewValue *TwoAccountPolicy) *TwoAccountChangePolicyDetails { s := new(TwoAccountChangePolicyDetails) s.NewValue = NewValue return s } // TwoAccountChangePolicyType : has no documentation (yet) type TwoAccountChangePolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewTwoAccountChangePolicyType returns a new TwoAccountChangePolicyType instance func NewTwoAccountChangePolicyType(Description string) *TwoAccountChangePolicyType { s := new(TwoAccountChangePolicyType) s.Description = Description return s } // TwoAccountPolicy : Policy for pairing personal account to work account type TwoAccountPolicy struct { dropbox.Tagged } // Valid tag values for TwoAccountPolicy const ( TwoAccountPolicyDisabled = "disabled" TwoAccountPolicyEnabled = "enabled" TwoAccountPolicyOther = "other" ) // UserLinkedAppLogInfo : User linked app type UserLinkedAppLogInfo struct { AppLogInfo } // NewUserLinkedAppLogInfo returns a new UserLinkedAppLogInfo instance func NewUserLinkedAppLogInfo() *UserLinkedAppLogInfo { s := new(UserLinkedAppLogInfo) return s } // UserNameLogInfo : User's name logged information type UserNameLogInfo struct { // GivenName : Given name. GivenName string `json:"given_name"` // Surname : Surname. Surname string `json:"surname"` // Locale : Locale. Might be missing due to historical data gap. Locale string `json:"locale,omitempty"` } // NewUserNameLogInfo returns a new UserNameLogInfo instance func NewUserNameLogInfo(GivenName string, Surname string) *UserNameLogInfo { s := new(UserNameLogInfo) s.GivenName = GivenName s.Surname = Surname return s } // UserOrTeamLinkedAppLogInfo : User or team linked app. Used when linked type // is missing due to historical data gap. type UserOrTeamLinkedAppLogInfo struct { AppLogInfo } // NewUserOrTeamLinkedAppLogInfo returns a new UserOrTeamLinkedAppLogInfo instance func NewUserOrTeamLinkedAppLogInfo() *UserOrTeamLinkedAppLogInfo { s := new(UserOrTeamLinkedAppLogInfo) return s } // ViewerInfoPolicyChangedDetails : Changed team policy for viewer info. type ViewerInfoPolicyChangedDetails struct { // PreviousValue : Previous Viewer Info policy. PreviousValue *PassPolicy `json:"previous_value"` // NewValue : New Viewer Info policy. NewValue *PassPolicy `json:"new_value"` } // NewViewerInfoPolicyChangedDetails returns a new ViewerInfoPolicyChangedDetails instance func NewViewerInfoPolicyChangedDetails(PreviousValue *PassPolicy, NewValue *PassPolicy) *ViewerInfoPolicyChangedDetails { s := new(ViewerInfoPolicyChangedDetails) s.PreviousValue = PreviousValue s.NewValue = NewValue return s } // ViewerInfoPolicyChangedType : has no documentation (yet) type ViewerInfoPolicyChangedType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewViewerInfoPolicyChangedType returns a new ViewerInfoPolicyChangedType instance func NewViewerInfoPolicyChangedType(Description string) *ViewerInfoPolicyChangedType { s := new(ViewerInfoPolicyChangedType) s.Description = Description return s } // WebDeviceSessionLogInfo : Information on active web sessions type WebDeviceSessionLogInfo struct { DeviceSessionLogInfo // SessionInfo : Web session unique id. Might be missing due to historical // data gap. SessionInfo *WebSessionLogInfo `json:"session_info,omitempty"` // UserAgent : Information on the hosting device. UserAgent string `json:"user_agent"` // Os : Information on the hosting operating system. Os string `json:"os"` // Browser : Information on the browser used for this web session. Browser string `json:"browser"` } // NewWebDeviceSessionLogInfo returns a new WebDeviceSessionLogInfo instance func NewWebDeviceSessionLogInfo(UserAgent string, Os string, Browser string) *WebDeviceSessionLogInfo { s := new(WebDeviceSessionLogInfo) s.UserAgent = UserAgent s.Os = Os s.Browser = Browser return s } // WebSessionLogInfo : Web session. type WebSessionLogInfo struct { SessionLogInfo } // NewWebSessionLogInfo returns a new WebSessionLogInfo instance func NewWebSessionLogInfo() *WebSessionLogInfo { s := new(WebSessionLogInfo) return s } // WebSessionsChangeFixedLengthPolicyDetails : Changed how long members can stay // signed in to Dropbox.com. type WebSessionsChangeFixedLengthPolicyDetails struct { // NewValue : New session length policy. Might be missing due to historical // data gap. NewValue *WebSessionsFixedLengthPolicy `json:"new_value,omitempty"` // PreviousValue : Previous session length policy. Might be missing due to // historical data gap. PreviousValue *WebSessionsFixedLengthPolicy `json:"previous_value,omitempty"` } // NewWebSessionsChangeFixedLengthPolicyDetails returns a new WebSessionsChangeFixedLengthPolicyDetails instance func NewWebSessionsChangeFixedLengthPolicyDetails() *WebSessionsChangeFixedLengthPolicyDetails { s := new(WebSessionsChangeFixedLengthPolicyDetails) return s } // WebSessionsChangeFixedLengthPolicyType : has no documentation (yet) type WebSessionsChangeFixedLengthPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewWebSessionsChangeFixedLengthPolicyType returns a new WebSessionsChangeFixedLengthPolicyType instance func NewWebSessionsChangeFixedLengthPolicyType(Description string) *WebSessionsChangeFixedLengthPolicyType { s := new(WebSessionsChangeFixedLengthPolicyType) s.Description = Description return s } // WebSessionsChangeIdleLengthPolicyDetails : Changed how long team members can // be idle while signed in to Dropbox.com. type WebSessionsChangeIdleLengthPolicyDetails struct { // NewValue : New idle length policy. Might be missing due to historical // data gap. NewValue *WebSessionsIdleLengthPolicy `json:"new_value,omitempty"` // PreviousValue : Previous idle length policy. Might be missing due to // historical data gap. PreviousValue *WebSessionsIdleLengthPolicy `json:"previous_value,omitempty"` } // NewWebSessionsChangeIdleLengthPolicyDetails returns a new WebSessionsChangeIdleLengthPolicyDetails instance func NewWebSessionsChangeIdleLengthPolicyDetails() *WebSessionsChangeIdleLengthPolicyDetails { s := new(WebSessionsChangeIdleLengthPolicyDetails) return s } // WebSessionsChangeIdleLengthPolicyType : has no documentation (yet) type WebSessionsChangeIdleLengthPolicyType struct { // Description : has no documentation (yet) Description string `json:"description"` } // NewWebSessionsChangeIdleLengthPolicyType returns a new WebSessionsChangeIdleLengthPolicyType instance func NewWebSessionsChangeIdleLengthPolicyType(Description string) *WebSessionsChangeIdleLengthPolicyType { s := new(WebSessionsChangeIdleLengthPolicyType) s.Description = Description return s } // WebSessionsFixedLengthPolicy : Web sessions fixed length policy. type WebSessionsFixedLengthPolicy struct { dropbox.Tagged // Defined : Defined fixed session length. Defined *DurationLogInfo `json:"defined,omitempty"` } // Valid tag values for WebSessionsFixedLengthPolicy const ( WebSessionsFixedLengthPolicyDefined = "defined" WebSessionsFixedLengthPolicyUndefined = "undefined" WebSessionsFixedLengthPolicyOther = "other" ) // UnmarshalJSON deserializes into a WebSessionsFixedLengthPolicy instance func (u *WebSessionsFixedLengthPolicy) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Defined : Defined fixed session length. Defined json.RawMessage `json:"defined,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "defined": err = json.Unmarshal(body, &u.Defined) if err != nil { return err } } return nil } // WebSessionsIdleLengthPolicy : Web sessions idle length policy. type WebSessionsIdleLengthPolicy struct { dropbox.Tagged // Defined : Defined idle session length. Defined *DurationLogInfo `json:"defined,omitempty"` } // Valid tag values for WebSessionsIdleLengthPolicy const ( WebSessionsIdleLengthPolicyDefined = "defined" WebSessionsIdleLengthPolicyUndefined = "undefined" WebSessionsIdleLengthPolicyOther = "other" ) // UnmarshalJSON deserializes into a WebSessionsIdleLengthPolicy instance func (u *WebSessionsIdleLengthPolicy) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Defined : Defined idle session length. Defined json.RawMessage `json:"defined,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "defined": err = json.Unmarshal(body, &u.Defined) if err != nil { return err } } return nil } dropbox-sdk-go-unofficial-5.4.0/dropbox/team_policies/000077500000000000000000000000001340753361200227725ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/team_policies/types.go000066400000000000000000000212241340753361200244660ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package team_policies : has no documentation (yet) package team_policies import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" // CameraUploadsPolicyState : has no documentation (yet) type CameraUploadsPolicyState struct { dropbox.Tagged } // Valid tag values for CameraUploadsPolicyState const ( CameraUploadsPolicyStateDisabled = "disabled" CameraUploadsPolicyStateEnabled = "enabled" CameraUploadsPolicyStateOther = "other" ) // EmmState : has no documentation (yet) type EmmState struct { dropbox.Tagged } // Valid tag values for EmmState const ( EmmStateDisabled = "disabled" EmmStateOptional = "optional" EmmStateRequired = "required" EmmStateOther = "other" ) // GroupCreation : has no documentation (yet) type GroupCreation struct { dropbox.Tagged } // Valid tag values for GroupCreation const ( GroupCreationAdminsAndMembers = "admins_and_members" GroupCreationAdminsOnly = "admins_only" ) // OfficeAddInPolicy : has no documentation (yet) type OfficeAddInPolicy struct { dropbox.Tagged } // Valid tag values for OfficeAddInPolicy const ( OfficeAddInPolicyDisabled = "disabled" OfficeAddInPolicyEnabled = "enabled" OfficeAddInPolicyOther = "other" ) // PaperDeploymentPolicy : has no documentation (yet) type PaperDeploymentPolicy struct { dropbox.Tagged } // Valid tag values for PaperDeploymentPolicy const ( PaperDeploymentPolicyFull = "full" PaperDeploymentPolicyPartial = "partial" PaperDeploymentPolicyOther = "other" ) // PaperEnabledPolicy : has no documentation (yet) type PaperEnabledPolicy struct { dropbox.Tagged } // Valid tag values for PaperEnabledPolicy const ( PaperEnabledPolicyDisabled = "disabled" PaperEnabledPolicyEnabled = "enabled" PaperEnabledPolicyUnspecified = "unspecified" PaperEnabledPolicyOther = "other" ) // PasswordStrengthPolicy : has no documentation (yet) type PasswordStrengthPolicy struct { dropbox.Tagged } // Valid tag values for PasswordStrengthPolicy const ( PasswordStrengthPolicyMinimalRequirements = "minimal_requirements" PasswordStrengthPolicyModeratePassword = "moderate_password" PasswordStrengthPolicyStrongPassword = "strong_password" PasswordStrengthPolicyOther = "other" ) // RolloutMethod : has no documentation (yet) type RolloutMethod struct { dropbox.Tagged } // Valid tag values for RolloutMethod const ( RolloutMethodUnlinkAll = "unlink_all" RolloutMethodUnlinkMostInactive = "unlink_most_inactive" RolloutMethodAddMemberToExceptions = "add_member_to_exceptions" ) // SharedFolderJoinPolicy : Policy governing which shared folders a team member // can join. type SharedFolderJoinPolicy struct { dropbox.Tagged } // Valid tag values for SharedFolderJoinPolicy const ( SharedFolderJoinPolicyFromTeamOnly = "from_team_only" SharedFolderJoinPolicyFromAnyone = "from_anyone" SharedFolderJoinPolicyOther = "other" ) // SharedFolderMemberPolicy : Policy governing who can be a member of a folder // shared by a team member. type SharedFolderMemberPolicy struct { dropbox.Tagged } // Valid tag values for SharedFolderMemberPolicy const ( SharedFolderMemberPolicyTeam = "team" SharedFolderMemberPolicyAnyone = "anyone" SharedFolderMemberPolicyOther = "other" ) // SharedLinkCreatePolicy : Policy governing the visibility of shared links. // This policy can apply to newly created shared links, or all shared links. type SharedLinkCreatePolicy struct { dropbox.Tagged } // Valid tag values for SharedLinkCreatePolicy const ( SharedLinkCreatePolicyDefaultPublic = "default_public" SharedLinkCreatePolicyDefaultTeamOnly = "default_team_only" SharedLinkCreatePolicyTeamOnly = "team_only" SharedLinkCreatePolicyOther = "other" ) // ShowcaseDownloadPolicy : has no documentation (yet) type ShowcaseDownloadPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseDownloadPolicy const ( ShowcaseDownloadPolicyDisabled = "disabled" ShowcaseDownloadPolicyEnabled = "enabled" ShowcaseDownloadPolicyOther = "other" ) // ShowcaseEnabledPolicy : has no documentation (yet) type ShowcaseEnabledPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseEnabledPolicy const ( ShowcaseEnabledPolicyDisabled = "disabled" ShowcaseEnabledPolicyEnabled = "enabled" ShowcaseEnabledPolicyOther = "other" ) // ShowcaseExternalSharingPolicy : has no documentation (yet) type ShowcaseExternalSharingPolicy struct { dropbox.Tagged } // Valid tag values for ShowcaseExternalSharingPolicy const ( ShowcaseExternalSharingPolicyDisabled = "disabled" ShowcaseExternalSharingPolicyEnabled = "enabled" ShowcaseExternalSharingPolicyOther = "other" ) // SmartSyncPolicy : has no documentation (yet) type SmartSyncPolicy struct { dropbox.Tagged } // Valid tag values for SmartSyncPolicy const ( SmartSyncPolicyLocal = "local" SmartSyncPolicyOnDemand = "on_demand" SmartSyncPolicyOther = "other" ) // SsoPolicy : has no documentation (yet) type SsoPolicy struct { dropbox.Tagged } // Valid tag values for SsoPolicy const ( SsoPolicyDisabled = "disabled" SsoPolicyOptional = "optional" SsoPolicyRequired = "required" SsoPolicyOther = "other" ) // TeamMemberPolicies : Policies governing team members. type TeamMemberPolicies struct { // Sharing : Policies governing sharing. Sharing *TeamSharingPolicies `json:"sharing"` // EmmState : This describes the Enterprise Mobility Management (EMM) state // for this team. This information can be used to understand if an // organization is integrating with a third-party EMM vendor to further // manage and apply restrictions upon the team's Dropbox usage on mobile // devices. This is a new feature and in the future we'll be adding more new // fields and additional documentation. EmmState *EmmState `json:"emm_state"` // OfficeAddin : The admin policy around the Dropbox Office Add-In for this // team. OfficeAddin *OfficeAddInPolicy `json:"office_addin"` } // NewTeamMemberPolicies returns a new TeamMemberPolicies instance func NewTeamMemberPolicies(Sharing *TeamSharingPolicies, EmmState *EmmState, OfficeAddin *OfficeAddInPolicy) *TeamMemberPolicies { s := new(TeamMemberPolicies) s.Sharing = Sharing s.EmmState = EmmState s.OfficeAddin = OfficeAddin return s } // TeamSharingPolicies : Policies governing sharing within and outside of the // team. type TeamSharingPolicies struct { // SharedFolderMemberPolicy : Who can join folders shared by team members. SharedFolderMemberPolicy *SharedFolderMemberPolicy `json:"shared_folder_member_policy"` // SharedFolderJoinPolicy : Which shared folders team members can join. SharedFolderJoinPolicy *SharedFolderJoinPolicy `json:"shared_folder_join_policy"` // SharedLinkCreatePolicy : Who can view shared links owned by team members. SharedLinkCreatePolicy *SharedLinkCreatePolicy `json:"shared_link_create_policy"` } // NewTeamSharingPolicies returns a new TeamSharingPolicies instance func NewTeamSharingPolicies(SharedFolderMemberPolicy *SharedFolderMemberPolicy, SharedFolderJoinPolicy *SharedFolderJoinPolicy, SharedLinkCreatePolicy *SharedLinkCreatePolicy) *TeamSharingPolicies { s := new(TeamSharingPolicies) s.SharedFolderMemberPolicy = SharedFolderMemberPolicy s.SharedFolderJoinPolicy = SharedFolderJoinPolicy s.SharedLinkCreatePolicy = SharedLinkCreatePolicy return s } // TwoStepVerificationPolicy : has no documentation (yet) type TwoStepVerificationPolicy struct { dropbox.Tagged } // Valid tag values for TwoStepVerificationPolicy const ( TwoStepVerificationPolicyRequireTfaEnable = "require_tfa_enable" TwoStepVerificationPolicyRequireTfaDisable = "require_tfa_disable" TwoStepVerificationPolicyOther = "other" ) dropbox-sdk-go-unofficial-5.4.0/dropbox/users/000077500000000000000000000000001340753361200213165ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/users/client.go000066400000000000000000000165721340753361200231360ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package users import ( "bytes" "encoding/json" "io/ioutil" "net/http" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth" ) // Client interface describes all routes in this namespace type Client interface { // GetAccount : Get information about a user's account. GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) // GetAccountBatch : Get information about multiple user accounts. At most // 300 accounts may be queried per request. GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) // GetCurrentAccount : Get information about the current user's account. GetCurrentAccount() (res *FullAccount, err error) // GetSpaceUsage : Get the space usage information for the current user's // account. GetSpaceUsage() (res *SpaceUsage, err error) } type apiImpl dropbox.Context //GetAccountAPIError is an error-wrapper for the get_account route type GetAccountAPIError struct { dropbox.APIError EndpointError *GetAccountError `json:"error"` } func (dbx *apiImpl) GetAccount(arg *GetAccountArg) (res *BasicAccount, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_account", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetAccountAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetAccountBatchAPIError is an error-wrapper for the get_account_batch route type GetAccountBatchAPIError struct { dropbox.APIError EndpointError *GetAccountBatchError `json:"error"` } func (dbx *apiImpl) GetAccountBatch(arg *GetAccountBatchArg) (res []*BasicAccount, err error) { cli := dbx.Client dbx.Config.LogDebug("arg: %v", arg) b, err := json.Marshal(arg) if err != nil { return } headers := map[string]string{ "Content-Type": "application/json", } if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_account_batch", headers, bytes.NewReader(b)) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetAccountBatchAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetCurrentAccountAPIError is an error-wrapper for the get_current_account route type GetCurrentAccountAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) GetCurrentAccount() (res *FullAccount, err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_current_account", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetCurrentAccountAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } //GetSpaceUsageAPIError is an error-wrapper for the get_space_usage route type GetSpaceUsageAPIError struct { dropbox.APIError EndpointError struct{} `json:"error"` } func (dbx *apiImpl) GetSpaceUsage() (res *SpaceUsage, err error) { cli := dbx.Client headers := map[string]string{} if dbx.Config.AsMemberID != "" { headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID } req, err := (*dropbox.Context)(dbx).NewRequest("api", "rpc", true, "users", "get_space_usage", headers, nil) if err != nil { return } dbx.Config.LogInfo("req: %v", req) resp, err := cli.Do(req) if err != nil { return } dbx.Config.LogInfo("resp: %v", resp) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return } dbx.Config.LogDebug("body: %s", body) if resp.StatusCode == http.StatusOK { err = json.Unmarshal(body, &res) if err != nil { return } return } if resp.StatusCode == http.StatusConflict { var apiError GetSpaceUsageAPIError err = json.Unmarshal(body, &apiError) if err != nil { return } err = apiError return } err = auth.HandleCommonAuthErrors(dbx.Config, resp, body) if err != nil { return } err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body) return } // New returns a Client implementation for this namespace func New(c dropbox.Config) Client { ctx := apiImpl(dropbox.NewContext(c)) return &ctx } dropbox-sdk-go-unofficial-5.4.0/dropbox/users/types.go000066400000000000000000000364461340753361200230260ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package users : This namespace contains endpoints and data types for user // management. package users import ( "encoding/json" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/common" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_common" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/team_policies" "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/users_common" ) // Account : The amount of detail revealed about an account depends on the user // being queried and the user making the query. type Account struct { // AccountId : The user's unique Dropbox ID. AccountId string `json:"account_id"` // Name : Details of a user's name. Name *Name `json:"name"` // Email : The user's e-mail address. Do not rely on this without checking // the `email_verified` field. Even then, it's possible that the user has // since lost access to their e-mail. Email string `json:"email"` // EmailVerified : Whether the user has verified their e-mail address. EmailVerified bool `json:"email_verified"` // ProfilePhotoUrl : URL for the photo representing the user, if one is set. ProfilePhotoUrl string `json:"profile_photo_url,omitempty"` // Disabled : Whether the user has been disabled. Disabled bool `json:"disabled"` } // NewAccount returns a new Account instance func NewAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool) *Account { s := new(Account) s.AccountId = AccountId s.Name = Name s.Email = Email s.EmailVerified = EmailVerified s.Disabled = Disabled return s } // BasicAccount : Basic information about any account. type BasicAccount struct { Account // IsTeammate : Whether this user is a teammate of the current user. If this // account is the current user's account, then this will be true. IsTeammate bool `json:"is_teammate"` // TeamMemberId : The user's unique team member id. This field will only be // present if the user is part of a team and `is_teammate` is true. TeamMemberId string `json:"team_member_id,omitempty"` } // NewBasicAccount returns a new BasicAccount instance func NewBasicAccount(AccountId string, Name *Name, Email string, EmailVerified bool, Disabled bool, IsTeammate bool) *BasicAccount { s := new(BasicAccount) s.AccountId = AccountId s.Name = Name s.Email = Email s.EmailVerified = EmailVerified s.Disabled = Disabled s.IsTeammate = IsTeammate return s } // FullAccount : Detailed information about the current user's account. type FullAccount struct { Account // Country : The user's two-letter country code, if available. Country codes // are based on `ISO 3166-1` . Country string `json:"country,omitempty"` // Locale : The language that the user specified. Locale tags will be `IETF // language tags` . Locale string `json:"locale"` // ReferralLink : The user's `referral link` // . ReferralLink string `json:"referral_link"` // Team : If this account is a member of a team, information about that // team. Team *FullTeam `json:"team,omitempty"` // TeamMemberId : This account's unique team member id. This field will only // be present if `team` is present. TeamMemberId string `json:"team_member_id,omitempty"` // IsPaired : Whether the user has a personal and work account. If the // current account is personal, then `team` will always be nil, but // `is_paired` will indicate if a work account is linked. IsPaired bool `json:"is_paired"` // AccountType : What type of account this user has. AccountType *users_common.AccountType `json:"account_type"` // RootInfo : The root info for this account. RootInfo common.IsRootInfo `json:"root_info"` } // NewFullAccount returns a new FullAccount instance 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 { s := new(FullAccount) s.AccountId = AccountId s.Name = Name s.Email = Email s.EmailVerified = EmailVerified s.Disabled = Disabled s.Locale = Locale s.ReferralLink = ReferralLink s.IsPaired = IsPaired s.AccountType = AccountType s.RootInfo = RootInfo return s } // UnmarshalJSON deserializes into a FullAccount instance func (u *FullAccount) UnmarshalJSON(b []byte) error { type wrap struct { // AccountId : The user's unique Dropbox ID. AccountId string `json:"account_id"` // Name : Details of a user's name. Name *Name `json:"name"` // Email : The user's e-mail address. Do not rely on this without // checking the `email_verified` field. Even then, it's possible that // the user has since lost access to their e-mail. Email string `json:"email"` // EmailVerified : Whether the user has verified their e-mail address. EmailVerified bool `json:"email_verified"` // Disabled : Whether the user has been disabled. Disabled bool `json:"disabled"` // Locale : The language that the user specified. Locale tags will be // `IETF language tags` // . Locale string `json:"locale"` // ReferralLink : The user's `referral link` // . ReferralLink string `json:"referral_link"` // IsPaired : Whether the user has a personal and work account. If the // current account is personal, then `team` will always be nil, but // `is_paired` will indicate if a work account is linked. IsPaired bool `json:"is_paired"` // AccountType : What type of account this user has. AccountType *users_common.AccountType `json:"account_type"` // RootInfo : The root info for this account. RootInfo json.RawMessage `json:"root_info"` // ProfilePhotoUrl : URL for the photo representing the user, if one is // set. ProfilePhotoUrl string `json:"profile_photo_url,omitempty"` // Country : The user's two-letter country code, if available. Country // codes are based on `ISO 3166-1` // . Country string `json:"country,omitempty"` // Team : If this account is a member of a team, information about that // team. Team *FullTeam `json:"team,omitempty"` // TeamMemberId : This account's unique team member id. This field will // only be present if `team` is present. TeamMemberId string `json:"team_member_id,omitempty"` } var w wrap if err := json.Unmarshal(b, &w); err != nil { return err } u.AccountId = w.AccountId u.Name = w.Name u.Email = w.Email u.EmailVerified = w.EmailVerified u.Disabled = w.Disabled u.Locale = w.Locale u.ReferralLink = w.ReferralLink u.IsPaired = w.IsPaired u.AccountType = w.AccountType RootInfo, err := common.IsRootInfoFromJSON(w.RootInfo) if err != nil { return err } u.RootInfo = RootInfo u.ProfilePhotoUrl = w.ProfilePhotoUrl u.Country = w.Country u.Team = w.Team u.TeamMemberId = w.TeamMemberId return nil } // Team : Information about a team. type Team struct { // Id : The team's unique ID. Id string `json:"id"` // Name : The name of the team. Name string `json:"name"` } // NewTeam returns a new Team instance func NewTeam(Id string, Name string) *Team { s := new(Team) s.Id = Id s.Name = Name return s } // FullTeam : Detailed information about a team. type FullTeam struct { Team // SharingPolicies : Team policies governing sharing. SharingPolicies *team_policies.TeamSharingPolicies `json:"sharing_policies"` // OfficeAddinPolicy : Team policy governing the use of the Office Add-In. OfficeAddinPolicy *team_policies.OfficeAddInPolicy `json:"office_addin_policy"` } // NewFullTeam returns a new FullTeam instance func NewFullTeam(Id string, Name string, SharingPolicies *team_policies.TeamSharingPolicies, OfficeAddinPolicy *team_policies.OfficeAddInPolicy) *FullTeam { s := new(FullTeam) s.Id = Id s.Name = Name s.SharingPolicies = SharingPolicies s.OfficeAddinPolicy = OfficeAddinPolicy return s } // GetAccountArg : has no documentation (yet) type GetAccountArg struct { // AccountId : A user's account identifier. AccountId string `json:"account_id"` } // NewGetAccountArg returns a new GetAccountArg instance func NewGetAccountArg(AccountId string) *GetAccountArg { s := new(GetAccountArg) s.AccountId = AccountId return s } // GetAccountBatchArg : has no documentation (yet) type GetAccountBatchArg struct { // AccountIds : List of user account identifiers. Should not contain any // duplicate account IDs. AccountIds []string `json:"account_ids"` } // NewGetAccountBatchArg returns a new GetAccountBatchArg instance func NewGetAccountBatchArg(AccountIds []string) *GetAccountBatchArg { s := new(GetAccountBatchArg) s.AccountIds = AccountIds return s } // GetAccountBatchError : has no documentation (yet) type GetAccountBatchError struct { dropbox.Tagged // NoAccount : The value is an account ID specified in // `GetAccountBatchArg.account_ids` that does not exist. NoAccount string `json:"no_account,omitempty"` } // Valid tag values for GetAccountBatchError const ( GetAccountBatchErrorNoAccount = "no_account" GetAccountBatchErrorOther = "other" ) // UnmarshalJSON deserializes into a GetAccountBatchError instance func (u *GetAccountBatchError) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "no_account": err = json.Unmarshal(body, &u.NoAccount) if err != nil { return err } } return nil } // GetAccountError : has no documentation (yet) type GetAccountError struct { dropbox.Tagged } // Valid tag values for GetAccountError const ( GetAccountErrorNoAccount = "no_account" GetAccountErrorOther = "other" ) // IndividualSpaceAllocation : has no documentation (yet) type IndividualSpaceAllocation struct { // Allocated : The total space allocated to the user's account (bytes). Allocated uint64 `json:"allocated"` } // NewIndividualSpaceAllocation returns a new IndividualSpaceAllocation instance func NewIndividualSpaceAllocation(Allocated uint64) *IndividualSpaceAllocation { s := new(IndividualSpaceAllocation) s.Allocated = Allocated return s } // Name : Representations for a person's name to assist with // internationalization. type Name struct { // GivenName : Also known as a first name. GivenName string `json:"given_name"` // Surname : Also known as a last name or family name. Surname string `json:"surname"` // FamiliarName : Locale-dependent name. In the US, a person's familiar name // is their `given_name`, but elsewhere, it could be any combination of a // person's `given_name` and `surname`. FamiliarName string `json:"familiar_name"` // DisplayName : A name that can be used directly to represent the name of a // user's Dropbox account. DisplayName string `json:"display_name"` // AbbreviatedName : An abbreviated form of the person's name. Their // initials in most locales. AbbreviatedName string `json:"abbreviated_name"` } // NewName returns a new Name instance func NewName(GivenName string, Surname string, FamiliarName string, DisplayName string, AbbreviatedName string) *Name { s := new(Name) s.GivenName = GivenName s.Surname = Surname s.FamiliarName = FamiliarName s.DisplayName = DisplayName s.AbbreviatedName = AbbreviatedName return s } // SpaceAllocation : Space is allocated differently based on the type of // account. type SpaceAllocation struct { dropbox.Tagged // Individual : The user's space allocation applies only to their individual // account. Individual *IndividualSpaceAllocation `json:"individual,omitempty"` // Team : The user shares space with other members of their team. Team *TeamSpaceAllocation `json:"team,omitempty"` } // Valid tag values for SpaceAllocation const ( SpaceAllocationIndividual = "individual" SpaceAllocationTeam = "team" SpaceAllocationOther = "other" ) // UnmarshalJSON deserializes into a SpaceAllocation instance func (u *SpaceAllocation) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // Individual : The user's space allocation applies only to their // individual account. Individual json.RawMessage `json:"individual,omitempty"` // Team : The user shares space with other members of their team. Team json.RawMessage `json:"team,omitempty"` } var w wrap var err error if err = json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "individual": err = json.Unmarshal(body, &u.Individual) if err != nil { return err } case "team": err = json.Unmarshal(body, &u.Team) if err != nil { return err } } return nil } // SpaceUsage : Information about a user's space usage and quota. type SpaceUsage struct { // Used : The user's total space usage (bytes). Used uint64 `json:"used"` // Allocation : The user's space allocation. Allocation *SpaceAllocation `json:"allocation"` } // NewSpaceUsage returns a new SpaceUsage instance func NewSpaceUsage(Used uint64, Allocation *SpaceAllocation) *SpaceUsage { s := new(SpaceUsage) s.Used = Used s.Allocation = Allocation return s } // TeamSpaceAllocation : has no documentation (yet) type TeamSpaceAllocation struct { // Used : The total space currently used by the user's team (bytes). Used uint64 `json:"used"` // Allocated : The total space allocated to the user's team (bytes). Allocated uint64 `json:"allocated"` // UserWithinTeamSpaceAllocated : The total space allocated to the user // within its team allocated space (0 means that no restriction is imposed // on the user's quota within its team). UserWithinTeamSpaceAllocated uint64 `json:"user_within_team_space_allocated"` // UserWithinTeamSpaceLimitType : The type of the space limit imposed on the // team member (off, alert_only, stop_sync). UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType `json:"user_within_team_space_limit_type"` } // NewTeamSpaceAllocation returns a new TeamSpaceAllocation instance func NewTeamSpaceAllocation(Used uint64, Allocated uint64, UserWithinTeamSpaceAllocated uint64, UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType) *TeamSpaceAllocation { s := new(TeamSpaceAllocation) s.Used = Used s.Allocated = Allocated s.UserWithinTeamSpaceAllocated = UserWithinTeamSpaceAllocated s.UserWithinTeamSpaceLimitType = UserWithinTeamSpaceLimitType return s } dropbox-sdk-go-unofficial-5.4.0/dropbox/users_common/000077500000000000000000000000001340753361200226665ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/dropbox/users_common/types.go000066400000000000000000000027761340753361200243750ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // Package users_common : This namespace contains common data types used within // the users namespace. package users_common import "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" // AccountType : What type of account this user has. type AccountType struct { dropbox.Tagged } // Valid tag values for AccountType const ( AccountTypeBasic = "basic" AccountTypePro = "pro" AccountTypeBusiness = "business" ) dropbox-sdk-go-unofficial-5.4.0/generator/000077500000000000000000000000001340753361200204665ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/generator/README.md000066400000000000000000000172751340753361200217610ustar00rootroot00000000000000# Dropbox Go SDK Generator This directory contains the [Stone](https://github.com/dropbox/stone) code generators used to programmatically generate the [Dropbox Go SDK](https://github.com/dropbox/dropbox-sdk-go). ## Requirements * While not a hard requirement, this repo currently assumes `python3` in the path. * Assumes you have already installed [Stone](https://github.com/dropbox/stone) * Requires [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) to fix up imports in the auto-generated code ## Basic Setup . Clone this repo . Run `git submodule init` followed by `git submodule update` . Run `./generate-sdk.sh` to generate code under `../dropbox` ## Generated Code ### Basic Types Here is how Stone [basic types](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#basic-types) map to Go types: Stone Type | Go Type ---------- | ------- Int32/Int64/UInt32/UInt64 | int32/int64/uint32/uint64 Float32/Float64 | float32/float64 Boolean | bool String | string Timestamp | time.Time Void | struct{} ### Structs Stone [structs](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct) are represented as Go [structs](https://gobyexample.com/structs) in a relatively straight-forward manner. Each struct member is exported and also gets assigned the correct json tag. The latter is used for serializing requests and deserializing responses. Non-primitive types are represented as pointers to the corresponding type. ``` struct Account "The amount of detail revealed about an account depends on the user being queried and the user making the query." account_id AccountId "The user's unique Dropbox ID." name Name "Details of a user's name." ``` ```go // The amount of detail revealed about an account depends on the user being // queried and the user making the query. type Account struct { // The user's unique Dropbox ID. AccountId string `json:"account_id"` // Details of a user's name. Name *Name `json:"name"` } ``` #### Inheritance Stone supports [struct inheritance](https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#inheritance). In Go, we support this via [embedding](https://golang.org/doc/effective_go.html#embedding) ``` struct BasicAccount extends Account "Basic information about any account." is_teammate Boolean "Whether this user is a teammate of the current user. If this account is the current user's account, then this will be :val:`true`." ``` ```go // Basic information about any account. type BasicAccount struct { Account // Whether this user is a teammate of the current user. If this account is // the current user's account, then this will be `True`. IsTeammate bool `json:"is_teammate"` ``` ### Unions Stone https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#union[unions] are bit more complex as Go doesn't have native support for union types (tagged or otherwise). We declare a union as a Go struct with all the possible fields as pointer types, and then use the tag value to populate the correct field during deserialization. This necessitates the use of an intermediate wrapper struct for the deserialization to work correctly, see below for a concrete example. ``` union SpaceAllocation "Space is allocated differently based on the type of account." individual IndividualSpaceAllocation "The user's space allocation applies only to their individual account." team TeamSpaceAllocation "The user shares space with other members of their team." ``` ```go // Space is allocated differently based on the type of account. type SpaceAllocation struct { dropbox.Tagged // The user's space allocation applies only to their individual account. Individual *IndividualSpaceAllocation `json:"individual,omitempty"` // The user shares space with other members of their team. Team *TeamSpaceAllocation `json:"team,omitempty"` } // Valid tag values for `SpaceAllocation` const ( SpaceAllocation_Individual = "individual" SpaceAllocation_Team = "team" SpaceAllocation_Other = "other" ) func (u *SpaceAllocation) UnmarshalJSON(body []byte) error { type wrap struct { dropbox.Tagged // The user's space allocation applies only to their individual account. Individual json.RawMessage `json:"individual,omitempty"` // The user shares space with other members of their team. Team json.RawMessage `json:"team,omitempty"` } var w wrap if err := json.Unmarshal(body, &w); err != nil { return err } u.Tag = w.Tag switch u.Tag { case "individual": if err := json.Unmarshal(body, &u.Individual); err != nil { return err } case "team": if err := json.Unmarshal(body, &u.Team); err != nil { return err } } return nil } ``` ### Struct with Enumerated Subtypes Per the https://github.com/dropbox/stone/blob/master/doc/lang_ref.rst#struct-polymorphism[spec], structs with enumerated subtypes are a mechanism of inheritance: > If a struct enumerates its subtypes, an instance of any subtype will satisfy the type constraint. This is useful when wanting to discriminate amongst types that are part of the same hierarchy while simultaneously being able to avoid discriminating when accessing common fields. To represent structs with enumerated subtypes in Go, we use a combination of Go interface types and unions as implemented above. Considering the following: ``` struct Metadata union file FileMetadata folder FolderMetadata deleted DeletedMetadata # Used by list_folder* and search name String path_lower String? path_display String? parent_shared_folder_id common.SharedFolderId? struct FileMetadata extends Metadata id Id client_modified common.DropboxTimestamp ... ``` In this case, `FileMetadata`, `FolderMetadata` etc are subtypes of `Metadata`. Specifically, any subtype can be used where a parent type is expected. Thus, if `list_folder` returns a list of `Metadata`s, we should be able to parse and "upcast" to one of the enumerated subtypes. First, we define structs to represent the base and enumerated types as we did for inherited structs above: ```go type Metadata struct { Name string `json:"name"` PathLower string `json:"path_lower,omitempty"` PathDisplay string `json:"path_display,omitempty"` ParentSharedFolderId string `json:"parent_shared_folder_id,omitempty"` } type FileMetadata struct { Metadata Id string `json:"id"` ClientModified time.Time `json:"client_modified"` ... } ``` Next, we define an interface type with a dummy method and ensure that both the base and the subtypes implement the interface: ```go type IsMetadata interface { IsMetadata() } func (u *Metadata) IsMetadata() {} // Subtypes get this for free due to embedding ``` At this point, types or methods that accept/return a struct with enumerated subtypes can use the interface type instead. For instance: ```go func GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) {...} type ListFolderResult struct { // The files and (direct) subfolders in the folder. Entries []IsMetadata `json:"entries"` ... } ``` Finally, to actually deserialize a bag of bytes into the appropriate type or subtype, we use a trick similar to how we handle unions above. ```go type metadataUnion struct { dropbox.Tagged File *FileMetadata `json:"file,omitempty"` Folder *FolderMetadata `json:"folder,omitempty"` Deleted *DeletedMetadata `json:"deleted,omitempty"` } func (u *metadataUnion) UnmarshalJSON(body []byte) error {...} func (dbx *apiImpl) GetMetadata(arg *GetMetadataArg) (res IsMetadata, err error) { ... var tmp metadataUnion err = json.Unmarshal(body, &tmp) if err != nil { return } switch tmp.Tag { case "file": res = tmp.File case "folder": res = tmp.Folder case "deleted": res = tmp.Deleted } } ``` dropbox-sdk-go-unofficial-5.4.0/generator/dropbox-api-spec/000077500000000000000000000000001340753361200236425ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/generator/generate-sdk.sh000077500000000000000000000013131340753361200233740ustar00rootroot00000000000000#! /usr/bin/env bash set -euo pipefail if [[ $# -gt 1 ]]; then echo "$0: Not expecting any command-line arguments, got $#." 1>&2 exit 1 fi loc=$(realpath -e $0) base_dir=$(dirname "$loc") spec_dir="$base_dir/dropbox-api-spec" gen_dir=$(dirname ${base_dir})/dropbox stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone # Update SDK and API spec versions sdk_version=${1:-"5.0.0"} pushd ${spec_dir} spec_version=$(git rev-parse --short HEAD) popd sed -i.bak -e "s/UNKNOWN SDK VERSION/${sdk_version}/" \ -e "s/UNKNOWN SPEC VERSION/${spec_version}/" ${gen_dir}/sdk.go rm ${gen_dir}/sdk.go.bak goimports -l -w ${gen_dir} dropbox-sdk-go-unofficial-5.4.0/generator/go_client.stoneg.py000066400000000000000000000210461340753361200243040ustar00rootroot00000000000000import os from stone.backend import CodeBackend from stone.ir import ( is_void_type, is_struct_type ) from go_helpers import ( HEADER, fmt_type, fmt_var, generate_doc, ) class GoClientBackend(CodeBackend): def generate(self, api): for namespace in api.namespaces.values(): if len(namespace.routes) > 0: self._generate_client(namespace) def _generate_client(self, namespace): file_name = os.path.join(self.target_folder_path, namespace.name, 'client.go') with self.output_to_relative_path(file_name): self.emit_raw(HEADER) self.emit() self.emit('package %s' % namespace.name) self.emit() self.emit('// Client interface describes all routes in this namespace') with self.block('type Client interface'): for route in namespace.routes: generate_doc(self, route) self.emit(self._generate_route_signature(namespace, route)) self.emit() self.emit('type apiImpl dropbox.Context') for route in namespace.routes: self._generate_route(namespace, route) self.emit('// New returns a Client implementation for this namespace') with self.block('func New(c dropbox.Config) Client'): self.emit('ctx := apiImpl(dropbox.NewContext(c))') self.emit('return &ctx') def _generate_route_signature(self, namespace, route): req = fmt_type(route.arg_data_type, namespace) res = fmt_type(route.result_data_type, namespace, use_interface=True) fn = fmt_var(route.name) if route.version != 1: fn += 'V%d' % route.version style = route.attrs.get('style', 'rpc') arg = '' if is_void_type(route.arg_data_type) else 'arg {req}' ret = '(err error)' if is_void_type(route.result_data_type) else \ '(res {res}, err error)' signature = '{fn}(' + arg + ') ' + ret if style == 'download': signature = '{fn}(' + arg + \ ') (res {res}, content io.ReadCloser, err error)' elif style == 'upload': signature = '{fn}(' + arg + ', content io.Reader) ' + ret if is_void_type(route.arg_data_type): signature = '{fn}(content io.Reader) ' + ret return signature.format(fn=fn, req=req, res=res) def _generate_route(self, namespace, route): out = self.emit fn = fmt_var(route.name) if route.version != 1: fn += 'V%d' % route.version err = fmt_type(route.error_data_type, namespace) out('//%sAPIError is an error-wrapper for the %s route' % (fn, route.name)) with self.block('type {fn}APIError struct'.format(fn=fn)): out('dropbox.APIError') out('EndpointError {err} `json:"error"`'.format(err=err)) out() signature = 'func (dbx *apiImpl) ' + self._generate_route_signature( namespace, route) with self.block(signature): if route.deprecated is not None: out('log.Printf("WARNING: API `%s` is deprecated")' % fn) if route.deprecated.by is not None: out('log.Printf("Use API `%s` instead")' % fmt_var(route.deprecated.by.name)) out() out('cli := dbx.Client') out() self._generate_request(namespace, route) self._generate_post() self._generate_response(route) ok_check = 'if resp.StatusCode == http.StatusOK' if fn == "Download": ok_check += ' || resp.StatusCode == http.StatusPartialContent' with self.block(ok_check): self._generate_result(route) self._generate_error_handling(namespace, route) out() def _generate_request(self, namespace, route): out = self.emit auth = route.attrs.get('auth', '') host = route.attrs.get('host', 'api') style = route.attrs.get('style', 'rpc') body = 'nil' if not is_void_type(route.arg_data_type): out('dbx.Config.LogDebug("arg: %v", arg)') out('b, err := json.Marshal(arg)') with self.block('if err != nil'): out('return') out() if host != 'content': body = 'bytes.NewReader(b)' if style == 'upload': body = 'content' headers = {} if not is_void_type(route.arg_data_type): if host == 'content' or style in ['upload', 'download']: headers["Dropbox-API-Arg"] = "string(b)" else: headers["Content-Type"] = '"application/json"' if style == 'upload': headers["Content-Type"] = '"application/octet-stream"' out('headers := map[string]string{') for k, v in sorted(headers.items()): out('\t"{}": {},'.format(k, v)) out('}') if fmt_var(route.name) == "Download": out('for k, v := range arg.ExtraHeaders { headers[k] = v }') if auth != 'noauth' and auth != 'team': with self.block('if dbx.Config.AsMemberID != ""'): out('headers["Dropbox-API-Select-User"] = dbx.Config.AsMemberID') out() fn = route.name if route.version != 1: fn += '_v%d' % route.version authed = 'false' if auth == 'noauth' else 'true' out('req, err := (*dropbox.Context)(dbx).NewRequest("{}", "{}", {}, "{}", "{}", headers, {})'.format( host, style, authed, namespace.name, fn, body)) with self.block('if err != nil'): out('return') out('dbx.Config.LogInfo("req: %v", req)') out() def _generate_post(self): out = self.emit out('resp, err := cli.Do(req)') with self.block('if err != nil'): out('return') out() out('dbx.Config.LogInfo("resp: %v", resp)') def _generate_response(self, route): out = self.emit style = route.attrs.get('style', 'rpc') if style == 'download': out('body := []byte(resp.Header.Get("Dropbox-API-Result"))') out('content = resp.Body') else: out('defer resp.Body.Close()') with self.block('body, err := ioutil.ReadAll(resp.Body);' 'if err != nil'): out('return') out() out('dbx.Config.LogDebug("body: %s", body)') def _generate_error_handling(self, namespace, route): out = self.emit style = route.attrs.get('style', 'rpc') with self.block('if resp.StatusCode == http.StatusConflict'): # If style was download, body was assigned to a header. # Need to re-read the response body to parse the error if style == 'download': out('defer resp.Body.Close()') with self.block('body, err = ioutil.ReadAll(resp.Body);' 'if err != nil'): out('return') out('var apiError %sAPIError' % fmt_var(route.name)) with self.block('err = json.Unmarshal(body, &apiError);' 'if err != nil'): out('return') out('err = apiError') out('return') auth_ns = "" if namespace.name == "auth" else "auth." with self.block('err = %sHandleCommonAuthErrors(dbx.Config, resp, body);' 'if err != nil' % auth_ns): out('return') out('err = dropbox.HandleCommonAPIErrors(dbx.Config, resp, body)') out('return') def _generate_result(self, route): out = self.emit if is_struct_type(route.result_data_type) and \ route.result_data_type.has_enumerated_subtypes(): out('var tmp %sUnion' % fmt_var(route.result_data_type.name, export=False)) with self.block('err = json.Unmarshal(body, &tmp);' 'if err != nil'): out('return') with self.block('switch tmp.Tag'): for t in route.result_data_type.get_enumerated_subtypes(): with self.block('case "%s":' % t.name, delim=(None, None)): self.emit('res = tmp.%s' % fmt_var(t.name)) elif not is_void_type(route.result_data_type): with self.block('err = json.Unmarshal(body, &res);' 'if err != nil'): out('return') out() out('return') dropbox-sdk-go-unofficial-5.4.0/generator/go_helpers.py000066400000000000000000000114731340753361200231750ustar00rootroot00000000000000from stone.ir import (ApiNamespace, ApiRoute) from stone.ir import ( Boolean, Float32, Float64, Int32, Int64, String, Timestamp, UInt32, UInt64, unwrap_nullable, is_composite_type, is_list_type, is_primitive_type, is_struct_type, Void, ) from stone.backends import helpers HEADER = """\ // Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. """ _reserved_keywords = { 'break', 'default', 'func', 'interface', 'select', 'case', 'defer', 'go', 'map', 'struct', 'chan', 'else', 'goto', 'package', 'switch', 'const', 'fallthrough', 'if', 'range', 'type', 'continue', 'for', 'import', 'return', 'var', } _type_table = { UInt64: 'uint64', Int64: 'int64', UInt32: 'uint32', Int32: 'int32', Float64: 'float64', Float32: 'float32', Boolean: 'bool', String: 'string', Timestamp: 'time.Time', Void: 'struct{}', } def _rename_if_reserved(s): if s in _reserved_keywords: return s + '_' else: return s def fmt_type(data_type, namespace=None, use_interface=False, raw=False): data_type, nullable = unwrap_nullable(data_type) if is_list_type(data_type): if raw and is_primitive_type(data_type.data_type): return "json.RawMessage" return '[]%s' % fmt_type(data_type.data_type, namespace, use_interface, raw) if raw: return "json.RawMessage" type_name = data_type.name if use_interface and _needs_base_type(data_type): type_name = 'Is' + type_name if is_composite_type(data_type) and namespace is not None and \ namespace.name != data_type.namespace.name: type_name = data_type.namespace.name + '.' + type_name if use_interface and _needs_base_type(data_type): return _type_table.get(data_type.__class__, type_name) else: return _type_table.get(data_type.__class__, '*' + type_name) def fmt_var(name, export=True, check_reserved=False): s = helpers.fmt_pascal(name) if export else helpers.fmt_camel(name) return _rename_if_reserved(s) if check_reserved else s def _doc_handler(tag, val): if tag == 'type': return '`{}`'.format(val) elif tag == 'route': return '`{}`'.format(helpers.fmt_camel(val)) elif tag == 'link': anchor, link = val.rsplit(' ', 1) return '`{}` <{}>'.format(anchor, link) elif tag == 'val': if val == 'null': return 'nil' else: return val elif tag == 'field': return '`{}`'.format(val) else: raise RuntimeError('Unknown doc ref tag %r' % tag) def generate_doc(code_generator, t): doc = t.doc if doc is None: doc = 'has no documentation (yet)' doc = code_generator.process_doc(doc, _doc_handler) d = '%s : %s' % (fmt_var(t.name), doc) if isinstance(t, ApiNamespace): d = 'Package %s : %s' % (t.name, doc) code_generator.emit_wrapped_text(d, prefix='// ') # Generate comment for deprecated routes if isinstance(t, ApiRoute): if t.deprecated is not None: d = 'Deprecated: ' if t.deprecated.by is not None: deprecated_by = t.deprecated.by fn = fmt_var(deprecated_by.name) if deprecated_by.version != 1: fn += 'V%d' % deprecated_by.version d += 'Use `%s` instead' % fn code_generator.emit_wrapped_text(d, prefix='// ') def _needs_base_type(data_type): if is_struct_type(data_type) and data_type.has_enumerated_subtypes(): return True if is_list_type(data_type): return _needs_base_type(data_type.data_type) return False def needs_base_type(struct): for field in struct.fields: if _needs_base_type(field.data_type): return True return False dropbox-sdk-go-unofficial-5.4.0/generator/go_rsrc/000077500000000000000000000000001340753361200221245ustar00rootroot00000000000000dropbox-sdk-go-unofficial-5.4.0/generator/go_rsrc/sdk.go000066400000000000000000000150021340753361200232320ustar00rootroot00000000000000// Copyright (c) Dropbox, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package dropbox import ( "encoding/json" "fmt" "io" "log" "net/http" "golang.org/x/net/context" "golang.org/x/oauth2" ) const ( apiVersion = 2 defaultDomain = ".dropboxapi.com" hostAPI = "api" hostContent = "content" hostNotify = "notify" sdkVersion = "UNKNOWN SDK VERSION" specVersion = "UNKNOWN SPEC VERSION" ) // Version returns the current SDK version and API Spec version func Version() (string, string) { return sdkVersion, specVersion } // Config contains parameters for configuring the SDK. type Config struct { // OAuth2 access token Token string // Logging level for SDK generated logs LogLevel LogLevel // Logging target for verbose SDK logging Logger *log.Logger // Used with APIs that support operations as another user AsMemberID string // No need to set -- for testing only Domain string // No need to set -- for testing only Client *http.Client // No need to set -- for testing only HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string // No need to set -- for testing only URLGenerator func(hostType string, style string, namespace string, route string) string } // LogLevel defines a type that can set the desired level of logging the SDK will generate. type LogLevel uint const ( // LogOff will disable all SDK logging. This is the default log level LogOff LogLevel = iota * (1 << 8) // LogDebug will enable detailed SDK debug logs. It will log requests (including arguments), // response and body contents. LogDebug // LogInfo will log SDK request (not including arguments) and responses. LogInfo ) func (l LogLevel) shouldLog(v LogLevel) bool { return l > v || l&v == v } func (c *Config) doLog(l LogLevel, format string, v ...interface{}) { if !c.LogLevel.shouldLog(l) { return } if c.Logger != nil { c.Logger.Printf(format, v...) } else { log.Printf(format, v...) } } // LogDebug emits a debug level SDK log if config's log level is at least LogDebug func (c *Config) LogDebug(format string, v ...interface{}) { c.doLog(LogDebug, format, v...) } // LogInfo emits an info level SDK log if config's log level is at least LogInfo func (c *Config) LogInfo(format string, v ...interface{}) { c.doLog(LogInfo, format, v...) } // Context is the base client context used to implement per-namespace clients. type Context struct { Config Config Client *http.Client HeaderGenerator func(hostType string, style string, namespace string, route string) map[string]string URLGenerator func(hostType string, style string, namespace string, route string) string } // NewRequest returns an appropriate Request object for the given namespace/route. func (c *Context) NewRequest( hostType string, style string, authed bool, namespace string, route string, headers map[string]string, body io.Reader, ) (*http.Request, error) { url := c.URLGenerator(hostType, style, namespace, route) req, err := http.NewRequest("POST", url, body) if err != nil { return nil, err } for k, v := range headers { req.Header.Add(k, v) } for k, v := range c.HeaderGenerator(hostType, style, namespace, route) { req.Header.Add(k, v) } if req.Header.Get("Host") != "" { req.Host = req.Header.Get("Host") } if !authed { req.Header.Del("Authorization") } return req, nil } // NewContext returns a new Context with the given Config. func NewContext(c Config) Context { domain := c.Domain if domain == "" { domain = defaultDomain } client := c.Client if client == nil { var conf = &oauth2.Config{Endpoint: OAuthEndpoint(domain)} tok := &oauth2.Token{AccessToken: c.Token} client = conf.Client(context.Background(), tok) } headerGenerator := c.HeaderGenerator if headerGenerator == nil { headerGenerator = func(hostType string, style string, namespace string, route string) map[string]string { return map[string]string{} } } urlGenerator := c.URLGenerator if urlGenerator == nil { hostMap := map[string]string{ hostAPI: hostAPI + domain, hostContent: hostContent + domain, hostNotify: hostNotify + domain, } urlGenerator = func(hostType string, style string, namespace string, route string) string { fqHost := hostMap[hostType] return fmt.Sprintf("https://%s/%d/%s/%s", fqHost, apiVersion, namespace, route) } } return Context{c, client, headerGenerator, urlGenerator} } // OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain func OAuthEndpoint(domain string) oauth2.Endpoint { if domain == "" { domain = defaultDomain } authURL := fmt.Sprintf("https://meta%s/1/oauth2/authorize", domain) tokenURL := fmt.Sprintf("https://api%s/1/oauth2/token", domain) if domain == defaultDomain { authURL = "https://www.dropbox.com/1/oauth2/authorize" } return oauth2.Endpoint{AuthURL: authURL, TokenURL: tokenURL} } // Tagged is used for tagged unions. type Tagged struct { Tag string `json:".tag"` } // APIError is the base type for endpoint-specific errors. type APIError struct { ErrorSummary string `json:"error_summary"` } func (e APIError) Error() string { return e.ErrorSummary } // HandleCommonAPIErrors handles common API errors func HandleCommonAPIErrors(c Config, resp *http.Response, body []byte) error { var apiError APIError if resp.StatusCode == http.StatusBadRequest || resp.StatusCode == http.StatusInternalServerError { apiError.ErrorSummary = string(body) return apiError } e := json.Unmarshal(body, &apiError) if e != nil { c.LogDebug("%v", e) return e } return apiError } dropbox-sdk-go-unofficial-5.4.0/generator/go_types.stoneg.py000066400000000000000000000246641340753361200242030ustar00rootroot00000000000000import os import shutil from stone.backend import CodeBackend from stone.ir import ( is_boolean_type, is_list_type, is_nullable_type, is_primitive_type, is_struct_type, is_union_type, is_void_type, ) from go_helpers import ( HEADER, fmt_type, fmt_var, generate_doc, needs_base_type, _needs_base_type ) class GoTypesBackend(CodeBackend): def generate(self, api): rsrc_folder = os.path.join(os.path.dirname(__file__), 'go_rsrc') shutil.copy(os.path.join(rsrc_folder, 'sdk.go'), self.target_folder_path) for namespace in api.namespaces.values(): self._generate_namespace(namespace) def _generate_namespace(self, namespace): file_name = os.path.join(self.target_folder_path, namespace.name, 'types.go') with self.output_to_relative_path(file_name): self.emit_raw(HEADER) self.emit() generate_doc(self, namespace) self.emit('package %s' % namespace.name) self.emit() for data_type in namespace.linearize_data_types(): self._generate_data_type(data_type) def _generate_data_type(self, data_type): generate_doc(self, data_type) if is_struct_type(data_type): self._generate_struct(data_type) if data_type.has_enumerated_subtypes(): self._generate_base_type(data_type) elif is_union_type(data_type): self._generate_union(data_type) else: self.logger.info("Unhandled data type", data_type) def _generate_base_type(self, base): t = fmt_type(base).lstrip('*') self.emit('// Is{0} is the interface type for {0} and its subtypes'.format(t)) with self.block('type Is%s interface' % t): self.emit('Is%s()' % t) self.emit() self.emit('// Is{0} implements the Is{0} interface'.format(t)) self.emit("func (u *{0}) Is{0}() {{}}".format(t)) self.emit() self._generate_union_helper(base) self.emit("// Is{0}FromJSON converts JSON to a concrete Is{0} instance".format(t)) with self.block("func Is{0}FromJSON(data []byte) (Is{0}, error)".format(t)): name = fmt_var(t, export=False) + 'Union' self.emit("var t {0}".format(name)) with self.block("if err := json.Unmarshal(data, &t); err != nil"): self.emit("return nil, err") with self.block("switch t.Tag"): fields = base.get_enumerated_subtypes() for field in fields: with self.block('case "%s":' % field.name, delim=(None, None)): self.emit("return t.{0}, nil".format(fmt_var(field.name))) # FIX THIS self.emit("return nil, nil") def _generate_struct(self, struct): with self.block('type %s struct' % struct.name): if struct.parent_type: self.emit(fmt_type(struct.parent_type, struct.namespace).lstrip('*')) for field in struct.fields: self._generate_field(field, namespace=struct.namespace) if struct.name in ('DownloadArg',): self.emit('// ExtraHeaders can be used to pass Range, If-None-Match headers') self.emit('ExtraHeaders map[string]string `json:"-"`') self._generate_struct_builder(struct) self.emit() if needs_base_type(struct): self.emit('// UnmarshalJSON deserializes into a %s instance' % struct.name) with self.block('func (u *%s) UnmarshalJSON(b []byte) error' % struct.name): with self.block('type wrap struct'): for field in struct.all_fields: self._generate_field(field, namespace=struct.namespace, raw=_needs_base_type(field.data_type)) self.emit('var w wrap') with self.block('if err := json.Unmarshal(b, &w); err != nil'): self.emit('return err') for field in struct.all_fields: dt = field.data_type fn = fmt_var(field.name) tn = fmt_type(dt, namespace=struct.namespace, use_interface=True) if _needs_base_type(dt): if is_list_type(dt): self.emit("u.{0} = make({1}, len(w.{0}))".format(fn, tn)) # Grab the underlying type to get the correct Is...FromJSON method tn = fmt_type(dt.data_type, namespace=struct.namespace, use_interface=True) with self.block("for i, e := range w.{0}".format(fn)): self.emit("v, err := {1}FromJSON(e)".format(fn, tn)) with self.block('if err != nil'): self.emit('return err') self.emit("u.{0}[i] = v".format(fn)) else: self.emit("{0}, err := {1}FromJSON(w.{0})".format(fn, tn)) with self.block('if err != nil'): self.emit('return err') self.emit("u.{0} = {0}".format(fn)) else: self.emit("u.{0} = w.{0}".format(fn)) self.emit('return nil') def _generate_struct_builder(self, struct): fields = ["%s %s" % (fmt_var(field.name), fmt_type(field.data_type, struct.namespace, use_interface=True)) for field in struct.all_required_fields] self.emit('// New{0} returns a new {0} instance'.format(struct.name)) signature = "func New{0}({1}) *{0}".format(struct.name, ', '.join(fields)) with self.block(signature): self.emit('s := new({0})'.format(struct.name)) for field in struct.all_required_fields: field_name = fmt_var(field.name) self.emit("s.{0} = {0}".format(field_name)) for field in struct.all_optional_fields: if field.has_default: if is_primitive_type(field.data_type): default = field.default if is_boolean_type(field.data_type): default = str(default).lower() self.emit('s.{0} = {1}'.format(fmt_var(field.name), default)) elif is_union_type(field.data_type): self.emit('s.%s = &%s{Tagged:dropbox.Tagged{"%s"}}' % (fmt_var(field.name), fmt_type(field.data_type, struct.namespace).lstrip('*'), field.default.tag_name)) self.emit('return s') self.emit() def _generate_field(self, field, union_field=False, namespace=None, raw=False): generate_doc(self, field) field_name = fmt_var(field.name) type_name = fmt_type(field.data_type, namespace, use_interface=True, raw=raw) json_tag = '`json:"%s"`' % field.name if is_nullable_type(field.data_type) or union_field: json_tag = '`json:"%s,omitempty"`' % field.name self.emit('%s %s %s' % (field_name, type_name, json_tag)) def _generate_union(self, union): self._generate_union_helper(union) def _generate_union_helper(self, u): name = u.name namespace = u.namespace # Unions can be inherited, but don't need to be polymorphic. # So let's flatten out all the inherited fields. fields = u.all_fields if is_struct_type(u) and u.has_enumerated_subtypes(): name = fmt_var(name, export=False) + 'Union' fields = u.get_enumerated_subtypes() with self.block('type %s struct' % name): self.emit('dropbox.Tagged') for field in fields: if is_void_type(field.data_type): continue self._generate_field(field, union_field=True, namespace=namespace) self.emit() self.emit('// Valid tag values for %s' % fmt_var(u.name)) with self.block('const', delim=('(', ')')): for field in fields: self.emit('%s%s = "%s"' % (fmt_var(u.name), fmt_var(field.name), field.name)) self.emit() num_void_fields = sum([is_void_type(f.data_type) for f in fields]) # Simple structure, no need in UnmarshalJSON if len(fields) == num_void_fields: return self.emit('// UnmarshalJSON deserializes into a %s instance' % name) with self.block('func (u *%s) UnmarshalJSON(body []byte) error' % name): with self.block('type wrap struct'): self.emit('dropbox.Tagged') for field in fields: if is_void_type(field.data_type) or \ is_primitive_type(field.data_type): continue self._generate_field(field, union_field=True, namespace=namespace, raw=True) self.emit('var w wrap') self.emit('var err error') with self.block('if err = json.Unmarshal(body, &w); err != nil'): self.emit('return err') self.emit('u.Tag = w.Tag') with self.block('switch u.Tag'): for field in fields: if is_void_type(field.data_type): continue field_name = fmt_var(field.name) with self.block('case "%s":' % field.name, delim=(None, None)): if is_union_type(field.data_type): self.emit('err = json.Unmarshal(w.{0}, &u.{0})' .format(field_name)) elif _needs_base_type(field.data_type): self.emit("u.{0}, err = Is{1}FromJSON(body)" .format(field_name, field.data_type.name)) else: self.emit('err = json.Unmarshal(body, &u.{0})' .format(field_name)) with self.block("if err != nil"): self.emit("return err") self.emit('return nil') self.emit()