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 #452

Merged
merged 1 commit into from
Nov 9, 2022
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
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
Loading