Skip to content

Commit

Permalink
Automated Spec Update (#452)
Browse files Browse the repository at this point in the history
3d1080a021a67c335c52361d8f61ec558bb80606

 Change Notes:

shared_links Namespace

Update RequestedLinkAccessLevel union
team Namespace

Update TeamGetInfoResult struct
team_log_generated Namespace

Add FolderLinkRestrictionPolicyChangedDetails, FolderLinkRestrictionPolicyChangedType structs
Add FolderLinkRestrictionPolicy unions

Co-authored-by: DropboxBot <DropboxBot@users.noreply.github.com>
  • Loading branch information
DropboxBot and DropboxBot committed Nov 9, 2022
1 parent 93435f7 commit 9895d70
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 1 deletion.
15 changes: 15 additions & 0 deletions dropbox/sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7683,6 +7683,8 @@ class RequestedLinkAccessLevel(bb.Union):
edit links yet.
:ivar sharing.RequestedLinkAccessLevel.max: Request for the maximum access
level you can set the link to.
:ivar sharing.RequestedLinkAccessLevel.default: Request for the default
access level the user has set.
"""

_catch_all = 'other'
Expand All @@ -7693,6 +7695,8 @@ class RequestedLinkAccessLevel(bb.Union):
# Attribute is overwritten below the class definition
max = None
# Attribute is overwritten below the class definition
default = None
# Attribute is overwritten below the class definition
other = None

def is_viewer(self):
Expand All @@ -7719,6 +7723,14 @@ def is_max(self):
"""
return self._tag == 'max'

def is_default(self):
"""
Check if the union tag is ``default``.
:rtype: bool
"""
return self._tag == 'default'

def is_other(self):
"""
Check if the union tag is ``other``.
Expand Down Expand Up @@ -12715,17 +12727,20 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
RequestedLinkAccessLevel._viewer_validator = bv.Void()
RequestedLinkAccessLevel._editor_validator = bv.Void()
RequestedLinkAccessLevel._max_validator = bv.Void()
RequestedLinkAccessLevel._default_validator = bv.Void()
RequestedLinkAccessLevel._other_validator = bv.Void()
RequestedLinkAccessLevel._tagmap = {
'viewer': RequestedLinkAccessLevel._viewer_validator,
'editor': RequestedLinkAccessLevel._editor_validator,
'max': RequestedLinkAccessLevel._max_validator,
'default': RequestedLinkAccessLevel._default_validator,
'other': RequestedLinkAccessLevel._other_validator,
}

RequestedLinkAccessLevel.viewer = RequestedLinkAccessLevel('viewer')
RequestedLinkAccessLevel.editor = RequestedLinkAccessLevel('editor')
RequestedLinkAccessLevel.max = RequestedLinkAccessLevel('max')
RequestedLinkAccessLevel.default = RequestedLinkAccessLevel('default')
RequestedLinkAccessLevel.other = RequestedLinkAccessLevel('other')

RevokeSharedLinkArg.url.validator = bv.String()
Expand Down
13 changes: 13 additions & 0 deletions dropbox/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -12376,13 +12376,16 @@ class TeamGetInfoResult(bb.Struct):
available to the team.
:ivar team.TeamGetInfoResult.num_provisioned_users: The number of accounts
that have been invited or are already active members of the team.
:ivar team.TeamGetInfoResult.num_used_licenses: The number of licenses used
on the team.
"""

__slots__ = [
'_name_value',
'_team_id_value',
'_num_licensed_users_value',
'_num_provisioned_users_value',
'_num_used_licenses_value',
'_policies_value',
]

Expand All @@ -12393,11 +12396,13 @@ def __init__(self,
team_id=None,
num_licensed_users=None,
num_provisioned_users=None,
num_used_licenses=None,
policies=None):
self._name_value = bb.NOT_SET
self._team_id_value = bb.NOT_SET
self._num_licensed_users_value = bb.NOT_SET
self._num_provisioned_users_value = bb.NOT_SET
self._num_used_licenses_value = bb.NOT_SET
self._policies_value = bb.NOT_SET
if name is not None:
self.name = name
Expand All @@ -12407,6 +12412,8 @@ def __init__(self,
self.num_licensed_users = num_licensed_users
if num_provisioned_users is not None:
self.num_provisioned_users = num_provisioned_users
if num_used_licenses is not None:
self.num_used_licenses = num_used_licenses
if policies is not None:
self.policies = policies

Expand All @@ -12422,6 +12429,9 @@ def __init__(self,
# Instance attribute type: int (validator is set below)
num_provisioned_users = bb.Attribute("num_provisioned_users")

# Instance attribute type: int (validator is set below)
num_used_licenses = bb.Attribute("num_used_licenses")

# Instance attribute type: team_policies.TeamMemberPolicies (validator is set below)
policies = bb.Attribute("policies", user_defined=True)

Expand Down Expand Up @@ -16638,19 +16648,22 @@ def _process_custom_annotations(self, annotation_type, field_path, processor):
TeamGetInfoResult.team_id.validator = bv.String()
TeamGetInfoResult.num_licensed_users.validator = bv.UInt32()
TeamGetInfoResult.num_provisioned_users.validator = bv.UInt32()
TeamGetInfoResult.num_used_licenses.validator = bv.UInt32()
TeamGetInfoResult.policies.validator = team_policies.TeamMemberPolicies_validator
TeamGetInfoResult._all_field_names_ = set([
'name',
'team_id',
'num_licensed_users',
'num_provisioned_users',
'num_used_licenses',
'policies',
])
TeamGetInfoResult._all_fields_ = [
('name', TeamGetInfoResult.name.validator),
('team_id', TeamGetInfoResult.team_id.validator),
('num_licensed_users', TeamGetInfoResult.num_licensed_users.validator),
('num_provisioned_users', TeamGetInfoResult.num_provisioned_users.validator),
('num_used_licenses', TeamGetInfoResult.num_used_licenses.validator),
('policies', TeamGetInfoResult.policies.validator),
]

Expand Down

0 comments on commit 9895d70

Please sign in to comment.