File: types.go

package info (click to toggle)
golang-github-dropbox-dropbox-sdk-go-unofficial 6.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,324 kB
  • sloc: python: 481; sh: 22; makefile: 2
file content (903 lines) | stat: -rw-r--r-- 31,635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
// 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. New Paper users will see docs they create
// in their filesystem as '.paper' files alongside their other Dropbox content.
// The /paper endpoints are being deprecated and you'll need to use /files and
// /sharing endpoints to interact with their Paper content. Read more in the
// `Paper Migration Guide`
// <https://www.dropbox.com/lp/developers/reference/paper-migration-guide>.
package paper

import (
	"encoding/json"
	"time"

	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
	"github.com/dropbox/dropbox-sdk-go-unofficial/v6/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{Tag: "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. 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 *PaperApiCursorError `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":
		u.CursorError = w.CursorError

	}
	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{Tag: "docs_accessed"}}
	s.SortBy = &ListPaperDocsSortBy{Tagged: dropbox.Tagged{Tag: "accessed"}}
	s.SortOrder = &ListPaperDocsSortOrder{Tagged: dropbox.Tagged{Tag: "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 *PaperApiCursorError `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":
		u.CursorError = w.CursorError

	}
	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{Tag: "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"
)

// PaperFolderCreateArg : has no documentation (yet)
type PaperFolderCreateArg struct {
	// Name : The name of the new Paper folder.
	Name string `json:"name"`
	// ParentFolderId : The encrypted Paper folder Id where the new Paper folder
	// should be created. The API user has to have write access to this folder
	// or error is thrown. If not supplied, the new folder will be created at
	// top level.
	ParentFolderId string `json:"parent_folder_id,omitempty"`
	// IsTeamFolder : Whether the folder to be created should be a team folder.
	// This value will be ignored if parent_folder_id is supplied, as the new
	// folder will inherit the type (private or team folder) from its parent. We
	// will by default create a top-level private folder if both
	// parent_folder_id and is_team_folder are not supplied.
	IsTeamFolder bool `json:"is_team_folder,omitempty"`
}

// NewPaperFolderCreateArg returns a new PaperFolderCreateArg instance
func NewPaperFolderCreateArg(Name string) *PaperFolderCreateArg {
	s := new(PaperFolderCreateArg)
	s.Name = Name
	return s
}

// PaperFolderCreateError : has no documentation (yet)
type PaperFolderCreateError struct {
	dropbox.Tagged
}

// Valid tag values for PaperFolderCreateError
const (
	PaperFolderCreateErrorInsufficientPermissions = "insufficient_permissions"
	PaperFolderCreateErrorOther                   = "other"
	PaperFolderCreateErrorFolderNotFound          = "folder_not_found"
	PaperFolderCreateErrorInvalidFolderId         = "invalid_folder_id"
)

// PaperFolderCreateResult : has no documentation (yet)
type PaperFolderCreateResult struct {
	// FolderId : Folder ID of the newly created folder.
	FolderId string `json:"folder_id"`
}

// NewPaperFolderCreateResult returns a new PaperFolderCreateResult instance
func NewPaperFolderCreateResult(FolderId string) *PaperFolderCreateResult {
	s := new(PaperFolderCreateResult)
	s.FolderId = FolderId
	return s
}

// 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"
)