Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Spec Update #392

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dropbox/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3006,6 +3006,10 @@ def files_upload_session_finish_batch(self,
Commit information for each file in the batch.
:rtype: :class:`dropbox.files.UploadSessionFinishBatchLaunch`
"""
warnings.warn(
'upload_session/finish_batch is deprecated. Use upload_session/finish_batch.',
DeprecationWarning,
)
arg = files.UploadSessionFinishBatchArg(entries)
r = self.request(
files.upload_session_finish_batch,
Expand Down
2 changes: 1 addition & 1 deletion dropbox/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -13138,7 +13138,7 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
upload_session_finish_batch = bb.Route(
'upload_session/finish_batch',
1,
False,
True,
UploadSessionFinishBatchArg_validator,
UploadSessionFinishBatchLaunch_validator,
bv.Void(),
Expand Down
13 changes: 13 additions & 0 deletions dropbox/team_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -64030,6 +64030,8 @@ class SharingLinkPolicy(bb.Union):

_catch_all = 'other'
# Attribute is overwritten below the class definition
default_no_one = None
# Attribute is overwritten below the class definition
default_private = None
# Attribute is overwritten below the class definition
default_public = None
Expand All @@ -64038,6 +64040,14 @@ class SharingLinkPolicy(bb.Union):
# Attribute is overwritten below the class definition
other = None

def is_default_no_one(self):
"""
Check if the union tag is ``default_no_one``.

:rtype: bool
"""
return self._tag == 'default_no_one'

def is_default_private(self):
"""
Check if the union tag is ``default_private``.
Expand Down Expand Up @@ -81648,17 +81658,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
SharingFolderJoinPolicy.from_team_only = SharingFolderJoinPolicy('from_team_only')
SharingFolderJoinPolicy.other = SharingFolderJoinPolicy('other')

SharingLinkPolicy._default_no_one_validator = bv.Void()
SharingLinkPolicy._default_private_validator = bv.Void()
SharingLinkPolicy._default_public_validator = bv.Void()
SharingLinkPolicy._only_private_validator = bv.Void()
SharingLinkPolicy._other_validator = bv.Void()
SharingLinkPolicy._tagmap = {
'default_no_one': SharingLinkPolicy._default_no_one_validator,
'default_private': SharingLinkPolicy._default_private_validator,
'default_public': SharingLinkPolicy._default_public_validator,
'only_private': SharingLinkPolicy._only_private_validator,
'other': SharingLinkPolicy._other_validator,
}

SharingLinkPolicy.default_no_one = SharingLinkPolicy('default_no_one')
SharingLinkPolicy.default_private = SharingLinkPolicy('default_private')
SharingLinkPolicy.default_public = SharingLinkPolicy('default_public')
SharingLinkPolicy.only_private = SharingLinkPolicy('only_private')
Expand Down
16 changes: 16 additions & 0 deletions dropbox/team_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,9 @@ class SharedLinkCreatePolicy(bb.Union):
:ivar team_policies.SharedLinkCreatePolicy.team_only: Only members of the
same team can access all shared links. Login will be required to access
all shared links.
:ivar team_policies.SharedLinkCreatePolicy.default_no_one: Only people
invited can access newly created links. Login will be required to access
the shared links unless overridden.
"""

_catch_all = 'other'
Expand All @@ -854,6 +857,8 @@ class SharedLinkCreatePolicy(bb.Union):
# Attribute is overwritten below the class definition
team_only = None
# Attribute is overwritten below the class definition
default_no_one = None
# Attribute is overwritten below the class definition
other = None

def is_default_public(self):
Expand All @@ -880,6 +885,14 @@ def is_team_only(self):
"""
return self._tag == 'team_only'

def is_default_no_one(self):
"""
Check if the union tag is ``default_no_one``.

:rtype: bool
"""
return self._tag == 'default_no_one'

def is_other(self):
"""
Check if the union tag is ``other``.
Expand Down Expand Up @@ -1687,17 +1700,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
SharedLinkCreatePolicy._default_public_validator = bv.Void()
SharedLinkCreatePolicy._default_team_only_validator = bv.Void()
SharedLinkCreatePolicy._team_only_validator = bv.Void()
SharedLinkCreatePolicy._default_no_one_validator = bv.Void()
SharedLinkCreatePolicy._other_validator = bv.Void()
SharedLinkCreatePolicy._tagmap = {
'default_public': SharedLinkCreatePolicy._default_public_validator,
'default_team_only': SharedLinkCreatePolicy._default_team_only_validator,
'team_only': SharedLinkCreatePolicy._team_only_validator,
'default_no_one': SharedLinkCreatePolicy._default_no_one_validator,
'other': SharedLinkCreatePolicy._other_validator,
}

SharedLinkCreatePolicy.default_public = SharedLinkCreatePolicy('default_public')
SharedLinkCreatePolicy.default_team_only = SharedLinkCreatePolicy('default_team_only')
SharedLinkCreatePolicy.team_only = SharedLinkCreatePolicy('team_only')
SharedLinkCreatePolicy.default_no_one = SharedLinkCreatePolicy('default_no_one')
SharedLinkCreatePolicy.other = SharedLinkCreatePolicy('other')

ShowcaseDownloadPolicy._disabled_validator = bv.Void()
Expand Down
2 changes: 1 addition & 1 deletion spec