1818// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919// THE SOFTWARE.
2020
21+ // Package async : has no documentation (yet)
2122package async
2223
2324import (
@@ -26,21 +27,25 @@ import (
2627 "github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
2728)
2829
29- // Result returned by methods that launch an asynchronous job. A method who may
30- // either launch an asynchronous job, or complete the request synchronously, can
31- // use this union by extending it, and adding a 'complete' field with the type
32- // of the synchronous response. See `LaunchEmptyResult` for an example.
30+ // LaunchResultBase : Result returned by methods that launch an asynchronous
31+ // job. A method who may either launch an asynchronous job, or complete the
32+ // request synchronously, can use this union by extending it, and adding a
33+ // 'complete' field with the type of the synchronous response. See
34+ // `LaunchEmptyResult` for an example.
3335type LaunchResultBase struct {
3436 dropbox.Tagged
35- // This response indicates that the processing is asynchronous. The string
36- // is an id that can be used to obtain the status of the asynchronous job.
37+ // AsyncJobId : This response indicates that the processing is asynchronous.
38+ // The string is an id that can be used to obtain the status of the
39+ // asynchronous job.
3740 AsyncJobId string `json:"async_job_id,omitempty"`
3841}
3942
43+ // Valid tag values for LaunchResultBase
4044const (
41- LaunchResultBase_AsyncJobId = "async_job_id"
45+ LaunchResultBaseAsyncJobId = "async_job_id"
4246)
4347
48+ // UnmarshalJSON deserializes into a LaunchResultBase instance
4449func (u * LaunchResultBase ) UnmarshalJSON (body []byte ) error {
4550 type wrap struct {
4651 dropbox.Tagged
@@ -60,59 +65,66 @@ func (u *LaunchResultBase) UnmarshalJSON(body []byte) error {
6065 return nil
6166}
6267
63- // Result returned by methods that may either launch an asynchronous job or
64- // complete synchronously. Upon synchronous completion of the job, no additional
65- // information is returned.
68+ // LaunchEmptyResult : Result returned by methods that may either launch an
69+ // asynchronous job or complete synchronously. Upon synchronous completion of
70+ // the job, no additional information is returned.
6671type LaunchEmptyResult struct {
6772 dropbox.Tagged
6873}
6974
75+ // Valid tag values for LaunchEmptyResult
7076const (
71- LaunchEmptyResult_Complete = "complete"
77+ LaunchEmptyResultComplete = "complete"
7278)
7379
74- // Arguments for methods that poll the status of an asynchronous job.
80+ // PollArg : Arguments for methods that poll the status of an asynchronous job.
7581type PollArg struct {
76- // Id of the asynchronous job. This is the value of a response returned from
77- // the method that launched the job.
82+ // AsyncJobId : Id of the asynchronous job. This is the value of a response
83+ // returned from the method that launched the job.
7884 AsyncJobId string `json:"async_job_id"`
7985}
8086
87+ // NewPollArg returns a new PollArg instance
8188func NewPollArg (AsyncJobId string ) * PollArg {
8289 s := new (PollArg )
8390 s .AsyncJobId = AsyncJobId
8491 return s
8592}
8693
87- // Result returned by methods that poll for the status of an asynchronous job.
88- // Unions that extend this union should add a 'complete' field with a type of
89- // the information returned upon job completion. See `PollEmptyResult` for an
90- // example.
94+ // PollResultBase : Result returned by methods that poll for the status of an
95+ // asynchronous job. Unions that extend this union should add a 'complete' field
96+ // with a type of the information returned upon job completion. See
97+ // `PollEmptyResult` for an example.
9198type PollResultBase struct {
9299 dropbox.Tagged
93100}
94101
102+ // Valid tag values for PollResultBase
95103const (
96- PollResultBase_InProgress = "in_progress"
104+ PollResultBaseInProgress = "in_progress"
97105)
98106
99- // Result returned by methods that poll for the status of an asynchronous job.
100- // Upon completion of the job, no additional information is returned.
107+ // PollEmptyResult : Result returned by methods that poll for the status of an
108+ // asynchronous job. Upon completion of the job, no additional information is
109+ // returned.
101110type PollEmptyResult struct {
102111 dropbox.Tagged
103112}
104113
114+ // Valid tag values for PollEmptyResult
105115const (
106- PollEmptyResult_Complete = "complete"
116+ PollEmptyResultComplete = "complete"
107117)
108118
109- // Error returned by methods for polling the status of asynchronous job.
119+ // PollError : Error returned by methods for polling the status of asynchronous
120+ // job.
110121type PollError struct {
111122 dropbox.Tagged
112123}
113124
125+ // Valid tag values for PollError
114126const (
115- PollError_InvalidAsyncJobId = "invalid_async_job_id"
116- PollError_InternalError = "internal_error"
117- PollError_Other = "other"
127+ PollErrorInvalidAsyncJobId = "invalid_async_job_id"
128+ PollErrorInternalError = "internal_error"
129+ PollErrorOther = "other"
118130)
0 commit comments